﻿:root {
  --navy: #0f2340;
  --gold: #c8a55a;
  --bg: #f4f1ea;
  --card: #fbf9f4;
  --card-strong: #fffdf8;
  --text: #162235;
  --muted: #6f7a87;
  --grid: #d8d0c4;
  --line: rgba(15, 35, 64, 0.12);
  --shadow: 0 24px 64px rgba(15, 35, 64, 0.1);
  --radius: 28px;
  --table-font-size: 17px;
  --table-head-font-size: 15px;
  --table-compact-font-size: 13px;
  --table-compact-head-font-size: 12px;
}

* {
  box-sizing: border-box;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--navy);
  color: white;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 120ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex="-1"]:focus-visible {
  outline: 3px solid #e5b94f;
  outline-offset: 3px;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Yu Gothic UI", "Hiragino Sans", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(200, 165, 90, 0.2), transparent 24%),
    radial-gradient(circle at top right, rgba(15, 35, 64, 0.12), transparent 26%),
    linear-gradient(180deg, #f8f4ec 0%, var(--bg) 100%);
}

button,
input,
select {
  font: inherit;
}

.site-shell {
  max-width: 1720px;
  margin: 0 auto;
  padding: 28px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  margin-bottom: 24px;
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 45%),
    linear-gradient(135deg, #102746 0%, #0f2340 56%, #152f58 100%);
  border-radius: 36px;
  box-shadow: var(--shadow);
  color: white;
}

.hero-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

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

.hero-kicker,
.empty-kicker {
  margin: 0 0 10px;
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.68);
}

.hero h1,
.empty-state h2 {
  margin: 0;
  font-size: clamp(36px, 4vw, 54px);
  line-height: 1.05;
}

.hero-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(128px, 1fr));
  gap: 10px;
  align-self: flex-end;
  width: min(100%, 840px);
}

.hero-nav-group {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.hero-nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 56px;
  padding: 11px 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  text-align: center;
  line-height: 1.35;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}

.hero-nav-parent {
  min-height: 46px;
  cursor: default;
}

.hero-nav-single {
  min-height: 88px;
}

.hero-nav-subrow {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.hero-nav-sublink {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 34px;
  padding: 7px 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.2;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}

.hero-nav-link:hover,
.hero-nav-link.active,
.hero-nav-group.active .hero-nav-parent,
.hero-nav-sublink:hover,
.hero-nav-sublink.active {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.18);
}

.type-switch-section {
  margin: -6px 0 24px;
}

.type-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 180px));
  justify-content: center;
  gap: 10px;
  width: min(100%, 420px);
  margin: 0 auto;
  padding: 8px;
  border: 1px solid rgba(216, 208, 196, 0.72);
  border-radius: 24px;
  background: rgba(255, 253, 248, 0.9);
  box-shadow: 0 12px 34px rgba(15, 35, 64, 0.08);
}

.league-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 96px));
  justify-content: center;
  gap: 8px;
  width: min(100%, 320px);
  margin: 10px auto 0;
  padding: 6px;
  border: 1px solid rgba(216, 208, 196, 0.72);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.9);
  box-shadow: 0 10px 26px rgba(15, 35, 64, 0.06);
}

.league-switch-button {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(15, 35, 64, 0.12);
  border-radius: 13px;
  background: white;
  color: var(--navy);
  font-weight: 700;
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease, color 120ms ease;
}

.league-switch-button:hover,
.league-switch-button.active {
  transform: translateY(-1px);
  border-color: rgba(15, 35, 64, 0.36);
}

.league-switch-button.active {
  background: var(--navy);
  color: white;
  box-shadow: 0 8px 18px rgba(15, 35, 64, 0.14);
}

.type-switch-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid rgba(15, 35, 64, 0.12);
  border-radius: 18px;
  background: white;
  color: var(--navy);
  text-align: center;
  text-decoration: none;
  font-weight: 700;
  line-height: 1.25;
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease, color 120ms ease;
}

button.type-switch-link {
  appearance: none;
}

.type-switch-link:hover,
.type-switch-link.active {
  transform: translateY(-1px);
  border-color: rgba(15, 35, 64, 0.36);
}

.type-switch-link.active {
  background: var(--navy);
  color: white;
  box-shadow: 0 10px 22px rgba(15, 35, 64, 0.18);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-content: end;
}

.hero-stat {
  padding: 18px 18px 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
}

.hero-stat .label {
  display: block;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.72);
}

.hero-stat strong {
  display: block;
  margin-top: 10px;
  font-size: 40px;
  line-height: 1;
}

