/* The Spread Exchange
   Layout: a night-game trading terminal. Ticker tape of team "stocks" on top,
   then one working surface per page: the board, the ratings, the record.
   Green/red mean only gains and losses. Amber means "the model disagrees with Vegas". */

:root {
  color-scheme: dark;
  /* field-at-night neutrals, biased toward the teal of stadium lights */
  --ink:      #0B1A20;   /* page */
  --panel:    #102329;   /* raised surfaces */
  --panel-2:  #15303A;   /* hover / selected */
  --rule:     #1F3B45;   /* hairlines */
  --text:     #E6EFF1;
  --text-2:   #A3B8BD;
  --text-3:   #6F888E;

  --amber:    #F5B23D;   /* model vs. market disagreement */
  --amber-dim:#8A6A2E;
  --gain:     #3DD69B;
  --loss:     #FF7A72;

  /* chart series (validated for this surface) */
  --series-1:   #3A82D0;   /* every pick */
  --series-2:   #B67C14;   /* edges over 3 */
  --series-3:   #C0509A;   /* edges over 5 */

  --f-display: "Big Shoulders Display", "Arial Narrow", "Roboto Condensed", sans-serif;
  --f-body:    "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --f-data:    "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --step--1: 0.8125rem;
  --step-0:  0.9375rem;
  --step-1:  1.125rem;
  --step-2:  1.5rem;
  --step-3:  2.25rem;
  --step-4:  3.5rem;
  --radius:  6px;
  --gutter:  clamp(16px, 3vw, 32px);
}

* { box-sizing: border-box; }
html { background: var(--ink); }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--f-body);
  font-size: var(--step-0);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; border-radius: 3px; }
.num { font-family: var(--f-data); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.muted { color: var(--text-3); }
.gain { color: var(--gain); }
.loss { color: var(--loss); }
.flat { color: var(--text-3); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------------------------------------------------- ticker tape */
.tape {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  background: #071216;
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
  font-family: var(--f-data);
  font-size: var(--step--1);
  white-space: nowrap;
}
.tape-track { display: inline-flex; gap: 28px; padding: 7px 0 7px 28px; animation: tape 140s linear infinite; }
.tape:hover .tape-track, .tape:focus-within .tape-track { animation-play-state: paused; }
.tape-item { display: inline-flex; gap: 8px; align-items: baseline; text-decoration: none; }
.tape-item b { font-weight: 600; color: var(--text); }
.tape-item span:nth-child(2) { color: var(--text-2); }
@keyframes tape { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .tape { overflow-x: auto; }
  .tape-track { animation: none; }
}

/* ---------------------------------------------------------------- header */
.wrap { max-width: 1240px; margin: 0 auto; padding-inline: var(--gutter); }
.masthead {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px;
  padding-block: 22px 18px;
  border-bottom: 1px solid var(--rule);
}
.brand {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: var(--step-3);
  line-height: 0.9;
  letter-spacing: 0.01em;
  text-decoration: none;
  display: flex; align-items: baseline; gap: 10px;
}
.brand-mark { width: 1.35em; height: 0.68em; flex: none; align-self: center; color: var(--amber); }
.nav { display: flex; flex-wrap: wrap; gap: 4px; }
.nav a {
  text-decoration: none; color: var(--text-2);
  padding: 6px 12px; border-radius: var(--radius);
  font-weight: 500;
}
.nav a:hover { color: var(--text); background: var(--panel); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--amber); }
.status { margin-left: auto; color: var(--text-3); font-size: var(--step--1); display: flex; gap: 14px; align-items: center; }
.status .live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gain); display: inline-block; margin-right: 6px; }

/* ----------------------------------------------------------- page heads */
main { padding-block: 28px 64px; }
.page-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 32px; margin-bottom: 24px; }
.page-head h1 {
  font-family: var(--f-display); font-weight: 800;
  font-size: var(--step-4); line-height: 0.92; margin: 0;
  text-wrap: balance;
}
.page-head p { margin: 8px 0 0; color: var(--text-2); max-width: 60ch; }
h2 {
  font-family: var(--f-display); font-weight: 700;
  font-size: var(--step-2); line-height: 1.1; margin: 0 0 12px;
}
main section { margin-top: 44px; }
main .page-head + section, main .page-head + .movers { margin-top: 0; }

