/* LineFlip: the X banner as a website. Navy graph paper, one glowing amber line, heavy white type. */
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap;
  src: url("/static/fonts/BarlowCondensed-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap;
  src: url("/static/fonts/BarlowCondensed-Bold.woff2") format("woff2"); }

:root {
  --bg: #0B1018;
  --panel: #111824;
  --rule: #232C3B;
  --grid: rgba(197, 205, 216, 0.05);
  --text: #F2F4F7;
  --sub: #C5CDD8;
  --muted: #9AA4B5;
  --amber: #F5B700;
  --down: #FF7A45;
  --open: #566174;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --num: "Barlow Condensed", "Arial Narrow", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background-color: var(--bg); color: var(--text);
  font: 400 1.0625rem/1.6 var(--sans);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px),
                    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 56px 56px;
}
a { color: var(--text); text-decoration-color: var(--amber); text-underline-offset: 3px; text-decoration-thickness: 2px; }
a:hover { color: var(--amber); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 12px; z-index: 10; background: var(--amber); color: var(--bg); padding: 8px 12px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
h1, h2, h3 { font-family: var(--sans); line-height: 1.1; letter-spacing: -0.02em; margin: 0; }
h1 { font-weight: 900; font-size: clamp(2.1rem, 4.6vw, 3.4rem); }
h2 { font-weight: 800; font-size: 1.5rem; margin-bottom: 0.9rem; }
p { margin: 0 0 1rem; }
.amber { color: var(--amber); }
.lede { color: var(--sub); font-size: 1.15rem; max-width: 62ch; margin-top: 1rem; }
.note { color: var(--muted); max-width: 68ch; }

/* header: the banner's lockup */
.top { border-bottom: 1px solid var(--rule); background: rgba(11, 16, 24, 0.86); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; flex-wrap: wrap; }
.lockup { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.lockup span { font-weight: 900; font-size: 1.45rem; letter-spacing: -0.03em; }
nav { display: flex; flex-wrap: wrap; gap: 4px 22px; font-size: 0.95rem; font-weight: 500; }
nav a { text-decoration: none; color: var(--sub); padding: 6px 0; }
nav a[aria-current="page"] { color: var(--text); box-shadow: inset 0 -2px 0 var(--amber); }
nav .x { color: var(--amber); }

/* hero */
.hero { border-bottom: 1px solid var(--rule); padding: 56px 0 48px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(2rem, 4.1vw, 3.5rem); line-height: 1.06; }
.hero h1 span { white-space: nowrap; }
/* the banner's headline: heavy caps, one amber word, a short amber rule under it */
.banner-h1 { text-transform: uppercase; letter-spacing: -0.015em; }
.banner-h1::after { content: ""; display: block; width: 88px; height: 5px; border-radius: 3px; background: var(--amber); margin-top: 22px; }
.tagline { color: var(--sub); font-weight: 600; font-size: 1.05rem; margin: 18px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--down); display: inline-block; }
.hero .lede { border-top: 1px solid var(--rule); padding-top: 1.1rem; margin-top: 1.4rem; font-size: 1.05rem; color: var(--muted); }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart-hero { max-width: 760px; }
.hero-move { display: grid; gap: 2px; text-decoration: none; margin-top: 1.2rem; padding: 14px 0 0; }
.hm-game { font-weight: 800; font-size: 1.15rem; }
.hm-what { color: var(--muted); font-size: 0.95rem; }
.hm-nums { display: inline-flex; align-items: center; gap: 12px; font: 700 2.6rem/1 var(--num); color: var(--amber); margin-top: 6px; }
.hero-move:hover .hm-game { color: var(--amber); }

.arrow { width: 0.8em; height: 0.5em; color: var(--sub); flex: none; }

/* the hero line draws itself once, like the banner coming to life */
.draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.6s cubic-bezier(.6, 0, .25, 1) .2s forwards; }
.tip { opacity: 0; animation: tip .35s ease-out 1.7s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes tip { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .draw { animation: none; stroke-dashoffset: 0; }
  .tip { animation: none; opacity: 1; }
}

/* chart parts */
.gridline { stroke: rgba(197, 205, 216, 0.08); stroke-width: 1; }
.openline { stroke: var(--open); stroke-dasharray: 14 10; stroke-linecap: round; }
.openline-hero { stroke-dasharray: 22 18; }
.keyline { stroke: var(--amber); stroke-width: 1.5; stroke-dasharray: 6 7; opacity: 0.55; }
.tick { fill: var(--muted); font: 600 19px var(--num); }
.keylabel { fill: var(--amber); font: 600 19px var(--num); }
.hero-label { fill: var(--muted); font: 700 20px var(--sans); letter-spacing: 0.04em; }
.hero-now { fill: var(--amber); }
@media (max-width: 600px) { .tick, .keylabel { font-size: 27px; } }

/* sections */
.block { padding-top: 44px; padding-bottom: 8px; }   /* top/bottom only: .wrap owns the side gutters */
.page { padding-top: 28px; padding-bottom: 40px; }
.crumbs { color: var(--muted); font-size: 0.9rem; margin-bottom: 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.crumbs a { color: var(--sub); }

/* the ledger: one row per qualifying line, biggest first */
.ledger { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.ledger li { border-bottom: 1px solid var(--rule); }
.ledger a { display: grid; grid-template-columns: 2.2fr 1.5fr 1.3fr 1.8fr 1.1fr; gap: 6px 18px; align-items: center;
  padding: 14px 10px; text-decoration: none; }
.ledger a:hover { background: var(--panel); color: var(--text); }
.ledger a:hover .l-game { color: var(--amber); }
.l-game { font-weight: 700; }
.tag { display: inline-block; font-size: 0.72rem; font-weight: 700; color: var(--bg); background: var(--sub);
  border-radius: 3px; padding: 1px 5px; margin-right: 8px; vertical-align: 2px; }
.l-mkt, .l-when { color: var(--sub); font-size: 0.95rem; }
.l-nums { display: inline-flex; align-items: center; gap: 8px; font: 700 1.6rem/1 var(--num); color: var(--amber); }
.l-chg { color: var(--muted); font-size: 0.92rem; }
.held { font: 500 0.9rem var(--sans); color: var(--muted); }
.l-res { font-size: 0.9rem; font-weight: 600; }
.l-res.with { color: var(--text); }
.l-res.against, .l-res.push { color: var(--muted); }

/* where they closed */
.closed-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.closed { display: grid; gap: 4px; text-decoration: none; border-left: 3px solid var(--amber); padding: 4px 0 4px 18px; }
.closed-who { color: var(--sub); font-weight: 600; }
.closed-num { font: 700 3.4rem/1 var(--num); color: var(--amber); }
.closed-what { color: var(--muted); font-size: 0.95rem; max-width: 46ch; }
.closed:hover .closed-who { color: var(--amber); }

.track { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; margin: 0 0 1.2rem; }
.track dt { font-weight: 800; font-size: 1.1rem; margin-bottom: 4px; }
.track dd { margin: 0; color: var(--muted); }

/* week tally */
.tally { display: flex; gap: 24px; align-items: center; margin: 24px 0 8px; max-width: 760px; }
.tally-num { font: 700 4.4rem/1 var(--num); color: var(--amber); margin: 0; white-space: nowrap; }
.tally p:last-child { color: var(--sub); margin: 0; }

/* game page */
.meta { color: var(--sub); margin-top: 0.8rem; }
.story { max-width: 68ch; margin: 1.4rem 0 0.6rem; }
.story p { margin-bottom: 0.7rem; }
.market { border-top: 1px solid var(--rule); padding: 30px 0 18px; display: grid; grid-template-columns: minmax(240px, 1fr) 2fr; gap: 12px 40px; }
.market.moved { border-top: 2px solid var(--amber); }
.m-head h2 { font-size: 1.2rem; margin-bottom: 0.6rem; }
.m-nums { display: flex; align-items: flex-end; gap: 12px; font: 700 3rem/1 var(--num); margin: 0 0 0.5rem; }
.m-nums .arrow { margin-bottom: 0.45em; }
.m-n { display: grid; gap: 2px; color: var(--sub); }
.m-n.now { color: var(--amber); }
.m-k { font: 500 0.82rem/1 var(--sans); color: var(--muted); }
.m-chg { color: var(--muted); }
.market figure { margin: 0; }
.market figcaption { color: var(--muted); font-size: 0.85rem; margin-top: 6px; }
.m-res { grid-column: 1 / -1; color: var(--sub); border-left: 3px solid var(--rule); padding-left: 14px; max-width: 72ch; }
.others { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 32px; }
.others li { padding: 5px 0; break-inside: avoid; }

/* how it works */
.prose { max-width: 760px; }
.prose h2 { margin-top: 2.2rem; }
.prose ul { padding-left: 1.2rem; color: var(--sub); }
.prose li { margin-bottom: 0.4rem; }
.defs div { margin-bottom: 0.9rem; }
.defs dt { font-weight: 800; }
.defs dd { margin: 0; color: var(--sub); }
.table-wrap { overflow-x: auto; margin-bottom: 1rem; }
table { border-collapse: collapse; width: 100%; min-width: 420px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--rule); }
thead th { color: var(--muted); font-weight: 600; font-size: 0.9rem; }
td { font: 700 1.25rem var(--num); color: var(--amber); }

/* team pages */
.records { display: flex; flex-wrap: wrap; gap: 20px 56px; margin: 24px 0 8px; }
.rec-num { font: 700 3.6rem/1 var(--num); color: var(--amber); margin: 0; }
.rec-what { color: var(--sub); margin: 4px 0 0; }
table.season { min-width: 640px; }
table.season th[scope="row"] { font-weight: 700; }
table.season td { font: 400 1rem var(--sans); color: var(--sub); }
table.season td.n { font: 700 1.2rem var(--num); color: var(--amber); white-space: nowrap; }
.when, .sub { display: block; color: var(--muted); font-size: 0.85rem; font-weight: 400; }
.none { color: var(--muted); font: 400 0.9rem var(--sans); }
.team-list { list-style: none; padding: 0; margin: 1.2rem 0 0; columns: 3 220px; column-gap: 32px; }
.team-list li { padding: 5px 0; break-inside: avoid; }

/* homepage link to analytics */
.teaser { display: grid; gap: 6px; text-decoration: none; border-left: 3px solid var(--amber); padding: 4px 0 4px 18px; max-width: 72ch; }
.teaser-num { font: 700 3.4rem/1 var(--num); color: var(--amber); }
.teaser-what { color: var(--sub); }
.teaser-link { font-weight: 700; text-decoration: underline; text-decoration-color: var(--amber); text-underline-offset: 3px; text-decoration-thickness: 2px; }
.teaser:hover .teaser-link { color: var(--amber); }

/* analytics */
.explain { max-width: 72ch; }
.explain h2 { font-size: 1.2rem; margin: 1.6rem 0 0.7rem; }
.sport-head { font-size: 2rem; }
.stat { padding: 28px 0 12px; border-top: 1px solid var(--rule); }
.stat h3 { font-weight: 800; font-size: 1.2rem; margin-bottom: 0.5rem; }
.finding { color: var(--text); max-width: 72ch; border-left: 3px solid var(--amber); padding-left: 14px; }
.stat figure { margin: 8px 0 16px; max-width: 820px; }
.stat figcaption { color: var(--muted); font-size: 0.88rem; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.legend { display: inline-flex; align-items: center; gap: 6px; margin-right: 18px; }
table.moves { min-width: 560px; max-width: 820px; }
table.moves th[scope="row"] { font-weight: 500; color: var(--sub); }
table.moves .mv { display: inline-block; min-width: 3ch; font: 700 1.15rem var(--num); color: var(--text); margin-right: 12px; }
table.moves td { font: 600 1.1rem var(--num); color: var(--sub); }
table.moves td.pct { color: var(--amber); }
table.moves tr.thin { opacity: 0.45; }

/* footer */
.foot { border-top: 1px solid var(--rule); margin-top: 48px; padding: 28px 0 40px; color: var(--muted); font-size: 0.9rem; }
.foot .disc { color: var(--sub); max-width: 80ch; }
.foot a { color: var(--sub); }
.small { font-size: 0.85rem; }

@media (max-width: 860px) {
  .hero { padding-top: 32px; }
  .hero-grid { grid-template-columns: 1fr; gap: 20px; }
  .hero-copy { order: -1; }
  .ledger a { grid-template-columns: 1fr auto; padding: 14px 4px; }
  .l-game { grid-column: 1 / -1; }
  .l-nums { justify-self: end; }
  .l-chg { grid-column: 1 / -1; }
  .market { grid-template-columns: 1fr; }
  .tally { flex-direction: column; align-items: flex-start; gap: 8px; }
  .others { columns: 1; }
}
