/* The Tilt (/tilt/): which way every matchup leans (assets/sb-tilt.js). Phone first (most visits are phones). Light and
   dark both come from the site's variables in sb.css, so there are no dark rules here: add one only in sb.css's two
   halves (web/README.md, "Light and dark").

   The five steps, Great to Brutal, are one scale with two ends. A matchup that tilts toward the offense wears the
   site's offense blue; one that tilts toward the defense wears its defense orange; Even is gray. Not green and red:
   on this site's own green and red, about one man in twelve can't tell the two apart (measured: they sit 3 apart for
   red-green colorblind eyes, and blue and orange sit 18 to 22 apart). Color is never the only sign: every step also
   shows its word or a signed percent, and the mark beside it tilts up or down by the step. To change the two ends,
   change --tl-up and --tl-down below; everything else follows. */

.tilt {
  --tl-up: var(--offense);
  --tl-down: var(--defense);
  --tl-great: color-mix(in srgb, var(--tl-up) 38%, var(--surface));
  --tl-good: color-mix(in srgb, var(--tl-up) 16%, var(--surface));
  --tl-even: color-mix(in srgb, var(--muted) 12%, var(--surface));
  --tl-tough: color-mix(in srgb, var(--tl-down) 16%, var(--surface));
  --tl-brutal: color-mix(in srgb, var(--tl-down) 38%, var(--surface));
}
/* a step's own color: its fill (--tl-bg) and the color of its mark (--tl-fg); text on a fill is always the page's ink */
.s-great { --tl-bg: var(--tl-great); --tl-fg: var(--tl-up); }
.s-good { --tl-bg: var(--tl-good); --tl-fg: var(--tl-up); }
.s-even { --tl-bg: var(--tl-even); --tl-fg: var(--muted); }
.s-tough { --tl-bg: var(--tl-tough); --tl-fg: var(--tl-down); }
.s-brutal { --tl-bg: var(--tl-brutal); --tl-fg: var(--tl-down); }

/* The mark: a beam on its pivot, tilted by the step (sb-tilt.js, mark()) */
.tl-mark { flex: none; display: inline-block; vertical-align: -2px; color: var(--tl-fg, var(--muted)); }
.tl-mark path { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.tl-mark circle { fill: var(--ink); }

/* ---------- head ---------- */
.tl-head { padding: 22px 0 14px; }
.tl-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tl-head h1 { font-size: clamp(2.3rem, 7vw, 3.4rem); }
.tl-head .lede { margin: 6px 0 0; color: var(--muted); line-height: 1.5; max-width: 40em; }
.tl-head .lede a { color: var(--ink); font-weight: 600; white-space: nowrap; }
.tl-head .chips { display: flex; gap: 8px; margin: 14px 0 0; }
.tl-head .chips[hidden] { display: none; }   /* .chips sets display */
.tl-head .chips button { height: 40px; min-height: 40px; padding: 0 16px; font-size: .92rem; }

/* The three tabs: a segmented control under the league chips, as on The Line */
.tl-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line); }
.tl-tabs a { display: flex; align-items: center; justify-content: center; min-height: 40px; box-sizing: border-box;
  border: 1.5px solid transparent; border-radius: 10px; color: var(--muted); font: 600 .92rem/1 var(--font-body);
  text-decoration: none; white-space: nowrap; }
.tl-tabs a:hover { color: var(--ink); }
.tl-tabs a[aria-current="page"] { border-color: var(--turf); background: var(--chalk); color: var(--turf); font-weight: 700; }
.tilt a:focus-visible, .tilt button:focus-visible, .tilt select:focus-visible, .tilt input:focus-visible { outline: 2px solid var(--turf); outline-offset: 2px; }