.layout {
  display: grid;
  grid-template-columns: minmax(340px, 420px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.layout > * {
  min-width: 0;
}

.viewer {
  min-width: 0;
}

.panel {
  background: linear-gradient(180deg, var(--card-strong) 0%, var(--card) 100%);
  border: 1px solid rgba(216, 208, 196, 0.75);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 0;
}

.sidebar {
  position: sticky;
  top: 20px;
  overflow: hidden;
  min-width: 0;
}

.panel-block {
  padding: 22px 22px 0;
}

.panel-block:last-child {
  padding-bottom: 22px;
}

.panel-block h2 {
  margin: 0 0 14px;
  font-size: 19px;
}

.search-box {
  display: block;
}

.search-box span {
  display: block;
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--muted);
}

.search-box input,
.field-select {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--grid);
  border-radius: 16px;
  background: white;
  color: var(--text);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-head + .field-select {
  margin-top: 14px;
}

.ghost-button {
  padding: 8px 12px;
  border: 1px solid rgba(15, 35, 64, 0.12);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.ghost-button:disabled {
  cursor: default;
  opacity: 0.45;
}

.chip-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.team-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border: 1px solid rgba(15, 35, 64, 0.1);
  border-radius: 999px;
  background: white;
  color: var(--text);
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}

.team-chip:hover,
.team-chip.active {
  transform: translateY(-1px);
  border-color: rgba(15, 35, 64, 0.28);
  background: #eef2f8;
}

.team-chip.disabled {
  opacity: 0.42;
}

.team-chip .count {
  color: var(--gold);
  font-weight: 700;
}

.results-block {
  padding-top: 18px;
}

.result-count {
  color: var(--muted);
  font-size: 14px;
}

.result-list {
  display: grid;
  gap: 14px;
  max-height: calc(100vh - 410px);
  padding-bottom: 8px;
  overflow: auto;
}

.result-card {
  display: block;
  padding: 16px;
  border: 1px solid rgba(15, 35, 64, 0.08);
  border-radius: 22px;
  background: white;
  text-align: left;
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.result-card:hover,
.result-card.active {
  transform: translateY(-2px);
  border-color: rgba(15, 35, 64, 0.2);
  box-shadow: 0 18px 36px rgba(15, 35, 64, 0.08);
}

.result-meta .team-date {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.result-meta h3 {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
}

.result-meta p {
  margin: 8px 0 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.result-stat {
  padding: 10px 8px;
  border-radius: 14px;
  background: #f5f7fa;
  text-align: center;
}

.result-stat span {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.result-stat strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
}

.preview-bar {
  display: flex;
  height: 12px;
  margin-top: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1f6;
}

.preview-segment {
  display: block;
  height: 100%;
}

.preview-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
}

.dashboard-viewer {
  min-height: min(860px, calc(100vh - 40px));
  padding: 24px;
  min-width: 0;
}

.dashboard-viewer.empty {
  display: grid;
  place-items: center;
  text-align: center;
}

.empty-state {
  max-width: 58ch;
}

.empty-state.slim {
  padding: 24px 0;
}

.empty-state .empty-kicker {
  color: var(--gold);
}

.empty-state p {
  color: var(--muted);
  line-height: 1.8;
}

.viewer-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}

.viewer-head h2 {
  margin: 4px 0 0;
  font-size: 42px;
  line-height: 1.08;
}

.viewer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  padding: 12px 14px;
  border-radius: 999px;
  background: var(--navy);
  color: white;
  text-decoration: none;
}

.action-link.secondary {
  background: #ece6da;
  color: var(--text);
}

.action-link.is-disabled {
  pointer-events: none;
  opacity: 0.45;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.meta-card {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: white;
}

.meta-card span {
  display: block;
  font-size: 13px;
  color: var(--muted);
}

.meta-card strong {
  display: block;
  margin-top: 6px;
  font-size: 22px;
  line-height: 1.25;
}

.meta-card--wide {
  grid-column: span 2;
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.stat-strip--compact {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.stat-pill {
  padding: 14px 12px;
  border-radius: 18px;
  background: #f5f1e8;
  text-align: center;
}

.stat-pill span {
  display: block;
  font-size: 13px;
  color: var(--muted);
}

.stat-pill strong {
  display: block;
  margin-top: 6px;
  font-size: 26px;
}

.page-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.page-tab {
  padding: 10px 14px;
  border: 1px solid rgba(15, 35, 64, 0.12);
  border-radius: 999px;
  background: white;
  color: var(--text);
  cursor: pointer;
}

.page-tab.active {
  background: var(--navy);
  color: white;
}

.native-stage {
  margin-top: 20px;
}

.section-grid {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.page-one {
  grid-template-columns: 1fr !important;
}

.page-two {
  grid-template-columns: 1fr !important;
}

.page-heat {
  grid-template-columns: 1fr !important;
}

.page-three {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
}

.dashboard-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: white;
  min-width: 0;
}

.count-card {
  min-height: 560px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.card-head.inline {
  justify-content: flex-start;
}

.card-head h3 {
  margin: 0;
  font-size: 30px;
  line-height: 1.1;
}

.dashboard-subsection {
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid rgba(15, 35, 64, 0.08);
}

.inline-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 10px;
  font-size: 16px;
  color: var(--muted);
}

.legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  display: inline-block;
  flex: none;
}

.legend-swatch.navy {
  background: var(--navy);
}

.stack-bar {
  display: flex;
  height: 76px;
  overflow: hidden;
  border-radius: 24px;
  background: #edf1f6;
}

.stack-segment {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding-inline: 4px;
  overflow: hidden;
  color: white;
  font-size: 17px;
  font-weight: 700;
}

.pitch-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.pitch-card {
  padding: 16px;
  border-radius: 18px;
  background: #f7f3ea;
}

.pitch-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pitch-card-head strong {
  font-size: 20px;
}

.pitch-card-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 15px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.table-scroll {
  overflow-x: auto;
  padding-bottom: 4px;
}

.annual-table-scroll {
  position: relative;
  max-height: min(72vh, 960px);
  overflow: auto;
}

.wide-table {
  width: 100%;
  min-width: 100%;
  table-layout: fixed;
}

.data-table th,
.data-table td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(15, 35, 64, 0.08);
  text-align: center;
  font-size: var(--table-font-size);
}

.wide-table th,
.wide-table td {
  white-space: nowrap;
  padding: 9px 4px;
  font-size: var(--table-compact-font-size);
  line-height: 1.15;
}

.wide-table th {
  font-size: var(--table-compact-head-font-size);
}

.mobile-transpose-scroll {
  display: none;
}

.mobile-transpose-table {
  min-width: max-content;
  width: max-content;
}

.mobile-transpose-table th,
.mobile-transpose-table td {
  min-width: 76px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.mobile-transpose-table th:first-child,
.mobile-transpose-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 88px;
  background: white;
  box-shadow: inset -1px 0 0 rgba(15, 35, 64, 0.08);
}

.mobile-transpose-table thead th {
  background: var(--card-strong);
}

.mobile-transpose-table thead th:first-child {
  z-index: 4;
}

.wide-table th:first-child,
.wide-table td:first-child {
  width: 120px;
}

.wide-table th:nth-child(2),
.wide-table td:nth-child(2) {
  width: 76px;
}

.inning-table th:first-child,
.inning-table td:first-child {
  width: 56px;
}

.wide-table .pitch-name-cell {
  gap: 5px;
}

.data-table th {
  font-size: var(--table-head-font-size);
  color: var(--muted);
  font-weight: 700;
}

.pitch-summary-table {
  width: 1190px;
  min-width: 1190px;
}

.pitch-metric-summary-table {
  width: 980px;
  min-width: 980px;
}

.pitch-summary-table th:first-child,
.pitch-summary-table td:first-child,
.pitch-metric-summary-table th:first-child,
.pitch-metric-summary-table td:first-child,
.inning-table th:first-child,
.inning-table td:first-child,
.inning-table th:nth-child(2),
.inning-table td:nth-child(2) {
  position: sticky;
  background: white;
  box-shadow: inset -1px 0 0 rgba(15, 35, 64, 0.08);
  z-index: 2;
}

.pitch-summary-table th:first-child,
.pitch-summary-table td:first-child,
.pitch-metric-summary-table th:first-child,
.pitch-metric-summary-table td:first-child,
.inning-table th:first-child,
.inning-table td:first-child {
  left: 0;
}

.inning-table {
  width: 1200px;
  min-width: 1200px;
}

.inning-table th:nth-child(2),
.inning-table td:nth-child(2) {
  left: 56px;
}

.pitch-summary-table th:first-child,
.pitch-metric-summary-table th:first-child,
.inning-table th:first-child,
.inning-table th:nth-child(2) {
  background: var(--card-strong);
  z-index: 4;
}

.metric-description-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px 18px;
  margin: 16px 0 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card-strong);
}

