.nrfi-pitching-cheatsheet,
.nrfi-pitching-cheatsheet * {
  box-sizing: border-box;
}

.nrfi-pitching-cheatsheet {
  --pcs-bg: #08111f;
  --pcs-panel: #0f1d31;
  --pcs-panel-2: #13243a;
  --pcs-panel-3: #172a43;
  --pcs-border: #28415f;
  --pcs-text: #f7fbff;
  --pcs-muted: #9db2cb;
  --pcs-blue: #38a6e8;
  --pcs-green: #25d281;
  --pcs-green-soft: #123e31;
  --pcs-yellow: #f4bd4b;
  --pcs-yellow-soft: #4a3816;
  --pcs-red: #ff6f7d;
  --pcs-red-soft: #4b2029;
  --pcs-white-panel: #f7f9fc;
  --pcs-shadow: 0 22px 50px rgba(0, 0, 0, .26);
  width: 100%;
  color: var(--pcs-text);
  background: linear-gradient(180deg, #07101d 0%, #0a1423 100%);
  border: 1px solid #1f3652;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--pcs-shadow);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.nrfi-pitching-cheatsheet a {
  color: inherit;
  text-decoration: none;
}

.nrfi-pitching-cheatsheet a:hover,
.nrfi-pitching-cheatsheet a:focus {
  color: #8fd5ff;
  text-decoration: underline;
}

.team-logo-link,
.pitcher-headshot-link {
  display: inline-flex;
  flex: 0 0 auto;
  border-radius: 13px;
  text-decoration: none !important;
}

.team-logo-link:focus-visible,
.pitcher-headshot-link:focus-visible {
  outline: 2px solid #7dcdf9;
  outline-offset: 3px;
}

.team-logo-link:hover .team-logo-shell,
.pitcher-headshot-link:hover .pitcher-headshot {
  border-color: #7dcdf9;
  box-shadow: 0 0 0 3px rgba(125, 205, 249, .14);
}

.cheatsheet-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 24px;
  background:
    radial-gradient(circle at 82% 10%, rgba(56, 166, 232, .19), transparent 30%),
    linear-gradient(135deg, #07111f, #10223a);
  border-bottom: 1px solid var(--pcs-border);
}

.hero-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border: 1px solid #2a597f;
  border-radius: 15px;
  background: #0b1d31;
  font-size: 26px;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .025);
}

.hero-copy {
  min-width: 0;
  flex: 1;
}

.hero-kicker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  margin-bottom: 4px;
  color: #7fc9f6;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.hero-date {
  color: #a9bdd2;
}

.cheatsheet-hero h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(22px, 2.8vw, 36px);
  line-height: 1.06;
  letter-spacing: -.02em;
}

.cheatsheet-hero p {
  max-width: 920px;
  margin: 7px 0 0;
  color: var(--pcs-muted);
  font-size: 14px;
  line-height: 1.45;
}

.load-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  min-width: 124px;
  padding: 9px 12px;
  border: 1px solid #35506f;
  border-radius: 999px;
  color: #c8d8e9;
  background: rgba(4, 12, 22, .62);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.load-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pcs-yellow);
  box-shadow: 0 0 0 4px rgba(244, 189, 75, .12);
}

.load-state.is-ready {
  color: #aaf4cf;
  border-color: #21724f;
}

.load-state.is-ready .load-dot {
  background: var(--pcs-green);
  box-shadow: 0 0 0 4px rgba(37, 210, 129, .12);
}

.load-state.is-error {
  color: #ffc0c6;
  border-color: #8b3442;
}

.load-state.is-error .load-dot {
  background: var(--pcs-red);
  box-shadow: 0 0 0 4px rgba(255, 111, 125, .13);
}

.cheatsheet-controls {
  display: grid;
  grid-template-columns: minmax(130px, .72fr) minmax(145px, .82fr) minmax(145px, .82fr) minmax(155px, .62fr) auto minmax(86px, auto);
  align-items: end;
  gap: 10px;
  padding: 15px 18px;
  background: #0a1728;
  border-bottom: 1px solid var(--pcs-border);
}