/* ---------- a view's top row: its name, what the numbers run through, and the scoring ---------- */
.tl-bar { display: flex; align-items: center; justify-content: space-between; gap: 6px 12px; margin: 18px 2px 8px; flex-wrap: wrap; }
.tl-bar h2 { font: 700 .95rem/1 var(--font-display); letter-spacing: .14em; text-transform: uppercase; }
.tl-thru { font-size: .8rem; font-weight: 500; color: var(--muted); }
.tl-pick { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; font-size: .8rem; font-weight: 600; color: var(--muted); }
.tl-pick select { min-height: 36px; padding: 0 30px 0 12px; border-radius: 10px; border: 1px solid var(--line); background-color: var(--surface);
  color: var(--ink); font: 600 .88rem/1 var(--font-body); appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 16px) 15px, calc(100% - 11px) 15px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.tl-show { display: flex; flex-wrap: nowrap; gap: 6px; margin: 0 0 10px; overflow-x: auto; scrollbar-width: none; }
.tl-show::-webkit-scrollbar { display: none; }
.tl-show button { flex: none; min-height: 36px; padding: 0 14px; }

/* The key: the five steps in a row, and one line on what a step is */
.tl-key { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.tl-key ul { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; max-width: 520px; margin: 0; padding: 0; list-style: none; }
.tl-key li { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px 5px; border-radius: 8px; background: var(--tl-bg);
  font: 600 .72rem/1 var(--font-body); text-align: center; }
.tl-key li small { font-size: .66rem; font-weight: 500; white-space: nowrap; }
.tl-key p { margin: 8px 2px 0; font-size: .84rem; line-height: 1.45; color: var(--muted); }
.tl-key p b { color: var(--ink); font-weight: 600; }
@media (max-width: 359px) { .tl-key li small { font-size: .6rem; } }
.tl-early { margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; background: var(--warn-bg); color: var(--warn); font-size: .88rem; line-height: 1.45; }

/* ---------- this week: a card a game, both offenses, a chip a position ---------- */
.tl-games { display: grid; gap: 8px; }
@media (min-width: 760px) { .tl-games { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
@media (min-width: 1140px) { .tl-games { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tl-game { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px 12px; min-width: 0; }
.tl-game-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: .76rem; font-weight: 600; color: var(--muted); }
.tl-game-top .when { letter-spacing: .06em; text-transform: uppercase; }
.tl-game-top .on { color: var(--live, var(--loss)); }
.tl-side { margin-top: 9px; }
.tl-side + .tl-side { padding-top: 9px; border-top: 1px solid var(--line); }
.tl-side-top { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; min-width: 0; }
.tl-side-top .nm { display: inline-flex; align-items: center; gap: 8px; font: 700 1.2rem/1 var(--font-display); letter-spacing: .01em; min-width: 0; }
.tl-side-top .nm .badge { flex: none; }
.tl-side-top .vs { font-size: .8rem; color: var(--muted); white-space: nowrap; }
.tl-pts { margin-left: auto; font-size: .78rem; color: var(--muted); white-space: nowrap; }
.tl-pts b { color: var(--ink); font-weight: 600; }
.tl-cells { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 5px; }
.tl-chip { display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 48px; padding: 7px 2px 6px; border-radius: 9px; background: var(--tl-bg);
  border: 1px solid transparent; color: var(--ink); text-decoration: none; min-width: 0; }
a.tl-chip:hover, button.tl-chip:hover { border-color: color-mix(in srgb, var(--tl-fg) 60%, var(--line)); }
.tl-chip .p { font: 600 .68rem/1 var(--font-body); letter-spacing: .06em; }
.tl-chip .v { display: inline-flex; align-items: center; gap: 4px; font: 700 1.02rem/1 var(--font-display); font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 359px) { .tl-chip .v { font-size: .94rem; gap: 2px; } .tl-chip .tl-mark { width: 12px; height: 12px; } }

/* one position, every offense playing, best matchup first */
.tl-rank { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; counter-reset: rank; }
@media (min-width: 760px) { .tl-rank { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; } }
.tl-row { display: grid; grid-template-columns: 22px 66px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 56px; padding: 8px 12px 8px 8px;
  border-radius: 12px; background: var(--surface); border: 1px solid var(--line); color: inherit; text-decoration: none; }
a.tl-row:hover { border-color: color-mix(in srgb, var(--turf) 45%, var(--line)); }
.tl-row::before { counter-increment: rank; content: counter(rank); font: 700 .95rem/1 var(--font-display); color: var(--muted); text-align: center; }
.tl-row .step { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 7px 2px 6px; border-radius: 9px; background: var(--tl-bg);
  font: 600 .72rem/1 var(--font-body); }
.tl-row .who { min-width: 0; }
.tl-row .who b { display: flex; align-items: center; gap: 7px; font: 700 1.15rem/1.1 var(--font-display); }
.tl-row .who b span { font-weight: 600; color: var(--muted); }
.tl-row .who small { display: block; margin-top: 4px; font-size: .78rem; line-height: 1.3; color: var(--muted); }
.tl-row .pct { font: 700 1.45rem/1 var(--font-display); font-variant-numeric: tabular-nums; text-align: right; }
@media (max-width: 359px) { .tl-row { grid-template-columns: 18px 58px minmax(0, 1fr) auto; gap: 8px; } .tl-row .pct { font-size: 1.25rem; } }

/* ---------- every defense: the board ---------- */
.tl-board-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.tl-board { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.tl-board th, .tl-board td { padding: 0; text-align: center; }
.tl-board thead th { position: sticky; top: 0; z-index: 2; background: var(--surface); border-bottom: 1px solid var(--line); }
.tl-board thead th:first-child { width: 92px; }
.tl-board thead button { display: flex; align-items: center; justify-content: center; gap: 4px; width: 100%; min-height: 44px; padding: 0 2px; border: 0; background: none;
  color: var(--muted); font: 700 .82rem/1 var(--font-body); letter-spacing: .06em; cursor: pointer; }
.tl-board thead th:first-child button { justify-content: flex-start; padding-left: 12px; }
.tl-board thead button[aria-pressed="true"] { color: var(--ink); }
.tl-board thead button .dir { width: 8px; font-size: .7rem; }
.tl-board tbody th { text-align: left; border-top: 1px solid var(--line); }
.tl-board tbody td { border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.tl-board tbody tr:first-child th, .tl-board tbody tr:first-child td { border-top: 0; }
.tl-board .tm { display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 6px 0 12px; color: inherit; text-decoration: none;
  font: 700 1.1rem/1 var(--font-display); letter-spacing: .01em; }
.tl-board .tm:hover { color: var(--turf); }
.tl-board .tm .badge { flex: none; }
.tl-board .cell { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 52px; padding: 5px 2px; background: var(--tl-bg);
  color: var(--ink); text-decoration: none; }
.tl-board .cell b { display: inline-flex; align-items: center; gap: 3px; font: 700 1rem/1 var(--font-display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tl-board .cell small { font-size: .68rem; font-weight: 500; white-space: nowrap; }
.tl-board .cell:hover { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--tl-fg) 70%, transparent); }
.tl-board tfoot th, .tl-board tfoot td { border-top: 2px solid var(--line); padding: 9px 2px; font-size: .78rem; color: var(--muted); font-weight: 600; }
.tl-board tfoot th { text-align: left; padding-left: 12px; }
@media (max-width: 399px) { .tl-board thead th:first-child { width: 76px; } .tl-board .tm { padding-left: 9px; gap: 6px; font-size: 1.02rem; }
  .tl-board .cell .tl-mark { display: none; } .tl-board thead th:first-child button { padding-left: 9px; } .tl-board tfoot th { padding-left: 9px; } }
/* a computer has room for the team's whole name and for the two numbers side by side */
.tl-board .tm .full { display: none; }
@media (min-width: 760px) { .tl-board thead th:first-child { width: 230px; } .tl-board .cell { flex-direction: row; gap: 10px; }
  .tl-board .cell small { font-size: .76rem; } .tl-board .tm .full { display: inline; } .tl-board .tm .abbr { display: none; } }
.tl-hint { margin: 0 2px 8px; font-size: .82rem; color: var(--muted); }
.tl-foot-note { margin: 10px 2px 0; font-size: .84rem; line-height: 1.5; color: var(--muted); }
.tl-foot-note b { color: var(--ink); font-weight: 600; }
.tl-foot-note a { color: var(--ink); font-weight: 600; }

/* ---------- one defense ---------- */
.tl-back { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; margin: 12px 0 0; color: var(--muted); font-size: .88rem; font-weight: 600; text-decoration: none; }
.tl-back:hover { color: var(--ink); }
.tl-team-head { display: flex; align-items: center; gap: 12px; margin: 4px 0 0; padding: 14px; border-radius: 12px; background: var(--surface);
  border: 1px solid var(--line); border-left: 5px solid var(--team, var(--turf)); }
.tl-team-head h2 { font-size: clamp(1.5rem, 5.4vw, 2rem); }
.tl-team-head p { margin: 4px 0 0; font-size: .86rem; color: var(--muted); line-height: 1.4; }
.tl-team-head .tl-pick { align-self: flex-start; }
.tl-lean { margin: 8px 0 0; padding: 11px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line);
  border-left: 4px solid var(--turf); font-size: .92rem; line-height: 1.45; }
.tl-lean b { font-weight: 700; }
.tl-sub { margin: 20px 2px 8px; font: 700 .95rem/1 var(--font-display); letter-spacing: .14em; text-transform: uppercase; }
.tl-sub small { margin-left: 4px; font: 500 .8rem/1.3 var(--font-body); letter-spacing: 0; text-transform: none; color: var(--muted); }
.tl-body:focus { outline: none; }   /* focus is moved here after a tap inside the view, for keyboards and screen readers: no ring to draw */
.tl-totals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 760px) { .tl-totals { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; } }
.tl-stat { display: flex; flex-direction: column; gap: 5px; min-width: 0; padding: 10px 12px 11px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.tl-stat .k { font: 600 .7rem/1.1 var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tl-stat .v { font: 700 1.45rem/1 var(--font-display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tl-stat .s { font-size: .78rem; color: var(--muted); }
.tl-poses { display: grid; gap: 8px; }
@media (min-width: 760px) { .tl-poses { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
@media (min-width: 1140px) { .tl-poses.n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .tl-poses.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tl-pos { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; min-width: 0; }
.tl-pos-top { display: flex; align-items: center; gap: 12px; padding: 11px 12px; background: var(--tl-bg); }
.tl-pos-top .nm { font: 700 1.2rem/1.05 var(--font-display); }
.tl-pos-top .nm small { display: block; margin-top: 4px; font: 500 .78rem/1.2 var(--font-body); }
.tl-pos-top .big { margin-left: auto; text-align: right; }
.tl-pos-top .big b { display: inline-flex; align-items: center; gap: 6px; font: 700 1.5rem/1 var(--font-display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tl-pos-top .big small { display: block; margin-top: 4px; font: 600 .76rem/1 var(--font-body); }
.tl-lines { margin: 0; padding: 4px 12px 8px; list-style: none; }
.tl-lines li { display: flex; align-items: baseline; gap: 8px; padding: 7px 0; font-size: .88rem; }
.tl-lines li + li { border-top: 1px solid var(--line); }
.tl-lines .k { color: var(--muted); }
.tl-lines .v { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.tl-lines .r { min-width: 4.6em; text-align: right; font-size: .78rem; color: var(--muted); white-space: nowrap; }
.tl-next { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px 12px; }
.tl-next p { margin: 8px 2px 0; font-size: .86rem; line-height: 1.45; color: var(--muted); }
.tl-next p b { color: var(--ink); font-weight: 600; }
/* its games, newest first: what a position scored against it, beside what that group usually scores */
.tl-log { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.tl-log-wrap { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.tl-log-wrap .tl-log { border: 0; border-radius: 0; }
.tl-log th, .tl-log td { padding: 9px 6px; text-align: right; font-size: .86rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tl-log th:first-child, .tl-log td:first-child { padding-left: 12px; text-align: left; }
.tl-log th:last-child, .tl-log td:last-child { padding-right: 12px; }
.tl-log thead th { font: 600 .7rem/1.1 var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
.tl-log tbody tr + tr td { border-top: 1px solid var(--line); }
.tl-log .opp { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.tl-log .wk { color: var(--muted); font-weight: 500; margin-right: 6px; }
.tl-log .top { text-align: left; white-space: normal; color: var(--muted); font-size: .8rem; }
.tl-log .top a { color: var(--ink); font-weight: 600; }
.tl-log .diff { font-weight: 700; }
.tl-log .diff span { display: inline-block; min-width: 3.3em; padding: 3px 6px; border-radius: 6px; background: var(--tl-bg); }
@media (max-width: 479px) { .tl-log .usual { display: none; } }

/* ---------- start / sit ---------- */
.tl-find { position: relative; margin-top: 14px; }
.tl-find input { width: 100%; box-sizing: border-box; min-height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font: 500 1rem/1 var(--font-body); }
.tl-find input::placeholder { color: var(--muted); }
.tl-find input:disabled { opacity: .6; }
.tl-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 6; margin: 0; padding: 4px; list-style: none; max-height: 320px; overflow-y: auto;
  border-radius: 12px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 10px 28px rgba(0, 0, 0, .22); }
.tl-list button { display: flex; width: 100%; align-items: center; gap: 10px; min-height: 42px; padding: 8px 10px; border: 0; border-radius: 8px; background: none;
  color: var(--ink); font: 500 .95rem/1.2 var(--font-body); text-align: left; cursor: pointer; }
.tl-list button:hover, .tl-list li[aria-selected="true"] button { background: var(--chalk); }
.tl-list small { color: var(--muted); margin-left: auto; white-space: nowrap; }
.tl-list .none { padding: 10px; color: var(--muted); font-size: .9rem; }
.tl-picked { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.tl-picked[hidden] { display: none; }
.tl-picked li { display: inline-flex; align-items: center; gap: 5px; min-height: 36px; padding: 0 4px 0 12px; border-radius: 999px; background: var(--surface);
  border: 1px solid var(--line); font-size: .88rem; font-weight: 600; }
.tl-picked button { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--muted); cursor: pointer; }
.tl-picked button:hover { background: var(--chalk); color: var(--ink); }
.tl-picked li.all { padding: 0; background: none; border-style: dashed; }
.tl-picked li.all button { width: auto; height: 34px; padding: 0 13px; border-radius: 999px; font: 600 .84rem/1 var(--font-body); }
.tl-intro { margin: 12px 2px 4px; color: var(--muted); line-height: 1.5; }
.tl-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.tl-quick button { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font: 600 .86rem/1 var(--font-body); cursor: pointer; }
.tl-quick button:hover { border-color: var(--ink); }
.tl-quick button[disabled] { opacity: .45; cursor: default; }
.tl-quick small { color: var(--muted); font-weight: 500; }
.tl-day { margin: 16px 2px 8px; font: 600 .78rem/1 var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* the call */
.tl-verdict { margin-top: 14px; padding: 14px 14px 13px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--team, var(--turf)); }
.tl-verdict .k { font: 600 .72rem/1 var(--font-body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.tl-verdict h2 { margin-top: 6px; font-size: clamp(1.7rem, 6.4vw, 2.4rem); }
.tl-verdict p { margin: 8px 0 0; line-height: 1.5; }
.tl-verdict p.sub { color: var(--muted); font-size: .92rem; }
.tl-verdict p.sub b { color: var(--ink); font-weight: 600; }
/* how sure: from a coin flip (the left end) to a sure thing (the right) */
.tl-meter { display: flex; align-items: center; gap: 10px; max-width: 520px; margin-top: 12px; font-size: .76rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.tl-meter .track { position: relative; flex: 1; height: 8px; border-radius: 4px; background: var(--chalk); box-shadow: inset 0 0 0 1px var(--line); }
.tl-meter .fill { position: absolute; left: 0; top: 0; bottom: 0; min-width: 4px; border-radius: 4px; background: var(--ink); }
.tl-flags { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.tl-flags li { padding: 8px 11px; border-radius: 10px; background: var(--warn-bg); color: var(--warn); font-size: .88rem; line-height: 1.4; }
.tl-flags li.plain { background: var(--chalk); color: var(--muted); border: 1px solid var(--line); }

/* the players, side by side on a computer and one above the other on a phone */
.tl-cards { display: grid; gap: 8px; margin-top: 10px; }
@media (min-width: 760px) { .tl-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
@media (min-width: 1140px) { .tl-cards.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .tl-cards.n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tl-card { display: flex; flex-direction: column; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.tl-card.is-top { border-color: var(--turf); box-shadow: 0 0 0 1px var(--turf); }
.tl-card.is-out { opacity: .78; }
.tl-who { display: flex; align-items: center; gap: 11px; padding: 12px 8px 0 12px; }
.tl-ini { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; font: 700 1rem/1 var(--font-display); letter-spacing: .02em; }
.tl-who .id { min-width: 0; flex: 1; }
.tl-who .nm { font: 700 1.3rem/1.05 var(--font-display); }
.tl-who .sub { margin-top: 3px; font-size: .82rem; line-height: 1.3; color: var(--muted); }
.tl-x { margin-left: auto; align-self: flex-start; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: none;
  color: var(--muted); cursor: pointer; }
.tl-x:hover { background: var(--chalk); color: var(--ink); }
.tl-tags { display: flex; flex-wrap: wrap; gap: 5px; padding: 9px 12px 0; }
.tl-tags:empty { display: none; }
/* side by side on a computer, every card keeps the row when any card has a tag, so their numbers line up */
@media (min-width: 760px) { .tl-cards:has(.tl-tag) .tl-tags:empty { display: flex; min-height: 37px; } }
.tl-tag { display: inline-flex; align-items: center; padding: 4px 9px; border-radius: 999px; background: var(--warn-bg); color: var(--warn);
  font-size: .76rem; font-weight: 700; line-height: 1.25; }
.tl-tag.plain { background: var(--chalk); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.tl-nums { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); margin-top: 11px; border-top: 1px solid var(--line); }
.tl-num { display: flex; flex-direction: column; gap: 5px; padding: 10px 12px 11px; min-width: 0; }
.tl-num + .tl-num { border-left: 1px solid var(--line); }
.tl-num.step { background: var(--tl-bg); }
.tl-num .k { font: 600 .7rem/1 var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tl-num.step .k { color: var(--ink); }
.tl-num .v { display: inline-flex; align-items: center; gap: 6px; font: 700 1.9rem/1 var(--font-display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tl-num .s { font-size: .8rem; color: var(--muted); }
.tl-num.step .s { color: var(--ink); }
.tl-why { margin: 0; padding: 10px 12px; border-top: 1px solid var(--line); font-size: .86rem; line-height: 1.45; color: var(--muted); }
.tl-why b { color: var(--ink); font-weight: 600; }
.tl-why .sum { display: block; margin-top: 6px; font-size: .8rem; font-variant-numeric: tabular-nums; }
/* his range: the middle half of his games moved by the matchup, his usual (the tick) and the number (the dot), on one
   scale for every player on the page */
.tl-range { padding: 10px 12px 2px; border-top: 1px solid var(--line); }
.tl-range .track { position: relative; height: 22px; }
.tl-range .axis { position: absolute; left: 0; right: 0; top: 10px; height: 2px; background: var(--line); }
.tl-range .band { position: absolute; top: 6px; height: 10px; border-radius: 5px; background: color-mix(in srgb, var(--ink) 28%, var(--surface)); }
.tl-range .usual { position: absolute; top: 2px; width: 2px; height: 18px; margin-left: -1px; background: var(--muted); }
.tl-range .dot { position: absolute; top: 4px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--ink); border: 2px solid var(--surface); }
.tl-range .cap { display: flex; justify-content: space-between; gap: 8px; font-size: .76rem; color: var(--muted); }
/* his last games, oldest on the left: a bar a game, and his usual as the dashed line */
.tl-mini { padding: 6px 12px 10px; }
.tl-mini .plot { position: relative; isolation: isolate; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; align-items: end; height: 58px; margin-top: 18px; }
.tl-mini .bar { position: relative; display: flex; justify-content: center; align-items: flex-end; height: 100%; min-width: 0; }
.tl-mini .bar i { display: block; width: 100%; max-width: 26px; min-height: 2px; border-radius: 4px 4px 0 0; background: color-mix(in srgb, var(--ink) 46%, var(--surface)); }
/* a game's number sits on its bar, over the dashed line where the two meet */
.tl-mini .bar span { position: absolute; z-index: 2; left: 50%; transform: translateX(-50%); margin-bottom: 2px; padding: 1px 2px; border-radius: 3px; background: var(--surface);
  font-size: .64rem; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tl-mini .line { position: absolute; z-index: 1; left: 0; right: 0; height: 0; border-top: 1.5px dashed var(--muted); pointer-events: none; }
.tl-mini .opps { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; margin-top: 4px; border-top: 1px solid var(--line); padding-top: 4px; }
.tl-mini .opps span { font-size: .62rem; color: var(--muted); text-align: center; white-space: nowrap; overflow: hidden; }
.tl-mini .cap { margin: 6px 0 0; font-size: .76rem; color: var(--muted); }
.tl-links { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: auto; padding: 10px 12px 12px; border-top: 1px solid var(--line); font-size: .84rem; font-weight: 600; }
.tl-links a { color: var(--ink); white-space: nowrap; }

/* ---------- how it works ---------- */
.tl-how { max-width: 46em; margin-top: 4px; }
.tl-how h2 { margin: 26px 0 8px; font-size: 1.5rem; }
.tl-how p, .tl-how li { line-height: 1.6; }
.tl-how p { margin: 0 0 10px; }
.tl-how ul { margin: 0 0 10px; padding-left: 1.2em; }
.tl-how .tl-key { margin: 12px 0; }
.tl-how .tl-key ul { margin: 0; padding: 0; }
.tl-table-wrap { margin: 12px 0; border: 1px solid var(--line); border-radius: 12px; overflow-x: auto; background: var(--surface); }
.tl-table { width: 100%; border-collapse: collapse; }
.tl-table caption { padding: 10px 12px 8px; text-align: left; font-weight: 700; font-size: .92rem; line-height: 1.3; border-bottom: 1px solid var(--line); }
.tl-table caption small { display: block; margin-top: 2px; font-weight: 500; color: var(--muted); font-size: .8rem; }
.tl-table th, .tl-table td { padding: 7px 10px; text-align: right; font-size: .88rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tl-table th:first-child, .tl-table td:first-child { padding-left: 12px; }
.tl-table th:last-child, .tl-table td:last-child { padding-right: 12px; }
.tl-table th:first-child, .tl-table td:first-child { text-align: left; }
.tl-table thead th { font: 600 .7rem/1.1 var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
.tl-table tbody tr + tr td, .tl-table tbody tr + tr th { border-top: 1px solid var(--line); }
.tl-table tbody th { font-weight: 600; }
.tl-table .stepname { display: inline-flex; align-items: center; gap: 7px; min-width: 5.4em; padding: 4px 9px; border-radius: 7px; background: var(--tl-bg); }

/* ---------- shared: empty, loading, the note under every view ---------- */
.tl-empty { margin-top: 12px; padding: 22px 16px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); text-align: center; line-height: 1.5; }
.tl-empty b { color: var(--ink); }
.tl-btn { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font: 600 .9rem/1 var(--font-body); cursor: pointer; }
.tl-skel { height: 150px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); position: relative; overflow: hidden; }
.tl-skel::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--line) 45%, transparent), transparent);
  transform: translateX(-100%); animation: tl-shimmer 1.4s infinite; }
@keyframes tl-shimmer { to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .tl-skel::after { animation: none; } }
.tl-note { margin: 22px 0 8px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); font-size: .84rem; line-height: 1.5; color: var(--muted); }
.tl-note p { margin: 0; }
.tl-note p + p { margin-top: 6px; }
.tl-note b { color: var(--ink); }
.tl-note a { color: var(--ink); font-weight: 600; }