.metric-description-list div {
  display: grid;
  gap: 4px;
}

.metric-description-list dt {
  color: var(--text);
  font-weight: 800;
}

.metric-description-list dd {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.metric-description-list dd span {
  display: block;
}

.pitch-name-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 100%;
  white-space: nowrap;
}

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

.heat-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.heat-filter-stack {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
}

.heat-filter-group {
  display: grid;
  gap: 8px;
}

.heat-filter-group .heat-legend {
  margin-bottom: 0;
}

.heat-filter-label {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.heat-legend-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid rgba(15, 35, 64, 0.12);
  border-radius: 999px;
  background: #f7f3ea;
  color: var(--text);
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease, color 120ms ease;
}

.heat-legend-button:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 35, 64, 0.28);
}

.heat-legend-button.active {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
}

.heat-legend-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.8em;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(15, 35, 64, 0.08);
  font-size: 12px;
  line-height: 1;
}

.heat-legend-button.active .heat-legend-count {
  background: rgba(255, 255, 255, 0.2);
}

.heatmap-card {
  padding: 18px;
  border-radius: 20px;
  background: #f7f3ea;
}

.heatmap-head {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.heatmap-head strong {
  font-size: 22px;
}

.heatmap-sides {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 14px;
}

.heatmap-note {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--muted);
}

.pitch-chart-wrap {
  overflow: hidden;
  border: 1px solid rgba(15, 35, 64, 0.08);
  border-radius: 18px;
  background: linear-gradient(180deg, #102746 0%, #152f58 100%);
}

.pitch-chart {
  width: 100%;
  height: auto;
  display: block;
}

.pitch-chart-stage,
.pitch-chart-zone,
.pitch-chart-grid,
.pitch-chart-plate {
  fill: none;
  stroke: rgba(255, 255, 255, 0.92);
  vector-effect: non-scaling-stroke;
}

.pitch-chart-stage {
  stroke-width: 1.8;
}

.pitch-chart-zone {
  stroke-width: 2.1;
}

.pitch-chart-grid {
  stroke-width: 1.2;
  opacity: 0.9;
}

.pitch-chart-plate {
  stroke-width: 1.6;
}

.pitch-point-core {
  stroke: rgba(255, 255, 255, 0.68);
  stroke-width: 1.4;
  vector-effect: non-scaling-stroke;
  opacity: 0.94;
}

.pitch-point-ring {
  fill: none;
  stroke: rgba(251, 249, 244, 0.92);
  stroke-width: 1.7;
  vector-effect: non-scaling-stroke;
}

.pitch-chart-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.plate-heat-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.plate-heat-card {
  display: grid;
  gap: 12px;
}

.plate-heat-head {
  gap: 6px;
}

.plate-heat-card > .heatmap-sides {
  margin-top: -2px;
  margin-bottom: 2px;
}

.plate-heat-result,
.plate-heat-summary {
  margin: 0;
}

.plate-heat-result {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.plate-heat-summary {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.outcome-dashboard {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 24px;
  align-items: center;
}

.outcome-chart-shell {
  display: grid;
  place-items: center;
  padding: 16px;
  border: 1px solid rgba(15, 35, 64, 0.08);
  border-radius: 20px;
  background: #f7f3ea;
}

.outcome-chart {
  width: min(100%, 320px);
  height: auto;
  display: block;
}

.outcome-track,
.outcome-segment {
  fill: none;
}

.outcome-track {
  stroke: rgba(15, 35, 64, 0.09);
}

.outcome-segment {
  stroke-linecap: butt;
}

.outcome-center-label,
.outcome-center-value {
  fill: var(--text);
  text-anchor: middle;
}

.outcome-center-label {
  font-size: 17px;
}

.outcome-center-value {
  font-size: 42px;
  font-weight: 700;
  dominant-baseline: middle;
}

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

.outcome-item {
  padding: 16px 18px;
  border: 1px solid rgba(15, 35, 64, 0.08);
  border-radius: 18px;
  background: #f7f3ea;
}

.outcome-item-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.outcome-item-head strong {
  font-size: 18px;
}

.outcome-item-values {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 15px;
}

.velocity-chart-wrap {
  border: 1px solid rgba(15, 35, 64, 0.08);
  border-radius: 18px;
  background: #f7f3ea;
  overflow: hidden;
}

.velocity-chart-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 4px;
}

.velocity-chart {
  width: max(100%, 920px);
  min-width: 920px;
  max-width: none;
  height: auto;
  display: block;
}

.chart-grid {
  stroke: rgba(15, 35, 64, 0.12);
  stroke-width: 1;
}

.chart-marker {
  stroke: rgba(15, 35, 64, 0.1);
  stroke-width: 1;
  stroke-dasharray: 5 5;
}

.chart-axis {
  fill: var(--muted);
  font-size: 14px;
}

.chart-axis-left {
  text-anchor: end;
}

.chart-axis-bottom {
  text-anchor: middle;
}

.legend-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding: 0;
  margin: 0 0 24px;
  list-style: none;
}

.legend-list.centered {
  justify-content: center;
}

.legend-list li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
}

