/* Race Appeal Fantasy League — white theme, racing stripes, slider UI (mobile-first) */
:root {
  --bg: #ffffff;
  --bg-soft: #f7f8fa;
  --surface: #ffffff;
  --surface-muted: #f1f3f6;
  --text: #0f172a;
  --text-muted: #5b6575;
  --yellow: #ffd200;
  --yellow-deep: #e6b800;
  --red: #e10600;
  --red-hover: #c00500;
  --blue: #0057b8;
  --blue-soft: rgba(0, 87, 184, 0.12);
  --accent: var(--red);
  --accent-hover: var(--red-hover);
  --accent-soft: rgba(225, 6, 0, 0.1);
  --border: #e2e8f0;
  --ring: rgba(225, 6, 0, 0.35);
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
  --shadow-sm: 0 2px 10px rgba(15, 23, 42, 0.06);
  --shadow-card: 0 4px 18px rgba(15, 23, 42, 0.07);
  --font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --fs-body: clamp(0.95rem, 0.9rem + 0.35vw, 1.05rem);
  --fs-small: clamp(0.8rem, 0.75rem + 0.25vw, 0.9rem);
  --fs-h1: clamp(1.4rem, 1.1rem + 2.2vw, 2.1rem);
  --fs-h2: clamp(1.15rem, 1rem + 1vw, 1.45rem);
  --fs-label: clamp(1.05rem, 0.95rem + 0.6vw, 1.25rem);
  --max: 640px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: var(--fs-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--surface);
  color: var(--text);
  padding: 0.75rem 1rem;
  z-index: 100;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* ——— Layout ——— */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.page-header {
  padding: 0 0 1rem;
  text-align: center;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 100%);
}

.page-main {
  flex: 1;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.75rem 1rem 2rem;
}

.page-main--wide {
  max-width: 1100px;
}

.page-main--stats {
  max-width: 720px;
}

.page-footer {
  padding: 1.25rem 1rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
}

.page-footer a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 600;
}

.page-footer a:hover {
  color: var(--red);
  text-decoration: underline;
}

/* ——— Brand stripes (yellow×2, red×2, thick blue) ——— */
.brand-stripes {
  display: block;
  width: 100%;
  height: 14px;
  background-image: repeating-linear-gradient(
    -55deg,
    var(--yellow) 0 5px,
    transparent 5px 10px,
    var(--yellow) 10px 15px,
    transparent 15px 20px,
    var(--red) 20px 25px,
    transparent 25px 30px,
    var(--red) 30px 35px,
    transparent 35px 40px,
    var(--blue) 40px 58px,
    transparent 58px 78px
  );
  background-color: #0a0a0a;
  background-size: 120px 100%;
}

.brand-stripes--thin {
  height: 8px;
}

.brand-stripes--hero {
  height: 18px;
}

/* ——— Brand title ——— */
.brand-mark {
  display: none !important;
}

.brand-title {
  margin: 0.15rem 0 0;
  font-size: var(--fs-h1);
  font-weight: 900;
  font-style: italic;
  letter-spacing: -0.03em;
  line-height: 1.15;
  text-transform: uppercase;
  color: var(--text);
  font-stretch: condensed;
  transform: skewX(-4deg);
  display: inline-block;
}

a.brand-title-link {
  color: inherit;
  text-decoration: none;
  font: inherit;
  font-style: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  display: inline;
  transition: color 0.15s ease, opacity 0.15s ease;
}

a.brand-title-link:hover {
  color: var(--blue);
  text-decoration: none;
  opacity: 0.92;
}

a.brand-title-link:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}

.brand-title .accent-red {
  color: var(--red);
}

.brand-title .accent-blue {
  color: var(--blue);
}

.page-header .subtitle,
/* .subtitle hidden via .page-header .subtitle rule */


.page-header--relocated,
.page-header[hidden] {
  display: none !important;
}