/* --------------------------------------------------- the spread ladder */
/* A number line of the expected margin: away team's end on the left, home's on
   the right. White tick = Vegas, amber dot = model. Drawn in HTML so it scales cleanly. */
.ladder { display: block; width: 100%; padding-top: 6px; }
.lad-track { position: relative; display: block; height: 14px; }
.lad-track::before { content: ""; position: absolute; left: 4%; right: 4%; top: 6px; height: 2px; background: var(--rule); }
.lad-zero { position: absolute; top: 0; height: 14px; border-left: 1px dashed var(--text-3); }
.lad-gap { position: absolute; top: 5px; height: 4px; border-radius: 2px; background: var(--amber); }
.lad-gap.hold { background: var(--amber-dim); }
.lad-vegas { position: absolute; top: 0; width: 2px; height: 14px; margin-left: -1px; background: var(--text); }
.lad-model { position: absolute; top: 1px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 2px var(--ink); }
.lad-model.hold { background: var(--amber-dim); }
.lad-ends { display: flex; justify-content: space-between; padding: 2px 4% 0; font-family: var(--f-data); font-size: 10px; color: var(--text-3); }
.ladder.big .lad-track { height: 18px; }
.ladder.big .lad-track::before { top: 8px; }
.ladder.big .lad-gap { top: 7px; } .ladder.big .lad-vegas, .ladder.big .lad-zero { height: 18px; } .ladder.big .lad-model { top: 3px; }