.count-chart {
  display: grid;
  gap: 22px;
  margin-top: 44px;
}

.count-row {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr) 52px;
  gap: 16px;
  align-items: center;
}

.count-label,
.count-total {
  font-size: 16px;
}

.count-total {
  text-align: right;
  color: var(--muted);
}

.count-bar {
  display: flex;
  height: 42px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1f6;
}

.count-segment {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  color: white;
  font-size: 16px;
  font-weight: 700;
}

.count-axis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-top: 18px;
  color: var(--muted);
  font-size: 14px;
}

.count-axis span:last-child {
  text-align: right;
}

.section-empty {
  display: grid;
  place-items: center;
  min-height: 220px;
  border: 1px dashed rgba(15, 35, 64, 0.18);
  border-radius: 18px;
  color: var(--muted);
}

.annual-main {
  padding: 0;
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.filter-field {
  display: grid;
  gap: 8px;
}

.filter-field span {
  font-size: 14px;
  color: var(--muted);
}

.innings-filter {
  grid-column: 1 / -1;
}

.filter-inline,
.range-scale {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.innings-inline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.innings-input {
  width: 72px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card-strong);
  color: var(--text);
  text-align: right;
}

.filter-inline strong {
  font-size: 15px;
  color: var(--text);
}

.range-input {
  width: 100%;
  margin: 2px 0 0;
  accent-color: var(--navy);
}

.range-scale {
  font-size: 13px;
  color: var(--muted);
}

.season-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 14px 0 16px;
}

.season-meta-card {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f7f3ea;
}

.season-meta-card span {
  display: block;
  font-size: 13px;
  color: var(--muted);
}

.season-meta-card strong {
  display: block;
  margin-top: 6px;
  font-size: 22px;
  line-height: 1.2;
}

.season-meta-card small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.annual-player-link {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
  white-space: nowrap;
  color: var(--navy);
  text-decoration: none;
  font-weight: 700;
}

.annual-player-link:hover {
  text-decoration: underline;
}

.summary-hero {
  gap: 16px;
  margin-bottom: 18px;
  padding: 24px 28px;
}

.summary-hero .hero-bar {
  align-items: center;
}

.summary-hero .hero-copy {
  display: grid;
  gap: 4px;
}

.summary-hero .hero-nav {
  align-self: center;
}

.summary-hero .hero-kicker {
  margin-bottom: 0;
}

.summary-hero h1 {
  font-size: clamp(30px, 3.4vw, 46px);
}

.hero-subtitle {
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  line-height: 1.6;
}

.compare-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.compare-subtitle--muted {
  margin-top: 6px;
}

.compare-head {
  align-items: flex-start;
}

.compare-back-link {
  flex: none;
}

.is-hidden {
  display: none !important;
}

.compare-mode-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 14px;
}

.compare-mode-button {
  padding: 11px 16px;
  border: 1px solid rgba(15, 35, 64, 0.12);
  border-radius: 999px;
  background: white;
  color: var(--text);
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease, color 120ms ease;
}

.compare-mode-button:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 35, 64, 0.28);
}

.compare-mode-button.active {
  background: var(--gold);
  border-color: rgba(157, 103, 7, 0.22);
  color: var(--text);
}

.compare-toggle-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.compare-toggle {
  padding: 10px 14px;
  border: 1px solid rgba(15, 35, 64, 0.12);
  border-radius: 999px;
  background: #f7f3ea;
  color: var(--text);
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease, color 120ms ease;
}

.compare-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 35, 64, 0.28);
}

.compare-toggle.active {
  background: var(--navy);
  border-color: var(--navy);
  color: white;
}

.comparison-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.compare-card {
  padding: 20px;
  border: 1px solid rgba(17, 56, 49, 0.12);
  border-radius: 24px;
  box-shadow: 0 18px 40px rgba(14, 32, 30, 0.08);
  background: rgba(255, 252, 246, 0.92);
}

.compare-card > span {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
}

.compare-values {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 16px 0 10px;
}

.compare-value-block {
  display: flex;
  min-width: 0;
  flex: 1 1 0;
  flex-direction: column;
  gap: 6px;
}

.compare-value-block:last-child {
  align-items: flex-end;
  text-align: right;
}

