/* ============================================================
   Starting Pitcher Challenge — shared stylesheet
   Mobile-first, plain CSS, no frameworks
   ============================================================ */

/* ── Custom properties ─────────────────────────────────────── */
:root {
  /* Primary palette */
  --color-navy:        #0d1b2a;
  --color-navy-dark:   #08111c;
  --color-navy-mid:    #1a2e45;
  --color-navy-light:  #253d57;

  /* Accent */
  --color-blue:        #1d6fa4;
  --color-blue-light:  #2a8fd4;

  /* Semantic */
  --color-positive:    #2e7d32;
  --color-positive-bg: #e8f5e9;
  --color-negative:    #c62828;
  --color-negative-bg: #ffebee;
  --color-highlight:   #f57f17;
  --color-highlight-bg:#fff8e1;

  /* Neutral */
  --color-white:       #ffffff;
  --color-bg:          #f4f6f9;
  --color-surface:     #ffffff;
  --color-border:      #d0d7de;
  --color-border-light:#e8ecf0;
  --color-text:        #1a1a2e;
  --color-text-muted:  #5a6472;
  --color-text-light:  #8a95a0;

  /* Table */
  --color-table-stripe: #f0f4f8;
  --color-table-hover:  #dce8f5;
  --color-table-header: var(--color-navy);

  /* Typography */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace;

  /* Spacing */
  --space-xs:  0.25rem;
  --space-sm:  0.5rem;
  --space-md:  1rem;
  --space-lg:  1.5rem;
  --space-xl:  2rem;
  --space-2xl: 3rem;

  /* Borders */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.10);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.14);

  /* Transitions */
  --transition: 150ms ease;
}

/* ── Reset / base ───────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--color-blue);
  text-decoration: none;
}

a:hover,
a:focus {
  color: var(--color-blue-light);
  text-decoration: underline;
}

ul {
  list-style: none;
}

/* ── Navigation ─────────────────────────────────────────────── */
.nav {
  background: var(--color-navy);
  color: var(--color-white);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  min-width: 100%;
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--space-sm) var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--color-white);
  flex-shrink: 1;
  min-width: 0;
  text-decoration: none;
}

.nav-brand:hover,
.nav-brand:focus {
  color: var(--color-white);
  text-decoration: none;
}

.nav-logo {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: var(--space-xs);
  flex-wrap: wrap;
}

.nav-link {
  color: rgba(255, 255, 255, 0.75);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
  /* Ensure 44px minimum touch target */
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.nav-link:hover,
.nav-link:focus {
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.12);
  text-decoration: none;
}

.nav-link--active {
  color: var(--color-white);
  background: var(--color-blue);
}

.nav-link--active:hover,
.nav-link--active:focus {
  background: var(--color-blue-light);
}

/* ── Main layout ────────────────────────────────────────────── */
.main {
  flex: 1;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: var(--space-md) var(--space-sm) var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

/* ── Section ────────────────────────────────────────────────── */
.section {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-navy);
  border-left: 4px solid var(--color-blue);
  padding-left: var(--space-sm);
  line-height: 1.3;
}

.section-subtitle {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-top: calc(-1 * var(--space-sm));
}

.last-updated {
  color: var(--color-text-muted);
  font-size: 0.82rem;
}

/* ── Card ───────────────────────────────────────────────────── */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
}

.card + .card {
  margin-top: var(--space-md);
}

/* ── Tables ─────────────────────────────────────────────────── */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  background: var(--color-surface);
}

/* Desktop: restore minimum widths for wide tables */
@media (min-width: 600px) {
  .gamelog-table,
  .roster-table {
    min-width: 480px;
  }
}

/* Mobile: full-width tables with tighter padding */
.gamelog-table,
.roster-table {
  display: table;
  font-size: 0.8rem;
}

/* Mobile/desktop text toggle */
.mobile-show { display: inline; }
.mobile-hide { display: none; }

@media (min-width: 600px) {
  .mobile-show { display: none; }
  .mobile-hide { display: inline; }
}

.gamelog-table th,
.gamelog-table td,
.roster-table th,
.roster-table td {
  padding: 0.4rem 0.3rem;
  white-space: nowrap;
}

@media (min-width: 600px) {
  .gamelog-table,
  .roster-table {
    font-size: 0.875rem;
  }

  .gamelog-table th,
  .gamelog-table td,
  .roster-table th,
  .roster-table td {
    padding: 0.625rem var(--space-md);
  }
}