/* -------------------------------------------- biggest disagreements */
.spotlight { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.quote-lines dd { white-space: nowrap; }
.quote {
  background: var(--panel); border: 1px solid var(--rule); border-radius: 10px;
  padding: 16px 18px 12px; display: grid; gap: 10px; min-width: 0;
}
.quote-match { font-family: var(--f-display); font-weight: 700; font-size: var(--step-2); line-height: 1; }
.quote-match .at { color: var(--text-3); font-weight: 500; margin: 0 6px; }
.quote-when { color: var(--text-3); font-size: var(--step--1); }
.quote-lines { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.quote-lines dt { color: var(--text-3); font-size: var(--step--1); }
.quote-lines dd { margin: 0; font-family: var(--f-data); font-size: var(--step-1); font-variant-numeric: tabular-nums; }
.quote-lines .edge dd { color: var(--amber); }


/* ----------------------------------------------------------- controls */
.controls { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin: 0 0 14px; }
.controls label { color: var(--text-3); font-size: var(--step--1); display: flex; align-items: center; gap: 8px; }
.field {
  background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 7px 10px; min-width: 0;
}
input.field { width: 200px; max-width: 100%; }
.seg { display: inline-flex; border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.seg button { background: transparent; border: 0; padding: 7px 12px; cursor: pointer; color: var(--text-2); }
.seg button + button { border-left: 1px solid var(--rule); }
.seg button[aria-pressed="true"] { background: var(--panel-2); color: var(--text); }
.count { margin-left: auto; color: var(--text-3); font-size: var(--step--1); }

/* -------------------------------------------------------------- board */
.board { border-top: 1px solid var(--rule); }
.day {
  font-family: var(--f-display); font-weight: 700; font-size: var(--step-1);
  color: var(--text-2); padding: 18px 0 6px; border-bottom: 1px solid var(--rule);
}
.game {
  display: grid;
  grid-template-columns: 70px minmax(160px, 1.4fr) 100px 92px minmax(130px, 1.1fr) 176px 128px;
  gap: 14px; align-items: center;
  padding: 10px 8px; border-bottom: 1px solid var(--rule);
  cursor: pointer;
}
.game:hover, .game[aria-expanded="true"] { background: var(--panel); }
.board-head {
  display: grid;
  grid-template-columns: 70px minmax(160px, 1.4fr) 100px 92px minmax(130px, 1.1fr) 176px 128px;
  gap: 14px; padding: 8px; color: var(--text-3); font-size: var(--step--1);
}
.time { color: var(--text-3); font-size: var(--step--1); }
.matchup { min-width: 0; }
.team { display: flex; align-items: center; gap: 8px; min-width: 0; }
.team + .team { margin-top: 2px; }
.swatch { width: 9px; height: 9px; border-radius: 2px; flex: none; background: var(--text-3); box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.abbr { font-family: var(--f-data); font-weight: 600; width: 4.6ch; flex: none; }
.tname { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag { font-size: 11px; color: var(--text-3); border: 1px solid var(--rule); border-radius: 4px; padding: 0 5px; margin-left: 4px; }
.line { font-family: var(--f-data); font-variant-numeric: tabular-nums; }
.line small { display: block; color: var(--text-3); font-family: var(--f-body); font-size: 11px; }
.edge-cell { font-family: var(--f-data); }
.signal {
  display: inline-block; font-family: var(--f-body); font-size: 11px; font-weight: 600;
  padding: 1px 7px; border-radius: 999px; margin-top: 3px; letter-spacing: 0.02em;
}
.signal.top { background: var(--amber); color: var(--ink); }
.signal.hold { border: 1px solid var(--rule); color: var(--text-3); }
.signal.skip { border: 1px dashed var(--text-3); color: var(--text-2); }
.pick { font-weight: 600; }
.final { font-family: var(--f-data); color: var(--text-2); }
.detail {
  grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 18px; padding: 8px 0 6px; cursor: default;
}
.detail h3 { margin: 0 0 4px; font-size: var(--step--1); color: var(--text-3); font-weight: 500; }
.detail p { margin: 0; }
.detail[hidden] { display: none; }
.c-total small { display: block; font-size: 11px; }
.empty { padding: 32px 8px; color: var(--text-2); }

/* ------------------------------------------------------------ ratings */
.movers { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.mover-list { background: var(--panel); border: 1px solid var(--rule); border-radius: 10px; padding: 14px 16px; }
.mover-list h2 { font-size: var(--step-1); margin-bottom: 8px; }
.mover-list ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.mover-list li { display: grid; grid-template-columns: 4.6ch 1fr auto auto; gap: 10px; align-items: baseline; }
.table-wrap { overflow-x: auto; border-top: 1px solid var(--rule); }
table { border-collapse: collapse; width: 100%; min-width: 760px; }
th, td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--rule); white-space: nowrap; }
th { color: var(--text-3); font-weight: 500; font-size: var(--step--1); }
th button { background: none; border: 0; padding: 0; cursor: pointer; color: inherit; }
th button[aria-sort] { color: var(--text); }
td.r, th.r { text-align: right; }
tbody tr:hover { background: var(--panel); }
.rank { font-family: var(--f-data); width: 3ch; display: inline-block; text-align: right; }
.delta { font-size: 11px; margin-left: 6px; }
.spark { width: 96px; height: 24px; display: block; overflow: visible; }
.spark polyline { fill: none; stroke: var(--text-2); stroke-width: 1.5; stroke-linejoin: round; }
.spark circle { stroke: var(--ink); stroke-width: 1.5; }
.rating { font-family: var(--f-data); font-weight: 600; font-size: var(--step-1); }
.bar { display: inline-block; height: 6px; border-radius: 0 3px 3px 0; vertical-align: middle; margin-left: 8px; }

/* ------------------------------------------------------------- record */
.ledger { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0; border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; }
.ledger > div { padding: 14px 16px; background: var(--panel); }
.ledger > div + div { border-left: 1px solid var(--rule); }
.ledger dt { color: var(--text-3); font-size: var(--step--1); }
.ledger dd { margin: 2px 0 0; font-family: var(--f-data); font-size: var(--step-2); font-variant-numeric: tabular-nums; }
.ledger dd small { font-size: var(--step--1); color: var(--text-2); margin-left: 8px; }
.note { color: var(--text-3); font-size: var(--step--1); max-width: 72ch; margin: 10px 0 0; }

.chart { position: relative; background: var(--panel); border: 1px solid var(--rule); border-radius: 10px; padding: 14px 10px 8px; }
.chart svg { display: block; max-width: 100%; height: auto; overflow: visible; }
.chart .grid line { stroke: var(--rule); stroke-width: 1; }
.chart .grid .zero { stroke: var(--text-3); }
.chart .tick { fill: var(--text-3); font-family: var(--f-data); font-size: 11px; }
.chart path.series { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart path.series.off { stroke-width: 1.5; opacity: 0.45; }
.chart path.series.on { stroke-width: 2.5; }
.chart path.s-0 { stroke: var(--series-1); } .chart path.s-1 { stroke: var(--series-2); } .chart path.s-2 { stroke: var(--series-3); }
.chart circle.dot { stroke: var(--panel); stroke-width: 2; }
.chart circle.s-0, .legend i.s-0, .tip i.s-0 { fill: var(--series-1); background: var(--series-1); }
.chart circle.s-1, .legend i.s-1, .tip i.s-1 { fill: var(--series-2); background: var(--series-2); }
.chart circle.s-2, .legend i.s-2, .tip i.s-2 { fill: var(--series-3); background: var(--series-3); }
.chart .label.dim { fill: var(--text-3); }
.legend span:not(.on) { color: var(--text-3); }
.tip i.key { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
.chart .label { font-family: var(--f-body); font-size: 12px; fill: var(--text); }
.chart .cross { stroke: var(--text-3); stroke-width: 1; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 6px 6px; font-size: var(--step--1); color: var(--text-2); }
.legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }
.tip {
  position: absolute; pointer-events: none; background: #071216; border: 1px solid var(--rule);
  border-radius: 6px; padding: 8px 10px; font-size: var(--step--1); min-width: 170px;
  box-shadow: 0 6px 20px rgba(0,0,0,.35);
}
.tip b { display: block; margin-bottom: 4px; }
.tip div { display: flex; justify-content: space-between; gap: 14px; }
.wl { font-family: var(--f-data); font-weight: 600; }
.wl.W { color: var(--gain); } .wl.L { color: var(--loss); } .wl.P, .wl.N { color: var(--text-3); }

footer { border-top: 1px solid var(--rule); padding-block: 22px 40px; color: var(--text-3); font-size: var(--step--1); }
footer p { margin: 0 0 6px; max-width: 80ch; }

/* ------------------------------------------------------------- narrow */
@media (max-width: 900px) {
  .board-head { display: none; }
  .game {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "match time"
      "vegas model"
      "ladder ladder"
      "edge total";
    gap: 8px 12px; padding: 12px 4px;
  }
  .game > .time { grid-area: time; text-align: right; }
  .game > .matchup { grid-area: match; }
  .game > .c-vegas { grid-area: vegas; }
  .game > .c-model { grid-area: model; text-align: right; }
  .game > .c-ladder { grid-area: ladder; }
  .game > .edge-cell { grid-area: edge; }
  .game > .c-total { grid-area: total; text-align: right; }
  .status { margin-left: 0; width: 100%; }
  .count { margin-left: 0; }
  .ledger > div + div { border-left: 0; border-top: 1px solid var(--rule); }
}
@media (max-width: 400px) { .spotlight { grid-template-columns: 1fr; } }
@media (max-width: 520px) {
  .page-head h1 { font-size: var(--step-3); }
  .brand { font-size: var(--step-2); }
  .quote-lines dd { font-size: var(--step-0); }
}

/* ------------------------------------------------------- bet early */
.early {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px 36px;
  background: var(--panel); border: 1px solid var(--rule); border-radius: 10px; padding: 18px 20px;
  margin-bottom: 8px;
}
.early h2 { margin-bottom: 6px; }
.early-text p { margin: 0 0 8px; color: var(--text-2); max-width: 62ch; }
.early-text b { color: var(--text); font-weight: 600; }
.early-chart { display: grid; gap: 10px; align-content: center; min-width: 0; }
.early-cap { margin: 0; color: var(--text-3); font-size: var(--step--1); }
.tbar { display: grid; grid-template-columns: 11.5em minmax(60px, 1fr) 4.2em; grid-template-areas: "label track val" ". sub sub"; gap: 2px 10px; align-items: center; }
.tbar-label { grid-area: label; font-size: var(--step--1); color: var(--text-2); }
.tbar-track { grid-area: track; position: relative; height: 14px; background: var(--ink); border-radius: 0 4px 4px 0; }
.tbar-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 0 4px 4px 0; }
.tbar-fill.open { background: var(--amber); }
.tbar-fill.close { background: var(--text-3); }
.tbar-be { position: absolute; top: -4px; bottom: -4px; width: 0; border-left: 2px dashed var(--text); }
.tbar-val { grid-area: val; text-align: right; font-weight: 600; }
.tbar-sub { grid-area: sub; font-size: 11px; }
.be-cap { display: flex; align-items: center; gap: 8px; }
.be-key { display: inline-block; width: 0; height: 12px; border-left: 2px dashed var(--text); }
.moved { display: inline-block; font-size: 11px; margin: 3px 0 0 6px; padding: 0 6px; border-radius: 999px; white-space: nowrap; }
.moved.away { border: 1px dashed var(--text-3); color: var(--text-2); }
.moved.toward { color: var(--amber); border: 1px solid var(--amber-dim); }
.check { color: var(--text-2) !important; cursor: pointer; }
.check input { accent-color: var(--amber); width: 15px; height: 15px; }
@media (max-width: 900px) { .early { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .tbar { grid-template-columns: 1fr 4.2em; grid-template-areas: "label val" "track track" "sub sub"; } }

/* ------------------------------------------------------- top plays */
.plays .claim { margin: 0 0 12px; color: var(--text-2); max-width: 70ch; font-size: var(--step-1); line-height: 1.45; }
.plays .claim b { color: var(--amber); font-family: var(--f-data); font-weight: 600; }
.news-warning { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--amber-dim); border-radius: 8px; padding: 10px 14px; margin: 0 0 14px; max-width: 900px; }
.news-warning p { margin: 0; color: var(--text-2); }
.news-warning b { color: var(--text); }
.warn-mark, .news-flag {
  flex: none; display: inline-grid; place-items: center; border-radius: 50%;
  border: 1.5px solid var(--amber); color: var(--amber); font-weight: 700; font-family: var(--f-body);
}
.warn-mark { width: 22px; height: 22px; font-size: 13px; margin-top: 1px; }
.news-flag { width: 17px; height: 17px; font-size: 11px; margin-left: 6px; vertical-align: middle; cursor: help; }
.play-pick { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.play-team { font-family: var(--f-display); font-weight: 800; font-size: var(--step-2); color: var(--amber); line-height: 1; }
.play-edge { color: var(--text-2); font-size: var(--step--1); }
.play-status { margin: 0; font-size: var(--step--1); color: var(--text-3); }
.play-status.toward { color: var(--text-2); }
.skipped { color: var(--text-3); font-size: var(--step--1); margin: 12px 0 0; max-width: 90ch; }
.skipped b { color: var(--text-2); font-weight: 600; }
.detail-warn h3 { color: var(--amber) !important; }
main .plays + .early { margin-top: 28px; }

/* --------------------------------------------------------- team pages */
.tlink { color: inherit; text-decoration: underline; text-decoration-color: var(--text-3); text-underline-offset: 3px; }
.tlink:hover { color: var(--amber); text-decoration-color: var(--amber); }
.tname .tlink { text-decoration-color: transparent; }
.tname .tlink:hover { text-decoration-color: var(--amber); }
.team-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 18px 40px; margin-bottom: 18px; }
.team-id { display: flex; align-items: center; gap: 16px; min-width: 0; }
.team-chip {
  flex: none; display: grid; place-items: center; min-width: 64px; height: 64px; padding: 0 8px; border-radius: 12px;
  background: var(--team, var(--panel-2)); color: #fff; font-family: var(--f-data); font-weight: 600; font-size: var(--step-1);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); text-shadow: 0 1px 2px rgba(0,0,0,.45);
}
.team-id h1 { font-family: var(--f-display); font-weight: 800; font-size: var(--step-4); line-height: 0.92; margin: 0; text-wrap: balance; }
.team-meta { margin: 6px 0 0; color: var(--text-2); }
.team-stats { display: flex; flex-wrap: wrap; gap: 10px 32px; margin: 0; }
.team-stats dt { color: var(--text-3); font-size: var(--step--1); }
.team-stats dd { margin: 0; font-size: var(--step-3); font-family: var(--f-data); line-height: 1.1; }
.team-stats dd small { display: block; font-size: var(--step--1); color: var(--text-3); font-family: var(--f-body); }
.team-stats dd small.gain { color: var(--gain); } .team-stats dd small.loss { color: var(--loss); }

.profile { display: grid; border-top: 1px solid var(--rule); }
.prow { display: grid; grid-template-columns: minmax(0, 1.25fr) 110px minmax(160px, 1.6fr) 110px; gap: 6px 18px; align-items: center; padding: 10px 4px; border-bottom: 1px solid var(--rule); }
.profile.compare .prow { grid-template-columns: minmax(0, 1.1fr) 130px minmax(160px, 1.5fr) 130px; }
.plabel { font-weight: 500; min-width: 0; }
.plabel small { display: block; color: var(--text-3); font-size: 12px; font-weight: 400; line-height: 1.35; }
.pval { font-size: var(--step-1); text-align: right; }
.pval small { display: block; font-size: 11px; color: var(--text-3); }
.pval.better { color: var(--text); font-weight: 600; }
.profile.compare .pval:not(.better) { color: var(--text-2); }
.prank { color: var(--text-2); font-size: var(--step--1); }
.pstrip { position: relative; padding-top: 14px; }
.pend { position: absolute; top: 0; font-size: 10px; color: var(--text-3); }
.pend.l { left: 0; } .pend.r { right: 0; }
.ptrack { position: relative; display: block; height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--ink), var(--panel-2)); border: 1px solid var(--rule); }
.pmid { position: absolute; left: 50%; top: -4px; bottom: -4px; border-left: 1px dashed var(--text-3); }
.pdot { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; border: 2px solid var(--ink); }
.pdot.s-0, i.key.s-0 { background: var(--series-1); }
.pdot.s-1, i.key.s-1 { background: var(--series-2); }
i.key { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }

.proj { display: flex; flex-wrap: wrap; gap: 18px 48px; align-items: center; background: var(--panel); border: 1px solid var(--rule); border-radius: 10px; padding: 18px 22px; margin: 4px 0 10px; }
.proj-score { display: grid; gap: 6px; }
.proj-score > div { display: flex; align-items: baseline; justify-content: space-between; gap: 28px; }
.proj-team { font-family: var(--f-display); font-weight: 700; font-size: var(--step-2); }
.proj-pts { font-size: var(--step-3); font-weight: 600; }
.proj-lines { display: flex; flex-wrap: wrap; gap: 10px 36px; margin: 0; }
.proj-lines dt { color: var(--text-3); font-size: var(--step--1); }
.proj-lines dd { margin: 0; font-size: var(--step-1); }

.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 4px; max-width: 760px; }
.steps li { counter-increment: step; position: relative; padding: 14px 0 14px 56px; border-top: 1px solid var(--rule); }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 12px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  border: 1.5px solid var(--amber); color: var(--amber); font-family: var(--f-data); font-weight: 600; }
.steps h2 { font-size: var(--step-2); margin-bottom: 6px; }
.steps p { margin: 0 0 8px; color: var(--text-2); max-width: 66ch; }
.eq { font-family: var(--f-data); font-size: var(--step--1); color: var(--text) !important; background: var(--panel); border: 1px solid var(--rule); border-radius: 6px; padding: 10px 14px; max-width: 100%; }
.blind ul { margin: 0 0 10px; padding-left: 20px; color: var(--text-2); max-width: 70ch; }
.blind li { margin-bottom: 6px; }
.blind b { color: var(--text); }
.chart path.s-0 { stroke: var(--series-1); } .chart path.s-1 { stroke: var(--series-2); }