.compare-year-label {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.compare-values strong {
  font-size: 1.8rem;
  color: var(--text);
}

.compare-arrow {
  font-size: 2rem;
  line-height: 1;
}

.compare-arrow--up,
.compare-delta--up {
  color: #19734a;
}

.compare-arrow--down,
.compare-delta--down {
  color: #c04436;
}

.compare-arrow--flat,
.compare-delta--flat {
  color: #93a09d;
}

.compare-delta {
  margin: 0;
  font-weight: 700;
}

.compare-season-card.empty {
  opacity: 0.9;
}

.compare-season-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.compare-season-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.compare-season-item span {
  color: var(--muted);
  font-size: 13px;
}

.compare-season-item strong {
  margin: 0;
  font-size: 16px;
  text-align: right;
}

.compare-empty {
  min-height: 180px;
}

.monthly-table-wrap {
  margin-top: 8px;
}

.monthly-table-shell {
  margin-bottom: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid rgba(15, 35, 64, 0.08);
  border-radius: 20px;
  background: white;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.monthly-table {
  border-collapse: separate;
  border-spacing: 0;
  width: max-content;
  min-width: 100%;
  table-layout: fixed;
}

.monthly-table th,
.monthly-table td {
  min-width: 108px;
  padding: 12px 10px;
  border-bottom: 1px solid rgba(15, 35, 64, 0.08);
  white-space: nowrap;
  font-size: 13px;
  text-align: center;
  background: white;
}

.monthly-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  color: var(--muted);
  font-size: 12px;
  background: var(--card-strong);
}

.monthly-table th:first-child,
.monthly-table td:first-child {
  position: sticky;
  left: 0;
  min-width: 88px;
  box-shadow: inset -1px 0 0 rgba(15, 35, 64, 0.08);
}

.monthly-table th:first-child {
  z-index: 4;
  background: var(--card-strong);
}

.monthly-table td:first-child {
  z-index: 1;
  font-weight: 700;
  background: #fbf8f1;
}

.monthly-table tbody tr:last-child td,
.monthly-table tbody tr:last-child th {
  border-bottom: 0;
}

.monthly-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.monthly-chart-card {
  overflow: hidden;
}

.monthly-chart-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.monthly-chart-head span {
  color: var(--muted);
  font-size: 0.92rem;
}

.monthly-chart-head strong {
  font-size: 1.35rem;
}

.monthly-chart {
  display: block;
  width: 100%;
  height: auto;
}

.monthly-chart-axis {
  stroke: rgba(15, 35, 64, 0.14);
  stroke-width: 1;
}

.monthly-chart-line {
  fill: none;
  stroke: var(--navy);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.monthly-chart-point {
  fill: var(--gold);
  stroke: white;
  stroke-width: 2;
}

.monthly-chart-axis-label,
.monthly-chart-range-label,
.monthly-chart-point-label {
  fill: var(--muted);
  font-size: 11px;
}

.monthly-chart-point-label {
  fill: var(--text);
  font-weight: 700;
}

.monthly-chart-empty {
  min-height: 220px;
}

.season-detail-wrap {
  margin-top: 18px;
}

.season-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.season-card-wide {
  grid-column: 1 / -1;
}

.season-stack-bar {
  margin-bottom: 18px;
}

.season-pie-shell {
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid rgba(15, 35, 64, 0.08);
  border-radius: 20px;
  background: #f7f3ea;
}

.season-pie-chart {
  display: block;
  width: min(100%, 320px);
  height: auto;
}

.season-pie-chart path,
.season-pie-chart circle {
  stroke: white;
  stroke-width: 2;
}

.season-pie-label {
  fill: white;
  font-size: 19px;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: middle;
  paint-order: stroke;
  stroke: rgba(15, 35, 64, 0.42);
  stroke-width: 3px;
  stroke-linejoin: round;
}

.season-pitch-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.season-pitch-mix-legend {
  grid-template-columns: 1fr;
  align-content: center;
  margin-top: 0;
}

.season-pitch-mix-legend .outcome-item-head strong {
  font-size: var(--table-font-size);
}

.season-pitch-mix-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(320px, 1.1fr);
  gap: 18px;
  align-items: center;
}

.season-pitch-mix-layout .season-pie-shell {
  margin-bottom: 0;
}

.season-table {
  min-width: 100%;
  width: max-content;
}

.season-table th,
.season-table td {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.season-table th:first-child,
.season-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 96px;
  background: white;
  box-shadow: inset -1px 0 0 rgba(15, 35, 64, 0.08);
}

.season-table th:first-child {
  z-index: 4;
  background: var(--card-strong);
}

.season-pitch-summary-table {
  min-width: 1180px;
}

.season-pitch-summary-table th:first-child,
.season-pitch-summary-table td:first-child,
.season-pitch-metric-summary-table th:first-child,
.season-pitch-metric-summary-table td:first-child {
  width: 74px;
  min-width: 74px;
}

.season-pitch-metric-summary-table {
  min-width: 980px;
}

.season-inning-table {
  min-width: 1120px;
}

.season-inning-table th:first-child,
.season-inning-table td:first-child {
  width: 54px;
  min-width: 54px;
}

.recent-game-table {
  min-width: 1120px;
}

.recent-game-table th:first-child,
.recent-game-table td:first-child,
.batter-recent-game-table th:first-child,
.batter-recent-game-table td:first-child {
  width: 96px;
  min-width: 96px;
  max-width: 96px;
  padding-right: 6px;
  padding-left: 6px;
}

.pitcher-game-split-table {
  min-width: 1180px;
}

.season-pitch-hand-summary-table {
  min-width: 840px;
}

.pitcher-decision-inning-table {
  min-width: 860px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 14px;
  background: white;
  box-shadow: inset 0 0 0 1px rgba(15, 35, 64, 0.03);
}

.pitcher-decision-inning-table th,
.pitcher-decision-inning-table td {
  min-width: 54px;
  padding: 9px 10px;
  border-right: 1px solid rgba(15, 35, 64, 0.08);
  border-bottom: 1px solid rgba(15, 35, 64, 0.08);
  color: var(--text);
  font-size: 15px;
  line-height: 1.25;
  text-align: center;
}

.pitcher-decision-inning-table thead th {
  background: #f7f3ea;
  color: var(--navy);
  font-weight: 700;
}

.pitcher-decision-inning-table tbody th {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 92px;
  background: var(--card-strong);
  color: var(--navy);
  font-weight: 700;
  box-shadow: inset -1px 0 0 rgba(15, 35, 64, 0.08);
}

.pitcher-decision-inning-table thead th:first-child {
  position: sticky;
  left: 0;
  z-index: 3;
  min-width: 92px;
  background: #efe6d4;
  box-shadow: inset -1px 0 0 rgba(15, 35, 64, 0.08);
}

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

.pitcher-decision-inning-table tbody tr:last-child th,
.pitcher-decision-inning-table tbody tr:last-child td {
  border-bottom: 0;
}

.pitcher-decision-inning-table .inning-cell-zero {
  background: rgba(15, 35, 64, 0.03);
  color: var(--muted);
}

.pitcher-decision-inning-table .inning-cell-low {
  background: rgba(200, 165, 90, 0.22);
}

.pitcher-decision-inning-table .inning-cell-mid {
  background: rgba(200, 165, 90, 0.38);
  font-weight: 700;
}

.pitcher-decision-inning-table .inning-cell-high {
  background: rgba(200, 165, 90, 0.58);
  font-weight: 700;
}

.pitcher-decision-inning-table .inning-cell-total {
  background: #f7f3ea;
  color: var(--navy);
  font-weight: 700;
}

.batter-recent-game-table {
  min-width: 980px;
}

.batter-season-table {
  min-width: 1320px;
  --batter-split-width: 86px;
}

.batter-season-table th:first-child,
.batter-season-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  width: var(--batter-split-width);
  min-width: var(--batter-split-width);
  max-width: var(--batter-split-width);
  padding-right: 6px;
  padding-left: 6px;
  background: white;
  box-shadow: inset -1px 0 0 rgba(15, 35, 64, 0.08);
}