.page-header h1:not(.brand-title) {
  margin: 0.15rem 0 0;
  font-size: clamp(1.25rem, 4vw, 1.65rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

/* ——— Cards ——— */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
  padding: 1.35rem 1.35rem 1.5rem;
}

.card + .card {
  margin-top: 1rem;
}

.card-title {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.card-desc {
  margin: 0 0 1.15rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ——— Buttons ——— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.8rem 1.2rem;
  border: none;
  border-radius: var(--radius-sm);
  font: inherit;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease, color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--red);
  color: #fff;
  box-shadow: 0 6px 16px rgba(225, 6, 0, 0.28);
}

.btn-primary:hover {
  background: var(--red-hover);
  color: #fff;
}

.btn-secondary {
  background: var(--surface-muted);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: #e8edf3;
  color: var(--text);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  min-height: 42px;
  padding: 0.55rem 0.9rem;
  font-size: 0.8rem;
}

.btn-ghost:hover {
  background: var(--surface-muted);
  color: var(--text);
  border-color: #cbd5e1;
}

.btn-blue {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 6px 16px rgba(0, 87, 184, 0.28);
}

.btn-blue:hover {
  background: #004a9e;
  color: #fff;
}

.btn-block {
  width: 100%;
}

/* ——— Segmented control (iOS-like pills) ——— */
.seg {
  flex-wrap: wrap;
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1rem;
  padding: 0.3rem;
  background: var(--surface-muted);
  border-radius: 999px;
  border: 1px solid var(--border);
}

.seg button,
.seg a {
  flex: 1 1 0;
  min-width: max-content;
  min-height: 40px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.75rem;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}

.seg button[aria-selected="true"],
.seg a[aria-selected="true"],
.seg a.is-active {
  background: #fff;
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.seg--compact button,
.seg--compact a {
  font-size: 0.65rem;
  padding: 0.35rem 0.55rem;
}

/* ——— Hub slider / action cards ——— */
/* ——— Home vertical menu ——— */
.hub-menu {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  max-width: 28rem;
  margin: 0.5rem auto 0;
}

.hub-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 1.05rem 1.15rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease), transform 0.15s var(--ease);
}

.hub-item:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-card);
  transform: translateY(-1px);
}

.hub-item:active {
  transform: translateY(0);
}

.hub-item-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
  text-align: left;
}

.hub-item .hub-label {
  margin: 0;
  font-size: var(--fs-label);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.2;
}

.hub-item .hub-desc {
  margin: 0;
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.35;
}

.hub-chevron {
  flex-shrink: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-muted);
}

.hub-item--picks { border-left: 4px solid var(--red); }
.hub-item--picks .hub-chevron { color: var(--red); }
.hub-item--view { border-left: 4px solid var(--blue); }
.hub-item--view .hub-chevron { color: var(--blue); }
.hub-item--stats { border-left: 4px solid var(--yellow-deep); }
.hub-item--stats .hub-chevron { color: var(--yellow-deep); }
.hub-item--playoffs { border-left: 4px solid var(--red); }
.hub-item--playoffs .hub-chevron { color: var(--red); }
.hub-item--records { border-left: 4px solid #64748b; }
.hub-item--standings { border-left: 4px solid var(--blue); }
.hub-item--standings .hub-chevron { color: var(--blue); }

.hub-item--disabled,
.hub-item[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
  transform: none;
  background: var(--surface-muted);
}

.hub-item--disabled:hover,
.hub-item[aria-disabled="true"]:hover {
  border-color: var(--border);
  box-shadow: none;
  transform: none;
}

.hub-item--minigames { border-left: 4px solid #94a3b8; }

.subtitle {
  font-size: var(--fs-small);
}

/* ——— Nav bar (hub back + page seg) ——— */
.nav-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

/* ——— Forms (make.html) ——— */
.form-stack {
  display: flex;
  flex-direction: column;
  gap: 1.05rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.field label,
.legend {
  font-size: var(--fs-small);
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.01em;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="number"],
.field input[type="search"],
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: var(--fs-body);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--ring);
  outline: none;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 480px) {
  .field-row {
    grid-template-columns: 1fr;
  }
}

.helper {
  margin: 0.15rem 0 0;
  font-size: var(--fs-small);
  color: var(--text-muted);
  line-height: 1.4;
}

.form-note {
  margin: 0.25rem 0 0;
  font-size: var(--fs-small);
  color: var(--text-muted);
  text-align: center;
}

.required {
  color: var(--red);
  font-weight: 800;
}

.legend {
  padding: 0;
}

/* Honeypot — visually hidden, keep off-screen */
.hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.badge {
  display: inline-block;
  margin: 0 0 0.55rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--red);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.badge--blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.badge--muted {
  background: var(--surface-muted);
  color: var(--text-muted);
}

/* ——— Records page ——— */
.page-main--records {
  max-width: 720px;
}

.records-ready {
  margin: 0.75rem 0 1.25rem;
  padding: 1rem 1.1rem;
  text-align: center;
  background: var(--surface-muted);
  border: 1px dashed var(--border);
  border-radius: 14px;
  color: var(--text-muted);
  font-size: var(--fs-small);
}

.records-ready strong {
  display: block;
  color: var(--text);
  font-size: var(--fs-body);
  margin-bottom: 0.25rem;
}

.records-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 1rem;
  padding: 0.3rem;
  background: var(--surface-muted);
  border-radius: 999px;
  border: 1px solid var(--border);
}