/* The 14-column pitcher game log needs more room */
.game-log-table {
  min-width: 720px;
}

/* Tighter cell padding for dense tables */
.game-log-table th,
.game-log-table td {
  padding: 0.5rem 0.4rem;
  font-size: 0.8rem;
  text-align: center;
}

.game-log-table th:first-child,
.game-log-table td:first-child {
  text-align: left;
}

/* Scroll hint shadow on the wrapper */
.table-scroll {
  position: relative;
}

.table-scroll::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 24px;
  background: linear-gradient(to right, transparent, rgba(0,0,0,0.06));
  pointer-events: none;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

thead th {
  background: var(--color-table-header);
  color: var(--color-white);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: var(--space-sm) var(--space-md);
  text-align: left;
  white-space: nowrap;
  border-bottom: 2px solid var(--color-navy-dark);
}

.players-table thead th,
.gamelog-table thead th {
  position: sticky;
  top: var(--nav-height, 0px);
  z-index: 10;
}

tbody tr {
  border-bottom: 1px solid var(--color-border-light);
  transition: background var(--transition);
}

tbody tr:last-child {
  border-bottom: none;
}

/* Striped rows */
tbody tr:nth-child(even) {
  background: var(--color-table-stripe);
}

tbody tr:hover {
  background: var(--color-table-hover);
}

tbody td {
  padding: 0.625rem var(--space-md);
  vertical-align: middle;
}

/* Make links inside table cells easier to tap on mobile */
tbody td a {
  padding: 0.25rem 0;
}

/* Specific column alignment helpers */
td.col-rank,
th.col-rank {
  text-align: center;
  width: 3.5rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

td.col-points,
th.col-points {
  text-align: right;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* First-place row emphasis */
tbody tr.rank-first {
  background: #fff9e6;
}

tbody tr.rank-first:hover {
  background: #fff3cc;
}

tbody tr.rank-first td.col-rank {
  color: var(--color-highlight);
}

/* Leaderboard table wraps itself */
.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  background: var(--color-surface);
}

.leaderboard-table th,
.leaderboard-table td {
  padding: 0.4rem var(--space-md);
}

/* ── Score classes ──────────────────────────────────────────── */
.score-positive {
  color: var(--color-positive);
  font-weight: 700;
}

.score-negative {
  color: var(--color-negative);
  font-weight: 700;
}

/* ── Highlight-game row / card ──────────────────────────────── */
.highlight-game,
tr.highlight-game {
  background: var(--color-highlight-bg) !important;
  font-weight: 600;
}

tr.highlight-game:hover {
  background: #ffe082 !important;
}

.highlight-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 5px solid var(--color-highlight);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  box-shadow: var(--shadow-md);
}

.highlight-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-bottom: var(--space-md);
}

.highlight-pitcher {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-navy);
}

.highlight-points {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--color-highlight);
  white-space: nowrap;
}

.highlight-meta {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--space-sm) var(--space-lg);
  margin-bottom: var(--space-md);
}

.highlight-meta-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.highlight-meta dt {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.highlight-meta dd {
  font-size: 0.9rem;
  color: var(--color-text);
}

.highlight-breakdown {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--color-border-light);
}

/* ── Compact highlight (index page) ────────────────────────── */
.highlight-compact {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-highlight);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
}

.highlight-compact + .highlight-compact {
  margin-top: var(--space-sm);
}

.highlight-compact-top {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.highlight-compact .highlight-pitcher {
  font-size: 1rem;
  font-weight: 700;
}

.highlight-compact .highlight-detail {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.highlight-compact .highlight-detail::before {
  content: "·";
  margin-right: var(--space-xs);
  color: var(--color-border);
}

.highlight-compact .highlight-points {
  font-size: 1rem;
  margin-left: auto;
}

.highlight-compact-date {
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

.highlight-compact-breakdown {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: var(--space-xs);
}

/* ── Stats display ──────────────────────────────────────────── */
.stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.stat-value {
  font-size: 1.1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--color-text);
}

/* Stats grid layout helper */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: var(--space-md);
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* ── Slot badge ─────────────────────────────────────────────── */
.slot-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  border-radius: var(--radius-pill);
  background: var(--color-navy-mid);
  color: var(--color-white);
  white-space: nowrap;
  vertical-align: middle;
  line-height: 1.6;
}

/* ── Team / player links ────────────────────────────────────── */
.team-link,
.pitcher-link {
  color: var(--color-blue);
  font-weight: 500;
}

.team-link:hover,
.team-link:focus,
.pitcher-link:hover,
.pitcher-link:focus {
  color: var(--color-blue-light);
}

/* ── Loading state ──────────────────────────────────────────── */
.loading {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--color-text-muted);
  font-size: 0.9rem;
  padding: var(--space-lg) 0;
}