.batter-season-table th:first-child {
  z-index: 4;
  background: var(--card-strong);
}

.batter-split-label-cell,
.batter-split-label-heading {
  overflow: hidden;
  text-overflow: ellipsis;
}

.batter-season-table--opponent {
  --batter-split-width: 106px;
}

.batter-season-table--stadium {
  --batter-split-width: 112px;
}

.batter-season-table--pitch-type {
  --batter-split-width: 104px;
}

.batter-season-table--velocity {
  --batter-split-width: 116px;
}

.batter-season-table--pitcher-hand {
  --batter-split-width: 66px;
}

.batter-season-table--batting-order {
  --batter-split-width: 48px;
}

.batter-season-table--plate-appearance {
  --batter-split-width: 110px;
}

.batter-season-table--strike-count {
  --batter-split-width: 86px;
}

.season-matchup-cell {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center !important;
}

.season-outcome-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.annual-note {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.7;
}

.annual-note:empty {
  display: none;
}

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

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

.player-action-panel {
  padding-top: 16px;
}

.player-output-card {
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: white;
}

.player-output-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.player-output-head h3 {
  margin: 4px 0 0;
  font-size: 28px;
}

.player-stats-empty {
  min-height: 92px;
}

.player-stats-frame {
  display: block;
  width: 100%;
  min-height: 640px;
  border: 0;
}

body.compare-embed {
  background: transparent;
}

body.compare-embed .site-shell {
  max-width: none;
  padding: 0;
}

body.compare-embed .hero,
body.compare-embed .type-switch-section {
  display: none;
}

body.compare-embed .compare-back-link {
  display: none;
}

body.compare-embed .panel {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.compare-embed .annual-main > .panel-block:first-child {
  padding: 0 0 18px;
}

body.compare-embed .annual-main > .panel-block:first-child > .compare-head {
  display: none;
}

body.compare-embed .compare-mode-group {
  margin-top: 0;
}

body.compare-embed #seasonPanel,
body.compare-embed #comparePanel,
body.compare-embed #monthlyPanel {
  padding: 0;
}

body.compare-embed .season-detail-wrap {
  margin-top: 14px;
}

.ranking-threshold-field {
  margin-top: 2px;
}

.ranking-threshold-controls {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.threshold-mode-select {
  width: 180px;
  padding: 7px 10px;
  border-radius: 10px;
}

.ranking-threshold-input {
  width: 86px;
}

.ranking-content-grid {
  display: grid;
  grid-template-columns: minmax(280px, 370px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.ranking-table-card,
.ranking-chart-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card-strong);
}

.ranking-card-head {
  margin-bottom: 14px;
}

.ranking-card-head h3 {
  margin: 0;
  font-size: 18px;
}

.ranking-table-scroll {
  overflow-x: auto;
}

.ranking-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.ranking-col-rank {
  width: 46px;
}

.ranking-col-player {
  width: auto;
}

.ranking-col-metric {
  width: 76px;
}

.ranking-table th,
.ranking-table td {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.ranking-table th:first-child,
.ranking-table td:first-child {
  padding-right: 6px;
  padding-left: 6px;
  text-align: right;
}

.ranking-table th:nth-child(2),
.ranking-table td:nth-child(2) {
  overflow: hidden;
  text-align: center;
}

.ranking-player-link {
  display: block;
  width: 100%;
}

.ranking-table th:last-child,
.ranking-table td:last-child {
  padding-right: 8px;
  padding-left: 8px;
  text-align: center;
  font-weight: 800;
}

.ranking-chart-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 0 2px;
}

.ranking-axis-chart {
  display: block;
  width: 100%;
  min-width: 0;
  height: auto;
}

.ranking-chart-grid-line {
  stroke: rgba(15, 35, 64, 0.1);
  stroke-width: 1;
}

.ranking-chart-axis-line {
  stroke: rgba(15, 35, 64, 0.28);
  stroke-width: 1.4;
}

.ranking-chart-bar {
  fill: var(--navy);
}

.ranking-chart-y-label,
.ranking-chart-x-label,
.ranking-chart-value {
  fill: var(--muted);
  font-size: 11px;
}

.ranking-chart-y-label {
  text-anchor: end;
}

.ranking-chart-x-label {
  text-anchor: end;
}

.ranking-chart-value {
  fill: var(--text);
  font-weight: 800;
  text-anchor: middle;
}

.ranking-bar-list {
  display: grid;
  gap: 14px;
}

.ranking-bar-row {
  display: grid;
  gap: 7px;
}

.ranking-bar-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}

.ranking-bar-head span {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-bar-head strong {
  flex: none;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}

.ranking-bar-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(15, 35, 64, 0.08);
}

.ranking-bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--navy), var(--gold));
}

.annual-table {
  width: 2100px;
  min-width: 2100px;
  table-layout: fixed;
}

.annual-table th:first-child,
.annual-table td:first-child {
  width: 128px;
}

.annual-table th:nth-child(2),
.annual-table td:nth-child(2) {
  width: 110px;
}