.records-tabs button {
  flex: 1 1 0;
  min-width: max-content;
  min-height: 40px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0.35rem 0.75rem;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.records-tabs button[aria-selected="true"] {
  background: #fff;
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.records-panel {
  display: none;
  min-height: 8rem;
  padding: 1.1rem 1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  color: var(--text-muted);
  font-size: var(--fs-small);
}

.records-panel.active {
  display: block;
}

.records-panel h3 {
  margin: 0 0 0.65rem;
  font-size: var(--fs-h2);
  color: var(--text);
}

.record-block {
  margin: 0 0 1.25rem;
}

.record-block:last-child {
  margin-bottom: 0;
}

.record-block h4 {
  margin: 0 0 0.45rem;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text);
}

.record-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-small);
}

.record-table th,
.record-table td {
  padding: 0.45rem 0.35rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.record-table th {
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.record-table td.rank {
  width: 2rem;
  font-weight: 800;
  color: var(--text-muted);
}

.record-table td.value {
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
}

.record-table a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 700;
}

.record-table a:hover {
  color: var(--red);
  text-decoration: underline;
}

.record-table .note {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

.records-meta {
  margin: 0.75rem 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

.records-loading,
.records-error {
  padding: 1rem;
  text-align: center;
  color: var(--text-muted);
}

.records-error {
  color: #b91c1c;
}

.record-table td.value a.record-value-link {
  font-weight: 800;
  color: var(--blue);
  text-decoration: none;
}

.record-table td.value a.record-value-link:hover {
  color: var(--red);
  text-decoration: underline;
}

.records-moment-view {
  margin-top: 0.5rem;
}

.records-back {
  margin-bottom: 0.75rem;
}

.records-moment-title {
  margin: 0 0 0.25rem;
  font-size: 1.15rem;
}

.records-moment-sub {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: var(--fs-small);
}

.records-moment-list {
  margin: 0;
  padding-left: 1.25rem;
}

.records-moment-list li {
  margin: 0.55rem 0;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--border);
}

.records-moment-list .moment-main {
  font-weight: 600;
}

.records-moment-list .moment-meta {
  margin-top: 0.15rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.records-moment-list .moment-place {
  font-weight: 700;
  color: var(--text);
  margin-right: 0.35rem;
}

.records-moment-list a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 700;
}

.records-moment-list a:hover {
  color: var(--red);
  text-decoration: underline;
}

.records-empty-moments {
  color: var(--text-muted);
  font-style: italic;
}

/* ——— Site hamburger nav (shared across pages) ——— */
/* Overlay is position:fixed on body — avoid transform/filter/perspective on ancestors. */

/* Permanent fixed top chrome — thin stripes + Menu on every page */
:root {
  /* stripes + menu bar + brand title row; JS refreshes from chrome height */
  --site-nav-offset: 5.85rem;
}

body.has-site-nav {
  padding-top: var(--site-nav-offset);
}

.site-nav-chrome {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  width: 100%;
  background: #fff;
  box-shadow: 0 1px 0 var(--border), 0 8px 20px rgba(15, 23, 42, 0.06);
}

.site-nav-chrome > .brand-stripes--thin {
  margin: 0;
  display: block;
}

.site-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.5rem 1rem 0.55rem;
  border-bottom: none;
  box-sizing: border-box;
  text-align: left;
}

.site-nav-history {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* Brand title row under menu bar — part of fixed chrome stack */
.site-nav-title {
  display: block;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.35rem 1rem 0.55rem;
  text-align: center;
  box-sizing: border-box;
  background: #fff;
  border-top: 1px solid var(--border);
}

.site-nav-title .brand-title {
  margin: 0;
  font-size: clamp(0.95rem, 3.2vw, 1.28rem);
  line-height: 1.2;
}

@media (min-width: 760px) {
  .site-nav-title {
    max-width: 720px;
  }
}

.nav-history-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.nav-history-btn:hover {
  background: var(--surface-muted);
  border-color: #cbd5e1;
  color: var(--blue);
}

.nav-history-btn:active {
  transform: translateY(1px);
}

.nav-hamburger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-width: 44px;
  height: 40px;
  padding: 0 0.85rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.nav-hamburger-icon {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 16px;
}

.nav-hamburger-icon span {
  display: block;
  height: 2px;
  width: 100%;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.25s var(--ease), opacity 0.2s ease;
}

.nav-hamburger:hover {
  background: var(--surface-muted);
  border-color: #cbd5e1;
}

body.nav-open .nav-hamburger,
.nav-hamburger[aria-expanded="true"] {
  background: var(--accent-soft);
  border-color: rgba(225, 6, 0, 0.35);
  color: var(--red);
}

body.nav-open .nav-hamburger-icon span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
body.nav-open .nav-hamburger-icon span:nth-child(2) {
  opacity: 0;
}
body.nav-open .nav-hamburger-icon span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Fullscreen fade menu — true viewport fixed on body (no side-drawer) */
.site-nav {
  /* wrapper only; do not create a positioning/transform containing block */
  z-index: 40;
}

.nav-fullscreen {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.985);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

body.nav-open .nav-fullscreen,
.site-nav.is-open .nav-fullscreen {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.nav-fullscreen-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: min(28rem, 100%);
  max-width: 28rem;
  margin: 0 auto;
  padding: 0 1.15rem 2.5rem;
  box-sizing: border-box;
}

.nav-fullscreen-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 0 0.85rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.25rem;
}

.nav-fullscreen-brand {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.nav-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-size: 1.35rem;
  cursor: pointer;
  line-height: 1;
  box-shadow: var(--shadow-sm);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.nav-close:hover {
  background: var(--surface-muted);
  color: var(--red);
}

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
  justify-content: center;
}

.nav-links a {
  display: block;
  padding: 1.05rem 1.15rem;
  border-radius: 14px;
  border: 1px solid transparent;
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  text-align: center;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, opacity 0.35s ease, transform 0.35s ease;
  opacity: 0;
  transform: translateY(10px);
}

body.nav-open .nav-links a,
.site-nav.is-open .nav-links a {
  opacity: 1;
  transform: translateY(0);
}

body.nav-open .nav-links li:nth-child(1) a,
.site-nav.is-open .nav-links li:nth-child(1) a { transition-delay: 0.05s; }
body.nav-open .nav-links li:nth-child(2) a,
.site-nav.is-open .nav-links li:nth-child(2) a { transition-delay: 0.1s; }
body.nav-open .nav-links li:nth-child(3) a,
.site-nav.is-open .nav-links li:nth-child(3) a { transition-delay: 0.15s; }
body.nav-open .nav-links li:nth-child(4) a,
.site-nav.is-open .nav-links li:nth-child(4) a { transition-delay: 0.2s; }
body.nav-open .nav-links li:nth-child(5) a,
.site-nav.is-open .nav-links li:nth-child(5) a { transition-delay: 0.25s; }
body.nav-open .nav-links li:nth-child(6) a,
.site-nav.is-open .nav-links li:nth-child(6) a { transition-delay: 0.3s; }
body.nav-open .nav-links li:nth-child(7) a,
body.nav-open .nav-links li:nth-child(7) .nav-link-disabled,
.site-nav.is-open .nav-links li:nth-child(7) a,
.site-nav.is-open .nav-links li:nth-child(7) .nav-link-disabled { transition-delay: 0.35s; }

.nav-link-disabled {
  display: block;
  padding: 1.05rem 1.15rem;
  border-radius: 14px;
  border: 1px dashed var(--border);
  color: #94a3b8;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  text-align: center;
  background: var(--surface-muted);
  cursor: not-allowed;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  user-select: none;
}

body.nav-open .nav-link-disabled,
.site-nav.is-open .nav-link-disabled {
  opacity: 0.85;
  transform: translateY(0);
}

.nav-links a:hover {
  background: var(--surface-muted);
  border-color: var(--border);
}

.nav-links a.is-active,
.nav-links a[aria-current="page"] {
  background: var(--accent-soft);
  border-color: rgba(225, 6, 0, 0.28);
  color: var(--red);
}

.nav-fullscreen-foot {
  margin-top: auto;
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
}

body.nav-open {
  overflow: hidden;
}

/* Race prev/next + year race sorter (stats) */
.race-nav-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0.85rem 0 0.85rem;
  padding: 0.35rem 0;
}