.cheatsheet-controls label {
  display: grid;
  gap: 6px;
  min-width: 0;
  margin: 0;
}

.cheatsheet-controls label > span {
  color: #8ea6c1;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.cheatsheet-controls select,
.cheatsheet-controls input {
  width: 100%;
  min-height: 40px;
  margin: 0;
  padding: 8px 11px;
  border: 1px solid #2d4866;
  border-radius: 9px;
  color: #f3f8fd;
  background: #0d1d31;
  font: inherit;
  font-size: 13px;
  outline: none;
}

.cheatsheet-controls select:focus,
.cheatsheet-controls input:focus {
  border-color: #4ab8f4;
  box-shadow: 0 0 0 3px rgba(56, 166, 232, .13);
}

.cheatsheet-controls option {
  color: #fff;
  background: #0d1d31;
}

.search-control {
  width: 100%;
  max-width: 245px;
}

.view-switch {
  flex: 0 0 auto;
  white-space: nowrap;
}

.view-switch {
  display: inline-flex;
  padding: 3px;
  border: 1px solid #2d4866;
  border-radius: 10px;
  background: #07111e;
}

.view-switch button {
  min-height: 34px;
  margin: 0;
  padding: 7px 12px;
  border: 0;
  border-radius: 7px;
  color: #93a9c2;
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.view-switch button.is-active {
  color: #07111f;
  background: #7dcdf9;
}

.matchup-count {
  align-self: center;
  justify-self: end;
  color: #b9c9da;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.cheatsheet-body {
  min-height: 180px;
  background: var(--pcs-bg);
}

.cheatsheet-loading {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 65px 20px;
}

.cheatsheet-loading span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #5cbff4;
  animation: pcs-bounce 1s infinite ease-in-out;
}

.cheatsheet-loading span:nth-child(2) { animation-delay: .12s; }
.cheatsheet-loading span:nth-child(3) { animation-delay: .24s; }

@keyframes pcs-bounce {
  0%, 70%, 100% { transform: translateY(0); opacity: .42; }
  35% { transform: translateY(-7px); opacity: 1; }
}

.team-logo-shell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  padding: 5px;
  overflow: hidden;
  border: 1px solid #cfd9e4;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff, #eaf0f6);
  box-shadow: 0 3px 10px rgba(0, 0, 0, .18);
}

.team-logo-shell.team-logo-sm {
  width: 31px;
  height: 31px;
  padding: 4px;
  border-radius: 9px;
}

.team-logo-shell.team-logo-md {
  width: 38px;
  height: 38px;
}

.team-logo-shell.team-logo-lg {
  width: 50px;
  height: 50px;
  padding: 6px;
  border-radius: 14px;
}

.team-logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.team-logo-fallback {
  display: none;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  color: #0b1b2d;
  font-size: 12px;
  font-weight: 900;
}