.annual-table th:first-child,
.annual-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--card);
  box-shadow: inset -1px 0 0 rgba(15, 35, 64, 0.08);
}

.annual-table th:nth-child(2),
.annual-table td:nth-child(2) {
  background: white;
}

.annual-table th:first-child {
  z-index: 4;
  background: var(--card-strong);
}

.annual-table th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--card-strong);
}

.annual-table th:first-child {
  z-index: 5;
}

.annual-table th:nth-child(3),
.annual-table td:nth-child(3),
.annual-table th:nth-child(4),
.annual-table td:nth-child(4),
.annual-table th:nth-child(5),
.annual-table td:nth-child(5),
.annual-table th:nth-child(6),
.annual-table td:nth-child(6),
.annual-table th:nth-child(7),
.annual-table td:nth-child(7) {
  width: 70px;
}

.annual-table th:nth-child(8),
.annual-table td:nth-child(8) {
  width: 88px;
}

.annual-table th:nth-child(9),
.annual-table td:nth-child(9),
.annual-table th:nth-child(10),
.annual-table td:nth-child(10),
.annual-table th:nth-child(11),
.annual-table td:nth-child(11),
.annual-table th:nth-child(12),
.annual-table td:nth-child(12),
.annual-table th:nth-child(13),
.annual-table td:nth-child(13),
.annual-table th:nth-child(14),
.annual-table td:nth-child(14),
.annual-table th:nth-child(15),
.annual-table td:nth-child(15),
.annual-table th:nth-child(16),
.annual-table td:nth-child(16),
.annual-table th:nth-child(17),
.annual-table td:nth-child(17),
.annual-table th:nth-child(18),
.annual-table td:nth-child(18),
.annual-table th:nth-child(19),
.annual-table td:nth-child(19) {
  width: 82px;
}

.annual-table th:nth-child(20),
.annual-table td:nth-child(20),
.annual-table th:nth-child(21),
.annual-table td:nth-child(21) {
  width: 110px;
}

.annual-table th:nth-child(22),
.annual-table td:nth-child(22),
.annual-table th:nth-child(23),
.annual-table td:nth-child(23) {
  width: 118px;
}

.annual-table th:nth-child(24),
.annual-table td:nth-child(24) {
  width: 78px;
}

.annual-table th,
.annual-table td {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.annual-table .sort-header {
  white-space: normal;
  line-height: 1.2;
}

.annual-batter-table {
  width: 2660px;
  min-width: 2660px;
  table-layout: fixed;
}

.annual-batter-table th:first-child,
.annual-batter-table td:first-child {
  width: 140px;
}

.annual-batter-table th:nth-child(2),
.annual-batter-table td:nth-child(2) {
  width: 118px;
}

.annual-batter-table th:first-child,
.annual-batter-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--card);
  box-shadow: inset -1px 0 0 rgba(15, 35, 64, 0.08);
}

.annual-batter-table th:nth-child(2),
.annual-batter-table td:nth-child(2) {
  background: white;
}

.annual-batter-table th:first-child {
  z-index: 4;
  background: var(--card-strong);
}

.annual-batter-table th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--card-strong);
}

.annual-batter-table th:first-child {
  z-index: 5;
}

.annual-batter-table th:nth-child(3),
.annual-batter-table td:nth-child(3),
.annual-batter-table th:nth-child(4),
.annual-batter-table td:nth-child(4),
.annual-batter-table th:nth-child(5),
.annual-batter-table td:nth-child(5),
.annual-batter-table th:nth-child(6),
.annual-batter-table td:nth-child(6),
.annual-batter-table th:nth-child(7),
.annual-batter-table td:nth-child(7),
.annual-batter-table th:nth-child(8),
.annual-batter-table td:nth-child(8),
.annual-batter-table th:nth-child(9),
.annual-batter-table td:nth-child(9),
.annual-batter-table th:nth-child(10),
.annual-batter-table td:nth-child(10),
.annual-batter-table th:nth-child(11),
.annual-batter-table td:nth-child(11),
.annual-batter-table th:nth-child(12),
.annual-batter-table td:nth-child(12),
.annual-batter-table th:nth-child(13),
.annual-batter-table td:nth-child(13),
.annual-batter-table th:nth-child(14),
.annual-batter-table td:nth-child(14),
.annual-batter-table th:nth-child(15),
.annual-batter-table td:nth-child(15),
.annual-batter-table th:nth-child(16),
.annual-batter-table td:nth-child(16),
.annual-batter-table th:nth-child(17),
.annual-batter-table td:nth-child(17) {
  width: 92px;
}

.annual-batter-table th:nth-child(18),
.annual-batter-table td:nth-child(18),
.annual-batter-table th:nth-child(19),
.annual-batter-table td:nth-child(19),
.annual-batter-table th:nth-child(20),
.annual-batter-table td:nth-child(20),
.annual-batter-table th:nth-child(21),
.annual-batter-table td:nth-child(21),
.annual-batter-table th:nth-child(22),
.annual-batter-table td:nth-child(22),
.annual-batter-table th:nth-child(23),
.annual-batter-table td:nth-child(23),
.annual-batter-table th:nth-child(24),
.annual-batter-table td:nth-child(24) {
  width: 106px;
}

.annual-batter-table th:nth-child(25),
.annual-batter-table td:nth-child(25) {
  width: 124px;
}

.annual-batter-table th:nth-child(26),
.annual-batter-table td:nth-child(26) {
  width: 154px;
}