@media (max-width: 760px) {
  .prow, .profile.compare .prow { grid-template-columns: 1fr auto; grid-template-areas: "label val" "strip strip" "rank rank"; }
  .prow .plabel { grid-area: label; } .prow > .pv-a { grid-area: val; }
  .prow .pstrip { grid-area: strip; } .prow .prank { grid-area: rank; }
  .profile.compare .prow { grid-template-areas: "label label" "a b" "strip strip"; }
  .profile.compare .prow > .pv-a { grid-area: a; text-align: left; }
  .profile.compare .prow > .pv-b { grid-area: b; }
  .team-id h1 { font-size: var(--step-3); }
}

/* ------------------------------------------------------------- phones */
@media (max-width: 640px) {
  .masthead { gap: 10px 16px; padding-block: 14px 12px; }
  .nav { flex-wrap: nowrap; overflow-x: auto; width: 100%; margin-inline: -4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; padding: 9px 12px; }
  .status { font-size: 12px; gap: 10px; }
  main { padding-block: 20px 48px; }
  .page-head h1, .team-id h1 { font-size: 2.1rem; }
  h2 { font-size: 1.3rem; }
  section + section, main section { margin-top: 32px; }
  /* thumb-sized controls; 16px text stops iPhone from zooming into form fields */
  .field, input.field, select.field { font-size: 16px; min-height: 42px; }
  input.field { width: 100%; }
  .seg button { min-height: 42px; padding: 8px 12px; }
  .seg { max-width: 100%; overflow-x: auto; }
  .controls { gap: 10px; }
  .controls > label { width: 100%; justify-content: space-between; }
  .controls > label .field { flex: 1; }
  .controls > label.check { justify-content: flex-start; }
  /* tables: keep the columns that matter, drop the rest (the full data is a tap away) */
  table { min-width: 0; }
  th, td { padding: 9px 6px; }
  #rtable th:nth-child(3), #rtable td:nth-child(3), #rtable th:nth-child(n+7), #rtable td:nth-child(n+7) { display: none; }
  #rtable .bar, #rtable .abbr, #rtable .delta { display: none; }
  #rtable .spark { width: 64px; }
  #rtable td:nth-child(2) { white-space: normal; }
  #wk-table th:nth-child(4), #wk-table td:nth-child(4), #wk-table th:nth-child(5), #wk-table td:nth-child(5), #wk-table th:nth-child(7), #wk-table td:nth-child(7) { display: none; }
  #hist-table th:nth-child(2), #hist-table td:nth-child(2), #hist-table th:nth-child(3), #hist-table td:nth-child(3),
  #hist-table th:nth-child(n+7), #hist-table td:nth-child(n+7) { display: none; }
  #recent-table th:nth-child(1), #recent-table td:nth-child(1), #recent-table th:nth-child(4), #recent-table td:nth-child(4),
  #recent-table th:nth-child(n+7), #recent-table td:nth-child(n+7) { display: none; }
  #recent-table td:nth-child(2) { white-space: normal; }
  #sched-table th:nth-child(4), #sched-table td:nth-child(4), #sched-table th:nth-child(6), #sched-table td:nth-child(6) { display: none; }
  #sched-table td:nth-child(2) { white-space: normal; }
  .team-stats dd { font-size: 1.6rem; }
  .team-chip { min-width: 52px; height: 52px; font-size: var(--step-0); }
  .proj { padding: 14px 16px; gap: 14px 28px; }
  .proj-team { font-size: 1.2rem; } .proj-pts { font-size: 1.8rem; }
  .ledger dd { font-size: 1.3rem; }
  .steps li { padding-left: 48px; }
  .steps li::before { width: 32px; height: 32px; }
  .tip { min-width: 0; max-width: calc(100% - 20px); }
}
@media (max-width: 480px) {
  #rtable th:nth-child(6), #rtable td:nth-child(6) { display: none; }   /* trend: shown in full on each team page */
}
@media (max-width: 400px) {
  #recent-table th:nth-child(3), #recent-table td:nth-child(3) { display: none; }
}