.race-nav-row .btn,
.race-nav-row a.btn {
  flex: 1 1 9rem;
  min-height: 46px;
  font-size: 0.78rem;
  box-shadow: var(--shadow-sm);
  visibility: visible;
  opacity: 1;
  background: var(--surface-muted);
  color: var(--text);
  border: 1px solid var(--border);
}

.race-nav-row .btn[disabled],
.race-nav-row .btn.is-disabled {
  opacity: 0.45;
  pointer-events: none;
  cursor: not-allowed;
  box-shadow: none;
}

.year-races-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0 0 0.65rem;
}

.year-races-toolbar label {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.year-races-toolbar select {
  min-height: 36px;
  padding: 0.3rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
}

a.list-item.year-race-row {
  flex-direction: row;
  align-items: flex-start;
  gap: 0.75rem;
}

.year-race-num {
  flex-shrink: 0;
  min-width: 2.1rem;
  font-weight: 800;
  color: var(--red);
  font-size: 0.95rem;
  line-height: 1.3;
}


@media (min-width: 760px) {
  .site-nav-bar {
    max-width: 720px;
  }
}


/* —— Playoffs page —— */
.page-main--playoffs {
  max-width: 720px;
}

.playoffs-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1rem 0 1.1rem;
}

.playoffs-tabs button {
  appearance: none;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  min-height: 36px;
}

