/* Hard Court design system — tokens, base, and shared components. */

:root {
  --navy: #0B2A5B;
  --navy-2: #12366F;
  --blue: #1F5FBF;
  --blue-ink: #1A4FA0;
  --ink: #0C1B33;
  --muted: #42526B;
  --bg: #F3F6FA;
  --surface: #FFFFFF;
  --surface-2: #E8EDF4;
  --line: #DCE3EE;
  --line-strong: #C5D0DF;
  --accent: #DDF246;
  --accent-ink: #0B2A5B;
  --on-blue: #FFFFFF;
  --accent-soft: #F1F8C8;
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2342526B' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --on-navy: #FFFFFF;
  --on-navy-muted: #D6E2F5;
  --tag-rating: #DDF246;
  --tag-college: #CFE0FA;
  --tag-track: #FFE3C2;
  --tag-gear: #E2E8F0;
  --tag-guide: #E9E3F7;
  --good: #1D7A46;
  --good-bg: #DDF3E6;
  --warn: #9A5B00;
  --warn-bg: #FFF1D6;
  --bad: #B42318;
  --bad-bg: #FDE4E1;

  --font-display: 'Archivo', 'Arial Narrow', sans-serif;
  --font-body: 'Public Sans', system-ui, -apple-system, sans-serif;
  --max: 1200px;
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 20px;
  --shadow: 0 1px 2px rgba(12, 27, 51, 0.06), 0 8px 24px rgba(12, 27, 51, 0.06);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --navy: #071A3A;
    --navy-2: #0D2550;
    --blue: #4F8AE6;
    --blue-ink: #8FB6F5;
    --on-blue: #071A3A;
    --accent-soft: #1F2C16;
    --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23A3B1C6' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    --ink: #E8EEF7;
    --muted: #A3B1C6;
    --bg: #0A1424;
    --surface: #111E33;
    --surface-2: #1A2A44;
    --line: #22324D;
    --line-strong: #31466A;
    --tag-college: #23406E;
    --tag-track: #5A3B12;
    --tag-gear: #2A3A55;
    --tag-guide: #3A2F5A;
    --good: #6FD69A;
    --good-bg: #123A26;
    --warn: #F3C46B;
    --warn-bg: #3D2C0A;
    --bad: #FF8A80;
    --bad-bg: #431A17;
    --shadow: none;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --navy: #071A3A;
  --navy-2: #0D2550;
  --blue: #4F8AE6;
  --blue-ink: #8FB6F5;
  --on-blue: #071A3A;
  --accent-soft: #1F2C16;
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23A3B1C6' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --ink: #E8EEF7;
  --muted: #A3B1C6;
  --bg: #0A1424;
  --surface: #111E33;
  --surface-2: #1A2A44;
  --line: #22324D;
  --line-strong: #31466A;
  --tag-college: #23406E;
  --tag-track: #5A3B12;
  --tag-gear: #2A3A55;
  --tag-guide: #3A2F5A;
  --good: #6FD69A;
  --good-bg: #123A26;
  --warn: #F3C46B;
  --warn-bg: #3D2C0A;
  --bad: #FF8A80;
  --bad-bg: #431A17;
  --shadow: none;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}