.pitcher-headshot {
  position: relative;
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  overflow: hidden;
  border: 1px solid #3b5675;
  border-radius: 13px;
  background: linear-gradient(180deg, #dce8f3, #95aac0);
}

.pitcher-headshot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.pitcher-headshot-fallback {
  display: none;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #0c1d30;
  font-weight: 900;
}

span.pitcher-headshot-fallback.pitcher-headshot {
  display: inline-flex;
}

.cheatsheet-card-list {
  display: grid;
  gap: 18px;
  padding: 18px;
}

.matchup-card {
  overflow: hidden;
  border: 1px solid #284462;
  border-radius: 15px;
  background: #0d1a2d;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .19);
}

.matchup-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 17px;
  background: linear-gradient(135deg, #122844, #0c1b30 70%);
  border-bottom: 1px solid #29435f;
}

.matchup-title-block {
  min-width: 0;
}

.game-number {
  display: block;
  margin-bottom: 5px;
  color: #84ccef;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.matchup-title-block h3 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  color: #fff;
  font-size: clamp(18px, 2vw, 25px);
  line-height: 1.15;
}

.matchup-title-block h3 b {
  color: #6f87a2;
  font-size: 15px;
}

.matchup-title-block p {
  margin: 6px 0 0;
  color: #9fb2c8;
  font-size: 12px;
}

.game-odds {
  display: grid;
  grid-template-columns: repeat(2, minmax(74px, 1fr));
  gap: 8px;
  flex: 0 0 auto;
}

.game-odds > div {
  display: grid;
  gap: 1px;
  min-width: 76px;
  padding: 8px 11px;
  border-radius: 10px;
  text-align: center;
}

.game-odds span {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .09em;
}

.game-odds strong {
  font-size: 18px;
  line-height: 1.1;
}

.odds-nrfi {
  color: #baf5d7;
  background: #123c31;
  border: 1px solid #277758;
}

.odds-yrfi {
  color: #ffc4c9;
  background: #45202a;
  border: 1px solid #7d3442;
}

.matchup-sides {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: #29415d;
}

.side-panel {
  min-width: 0;
  padding: 16px;
  background: #0c192a;
}

.side-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 13px;
}

.team-identity {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 11px;
}

.team-identity > div {
  min-width: 0;
}

.side-label,
.pitcher-main > span,
.team-streak-wrap > span {
  display: block;
  color: #8da4bd;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.team-name-link {
  display: block;
  margin-top: 2px;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.1;
}

.team-streak-wrap {
  display: grid;
  justify-items: end;
  gap: 5px;
}

.streak-badge,
.status-badge,
.hand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.streak-nrfi {
  color: #aff2d1;
  background: var(--pcs-green-soft);
  border: 1px solid #25795a;
}

.streak-yrfi {
  color: #ffc3c9;
  background: var(--pcs-red-soft);
  border: 1px solid #7d3743;
}

.streak-neutral,
.status-unknown,
.hand-badge {
  color: #c9d7e6;
  background: #1c2b3f;
  border: 1px solid #3a536f;
}

.status-confirmed {
  color: #baf4d8;
  background: #134231;
  border: 1px solid #25805b;
}

.status-expected {
  color: #ffe2a1;
  background: #4c3813;
  border: 1px solid #8a6921;
}

.pitcher-strip {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 72px;
  padding: 9px;
  border: 1px solid #2a425e;
  border-radius: 12px;
  background: #101f33;
}

.pitcher-main {
  min-width: 0;
  flex: 1;
}

.pitcher-name-link {
  display: inline-block;
  max-width: 100%;
  margin: 3px 0 6px;
  overflow: hidden;
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pitcher-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.panel-section-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin: 16px 0 8px;
}

.panel-section-title span {
  color: #8ed7ff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.panel-section-title small {
  color: #7f95ae;
  font-size: 10px;
}

.metric-grid {
  display: grid;
  gap: 7px;
}

.team-metric-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.pitcher-metric-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric-box {
  display: grid;
  align-content: center;
  min-width: 0;
  min-height: 70px;
  padding: 8px;
  overflow: hidden;
  border: 1px solid #354b66;
  border-radius: 10px;
  text-align: center;
}