.playoffs-tabs button[aria-selected="true"] {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.playoffs-panel[hidden] {
  display: none !important;
}

.playoffs-loading {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.playoffs-meta {
  display: none !important;
}

.playoffs-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.playoffs-standings-table td.playoffs-cutoff {
  font-weight: 700;
  white-space: nowrap;
}

.playoffs-cutoff--locked,
.playoffs-cutoff--pos {
  color: #15803d;
}

.playoffs-cutoff--neg {
  color: #b45309;
}

.playoffs-row--locked td,
.playoffs-row--pos td {
  background: rgba(34, 197, 94, 0.06);
}

.playoffs-row--neg td {
  background: rgba(245, 158, 11, 0.05);
}

.playoffs-champ-list,
.playoffs-finisher-list,
.playoffs-race-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.playoffs-champ-item,
.playoffs-finisher-item,
.playoffs-race-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.75rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

.playoffs-year-btn {
  appearance: none;
  border: none;
  background: var(--yellow);
  color: var(--text);
  font: inherit;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 0.25rem 0.65rem;
  border-radius: 8px;
  cursor: pointer;
  min-width: 3.2rem;
}

.playoffs-year-btn:hover {
  filter: brightness(0.97);
}

.playoffs-champ-player {
  font-weight: 700;
  flex: 1;
  min-width: 8rem;
}

.playoffs-year-toolbar {
  margin-bottom: 0.85rem;
}

.playoffs-year-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.playoffs-year-chip {
  appearance: none;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  cursor: pointer;
  min-height: 32px;
}

.playoffs-year-chip.is-selected {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.playoffs-place {
  flex-shrink: 0;
  min-width: 1.75rem;
  font-weight: 800;
  color: var(--red);
}

.playoffs-finisher-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.playoffs-finisher-name {
  font-weight: 700;
}

.playoffs-finisher-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.playoffs-chip {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--text-muted);
}

.playoffs-chip--r {
  background: rgba(37, 99, 235, 0.12);
  color: var(--blue);
}

.playoffs-chip--final {
  background: rgba(220, 38, 38, 0.12);
  color: var(--red);
}

.playoffs-chip--reg {
  background: rgba(234, 179, 8, 0.22);
  color: #854d0e;
}

.playoffs-race-item {
  flex-direction: column;
  align-items: stretch;
  gap: 0.25rem;
}

.playoffs-race-main {
  font-weight: 700;
}

.playoffs-race-main a {
  color: inherit;
  text-decoration: none;
}

.playoffs-race-main a:hover {
  color: var(--red);
  text-decoration: underline;
}

.playoffs-race-meta {
  font-size: 0.85rem;
}

.playoffs-race-year {
  font-weight: 800;
  color: var(--red);
}

.playoffs-race-winners {
  font-size: 0.9rem;
}

.playoffs-muted {
  color: var(--text-muted);
  font-weight: 500;
}

.playoffs-row--eliminated td {
  opacity: 0.72;
}
.playoffs-eliminated {
  font-weight: 700;
  color: #b00020;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 0.85em;
}

.playoffs-wins {
  font-size: 0.85rem;
  font-weight: 600;
  color: #333;
  white-space: nowrap;
}
.playoffs-champ-item .playoffs-wins,
.playoffs-finisher-item .playoffs-wins {
  margin-left: 0.35rem;
}


/* Footer version stamp */
.page-footer .site-version {
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  font-weight: 700;
}

/* Version notes page */
.page-main--version-notes {
  max-width: 720px;
}

.version-notes-current {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 1rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(225, 6, 0, 0.28);
  background: var(--accent-soft);
  color: var(--red);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.version-notes-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.version-notes-entry {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  padding: 0.9rem 1rem 0.95rem;
}

.version-notes-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.45rem 0.75rem;
  margin: 0 0 0.45rem;
}

.version-notes-ver {
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--text);
}

.version-notes-date {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.version-notes-entry ul {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.45;
}

.version-notes-entry li + li {
  margin-top: 0.25rem;
}

.version-notes-loading,
.version-notes-error {
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* ——— Shared stats/list chrome (clean single borders) ——— */
.list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.list > li {
  margin: 0;
  padding: 0;
  list-style: none;
  border: none;
  background: transparent;
  box-shadow: none;
}

.list > li > .list-item,
.list > li > a.list-item {
  width: 100%;
  box-sizing: border-box;
}

.list-item,
a.list-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  text-align: left;
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--text);
  text-decoration: none;
  font: inherit;
  box-sizing: border-box;
}

.list-item--static {
  cursor: default;
}

a.list-item {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

a.list-item:hover {
  background: var(--bg-soft);
  box-shadow: var(--shadow-card);
  transform: translateY(-1px);
}

.list-item .li-title {
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.3;
}

.list-item .li-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.list-item .li-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.75rem;
  margin-top: 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
}

.list-empty,
.list > li > .empty,
.win-list > li.empty,
.result-cards > li.empty {
  margin: 0;
  padding: 1rem 1.1rem;
  text-align: center;
  color: var(--text-muted);
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 12px;
  border-style: solid;
  list-style: none;
  box-shadow: none;
}

/* Sticky stats breadcrumb under unified chrome */
body.has-site-nav #detail-view > .crumb {
  position: sticky;
  top: var(--site-nav-offset);
  z-index: 140;
  background: #fff;
  margin: -0.15rem -1.35rem 0.85rem;
  padding: 0.65rem 1.35rem 0.6rem;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 6px 12px -8px rgba(15, 23, 42, 0.12);
}

.win-list,
.result-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.7rem;
}

.win-list > li,
.result-cards > li {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Card padding room (v9.01) — avoid cramped rounded borders app-wide */
.hub-item {
  padding: 1.15rem 1.25rem !important;
}
.card {
  padding: 1.5rem 1.45rem 1.6rem;
}
.stat-box {
  padding: 1rem 1.05rem !important;
}
.win-card,
.result-card {
  padding: 1.15rem 1.25rem !important;
  border-radius: 14px !important;
}
.place-pill {
  padding: 0.25rem 0.55rem !important;
  min-width: 2rem !important;
}
.result-card,
.win-card {
  display: grid;
  gap: 0.4rem 0.75rem;
}
.playoffs-champ-item,
.playoffs-finisher-item,
.playoffs-race-item {
  padding: 1rem 1.15rem;
}
.record-table th,
.record-table td {
  padding: 0.75rem 0.9rem;
}
.list-item .li-title {
  line-height: 1.35;
}
.list-item .li-meta {
  line-height: 1.4;
  margin-top: 0.1rem;
}