.loading::before {
  content: "";
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-blue);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Error state ────────────────────────────────────────────── */
.error,
.error-msg {
  background: var(--color-negative-bg);
  color: var(--color-negative);
  border: 1px solid rgba(198, 40, 40, 0.25);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  font-size: 0.875rem;
  font-weight: 500;
}

/* ── Empty state ────────────────────────────────────────────── */
.empty {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  padding: var(--space-lg) 0;
}

/* ── Responsive (mobile-first) ──────────────────────────────── */

/* Base = mobile. Tables scroll horizontally by default. */
table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Leaderboard is narrow enough to never need scroll */
.leaderboard-table {
  display: table;
  overflow-x: visible;
}

/* Highlight card stacks on mobile */
.highlight-header {
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-xs);
}

/* Activity items: stack main + stats vertically on mobile */
.activity-item {
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}

.activity-stats {
  justify-content: flex-start;
  padding-top: var(--space-xs);
  border-top: 1px solid var(--color-border-light);
  margin-top: 0;
}

.activity-points {
  text-align: left;
  min-width: 0;
}

/* Pitcher header stacks on mobile */
.pitcher-name {
  font-size: 1.4rem;
}

.stats-summary-item dd {
  font-size: 1.1rem;
}

/* ── Tablet (480px+) ────────────────────────────────────────── */
@media (min-width: 480px) {
  .main {
    padding: var(--space-lg) var(--space-md) var(--space-2xl);
    gap: var(--space-xl);
  }

  .section-title {
    font-size: 1.5rem;
  }

  .nav-brand {
    font-size: 1.1rem;
    flex-shrink: 0;
  }

  .card {
    padding: var(--space-lg);
  }

  .highlight-header {
    flex-direction: row;
    align-items: baseline;
    gap: var(--space-md);
  }

  /* Activity items go back to horizontal on wider screens */
  .activity-item {
    flex-direction: row;
    align-items: center;
    gap: var(--space-md);
  }

  .activity-stats {
    justify-content: flex-end;
    padding-top: 0;
    border-top: none;
    margin-top: 0;
  }

  .activity-points {
    text-align: right;
    min-width: 4rem;
  }

  .pitcher-name {
    font-size: 1.8rem;
  }

  .stats-summary-item dd {
    font-size: 1.4rem;
  }
}

/* ── Desktop (600px+) ───────────────────────────────────────── */
@media (min-width: 600px) {
  table {
    display: table;
    overflow-x: visible;
  }

  /* Wide tables still need scroll on tablets */
  .game-log-table {
    display: block;
    overflow-x: auto;
  }
}

/* ── Wide desktop (768px+) ──────────────────────────────────── */
@media (min-width: 768px) {
  .main {
    padding: var(--space-xl) var(--space-lg) var(--space-2xl);
  }

  .section-title {
    font-size: 1.75rem;
  }

  .game-log-table {
    display: table;
    overflow-x: visible;
  }
}

/* ── Table scroll wrapper ───────────────────────────────────── */
.table-scroll,
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

/* ── Pitcher page ───────────────────────────────────────────── */
.pitcher-header {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.pitcher-meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.pitcher-name {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--color-navy);
}