.metric-label {
  overflow: hidden;
  color: #b7c5d4;
  font-size: 9px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-box strong {
  margin: 3px 0 1px;
  color: #fff;
  font-size: 17px;
  line-height: 1;
}

.metric-box small {
  overflow: hidden;
  color: #c4d0dc;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-good {
  color: #c5f7de !important;
  background: var(--pcs-green-soft) !important;
  border-color: #287557 !important;
}

.metric-watch {
  color: #ffe7ad !important;
  background: var(--pcs-yellow-soft) !important;
  border-color: #826525 !important;
}

.metric-risk {
  color: #ffc3c9 !important;
  background: var(--pcs-red-soft) !important;
  border-color: #7b3642 !important;
}

.metric-neutral {
  color: #d0dce8 !important;
  background: #1a293d !important;
  border-color: #3a526d !important;
}

.run-prevention-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.run-stat {
  display: grid;
  grid-template-columns: minmax(42px, .7fr) repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 5px;
  padding: 7px;
  border: 1px solid #2e455f;
  border-radius: 10px;
  background: #0e1d30;
}

.run-stat > span {
  color: #a8bad0;
  font-size: 10px;
  font-weight: 900;
}

.run-stat > div {
  display: grid;
  justify-items: center;
  gap: 2px;
}

.run-stat b {
  display: block;
  width: 100%;
  padding: 4px 5px;
  border-radius: 7px;
  font-size: 13px;
  text-align: center;
}

.run-stat small {
  color: #8096ae;
  font-size: 8px;
  text-transform: uppercase;
}

.game-context {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid #27405c;
  background: #0a1727;
}

.weather-line {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 9px;
}

.context-icon {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  border-radius: 9px;
  background: #172b43;
}

.weather-line div {
  display: grid;
  min-width: 0;
}

.weather-line b {
  color: #8da5bf;
  font-size: 9px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.weather-line span:last-child {
  overflow: hidden;
  color: #e6eef7;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.park-metrics {
  display: flex;
  gap: 7px;
}

.park-metrics > div {
  display: grid;
  min-width: 72px;
  padding: 6px 8px;
  border: 1px solid #376a51;
  border-radius: 9px;
  background: #123428;
  text-align: center;
}

.park-metrics span,
.park-metrics small {
  color: #a8c8b9;
  font-size: 8px;
  text-transform: uppercase;
}

.park-metrics strong {
  color: #c6f4dd;
  font-size: 15px;
}

.cheatsheet-table-wrap {
  width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  scrollbar-color: #456682 #0b1727;
}

.cheatsheet-table {
  width: 100%;
  min-width: 1580px;
  margin: 0 !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  color: #eaf2fb !important;
  background: #0a1626 !important;
  font-family: inherit;
  font-size: 11px;
}

.cheatsheet-table th,
.cheatsheet-table td {
  padding: 7px 7px !important;
  border: 0 !important;
  border-right: 1px solid #294059 !important;
  border-bottom: 1px solid #294059 !important;
  color: inherit !important;
  background: inherit;
  text-align: center;
  vertical-align: middle;
}

.cheatsheet-table thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  min-width: 96px;
  padding: 10px 7px !important;
  color: #dbe8f6 !important;
  background: #10243a !important;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.cheatsheet-table .sticky-team-head,
.cheatsheet-table .sticky-team-cell {
  position: sticky;
  left: 0;
  z-index: 3;
  min-width: 165px;
  text-align: left;
  box-shadow: 5px 0 10px rgba(0, 0, 0, .18);
}

.cheatsheet-table .sticky-team-head {
  z-index: 6;
}

.cheatsheet-table th:nth-child(8),
.cheatsheet-table td:nth-child(8) {
  min-width: 230px;
}

.game-heading-row td {
  padding: 8px 10px !important;
  background: #142a45 !important;
  text-align: left;
}

.table-game-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.table-game-heading > div:first-child {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.table-game-heading strong {
  color: #fff;
  font-size: 13px;
}

.table-game-heading span {
  color: #a7bbd0;
  font-size: 10px;
}

.table-game-context {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
}

.table-game-context > span {
  padding: 4px 7px;
  border: 1px solid #345272;
  border-radius: 999px;
  background: #0d1d31;
  white-space: nowrap;
}

.table-game-context .inline-odds {
  font-weight: 800;
}

.team-data-row.game-group-a td {
  background: #0d192a;
}

.team-data-row.game-group-b td {
  background: #101e31;
}

.team-data-row.is-home-row td {
  border-bottom-width: 2px !important;
  border-bottom-color: #45627f !important;
}

.table-team,
.table-pitcher {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
}

.table-team > div,
.table-pitcher > div {
  min-width: 0;
}

.table-team .team-name-link,
.table-pitcher .pitcher-name-link {
  display: block;
  max-width: 150px;
  margin: 0;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-team .team-name-link {
  max-width: 112px;
}

.table-team small {
  display: block;
  margin-top: 2px;
  color: #879db4;
  font-size: 9px;
}

.table-pitcher .pitcher-headshot {
  width: 42px;
  height: 42px;
  border-radius: 10px;
}

.table-pitcher .pitcher-meta {
  margin-top: 4px;
  flex-wrap: nowrap;
}

.table-pitcher .status-badge,
.table-pitcher .streak-badge,
.table-pitcher .hand-badge {
  min-height: 19px;
  padding: 3px 5px;
  font-size: 8px;
}

.table-pitcher .pitcher-streak-badge {
  padding-right: 7px;
  padding-left: 7px;
}

.table-metric {
  display: grid;
  min-width: 72px;
  gap: 1px;
  padding: 6px 5px;
  border: 1px solid #40546b;
  border-radius: 8px;
}

.table-metric strong {
  font-size: 13px;
  line-height: 1;
}

.table-metric span,
.table-metric small {
  overflow: hidden;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-metric small {
  color: #c2cfdb;
  text-transform: uppercase;
}

.dual-stat {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

.dual-stat > span {
  display: grid;
  gap: 2px;
  min-width: 49px;
  padding: 6px 4px;
  border: 1px solid #41566e;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 900;
}

.dual-stat small {
  font-size: 7px;
  font-weight: 700;
  text-transform: uppercase;
}

.cheatsheet-error,
.empty-state {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 14px;
  margin: 18px;
  padding: 28px;
  border: 1px solid #7c3440;
  border-radius: 14px;
  background: #331923;
}

.error-mark {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  flex: 0 0 43px;
  border-radius: 12px;
  color: #fff;
  background: #b84555;
  font-size: 24px;
  font-weight: 900;
}

.cheatsheet-error h3 {
  margin: 0 0 7px;
  color: #fff;
}

.cheatsheet-error p {
  margin: 6px 0;
  color: #e7bdc2;
}

.cheatsheet-error code {
  display: block;
  max-width: 100%;
  padding: 8px 10px;
  overflow-wrap: anywhere;
  border-radius: 7px;
  color: #fff;
  background: #1e1015;
}

.error-detail {
  font-size: 11px;
}

.empty-state {
  display: grid;
  justify-items: center;
  color: #c7d5e4;
  border-color: #35516d;
  background: #101e31;
  text-align: center;
}

.empty-state strong {
  color: #fff;
}

.is-compact .cheatsheet-hero {
  padding: 15px 18px;
}

.is-compact .hero-icon {
  width: 42px;
  height: 42px;
  flex-basis: 42px;
  font-size: 21px;
}

.is-compact .cheatsheet-hero h2 {
  font-size: 24px;
}

.is-compact .cheatsheet-card-list {
  gap: 12px;
  padding: 12px;
}

@media (max-width: 1180px) {
  .cheatsheet-controls {
    grid-template-columns: repeat(4, minmax(140px, 1fr));
  }

  .view-switch,
  .matchup-count {
    justify-self: start;
  }

  .search-control {
    max-width: none;
  }

  .team-metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .cheatsheet-hero {
    align-items: flex-start;
    flex-wrap: wrap;
  }


  .cheatsheet-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .search-control {
    grid-column: span 2;
  }

  .matchup-sides {
    grid-template-columns: 1fr;
  }

  .game-context {
    grid-template-columns: 1fr 1fr;
  }

  .park-metrics {
    grid-column: 1 / -1;
  }

  .view-table .cheatsheet-table-wrap {
    display: none;
  }

  .view-table .cheatsheet-body::before {
    display: block;
    padding: 10px 14px 0;
    color: #8fb0ca;
    content: "Card view is used automatically on smaller screens.";
    font-size: 10px;
    text-align: center;
  }

  .view-table .cheatsheet-body .cheatsheet-card-list {
    display: grid;
  }
}

@media (max-width: 640px) {
  .nrfi-pitching-cheatsheet {
    border-radius: 12px;
  }

  .cheatsheet-hero {
    gap: 11px;
    padding: 16px;
  }

  .hero-icon {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
    border-radius: 12px;
    font-size: 21px;
  }

  .hero-copy {
    width: calc(100% - 56px);
  }

  .cheatsheet-hero h2 {
    font-size: 22px;
  }

  .cheatsheet-hero p {
    font-size: 12px;
  }

  .load-state {
    width: 100%;
    margin-left: 0;
    justify-content: center;
  }

  .cheatsheet-controls {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .search-control {
    grid-column: auto;
  }

  .view-switch,
  .matchup-count {
    width: 100%;
  }

  .view-switch button {
    flex: 1;
  }

  .matchup-count {
    justify-self: center;
    text-align: center;
  }

  .cheatsheet-card-list {
    gap: 12px;
    padding: 10px;
  }

  .matchup-card-head {
    align-items: flex-start;
    padding: 13px;
  }

  .matchup-title-block h3 {
    gap: 6px;
    font-size: 17px;
  }

  .game-odds {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .game-odds > div {
    min-width: 64px;
    padding: 6px 8px;
  }

  .game-odds strong {
    font-size: 15px;
  }

  .side-panel {
    padding: 13px;
  }

  .team-logo-shell.team-logo-lg {
    width: 44px;
    height: 44px;
  }

  .team-name-link {
    font-size: 16px;
  }

  .team-streak-wrap {
    display: none;
  }

  .team-metric-grid,
  .pitcher-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-box {
    min-height: 64px;
  }

  .run-prevention-grid {
    grid-template-columns: 1fr;
  }

  .game-context {
    grid-template-columns: 1fr;
  }

  .park-metrics {
    width: 100%;
  }

  .park-metrics > div {
    flex: 1;
  }
}

/* v1.0.4: keep the complete team NRFI section together before pitcher details. */
.team-lens-title {
  margin-top: 10px;
}

.pitcher-strip-below-team-lens {
  margin-top: 14px;
}

/* Some WordPress themes override search-field text colors. Keep entered text visible. */
.nrfi-pitching-cheatsheet .cheatsheet-controls input[type="search"],
.nrfi-pitching-cheatsheet .cheatsheet-controls input[data-role="searchFilter"] {
  color: #f3f8fd !important;
  -webkit-text-fill-color: #f3f8fd !important;
  caret-color: #7dcdf9 !important;
  background-color: #0d1d31 !important;
  opacity: 1 !important;
}

.nrfi-pitching-cheatsheet .cheatsheet-controls input[type="search"]::placeholder,
.nrfi-pitching-cheatsheet .cheatsheet-controls input[data-role="searchFilter"]::placeholder {
  color: #8fa5bf !important;
  -webkit-text-fill-color: #8fa5bf !important;
  opacity: 1 !important;
}

.nrfi-pitching-cheatsheet .cheatsheet-controls input[type="search"]::-webkit-search-cancel-button {
  filter: invert(1);
  opacity: .8;
}


/* 1.1.0: first-inning workload and batter-order reach details */
.pitcher-workload-block {
  margin-top: 14px;
}

.workload-title {
  margin-top: 0;
}

.pitcher-workload-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.workload-stat {
  display: grid;
  gap: 5px;
  min-height: 72px;
  padding: 11px 12px;
  border: 1px solid #29435f;
  border-radius: 10px;
  background: #0b1a2d;
}

.workload-stat span {
  color: #96abc2;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.25;
}

.workload-stat strong {
  color: #f9fcff;
  font-size: 18px;
  line-height: 1;
}

.pitcher-order-details,
.table-pitcher-details {
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid #28506c;
  border-radius: 11px;
  background: #091728;
}

.pitcher-order-details > summary,
.table-pitcher-details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 13px;
  color: #f7fbff;
  background: linear-gradient(90deg, #0e2c40, #0a2336);
  cursor: pointer;
  list-style: none;
  font-size: 12px;
  font-weight: 800;
}

.pitcher-order-details > summary::-webkit-details-marker,
.table-pitcher-details > summary::-webkit-details-marker {
  display: none;
}

.pitcher-order-details > summary::after,
.table-pitcher-details > summary::after {
  content: '+';
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 50%;
  color: #07111f;
  background: #56d9df;
  font-size: 16px;
  line-height: 1;
}

.pitcher-order-details[open] > summary::after,
.table-pitcher-details[open] > summary::after {
  content: '−';
}

.pitcher-order-details > summary small,
.table-pitcher-details > summary small {
  margin-left: auto;
  color: #95bdd5;
  font-size: 10px;
  font-weight: 700;
}

.pitcher-order-content {
  padding: 13px;
}

.pitcher-order-intro {
  margin-bottom: 11px;
  color: #a9bdd2;
  font-size: 11px;
  line-height: 1.45;
}

.pitcher-order-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(98px, 1fr));
  gap: 7px;
  margin-bottom: 12px;
}

.pitcher-order-summary > div {
  display: grid;
  gap: 3px;
  padding: 9px;
  border: 1px solid #28425f;
  border-radius: 9px;
  background: #0d1d31;
  text-align: center;
}

.pitcher-order-summary span,
.pitcher-order-summary small,
.pitcher-order-summary em {
  color: #8faac3;
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
}

.pitcher-order-summary strong {
  color: #55e7b2;
  font-size: 16px;
}

.pitcher-order-summary em {
  color: #63c9ff;
}

.pitcher-order-table-wrap {
  overflow-x: auto;
  border: 1px solid #2c4663;
  border-radius: 9px;
}

.pitcher-order-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  color: #f4f8fc;
  background: #0c192b;
  font-size: 11px;
}

.pitcher-order-table th,
.pitcher-order-table td {
  padding: 8px 9px;
  border-right: 1px solid #2a405a;
  border-bottom: 1px solid #2a405a;
  text-align: center;
  white-space: nowrap;
}

.pitcher-order-table th {
  color: #a9bdd2;
  background: #091423;
  font-size: 9px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.pitcher-order-table tr:last-child td {
  border-bottom: 0;
}

.pitcher-order-table th:last-child,
.pitcher-order-table td:last-child {
  border-right: 0;
}

.pitcher-order-rate {
  display: inline-flex;
  justify-content: center;
  min-width: 54px;
  padding: 4px 7px;
  border-radius: 999px;
  color: #64efba;
  background: rgba(37, 210, 129, .12);
  font-weight: 900;
}

.pitcher-order-rate-any {
  color: #6fd2ff;
  background: rgba(56, 166, 232, .14);
}
.pitcher-order-rate-k {
  color: #ffd36f;
  background: rgba(255, 184, 77, .13);
}
.pitcher-order-rate-hr {
  color: #ff9caa;
  background: rgba(255, 91, 116, .14);
}

.pitcher-order-foot {
  margin-top: 8px;
  color: #7f9ab5;
  font-size: 9px;
  text-align: right;
}

.pitcher-detail-row > td {
  padding: 0 !important;
  border-top: 0 !important;
  background: #081524 !important;
}

.table-pitcher-details {
  margin: 0 10px 10px;
  border-radius: 9px;
}

.table-pitcher-details > summary {
  padding: 9px 12px;
}

.table-pitcher-details-body {
  padding: 12px;
}

.table-pitcher-details-body .pitcher-workload-block {
  margin-top: 0;
  margin-bottom: 12px;
}

.table-pitcher-details-body .pitcher-order-content {
  padding: 0;
}

@media (max-width: 1180px) {
  .pitcher-workload-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .pitcher-workload-grid {
    grid-template-columns: 1fr 1fr;
  }

  .pitcher-order-details > summary,
  .table-pitcher-details > summary {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .pitcher-order-details > summary small,
  .table-pitcher-details > summary small {
    width: calc(100% - 38px);
    margin-left: 0;
  }
}