main { flex: 1; }
/* Components set display:flex/grid; keep the hidden attribute authoritative. */
[hidden] { display: none !important; }
img, svg { max-width: 100%; }
a { color: var(--blue-ink); text-underline-offset: 3px; }
a:hover { color: var(--blue); }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 0.5em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Layout ---------- */
.container { max-width: var(--max); margin: 0 auto; padding-inline: 24px; }
.container-narrow { max-width: 780px; margin: 0 auto; padding-inline: 24px; }
.section { padding-block: 72px; }
.section-tight { padding-block: 40px; }
/* Back-to-back sections share one gap instead of doubling it. */
.section + .section { padding-top: 0; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.stack-lg { display: flex; flex-direction: column; gap: 40px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 24px; }
.split { display: flex; flex-wrap: wrap; gap: 40px 32px; align-items: flex-start; }
.split > .main { flex: 999 1 560px; min-width: 0; }
.split > .side { flex: 1 1 300px; min-width: 0; }
@media (max-width: 640px) {
  body { font-size: 16px; }
  .container, .container-narrow { padding-inline: 16px; }
  .section { padding-block: 48px; }
  .section-tight { padding-block: 32px; }
  .stack-lg { gap: 32px; }
}

/* ---------- Type ---------- */
.display {
  font-family: var(--font-display);
  font-stretch: 75%;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.005em;
  line-height: 0.98;
}
.display-xl { font-size: clamp(48px, 8vw, 88px); font-stretch: 70%; font-weight: 900; line-height: 0.92; }
.display-lg { font-size: clamp(36px, 5vw, 56px); }
.display-md { font-size: clamp(28px, 3.5vw, 40px); }
.display-sm { font-size: clamp(22px, 2.5vw, 28px); }
.eyebrow {
  margin: 0 0 12px;
  font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--blue-ink);
}
.lead { font-size: 19px; line-height: 1.55; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Page header (navy band) ---------- */
.page-hero { background: var(--navy); color: var(--on-navy); padding: 48px 0 56px; }
.page-hero .eyebrow { color: var(--accent); }
.page-hero .lead { color: var(--on-navy-muted); max-width: 680px; margin: 16px 0 0; }
.page-hero a:not(.btn) { color: var(--on-navy); }
.page-hero h1 { margin: 0; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; margin: 0 0 16px; padding: 0; list-style: none; color: var(--on-navy-muted); }
.crumbs a { color: var(--on-navy-muted); }
.crumbs li + li::before { content: "/"; margin-right: 6px; opacity: 0.6; }

/* ---------- Buttons & chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 12px 20px;
  font: inherit; font-size: 16px; font-weight: 700; line-height: 1.1;
  border-radius: 999px; border: 1.5px solid transparent;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--blue); color: var(--on-blue); }
.btn-primary:hover { background: var(--blue-ink); color: var(--on-blue); }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { background: #CFE52E; color: var(--accent-ink); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { background: #E9F0FB; color: var(--navy); }
.btn-sm { min-height: 38px; padding: 8px 14px; font-size: 14px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--blue-ink); text-decoration: underline; cursor: pointer; }

.chip {
  display: inline-flex; align-items: center; min-height: 40px; padding: 8px 16px;
  border-radius: 999px; border: 1.5px solid var(--line-strong); background: var(--surface);
  color: var(--ink); font: inherit; font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip[aria-pressed="true"], .chip.is-active { background: var(--ink); border-color: var(--ink); color: var(--bg); }

.tag {
  display: inline-block; align-self: flex-start;
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px; color: var(--ink); background: var(--tag-gear);
}
.tag-rating { background: var(--tag-rating); color: var(--accent-ink); }
.tag-college { background: var(--tag-college); }
.tag-track { background: var(--tag-track); }
.tag-gear { background: var(--tag-gear); }
.tag-guide { background: var(--tag-guide); }

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-lg);
  padding: 28px;
}
.card-link {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r);
  padding: 22px; color: var(--ink); text-decoration: none;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.card-link:hover { border-color: var(--blue); color: var(--ink); transform: translateY(-2px); box-shadow: var(--shadow); }
.card-title { font-family: var(--font-display); font-stretch: 85%; font-weight: 800; font-size: 22px; line-height: 1.1; margin: 0; }
.card-desc { font-size: 15px; line-height: 1.5; color: var(--muted); margin: 0; }
.card-navy { background: var(--navy); color: var(--on-navy); border-color: var(--navy); }
.card-navy .muted { color: var(--on-navy-muted); }
@media (max-width: 640px) { .card { padding: 20px; } }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; min-width: 0; }
.field .hint { font-weight: 400; color: var(--muted); font-size: 13px; }
.input, .select, .textarea {
  width: 100%; font: inherit; font-size: 16px; font-weight: 400; color: var(--ink);
  padding: 12px 14px; min-height: 48px;
  background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: var(--r-sm);
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 25%, transparent); }
/* Custom chevron so it sits 16px in from the edge instead of hugging the border. */
.select {
  appearance: none; -webkit-appearance: none;
  padding-right: 44px;
  background-image: var(--chevron);
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 12px 8px;
  cursor: pointer;
}
.textarea { min-height: 96px; resize: vertical; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 18px 16px; }
.seg { display: inline-flex; padding: 4px; background: var(--surface-2); border-radius: 999px; gap: 4px; flex-wrap: wrap; }
.seg button {
  font: inherit; font-size: 15px; font-weight: 700; border: 0; border-radius: 999px;
  padding: 10px 18px; min-height: 42px; background: transparent; color: var(--muted); cursor: pointer;
}
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

/* ---------- Results & stats ---------- */
.result {
  display: flex; flex-direction: column; gap: 4px;
  background: var(--navy); color: var(--on-navy); border-radius: var(--r); padding: 20px 24px;
}
.result-label { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.result-value { font-family: var(--font-display); font-stretch: 75%; font-weight: 900; font-size: 64px; line-height: 1; font-variant-numeric: tabular-nums; }
.result-note { font-size: 15px; color: var(--on-navy-muted); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; }
.stat { background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r); padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.stat-label { font-size: 13px; color: var(--muted); font-weight: 600; }
.stat-value { font-family: var(--font-display); font-stretch: 80%; font-weight: 800; font-size: 32px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.stat-note { font-size: 13px; color: var(--muted); }

.badge { display: inline-block; font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.badge-good { background: var(--good-bg); color: var(--good); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-bad { background: var(--bad-bg); color: var(--bad); }
.badge-neutral { background: var(--surface-2); color: var(--muted); }

.notice { border-radius: var(--r); padding: 18px 22px; background: var(--surface-2); color: var(--ink); font-size: 15px; }
.notice-accent { background: var(--accent-soft); box-shadow: inset 4px 0 0 var(--accent); }

/* ---------- Range bars (college fit) ---------- */
.range-row { display: grid; grid-template-columns: 76px minmax(0, 1fr) 112px; gap: 14px; align-items: center; }
.range-track { position: relative; height: 14px; background: var(--surface-2); border-radius: 999px; }
.range-fill { position: absolute; top: 0; bottom: 0; background: var(--blue); border-radius: 999px; }
.range-mark { position: absolute; top: -6px; width: 4px; height: 26px; margin-left: -2px; background: var(--ink); border-radius: 2px; }
@media (max-width: 520px) { .range-row { grid-template-columns: 56px minmax(0, 1fr); } .range-row > :last-child { grid-column: 2; } }

/* ---------- Tables ---------- */
.table-wrap { position: relative; overflow-x: auto; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-lg); }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th { text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 14px 18px; white-space: nowrap; }
.table td { padding: 13px 18px; border-top: 1px solid var(--line); vertical-align: top; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- FAQ ---------- */
.faq details { border-top: 1.5px solid var(--line); padding: 4px 0; }
.faq details:last-child { border-bottom: 1.5px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--blue-ink); }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 0 16px; color: var(--muted); }

/* ---------- Long-form content ---------- */
.prose { font-size: 18px; line-height: 1.7; }
.prose > * + * { margin-top: 1em; }
.prose p { margin: 0; }
.prose h2 { font-family: var(--font-display); font-stretch: 80%; font-weight: 800; text-transform: uppercase; font-size: 30px; margin: 1.6em 0 0.4em; line-height: 1.05; }
.prose h3 { font-size: 21px; margin: 1.4em 0 0.3em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0; }
.prose li + li { margin-top: .35em; }
.prose blockquote { margin: 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--accent); color: var(--muted); }
.prose img { border-radius: var(--r); height: auto; }
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; display: block; overflow-x: auto; }
.prose th, .prose td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.prose code { background: var(--surface-2); padding: 1px 6px; border-radius: 6px; font-size: .9em; }
@media (max-width: 640px) { .prose { font-size: 17px; } }

/* ---------- Ratings meter (strings) ---------- */
.meter { display: grid; grid-template-columns: 110px minmax(0, 1fr) 32px; gap: 10px; align-items: center; font-size: 14px; }
.meter-track { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.meter-fill { height: 100%; background: var(--blue); border-radius: 999px; }
