:root {
  color-scheme: light;
  --page: #f9f9f7; --surface: #fcfcfb; --surface-2: #f3f2ee;
  --ink: #0b0b0b; --ink-2: #52514e; --muted: #898781;
  --grid: #e1e0d9; --axis: #c3c2b7; --border: rgba(11,11,11,0.10);
  /* ATO colors: azure and old gold */
  --azure: #1f6fb8; --gold: #c5a253;
  --accent: #1f6fb8; --accent-ink: #1a5e9e; --accent-2: #a8842a;
  --good: #006300; --bad: #d03b3b; --mid: #f0efec;
  --div-pos: #1f6fb8; --div-neg: #c5a253;
  --other-line: #c3c2b7;
  --giraffe: url(../img/giraffe-light.svg);
  --side-bg: #123a63; --side-ink: #dbe7f4; --side-muted: #9fb6cf; --side-hover: rgba(255,255,255,0.08);
  --radius: 10px;
  --font: system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #0d0d0d; --surface: #1a1a19; --surface-2: #232321;
    --ink: #f0efec; --ink-2: #c3c2b7; --muted: #898781;
    --grid: #2c2c2a; --axis: #383835; --border: rgba(255,255,255,0.10);
    --accent: #3a8fd9; --accent-ink: #8cc0ee; --accent-2: #d4b25e;
    --good: #0ca30c; --bad: #e66767; --mid: #383835;
    --div-pos: #3a8fd9; --div-neg: #b8963f; --other-line: #4a4a46; --giraffe: url(../img/giraffe-dark.svg); --side-bg: #0c2340;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0d0d0d; --surface: #1a1a19; --surface-2: #232321;
  --ink: #f0efec; --ink-2: #c3c2b7; --muted: #898781;
  --grid: #2c2c2a; --axis: #383835; --border: rgba(255,255,255,0.10);
  --accent: #3a8fd9; --accent-ink: #8cc0ee; --accent-2: #d4b25e;
  --good: #0ca30c; --bad: #e66767; --mid: #383835;
  --div-pos: #3a8fd9; --div-neg: #b8963f; --other-line: #4a4a46; --giraffe: url(../img/giraffe-dark.svg); --side-bg: #0c2340;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--page); color: var(--ink); font: 15px/1.45 var(--font); }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
.layout { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
nav.side { display: flex; flex-direction: column; background: var(--side-bg); color: var(--side-ink); border-right: 4px solid var(--gold); padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
nav.side .brand { display: flex; align-items: center; gap: 10px; font-weight: 750; font-size: 19px; padding: 0 6px 16px; color: #fff; letter-spacing: .01em; }
nav.side .brand small { display: block; font-weight: 500; font-size: 11px; color: var(--gold); letter-spacing: .08em; text-transform: uppercase; }
nav.side .brand .logo { width: 48px; height: 48px; flex: none; }
nav.side a { display: block; padding: 7px 10px; border-radius: 8px; color: var(--side-ink); border-left: 3px solid transparent; }
nav.side a.active { background: var(--side-hover); color: #fff; font-weight: 650; border-left-color: var(--gold); border-radius: 0 8px 8px 0; }
nav.side a:hover { text-decoration: none; background: var(--side-hover); }
nav.side .foot { margin-top: 18px; padding: 10px; font-size: 12px; color: var(--side-muted); }
nav.side .spots { flex: none; height: 110px; margin: auto -12px -18px; min-height: 110px; background: var(--giraffe) 0 0 / 160px; -webkit-mask-image: linear-gradient(to bottom, transparent, #000 75%); mask-image: linear-gradient(to bottom, transparent, #000 75%); }
nav.side button { font: inherit; font-size: 12px; background: none; border: 1px solid rgba(255,255,255,0.25); color: var(--side-ink); border-radius: 6px; padding: 4px 8px; cursor: pointer; margin: 4px 4px 0 0; }
main { padding: 24px 28px 60px; max-width: 1200px; min-width: 0; }
.strip { height: 12px; margin: -24px -28px 22px; background: var(--giraffe) 0 0 / 120px; border-bottom: 2px solid var(--gold); }
h1 { position: relative; padding-bottom: 8px; }
h1::after { content: ''; position: absolute; left: 0; bottom: 0; width: 48px; height: 3px; border-radius: 2px; background: var(--gold); }
.hero { border-radius: 14px; overflow: hidden; margin: 0 0 18px; background: var(--giraffe) 0 0 / 200px; border: 2px solid var(--gold); }
.hero .inner { margin: 28px; display: inline-flex; align-items: center; gap: 16px; background: color-mix(in oklab, var(--surface) 94%, transparent); border-radius: 12px; padding: 16px 22px; max-width: calc(100% - 56px); box-shadow: 0 6px 24px rgba(0,0,0,.18); }
.hero .logo { width: 72px; height: 72px; flex: none; }
.hero h1 { margin: 0 0 2px; font-size: 30px; }
.hero .sub { margin: 4px 0 0; }
h1 { font-size: 26px; margin: 0 0 4px; }
h2 { font-size: 18px; margin: 28px 0 10px; }
h3 { font-size: 15px; margin: 0 0 8px; }
.sub { color: var(--ink-2); margin: 0 0 18px; }
.muted { color: var(--muted); }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 0 0 16px; }
select, input[type=text] { font: inherit; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--ink); }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.seg button { font: inherit; border: 0; background: var(--surface); color: var(--ink-2); padding: 6px 12px; cursor: pointer; }
.seg button.on { background: var(--accent); color: #fff; }
.card.tile { border-top: 3px solid var(--gold); }
th { border-bottom: 2px solid color-mix(in oklab, var(--gold) 55%, transparent) !important; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tile .label { color: var(--ink-2); font-size: 13px; }
.tile .value { font-size: 26px; font-weight: 650; margin: 2px 0; }
.tile .value .chip { font-size: 18px; }
.tile .note { color: var(--muted); font-size: 13px; }
.tablewrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th, td { padding: 7px 10px; text-align: left; border-bottom: 1px solid var(--grid); white-space: nowrap; }
th { font-size: 12px; color: var(--ink-2); font-weight: 600; background: var(--surface-2); position: sticky; top: 0; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--ink); }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; }
tr.cut td { border-bottom: 2px dashed var(--axis); }
.pos { color: var(--good); } .neg { color: var(--bad); }
.chip { display: inline-flex; align-items: center; gap: 8px; }
.chip img, .chip .av { width: 22px; height: 22px; border-radius: 50%; background: var(--surface-2); flex: none; object-fit: cover; }
.chip .av { display: inline-grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--ink-2); }
.chip .team { color: var(--muted); font-size: 12px; }
.pill { display: inline-block; padding: 1px 8px; border-radius: 99px; background: var(--surface-2); font-size: 12px; color: var(--ink-2); }
.pill.gold { background: color-mix(in oklab, var(--gold) 35%, transparent); color: var(--ink); }
.bar { height: 8px; border-radius: 4px; background: var(--accent); }
.bartrack { background: var(--surface-2); border-radius: 4px; width: 100px; display: inline-block; vertical-align: middle; }
.matchups { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.matchup .row { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; gap: 8px; }
.matchup .row.win { font-weight: 650; }
.matchup .score { font-variant-numeric: tabular-nums; }
.matchup .tag { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.report .headline { font-size: 22px; font-weight: 700; margin: 0 0 6px; }
.report p { margin: 0 0 10px; }
.awards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.award .t { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .tip { position: absolute; pointer-events: none; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font-size: 12px; box-shadow: 0 4px 16px rgba(0,0,0,.12); display: none; z-index: 5; min-width: 140px; }
.chart .tip b { display: block; margin-bottom: 4px; }
.chart .tip .r { display: flex; justify-content: space-between; gap: 12px; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--ink-2); margin: 6px 0 0; }
.legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 5px; }
.matrix td { text-align: center; padding: 6px; min-width: 64px; }
.matrix td.cell { cursor: pointer; }
.matrix td.self { background: var(--surface-2); }
.matrix th.rowh { position: sticky; left: 0; z-index: 1; text-align: left; }
.board { display: grid; gap: 3px; font-size: 11px; }
.board .pk { border-radius: 5px; padding: 4px 5px; min-height: 44px; color: #0b0b0b; line-height: 1.2; overflow: hidden; }
.board .pk .pn { font-weight: 650; }
.board .hd { font-weight: 650; font-size: 11px; padding: 4px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pos-QB { background: #f4a6b8; } .pos-RB { background: #9fe0c4; } .pos-WR { background: #9ec5f4; }
.pos-TE { background: #f6c98a; } .pos-K { background: #d6d3f5; } .pos-DEF { background: #d8d6cf; } .pos-other { background: #e1e0d9; }
.loading { display: grid; place-items: center; min-height: 60vh; color: var(--ink-2); text-align: center; }
.err { border-color: var(--bad); }
pre.copy { white-space: pre-wrap; background: var(--surface-2); padding: 12px; border-radius: 8px; font-size: 13px; max-height: 300px; overflow: auto; }
.topbar, .tabbar, .backdrop { display: none; }
.grid > * { min-width: 0; } /* let tables scroll inside grid cells instead of widening the page */
@media (max-width: 860px) {
  :root { --topbar-h: 52px; --tabbar-h: 58px; }
  .layout { grid-template-columns: minmax(0, 1fr); }
  body { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }

  /* Top bar */
  .topbar { display: flex; align-items: center; gap: 8px; position: sticky; top: 0; z-index: 30; height: calc(var(--topbar-h) + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 10px 0; background: var(--side-bg); color: #fff; border-bottom: 3px solid var(--gold); }
  .topbar svg, .tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .menu-btn { display: grid; place-items: center; width: 42px; height: 42px; border: 0; border-radius: 10px; background: none; color: #fff; cursor: pointer; }
  .menu-btn:active { background: var(--side-hover); }
  .tb-brand .logo { width: 34px; height: 34px; display: block; }
  .tb-title { flex: 1; min-width: 0; font-weight: 700; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .tb-acct { flex: none; color: #fff; font-size: 13px; font-weight: 600; padding: 7px 12px; border: 1px solid rgba(255,255,255,.35); border-radius: 99px; }
  .tb-acct.me { width: 36px; height: 36px; padding: 0; display: grid; place-items: center; background: var(--gold); color: #10243d; border-color: var(--gold); }
  .tb-acct:hover { text-decoration: none; }

  /* Sidebar becomes a slide-in drawer */
  nav.side { position: fixed; z-index: 50; top: 0; left: 0; bottom: 0; width: min(84vw, 320px); height: 100%; padding: calc(16px + env(safe-area-inset-top)) 12px calc(16px + env(safe-area-inset-bottom)); border-right: 4px solid var(--gold); transform: translateX(-105%); transition: transform .22s ease; overscroll-behavior: contain; }
  body.menu-open nav.side { transform: none; box-shadow: 8px 0 30px rgba(0,0,0,.35); }
  body.menu-open { overflow: hidden; }
  nav.side a { padding: 11px 12px; font-size: 16px; }
  nav.side .foot { font-size: 14px; }
  nav.side button { font-size: 14px; padding: 8px 12px; }
  nav.side .spots { display: none; }
  .backdrop { display: block; position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.45); }
  .backdrop[hidden] { display: none; }

  /* Bottom tab bar */
  .tabbar { display: flex; position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--border); box-shadow: 0 -4px 16px rgba(0,0,0,.06); }
  .tabbar a, .tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font: inherit; font-size: 11px; color: var(--muted); background: none; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .tabbar a.active { color: var(--accent-ink); font-weight: 650; }
  .tabbar a.active svg { stroke: var(--gold); }
  .tabbar a:hover { text-decoration: none; }

  /* Content */
  main { padding: 14px 14px 28px; }
  .strip { margin: -14px -14px 14px; height: 8px; }
  h1 { font-size: 22px; }
  h2 { font-size: 17px; margin: 22px 0 8px; }
  .sub { font-size: 14px; }
  .card { padding: 12px; }
  .hero .inner { margin: 12px; padding: 12px 14px; max-width: calc(100% - 24px); }
  .hero .logo { width: 48px; height: 48px; }
  .hero h1 { font-size: 22px; }
  .g2, .g3, .g4, .grid.two, .grid.machine { grid-template-columns: minmax(0, 1fr); }
  .toolbar { gap: 8px; }
  .toolbar select { flex: 1 1 140px; min-width: 0; }
  select, input[type=text], input[type=password], input[type=number], .form input, .form select, textarea { font-size: 16px; } /* stops iOS zooming in on focus */
  select, .btn, .seg button, .pickbtn { min-height: 40px; }
  .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .seg button { white-space: nowrap; }

  /* Tables: tighter, and the first column stays put while the rest scrolls */
  th, td { padding: 7px 8px; }
  table { font-size: 13.5px; }
  .tablewrap { -webkit-overflow-scrolling: touch; }
  /* Pin the name column when a table leads with managers, so it stays put while the numbers scroll */
  .tablewrap table:has(tbody tr > td:first-child .chip) tr > :first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); box-shadow: 1px 0 0 var(--grid); }
  .tablewrap table:has(tbody tr > td:first-child .chip) thead tr > :first-child { z-index: 2; background: var(--surface-2); }
  .matrix td { min-width: 44px; padding: 6px 4px; }
  .chip .team { display: none; }
  .matchups, .awards { grid-template-columns: minmax(0, 1fr); }
  #odds { position: static; }
}

/* ---- Round 2: clubhouse, forms, badges */
nav.side .navh { margin: 14px 10px 4px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
nav.side .foot a { color: #fff; text-decoration: underline; }
#acct { margin-bottom: 6px; color: var(--side-ink); }
.stack > * + * { margin-top: 12px; }
.btn { font: inherit; font-size: 14px; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--ink); cursor: pointer; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--ink-2); margin: 0 0 10px; flex: 1; min-width: 160px; }
.form input, .form select { font: inherit; font-size: 14px; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--ink); }
.form .row, .row.form { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.form.cmt input { flex: 1; min-width: 180px; }
.msg { font-size: 13px; }
.listing .lhead, .card .lhead { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.listing details { margin: 10px 0; }
.listing summary { cursor: pointer; color: var(--accent-ink); font-weight: 600; margin-bottom: 8px; }
.comments { margin-top: 10px; }
.cmt { padding: 6px 0; border-top: 1px solid var(--grid); font-size: 14px; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { display: inline-block; padding: 3px 9px; border-radius: 99px; font-size: 12px; background: var(--surface-2); border: 1px solid color-mix(in oklab, var(--gold) 45%, transparent); }
.pickopt { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 4px; border-radius: 8px; cursor: pointer; }
.pickopt:has(input:checked) { background: color-mix(in oklab, var(--accent) 14%, transparent); }
.pickopt.won { box-shadow: inset 3px 0 0 var(--gold); }
.pickopt input { accent-color: var(--accent); }
.card.rival { display: block; color: var(--ink); border-left: 4px solid var(--gold); }
.card.rival .t { font-weight: 700; color: var(--accent-ink); }
.card.rival:hover { text-decoration: none; border-color: var(--accent); }

/* Live page */
.pill.live { background: color-mix(in oklab, var(--good) 22%, transparent); color: var(--good); font-weight: 650; }
.ticker { max-height: 420px; overflow: auto; }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { padding: 6px 0; border-bottom: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.feed li:last-child { border-bottom: 0; }
.feed .who { margin-left: auto; color: var(--ink-2); }
.small { font-size: 12px; }
.pb { display: inline-block; min-width: 26px; text-align: center; padding: 0 4px; border-radius: 4px; font-size: 11px; font-weight: 650; color: #0b0b0b; }
.live-score { display: flex; flex-direction: column; align-items: flex-end; white-space: nowrap; line-height: 1.2; }

/* All-play, what-if lab, team breakdown */
.grid.two { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid.machine { grid-template-columns: minmax(340px, 1.2fr) minmax(280px, 1fr); align-items: start; }
@media (max-width: 860px) { .grid.machine { grid-template-columns: minmax(0, 1fr); } }
ul.plain { list-style: none; margin: 0; padding: 0; }
ul.plain li { padding: 5px 0; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.matrix.allplay td { min-width: 38px; font-variant-numeric: tabular-nums; position: relative; }
.matrix .odd { font-size: 9px; position: absolute; top: 2px; right: 3px; }
#games .card + .card { margin-top: 10px; }
.pickrow { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.pickbtn { flex: 1; font: inherit; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--ink); cursor: pointer; text-align: center; }
.pickbtn.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 650; }
tr.cutline td { border-bottom: 2px solid var(--gold); }
table.lineup tr { cursor: pointer; }
table.lineup tr.sel td { background: color-mix(in oklab, var(--accent) 18%, transparent); }
table.lineup tr.changed td:nth-child(2) { font-weight: 650; }
table.lineup tr.can td { background: color-mix(in oklab, var(--good) 14%, transparent); }
table.lineup tr.cant { opacity: .45; cursor: not-allowed; }
.result .big { font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; margin: 4px 0; }
#odds { position: sticky; top: 12px; }
@media (max-width: 860px) { #odds { position: static; } }

/* ---- Gridiron theme: varsity type, a football-field hero, scoreboard numbers */
@font-face { font-family: 'Oswald'; src: url(../fonts/oswald.woff2) format('woff2'); font-weight: 400 700; font-display: swap; }
@font-face { font-family: 'Graduate'; src: url(../fonts/graduate.woff2) format('woff2'); font-weight: 400; font-display: swap; }
:root {
  --display: 'Oswald', 'Arial Narrow', system-ui, sans-serif;
  --varsity: 'Graduate', Georgia, serif;
  --football: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 22'%3E%3Cpath d='M2 11C8 1 32 1 38 11C32 21 8 21 2 11Z' fill='%23c5a253'/%3E%3Cpath d='M8 6.2c1 3 1 6.6 0 9.6M32 6.2c-1 3-1 6.6 0 9.6' stroke='%23fff' stroke-width='1.4' fill='none'/%3E%3Cpath d='M14 11h12M16.5 8.6v4.8M20 8.6v4.8M23.5 8.6v4.8' stroke='%23fff' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
}
h1, h2, h3, th, .tb-title, .tile .label, .tile .value, .matchup .tag, .matchup .score, .award .t, .report .headline, nav.side .navh, .seg button, .pill, .result .big, .live-score, .sb-tot { font-family: var(--display); }
h1 { font-size: 30px; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; line-height: 1.1; padding-bottom: 14px; }
h1::after { width: 34px; height: 19px; bottom: -6px; border-radius: 0; background: var(--football) center / contain no-repeat; }
h2 { display: flex; align-items: center; gap: 12px; font-size: 18px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; }
h2::after { content: ''; flex: 1; border-top: 2px dashed color-mix(in oklab, var(--gold) 50%, transparent); }
h3 { font-weight: 500; letter-spacing: .02em; }
th { font-size: 12.5px; font-weight: 500; text-transform: uppercase; letter-spacing: .05em; }
.seg button { letter-spacing: .03em; }
.pill { letter-spacing: .03em; }
.sub { max-width: 80ch; }

/* Sidebar: chalk yard lines and a varsity wordmark */
nav.side { background-image: repeating-linear-gradient(0deg, transparent 0 58px, rgba(255,255,255,.035) 58px 60px); }
nav.side .brand > span:last-child { font-family: var(--varsity); font-weight: 400; font-size: 20px; letter-spacing: .02em; color: #e3c47a; }
nav.side .brand small { font-family: var(--display); font-size: 11.5px; letter-spacing: .16em; }
nav.side .navh { font-size: 12px; letter-spacing: .14em; }

/* Home hero: a navy field with giraffe end zones */
.hero.field { position: relative; display: flex; align-items: center; justify-content: center; min-height: 220px; background: #123a63; border: 3px solid var(--gold); }
.hero.field .ez { position: absolute; top: 0; bottom: 0; width: 9%; background: var(--giraffe) 0 0 / 120px; }
.hero.field .ez.l { left: 0; border-right: 3px solid rgba(255,255,255,.85); }
.hero.field .ez.r { right: 0; border-left: 3px solid rgba(255,255,255,.85); }
.hero.field .turf { position: absolute; inset: 0 9%; display: flex; justify-content: space-evenly; align-items: flex-start; padding-top: 12px; pointer-events: none;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.16) 0 2px, transparent 2px 10%),
    repeating-linear-gradient(90deg, rgba(255,255,255,.035) 0 10%, transparent 10% 20%),
    radial-gradient(ellipse at 50% 50%, #1b528a, #123a63 70%); }
.hero.field .turf::before, .hero.field .turf::after { content: ''; position: absolute; left: 0; right: 0; height: 7px; background: repeating-linear-gradient(90deg, rgba(255,255,255,.18) 0 1.5px, transparent 1.5px 2%); }
.hero.field .turf::before { top: 34%; } .hero.field .turf::after { bottom: 30%; }
.hero.field .turf span { font: 600 22px var(--display); color: rgba(255,255,255,.13); letter-spacing: .06em; width: 0; display: flex; justify-content: center; }
.hero.field .inner { position: relative; z-index: 1; background: none; box-shadow: none; margin: 24px 11%; padding: 0; max-width: none; color: #fff; }
.hero.field .logo { width: 96px; height: 96px; filter: drop-shadow(0 6px 18px rgba(0,0,0,.45)); }
.hero.field .kicker { font: 500 13px var(--display); letter-spacing: .3em; text-transform: uppercase; color: #fff; opacity: .85; }
.hero.field h1 { font: 400 44px/1 var(--varsity); text-transform: none; color: #e3c47a; letter-spacing: .01em; text-shadow: 0 3px 0 #0b2643, 0 6px 22px rgba(0,0,0,.35); padding: 4px 0 0; margin: 0; }
.hero.field h1::after { display: none; }
.hero.field .sub { color: #bcd2ea; margin-top: 8px; }

/* Tiles wear jersey stripes; numbers read like a scoreboard */
.card.tile { border-top: 1px solid var(--border); background-image: linear-gradient(to bottom, var(--gold) 0 4px, transparent 4px 7px, var(--accent) 7px 9px, transparent 9px); padding-top: 20px; }
.tile .label { font-size: 12.5px; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; }
.tile .value { font-size: 30px; font-weight: 600; line-height: 1.15; }
.tile .value .chip { font-family: var(--font); font-size: 18px; font-weight: 650; }

/* Matchups as little scoreboards */
.matchup { border-left: 4px solid var(--accent); }
.matchup .tag { font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .1em; }
.matchup .row + .row { border-top: 1px dashed var(--grid); }
.matchup .score { font-size: 19px; font-weight: 500; white-space: nowrap; }
.matchup .score .muted { font-size: 14px; }
.matchup .row.win .score { color: var(--accent-ink); font-weight: 700; }
.matchup .row.win .score::before { content: ''; display: inline-block; width: 15px; height: 9px; margin-right: 6px; background: var(--football) center / contain no-repeat; vertical-align: 2px; }
.live-score { font-size: 19px; }
.live-score .small { font-family: var(--font); }

.report .headline { font-size: 26px; font-weight: 600; line-height: 1.2; }
.award { border-top: 3px solid var(--gold); }
.award .t { font-size: 13px; font-weight: 500; letter-spacing: .1em; color: var(--accent-2); }

/* Varsity numbers for ranks */
.jno, .jersey { font-family: var(--varsity); }
.jno { font-size: 17px; color: var(--accent-ink); }
.jersey { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 10px 10px 14px 14px; background: #123a63; color: #e3c47a; font-size: 24px; box-shadow: inset 0 -4px 0 var(--gold); }

/* Trophy patches: stitched edges */
.badge { padding: 4px 11px; font-weight: 550; background: var(--surface); border: 2px dashed color-mix(in oklab, var(--gold) 65%, transparent); box-shadow: 0 0 0 2px color-mix(in oklab, var(--gold) 18%, transparent); }

/* Loading: a spinning football */
.loading > div::before { content: ''; display: block; width: 64px; height: 36px; margin: 0 auto 14px; background: var(--football) center / contain no-repeat; animation: spiral 1.1s linear infinite; }
@keyframes spiral { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .loading > div::before { animation: none; } }

/* Charts page */
.stackbars { display: grid; gap: 6px; }
.sb-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 52px; align-items: center; gap: 10px; }
.sb-row.me .sb-name { font-weight: 700; }
.sb-bar { display: flex; height: 22px; border-radius: 6px; overflow: hidden; min-width: 2px; }
.sb-bar span { display: grid; place-items: center; font-size: 10.5px; font-weight: 650; color: #0b0b0b; border-right: 1px solid rgba(255,255,255,.6); overflow: hidden; }
.sb-row.me .sb-bar { box-shadow: 0 0 0 2px var(--gold); }
.sb-tot { text-align: right; font-size: 15px; font-variant-numeric: tabular-nums; }
.legend i[class^="pos-"] { vertical-align: -1px; }

/* Scouting reports */
.scout-h { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.scout-h .pill { margin-top: 4px; }
.scout dl { margin: 0; display: grid; grid-template-columns: 84px 1fr; gap: 6px 12px; }
.scout dt { font: 500 12px/1.9 var(--display); text-transform: uppercase; letter-spacing: .08em; color: var(--accent-2); }
.scout dd { margin: 0; }

@media (max-width: 860px) {
  h1 { font-size: 25px; }
  h2 { font-size: 16.5px; }
  .tb-title { font-weight: 500; font-size: 18px; letter-spacing: .04em; text-transform: uppercase; }
  .hero.field { min-height: 170px; }
  .hero.field .ez { width: 7%; }
  .hero.field .turf { inset: 0 7%; }
  .hero.field .turf span, .hero.field .turf::before, .hero.field .turf::after { display: none; }
  .hero.field .inner { margin: 22px 10%; gap: 12px; }
  .hero.field .logo { width: 60px; height: 60px; }
  .hero.field h1 { font-size: 28px; }
  .hero.field .kicker { font-size: 11px; letter-spacing: .2em; }
  .hero.field .sub { font-size: 12.5px; }
  .tile .value { font-size: 26px; }
  .sb-row { grid-template-columns: 96px minmax(0, 1fr) 40px; gap: 6px; }
  .sb-row .chip img, .sb-row .chip .av { display: none; }
  .sb-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .scout dl { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .scout dd { margin-bottom: 6px; }
}

/* Ask the commissioner */
.ask { display: grid; gap: 12px; }
.asklog { display: grid; gap: 10px; }
.asklog:empty { display: none; }
.msg-q { justify-self: end; max-width: 85%; background: var(--accent); color: #fff; padding: 8px 12px; border-radius: 14px 14px 4px 14px; }
.msg-a { justify-self: start; max-width: 92%; background: var(--surface-2); padding: 10px 14px; border-radius: 14px 14px 14px 4px; border-left: 3px solid var(--gold); }
.msg-a p { margin: 0 0 8px; } .msg-a p:last-child { margin: 0; }
.msg-a ul { margin: 0 0 8px; padding-left: 20px; }
.msg-a.pending { color: var(--muted); }
.msg-a.err { border-left-color: var(--bad); color: var(--bad); }
.thinking { display: inline-block; width: 22px; height: 12px; vertical-align: -1px; background: var(--football) center / contain no-repeat; animation: spiral 1.1s linear infinite; }
.askform { display: flex; gap: 8px; align-items: flex-end; }
.askform textarea { flex: 1; font: inherit; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--ink); resize: vertical; min-height: 44px; }
.askform .btn { min-height: 44px; padding: 0 18px; }
.askchips { display: flex; flex-wrap: wrap; gap: 6px; }
.askchips .pill { cursor: pointer; border: 1px solid var(--border); font-family: var(--font); letter-spacing: 0; }
.askchips .pill:hover { border-color: var(--accent); }
@media (max-width: 860px) { .askform textarea { font-size: 16px; } }