.annual-batter-table th,
.annual-batter-table td {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.annual-batter-table .sort-header {
  white-space: nowrap;
  line-height: 1.15;
}

.annual-batter-table th:nth-child(26) .sort-header {
  white-space: normal;
  line-height: 1.1;
}

.sort-header {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.sort-indicator {
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
}

.sort-header.active .sort-indicator {
  color: var(--text);
}

@media (max-width: 1380px) {
  :root {
    --table-font-size: 16px;
    --table-head-font-size: 14px;
    --table-compact-font-size: 12px;
    --table-compact-head-font-size: 11px;
  }

  .hero,
  .page-one,
  .page-two,
  .page-heat,
  .page-three,
  .outcome-dashboard,
  .heatmap-grid,
  .season-detail-grid {
    grid-template-columns: 1fr;
  }

  .filters-grid {
    grid-template-columns: 1fr;
  }

  .stat-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .meta-grid,
  .comparison-card-grid,
  .monthly-chart-grid,
  .season-pitch-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1120px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .hero-bar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .result-list {
    max-height: min(70vh, 760px);
  }

  .dashboard-viewer.empty {
    min-height: 360px;
  }
}

@media (max-width: 760px) {
  :root {
    --table-font-size: 15px;
    --table-head-font-size: 13px;
    --table-compact-font-size: 11px;
    --table-compact-head-font-size: 10px;
  }

  .site-shell {
    padding: 16px;
  }

  .hero,
  .dashboard-viewer {
    padding: 18px;
  }

  .dashboard-viewer.empty {
    min-height: 280px;
  }

  .hero-stats,
  .stat-strip,
  .result-stats,
  .meta-grid,
  .outcome-grid,
  .comparison-card-grid,
  .monthly-chart-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pitch-card-grid {
    grid-template-columns: 1fr;
  }

  .season-pitch-grid,
  .season-outcome-grid {
    grid-template-columns: 1fr;
  }

  .season-pitch-mix-layout {
    grid-template-columns: 1fr;
  }

  .stack-segment {
    font-size: 15px;
  }

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

  .count-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .count-total {
    text-align: left;
  }

  .filters-grid,
  .compare-mode-group,
  .season-meta-grid {
    grid-template-columns: 1fr;
  }

  .ranking-content-grid {
    grid-template-columns: 1fr;
  }

  .ranking-chart-card {
    display: none;
  }

  .compare-head,
  .compare-values,
  .compare-season-item,
  .player-output-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .compare-value-block,
  .compare-value-block:last-child {
    align-items: flex-start;
    text-align: left;
  }

  .hero-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .hero-nav-link {
    min-height: 52px;
    padding: 10px 12px;
    font-size: 14px;
  }

  .summary-hero {
    padding: 20px;
  }

  .summary-hero .hero-bar {
    align-items: flex-start;
  }

  .comparison-card-grid {
    grid-template-columns: 1fr;
  }

  .monthly-chart-grid {
    grid-template-columns: 1fr;
  }

  .monthly-chart-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
    margin-right: -2px;
  }

  .page-tab {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .dashboard-card {
    padding: 18px;
  }

  .card-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .card-head h3 {
    font-size: 24px;
  }

  .inline-label {
    margin-left: 0;
    font-size: 14px;
  }

  .heat-legend {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
  }

  .heat-legend-button {
    flex: 0 0 auto;
    padding: 9px 12px;
    font-size: 14px;
    white-space: nowrap;
  }

  .table-scroll {
    margin-inline: -2px;
  }

  .responsive-table-desktop {
    display: none;
  }

  .mobile-transpose-scroll {
    display: block;
  }

  .mobile-transpose-table th,
  .mobile-transpose-table td {
    padding: 9px 8px;
    font-size: 12px;
    line-height: 1.2;
  }

  .mobile-transpose-table .pitch-name-cell {
    justify-content: center;
  }

  .pitch-summary-table {
    width: 1130px;
    min-width: 1130px;
  }

  .pitch-metric-summary-table {
    width: 940px;
    min-width: 940px;
  }

  .inning-table {
    width: 1140px;
    min-width: 1140px;
  }

  .stack-segment {
    font-size: 14px;
  }

  .velocity-chart {
    width: max(100%, 840px);
    min-width: 840px;
  }

  .outcome-chart {
    width: min(100%, 280px);
  }

  .outcome-center-label {
    font-size: 13px;
  }

  .outcome-center-value {
    font-size: 34px;
  }

  .chart-axis {
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 560px) {
  :root {
    --table-font-size: 14px;
    --table-head-font-size: 12px;
    --table-compact-font-size: 10px;
    --table-compact-head-font-size: 9px;
  }

  .hero-nav {
    grid-template-columns: 1fr;
  }

  .ranking-table th,
  .ranking-table td {
    padding-right: 6px;
    padding-left: 6px;
  }

  .ranking-table th:first-child,
  .ranking-table td:first-child {
    padding-right: 8px;
    padding-left: 4px;
  }

  .ranking-table th:nth-child(2),
  .ranking-table td:nth-child(2) {
    padding-left: 10px;
  }

  .ranking-col-rank {
    width: 52px;
  }

  .ranking-col-metric {
    width: 62px;
  }

  .ranking-table th:last-child,
  .ranking-table td:last-child {
    padding-right: 4px;
    padding-left: 4px;
  }

  body[data-ranking-type] .panel-block {
    padding-right: 14px;
    padding-left: 14px;
  }

  body[data-ranking-type] .panel-block:last-child {
    padding-bottom: 14px;
  }

  .ranking-table-card {
    padding: 16px;
  }

  .mobile-transpose-table th,
  .mobile-transpose-table td {
    min-width: 68px;
    padding: 8px 7px;
    font-size: 11px;
  }

  .mobile-transpose-table th:first-child,
  .mobile-transpose-table td:first-child {
    min-width: 78px;
  }

  .pitch-summary-table {
    width: 1060px;
    min-width: 1060px;
  }

  .pitch-metric-summary-table {
    width: 900px;
    min-width: 900px;
  }

  .inning-table {
    width: 1070px;
    min-width: 1070px;
  }

  .stack-segment {
    font-size: 13px;
  }

  .velocity-chart {
    width: max(100%, 780px);
    min-width: 780px;
  }

  .outcome-center-label {
    font-size: 11px;
  }

  .outcome-center-value {
    font-size: 30px;
  }
}

@media (max-width: 420px) {
  :root {
    --table-font-size: 13px;
    --table-head-font-size: 11px;
    --table-compact-font-size: 9px;
    --table-compact-head-font-size: 8px;
  }
}