.pitcher-team {
  font-size: 1rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

.pitcher-owner {
  font-size: 1rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

.pitcher-sep {
  color: var(--color-border);
}

.stats-summary {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  box-shadow: var(--shadow-sm);
  justify-content: space-around;
}

.stats-summary-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.stats-summary-item dt {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.stats-summary-item dd {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--color-navy);
  font-variant-numeric: tabular-nums;
}

/* ── Game log: mobile/desktop toggle ───────────────────────── */
/* Mobile: hide category columns, show breakdown row, full width */
.game-log-table .desktop-only {
  display: none;
}

.game-log-table {
  display: table;
  min-width: 0;
}

/* Remove border between a stat row and its breakdown row */
tr:has(+ .breakdown-row) {
  border-bottom: none;
}

.breakdown-row {
  border-bottom: 1px solid var(--color-border-light);
}

.breakdown-cell {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  padding: 0 0.4rem 0.5rem;
}

.breakdown-inner {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  gap: var(--space-xs);
}

.breakdown-inner .breakdown-dot {
  color: var(--color-border);
}

.bd-positive {
  color: var(--color-positive);
  font-weight: 700;
}

.bd-negative {
  color: var(--color-negative);
  font-weight: 700;
}

/* Desktop (768px+): show category columns, hide breakdown row */
@media (min-width: 768px) {
  .game-log-table .desktop-only {
    display: table-cell;
  }

  .game-log-table {
    min-width: 720px;
  }

  .breakdown-row {
    display: none;
  }
}

/* Highlighted game row (25+ pts) */
tr.game-big {
  background: var(--color-highlight-bg) !important;
}

tr.game-big:hover {
  background: #ffe082 !important;
}

/* Scoring category cells */
.pts-nonzero {
  color: var(--color-positive);
  font-weight: 700;
}

.pts-zero {
  color: var(--color-text-light);
}

/* ── Activity page ──────────────────────────────────────────── */
.activity-date-heading {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-navy);
  padding: var(--space-sm) 0;
  border-bottom: 2px solid var(--color-border);
  margin-top: var(--space-md);
}

.activity-date-heading:first-child {
  margin-top: 0;
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
}

.activity-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0;
  flex-wrap: wrap;
  transition: box-shadow var(--transition);
}

.activity-item:hover {
  box-shadow: var(--shadow-md);
}

.activity-item--big {
  border-left: 4px solid var(--color-highlight);
  background: var(--color-highlight-bg);
}

.activity-main {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}

.activity-pitcher {
  font-weight: 700;
  color: var(--color-text);
}

.activity-owner {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.activity-owner::before {
  content: "·";
  margin-right: var(--space-xs);
  color: var(--color-border);
}

.activity-opp {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.activity-opp::before {
  content: "·";
  margin-right: var(--space-xs);
  color: var(--color-border);
}

.activity-stats {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
  flex-wrap: wrap;
}

.activity-stat {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.activity-points {
  font-size: 1rem;
  font-weight: 800;
  color: var(--color-navy);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  min-width: 4rem;
  text-align: right;
}

.activity-points--big {
  color: var(--color-highlight);
  font-size: 1.1rem;
}

/* ── Players page ───────────────────────────────────────────── */
.players-table {
  display: table;
  font-size: 0.8rem;
}

.players-table th,
.players-table td {
  padding: 0.4rem 0.5rem;
}

.players-table .col-rank {
  width: 1.5rem;
  padding-left: 0.3rem;
  padding-right: 0.2rem;
}

td.col-mlb-team,
th.col-mlb-team {
  font-weight: 600;
  white-space: nowrap;
}

td.col-league-team,
th.col-league-team {
  white-space: nowrap;
}

td.col-starts,
th.col-starts {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

@media (min-width: 480px) {
  .players-table {
    font-size: 0.875rem;
  }

  .players-table th,
  .players-table td {
    padding: 0.625rem var(--space-md);
  }
}

td.col-slot {
  white-space: nowrap;
}

td.col-player {
  font-weight: 500;
}

/* ── Scoring page ──────────────────────────────────────────── */
.scoring-intro {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  max-width: 640px;
}

.scoring-heading {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-navy);
}

.scoring-desc {
  color: var(--color-text);
  font-size: 0.9rem;
  max-width: 640px;
  line-height: 1.5;
}

.scoring-formula {
  background: var(--color-navy);
  color: var(--color-white);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  display: inline-block;
}

.scoring-formula--master {
  font-size: 0.8rem;
  display: block;
  max-width: 640px;
}

.scoring-note {
  color: var(--color-text-muted);
  font-size: 0.82rem;
  font-style: italic;
}

.scoring-table {
  display: table;
  overflow-x: visible;
  max-width: 360px;
  font-size: 0.875rem;
}

.scoring-table th {
  padding: var(--space-sm) var(--space-md);
}

.scoring-table td {
  padding: 0.4rem var(--space-md);
}

.scoring-table td:last-child,
.scoring-table th:last-child {
  text-align: right;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
