/* site.css */
/* Roboto and Roboto Condensed served from this site (public/fonts, latin and latin-ext; Apache 2.0 / OFL): every page sent
   each visitor's address to Google Fonts while the privacy policy said the pages load nothing from other companies'
   servers (launch check 2026-10-03). Roboto is one variable file for 400, 500 and 700. */
@font-face { font-family: 'Roboto'; font-style: normal; font-weight: 400 700; font-stretch: 100%; font-display: swap; src: url(../fonts/roboto-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Roboto'; font-style: normal; font-weight: 400 700; font-stretch: 100%; font-display: swap; src: url(../fonts/roboto-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Roboto Condensed'; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/roboto-condensed-700-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Roboto Condensed'; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/roboto-condensed-700-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* ============================================================
   One token set, two themes: the look Pigskin Lab has, shared by the
   three sibling sites (the engine CSS is byte-identical across them).

   Look: a reference database, not an app. Flat surfaces, hairline rules,
   square corners, dense tables, condensed uppercase section heads.
   Light is the default; dark is neutral charcoal (no tinted blues).
   Each site's accent (Pigskin Lab's red) comes from body[data-sport]:
   Batter Lab green, HoopVision Lab orange, Rinkside Lab blue, taken
   from each site's logo. Every colour in charts, tables and exported
   PNGs comes from these tokens.
   ============================================================ */

:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f4f4f4;
  --surface-3: #e8e8e8;
  --row-alt: #fafafa;
  --row-hover: #fff8d6;
  --border: #d0d0d0;
  --border-strong: #9a9a9a;
  --grid: #e9e9e9;
  --text: #111111;
  --text-2: #3b3b3b;
  --muted: #5f5f5f;
  --link: #0b57d0;
  --focus: #0b57d0;
  --brand: #c8102e;
  --brand-ink: #c8102e;   /* the brand red as small text: AA on the page background */
  --brand-btn: #c8102e;   /* the brand red behind white text */
  --ink-btn: #111111;
  --ink-btn-text: #ffffff;
  --header-bg: #111111;
  --header-ink: #ffffff;
  --header-muted: #bdbdbd;
  --sel: #0b57d0;

  --real: #0f7a34;
  --noise: #a84a06;
  --early: #1f4fc4;
  --void: #5f5f5f;
  --right: #0f7a34;
  --wrong: #b3261e;

  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4; --s6: #008300;
  --div-neg: #c8322f; --div-mid: #f0efec; --div-pos: #2a78d6;

  --font: "Roboto", "Helvetica Neue", Arial, system-ui, sans-serif;
  --display: "Roboto Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #161616; --surface: #1d1d1d; --surface-2: #252525; --surface-3: #2f2f2f;
  --row-alt: #212121; --row-hover: #3a3520;
  --border: #3a3a3a; --border-strong: #6a6a6a; --grid: #2c2c2c;
  --text: #ededed; --text-2: #cfcfcf; --muted: #a8a8a8;
  --link: #8ab4f8; --focus: #8ab4f8; --brand: #e0443c; --brand-ink: #ff6b61; --brand-btn: #b8302a;
  --ink-btn: #ededed; --ink-btn-text: #111111;
  --header-bg: #0c0c0c; --header-ink: #ededed; --header-muted: #a8a8a8; --sel: #8ab4f8;
  --real: #16803c; --noise: #b4570c; --early: #2d5fd6; --void: #5f5f5f; --right: #3ecf73; --wrong: #ff7b72;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #2e9e2e;
  --div-neg: #e66767; --div-mid: #383835; --div-pos: #3987e5;
}

/* Each site's accent, where Pigskin Lab has its red: the rule under the header, the kicker, the
   headline's second line, step numbers, the sign-in panel, chart highlights. --brand is the colour
   as a large mark (3:1 on the page at least), --brand-ink as small text (4.5:1), --brand-btn behind
   white text (4.5:1). Links stay blue and buttons black, as on Pigskin Lab. */
body[data-sport="mlb"] { --brand: #138a43; --brand-ink: #0f6e36; --brand-btn: #0f7a3c; --brand-2: #1fa855; }
body[data-sport="nba"] { --brand: #e06a14; --brand-ink: #b4500a; --brand-btn: #b4500a; --brand-2: #f39a1a; }
body[data-sport="nhl"] { --brand: #0a7fe0; --brand-ink: #0864b0; --brand-btn: #0864b0; --brand-2: #00a3ee; }
:root[data-theme="dark"] body[data-sport="mlb"] { --brand: #2fb866; --brand-ink: #4cc97e; --brand-btn: #117a3d; }
:root[data-theme="dark"] body[data-sport="nba"] { --brand: #f08a36; --brand-ink: #ff9d4d; --brand-btn: #b4500a; }
:root[data-theme="dark"] body[data-sport="nhl"] { --brand: #3d9df0; --brand-ink: #6bb6ff; --brand-btn: #0864b0; }
/* The names the charts, widgets and makers read (public/js/charts.js tokens()), on this palette. */
:root, body { --line: var(--border); --faint: #7a7a7a; --accent: var(--brand); --accent-ink: #ffffff; --hl: #d4a72c; --good: var(--right); --bad: var(--wrong); --shadow: none; --radius: 0; --mono: ui-monospace, Consolas, monospace; }
:root[data-theme="dark"], :root[data-theme="dark"] body { --faint: #8a8a8a; }
[hidden] { display: none !important; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h, 90px) + 8px); }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
/* Links inside running text are underlined, not told apart by colour alone (WCAG 1.4.1). */
p a:not(.btn), .site-footer a, dd a, .notice a { text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; line-height: 1.15; margin: 0 0 .4em; }
h1 { font-size: 2rem; }
h2 { font-size: 1.15rem; text-transform: uppercase; letter-spacing: .02em; }
h3 { font-size: 1rem; }
p { margin: 0 0 .75em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 16px; }
.wrap.wide { max-width: none; }
/* A screen tall before the page arrives: the footer then starts below the fold instead of
   sitting on screen and being shoved down (Lighthouse measured that jump as 0.15 layout shift). */
main { flex: 1; min-width: 0; padding-bottom: 40px; min-height: 100vh; }
main.flush { padding-bottom: 0; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); color: var(--text); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- header ---------- */
.site-header { background: var(--header-bg); color: var(--header-ink); position: sticky; top: 0; z-index: 40; border-bottom: 3px solid var(--brand); }
.site-header .wrap { display: flex; align-items: center; gap: 22px; height: 50px; max-width: none; }
.brand { color: var(--header-ink); font: 700 1.35rem/1 var(--display); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; display: flex; align-items: center; gap: 10px; }
.brand:hover { text-decoration: none; }
.brand .mark { display: inline-block; width: 12px; height: 12px; border: 3px solid var(--brand); transform: rotate(45deg); }
.nav { display: flex; flex: 1; overflow-x: auto; scrollbar-width: none; height: 100%; }
.nav::-webkit-scrollbar { display: none; }
.nav a { color: var(--header-muted); padding: 0 11px; font: 600 .8rem/50px var(--font); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; border-bottom: 3px solid transparent; }
.nav a:hover { color: var(--header-ink); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--header-ink); border-bottom-color: var(--header-ink); }
.header-tools { display: flex; align-items: center; gap: 8px; }
.site-header .search { position: relative; }
.site-header .search input { width: 210px; background: #2a2a2a; border: 1px solid #4a4a4a; color: #fff; padding: 5px 9px; }
.site-header .search input::placeholder { color: #a3a3a3; }
.search-results { position: absolute; right: 0; top: calc(100% + 4px); width: 320px; background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); padding: 4px 0; display: none; z-index: 60; }
.search-results.open { display: block; }
.search-results a { display: flex; justify-content: space-between; gap: 8px; padding: 6px 10px; color: var(--text); }
.search-results a small { color: var(--muted); }
.search-results a:hover, .search-results a.active { background: var(--row-hover); text-decoration: none; }
.icon-btn { background: transparent; border: 1px solid #4a4a4a; color: #ededed; height: 30px; padding: 0 9px; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font: 600 .74rem/1 var(--font); text-transform: uppercase; letter-spacing: .04em; }
.icon-btn:hover { background: #2a2a2a; }
a.icon-btn { text-decoration: none; }
.icon-btn svg { width: 14px; height: 14px; }
/* Below 1366px the logo, eight links and the tools do not fit on one line (on a 1280px laptop
   "Trend watch" was cut off), so the links move to their own row and wrap there instead of
   scrolling sideways, where the last ones sat out of sight. */
@media (max-width: 1365px) {
  .site-header .wrap { flex-wrap: wrap; height: auto; padding-top: 8px; gap: 8px; }
  .nav { order: 3; flex-basis: 100%; height: auto; flex-wrap: wrap; justify-content: center; overflow: visible; padding-bottom: 2px; }
  .nav a { line-height: 34px; padding: 0 9px; }
  .header-tools { margin-left: auto; }
}
@media (max-width: 960px) {
  .site-header .search input { width: 150px; }
}

/* ---------- page furniture ---------- */
.page-head { padding: 16px 0 10px; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.page-head h1 { margin: 0 0 4px; }
.page-head p { color: var(--text-2); max-width: 72em; margin: 0; }
.crumbs { font-size: .78rem; color: var(--muted); margin-bottom: 4px; }
.crumbs a { color: var(--muted); }
.controls-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; margin-top: 10px; }
.section { margin-top: 26px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-bottom: 2px solid var(--text); padding-bottom: 3px; margin-bottom: 10px; }
.section-head h2 { margin: 0; }
.section-head .more { font-size: .8rem; }
.box { background: var(--surface); border: 1px solid var(--border); padding: 10px 12px; }
.box > h3:first-child { margin-top: 0; }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid.side { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
@media (max-width: 960px) { .grid.side { grid-template-columns: minmax(0, 1fr); } }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; height: 30px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: 600 .8rem/1.2 var(--font); cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn.primary { background: var(--ink-btn); color: var(--ink-btn-text); border-color: var(--ink-btn); }
.btn.primary:hover { opacity: .88; }
.btn.small { height: 26px; padding: 3px 8px; font-size: .75rem; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn svg { width: 14px; height: 14px; }
.seg { display: inline-flex; border: 1px solid var(--border-strong); height: 30px; }
.seg button { border: 0; border-right: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2); padding: 0 10px; font: 600 .78rem/1 var(--font); cursor: pointer; }
.seg button:last-child { border-right: 0; }
.seg button[aria-pressed="true"], .seg button[aria-selected="true"] { background: var(--text); color: var(--bg); }
select, input[type="number"], input[type="text"], input[type="search"] {
  font: inherit; font-size: .84rem; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 0; padding: 3px 6px; min-width: 0; height: 30px;
}
input[type="number"] { width: 76px; }
input[type="color"] { width: 32px; height: 26px; padding: 1px; border: 1px solid var(--border-strong); background: var(--surface); cursor: pointer; }
input[type="checkbox"] { accent-color: var(--text); }
label.field { display: grid; gap: 2px; font-size: .68rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
label.check { display: inline-flex; gap: 6px; align-items: center; font-size: .84rem; color: var(--text-2); height: 30px; }
.notice { border-left: 3px solid var(--noise); background: var(--surface-2); padding: 8px 10px; font-size: .86rem; color: var(--text-2); }
.notice.info { border-color: var(--early); }
.error { color: var(--wrong); }
.loading { color: var(--muted); padding: 24px 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); border: 1px solid var(--border); background: var(--surface); }
.kpi { padding: 8px 12px; border-right: 1px solid var(--border); }
.kpi:last-child { border-right: 0; }
.kpi .v { font: 700 1.55rem/1.1 var(--display); font-variant-numeric: tabular-nums; }
.kpi .l { font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }

/* ---------- tables (reference-site style) ---------- */
.tbl-wrap { overflow: auto; border: 1px solid var(--border); max-width: 100%; background: var(--surface); }
.tbl-wrap.tall { max-height: 72vh; }
table.stats { border-collapse: collapse; width: 100%; font-size: .8rem; font-variant-numeric: tabular-nums; }
table.stats th, table.stats td { padding: 3px 7px; border-bottom: 1px solid var(--grid); white-space: nowrap; text-align: right; }
table.stats th.l, table.stats td.l { text-align: left; }
table.stats thead th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); color: var(--text); font-weight: 700; border-bottom: 1px solid var(--border-strong); cursor: pointer; user-select: none; }
table.stats thead th[aria-sort="descending"]::after { content: " \25BC"; font-size: .6em; }
table.stats thead th[aria-sort="ascending"]::after { content: " \25B2"; font-size: .6em; }
table.stats thead th:hover { background: var(--surface-3); }
table.stats tbody tr:nth-child(even) td { background: var(--row-alt); }
table.stats tbody tr:hover td { background: var(--row-hover); }
table.stats td.rk { color: var(--muted); }
table.stats td.lead { font-weight: 700; }
table.stats tr.pin td { font-weight: 700; background: var(--row-hover); }
table.stats tfoot td { font-weight: 700; border-top: 1px solid var(--border-strong); background: var(--surface-2); position: sticky; bottom: 0; }
table.stats td .bar { display: inline-block; height: 8px; background: var(--s1); opacity: .35; vertical-align: middle; margin-right: 4px; }
.tbl-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; padding: 8px 0; }
.tbl-meta { font-size: .76rem; color: var(--muted); padding: 4px 0; }
.pop { position: relative; }
.pop .menu { position: absolute; z-index: 45; top: calc(100% + 2px); left: 0; background: var(--surface); border: 1px solid var(--border-strong); padding: 8px 10px; max-height: 380px; overflow: auto; min-width: 250px; display: none; }
.pop.open .menu { display: block; }
.pop .menu h4 { font-size: .68rem; text-transform: uppercase; color: var(--muted); margin: 8px 0 2px; letter-spacing: .05em; }
.pop .menu label { display: flex; gap: 6px; font-size: .82rem; padding: 1px 0; align-items: center; }
.filter-row { display: flex; gap: 4px; align-items: center; margin-bottom: 4px; }

/* ---------- team chip, badges ---------- */
.tchip { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--text); }
.tchip i { width: 4px; height: 15px; display: inline-block; background: var(--tc, var(--muted)); }
/* A club's colour on the dark card (fix.colour): the element carries --tc (3:1 on the light card) and --tc-dark (3:1 on
   the dark card, labcolor.js tcVars); a stylesheet !important beats the inline --tc, so navy and black strips stay visible. */
:root[data-theme="dark"] [style*="--tc-dark"] { --tc: var(--tc-dark) !important; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 6px; font: 700 .66rem/1.3 var(--font); letter-spacing: .06em; text-transform: uppercase; color: #fff; white-space: nowrap; }
.badge svg { width: 11px; height: 11px; }
.badge.real { background: var(--real); }
.badge.noise { background: var(--noise); }
.badge.early { background: var(--early); }
.badge.void { background: var(--void); }
.outcome { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; }
.outcome.right { color: var(--right); }
.outcome.wrong { color: var(--wrong); }
.outcome svg { width: 14px; height: 14px; }

/* ---------- trend cards (flat) ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 310px), 1fr)); border-top: 1px solid var(--border); border-left: 1px solid var(--border); }
.vcard { display: flex; flex-direction: column; gap: 5px; background: var(--surface); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 9px 12px 10px 14px; color: var(--text); position: relative; }
.vcard::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--tc, var(--border)); }
.vcard:hover { background: var(--row-hover); text-decoration: none; }
.vcard .top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .78rem; }
.vcard h3 { font: 700 1rem/1.2 var(--display); margin: 0; }
.vcard .vals { display: flex; gap: 12px; font-size: .78rem; color: var(--text-2); flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.vcard .vals b { color: var(--text); }
.vcard .when { font-size: .78rem; color: var(--text-2); }
.vcard .when strong { color: var(--text); }
.meter { height: 6px; background: var(--surface-3); position: relative; }
.meter span { position: absolute; inset: 0 auto 0 0; background: var(--early); }
.meter.done span { background: var(--real); }
.meter-label { display: flex; justify-content: space-between; font-size: .7rem; color: var(--muted); margin-top: 2px; font-variant-numeric: tabular-nums; }

/* ---------- charts ---------- */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; height: auto; }
.chart.fill { height: 100%; min-height: 60px; }
.chart.fill svg { height: 100%; }
.chart-note { font-size: .74rem; color: var(--muted); margin-top: 4px; }
.legend { display: flex; flex-wrap: wrap; gap: 3px 14px; margin: 0 0 4px; font-size: .76rem; }
.legend button { display: inline-flex; align-items: center; gap: 5px; background: none; border: 0; padding: 1px 0; color: var(--text-2); font: inherit; cursor: pointer; }
.legend button[aria-pressed="false"] { opacity: .45; text-decoration: line-through; }
.legend svg { width: 12px; height: 12px; }
.tooltip { position: fixed; z-index: 90; pointer-events: none; background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); padding: 6px 8px; font-size: .78rem; line-height: 1.4; max-width: 320px; opacity: 0; }
.tooltip.on { opacity: 1; }
.tooltip .tt-h { font-weight: 700; margin-bottom: 2px; }
.tooltip .tt-r { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.tooltip .tt-r span:first-child { display: inline-flex; align-items: center; gap: 5px; color: var(--text-2); }
.tooltip .tt-r b { font-variant-numeric: tabular-nums; }
.tooltip .tt-note { color: var(--muted); margin-top: 2px; }

/* ---------- home ---------- */
.scoreboard { display: flex; overflow-x: auto; border: 1px solid var(--border); background: var(--surface); scrollbar-width: thin; }
.score { min-width: 142px; padding: 5px 10px; border-right: 1px solid var(--border); font-size: .78rem; color: var(--text); font-variant-numeric: tabular-nums; }
.score:hover { background: var(--row-hover); text-decoration: none; }
.score .ln { display: flex; justify-content: space-between; gap: 8px; }
.score .ln.win { font-weight: 700; }
.score .st { color: var(--muted); font-size: .66rem; text-transform: uppercase; letter-spacing: .04em; }
/* Six links, always in full rows: 3 across on a desktop, 2 on a tablet, 1 on a phone (auto-fit left five and an orphan). */
.tool-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--border); border-left: 1px solid var(--border); }
@media (max-width: 900px) { .tool-links { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .tool-links { grid-template-columns: minmax(0, 1fr); } }
.tool-links a { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); color: var(--text); background: var(--surface); }
.tool-links a:hover { background: var(--row-hover); text-decoration: none; }
.tool-links b { display: block; font: 700 1.05rem/1.2 var(--display); text-transform: uppercase; letter-spacing: .03em; }
.tool-links b::after { content: " ›"; color: var(--brand-ink); }
.tool-links span { color: var(--text-2); font-size: .86rem; line-height: 1.45; }

/* ---------- dashboard maker ---------- */
.dash-top { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding: 8px 0 6px; }
.dash-top .title-input { font: 700 1.25rem/1 var(--display); border: 1px solid transparent; background: transparent; height: 34px; width: 340px; max-width: 100%; }
.dash-top .title-input:hover, .dash-top .title-input:focus { border-color: var(--border-strong); background: var(--surface); }
.dash-top .spacer { flex: 1; }
.dash-top .sep { width: 1px; height: 22px; background: var(--border); margin: 0 4px; }
.board-scroll { overflow: auto; border: 1px solid var(--border-strong); background: var(--surface-2); }
.board { position: relative; background-color: var(--surface-2); }
.board.grid-on { background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 20px 20px; }
.board-empty { position: absolute; left: 0; right: 0; top: 60px; display: grid; place-items: center; text-align: center; color: var(--muted); }
.board-empty > div { max-width: 620px; background: var(--surface); border: 1px solid var(--border); padding: 16px 18px; }
.board-empty .presets { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 10px; }
.widget { position: absolute; background: var(--surface); border: 1px solid var(--border-strong); display: flex; flex-direction: column; }
.widget.selected { outline: 2px solid var(--sel); z-index: 20; }
.widget .wbar { display: flex; align-items: center; gap: 6px; padding: 3px 4px 3px 9px; border-bottom: 1px solid var(--border); cursor: grab; user-select: none; touch-action: none; min-height: 34px; }
.widget.dragging .wbar { cursor: grabbing; }
.widget .wtitle { flex: 1; min-width: 0; }
.widget.pcoded { border-top: 5px solid var(--pc); }
.widget.pcoded .wtitle span::before { content: ''; display: inline-block; width: .6em; height: .6em; margin-right: .35em; background: var(--pc); vertical-align: baseline; }
.widget .wtitle b { display: block; font: 700 .9rem/1.2 var(--display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.widget .wtitle span { display: block; font-size: .7rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.widget .wtools { display: flex; gap: 1px; }
.widget .wtools button { width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid transparent; background: none; color: var(--text-2); cursor: pointer; }
.widget .wtools button:hover { border-color: var(--border-strong); background: var(--surface-2); }
.widget .wtools svg { width: 13px; height: 13px; }
.widget .wbody { flex: 1; min-height: 0; padding: 4px 8px 6px; overflow: hidden; display: flex; flex-direction: column; }
.widget .wbody > .chart { flex: 1; min-height: 0; }
.widget .wbody > .tbl-wrap { flex: 1; min-height: 0; }
/* How it swung: the biggest swings told under the game's margin chart, two lines each, each marked with its club's colour (the
   chart names each swing beside its point; never a numbered key, the owner 2026-11-14). A widget too short for both keeps the
   chart and its named swings (each point's tip still tells the score). */
.widget .wbody:has(> .swings) { container-type: size; }
.widget .wbody > .swings { flex: none; list-style: none; margin: 6px 0 0; padding: 6px 0 0; border-top: 1px solid var(--grid); font-size: .74rem; line-height: 1.35; color: var(--text-2); }
.swings li { position: relative; padding-left: 16px; margin: 0 0 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.swings li::before { content: ''; position: absolute; left: 2px; top: .35em; width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--text-2)); }
.swings li b { color: var(--text); font-weight: 700; }
@container (max-height: 330px) { .swings { display: none; } }
.widget .wnote { font-size: .68rem; color: var(--muted); padding: 2px 8px 3px; border-top: 1px solid var(--grid); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.widget .h-se { position: absolute; width: 14px; height: 14px; right: -1px; bottom: -1px; cursor: nwse-resize; background: linear-gradient(135deg, transparent 55%, var(--border-strong) 55%); touch-action: none; }
.widget .h-e { position: absolute; top: 34px; bottom: 14px; right: -5px; width: 10px; cursor: ew-resize; touch-action: none; }
.widget .h-s { position: absolute; left: 0; right: 14px; bottom: -5px; height: 10px; cursor: ns-resize; touch-action: none; }
.widget.text .wbody { overflow: auto; }
.widget .note-edit { outline: none; min-height: 100%; font-size: .9rem; white-space: pre-wrap; }
.widget .kpi-big { font: 700 2.8rem/1 var(--display); font-variant-numeric: tabular-nums; }
.inspector { position: fixed; z-index: 70; width: 310px; max-height: 76vh; overflow: auto; background: var(--surface); border: 1px solid var(--text); padding: 10px 12px; box-shadow: 0 8px 28px rgba(0, 0, 0, .2); }
.inspector h3 { display: flex; justify-content: space-between; align-items: center; margin: 0 0 8px; font-size: .95rem; text-transform: uppercase; }
.inspector .row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 8px; }
.inspector .row.one { grid-template-columns: 1fr; }
.inspector .colors { display: grid; gap: 4px; margin-bottom: 8px; }
.inspector .colors label { display: flex; align-items: center; gap: 8px; font-size: .8rem; }
.inspector hr { border: 0; border-top: 1px solid var(--border); margin: 8px 0; }
.series-row { display: flex; gap: 4px; align-items: center; margin-top: 4px; }
.series-row .sw { width: 10px; height: 10px; flex: none; }
.series-row .x { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 1.1rem; padding: 0 2px; }
.ac { position: relative; }
.ac input { width: 170px; }
.ac-list { position: absolute; z-index: 80; left: 0; min-width: 270px; bottom: 100%; background: var(--surface); border: 1px solid var(--border-strong); max-height: 240px; overflow: auto; display: none; }
.ac-list.open { display: block; }
.ac-list button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 5px 8px; color: var(--text); font: inherit; font-size: .8rem; cursor: pointer; }
.ac-list button:hover { background: var(--row-hover); }

/* ---------- misc ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 5px 0; border-bottom: 1px solid var(--grid); flex-wrap: wrap; }
.results { display: flex; flex-wrap: wrap; gap: 2px; }
.results a { min-width: 28px; height: 22px; padding: 0 4px; display: grid; place-items: center; font: 700 .68rem/1 var(--font); color: #fff; }
.results a.w { background: var(--real); }
.results a.l { background: #b3261e; }
.results a.t { background: var(--void); }
.results a:hover { text-decoration: none; opacity: .85; }
.rule { display: grid; gap: 4px; padding: 10px 0; border-bottom: 1px solid var(--grid); }
.rule .rh { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; }
.rule .nums { display: flex; gap: 16px; flex-wrap: wrap; font-size: .8rem; color: var(--text-2); }
.rule .nums b { color: var(--text); font-variant-numeric: tabular-nums; }
.src { font-size: .76rem; color: var(--muted); }
.site-footer { border-top: 1px solid var(--border); background: var(--surface-2); padding: 14px 0; font-size: .78rem; color: var(--muted); }
.site-footer .wrap { display: flex; gap: 16px; justify-content: space-between; flex-wrap: wrap; }
/* The sister sites and the author's site: a name and a caption each, above the credits. */
.site-footer .site-family { justify-content: flex-start; align-items: stretch; gap: 10px 12px; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--border); }
.site-family .family-head { flex-basis: 100%; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }
.site-footer .site-family a { display: grid; align-content: start; gap: 2px; flex: 1 1 140px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface, transparent); text-decoration: none; color: var(--text); }
.site-family a b { font-size: .86rem; }
.site-family a small { font-size: .74rem; color: var(--muted); }
/* Each site's colour, the same on every site: football red, baseball green, basketball orange,
   hockey blue, Mason Obegi purple. Darker shades on light, lighter on dark, for readable names. */
.site-family a { --fam: var(--text-2); }
.site-footer .site-family a { border-left: 4px solid var(--fam); }
.site-family a b { color: var(--fam); }
.site-footer .site-family a:hover, .site-footer .site-family a:focus-visible { border-color: var(--fam); }
.site-family .fam-football { --fam: #c8102e; }
.site-family .fam-baseball { --fam: #15803d; }
.site-family .fam-basketball { --fam: #c2410c; }
.site-family .fam-hockey { --fam: #1d4ed8; }
.site-family .fam-chess { --fam: #3f3f46; }
.site-family .fam-mason { --fam: #6d28d9; }
:root[data-theme="dark"] .site-family .fam-football { --fam: #f87171; }
:root[data-theme="dark"] .site-family .fam-baseball { --fam: #4ade80; }
:root[data-theme="dark"] .site-family .fam-basketball { --fam: #fb923c; }
:root[data-theme="dark"] .site-family .fam-hockey { --fam: #93c5fd; }
:root[data-theme="dark"] .site-family .fam-chess { --fam: #d4d4d8; }
:root[data-theme="dark"] .site-family .fam-mason { --fam: #c4b5fd; }

@media (prefers-reduced-motion: reduce) { * { transition-duration: 0s !important; animation-duration: 0s !important; } }
/* Phones: the wrapped header is too tall to pin, so it scrolls away with the page. */
@media (max-width: 600px) { .site-header { position: static; } }
/* Phones: logo and Menu on the first row, search and the two buttons on the second; the page
   links open under Menu. The tip bar stays off (the footer has the tip link and feedback), so the
   first screen is the page, not the site's furniture. */
.menu-btn { display: none; }
@media (max-width: 600px) {
  .site-header .wrap { padding-bottom: 8px; }
  .menu-btn { display: inline-flex; }
  .site-header:not(.menu-open) .nav { display: none; }
  .header-tools { flex-basis: 100%; margin-left: 0; order: 2; }
  .header-tools .search { flex: 1; min-width: 0; }
  .site-header .search input { width: 100%; }
  #theme-label { display: none; }
}
@media (max-width: 480px) { .nav a { padding: 0 7px; font-size: .74rem; line-height: 30px; } }
.site-footer .used-by { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.site-footer .used-by-head { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.site-footer .used-by-logo { display: inline-block; line-height: 0; border-radius: 8px; overflow: hidden; transition: transform .15s ease; }
.site-footer .used-by-logo:hover, .site-footer .used-by-logo:focus-visible { transform: translateY(-2px); }
.site-footer .used-by-logo img { width: 72px; height: 72px; display: block; }
.site-footer .used-by-item { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.site-footer .used-by-links { font-size: .72rem; color: var(--muted); white-space: nowrap; }
@media print { .site-header, .site-footer, .dock { display: none; } }
#theme-toggle[data-mode="dark"] .moon, #theme-toggle[data-mode="light"] .sun { display: none; }
body.no-select, body.no-select * { user-select: none !important; }

/* ============================================================
   Frames: panels, tables and widgets get a dark outline so each box
   reads as its own unit (light: near-black; dark: light gray).
   ============================================================ */
:root { --frame: #1f1f1f; --cat-chart: #1f5fbf; --cat-model: #6a3ca8; --cat-table: #0f7a34; --cat-note: #5f5f5f; }
:root[data-theme="dark"] { --frame: #8f8f8f; --cat-chart: #6ea2f0; --cat-model: #b996ec; --cat-table: #5fcf88; --cat-note: #b0b0b0; }
.box, .tbl-wrap, .kpis, .scoreboard, .widget, .board-scroll, .inspector { border-color: var(--frame); }
.tool-links, .tool-links a { border-color: var(--frame); }
.cards { border-color: var(--frame); }
.vcard { border-color: var(--frame); }
.grid.two > .box, .grid.side > .box { border-width: 1px; }

/* brand mark: a small grid, drawn in CSS */
.brand .mark { width: 16px; height: 16px; border: 0; transform: none; background:
  linear-gradient(var(--brand), var(--brand)) 0 0 / 100% 3px no-repeat,
  linear-gradient(var(--brand), var(--brand)) 0 50% / 100% 2px no-repeat,
  linear-gradient(var(--brand), var(--brand)) 0 100% / 100% 3px no-repeat,
  linear-gradient(var(--brand), var(--brand)) 0 0 / 3px 100% no-repeat,
  linear-gradient(var(--brand), var(--brand)) 50% 0 / 2px 100% no-repeat,
  linear-gradient(var(--brand), var(--brand)) 100% 0 / 3px 100% no-repeat; }

/* ---------- dashboard: zoom and width ---------- */
.board-zoom { position: relative; }
.board { transform-origin: 0 0; position: absolute; left: 0; top: 0; }
.board.fixed-width { box-shadow: inset calc(-1 * 2px) 0 0 var(--frame); }
.inline-field { display: inline-flex; align-items: center; gap: 6px; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.dash-top .seg button { min-width: 30px; font-size: .85rem; }

/* ---------- dashboard dock, colour-coded by category ---------- */
.cat-chart { --cat: var(--cat-chart); } .cat-model { --cat: var(--cat-model); } .cat-table { --cat: var(--cat-table); } .cat-note { --cat: var(--cat-note); }
.form-title { display: flex; flex-direction: column; gap: 1px; padding: 6px 16px 0; }
.form-title b { font: 700 .95rem/1.2 var(--display); color: var(--cat); text-transform: uppercase; letter-spacing: .03em; }
.form-title span { font-size: .76rem; color: var(--text-2); }
.pick-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1px 10px; max-height: 120px; overflow: auto; }
.pick-list label { display: flex; gap: 5px; align-items: center; font-size: .78rem; }

/* Wide tables: keep rank and name in view while scrolling sideways, like a reference site. */
table.stats td { background: var(--surface); }
table.stats tbody tr:nth-child(even) td { background: var(--row-alt); }
table.stats tbody tr:hover td { background: var(--row-hover); }
table.stats tr > :first-child { position: sticky; left: 0; z-index: 1; }
table.stats tr > :nth-child(2) { position: sticky; left: var(--rk-w, 34px); z-index: 1; box-shadow: inset -1px 0 0 var(--border); }
table.stats thead th:first-child, table.stats thead th:nth-child(2) { z-index: 3; }
table.stats tfoot td:first-child, table.stats tfoot td:nth-child(2) { z-index: 2; }
.model-card { display: flex; flex-direction: column; }
.model-body { height: 400px; display: flex; flex-direction: column; min-height: 0; }
.model-body > .chart { flex: 1; min-height: 0; }
.model-body > div:has(> .tbl-wrap) { flex: 1; min-height: 0; overflow: auto; }

/* ---------- dashboard focus bar ---------- */
.focus-bar { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; padding: 6px 10px; margin-bottom: 8px; border: 1px solid var(--frame); border-left: 6px solid var(--tc); background: var(--surface); }
.focus-bar > b { font: 700 .8rem/1 var(--display); text-transform: uppercase; letter-spacing: .06em; margin-right: 4px; }
.focus-bar select { max-width: 220px; }
.focus-note { font-size: .78rem; color: var(--text-2); flex: 1 1 260px; }

/* ---------- chart window ---------- */
.chart-window { position: fixed; inset: 0; z-index: 85; background: rgba(0, 0, 0, .55); display: grid; place-items: center; padding: 16px; }
.win-panel { background: var(--surface); border: 2px solid var(--frame); width: min(1500px, 100%); height: min(920px, 100%); display: flex; flex-direction: column; }
.win-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--frame); }
.win-head h2 { margin: 0 0 2px; font-size: 1.15rem; }
.win-head p { margin: 0; max-width: 90ch; }
.win-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 340px minmax(0, 1fr); }
.win-side { border-right: 1px solid var(--frame); overflow: auto; padding: 10px 12px; }
.win-side h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; margin: 4px 0 6px; }
.win-side .form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.win-side .form > fieldset, .win-side .form > .hint, .win-side .form > .pick-list, .win-side .form > div:last-child { grid-column: 1 / -1; }
.win-side .form select, .win-side .form input[type="text"] { width: 100%; }
.win-side .row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 8px; }
.win-side .row.one { grid-template-columns: 1fr; }
.win-side .colors { display: grid; gap: 4px; margin-bottom: 8px; }
.win-side .colors label { display: flex; gap: 8px; align-items: center; font-size: .8rem; }
.win-side hr { border: 0; border-top: 1px solid var(--border); margin: 8px 0; }
.win-style { margin-top: 10px; border-top: 2px solid var(--frame); padding-top: 6px; }
.win-chart { padding: 10px 14px; display: flex; flex-direction: column; min-height: 0; }
.win-chart > .chart { flex: 1; min-height: 0; }
.win-chart > div:has(> .tbl-wrap) { flex: 1; min-height: 0; overflow: auto; }
@media (max-width: 900px) { .win-body { grid-template-columns: 1fr; grid-template-rows: auto 1fr; } .win-side { max-height: 40vh; border-right: 0; border-bottom: 1px solid var(--frame); } }
.widget .wbody { cursor: zoom-in; }
.widget.text .wbody, .widget .wbody:has(.tbl-wrap), .widget .wbody:has(.story) { cursor: auto; }

/* ---------- dashboard front door ---------- */
.quick-start { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.quick-start > b { font: 700 .8rem/1 var(--display); text-transform: uppercase; letter-spacing: .06em; }

/* phones: stacked board, no drag or resize handles */
.board.stacked .wbar { cursor: default; }
.board.stacked .h-e, .board.stacked .h-s, .board.stacked .h-se { display: none; }
@media (max-width: 700px) { .dash-top .seg, .dash-top .inline-field, .dash-top [title^="Zoom so"] { display: none; } .focus-note { display: none; } }
/* model cards on narrow screens: let the view buttons wrap under the title */
.model-card .section-head > span { flex-wrap: wrap; }
.model-card .seg { flex-wrap: wrap; height: auto; }
.model-card .seg button { height: 28px; }

/* Picking a widget type: the set-up panel slides in and flashes in its category colour. */
@keyframes form-in { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
@keyframes form-flash {
  0%, 20% { box-shadow: inset 0 0 0 3px var(--cat); background: color-mix(in srgb, var(--cat) 16%, var(--surface)); }
  100% { box-shadow: inset 0 0 0 0 transparent; background: transparent; }
}
@keyframes title-flash { 0%, 30% { transform: scale(1.06); } 100% { transform: none; } }
.dock-form.flash { animation: form-in .3s ease-out, form-flash 1.4s ease-out; }
.dock-form.flash .form-title b { display: inline-block; transform-origin: left center; animation: title-flash .6s ease-out; }
@media (prefers-reduced-motion: reduce) {
  .dock-form.flash { animation: form-flash 1.4s linear; }
  .dock-form.flash .form-title b { animation: none; }
}

/* Add panel, step 1: a scrollable menu of groups that open and close. */
.dock-menu { overflow: auto; flex: 1; scrollbar-width: thin; }
.step-head { display: flex; align-items: center; gap: 8px; font: 700 .74rem/1 var(--font); text-transform: uppercase; letter-spacing: .06em; color: var(--text-2); padding: 8px 12px 6px; }
.step { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--text); color: var(--bg); font: 700 .72rem/1 var(--font); flex: none; }
.dock-group { border-top: 1px solid var(--border); border-left: 4px solid var(--cat); }
.dock-group > summary { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "l c" "d c"; align-items: center; column-gap: 10px; padding: 7px 12px 7px 10px; cursor: pointer; list-style: none; }
.dock-group > summary::-webkit-details-marker { display: none; }
.dock-group > summary::after { content: ""; grid-area: c; justify-self: end; width: 7px; height: 7px; border-right: 2px solid var(--text-2); border-bottom: 2px solid var(--text-2); transform: rotate(-45deg); margin-right: 2px; transition: transform .15s; }
.dock-group[open] > summary::after { transform: rotate(45deg); }
.dock-group > summary:hover { background: var(--surface-2); }
.g-label { grid-area: l; font: 700 .82rem/1.2 var(--display); text-transform: uppercase; letter-spacing: .04em; color: var(--cat); }
.g-desc { grid-area: d; font-size: .72rem; color: var(--muted); }
.g-count { grid-area: c; justify-self: end; margin-right: 22px; font: 700 .68rem/1 var(--font); color: var(--text-2); border: 1px solid var(--border-strong); padding: 2px 6px; }
.dock-group .cat-types { display: flex; flex-direction: column; flex-wrap: nowrap; gap: 0; padding: 0 0 6px; }
.dock-group .cat-types button { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left; border: 0; border-left: 3px solid transparent; background: none; padding: 5px 12px 5px 14px; color: var(--text); }
.dock-group .cat-types button b { font: 600 .8rem/1.25 var(--font); }
.dock-group .cat-types button span { font-size: .72rem; line-height: 1.3; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.dock-group .cat-types button:hover { background: var(--surface-2); color: var(--text); border-left-color: var(--cat); }
.dock-group .cat-types button[aria-pressed="true"] { background: color-mix(in srgb, var(--cat) 12%, var(--surface)); border-left-color: var(--cat); color: var(--text); }
.dock-group .cat-types button[aria-pressed="true"] b { color: var(--cat); }
:root[data-theme="dark"] .dock-group .cat-types button[aria-pressed="true"] { color: var(--text); }
/* Steps 2 and 3: the fields scroll, the add button stays in view. */
.form-title .step-head { padding: 2px 0 4px; }
.add-bar { display: flex; gap: 8px; align-items: center; padding: 8px 16px; border-top: 1px solid var(--border); background: var(--surface); }
.form-title .step-head .step { color: var(--bg); font-size: .72rem; }

/* Wide tooltips: the similar-seasons comparison and other rich hovers. */
.tooltip.wide { max-width: min(460px, calc(100vw - 16px)); padding: 8px 10px; }
.tooltip .tt-why { margin: 2px 0 6px; color: var(--text-2); }
.tooltip table.tt-cmp { border-collapse: collapse; width: 100%; font-size: .74rem; font-variant-numeric: tabular-nums; }
.tooltip table.tt-cmp th, .tooltip table.tt-cmp td { padding: 1px 6px 1px 0; text-align: right; white-space: nowrap; }
.tooltip table.tt-cmp th:first-child, .tooltip table.tt-cmp td:first-child { text-align: left; color: var(--text-2); white-space: normal; }
.tooltip table.tt-cmp thead th { color: var(--text); font-weight: 700; border-bottom: 1px solid var(--border); }
.tooltip table.tt-cmp tr.tt-sep td { border-top: 1px solid var(--border); padding-top: 3px; }
.tooltip table.tt-cmp td.tt-rk { color: var(--muted); font-size: .68rem; padding-right: 8px; }
.tooltip .tt-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; vertical-align: 0; }
.tooltip .tt-dot.m0 { background: var(--right); }
.tooltip .tt-dot.m1 { background: #8fbf5a; }
.tooltip .tt-dot.m2 { background: #d4a72c; }
.tooltip .tt-dot.m3 { background: var(--wrong); }
.tooltip .tt-next { margin-top: 6px; color: var(--text-2); }

/* Storylines: a written summary of one team, one line per topic. */
.story { list-style: none; margin: 0; padding: 4px 2px; overflow: auto; flex: 1; min-height: 0; font-size: .9rem; line-height: 1.45; }
.story li { padding: 5px 0 5px 12px; border-bottom: 1px solid var(--grid); position: relative; }
.story li:last-child { border-bottom: 0; }
.story li::before { content: ''; position: absolute; left: 0; top: 11px; width: 6px; height: 6px; border-radius: 50%; background: var(--border-strong); }
.story li.tone-good::before { background: var(--right); }
.story li.tone-bad::before { background: var(--wrong); }
.story li b { font-family: var(--display); text-transform: uppercase; letter-spacing: .02em; font-size: .78rem; color: var(--text-2); margin-right: 4px; }

/* ---------- dashboard: add drawer ----------
   Wide screens: a column beside the board, sticky while the page scrolls.
   Narrower: a sheet over the right of the board. Phones: full screen. */
.dash-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; align-items: start; }
.dock { position: fixed; top: 61px; right: 8px; bottom: 8px; width: min(400px, calc(100vw - 16px)); z-index: 60; display: flex; flex-direction: column; background: var(--surface); border: 2px solid var(--frame); min-width: 0; box-shadow: 0 10px 40px rgba(0, 0, 0, .28); }
.dock[hidden] { display: none; }
.dock .dock-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px 8px 14px; border-bottom: 1px solid var(--frame); }
.dock .dock-head h2 { margin: 0; font-size: 1rem; }
.dock .dock-close { font-size: 1.1rem; line-height: 1; width: 30px; padding: 0; }
.dock-search { padding: 0 12px 8px; }
.dock-search input { width: 100%; }
.dock-menu { overflow: auto; flex: 1; min-height: 0; scrollbar-width: thin; }
.dock-added { padding: 8px 12px; border-top: 1px solid var(--border); background: color-mix(in srgb, var(--right) 12%, var(--surface)); font-size: .8rem; }
.dock-form { display: flex; flex-direction: column; min-height: 0; flex: 1; overflow: auto; border-top: 4px solid var(--cat); }
.dock-form .form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; align-items: end; padding: 8px 14px 12px; }
.dock-form .form > fieldset, .dock-form .form > .hint, .dock-form .form > .pick-list, .dock-form .form > div:last-child, .dock-form .form > .ac { grid-column: 1 / -1; }
.dock-form .form select, .dock-form .form input[type="text"], .dock-form .form input[type="number"] { width: 100%; }
.dock-form .form fieldset { border: 1px solid var(--border); padding: 2px 8px 8px; margin: 0; min-width: 0; }
.dock-form .form legend { font-size: .66rem; font-weight: 700; color: var(--muted); text-transform: uppercase; padding: 0 4px; letter-spacing: .05em; }
.dock-form .form .hint { font-size: .74rem; color: var(--muted); }
.dock-form .series-row { flex-wrap: wrap; }
.dock-form .series-row select { flex: 1 1 120px; min-width: 0; }
.dock-form .pick-list { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 200px; }
.dock-back { align-self: flex-start; border: 0; background: none; color: var(--link); font: 600 .8rem/1 var(--font); padding: 8px 14px 2px; cursor: pointer; }
.dock-back:hover { text-decoration: underline; }
.form-title { display: flex; flex-direction: column; gap: 1px; padding: 6px 14px 0; }
.form-title b { font: 700 .95rem/1.2 var(--display); color: var(--cat); text-transform: uppercase; letter-spacing: .03em; }
.form-title span { font-size: .76rem; color: var(--text-2); }
.add-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 14px; border-top: 1px solid var(--frame); background: var(--surface); }
.add-widget span { font-weight: 700; font-size: 1.05em; margin-right: 2px; }
.widget.just-added { animation: just-added 1.6s ease-out; }
@keyframes just-added { 0%, 30% { box-shadow: 0 0 0 4px var(--sel); } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .widget.just-added { animation: none; outline: 3px solid var(--sel); } }
@media (max-width: 700px) {
  .dock { inset: 0; width: auto; border: 0; z-index: 80; }
  .dock-form .form { grid-template-columns: minmax(0, 1fr); }
}
/* Toolbar: the title takes what is left, so everything fits on one line at 1366px and up. */
.dash-top .title-input { flex: 1 1 180px; width: auto; min-width: 150px; max-width: 380px; text-overflow: ellipsis; }
.dash-top .spacer { flex: 0 1 auto; }
.dock .dock-close { display: inline-grid; place-items: center; height: 30px; }
@media (max-width: 1500px) { .dash-top .inline-field .lbl { display: none; } }
@media (max-width: 700px) {
  .dash-top .desk-only, .dash-top .sep { display: none; }
  .dash-top .title-input { flex: 1 1 100%; max-width: none; order: -2; }
  .dash-top .add-widget { order: -1; }
  .board-empty { top: 16px; padding: 0 8px; }
  .board-empty > div { max-width: 100%; padding: 12px; }
  .board-empty .quick-start { justify-content: center; }
  .board-empty .presets .btn { white-space: normal; height: auto; min-height: 32px; text-align: center; }
}
.board.stacked .w-dup { display: none; }
/* A wide Storylines widget reads in two columns instead of scrolling. */
.story { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); column-gap: 24px; align-content: start; }
/* Touch: rich tooltips open as a bottom sheet. */
.tip-sheet { position: fixed; inset: 0; z-index: 95; background: rgba(0, 0, 0, .45); display: flex; align-items: flex-end; justify-content: center; }
.tip-sheet-panel { background: var(--surface); color: var(--text); width: min(560px, 100%); max-height: 82vh; display: flex; flex-direction: column; border-top: 3px solid var(--frame); font-size: .82rem; line-height: 1.4; }
.tip-sheet-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.tip-sheet-body { overflow: auto; padding: 10px 12px 16px; }
.tip-sheet.wide .tip-sheet-panel { width: min(920px, 100%); }
@media (min-width: 700px) { .tip-sheet.wide { align-items: center; } .tip-sheet.wide .tip-sheet-panel { border: 1px solid var(--border); border-top: 3px solid var(--frame); } }
/* A drive's plays: one row per snap; the description wraps, numbers line up. */
.play-table { border-collapse: collapse; width: 100%; font-size: .8rem; font-variant-numeric: tabular-nums; }
.play-table th { text-align: left; font-weight: 700; color: var(--text-2); border-bottom: 1px solid var(--border-strong); padding: 4px 6px; position: sticky; top: 0; background: var(--surface); }
.play-table td { padding: 5px 6px; border-bottom: 1px solid var(--border); vertical-align: top; white-space: nowrap; }
.play-table td.desc { white-space: normal; min-width: 220px; }
.play-table td.num, .play-table th:nth-last-child(-n+2) { text-align: right; }
.play-table td.pos { color: var(--right); font-weight: 600; } .play-table td.neg { color: var(--wrong); font-weight: 600; }
.play-table tr.np td { color: var(--muted); }
.play-table tbody tr:nth-child(even) td { background: var(--row-alt); }
.tip-sheet .tt-h { font-weight: 700; margin-bottom: 2px; }
.tip-sheet .tt-why { margin: 2px 0 8px; color: var(--text-2); }
.tip-sheet .tt-note { color: var(--muted); margin-top: 6px; font-size: .74rem; }
.tip-sheet .tt-next { margin-top: 6px; color: var(--text-2); }
.tip-sheet table.tt-cmp { border-collapse: collapse; width: 100%; font-size: .78rem; font-variant-numeric: tabular-nums; }
.tip-sheet table.tt-cmp th, .tip-sheet table.tt-cmp td { padding: 2px 4px 2px 0; text-align: right; }
.tip-sheet table.tt-cmp th:first-child, .tip-sheet table.tt-cmp td:first-child { text-align: left; color: var(--text-2); }
.tip-sheet table.tt-cmp thead th { border-bottom: 1px solid var(--border); }
.tip-sheet table.tt-cmp tr.tt-sep td { border-top: 1px solid var(--border); padding-top: 4px; }
.tip-sheet table.tt-cmp td.tt-rk { color: var(--muted); font-size: .7rem; padding-right: 6px; }
.tip-sheet .tt-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; }
.tip-sheet .tt-dot.m0 { background: var(--right); } .tip-sheet .tt-dot.m1 { background: #8fbf5a; } .tip-sheet .tt-dot.m2 { background: #d4a72c; } .tip-sheet .tt-dot.m3 { background: var(--wrong); }
/* Series rows in the add drawer: swatch, who, from, to, remove on one line. */
.dock-form .series-row { display: grid; grid-template-columns: 10px minmax(0, 1fr) 76px 76px 22px; gap: 4px; align-items: center; }
.dock-form .series-row select, .dock-form .series-row .ac, .dock-form .series-row .ac input { width: 100%; min-width: 0; }
.dock-form .series-row .x { justify-self: center; }
.dock-form .series-row.wk { grid-template-columns: 10px minmax(0, 1fr) 76px 22px; }
.wloading { margin: auto; color: var(--muted); font-size: .8rem; }
.help-dialog { position: fixed; inset: 0; z-index: 96; background: rgba(0, 0, 0, .45); display: grid; place-items: center; padding: 16px; }
.help-panel { background: var(--surface); border: 2px solid var(--frame); width: min(520px, 100%); padding: 12px 16px 16px; }
.help-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.help-head h2 { margin: 0; font-size: 1.05rem; }
.help-panel dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: .86rem; }
.help-panel dt { white-space: nowrap; }
.help-panel dd { margin: 0; color: var(--text-2); }
.help-panel kbd { font: 600 .78rem/1 var(--font); border: 1px solid var(--border-strong); border-bottom-width: 2px; padding: 2px 6px; background: var(--surface-2); }
/* Phones: the chart window fills the screen, chart first, settings below it. */
@media (max-width: 700px) {
  .chart-window { padding: 0; }
  .win-panel { width: 100%; height: 100%; border: 0; }
  .win-hint { display: none; }
  .win-head { padding: 8px 10px; }
  .win-head h2 { font-size: .95rem; }
  .win-head p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .win-body { grid-template-rows: minmax(300px, 55vh) minmax(0, 1fr); }
  .win-chart { order: -1; padding: 6px 8px; border-bottom: 1px solid var(--frame); }
  .win-side { max-height: none; border-bottom: 0; }
  .inspector { left: 8px !important; right: 8px; width: auto; max-height: 70vh; }
}

/* After adding a widget: a short note with a way straight back to the add panel. */
.dash-toast { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 70; display: flex; gap: 10px; align-items: center; background: var(--text); color: var(--bg); padding: 8px 10px 8px 14px; font-size: .85rem; box-shadow: 0 6px 24px rgba(0, 0, 0, .3); max-width: calc(100vw - 24px); }
.dash-toast .btn { background: var(--bg); color: var(--text); border-color: var(--bg); }
.dock-form .form > .full, .win-side .form > .full { grid-column: 1 / -1; }
.dock-form .form > .full .field select, .win-side .form > .full .field select { width: 100%; }
.full .ac, .full .ac input { width: 100%; }

/* Ask: describe a dashboard in words. */
.ask-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 6px 10px; margin-bottom: 8px; border: 1px solid var(--frame); background: var(--surface); }
.ask-bar > label { display: inline-flex; align-items: center; gap: 6px; font: 700 .8rem/1 var(--display); text-transform: uppercase; letter-spacing: .06em; }
.ask-mark { color: var(--brand); font-size: 1rem; }
.ask-input { flex: 1 1 360px; min-width: 0; height: 32px; font-size: .9rem; }
.ask-msg { flex: 1 1 100%; font-size: .8rem; color: var(--text-2); }
.ask-msg:empty { display: none; }
.ask-msg.ok { color: var(--text); }
.ask-msg.err { color: var(--wrong); }
.ask-msg .ask-note { color: var(--noise); }
.ask-msg .ask-answer { display: block; margin: 4px 0; }
.ask-wrong input { font: inherit; font-size: .85rem; padding: 2px 6px; width: min(280px, 60vw); }
.linkish { border: 0; background: none; padding: 0; color: var(--link); font: inherit; cursor: pointer; text-decoration: underline; }
.chip { border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text); font: 500 .74rem/1.2 var(--font); padding: 3px 8px; margin: 2px 3px; cursor: pointer; border-radius: 12px; }
.chip:hover { border-color: var(--text); }
@media (max-width: 700px) { .ask-input { flex-basis: 100%; } }
.btn[hidden] { display: none; }
.btn.mic { width: 32px; height: 32px; padding: 0; justify-content: center; }
.btn.mic.on { border-color: var(--wrong); color: var(--wrong); animation: mic-pulse 1.2s ease-in-out infinite; }
@keyframes mic-pulse { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .btn.mic.on { animation: none; } }
.home-ask { margin: 0 0 10px; border-color: var(--border-strong); }

/* Ads, tip jar and Pro. Ad slots take no room until something fills them. */
.ad-slot[hidden] { display: none; }
.ad-slot { margin: 12px 0; padding: 6px 8px; border: 1px solid var(--border); background: var(--surface); text-align: center; min-height: 60px; overflow: hidden; }
.ad-slot .ad-label { display: block; font-size: .62rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 4px; text-align: left; }
.ad-slot.placeholder { border: 2px dashed var(--border-strong); color: var(--muted); display: grid; place-items: center; min-height: 90px; font-size: .8rem; }
.ad-wrap:empty, .ad-wrap:has(> .ad-slot[hidden]) { display: none; }
.pro-box { max-width: 640px; }
.pass-code { font-size: .95rem; padding: 4px 8px; background: var(--surface-2); border: 1px solid var(--border-strong); user-select: all; }
.ok-note { color: var(--right); font-weight: 500; }
/* The dashboard maker has its own slot under the board; the page-wide top slot would push the board down. */
#ad-top:has(+ main.flush) { display: none; }
/* Ask conversation: a short log under the box. */
.ask-thread { flex: 1 1 100%; order: 3; display: flex; flex-direction: column; gap: 2px; max-height: 150px; overflow: auto; font-size: .8rem; }
.ask-thread:empty { display: none; }
.ask-turn { display: flex; flex-wrap: wrap; gap: 0 8px; padding: 2px 0; border-bottom: 1px solid var(--grid); }
.ask-turn .you { color: var(--text); }
.ask-turn .did { color: var(--text-2); }
.ask-thread > .linkish { align-self: flex-end; font-size: .76rem; position: sticky; top: 0; background: var(--surface); padding: 0 2px; }
.ask-msg { order: 4; }
/* Privacy and terms */
.legal > * { max-width: 820px; }   /* the column sits on the page grid, left, as every other page (and the sister sites) */
.legal-sec h2 { font-size: 1.05rem; margin: 22px 0 6px; }
.legal-sec p, .legal-sec li { line-height: 1.55; color: var(--text-2); }
.legal li a { text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
.legal-now { margin: 12px 0 4px; padding: 10px 14px; background: var(--surface-2); }
.legal-now h2, .legal-now h3 { margin: 0 0 4px; font-size: .9rem; text-transform: uppercase; letter-spacing: .04em; }
.legal-now ul { margin: 0; padding-left: 18px; font-size: .88rem; }

/* ============================================================
   Home: the dashboard maker's advertisement, with a looping demo.
   Motion eases out on an expo curve and staggers by --i.
   ============================================================ */
.home { --ease: cubic-bezier(.16, 1, .3, 1); --la: var(--s1); --lb: var(--s2); }
.hero-ad { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 28px; align-items: center; padding: 30px 0 22px; }
@media (max-width: 1020px) { .hero-ad { grid-template-columns: minmax(0, 1fr); gap: 18px; padding-top: 20px; } }
.eyebrow { margin: 0 0 8px; font: 700 .78rem/1 var(--display); text-transform: uppercase; letter-spacing: .12em; color: var(--brand-ink); }
.hero-title { font-size: clamp(2.1rem, 4.4vw, 3.4rem); line-height: 1.02; margin: 0 0 14px; text-transform: uppercase; letter-spacing: -.01em; }
.hero-title .line { display: block; overflow: hidden; padding-bottom: .04em; }
.hero-title .line > span { display: inline-block; animation: line-up .9s var(--ease) both; }
.hero-title .line + .line > span { animation-delay: .09s; }
.hero-title .accent { color: var(--brand); }
@keyframes line-up { from { transform: translateY(105%); } }
.lede { font-size: 1.05rem; color: var(--text-2); margin: 0 0 16px; max-width: 46ch; }
.home-ask { margin: 0 0 10px; border: 2px solid var(--frame); padding: 8px 10px; }
.home-ask .ask-input { font-size: 1rem; }
.try { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .8rem; }
.try-chip { border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); padding: 4px 9px; font: 500 .8rem/1.2 var(--font); cursor: pointer; transition: border-color .15s, background .15s; }
.try-chip:hover { border-color: var(--brand); background: var(--row-hover); }
.hero-note { margin: 12px 0 0; font-size: .82rem; color: var(--muted); }
.hero-also { margin: 6px 0 0; font-size: .82rem; }

/* The demo window. Decorative (aria-hidden); a hidden paragraph describes it. */
.demo-wrap { position: relative; min-width: 0; padding-bottom: 42px; } /* the links under the demo clear its 8px offset shadow */
.demo-wrap.demo-none { display: none; }
.demo { position: relative; border: 2px solid var(--frame); background: var(--surface); box-shadow: 8px 8px 0 var(--surface-3); overflow: hidden; transition: opacity .5s; }
.demo.fade { opacity: 0; }
.demo-chrome { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; background: var(--header-bg); color: var(--header-muted); font-size: .72rem; }
.demo-chrome i { width: 9px; height: 9px; border-radius: 50%; background: #555; }
.demo-url { margin-left: 8px; padding: 2px 10px; background: #2a2a2a; color: #cfcfcf; flex: 1 1 auto; min-width: 0; max-width: 260px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-share { margin-left: auto; padding: 3px 10px; border: 1px solid #555; color: #eee; font-weight: 600; transition: transform .15s, background .15s; }
.demo-share.pressed { transform: scale(.94); background: var(--brand); border-color: var(--brand); }
.demo-ask { display: flex; align-items: center; gap: 8px; margin: 10px 10px 0; padding: 6px 8px; border: 1px solid var(--frame); font-size: .85rem; }
.demo-mark { font: 700 .72rem/1 var(--display); text-transform: uppercase; letter-spacing: .06em; color: var(--brand-ink); white-space: nowrap; }
.demo-field { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; display: flex; align-items: center; }
.demo-caret { display: inline-block; flex: none; width: 2px; height: 1.1em; margin-left: 1px; background: var(--text); animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.demo-btn { padding: 4px 10px; background: var(--ink-btn); color: var(--ink-btn-text); font-weight: 600; font-size: .75rem; white-space: nowrap; transition: transform .15s; }
.demo-btn.pressed { transform: scale(.92); }
.demo-status { height: 26px; margin: 0 10px; padding: 6px 0 0; font-size: .75rem; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transition: opacity .25s; }
.demo-status.on { opacity: 1; }
.demo-dots { display: inline-flex; gap: 4px; }
.demo-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: dot-bob 1.1s ease-in-out infinite; }
.demo-dots i:nth-child(2) { animation-delay: .15s; }
.demo-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot-bob { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-4px); opacity: 1; } }
.demo.held, .demo.held * { animation-play-state: paused !important; }

.demo-board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: 74px minmax(0, 1fr) 118px; gap: 8px; height: 370px; margin: 4px 10px 10px;
  transition: grid-template-rows .7s var(--ease), row-gap .7s var(--ease); }
.demo-w { min-width: 0; min-height: 0; overflow: hidden; border: 1px solid var(--frame); background: var(--surface); padding: 6px 8px; opacity: 0; transform: translateY(12px) scale(.97);
  transition: opacity .35s, transform .7s var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
.demo-board.on .demo-w { opacity: 1; transform: none; }
/* While the demo types, the board area shows the dashboard maker's dotted canvas rather than
   a blank white box that reads as a page still loading. */
.demo-board { background-image: radial-gradient(var(--border-strong) 1px, transparent 1.2px); background-size: 18px 18px; background-position: -4px -4px; }
.demo-w .k { display: block; font: 700 .62rem/1.2 var(--display); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-tile .vals { display: flex; align-items: baseline; gap: 8px; margin: 3px 0 1px; }
.demo-tile .v, .demo-tile .v2 { font: 700 1.35rem/1 var(--display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.demo-tile .v2 { display: none; color: var(--lb); }
.demo-tile .sub { display: block; font-size: .64rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmp .demo-tile .v { color: var(--la); }
.cmp .demo-tile .v2 { display: inline; animation: pop-in .5s var(--ease); }
.cmp .demo-tile .v, .cmp .demo-tile .v2 { font-size: 1.1rem; }
@keyframes pop-in { from { opacity: 0; transform: translateY(6px); } }

.demo-barsw { grid-column: 1 / 3; }
.demo-linew { grid-column: 3 / 5; }
.demo-tablew { grid-column: 1 / 5; }
.demo-chart { display: flex; flex-direction: column; }
.demo-chart svg { flex: 1; width: 100%; min-height: 0; margin-top: 4px; overflow: visible; }
.demo-ch-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 8px; align-items: center; }   /* full names can push the legend to a second line */
.demo-legend { display: none; gap: 4px; align-items: center; font-size: .62rem; color: var(--muted); white-space: nowrap; }
.demo-legend i { width: 8px; height: 8px; display: inline-block; }
.demo-legend .la { background: var(--la); }
.demo-legend .lb { background: var(--lb); margin-left: 4px; }
.cmp .demo-legend { display: inline-flex; animation: pop-in .4s var(--ease); }
.demo-x { display: flex; justify-content: space-between; font-size: .58rem; color: var(--muted); }
.demo-chart .axis { stroke: var(--border-strong); stroke-width: 1; vector-effect: non-scaling-stroke; }
.demo-chart .zero { stroke: var(--border-strong); stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.bar-a, .bar-b { transform-box: fill-box; transform-origin: 0 100%; transform: scaleY(0); transition: transform .9s var(--ease); transition-delay: var(--d, 0ms); }
.bar-a { fill: var(--la); }
.bar-b { fill: var(--lb); }
.grown .bar-a { transform: scaleY(1); transition-delay: calc(var(--d, 0ms) + 250ms); }
.cmp .bar-a { transform: scaleX(.543); transition-delay: 0ms; }
.cmp .bar-b { transform: scaleY(1); }
.line-a, .line-b { fill: none; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; clip-path: inset(0 100% 0 0); transition: clip-path 1.2s var(--ease); }
.demo-chart .dots { stroke-width: 7; }
.line-a { stroke: var(--la); }
.line-b { stroke: var(--lb); }
.area-a { fill: var(--la); opacity: 0; transition: opacity .8s .6s; }
.grown .line-a { clip-path: inset(0 0 0 0); transition-delay: .35s; }
.grown .area-a { opacity: .12; }
.cmp .line-b { clip-path: inset(0 0 0 0); }
.cmp .area-a { opacity: 0; transition-delay: 0s; }

.demo-tablew table { width: 100%; border-collapse: collapse; font-size: .68rem; font-variant-numeric: tabular-nums; margin-top: 3px; }
.demo-tablew th, .demo-tablew td { text-align: right; padding: 2px 4px; border-bottom: 1px solid var(--grid); white-space: nowrap; }
.demo-tablew th:first-child, .demo-tablew td:first-child { text-align: left; }
.demo-tablew th { font-weight: 700; color: var(--muted); }
.demo-tablew tbody tr { opacity: 0; transform: translateX(-8px); transition: opacity .3s, transform .5s var(--ease); }
.grown .demo-tablew tbody tr { opacity: 1; transform: none; }
.grown .demo-tablew tbody tr:nth-child(2) { transition-delay: .06s; }
.grown .demo-tablew tbody tr:nth-child(3) { transition-delay: .12s; }
.grown .demo-tablew tbody tr:nth-child(4) { transition-delay: .18s; }
.grown .demo-tablew tbody tr:nth-child(5) { transition-delay: .24s; }
.demo-tablew .cmp-rows { display: none; }
.cmp .demo-tablew tbody.cmp-rows { display: table-row-group; }
.cmp .demo-tablew thead.cmp-rows { display: table-header-group; }
.cmp .demo-tablew thead:not(.cmp-rows), .cmp .demo-tablew tbody:not(.cmp-rows) { display: none; }
.cmp .demo-tablew tbody.cmp-rows tr:first-child td:first-child { color: var(--la); font-weight: 700; }
.cmp .demo-tablew tbody.cmp-rows tr:last-child td:first-child { color: var(--lb); font-weight: 700; }

/* "only leave the charts": tiles and table fade and sink first, then their rows fold away and
   the charts grow into the room. Padding and borders ease out with the rows; snapped to zero
   at once they made the whole board jump. */
.demo-board.only-charts { grid-template-rows: 0 minmax(0, 1fr) 0; row-gap: 0;
  transition: grid-template-rows .8s var(--ease) .22s, row-gap .8s var(--ease) .22s; }
.demo-board.only-charts .demo-tile, .demo-board.only-charts .demo-tablew { opacity: 0; transform: scale(.96); padding-block: 0; border-width: 0; border-color: transparent;
  transition: opacity .28s, transform .4s var(--ease), padding .8s var(--ease) .22s, border-width .8s var(--ease) .22s, border-color .28s; }
.demo-board.only-charts .demo-tile { transform-origin: 50% 0; }
.demo-board.only-charts .demo-tablew { transform-origin: 50% 100%; }

.demo-toast { position: absolute; right: 14px; bottom: 14px; padding: 8px 12px; background: var(--header-bg); color: #eee; font-size: .78rem; border-left: 4px solid var(--brand);
  opacity: 0; transform: translateY(24px); transition: transform .5s var(--ease), opacity .3s; }
.demo-toast.on { transform: none; opacity: 1; }
.demo-toast .muted { color: #bdbdbd; }
.demo-cursor { position: absolute; left: 0; top: 0; width: 18px; height: 18px; opacity: 0; transform: translate(60%, 70%); transition: transform .7s var(--ease), opacity .2s; pointer-events: none; z-index: 2; }
.demo-cursor.on { opacity: 1; }
.demo-cursor svg { width: 18px; height: 18px; fill: #111; stroke: #fff; stroke-width: 1.2; }
.demo-pause { position: absolute; right: 0; bottom: 0; border: 0; background: none; color: var(--muted); font-size: .75rem; cursor: pointer; text-decoration: underline; padding: 4px 0; }
.demo-pause:hover { color: var(--text); }
.demo-foot { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; align-items: center; }
.demo-foot .demo-pause { position: static; }
.demo-open { font-size: .8rem; font-weight: 700; color: var(--link); }
.demo-link { cursor: pointer; }
.demo-link:hover { box-shadow: 8px 8px 0 var(--accent, var(--surface-3)); }

@media (max-width: 640px) {
  .demo-board { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: 64px 64px minmax(0, 1fr) minmax(0, 1fr); height: 440px; }
  .demo-barsw, .demo-linew { grid-column: 1 / 3; }
  .demo-tablew { display: none; }
  .demo-board.only-charts { grid-template-rows: 0 0 minmax(0, 1fr) minmax(0, 1fr); }
  .demo { box-shadow: 5px 5px 0 var(--surface-3); }
}

/* Sections below the fold. */
.home-sec { margin-top: 44px; }
.home-h { font-size: 1.5rem; text-transform: uppercase; letter-spacing: .01em; margin: 0 0 12px; }
.home-h-row { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; margin-bottom: 12px; }
.home-h-row .home-h { margin: 0; }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s, transform .9s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
.reveal.in { opacity: 1; transform: none; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 2px solid var(--frame); }
.how-step { padding: 16px 18px 18px 0; }
.how-step + .how-step { padding-left: 18px; border-left: 1px solid var(--border); }
.how-step:nth-child(2) { --i: 1; }
.how-step:nth-child(3) { --i: 2; }
.step-n { display: block; font: 700 2.6rem/1 var(--display); color: var(--brand); margin-bottom: 6px; }
.how-step h3 { font-size: 1.15rem; text-transform: uppercase; margin: 0 0 4px; }
.how-step p { margin: 0 0 8px; color: var(--text-2); }
.step-eg { font-size: .85rem; color: var(--muted); font-style: italic; margin: 0; }
@media (max-width: 800px) { .steps { grid-template-columns: minmax(0, 1fr); } .how-step, .how-step + .how-step { padding: 14px 0; border-left: 0; border-bottom: 1px solid var(--border); } }
.examples { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 10px; }
.example { position: relative; display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 14px 16px 12px; border: 1px solid var(--frame); border-left: 4px solid var(--frame); background: var(--surface); color: var(--text); cursor: pointer; font: inherit;
  transition: opacity .6s, transform .5s var(--ease), border-color .2s, box-shadow .3s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
.example q { font: 700 1.05rem/1.2 var(--display); quotes: "\201C" "\201D"; }
.example span { color: var(--muted); font-size: .82rem; }
.example .go { color: var(--brand); font-weight: 700; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; opacity: 0; transform: translateX(-6px); transition: opacity .2s, transform .3s var(--ease); }
.example.in:hover, .example.in:focus-visible { border-left-color: var(--brand); transform: translateY(-3px); box-shadow: 4px 4px 0 var(--surface-3); transition-delay: 0ms; }
.example:hover .go, .example:focus-visible .go { opacity: 1; transform: none; }
@media (hover: none) { .example .go { opacity: 1; transform: none; } }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 2px solid var(--frame); background: var(--surface); }
.fact { padding: 16px 18px; }
.fact + .fact { border-left: 1px solid var(--border); }
.fact:nth-child(2) { --i: 1; }
.fact:nth-child(3) { --i: 2; }
.fact:nth-child(4) { --i: 3; }
.fact b { display: block; font: 700 2.8rem/1 var(--display); font-variant-numeric: tabular-nums; }
.fact span { color: var(--text-2); font-size: .85rem; }
@media (max-width: 800px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } .fact:nth-child(3) { border-left: 0; } .fact:nth-child(n+3) { border-top: 1px solid var(--border); } }
.by-hand { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; justify-content: space-between; padding: 18px 20px; border: 1px solid var(--frame); border-left: 6px solid var(--brand); background: var(--surface); }
.by-hand .home-h { margin-bottom: 4px; }
.by-hand p { margin: 0; max-width: 56ch; }
.home .tool-links { margin-bottom: 30px; }
@media (prefers-reduced-motion: reduce) { .hero-title .line > span { animation: none; } .reveal { opacity: 1; transform: none; } }

/* Export menu opens leftward from the right end of the toolbar; the bare blank-board note. */
.pop .menu.right { left: auto; right: 0; }
.board-empty.bare { top: 40px; }
.board-empty.bare > div { background: var(--surface); border: 1px dashed var(--border-strong); padding: 12px 16px; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; justify-content: center; }
.board { color: var(--text); }
/* Toast: one line at the bottom of the screen, gone after a few seconds. */
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 120; background: var(--text); color: var(--bg); padding: 10px 14px; font-size: .85rem; max-width: calc(100% - 32px); box-shadow: 0 4px 18px rgba(0, 0, 0, .25); animation: toast-in .18s ease-out; }
.toast a { color: inherit; font-weight: 700; text-decoration: underline; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }
.box-head > :first-child { margin-right: auto; }
.box-head { display: flex; align-items: baseline; gap: 8px; }
.box-head h3 { margin: 0 0 4px; }

/* ---------- Graphics maker: controls on the left, the card on the right ---------- */
.gfx { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 20px; max-width: 1500px; margin: 0 auto; padding: 16px; align-items: start; }
.gfx-panel { display: flex; flex-direction: column; gap: 10px; }
.gfx-head h1 { margin: 0 0 2px; font-family: var(--display); font-size: 1.6rem; }
.gfx-head p { margin: 0; }
.gfx-sec { border: 1px solid var(--border); background: var(--surface); padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.gfx-sec h3 { margin: 0; font-family: var(--display); font-size: .95rem; text-transform: uppercase; letter-spacing: .03em; }
.gfx-sec .field { display: flex; flex-direction: column; gap: 3px; font-size: .78rem; color: var(--text-2); flex: 1; min-width: 0; }
.gfx-sec input[type=text], .gfx-sec input[type=search], .gfx-sec select { width: 100%; min-width: 0; }
.gfx-row { display: flex; gap: 8px; flex-wrap: wrap; }
.gfx-examples { display: flex; flex-wrap: wrap; gap: 6px; }
.gfx-layouts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.gfx-layouts button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 8px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); cursor: pointer; font: inherit; }
.gfx-layouts button span { font-size: .72rem; color: var(--muted); }
.gfx-layouts button[aria-pressed=true] { border-color: var(--frame); box-shadow: inset 0 -3px 0 var(--brand); background: var(--surface); }
.gfx-subj { border-left: 4px solid var(--tc); padding: 6px 0 6px 8px; display: flex; flex-direction: column; gap: 6px; }
.gfx-subj-top { display: flex; justify-content: space-between; gap: 6px; align-items: center; }
.gfx-subj-tools { display: inline-flex; gap: 3px; }
.gfx-subj-tools .btn.small { padding: 2px 7px; min-width: 26px; }
.gfx-photomode { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.gfx-jersey { align-self: flex-start; }
.gfx-span { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: .8rem; }
.gfx-span select { width: auto; }
.gfx-check { display: flex; gap: 6px; align-items: center; font-size: .82rem; }
/* Blind (who is who hidden): a bar above the card, big enough to find at a glance; outlined in the brand colour while on. */
.gfx-blind { margin: 0 0 8px; padding: 8px 12px; border: 2px solid var(--border-strong); background: var(--surface-2); }
.gfx-blind.on { border-color: var(--brand); }
.gfx-blind .gfx-check { font-size: .95rem; font-weight: 700; cursor: pointer; }
.gfx-blind .gfx-check input { width: 18px; height: 18px; }
.gfx-credit { margin: 6px 0 0; overflow-wrap: anywhere; }
/* What the card's numbers leave out (incomplete box scores), under the preview: read, not fine print. */
.gfx-caveat { margin: 6px 0 0; overflow-wrap: anywhere; color: var(--text); }
.gfx-acwrap { position: relative; }
.gfx-ac { position: absolute; z-index: 30; left: 0; right: 0; top: 100%; margin: 0; padding: 0; list-style: none; background: var(--surface); border: 1px solid var(--border-strong); max-height: 260px; overflow: auto; box-shadow: 0 6px 18px rgba(0, 0, 0, .18); }
.gfx-ac:empty { display: none; }
.gfx-ac li { padding: 6px 8px; cursor: pointer; font-size: .85rem; }
.gfx-ac li:hover, .gfx-ac li.on { background: var(--row-hover); }
.gfx-stats { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 3px; counter-reset: st; }
.gfx-stats li { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 4px 6px; background: var(--surface-2); font-size: .85rem; }
.gfx-stats li::before { counter-increment: st; content: counter(st); color: var(--muted); font-size: .72rem; width: 14px; }
.gfx-stats li > span:first-of-type { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gfx-games { display: flex; flex-direction: column; gap: 6px; }
/* The stats on the card, in their own panel: beside the preview on a wide screen, at the top of the settings where a third
   column would squeeze the card, directly under the preview on a tablet or phone. */
.gfx-statbox[hidden] { display: none; }
.gfx-statbox .gfx-stat-add { border: 2px solid var(--frame); font-weight: 600; }
.gfx-stat-limit { margin: 0; }
.gfx-statbox .gfx-stats li > .gfx-stat-name { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: visible; white-space: normal; overflow-wrap: anywhere; line-height: 1.2; }
.gfx-rm-word { display: none; }
.gfx-stat-off { color: var(--text); font-weight: 600; }
.gfx-statbox .gfx-subj-tools { flex-shrink: 0; align-items: center; }
.gfx .gfx-statbox .gfx-subj-tools .btn.small { white-space: nowrap; }
.gfx-statbox .gfx-subj-tools .gfx-stat-rm:not(:disabled) { color: var(--brand); border-color: var(--brand); font-weight: 700; }
.gfx-stat-sets { display: flex; flex-direction: column; gap: 4px; }
.gfx-stage { display: flex; flex-direction: column; gap: 14px; }
.gfx-frame { background: repeating-linear-gradient(45deg, var(--surface-2) 0 10px, var(--surface) 10px 20px); border: 1px solid var(--border); padding: 14px; display: flex; justify-content: center; }
.gfx-canvas { width: auto; height: auto; max-width: 100%; max-height: 68vh; display: block; box-shadow: 0 10px 34px rgba(0, 0, 0, .28); background: #111; }
.gfx-status { min-height: 1.2em; margin: 0; }
.gfx-status:empty { display: none; }

/* player: play button, scrubber, clock */
.gfx-player { display: flex; align-items: center; gap: 10px; }
.gfx-play { min-width: 92px; font-variant-numeric: tabular-nums; }
.gfx-scrub { flex: 1; min-width: 0; accent-color: var(--brand); }
.gfx-clock { font-variant-numeric: tabular-nums; white-space: nowrap; min-width: 88px; text-align: right; }

/* motion controls */
.gfx-motion { border: 1px solid var(--border); background: var(--surface); padding: 10px 12px; display: flex; flex-direction: column; gap: 10px; }
.gfx-motion-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.gfx-motion-label { font-family: var(--display); text-transform: uppercase; font-size: .85rem; letter-spacing: .03em; width: 72px; }
.gfx-motion-opts .field { display: flex; flex-direction: column; gap: 3px; font-size: .74rem; color: var(--text-2); text-transform: uppercase; letter-spacing: .03em; }
.gfx-motion-opts .seg { height: 28px; }
.gfx-anims { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; flex: 1; min-width: 0; }
.gfx-anims button { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 8px 4px 6px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); cursor: pointer; font: 600 .78rem/1 var(--font); }
.gfx-anims button:hover { border-color: var(--border-strong); }
.gfx-anims button[aria-pressed=true] { border-color: var(--frame); box-shadow: inset 0 -3px 0 var(--brand); background: var(--surface); }
/* each entrance button shows its own motion in miniature: three bars, on hover or when picked */
.gfx-demo { display: flex; flex-direction: column; gap: 3px; width: 46px; height: 26px; justify-content: center; }
.gfx-demo i { display: block; height: 6px; background: var(--text-2); transform-origin: center; }
.gfx-demo i:nth-child(1) { background: var(--brand); width: 100%; }
.gfx-demo i:nth-child(2) { width: 80%; }
.gfx-demo i:nth-child(3) { width: 90%; }
.gfx-anims button:hover .gfx-demo i, .gfx-anims button[aria-pressed=true] .gfx-demo i { animation: 1.6s cubic-bezier(.2, .8, .2, 1) infinite both; }
.gfx-anims button .gfx-demo i:nth-child(2) { animation-delay: .12s !important; }
.gfx-anims button .gfx-demo i:nth-child(3) { animation-delay: .24s !important; }
[data-anim=slide] .gfx-demo i { animation-name: gfx-slide !important; }
[data-anim=blinds] .gfx-demo i { animation-name: gfx-blinds !important; }
[data-anim=wipe] .gfx-demo i { animation-name: gfx-wipe !important; }
[data-anim=pop] .gfx-demo i { animation-name: gfx-pop !important; }
[data-anim=none] .gfx-demo i { animation: none !important; }
@keyframes gfx-slide { 0% { transform: translateX(-120%); opacity: 0; } 35%, 100% { transform: none; opacity: 1; } }
@keyframes gfx-blinds { 0% { transform: scaleY(0); filter: brightness(.4); } 30%, 100% { transform: none; filter: none; } }
@keyframes gfx-wipe { 0% { clip-path: inset(0 100% 0 0); } 35%, 100% { clip-path: inset(0 0 0 0); } }
@keyframes gfx-pop { 0% { transform: scale(.3); opacity: 0; } 22% { transform: scale(1.12); opacity: 1; } 34%, 100% { transform: none; } }

.gfx-actions { display: flex; flex-wrap: wrap; gap: 6px; }

/* ready-made cards, drawn live */
.gfx-gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.gfx-thumb { display: flex; flex-direction: column; gap: 5px; padding: 0 0 6px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); cursor: pointer; text-align: left; font: inherit; overflow: hidden; transition: transform .18s ease, box-shadow .18s ease; }
.gfx-thumb:hover, .gfx-thumb:focus-visible { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0, 0, 0, .2); }
.gfx-thumb canvas { width: 100%; height: auto; display: block; background: #111; }
.gfx-thumb > span { display: flex; flex-direction: column; gap: 1px; padding: 0 8px; font-size: .78rem; }
.gfx-thumb > span .muted { font-size: .7rem; }

/* layout buttons get a small picture of their shape */
.gfx-lay-ico { display: flex; gap: 2px; height: 16px; width: 34px; margin-bottom: 3px; }
.gfx-lay-ico i { flex: 1; background: var(--text-2); opacity: .55; }
.gfx-layouts button[aria-pressed=true] .gfx-lay-ico i { background: var(--brand); opacity: 1; }
.gfx-lay-ico[data-lay=h2h] i:nth-child(2) { flex: 1.4; background: var(--border-strong); }
.gfx-lay-ico[data-lay=games] i:first-child { flex: 1.3; }
.gfx-lay-ico[data-lay=bars] { flex-direction: column; justify-content: center; }
.gfx-lay-ico[data-lay=bars] i { flex: none; height: 4px; }
.gfx-lay-ico[data-lay=bars] i:nth-child(1) { width: 100%; }
.gfx-lay-ico[data-lay=bars] i:nth-child(2) { width: 65%; }
.gfx-lay-ico[data-lay=bars] i:nth-child(3) { width: 85%; }
@media (max-width: 900px) {
  .gfx { grid-template-columns: minmax(0, 1fr); padding: 12px 16px; }
  /* Phones: the preview first, then the stats on it and the editor, all in the page's one scroll (nothing is pinned or
     scrolls under it, 2026-11-06); motion, export and the ready-made cards follow the editor. */
  .gfx-stage { display: contents; }
  .gfx-frame { order: -3; padding: 8px; }
  /* (The Blind bar above the preview here too: it sat under the whole editor, 3,000 px down a phone, 2026-10-24.) */
  .gfx-blind { order: -4; }
  .gfx-credit { order: -2; }   /* the photos' credit in words, under the pinned preview */
  .gfx-caveat { order: -2; }
  .gfx-canvas { max-height: 70vh; }
  .gfx-player { order: -2; }
  .gfx-status { order: -1; }
  .gfx-statbox { order: -1; }
  .gfx-motion { order: 1; }
  .gfx-actions { order: 2; }
  .gfx-start { order: 3; }
  .gfx-anims { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gfx-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gfx-motion-label { width: 100%; }
}
.gfx > *, .gfx-sec, .gfx-subj { min-width: 0; }
.gfx-layouts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gfx-subj-top .seg { flex-shrink: 0; }

/* ---------- Account ---------- */
.account .acct-card { border: 1px solid var(--border); background: var(--surface); padding: 16px; display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; max-width: 100%; }
.account > .acct-card { max-width: 460px; }
.account .acct-card h2 { margin: 0; font-family: var(--display); font-size: 1.15rem; }
.acct-form { display: flex; flex-direction: column; gap: 10px; }
.acct-field { display: flex; flex-direction: column; gap: 4px; }
.acct-field > span:first-child { font-size: .8rem; font-weight: 600; color: var(--text-2); }
.acct-field input { width: 100%; }
.acct-form .btn { align-self: flex-start; }
.acct-msg { margin: 0; min-height: 1.2em; font-size: .88rem; }
.acct-msg.error { color: var(--wrong); }
.acct-code { font-family: ui-monospace, Consolas, monospace; font-size: 1.25rem; letter-spacing: .06em; padding: 10px 12px; background: var(--surface-2); border: 1px dashed var(--border-strong); user-select: all; margin: 0; overflow-wrap: anywhere; }
.acct-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.acct-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.acct-list li { display: flex; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--border); }
.acct-list li a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
/* A saved item's row: name, when, then Pin / Rename / Delete; on a phone the buttons wrap under the name. */
.acct-list li { flex-wrap: wrap; row-gap: 4px; }
.acct-list li a { flex-basis: 40%; }
.acct-when { display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.acct-pin-tag { font-weight: 700; color: var(--text); text-transform: uppercase; letter-spacing: .06em; font-size: .66rem; }
.acct-acts { display: flex; gap: 4px; margin-left: auto; }
.acct-rename { display: flex; gap: 6px; flex: 1; align-items: center; min-width: 0; }
.acct-rename input { flex: 1; min-width: 0; font-size: 16px; }
.acct-danger { border-top: 1px solid var(--border); padding-top: 12px; margin-top: 6px; }
.acct-danger h3 { margin: 0; font-size: 1rem; }
.btn.danger { background: var(--wrong); border-color: var(--wrong); color: #fff; }
.account-link { text-decoration: none; white-space: nowrap; }
.acct-mini { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; max-height: 200px; overflow: auto; }
.acct-mini a { font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-field .small { text-transform: none; letter-spacing: normal; font-weight: 400; }
.acct-card > .btn, .acct-card > a.btn, .acct-card > button { align-self: flex-start; }
/* The sign-in screen's three choices (Sign in, Create account, Sponsored account): one row, the
   full width of the card, so each is a comfortable tap on a phone. */
.account .seg.acct-tabs { display: flex; width: 100%; height: auto; }
.account .seg.acct-tabs button { flex: 1 1 0; min-width: 0; height: 36px; padding: 0 6px; white-space: normal; line-height: 1.15; font-size: .8rem; }
.acct-forgot { margin: 0; }
/* "Email me when new features launch": the box, a touch larger than a menu checkbox. */
.account .acct-updates { font-size: .9rem; }
.account .acct-updates input { width: 16px; height: 16px; margin: 0; flex: none; }
/* A sister site's choices all go to Pigskin Lab; Sign in, the usual one, stands out. */
.account .acct-choices button:first-child { background: var(--text); color: var(--bg); }
.acct-pro { display: inline-block; margin-left: 4px; padding: 2px 7px; background: var(--text); color: var(--bg); font: 700 .66rem/1.3 var(--font); letter-spacing: .06em; text-transform: uppercase; vertical-align: 2px; }

/* The creator portal (/creators, views/creators.js; the owner, 2026-11-04, as on Pigskin Lab): the form and the owner's
   number on the left, branding and the tools on the right; one column on a phone. */
.account .acct-card[hidden] { display: none; }
/* Your branding and your referral link, side by side near the top (2026-11-23); stacked on a phone (grid2). */
.account .acct-creator { margin-bottom: 16px; align-items: start; }
.account .acct-creator > .acct-card { margin-bottom: 0; scroll-margin-top: calc(var(--header-h, 0px) + 12px); }
.acct-brand-preview { display: flex; flex-direction: column; gap: 6px; }
.acct-brand-strip { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 10px 12px; border-radius: 6px; min-height: 52px; }
.acct-brand-who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.acct-brand-who img { height: 32px; width: auto; max-width: 96px; object-fit: contain; }
.acct-brand-who b { font-family: var(--display); font-size: 1.05rem; overflow-wrap: anywhere; }
.acct-brand-bar { width: 3px; height: 18px; flex: none; }
.acct-brand-credit { font-size: .75rem; margin-left: auto; }
.acct-logo-row { margin-top: 0; align-items: center; }
.acct-logo-now { height: 48px; width: auto; max-width: 144px; object-fit: contain; background: var(--surface-2); border-radius: 4px; }
.acct-colours { margin-top: 0; }
.acct-colours .acct-field input[type=color] { width: 64px; height: 34px; padding: 2px; }
.acct-logo-pick { position: relative; overflow: hidden; cursor: pointer; }
.acct-logo-pick input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }
.acct-logo-pick:focus-within { outline: 2px solid var(--accent, #1f6feb); outline-offset: 2px; }
.acct-copy { margin-top: 0; flex-wrap: nowrap; align-items: center; }
.acct-copy input { flex: 1 1 auto; min-width: 0; font-size: .85rem; }
.acct-copy .btn { flex: none; align-self: auto; }
/* The line in the download areas (public/js/brand-chip.js): one row of small chips, never a wall. */
.brand-chip[hidden] { display: none; }
.brand-chip { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: .82rem; margin: 6px 0; color: var(--text-2); }
.brand-chip a { font-weight: 600; text-decoration: none; }
.brand-chip a:hover { text-decoration: underline; }
.brand-chip .brand-chip-on { display: inline-flex; align-items: center; gap: 6px; }
.brand-chip .brand-chip-logo { height: 18px; width: auto; max-width: 54px; object-fit: contain; }
.brand-chip button.brand-chip-toggle { font: inherit; font-size: .78rem; line-height: 1.4; min-height: 0; min-width: 0; height: auto; padding: 1px 9px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2, transparent); color: inherit; cursor: pointer; }
.brand-chip button.brand-chip-toggle[aria-pressed=true] { background: var(--accent, #1f6feb); border-color: var(--accent, #1f6feb); color: #fff; }
.creators-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 16px; align-items: start; }
@media (max-width: 860px) { .creators-grid { grid-template-columns: minmax(0, 1fr); } }
.creators-main, .creators-side { min-width: 0; }
.creators .signin-gate { margin: 0 0 16px; max-width: none; }
.creators .signin-gate h2 { margin: 0 0 10px; font-family: var(--display); font-size: 1.25rem; }
.creators .acct-form select, .creators .acct-form textarea, .creators .acct-form input:not(.hp) { width: 100%; font-size: 16px; }
.creators .acct-form textarea { resize: vertical; min-height: 120px; }
.creators-phone { margin: 0; font: 700 1.5rem/1.2 var(--display); }
.creators-phone a { text-decoration: none; }
.creators-brand-row { display: flex; gap: 12px; align-items: center; }
.creators-brand-row p { margin: 2px 0 0; }
.creators-logo { width: 64px; height: 64px; object-fit: contain; border: 1px solid var(--border); background: var(--surface-2, var(--surface)); flex: none; }
.creators-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.creators-list a { font-weight: 600; }
/* "Your promo graphic" (views/promo.js, 2026-11-15): the preview first, then chips and one row of fields at a time. */
.promo-preview { margin: 8px 0; }
.promo-canvas { display: block; width: 100%; height: auto; max-height: 70vh; object-fit: contain; border: 1px solid var(--border); background: #0b1a2e; }
.promo-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.promo-chips { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.promo-chips .chip { font-size: .85rem; padding: 6px 12px; min-height: 36px; }
.promo-fields form { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.promo-fields input[type=text], .promo-fields select { font-size: 16px; min-width: 0; }
.promo-ask input { flex: 1 1 240px; }
.promo-pair > * { flex: 1 1 200px; }
.promo-pair > button { flex: 0 0 auto; }
.promo-status { margin: 6px 0; min-height: 1.2em; }
.promo-status.error { color: var(--wrong, #b3261e); }
.promo-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0 0; padding-top: 10px; border-top: 1px solid var(--border); }
.promo-row form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.promo-row input[type=text] { font-size: 16px; width: 14em; max-width: 100%; }

/* ---------- Home: the graphics maker section and its demo ---------- */
.gfx-ad { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 28px; align-items: center; }
.gfx-ad-copy p { max-width: 46ch; }
@media (max-width: 1020px) { .gfx-ad { grid-template-columns: minmax(0, 1fr); } }
.gdemo { position: relative; border: 2px solid var(--frame); box-shadow: 8px 8px 0 var(--surface-3); overflow: hidden; transition: opacity .5s; background: #0a0f1c; }
.gdemo.fade { opacity: 0; }
.gdemo.held, .gdemo.held * { animation-play-state: paused !important; }
.gd-segs { display: inline-flex; margin-left: auto; border: 1px solid #555; }
.gd-seg { padding: 3px 8px; color: #bbb; transition: background .2s, color .2s, transform .15s; }
.gd-seg.on { background: #eee; color: #111; font-weight: 700; }
.gd-seg.pressed, .gd-dl.pressed { transform: scale(.92); }
.gd-dl { margin-left: 6px; padding: 3px 10px; background: var(--brand-btn); color: #fff; font-weight: 700; transition: transform .15s; }
.gd-card { --ease: cubic-bezier(.16, 1, .3, 1); position: relative; aspect-ratio: 16 / 9; padding: 3.5% 5% 2%; display: flex; flex-direction: column; gap: 3%;
  background: repeating-linear-gradient(-45deg, rgba(255, 255, 255, .035) 0 14px, transparent 14px 46px), linear-gradient(135deg, #0a0f1c, #1a2233); color: #fff; font-family: var(--display); overflow: hidden; }
.gd-title { background: #f4f4f4; color: #0d0d0d; text-align: center; padding: .6% 0; border-bottom: 3px solid #f5c542; font-size: clamp(1rem, 2.6vw, 1.9rem); letter-spacing: .02em;
  transform: translateY(-140%); opacity: 0; transition: transform .6s var(--ease), opacity .3s; }
.s-title .gd-title { transform: none; opacity: 1; }
.gd-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 26% minmax(0, 1fr) 26%; gap: 1.2%; }
.gd-side { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 88%, #fff), color-mix(in srgb, var(--c) 60%, #000));
  transition: transform .75s var(--ease), opacity .4s; opacity: 0; }
.gd-side.a { transform: translateX(-115%); }
.gd-side.b { transform: translateX(115%); }
.s-sides .gd-side { transform: none; opacity: 1; }
.gd-ghost { position: absolute; inset: 0; display: grid; place-items: center; font-size: clamp(2rem, 7vw, 5rem); opacity: .14; letter-spacing: .02em; }
.gd-side canvas { position: absolute; left: 50%; top: 38%; width: 84%; height: auto; translate: -50% -50%; opacity: 0; transition: transform .9s var(--ease) .25s, opacity .4s .25s; }
.gd-side.a canvas { transform: rotate(-35deg) scale(.6); }
.gd-side.b canvas { transform: rotate(35deg) scale(.6); }
.s-sides .gd-side canvas { transform: none; opacity: 1; }
.gd-name { position: relative; background: rgba(0, 0, 0, .62); padding: 6% 4%; text-align: center; display: flex; flex-direction: column; }
.gd-name b { font-size: clamp(.9rem, 2.2vw, 1.6rem); }
.gd-name span { font-family: var(--font); font-size: clamp(.55rem, 1vw, .75rem); opacity: .8; }
.gd-rows { display: flex; flex-direction: column; gap: 2%; min-height: 0; }
.gd-row { position: relative; flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 4%; padding: 0 5%;
  background: #111; font-size: clamp(.95rem, 2.4vw, 1.8rem); clip-path: inset(0 50% 0 50%); transition: clip-path .5s var(--ease) calc(var(--i) * 170ms); }
.gd-row:nth-child(even) { background: #1b1b1b; }
.s-rows .gd-row { clip-path: inset(0 0 0 0); }
.gd-v { font-variant-numeric: tabular-nums; transition: color .35s, text-shadow .35s, opacity .35s; }
.va { text-align: center; }
.vb { text-align: center; }
.gd-lab { font-size: .52em; color: #a9b0bd; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; transition: opacity .35s; }
.s-lead .gd-row[data-lead="a"] .va, .s-lead .gd-row[data-lead="b"] .vb { color: #f5c542; text-shadow: 0 0 14px rgba(245, 197, 66, .55); animation: gd-glint .9s calc(var(--i) * 120ms) both; }
@keyframes gd-glint { 0% { transform: scale(1); } 35% { transform: scale(1.18); } 100% { transform: scale(1); } }
/* Bars: the numbers slide to the ends, bars grow from the centre line toward each side. */
.gd-bar { position: absolute; top: 22%; height: 56%; width: 0; transition: width .8s var(--ease) calc(var(--i) * 120ms); opacity: .92; }
.gd-bar.ba { right: 50%; background: var(--ca); }
.gd-bar.bb { left: 50%; background: var(--cb); }
.s-bars .gd-row.has-bar .gd-bar.ba { width: calc(var(--wa) * .36); }
.s-bars .gd-row.has-bar .gd-bar.bb { width: calc(var(--wb) * .36); }
.s-bars .gd-row.has-bar .gd-lab { opacity: 0; }
.s-bars .gd-row:not(.has-bar) { opacity: .35; transition: opacity .5s, clip-path .5s; }
.gd-row .gd-v { position: relative; z-index: 1; }
.gd-foot { display: flex; justify-content: space-between; font-family: var(--font); font-size: clamp(.5rem, .9vw, .7rem); color: #a9b0bd; }
.gd-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; transition: opacity .12s; }
.gd-flash.on { opacity: .85; }
.gd-toast { z-index: 3; }
@media (prefers-reduced-motion: reduce) {
  .gd-title, .gd-side, .gd-side canvas, .gd-row, .gd-bar, .gd-v { transition: none !important; animation: none !important; }
}

/* What crawlers read before the app starts (lib/og.js inject); replaced on load. */
.prerender { padding: 24px 0; }
.prerender h1 { font-family: var(--display); margin: 0 0 8px; }
.prerender h2 { font-size: 1rem; margin: 14px 0 4px; }
.prerender ul { display: flex; flex-wrap: wrap; gap: 2px 14px; list-style: none; margin: 0; padding: 0; font-size: .85rem; }

/* The tip strip under the header (public/js/pro.js decorateShell). */
.tip-strip { background: #1c1a14; border-bottom: 1px solid #3a3322; color: #d8d2c0; font-size: .85rem; }
.tip-strip .wrap { display: flex; align-items: center; justify-content: center; gap: 12px; padding-top: 6px; padding-bottom: 6px; flex-wrap: wrap; }
.tip-strip-link { color: #f2d27a; font-weight: 700; text-decoration: none; border: 1px solid #6b5a2a; padding: 3px 10px; }
.tip-strip-link:hover { background: #2e2716; }
.tip-strip-close { background: none; border: 0; color: #9a927e; font-size: 1.1rem; cursor: pointer; padding: 0 4px; line-height: 1; }
.tip-strip-close:hover { color: #fff; }
/* The close button's 44px tap area (a ::before wider than the 17px button, which sits 12px from the edge) ran 1px past the
   screen on phones, so every page scrolled sideways by a pixel. The strip clips it sideways only (2026-11-13). */
.tip-strip { overflow-x: clip; }
/* Phones keep the strip: "free during the beta" has to be seen there too. Compact, the line on its own row. */
@media (max-width: 600px) { .tip-strip { font-size: .78rem; } .tip-strip .wrap { gap: 6px 10px; padding-top: 5px; padding-bottom: 5px; } .tip-strip .wrap > span:first-child { flex-basis: 100%; text-align: center; } .tip-strip-link { padding: 2px 8px; } }

/* The tip ask after a download. */
.tip-nudge { position: fixed; right: 16px; bottom: 16px; z-index: 60; max-width: 340px; background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); border-top: 3px solid #d4a72c; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); padding: 12px 14px; animation: tip-in .25s cubic-bezier(.2, .8, .2, 1); }
.tip-nudge p { margin: 0 0 10px; font-size: .88rem; line-height: 1.4; }
.tip-nudge-row { display: flex; gap: 8px; }
.tip-nudge.leaving { opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s; }
@keyframes tip-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (max-width: 520px) { .tip-nudge { left: 12px; right: 12px; max-width: none; } }

/* The thank-you after a tip (public/js/pro.js): centred over a dimmed page. */
.tip-thanks-back { position: fixed; inset: 0; z-index: 80; background: rgba(0, 0, 0, .55); display: flex; align-items: center; justify-content: center; padding: 16px; animation: tip-fade .2s ease; }
.tip-thanks { background: var(--surface); color: var(--text); border-top: 5px solid #d4a72c; box-shadow: 0 24px 60px rgba(0, 0, 0, .4); max-width: 520px; width: 100%; padding: 32px 32px 28px; text-align: center; animation: tip-in .3s cubic-bezier(.2, .8, .2, 1); }
.tip-thanks-icon { font-size: 3rem; line-height: 1; margin-bottom: 10px; }
.tip-thanks h2 { font-family: var(--display); font-size: 2rem; margin: 0 0 10px; text-transform: uppercase; }
.tip-thanks p { font-size: 1.05rem; margin: 0 0 22px; color: var(--text-2); }
@keyframes tip-fade { from { opacity: 0; } to { opacity: 1; } }

/* Beta badge beside the logo: opens the feedback form (public/js/feedback.js). */
.beta-pill { align-self: center; border: 1px solid #6b5a2a; color: #f2d27a; font: 700 .66rem/1 var(--font); text-transform: uppercase; letter-spacing: .06em; padding: 4px 6px; white-space: nowrap; text-decoration: none; flex-shrink: 0; }
@media (min-width: 1366px) { .beta-pill { margin-left: -12px; } }   /* one-line header: sit close to the logo */
.beta-pill:hover { background: #2e2716; text-decoration: none; color: #ffe39a; }
/* "Check your spam" while the sending domain is new (account page). */
.acct-spam { background: #fff7e0; border-left: 3px solid #d4a72c; padding: 8px 10px; font-size: .9rem; color: #3a2f10; }
:root[data-theme="dark"] .acct-spam { background: #2a2414; color: #f0e2b8; }
.tip-strip-feedback { color: #d8d2c0; text-decoration: underline; text-underline-offset: 2px; }
.tip-strip-feedback:hover { color: #fff; }

/* Jargon with a hover explanation (public/js/glossary.js). */
.jargon { text-decoration: underline dotted; text-decoration-color: var(--muted); text-underline-offset: 3px; }

/* Phones: tighter cells, a capped name column (it stays pinned, so every pixel it takes is
   one the stats lose), bigger tap targets on the sortable headers, and a shadow on the
   right edge while there are more columns to swipe to. */
.tbl-wrap { position: relative; }
.tbl-wrap.more { box-shadow: inset -14px 0 10px -10px rgba(0, 0, 0, .28); }
@media (max-width: 600px) {
  table.stats { font-size: .78rem; }
  table.stats th, table.stats td { padding: 4px 5px; }
  table.stats thead tr:last-child th { padding-top: 9px; padding-bottom: 9px; }
  table.stats tbody td { padding-top: 6px; padding-bottom: 6px; }
  table.stats tr > :nth-child(2) { max-width: 118px; overflow: hidden; text-overflow: ellipsis; }
  table.stats td.rk { padding-left: 4px; padding-right: 3px; }
}

/* ---------- trend watch: summary and the by-team view ---------- */
.trend-summary { border: 1px solid var(--border); border-left: 4px solid var(--brand); background: var(--surface); padding: 10px 14px; margin: 12px 0 4px; max-width: 820px; }
.trend-summary p { margin: 0 0 6px; }
.trend-summary p:last-child { margin: 0; }
.trend-summary .lead { font-size: 1.02rem; }
.nowrap { white-space: nowrap; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; vertical-align: middle; flex: none; }
.dot.real { background: var(--real); } .dot.early { background: var(--early); } .dot.noise { background: var(--noise); } .dot.void { background: var(--void); }
.tgroups { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 10px; }
.tgroup { border: 1px solid var(--border); border-top: 3px solid var(--tc, var(--border)); background: var(--surface); padding: 8px 10px; }
.tgroup-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; }
.tgroup ul { list-style: none; margin: 0; padding: 0; }
.tgroup li a { display: flex; gap: 7px; align-items: baseline; padding: 5px 0; border-top: 1px solid var(--grid); color: var(--text); font-size: .84rem; line-height: 1.3; }
.tgroup li a .dot { transform: translateY(-1px); }
.tgroup li a .what { flex: 1; }
.tgroup li a .nums { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 700; }
/* The words are what matter (colour alone must not carry it); the colour is a quick cue. */
.tgroup .dir { font-weight: 600; font-size: .76rem; }
.tgroup .dir.up { color: var(--right); } .tgroup .dir.down { color: var(--wrong); }
.tgroup li a:hover .what { text-decoration: underline; }

/* ---------- glossary ---------- */
.gloss-index { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 4px 0 18px; font-size: .86rem; }
.gloss { max-width: 60em; margin: 0; }
.gloss dt { font: 700 1.1rem/1.3 var(--display); margin-top: 18px; padding-top: 10px; border-top: 1px solid var(--border); }
.gloss dd { margin: 4px 0 0; }
.gloss dd p { margin: 0 0 6px; }
.gloss-ex { color: var(--text-2); }
/* Glossary sections, the filter and each term's parts (public/js/views/glossary.js, from public/js/defs.js). */
.gloss-group { margin-top: 22px; }
.gloss-filter { width: 100%; max-width: 420px; min-height: 44px; margin: 4px 0 12px; font-size: 1rem; }
.gloss-k { color: var(--muted); font-weight: 600; }
.gloss-how, .gloss-src { color: var(--text-2); font-size: .92rem; }
.gloss-try a { display: inline-block; padding: 8px 0; min-height: 44px; box-sizing: border-box; }
.gloss dt[hidden], .gloss dd[hidden], .gloss-index[hidden] { display: none; }
/* How each stat is shown (lib/glossary.js: total, per game or rate), the key above the list, and the line a link lands on. */
.gloss-anchor { color: inherit; text-decoration: none; }
.gloss-anchor:hover { text-decoration: underline; }
.gloss-shown { margin: 0 0 6px; font-size: .92rem; overflow-wrap: anywhere; }
.gloss-chip { display: inline-block; padding: 1px 7px; border: 1px solid var(--border-strong); border-radius: 999px; font-size: .74rem; font-weight: 700; letter-spacing: .02em; background: var(--surface-2); color: var(--text); white-space: nowrap; }
.gloss-chip[data-form="total"], .gloss-chip[data-form="games"] { background: var(--surface-3); }
.gloss-chip[data-form="per-game"] { border-style: dashed; }
.gloss-chip[data-form="rate"], .gloss-chip[data-form="share"], .gloss-chip[data-form="game"] { background: var(--surface); }
.gloss-dir { font-weight: 600; }
.gloss-key { max-width: 60em; color: var(--text-2); margin: 0 0 12px; line-height: 1.8; }
.gloss-hit { outline: 2px solid var(--border-strong); outline-offset: 3px; }
/* The About page's glossary box: a sentence, the link and three sample entries. */
.about-gloss .btn { min-height: 44px; }
.about-gloss dl { margin: 12px 0 0; }
.about-gloss dt { font-weight: 700; margin-top: 10px; }
.about-gloss dd { margin: 2px 0 0; color: var(--text-2); font-size: .92rem; }
/* The explanation of a stat: on touch screens a tap-to-open card (public/js/jargon.js). */
.jargon-i { border: 0; background: none; color: var(--link, var(--brand)); font-size: .95em; padding: 0 2px 0 4px; margin: 0; cursor: pointer; line-height: 1; vertical-align: baseline; min-width: 22px; min-height: 22px; position: relative; }
.jargon-i::after { content: ''; position: absolute; inset: -11px; }
.jargon-pop { position: absolute; z-index: 90; background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); box-shadow: 0 6px 20px rgba(0, 0, 0, .25); padding: 10px 12px; font: 400 .86rem/1.4 var(--font); text-transform: none; letter-spacing: 0; text-align: left; white-space: normal; }
.jargon-pop b { display: block; margin-bottom: 4px; }
.jargon-pop p { margin: 0 0 6px; }
.jargon-pop .jargon-how, .jargon-pop .jargon-src, .jargon-pop .jargon-chart { color: var(--text-2); font-size: .82rem; }
.jargon-k { color: var(--muted); font-weight: 600; }
.jargon-pop a { display: inline-block; padding: 6px 0 2px; }
/* A widget title: the explanation is on the whole title, without underlining the tools. */
.w-title.jargon { text-decoration-thickness: 1px; }
.w-head > .jargon-i { flex: none; align-self: center; }
/* Ask's answer to "what is OPS?" (jargon.js defineItem). */
.define-answer .define-more { color: var(--text-2); }
.ask-gloss { font-size: .76rem; margin-left: 8px; }
/* "View the SQL" in an Ask reply's row, beside "What the stats mean" and looking like it (public/js/sqlview.js). */
.ask-sql { font-size: .76rem; margin-left: 8px; text-decoration: none; }
.ask-sql:hover { text-decoration: underline; }

/* ---------- teams index ---------- */
.team-index { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 14px; }
.team-div h2 { font-size: .9rem; border-bottom: 2px solid var(--text); padding-bottom: 3px; margin-bottom: 4px; }
.team-div ul { list-style: none; margin: 0; padding: 0; }
.team-div li { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--grid); }
.team-div li a:hover { text-decoration: none; }
.team-div li a:hover .tchip { text-decoration: underline; }
.team-div h2 { display: flex; justify-content: space-between; align-items: baseline; }
.team-div-cols, .team-rec { font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.team-div-cols { font-size: .7rem; font-weight: 600; }
.team-div-cols span, .team-rec span { display: inline-block; min-width: 3.2em; text-align: right; }
.team-season { max-width: 140px; margin-top: 8px; }

/* ---------- the dashboard's graphic widget ---------- */
.widget .wbody > .w-graphic { flex: 1; min-height: 0; width: 100%; object-fit: contain; }
.w-graphic-links { padding-top: 4px; text-align: right; color: var(--muted); }

/* ---------- "Edit dashboard": moving and resizing widgets, on every screen (build.js setEditing) ----------
   Outside it there is no grip and no resize corner, so a drag on a widget scrolls its table or reads its chart
   (the owner, 2026-09-29). In it, each widget is outlined and has its grip and corner. */
.dash-page:not(.editing) .board.cells .w-grip { display: none; }
/* The corner mark shows on the widget under the pointer. Signed out there is nothing to size. */
.board.cells .widget:not(:hover) .w-resize { background: none; }
.dash-page:not(.editing) .board.cells :is(.w-resize, .w-edge) { display: none; }
.dash-page.editing .edit-toggle { background: var(--text); color: var(--bg); border-color: var(--text); }
.dash-page.locked .edit-toggle { display: none; }
.w-grip { min-width: 24px; min-height: 24px; display: inline-grid; place-items: center; font-size: .95rem; }
/* ---------- phones: a reading view of the dashboard until "Edit dashboard" ---------- */
@media (max-width: 700px) {
  .dash-page:not(.editing) .dash-top > :not(.title-input):not(.edit-toggle):not(.share-btn):not(.sql-bar-btn) { display: none; }
  .dash-page:not(.editing) .focus-bar { display: none; }
  .dash-page:not(.editing) .board.stacked .wtools { display: none; }
  .dash-top .edit-toggle { order: -1; }
  .dash-top .share-btn { order: -1; }
  .dash-top .sql-bar-btn { order: -1; }
}

/* ---------- jargon on touch screens: a tap-to-open explanation ---------- */
.jargon-i { border: 0; background: none; color: var(--link); font-size: .95em; padding: 0 2px 0 4px; margin: 0; cursor: pointer; line-height: 1; vertical-align: baseline; min-width: 22px; min-height: 22px; }
.jargon-pop { position: absolute; z-index: 90; background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); box-shadow: 0 6px 20px rgba(0, 0, 0, .25); padding: 10px 12px; font: 400 .86rem/1.4 var(--font); text-transform: none; letter-spacing: 0; text-align: left; white-space: normal; }
.jargon-pop b { display: block; margin-bottom: 4px; }
.jargon-pop p { margin: 0 0 6px; }

/* The key to a two-tone bar chart (above or below a player's average, or the league's). */
.tone-key { display: flex; flex-wrap: wrap; gap: 2px 14px; margin: 0 0 4px; font-size: .74rem; color: var(--text-2); }
.tone-key-item { display: inline-flex; align-items: center; gap: 5px; }
.tone-key-item i { width: 10px; height: 10px; flex: none; }
/* Nothing on the board follows the focus (players each in his own season): greyed out. */
.focus-bar.idle { border-left-color: var(--border); opacity: .55; }
.focus-bar.idle select:disabled { cursor: not-allowed; }

/* Which games count (public/js/weekpick.js): the kind first, then the weeks as a sentence. */
.week-pick { display: flex; flex-direction: column; gap: 6px; }
.week-pick-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .82rem; }
.week-pick-line select { width: auto; }
.week-pick-line > span:first-child { min-width: 2.6em; }
.week-pick-says { margin: 0; font-size: .76rem; color: var(--text-2); }

/* ---------- the makers need an account (ui.js signInGate / signInBar) ---------- */
.signin-gate { max-width: 560px; margin: 48px auto; padding: 24px; border: 1px solid var(--border); border-top: 4px solid var(--brand); background: var(--surface); }
.signin-gate h1 { margin: 0 0 10px; font-family: var(--display); font-size: 1.5rem; }
.signin-gate p { margin: 0 0 10px; }
.signin-gate-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.signin-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 8px 12px; margin-bottom: 8px; border: 1px solid var(--border); border-left: 4px solid var(--brand); background: var(--surface); font-size: .86rem; }
/* A shared dashboard, signed out: the board to read, Share, and nothing that edits it. */
.dash-page.locked .dash-top > :not(.title-input):not(.share-btn):not(.sql-bar-btn) { display: none; }
.sql-bar-btn[hidden] { display: none; }
.dash-page.locked .focus-bar, .dash-page.locked .wtools, .dash-page.locked .dock, .dash-page.locked .h-e, .dash-page.locked .h-s, .dash-page.locked .h-se { display: none; }
.dash-page.locked .wbar { cursor: default; }
.dash-page.locked .title-input { border-color: transparent; background: none; }
/* A shared graphic, signed out: the card and its Play button, nothing that edits it. */
.gfx.locked { display: block; max-width: 1100px; margin: 0 auto; }
.gfx.locked .gfx-panel, .gfx.locked .gfx-motion, .gfx.locked .gfx-actions, .gfx.locked .gfx-start { display: none; }

/* ---------- plays widget (build.js renderPlays): a summary line, then every play ---------- */
.plays-sum { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0 0 6px; font-size: .82rem; color: var(--text-2); }
.plays-sum b { color: var(--text); font-variant-numeric: tabular-nums; }
.plays-table .tbl-wrap { flex: 1; min-height: 0; }
.plays-table table.stats td:last-child { white-space: normal; min-width: 340px; max-width: 640px; }
.plays-list { list-style: none; margin: 0; padding: 0; overflow: auto; flex: 1; min-height: 0; }
.plays-list li { padding: 6px 0; border-top: 1px solid var(--border); font-size: .82rem; }
.plays-list .plays-top { color: var(--text-2); font-variant-numeric: tabular-nums; }
.plays-list .plays-top b { color: var(--text); }
.plays-list .plays-descr { margin-top: 2px; line-height: 1.35; }
/* The spider's "Choose stats" line, under the chart (build.js renderRadar). */
.radar-pick { font-size: .76rem; padding-top: 2px; }
/* A ranking's profile chart says it is not the ranking (lib/boards.js profileChart): in full, on a phone too. */
.profile-note { font-size: .78rem; line-height: 1.25; padding: 0 2px 4px; white-space: normal; }
.widget:has(.profile-note) .w-title { white-space: normal; }
.dash-page.locked .radar-pick { display: none; }
.btn.preset[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }

/* ============================================================
   The sibling sites' own markup, in the same look.
   Everything above is Pigskin Lab's stylesheet as it is; below, the class
   names the siblings' engine uses (the dashboard maker, the graphics
   maker, widgets, tables, charts, Ask, dialogs) drawn the same way:
   square corners, frame borders, condensed uppercase heads.
   ============================================================ */

/* The page: <main> is the column (Pigskin Lab puts a .wrap inside it). */
main#app { width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 16px 40px; outline: none; }
main#app .wrap { padding: 0; max-width: none; }
/* The dashboard maker fills the window, with small side margins (Pigskin Lab's .wrap.wide); app.js sets .wide. */
main#app.wide { max-width: none; padding-bottom: 16px; }
/* Zero specificity, so Pigskin Lab's own picker rule above still wins: .84rem (13.4px), bold inside a .field. */
:where(button, input, select, textarea) { font: inherit; color: inherit; }
input[type="email"], input[type="password"], textarea { font: inherit; font-size: .84rem; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 0; padding: 3px 6px; min-width: 0; height: 30px; max-width: 100%; }
textarea { height: auto; resize: vertical; }
select { max-width: 100%; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.field { display: grid; gap: 2px; font-size: .68rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.field > input, .field > select, .field > textarea { color: var(--text); text-transform: none; letter-spacing: normal; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { border-color: var(--border-strong); background: var(--surface-2); }
a.btn:hover, .btn:hover, a:hover > .btn { text-decoration: none; }
a:has(> .btn):hover { text-decoration: none; }
.linkish { color: var(--link); }
.error { padding: 8px 0; }
.section { margin-top: 26px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Chips: the "Try" chips of the home page, square; a picked one is black. */
.chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.chips .chip, .chip { border-radius: 0; margin: 0; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); padding: 4px 9px; font: 500 .8rem/1.2 var(--font); cursor: pointer; }
.chips .chip:hover, .chip:hover { border-color: var(--brand); background: var(--row-hover); color: var(--text); }
.chip.on, .chip[aria-pressed="true"], .chip.on:hover { background: var(--text); color: var(--bg); border-color: var(--text); }

/* Tabs (older markup): the segmented control. */
.tabs { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--border-strong); margin: 0 0 12px; }
.tabs button { border: 0; border-right: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2); padding: 0 10px; height: 30px; font: 600 .78rem/1 var(--font); cursor: pointer; }
.tabs button:last-child { border-right: 0; }
.tabs button.on, .tabs button[aria-selected="true"] { background: var(--text); color: var(--bg); }

/* Panels: a card is Pigskin Lab's box. */
.card { background: var(--surface); border: 1px solid var(--frame); padding: 10px 12px; min-width: 0; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.card > h2 { font-size: 1.05rem; }
.card > h3 { font-size: 1rem; }
.grid2 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); }
.grid3 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid2 > *, .grid3 > * { min-width: 0; }
.page-head > p.muted { color: var(--text-2); }

/* ---------- Ask (public/js/ask.js): Pigskin Lab's ask bar ---------- */
.ask { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 6px 10px; border: 1px solid var(--frame); background: var(--surface); }
.ask::before { content: "\2726  Ask"; font: 700 .8rem/1 var(--display); text-transform: uppercase; letter-spacing: .06em; color: var(--text); white-space: pre; }
.ask input { flex: 1 1 300px; min-width: 0; height: 32px; font-size: .9rem; border: 1px solid var(--border-strong); background: var(--surface); padding: 3px 8px; box-shadow: none; }
.ask .btn { height: 32px; }
.ask .btn.ghost { width: 32px; padding: 0; justify-content: center; border-color: var(--border-strong); }
.ask.busy { opacity: .7; }
.ask-log { display: flex; flex-direction: column; gap: 2px; margin: 6px 0 0; max-height: 150px; overflow: auto; font-size: .8rem; }
.ask-log:empty { display: none; }
.ask-log .you, .ask-log .it { align-self: stretch; background: none; color: var(--text); padding: 2px 0; border-radius: 0; max-width: none; border-bottom: 1px solid var(--grid); }
.ask-log .you::before { content: "You: "; color: var(--muted); font-weight: 700; }
.ask-log .it { color: var(--text-2); }
.ask-log .it.miss { color: var(--wrong); }
.ask-log .read { font-size: .74rem; color: var(--muted); }
.ask-wrong { display: inline; margin-left: 8px; font-size: .76rem; color: var(--muted); }
@media (max-width: 700px) { .ask input { flex-basis: 100%; } }

/* ---------- the dashboard maker (views/build.js) ---------- */
/* The board: twelve columns of widgets in rows 78 px tall, inside Pigskin Lab's frame (.board-scroll). Its width is the
   design width (Width, or the window's at this zoom) and its zoom the board's, both set by build.js; Grid shows the
   lines. Empty, it is as tall as Pigskin Lab's and holds its "Start here" card (.board-empty). */
.board.cells { --cols: 12; --row: 78px; position: relative; left: auto; top: auto; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); grid-auto-rows: var(--row); align-content: start; gap: 10px; padding: 10px; transform: none;
  background-color: var(--board-bg, var(--surface-2)); background-image: none; min-height: max(640px, calc(100vh - var(--header-h, 53px) - 190px)); color: var(--text); }
.board.cells.grid-on { background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 20px 20px; }
.board.cells.empty { min-height: 1000px; }
/* Pigskin Lab's round chips: "try one" on the empty board, and the suggestions under Ask. */
.board.cells .board-empty .chip, .dash-page .ask-bar .chip { margin: 2px; border-radius: 12px; background: var(--surface-2); font-size: .74rem; padding: 3px 8px; }
.board.cells .board-empty .chip:hover, .dash-page .ask-bar .chip:hover { border-color: var(--text); background: var(--surface-2); }
.board.cells .board-empty .quick-start { justify-content: center; margin-top: 6px; }
.board.cells .board-empty .search { position: relative; }
.board.cells .board-empty .search-results { left: 0; right: auto; text-align: left; }
.dash-page .board-scroll { min-height: calc(100vh - var(--header-h, 53px) - 190px); scroll-margin-top: calc(var(--header-h, 53px) + 8px); }
.dash-page .data-note { margin: -2px 0 8px; }
.dash-page .ask-bar .ask-log { flex: 1 1 100%; order: 4; margin: 0; }
.dash-page .ask-bar .ask-ideas { flex: 1 1 100%; order: 3; display: flex; flex-wrap: wrap; align-items: center; gap: 2px; margin: 0; }
.dash-page .ask-bar .ask-ideas:empty { display: none; }
/* The board's filters as chips (each x takes off that one filter) and the Kept / Changed / Dropped line after every
   request (lib/facets.js, FR-01). The x is drawn 24 px and answers a 44 px tap (DESIGN_SYSTEM INT-02, INT-12). */
.ask-filters { flex: 1 1 100%; order: 5; display: flex; flex-direction: column; gap: 4px; font-size: .8rem; }
.ask-filters:empty { display: none; }
.ask-kept { margin: 0; color: var(--text-2); line-height: 1.45; }
.ask-kept b { color: var(--text); font-weight: 700; }
.filter-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.filter-chips > .muted { margin-right: 2px; }
.chip.filter-chip, .dash-page .ask-bar .chip.filter-chip { display: inline-flex; align-items: center; gap: 2px; margin: 0; min-height: 0; padding: 1px 2px 1px 10px; cursor: default; border-color: var(--text-2); background: var(--surface); border-radius: 999px; }
.chip.filter-chip:hover, .dash-page .ask-bar .chip.filter-chip:hover { border-color: var(--text-2); background: var(--surface); }
.chip-x { position: relative; z-index: 1; display: inline-grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 999px; background: none; color: var(--text-2); font: 700 1rem/1 var(--font); cursor: pointer; transition: background-color 120ms, color 120ms; }
.chip-x::before { content: ''; position: absolute; inset: -10px; }
.chip-x:hover, .chip-x:focus-visible { background: var(--surface-3); color: var(--text); }
.chip-x:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.chip.filter-chip.ro, .dash-page .chip.filter-chip.ro { padding: 2px 10px; cursor: default; border-color: var(--text-2); background: var(--surface); border-radius: 999px; font-size: .74rem; }
/* A shared board seen signed out: its filters under the sign-in bar, without the x (FR-01). */
.locked-filters { margin: 0 0 8px; padding: 6px 10px; border: 1px solid var(--frame); background: var(--surface); font-size: .8rem; }
.locked-filters:empty { display: none; }
.dash-page .pop .menu { z-index: 50; }
.board.cells > .widget { position: relative; background: var(--surface); border: 1px solid var(--frame); display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; }
.widget.dragging { opacity: .4; }
.widget.drop-before { box-shadow: -4px 0 0 var(--sel); }
.widget.drop-after { box-shadow: 4px 0 0 var(--sel); }
.w-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 3px 4px 3px 9px; min-height: 34px; border-bottom: 1px solid var(--border); }
.w-title { flex: 1; min-width: 0; font: 700 .9rem/1.2 var(--display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-tools { display: flex; gap: 1px; }
.w-tools button { width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid transparent; background: none; color: var(--text-2); cursor: pointer; font-size: .85rem; border-radius: 0; }
.w-tools button:hover { border-color: var(--border-strong); background: var(--surface-2); color: var(--text); }
.w-grip { cursor: grab; touch-action: none; }
.w-body { flex: 1; min-height: 0; padding: 4px 8px 6px; overflow: auto; position: relative; }
.w-body.chart { overflow: hidden; display: flex; flex-direction: column; }
/* A chart takes the room its key leaves, however many lines the key wraps to: a key of three clubs wrapped to two lines on a
   phone and pushed the seasons under the line chart out of its box (a fixed "100% - 24px", MLB story check, 2026-10-02). */
.w-body.chart > * { flex: none; }
.w-body.chart > .chart-box { flex: 1 1 0; min-height: 0; height: auto !important; }
.w-resize { position: absolute; width: 14px; height: 14px; right: -1px; bottom: -1px; cursor: nwse-resize; background: linear-gradient(135deg, transparent 55%, var(--border-strong) 55%); touch-action: none; z-index: 6; }
.w-edge { position: absolute; touch-action: none; z-index: 5; }
.w-edge-e, .w-edge-w { top: 12px; bottom: 12px; width: 6px; cursor: ew-resize; }
.w-edge-n, .w-edge-s { left: 12px; right: 12px; height: 6px; cursor: ns-resize; }
.w-edge-e { right: 0; } .w-edge-w { left: 0; } .w-edge-n { top: 0; } .w-edge-s { bottom: 0; }
.w-edge-nw, .w-edge-ne, .w-edge-sw { width: 12px; height: 12px; z-index: 6; }
.w-edge-nw { left: 0; top: 0; cursor: nwse-resize; } .w-edge-ne { right: 0; top: 0; cursor: nesw-resize; } .w-edge-sw { left: 0; bottom: 0; cursor: nesw-resize; }
.w-edge-e:hover, .w-edge-w:hover, .w-edge-n:hover, .w-edge-s:hover { background: color-mix(in srgb, var(--brand) 45%, transparent); }
.widget.answer { border-left: 4px solid var(--brand); }
.answer-text { font-size: 1rem; line-height: 1.45; }
.answer-text .answer-line { margin: 0 0 4px; }
.answer-text .answer-line:last-child { margin-bottom: 0; }
.note-text { white-space: pre-wrap; font-size: .9rem; }
@media (max-width: 720px) {
  .board.cells { --cols: 1; grid-auto-rows: auto; min-height: 400px; }
  .board.cells.empty { min-height: 1100px; }
  .board.cells > .widget { grid-column: 1 / -1 !important; grid-row: auto !important; min-height: 280px; }
  .board.cells > .widget.tiles-w, .board.cells > .widget.answer { min-height: 0; }
  .dash-page:not(.editing) .board.cells .w-tools > :not(.w-copy) { display: none; }
  .dash-page .board-scroll { min-height: 0; }
  .w-resize, .w-edge { display: none; }
  .w-body.chart { flex: none; height: 300px; }
  .widget.radar-w .w-body.chart { height: 430px; }
}
/* Stat tiles: Pigskin Lab's KPI strip. */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 0; border: 1px solid var(--border); height: 100%; align-content: stretch; }
.tile { padding: 8px 12px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-bottom: -1px; min-width: 0; background: var(--surface); display: flex; flex-direction: column; justify-content: center; }
.tile .k { font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .v { font: 700 1.55rem/1.1 var(--display); font-variant-numeric: tabular-nums; }
.tile .r { font-size: .72rem; color: var(--muted); }
.tile .r.best { color: var(--right); font-weight: 700; }
/* The add drawer and dialogs: Pigskin Lab's dock and help panel. */
.drawer { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 60; display: flex; justify-content: flex-end; }
.drawer-in { width: min(420px, 100%); height: 100%; background: var(--surface); border-left: 2px solid var(--frame); padding: 14px 16px; overflow: auto; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 10px 40px rgba(0, 0, 0, .28); }
.drawer-in h2 { margin: 0; font-size: 1rem; }
.modal { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 96; display: grid; place-items: center; padding: 16px; }
.modal-in { background: var(--surface); border: 2px solid var(--frame); padding: 12px 16px 16px; width: min(560px, 100%); max-height: 90vh; overflow: auto; display: grid; gap: 12px; }
.modal-in h2 { margin: 0; font-size: 1.05rem; }
/* ---------- "View the SQL" (public/js/sqlview.js): the button under a page that read data, and its panel ----------
   The panel is the site's dialog, wide enough for SQL; only a query's own block scrolls sideways, never the panel. */
.sql-foot { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 28px 16px 24px; text-align: center; }
.sql-foot[hidden] { display: none; }
.sql-foot .sql-sub { margin: 0; font-size: .82rem; color: var(--muted); }
.modal-in.sql-modal { width: min(900px, 100%); overflow-x: hidden; overscroll-behavior: contain; }
.sql-modal > * { min-width: 0; }
.sql-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: sticky; top: -12px; z-index: 1; background: var(--surface); margin: -12px 0 0; padding: 12px 0 8px; border-bottom: 1px solid var(--border); }
.sql-intro { margin: 0; font-size: .86rem; color: var(--text-2); }
.sql-list { display: grid; gap: 18px; min-width: 0; }
.sql-req { display: grid; gap: 10px; min-width: 0; }
.sql-req h3 { margin: 0; font-size: .86rem; overflow-wrap: anywhere; }
.sql-req h3 code { font: 600 .84rem/1.3 var(--mono); }
.sql-q { display: grid; gap: 6px; min-width: 0; border-left: 3px solid var(--border-strong); padding-left: 10px; }
.sql-qhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .8rem; color: var(--text-2); }
.sql-qhead b { color: var(--text); }
.sql-cached { margin: 0; font-size: .76rem; color: var(--muted); font-style: italic; }
.sql-code { margin: 0; padding: 8px 10px; max-width: 100%; overflow-x: auto; white-space: pre; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); font: .76rem/1.45 var(--mono); tab-size: 2; }
.sql-code code { font: inherit; }
.sql-params { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.sql-params li { min-width: 0; overflow-wrap: anywhere; }
.sql-params code { font: .74rem/1.4 var(--mono); color: var(--text-2); }
/* (A phone keeps a margin round the panel, as the site's other dialogs do: a tap there closes it.) */
@media (max-width: 600px) {
  .modal:has(> .sql-modal) { padding: 10px; }
  .modal-in.sql-modal { padding: 10px 12px 16px; }
  .sql-head { top: -10px; margin-top: -10px; padding-top: 10px; }
}
.picks { display: flex; gap: 6px; flex-wrap: wrap; }
.pick { display: inline-flex; gap: 4px; align-items: center; border: 1px solid var(--border-strong); background: var(--surface-2); padding: 2px 2px 2px 8px; font-size: .8rem; }
.pick button { border: 0; background: none; cursor: pointer; color: var(--muted); width: 22px; height: 22px; }
.pick button:hover { background: var(--surface-3); color: var(--text); }
.add-list { display: grid; gap: 0; border-top: 1px solid var(--border); }
.add-list button { text-align: left; border: 0; border-bottom: 1px solid var(--border); border-left: 4px solid var(--frame); background: var(--surface); padding: 8px 12px; cursor: pointer; color: var(--text); }
.add-list button:hover { background: var(--surface-2); border-left-color: var(--brand); }
.add-list b { display: block; font: 700 .85rem/1.2 var(--display); text-transform: uppercase; letter-spacing: .03em; }
.add-list span { font-size: .75rem; color: var(--text-2); }
.drawer .search, .modal .search { position: relative; }
.drawer .search input, .modal .search input { width: 100%; }
/* Search results: the header's list, and the makers' player pickers (shown with [hidden]). */
.search-results { display: block; }
.search-results a.on { background: var(--row-hover); text-decoration: none; }
.search-results a .muted { color: var(--muted); font-size: .78rem; }
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; z-index: 120; max-width: calc(100% - 32px); }
.toasts .toast { position: static; transform: none; animation: none; }

/* ---------- tables (public/js/table.js): the reference-site table ---------- */
.tbl-wrap { overflow: auto; border: 1px solid var(--frame); max-width: 100%; background: var(--surface); }
.w-body > .tbl-wrap { border-color: var(--border); }
table.tbl { border-collapse: collapse; width: 100%; font-size: .8rem; font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { padding: 3px 7px; border-bottom: 1px solid var(--grid); white-space: nowrap; text-align: right; }
.tbl th.l, .tbl td.l { text-align: left; }
.tbl thead th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); color: var(--text); font-weight: 700; border-bottom: 1px solid var(--border-strong); cursor: pointer; user-select: none; }
.tbl thead th:hover { background: var(--surface-3); }
.tbl th.sorted::after { content: " \25BC"; font-size: .6em; }
.tbl th.sorted.asc::after { content: " \25B2"; font-size: .6em; }
.tbl td { background: var(--surface); }
.tbl tbody tr:nth-child(even) td { background: var(--row-alt); }
.tbl tbody tr:hover td { background: var(--row-hover); }
.tbl tr.hl td { background: var(--row-hover); font-weight: 700; }
/* A table wider than its box keeps the name in view while it scrolls sideways (final audit 2026-11-13 polish 14: on a phone the
   standings' team names scrolled off). The name is the column after the rank, or the first when there is no rank. */
.tbl-wrap > .tbl:has(td.rk) tr > :nth-child(2), .tbl-wrap > .tbl:not(:has(td.rk)) tr > :first-child { position: sticky; left: 0; z-index: 1; box-shadow: inset -1px 0 0 var(--border); }
.tbl-wrap > .tbl:has(td.rk) thead tr > :nth-child(2), .tbl-wrap > .tbl:not(:has(td.rk)) thead tr > :first-child { z-index: 3; }
.tbl-wrap > .tbl tfoot td { background: var(--surface-2); }
/* A row of one game opens its game page (public/js/table.js gameRow); its date is the link. */
.tbl tr.game-row { cursor: pointer; }
.tbl a.game-link { font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.tbl .rk { width: 1%; }
.tbl td.rk { color: var(--muted); }   /* the rank number is grey; its heading stays the text colour, as on Pigskin Lab */
.team-dot { display: inline-block; width: 4px; height: 13px; margin-right: 6px; vertical-align: -2px; }
@media (max-width: 600px) {
  table.tbl { font-size: .78rem; }
  .tbl th, .tbl td { padding: 4px 5px; }
  .tbl tbody td { padding-top: 6px; padding-bottom: 6px; }
  .tbl td.rk { padding-left: 4px; padding-right: 3px; }
}

/* ---------- charts (public/js/charts.js) ---------- */
.chart-box { width: 100%; height: 100%; position: relative; }
.chart-box svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart-tip { position: absolute; pointer-events: none; background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); font-size: .78rem; line-height: 1.4; padding: 6px 8px; white-space: nowrap; z-index: 5; transform: translate(-50%, calc(-100% - 10px)); }
.legend { color: var(--text-2); }
.legend > span { display: inline-flex; align-items: center; }
.legend i { display: inline-block; width: 10px; height: 10px; margin-right: 5px; }

/* ---------- the graphics maker (views/graphic.js) ---------- */
.gfx.section { max-width: none; margin: 14px 0 0; padding: 0; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); }
.gfx-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.gfx-side h3 { margin: 0 0 6px; font-family: var(--display); font-size: .95rem; text-transform: uppercase; letter-spacing: .03em; }
.gfx-stage { position: sticky; top: calc(var(--header-h, 0px) + 12px); background: repeating-linear-gradient(45deg, var(--surface-2) 0 10px, var(--surface) 10px 20px); border: 1px solid var(--border); padding: 14px; display: grid; place-items: center; min-height: 300px; }
.gfx-stage svg { width: 100%; height: auto; max-height: 72vh; display: block; box-shadow: 0 10px 34px rgba(0, 0, 0, .28); }
.gfx-stage-only .gfx-stage { max-width: 1100px; margin: 0 auto; position: static; }
.subject { border: 0; border-left: 4px solid var(--tc, var(--frame)); padding: 6px 0 6px 8px; display: flex; flex-direction: column; gap: 6px; background: none; }
.subject-top { display: flex; justify-content: space-between; gap: 6px; align-items: center; font: 700 .9rem/1.2 var(--display); }
@media (max-width: 900px) {
  .gfx.section { grid-template-columns: minmax(0, 1fr); }
  .gfx-stage { position: sticky; top: 0; z-index: 5; padding: 8px; order: -1; min-height: 0; }
  .gfx-stage svg { max-height: 34vh; }
}

/* ---------- team marks (views/team.js, views/player.js) ---------- */
.team-head { display: flex; gap: 14px; align-items: center; }
.team-badge { width: 44px; height: 44px; display: grid; place-items: center; color: #fff; font: 700 .9rem/1 var(--display); letter-spacing: .02em; flex: none; }
.radar-pick { text-align: center; }

/* ---------- accounts (views/account.js) ---------- */
.account .page-head { display: block; }
.acct-msg:empty { display: none; }
.account .seg { flex-wrap: wrap; height: auto; width: fit-content; max-width: 100%; }
.account .seg button { height: 30px; }
.signin-bar span { flex: 1; min-width: 200px; }
.signin-gate .row { justify-content: flex-start !important; }

/* ---------- the header's logo mark and the footer's source notice ---------- */
.brand-logo { width: 30px; height: 30px; display: block; flex: none; margin: -4px -2px -4px 0; }
.site-footer .notice-src { flex-basis: 100%; font-size: .72rem; }

/* ---------- the graphics demo's bar on phones: buttons keep one line, the address gives way ---------- */
.gd-seg, .gd-dl { white-space: nowrap; }
@media (max-width: 480px) { .gdemo-wrap .demo-url { display: none; } .gd-seg { padding: 3px 6px; } .gd-dl { padding: 3px 8px; } }

/* "More from Mason Obegi" (the footer's sister-site cards, .site-family and .fam-*) comes with Pigskin Lab's own
   stylesheet above, byte for byte, so it is not repeated here: a rebuild keeps it. */

/* ---------- chart tooltips (public/js/charts.js): a pinned value, and the phone sheet's rows ----------
   A click or tap pins a tooltip; on a phone a game's numbers open in the bottom sheet, whose rows keep
   the label and the value apart as the floating tooltip's do. */
.tip-sheet .tt-r { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.tip-sheet .tt-r span:first-child { display: inline-flex; align-items: center; gap: 5px; color: var(--text-2); }
.tip-sheet .tt-r b { font-variant-numeric: tabular-nums; }
.tooltip .tt-sw, .tip-sheet .tt-sw { display: inline-block; width: 9px; height: 9px; flex: none; }
.tooltip.pinned { border-color: var(--text); }
.chart-box svg:focus { outline: none; }
.chart-box svg:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ---------- the header's eight links on one line at 1366px ----------
   Games (views/games.js) made eight links, as on Pigskin Lab; with these sites' longer names and a
   signed-in "My account" the last one (Trend watch) was cut off at 1366px, so the links sit closer there. */
@media (min-width: 1366px) and (max-width: 1499px) { .nav a { padding: 0 7px; letter-spacing: .02em; } }

/* ---------- a stat tile's rank floor and its two parts (public/js/widgets.js tiles) ----------
   Under the rank, the players it is over ("among 502+ plate appearances"); with postseason games in the span, what
   came in each part ("Regular season 60 (151 g) · Postseason 2 (4 g)"), on two lines on a narrow tile, the second
   without the separator. */
.tile .q { font-size: .66rem; color: var(--muted); line-height: 1.2; }
.tile .p { display: flex; flex-wrap: wrap; font-size: .66rem; color: var(--text-2); line-height: 1.25; margin-top: 3px; font-variant-numeric: tabular-nums; }
/* (Each part moves to its own line first; one still wider than the tile wraps its words: "Regular season .634 (82 g)"
   ran past a 126 px tile on an iPad and was cut, sweep 2026-10-04.) */
.tile .p span { white-space: normal; min-width: 0; }
.tile .p .sep { white-space: pre; }
.tile .p.wrapped .sep { display: none; }

/* ---------- a postseason game in a table (public/js/table.js): its round and game of the series ---------- */
.post-tag { display: inline-block; margin-left: 5px; padding: 0 4px; border: 1px solid var(--border); border-radius: 3px; background: var(--surface-2); color: var(--text); font-size: .66rem; font-weight: 700; letter-spacing: .03em; line-height: 1.35; white-space: nowrap; vertical-align: 1px; }

/* ---------- a widget's settings (public/js/views/build.js settings): Save and close and Discard changes ----------
   At the top right beside the title and again at the bottom; on a phone the pair drops under the title. */
.settings-head { justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.settings-head h2 { margin: 0; }
.settings-ways { display: inline-flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.settings-foot { justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }

/* ---------- suggestion chips under Ask (public/js/ask.js, lib/chips.js): a row of follow-ups, gone when empty ---------- */
.ask-chips { margin: 6px 0 2px; }
.ask-chips:empty { display: none; }

/* ---------- a widget's settings (⚙, public/js/views/build.js): the chart as the settings stand, above them ---------- */
.modal-in.settings-modal { width: min(760px, 100%); }
.settings-modal .w-body.settings-preview { flex: none; height: 260px; overflow: auto; border: 1px solid var(--border); background: var(--surface); }
/* Phones: the window is the whole screen and ONE scroll, the chart first at a fixed height, then every setting at full
   height, with room under the last. A small inner scroll box under a tall chart was too cramped to scroll with a thumb.
   Nothing in it stops a thumb that starts on the chart from scrolling (no touch-action: none there). */
@media (max-width: 700px) {
  .modal.settings-shade { padding: 0; place-items: stretch; }
  .modal-in.settings-modal { width: 100%; height: 100%; max-height: none; border: 0; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 0 10px 96px; }
  .settings-modal > * { flex: 0 0 auto; }
  .settings-modal .settings-head { position: sticky; top: 0; z-index: 2; background: var(--surface); padding: 8px 0 6px; margin: 0; border-bottom: 1px solid var(--frame); flex-wrap: nowrap; }
  .settings-modal .settings-head h2 { font-size: .95rem; min-width: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .settings-modal .settings-ways { display: flex; gap: 6px; flex-shrink: 0; }
  .settings-modal .settings-ways .btn { padding: 6px 10px; font-size: .8rem; }
  .settings-modal .w-body.settings-preview { height: 58vh; min-height: 280px; }
  .settings-modal .w-body.settings-preview.chart { overflow: hidden; }
}

/* The email box (public/js/feedback.js): a mailto: link (the legal pages' contact) opens this instead of the mail program.
   The address to copy, Copy, and "Open email app" for anyone who wants it. */
.fb-back { position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, .5); display: flex; align-items: center; justify-content: center; padding: 16px; animation: tip-fade .15s ease; }
.fb-box { position: relative; background: var(--surface); color: var(--text); border-top: 4px solid #d4a72c; box-shadow: 0 20px 50px rgba(0, 0, 0, .4); width: 100%; max-width: 440px; padding: 22px 22px 16px; animation: tip-in .2s cubic-bezier(.2, .8, .2, 1); }
.fb-title { font-family: var(--display); font-size: 1.35rem; text-transform: uppercase; margin: 0 36px 6px 0; }
.fb-prompt { margin: 0 0 12px; color: var(--text-2); }
.fb-row { display: flex; gap: 8px; align-items: stretch; }
.fb-addr { flex: 1; min-width: 0; display: flex; align-items: center; padding: 8px 10px; border: 1px solid var(--border-strong); background: var(--surface-2); font: 500 1rem/1.3 var(--font); overflow-wrap: anywhere; user-select: all; -webkit-user-select: all; cursor: text; }
.fb-row .fb-copy { height: auto; min-height: 44px; min-width: 88px; justify-content: center; font-size: .9rem; }
.fb-status { min-height: 1.3em; margin: 8px 0 0; font-size: .85rem; color: var(--text-2); }
.fb-alt { margin: 4px 0 0; font-size: .85rem; }
.fb-open-app { display: inline-block; padding: 8px 0; color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
.fb-close { position: absolute; top: 6px; right: 6px; width: 44px; height: 44px; background: none; border: 0; color: var(--muted); font-size: 1.5rem; line-height: 1; cursor: pointer; }
.fb-close:hover { color: var(--text); }
@media (max-width: 420px) { .fb-box { padding: 18px 16px 12px; } .fb-row { flex-direction: column; } .fb-row .fb-copy { width: 100%; } }

/* The feedback form (public/js/feedback.js openFeedback): in the site's own colours (--brand: NBA orange,
   MLB green, NHL blue). It shares the shade (.fb-back), so the page behind is locked while it is open. */
.fb-box.fb-form-box { max-width: 520px; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; border-top-color: var(--brand); }
.fb-form { display: flex; flex-direction: column; gap: 6px; }
.fb-field { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-top: 6px; font-weight: 600; font-size: .9rem; }
.fb-opt, .fb-count { font-weight: 400; font-size: .8rem; color: var(--text-2); }
.fb-count { font-variant-numeric: tabular-nums; }
.fb-text, .fb-email { width: 100%; box-sizing: border-box; font: 400 1rem/1.4 var(--font); padding: 8px 10px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); border-radius: 0; }
.fb-text { min-height: 120px; resize: vertical; }
.fb-text:focus-visible, .fb-email:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.fb-error { margin: 4px 0 0; color: var(--wrong, #b3261e); font-size: .88rem; font-weight: 600; }
.fb-error[hidden] { display: none; }
.fb-actions { display: flex; gap: 8px; margin-top: 10px; }
.fb-actions .btn { height: 40px; min-width: 96px; justify-content: center; font-size: .9rem; }
.fb-actions .btn.primary { background: var(--brand-btn); border-color: var(--brand-btn); color: #fff; }
.fb-form-box .fb-alt { margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--border); color: var(--text-2); }
.fb-alt-addr { color: var(--text); user-select: all; -webkit-user-select: all; overflow-wrap: anywhere; }
.fb-form-box .fb-copy { font-size: .85rem; padding: 6px 2px; }
@media (max-width: 420px) { .fb-actions .btn { flex: 1; } }
/* The feedback controls are buttons now (they open the form, not a mail program). */
button.beta-pill { background: transparent; cursor: pointer; }
button.tip-strip-feedback { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.site-footer .footer-feedback { color: var(--link); font-size: inherit; text-underline-offset: 2px; text-decoration-thickness: 1px; }
@media (pointer: coarse), (max-width: 700px) { .site-footer .footer-feedback { display: inline-flex; align-items: center; min-height: 32px; padding: 4px 0; } }

/* ---------- signing in: the moment before the shared sign-in page (account.js handoff()) ----------
   In this site's own colours, so the jump to pigskinlab.com is expected, not a surprise. */
.handoff { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 16px; background: var(--bg); }
.handoff-in { width: min(440px, 100%); display: grid; justify-items: center; gap: 10px; text-align: center; padding: 28px 22px 24px; background: var(--surface); border: 1px solid var(--border); border-top: 5px solid var(--brand); }
.handoff-logo { width: 72px; height: 72px; }
.handoff-logo.on-dark, :root[data-theme="dark"] .handoff-logo.on-light { display: none; }
:root[data-theme="dark"] .handoff-logo.on-dark { display: block; }
.handoff-site { margin: 0; font: 700 1.1rem/1 var(--display); letter-spacing: .06em; text-transform: uppercase; color: var(--brand-ink); }
.handoff h2 { margin: 0; font-size: 1.25rem; }
.handoff-note { margin: 0; color: var(--text-2); font-size: .9rem; max-width: 36em; }
.handoff-bar { width: 100%; height: 4px; background: var(--surface-3); overflow: hidden; margin: 6px 0 4px; }
.handoff-bar span { display: block; height: 100%; width: 100%; background: var(--brand); transform-origin: left; animation: handoff-fill 1s linear both; }
@keyframes handoff-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.handoff .btn.primary { background: var(--brand-btn); border-color: var(--brand-btn); color: #fff; min-width: 140px; justify-content: center; }
@media (prefers-reduced-motion: reduce) { .handoff-bar span { animation: none; } }

/* ---------- one game, drawn (public/js/gamewidgets.js): paired bars, the storyline, the game page's board ---------- */
.pair-key { margin: 0 0 6px; font-size: .75rem; }
.pair-rows { display: grid; grid-template-columns: fit-content(40%) minmax(0, 1fr) max-content; column-gap: 6px; row-gap: 8px; align-content: start; padding: 2px 4px 2px 0; }
.pair-row { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; row-gap: 2px; min-width: 0; }
.pair-label { grid-column: 1 / -1; font-size: .8rem; font-weight: 600; }
.pair-label .muted { font-weight: 400; }
/* The name column is as wide as its longest name, shared by every row (subgrid). A name is never cut: a long one wraps
   at 40% of the width. A fixed 64 px cut "Avg (117 g)" to "Avg (1…". */
.pair-bar { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: center; font-size: .78rem; }
.pair-name { color: var(--text-2); line-height: 1.15; }
@supports not (grid-template-columns: subgrid) {
  .pair-rows, .pair-row { display: flex; flex-direction: column; }
  .pair-rows { gap: 8px; }
  .pair-row { gap: 2px; }
  .pair-bar { grid-template-columns: 64px minmax(0, 1fr) 64px; column-gap: 6px; }
  .pair-name { overflow-wrap: anywhere; }
}
.pair-track { height: 12px; background: var(--surface-2); position: relative; min-width: 0; }
/* The bar's value end rounded and a soft sheen toward it, like the charts' bars (the owner, 2026-10-24: colour and pop); never an outline. */
.pair-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 0 3px 3px 0; }
.pair-fill::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(90deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, .22)); pointer-events: none; }
.pair-val { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.game-story { display: block; }
/* (The page grows a row to fit what is in it: the storyline and the paired bars show whole, not in a scroll box.) */
.game-board.board.cells { min-height: 0; background-image: none; padding: 0; background-color: transparent; margin: 14px 0 24px; grid-auto-rows: minmax(var(--row), auto); }
.game-board .widget .w-body:not(.chart) { overflow: visible; }
@media (max-width: 720px) {
  .board.cells > .widget.radar-w .w-body.chart, .game-board .widget.radar-w .w-body.chart { height: 430px; }
  .game-board .widget.story-w, .board.cells > .widget.story-w { min-height: 0; }
}
/* ---------- an open pop-up scrolls on its own; the page behind it is locked (ui.js syncScrollLock) ---------- */
.modal, .modal-in, .drawer, .drawer-in, .tip-sheet, .tip-sheet-body, .help-dialog, .help-panel, .fb-back, .fb-box, .handoff, .clip-menu { overscroll-behavior: contain; }
.modal-in, .drawer-in, .tip-sheet-body, .help-panel, .fb-box, .clip-menu { -webkit-overflow-scrolling: touch; }
.help-panel { max-height: 90vh; overflow: auto; }
html.scroll-locked { scrollbar-gutter: stable; }

/* ---------- an empty dashboard shows only what an empty board can use (build.js draw) ----------
   Nothing to move, clear, tidy, zoom, share or export yet: Add widget, Paste, Dashboards, Undo and Redo stay. On a
   phone those show without "Edit dashboard" (there is nothing to edit). */
.dash-page.empty-board .dash-top > .edit-toggle, .dash-page.empty-board .dash-top > .dash-clear, .dash-page.empty-board .dash-top > .desk-only:not([aria-label="Keyboard shortcuts"]),
.dash-page.empty-board .dash-top > .seg, .dash-page.empty-board .dash-top > .dash-fit, .dash-page.empty-board .dash-top > .inline-field,
.dash-page.empty-board .dash-top > .share-btn, .dash-page.empty-board .dash-top > .sql-bar-btn, .dash-page.empty-board .dash-top > .export-pop, .dash-page.empty-board .focus-bar { display: none; }
@media (max-width: 700px) {
  .dash-page.empty-board:not(.locked):not(.editing) .dash-top > .add-widget:not(.x), .dash-page.empty-board:not(.locked):not(.editing) .dash-top > .paste-pop:not(.x), .dash-page.empty-board:not(.locked):not(.editing) .dash-top > .saves-pop:not(.x) { display: inline-flex; }
}
/* The clipboard (build.js drawPaste): each copy with a tick, Paste one, remove one; Paste ticked, Paste all, Clear. */
.clip-menu { min-width: min(340px, calc(100vw - 32px)); max-height: min(420px, 70vh); overflow: auto; }
.clip-row { display: flex; align-items: center; gap: 6px; padding: 4px 0; border-bottom: 1px solid var(--border); }
.clip-row label { flex: 1; min-width: 0; }
.clip-row label > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clip-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
/* A shared board open to look at can be copied from: its widgets keep Copy and Save as PNG. */
.w-copy { font-size: 1rem !important; }

/* ---------- the graphics maker opens empty, and its two columns scroll on their own (views/graphic.js) ----------
   Things to try under Ask, in the dashboard maker's "Try:" style; in the card's place a short "here are a few things you
   can make" until there is a card, and no Play, export or share for a card that is not there (the owner, 2026-09-29). */
.gfx-ask .gfx-ideas { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; margin: 6px 0 2px; }
.gfx-ask .gfx-ideas .chip { margin: 2px; border-radius: 12px; background: var(--surface-2); font-size: .74rem; padding: 3px 8px; }
.gfx-ask .gfx-ideas .chip:hover { border-color: var(--text); background: var(--surface-2); }
.gfx-placeholder { display: none; width: 100%; border: 1px dashed var(--border-strong); background: var(--surface); padding: 22px 20px; }
.gfx-placeholder h2 { margin: 0 0 4px; font-family: var(--display); font-size: 1.35rem; }
.gfx-placeholder p { margin: 0 0 14px; }
.gfx-try { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.gfx-try-card { display: flex; flex-direction: column; gap: 3px; text-align: left; padding: 10px 12px; min-height: 44px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); cursor: pointer; font: inherit; }
.gfx-try-card:hover, .gfx-try-card:focus-visible { border-color: var(--frame); box-shadow: inset 0 -3px 0 var(--brand); }
.gfx-try-card .muted { font-size: .78rem; }
.gfx-stage.gfx-blank > .gfx-placeholder { display: block; }
.gfx-stage.gfx-blank > .gfx-frame, .gfx-stage.gfx-blank > .gfx-player, .gfx-stage.gfx-blank > .gfx-status, .gfx-stage.gfx-blank > .gfx-motion, .gfx-stage.gfx-blank > .gfx-actions { display: none; }
.gfx-stage > * { width: 100%; }
.gfx-stage > .gfx-player { width: auto; }
/* One page that scrolls (the owner, 2026-11-06: columns that each scrolled on their own made it unclear where to scroll
   and how far). Nothing in the maker scrolls inside itself: every column is its full height and the page scrolls.
   Side by side (over 900 px), the settings are on the left; the card, its motion and export, then the stats on the card,
   on the right. A very wide screen has room for the stats as a third column. */
@media (min-width: 901px) {
  .gfx:not(.locked):not(.section) { grid-template-rows: auto 1fr; }
  .gfx:not(.locked):not(.section) > .gfx-panel { grid-column: 1; grid-row: 1 / span 2; }
  .gfx:not(.locked):not(.section) > .gfx-stage { position: static; grid-column: 2; grid-row: 1; align-content: start; }
  .gfx:not(.locked):not(.section) > .gfx-statbox { grid-column: 2; grid-row: 2; }
  .gfx:not(.locked):not(.section) > .gfx-statbox .gfx-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 8px 12px; }
  .gfx:not(.locked):not(.section) .gfx-canvas { max-height: 80vh; }
}
@media (min-width: 1700px) {
  .gfx:not(.locked):not(.section):not(.gfx-nostats) { grid-template-columns: minmax(360px, 420px) minmax(0, 1fr) minmax(320px, 380px); }
  .gfx:not(.locked):not(.section):not(.gfx-nostats) > .gfx-stage { grid-row: 1 / span 2; }
  .gfx:not(.locked):not(.section):not(.gfx-nostats) > .gfx-statbox { grid-column: 3; grid-row: 1 / span 2; }
  .gfx:not(.locked):not(.section):not(.gfx-nostats) > .gfx-statbox .gfx-stats { grid-template-columns: minmax(0, 1fr); }
}
/* There is room for the word on a tablet or phone. */
@media (max-width: 900px) {
  .gfx-rm-word { display: inline; }
}
/* Stacked (phones and narrow tablets): the page scrolls; the card sits on top of the settings, in the page's flow. */
@media (max-width: 900px) {
  .gfx:not(.section) > .gfx-stage { display: contents; }
  .gfx:not(.section) .gfx-frame { order: -3; position: static; padding: 8px; }
  .gfx:not(.section) .gfx-placeholder { order: -3; padding: 14px 12px; }
  .gfx-try { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- touch screens and phones: every control big enough to hit with a thumb (QoL, 2026-09-29) ----------
   Measured at 390 px and on a 1024 px touch tablet: Ask chips were 22 px tall, "Wrong answer?" 18, footer links 15,
   breadcrumbs and glossary links 15-18, the graphics maker's ticks 13 and slider 16, "Open this dashboard" 19, the
   widget grip 13 x 21. Each gets at least 24 px (WCAG 2.2 target size), most 32 or more, without changing the layout on
   a desktop with a mouse. */
@media (pointer: coarse), (max-width: 700px) {
  .chip, .chips .chip, .board.cells .board-empty .chip, .dash-page .ask-bar .chip, .gfx-ask .gfx-ideas .chip { min-height: 32px; padding: 6px 10px; }
  .ask-wrong .linkish, .ask-wrong .btn.small { display: inline-flex; align-items: center; min-height: 32px; padding: 4px 6px; }
  .gloss-index a, .tgroup-head .linkish, .demo-open, .board-empty .linkish { display: inline-flex; align-items: center; min-height: 32px; padding: 4px 2px; }
  /* Breadcrumbs keep Pigskin Lab's line (a 32 px line pushed every page's heading 7-13 px down) and get an invisible hit area. */
  .crumbs a { position: relative; }
  .crumbs a::after { content: ''; position: absolute; inset: -8px -4px; }
  .site-footer a:not(.site-family a) { display: inline-flex; align-items: center; min-height: 32px; padding: 4px 0; }
  .gfx-check { min-height: 32px; }
  .gfx-check input[type=checkbox], input[type=checkbox] { width: 20px; height: 20px; }
  .gfx-scrub { min-height: 32px; }
  .gfx-subj-tools .btn.small { min-width: 32px; min-height: 32px; }
  .w-tools button { width: 34px; height: 34px; }
  .w-grip { min-width: 36px; min-height: 36px; }
  .w-resize { width: 28px; height: 28px; }
  .jargon-i { position: relative; }
  .jargon-i::after { content: ''; position: absolute; inset: -11px; }
}

/* ---------- phones: the reply is not printed twice (MLB QoL, 2026-09-29) ----------
   With an Answer widget on the board, the conversation keeps the request and "Wrong answer?", and points to the Answer
   instead of repeating it above the board. (.said: a reply about the board itself, "what filters are on?", is not in the Answer.) */
/* Every size since the launch check (2026-10-03): on a desktop the same sentence sat in the log and in the Answer under it. */
@media all {
  .dash-page.has-answer .ask-bar .ask-log > .it:last-child:not(.miss):not(.said) { font-size: 0; }
  .dash-page.has-answer .ask-bar .ask-log > .it:last-child:not(.miss):not(.said)::before { content: 'Answered in the Answer box below.'; font-size: .82rem; }
  .dash-page.has-answer .ask-bar .ask-log > .it:last-child:not(.miss):not(.said) > * { font-size: .76rem; }
}

/* ---------- a table wider than its box says so: its edge fades on the side there is more (MLB QoL, 2026-09-29) ----------
   "Side by side" on a phone was cut off after W with nothing to say more columns were there (table.js scrollHint). */
.tbl-wrap.more-right { -webkit-mask-image: linear-gradient(to left, transparent 0, #000 30px); mask-image: linear-gradient(to left, transparent 0, #000 30px); }
.tbl-wrap.more-left { -webkit-mask-image: linear-gradient(to right, transparent 0, #000 30px); mask-image: linear-gradient(to right, transparent 0, #000 30px); }
.tbl-wrap.more-left.more-right { -webkit-mask-image: linear-gradient(to right, transparent 0, #000 30px, #000 calc(100% - 30px), transparent 100%); mask-image: linear-gradient(to right, transparent 0, #000 30px, #000 calc(100% - 30px), transparent 100%); }
@media (max-width: 720px) {
  /* A table as tall as its rows, not a 280 px box with an empty space under a two-row table. */
  .board.cells > .widget:has(.w-body .tbl-wrap):not(:has(svg)) { min-height: 0; }
  .board.cells > .widget:has(.w-body .tbl-wrap):not(:has(svg)) .w-body { flex: none; max-height: 70vh; }
  /* A game page's table is drawn whole (its body does not scroll there): capped at 70vh it ran under the widget's edge and
     the last skaters of a 20-man lineup could not be reached at all (sweep 2026-10-04, NHL game page on a phone). */
  .game-board.board.cells > .widget:has(.w-body .tbl-wrap):not(:has(svg)) .w-body { max-height: none; }
}
.gfx-stage.gfx-blank > .gfx-player { display: none !important; }
/* A stat tile's name wraps instead of ending in "…" ("Time on ice per ga…" on a phone, NHL QoL 2026-09-29; "Goals per ga…",
   "Points (regul…" on an iPad's six tiles a row, sweep 2026-10-04): every width, so the board grows the widget to it. */
.tile .k { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
/* Phones: the graphics maker's things to try wrap, each chip onto as many lines as it needs (launch check 2026-10-03: a
   sideways-scrolling row left "Judge vs Ohtani 2022 to 2025 home runs, OPS and RBI" running off the right edge). */
@media (max-width: 700px) {
  .gfx-ask .gfx-ideas { flex-wrap: wrap; }
  .gfx-ask .gfx-ideas .chip { white-space: normal; text-align: left; max-width: 100%; }
}
.dash-page .ask-bar { scroll-margin-top: calc(var(--header-h, 0px) + 8px); }
@media (pointer: coarse), (max-width: 700px) {
  .gfx-check input[type=checkbox], input[type=checkbox] { width: 24px; height: 24px; }
  .gloss-index a { min-width: 28px; justify-content: center; }
  .tbl td a, .tgroup a, .tgroups a { display: inline-block; padding: 5px 0; min-width: 24px; }
  summary { min-height: 32px; display: flex; align-items: center; }
  .site-header .brand { min-height: 32px; }
}
/* Touch screens: a text box or menu is 40 px tall, as on Pigskin Lab (the header search was 30 px, a thin target). */
@media (pointer: coarse) {
  input[type=text], input[type=email], input[type=password], input[type=search], input[type=number], select { min-height: 40px; }
}
/* The layout tools (Grid, Tidy up, Width, Theme) arrange and dress the board, so they sit with moving and resizing in Edit dashboard: the
   toolbar stays on one row at 1366-1440 px with Paste in it. */
.dash-page:not(.editing) .dash-top > .arrange-only, .dash-page:not(.editing) .dash-top > .dash-width { display: none; }
/* A refusal that is never a dead end (public/js/ask.js missBlock, lib/nearest.js): the reason, what the Lab keeps, and the
   nearest questions as chips that each build a board here, or another Lab's link. */
.ask-log .it.near { display: flex; flex-direction: column; gap: 4px; padding: 4px 0 6px; }
.ask-log .it.near .near-said { color: var(--wrong); }
.ask-log .it.near .near-keeps { color: var(--muted); font-size: .76rem; }
.ask-log .it.near .near-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.ask-log .it.near .near-lead { color: var(--muted); font-size: .76rem; font-weight: 700; }
.ask-log .it.near .near-chip { margin: 0; border-radius: 12px; background: var(--surface-2); color: var(--text); font-size: .76rem; padding: 3px 9px; text-decoration: none; max-width: 100%; overflow-wrap: anywhere; text-align: left; }
.ask-log .it.near .near-chip:hover { border-color: var(--brand); color: var(--text); }
.ask-log .it.near .near-lab { border-color: var(--brand); }
.ask-log .it.near .near-wrong { font-size: .74rem; }
.ask-log:has(.it.near:last-child) { max-height: min(75vh, 560px); }
@media (pointer: coarse) { .ask-log .it.near .near-chip { min-height: 44px; display: inline-flex; align-items: center; } }
/* The sample under a widget's title (lib/sample.js): games counted and the window's real dates, and a small-sample mark in
   words. The season banner says once that a season is still being played. */
.w-sample { display: flex; align-items: baseline; gap: 6px; padding: 2px 12px 0; font-size: .7rem; line-height: 1.3; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 0; }
.w-sample .wsample-n, .sample-line .wsample-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.wsample .wthin { flex: none; font-style: normal; font-weight: 600; font-size: .7rem; letter-spacing: .02em; color: var(--noise); border: 1px solid currentColor; padding: 0 4px; line-height: 1.35; white-space: nowrap; }
.sample-line { display: flex; align-items: baseline; gap: 8px; font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; margin: 2px 0 6px; }
.season-banner { margin: 0 0 8px; }
.season-banner.early { border-left-color: var(--noise); }
.page-head .season-banner { margin: 10px 0 0; }


/* ---------- touch screens: every control is a 44 x 44 target (lane touch, 2026-10-01; INT-02, INT-07, INT-12) ----------
   Measured at 390 px and on a 1024 px touch tablet (user-research/tools/capture/touch/touchcheck.js): most controls on a
   board were under 44 px with a finger: widget copy and tool buttons 24 px, legend switches 20 px, chips 22 px, "Wrong
   answer?" and the other text buttons 18-20 px, buttons 30 px, sortable table headings 29-41 px, inputs and menus 40 px,
   the header's links 30-37 px. Each keeps its drawn size and gets an invisible hit area at least 44 px each way, centred
   on it (::before; no control here draws with it). Neighbours closer than 44 px overlap and the nearer one takes the tap.
   :where() keeps the position rule weaker than any rule that already places a control (absolute, sticky). Chart marks
   get theirs in charts.js (whole rows and columns, end rows reaching the edges, a nearest-point layer for dots and
   spider points). */
@media (pointer: coarse) {
  :where(.btn, .chip, .linkish, .icon-btn, .beta-pill, .brand, .nav a, .legend button, .wtools button, .w-tools button, .w-copy, .w-dup, .w-grip, .seg button, .mic, .crumbs a, .site-footer a, .footer-feedback, .tip-strip-feedback, .tip-strip-close, .tip-strip a, .demo-pause, .tbl td a, table.stats td a, .tgroup a, .gloss-index a, .tip-sheet .btn, summary) { position: relative; }
  :where(.btn, .chip, .linkish, .icon-btn, .beta-pill, .brand, .nav a, .legend button, .wtools button, .w-tools button, .w-copy, .w-dup, .w-grip, .seg button, .mic, .crumbs a, .site-footer a, .footer-feedback, .tip-strip-feedback, .tip-strip-close, .tip-strip a, .demo-pause, .tbl td a, table.stats td a, .tgroup a, .gloss-index a, .tip-sheet .btn, summary)::before {
    content: ''; position: absolute; left: 50%; top: 50%; width: max(100%, 44px); height: max(100%, 44px); transform: translate(-50%, -50%);
  }
  /* A thin text control above a block drawn after it ("Wrong answer?" over the board, a legend over its chart): its
     target is lifted over that block so its lower half is not lost. */
  :where(.linkish, .legend button, .chip) { z-index: 1; }
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=hidden]), select { min-height: 44px; }
  /* Sortable table headings sit edge to edge: each is 44 px tall instead (a dense row, INT-12). */
  .tbl th, table.stats thead th, table th[tabindex] { height: 44px; }
  /* Controls packed side by side, or inside a box that clips them, cannot borrow room around them (a widget's corner
     clips its copy button; the next zoom button's target would cover this one's edge): they are drawn 44 px instead.
     The header's links, the widget bar's tools and the zoom group. */
  .nav a { line-height: 44px; }
  .widget .wbar, .w-head { min-height: 44px; }
  .widget .wtools button, .w-tools button, .w-copy, .w-dup { width: 44px; height: 44px; }
  .seg { height: auto; }
  .seg button { min-width: 44px; min-height: 44px; }
}
/* Chart lines and words are not targets: a grid line or a value printed over a bar took the tap (or the hover) meant
   for the bar under it. The spider's names keep theirs (their full name shows on hover). */
.widget svg line, .chart-box svg line, .widget svg text:not(.radar-label), .chart-box svg text:not(.radar-label) { pointer-events: none; }
/* A tooltip never taller than the screen: a long one scrolls inside itself (INT-04; place() in charts.js keeps it 8 px
   inside every edge). */
.tooltip { max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); overflow-y: auto; overscroll-behavior: contain; }
/* The tap sheet (a phone's tooltip) is never cut by the browser's bar or a phone's home indicator: it is measured against
   the visible screen (dvh) and keeps the bottom safe area. */
.tip-sheet-panel { max-height: 82dvh; padding-bottom: env(safe-area-inset-bottom, 0px); }

/* ---------- launch check, 2026-10-03 (phone 390, iPad 1024 and 1366 touch, desktop 1440) ---------- */
/* A ranked list longer than its widget ends on a whole row with "N more" pinned under it (charts.js moreCue); a table that
   scrolls down fades at its bottom edge while more is below (moreBelow). */
.chart-box .more-cue { position: sticky; bottom: 0; height: 20px; margin-top: -20px; line-height: 22px; font-size: .72rem; font-weight: 600; color: var(--muted); text-align: center; pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--surface) 55%); transition: opacity .15s; }
.chart-box .more-cue.done { opacity: 0; }
.w-body.more-below { -webkit-mask-image: linear-gradient(to top, transparent 0, #000 26px); mask-image: linear-gradient(to top, transparent 0, #000 26px); }
/* Widget titles: up to two lines instead of one cut line, the full title on hover; on touch and under 1100 px the tools
   other than Copy fold behind "⋯" (build.js w-more) and open on a row of their own under the title. */
/* (Its 130 px basis: a narrow widget puts its tools under the title rather than squeezing the title to a few letters.) */
.w-title { flex: 1 1 130px; white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow-wrap: anywhere; }
.w-tools .w-more { display: none; }
@media (pointer: coarse), (max-width: 1100px) {
  .w-head { flex-wrap: wrap; }
  .w-tools .w-more { display: grid; font-size: 1.05rem; }
  .board.cells .widget:not(.tools-open) .w-tools > :not(.w-copy):not(.w-more) { display: none; }
  .board.cells .widget.tools-open .w-tools { flex: 1 0 100%; justify-content: flex-end; flex-wrap: wrap; order: 3; border-top: 1px solid var(--grid); }
  .board.cells .widget.tools-open .w-tools > * { display: grid; }
  .widget.tools-open .w-more { background: var(--surface-2); }
}
/* The board's title wraps instead of ending in "…" ("Hits: top 10, 2005-06 to 2025-26 (incl. pl…"): a one-row text box that
   grows with its words (build.js fitTitle). */
.dash-top textarea.title-input { resize: none; overflow: hidden; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.2; height: auto; min-height: 34px; padding-top: 4px; padding-bottom: 4px; font-family: var(--display); max-width: min(100%, 760px); }
.w-note:not([hidden]) { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
/* The graphics maker's motion settings (Numbers, Finish, Speed) wrap and grow on a touch screen: the group was 28 px tall
   around 44 px buttons, so "Pulse leaders", "Flip digits" and "Fast" were cut and covered the labels under them. */
.gfx-motion-opts .seg { height: auto; min-height: 28px; flex-wrap: wrap; max-width: 100%; }
.model-card .seg { height: auto; }
/* Touch screens: the buttons a visitor presses most are a full 44 px tall where they are drawn, not only where they take
   the tap (header Sign in, theme and Menu, Build it, the mic, the toolbar). Chips and inline links keep their look and
   their 44 px invisible hit area (above). */
@media (pointer: coarse) {
  .btn:not(.small), .icon-btn, .mic, .site-header .icon-btn, .dock-close { min-height: 44px; }
  .icon-btn, .mic { min-width: 44px; }
  .site-header .search input { min-height: 44px; }
}
/* Home: Build it stays on the Ask row from 701 px (it wrapped under the box on a desktop). */
@media (min-width: 701px) {
  .home-ask { flex-wrap: nowrap; }
  .home-ask .ask-input { flex: 1 1 0; }
}
/* Phones: the home demo was two screens of mostly empty dots while it typed; the example chips and the Ask box are the start. */
@media (max-width: 600px) { .hero-ad .demo-wrap { display: none; } }
/* The add-widget drawer: kinds in three groups, each with its picture beside its name. */
.add-group { display: flex; flex-direction: column; gap: 6px; }
.add-head { margin: 4px 0 0; font: 700 .72rem/1 var(--display); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.add-list > button { display: flex; align-items: flex-start; gap: 10px; text-align: left; }
.add-icon { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); }
.add-words { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.drawer-close { min-height: 36px; }
/* The account page's ways in: buttons, not tabs; the Ask wall's on a row of their own under its sentence. */
.acct-card .acct-choices { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.wall-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; color: var(--text); font-weight: 400; }
/* A missing-games note folded to its first sentence; "Details" opens the list (ui.js foldNote). */
details.note-fold { display: inline; }
details.note-fold > summary { display: inline; cursor: pointer; color: var(--link); text-decoration: underline; list-style: none; }
details.note-fold > summary::-webkit-details-marker { display: none; }
details.note-fold[open] > summary { margin-right: 4px; }
details.note-fold > span { display: block; margin-top: 2px; }
/* A link to a page that needs an account, while signed out: a small lock after its name (app.js showAccount). */
a.needs-account::after { content: ''; display: inline-block; width: .62em; height: .72em; margin-left: .3em; vertical-align: -.02em; opacity: .7;
  background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 12'%3E%3Cpath d='M2 5V3.5a3 3 0 016 0V5h1v7H1V5zm1.4 0h3.2V3.5a1.6 1.6 0 00-3.2 0z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 12'%3E%3Cpath d='M2 5V3.5a3 3 0 016 0V5h1v7H1V5zm1.4 0h3.2V3.5a1.6 1.6 0 00-3.2 0z'/%3E%3C/svg%3E") center / contain no-repeat; }
/* A sign-in wall is one card: the footer follows it instead of a screen of empty page (launch check 2026-10-03). */
main:has(> .wrap > .signin-gate:only-child) { min-height: 0; }

/* ---------- arriving with a question: the next step (public/js/ask.js drawChips, 2026-10-06) ----------
   A visitor from a Reddit ad or a shared link lands on a board built from their question. Under the reply, right
   above the board: "Now try" and three of the board's own follow-ups as big one-tap chips, then the box for their own
   question and the free allowance in plain words. The 35 ad visitors of 2026-10-05..06 saw their board and none asked a
   second one: the "Try:" chips were small, shuffled and above the reply, and the allowance a muted line. Pigskin Lab has the
   same rules, word for word (Pigskin Lab views/build.js). */
.dash-page .ask-bar .ask-ideas.ask-next { order: 6; display: flex; flex-direction: column; align-items: stretch; gap: 6px; margin: 2px 0 0; padding: 8px 10px; border: 0; border-left: 3px solid var(--brand); background: var(--surface-2); min-width: 0; }
.ask-next .next-lead { font: 700 .8rem/1 var(--display); text-transform: uppercase; letter-spacing: .06em; color: var(--text); }
.ask-next .next-chips { display: flex; flex-wrap: wrap; gap: 6px 8px; min-width: 0; }
.dash-page .ask-bar .ask-next .chip { margin: 0; min-height: 36px; padding: 6px 14px; display: inline-flex; align-items: center; max-width: 100%; border: 1px solid var(--brand); border-radius: 18px; background: var(--surface); color: var(--text); font: 600 .86rem/1.2 var(--font); text-align: left; overflow-wrap: anywhere; }
@media (hover: hover) { .dash-page .ask-bar .ask-next .chip:hover { background: var(--brand-btn); border-color: var(--brand-btn); color: #fff; } }
.dash-page .ask-bar .ask-next .chip:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.ask-next .next-own { margin: 0; font-size: .8rem; line-height: 1.4; color: var(--text-2); }
.ask-next .next-own b { color: var(--text); font-weight: 600; }
.dash-page .ask-bar.guided .ask-left { display: none; }
/* (A follow-up brings its reply to the top of a phone's screen, under nothing; the conversation log of the Answer's
   line shows on a computer only: on a phone it pushed the row and the Answer off the screen.) */
.dash-page .ask-bar.guided :is(.ask-msg, .ask-log) { scroll-margin-top: 72px; }
@media (max-width: 700px) { .dash-page .ask-bar.guided .ask-thread { display: none; } }
@media (max-width: 600px) { .dash-page .ask-bar.guided :is(.ask-msg, .ask-log) { scroll-margin-top: 8px; } }
/* (The one question an arrival asked is said in the reply under it: "You:" shows from the second.) */
.dash-page .ask-bar.guided .ask-log > .you:first-child:nth-last-child(2) { display: none; }
@media (pointer: coarse) { .dash-page .ask-bar .ask-next .chip { min-height: 44px; } }
/* (The tenth free question answered: the row offers the free account as buttons a thumb can hit; account.js wallWays. The
   shared sign-in page on Pigskin Lab has "Continue with Google".) */
.ask-next-wall .next-chips .btn { min-height: 40px; display: inline-flex; align-items: center; gap: 6px; }
@media (pointer: coarse) { .ask-next-wall .next-chips .btn { min-height: 44px; } }

/* ---------- phones and iPads: device pass (2026-10-09) ----------
   The same block ends all four sports sites' site.css.
   1. iOS Safari zooms the whole page into any field whose text is under 16 px, and every field here was
      13.4 px (the Ask box, the search box, every select in the dashboard maker). On a touch screen every
      field is 16 px. The board title is left out: it is 20 px already, and on Pigskin Lab it is an input, so
      this rule (0,4,1) would beat its font (0,2,0) and shrink the board's visible heading to 16 px.
   2. Buttons and header icons were drawn 30 px tall on touch on Pigskin Lab, and small buttons 26 px on all four
      (each already had an invisible 44 px hit area): every .btn and .icon-btn is drawn 44 px tall on touch, small
      ones included. That overrides the siblings' older .btn:not(.small) rule; whether small buttons stay 44 px is
      Mason's call (DEVICES, Open). Two older, more specific rules keep their own size, with their 44 px hit area:
      an empty board's preset buttons on a phone (32 px, .board-empty .presets .btn) and, on the siblings, the
      graphics maker's subject tools (32 x 32, .gfx-subj-tools .btn.small). Header icons and the mic are 44 px wide
      as well (34 x 44 and 32 x 44 on Pigskin Lab), as the siblings already drew them.
   3. A segmented control (Regular / Playoffs / All on the team and game pages) was 340 px wide inside a
      320 px phone and pushed the page sideways; it wraps instead. */
@media (pointer: coarse) {
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not(.title-input), select, textarea { font-size: 16px; }
  .btn, .icon-btn { min-height: 44px; }
  .icon-btn, .mic { min-width: 44px; }
  .seg { height: auto; }
  .seg button { min-height: 44px; }
}
.controls-row .seg { flex-wrap: wrap; height: auto; max-width: 100%; }
.controls-row .seg button { min-height: 28px; }
@media (pointer: coarse) { .controls-row .seg button { min-height: 44px; } }
/* A 320 px phone: a primary button in a page head ("Open this breakdown in the dashboard maker ›" on a game page) was
   344 px of unbroken text, and a model card's select (16 px on touch) pushed its heading past the edge. Both wrap
   inside the page instead. The wrap rule is outside any media query, so the two after it give a small page-head button
   its 26 px back on a computer and every page-head button its 44 px on touch (without them it beat the touch rule
   above, 0,2,0 over 0,1,0, and drew them 30 px). */
.page-head .btn { white-space: normal; height: auto; min-height: 30px; max-width: 100%; text-align: left; }
.page-head .btn.small { min-height: 26px; }
@media (pointer: coarse) { .page-head .btn, .page-head .btn.small { min-height: 44px; } }
.section-head { flex-wrap: wrap; }
.section-head > span { min-width: 0; max-width: 100%; }
.section-head select { max-width: 100%; }
/* Touch, found by the tap check after the review fixes: the tip bar (on every page until it is closed) and the board
   title. The bar's "Leave a tip" link was 25 px tall with no hit area on all four, and on Pigskin Lab "Beta: send
   feedback" was 19 px and the close 18 x 18 (the siblings already gave those two theirs). The siblings' board title is a
   textarea, which the touch lane's input rule never reached: 34 px tall, where Pigskin Lab's input is 44. fitTitle sets
   its height from scrollHeight, so 9 px top and bottom make one line exactly 44 px with the words centred. */
@media (pointer: coarse) {
  :where(.tip-strip-link, .tip-strip-feedback, .tip-strip-close) { position: relative; }
  :where(.tip-strip-link, .tip-strip-feedback, .tip-strip-close)::before { content: ''; position: absolute; left: 50%; top: 50%; width: max(100%, 44px); height: max(100%, 44px); transform: translate(-50%, -50%); }
  .dash-top textarea.title-input { min-height: 44px; padding-top: 9px; padding-bottom: 9px; }
}

/* The working panel (ui.js busy): shown when something takes longer than a second. In the middle of the screen, large
   (ported from Pigskin Lab, 2026-10-26). `div.busy` so it never meets the Ask form's own `.busy` state. */
div.busy { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 120; display: flex; align-items: center; gap: 16px;
  max-width: calc(100vw - 32px); padding: 22px 30px; background: var(--surface); color: var(--text); border: 3px solid var(--frame);
  box-shadow: 0 12px 48px rgba(0, 0, 0, .35); font-weight: 700; font-size: 1.25rem; pointer-events: none; }
div.busy .busy-spin { width: 34px; height: 34px; border-width: 4px; }
.busy-spin { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--muted); border-top-color: var(--sel); animation: busy-spin .8s linear infinite; }
@keyframes busy-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .busy-spin { animation: busy-pulse 1.6s ease-in-out infinite !important; } }
@keyframes busy-pulse { 50% { opacity: .35; } }

/* Front-page trust line, owner 2026-10-26: Reddit readers called a game graphic "AI slop". Nothing on the site is generated by
   AI, so the home page says so where people look, not in the footer. */
.no-ai { margin: 14px 0 0; padding: 2px 0 2px 10px; border-left: 3px solid var(--brand); font-size: .85rem; line-height: 1.45; color: var(--text); max-width: 46em; }
.no-ai b { font-weight: 700; }

/* Comparison pages (lib/compare.js): written by the server, fetched and shown by the app. */
.compare-page section { margin: 22px 0; }
.compare-page h2 { font-family: var(--display); margin: 0 0 8px; font-size: 1.2rem; }
.cmp-table { border-collapse: collapse; width: 100%; max-width: 640px; font-variant-numeric: tabular-nums; font-size: .95rem; border: 1px solid var(--border); background: var(--surface); }
.cmp-table th, .cmp-table td { padding: 6px 10px; border-bottom: 1px solid var(--grid); text-align: right; }
.cmp-table thead th { background: var(--surface-2); }
.cmp-table tbody th { text-align: left; font-weight: 500; color: var(--text-2); }
.cmp-table td.lead { font-weight: 700; background: var(--row-hover); }
.cmp-links { padding-left: 1.2em; line-height: 1.7; }
.cmp-list { columns: 2 280px; }
.compare-page .crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 6px; }
.compare-page .crumbs a { color: var(--muted); }

/* Keep the full header only where its links and account tools fit together.
   Tablets and narrower laptop windows use the direct Graphics chooser through Menu. */
@media (max-width: 1439px), (pointer: coarse) {
  .site-header .wrap { flex-wrap: wrap; height: auto; padding-top: 8px; gap: 8px; }
  .header-tools { margin-left: auto; }
  .menu-btn { display: inline-flex; min-height: 44px; }
  .site-header:not(.menu-open) .nav { display: none; }
  .site-header.menu-open .nav { display: flex; order: 3; flex-basis: 100%; height: auto; flex-wrap: wrap; overflow: visible; justify-content: flex-start; }
  .site-header.menu-open .nav a { min-height: 44px; line-height: 44px; }
}

.graphics-nav { position: relative; display: flex; }
.graphics-options { display: none; }
@media (min-width: 1440px) and (hover: hover) and (pointer: fine) {
 .site-header .nav { overflow: visible; }
 .graphics-nav:hover .graphics-options, .graphics-nav:focus-within .graphics-options { display: flex; position: absolute; flex-direction: column; top: 100%; left: 0; min-width: 210px; background: var(--surface); border: 1px solid var(--border); z-index: 50; }
 .graphics-options a { color: var(--text); line-height: 44px; }
}
.rankings-stage { padding: 24px; background: var(--surface-2); border: 1px solid var(--border); margin-top: 20px; }
.rankings-row { width: var(--rank-width); max-width: 100%; margin: 12px auto; border: 1px solid var(--border); border-top: 4px solid var(--accent, #38618c); padding: 12px; background: var(--surface); }
.rankings-row h3 { margin: 0 0 12px; }
.rankings-items, .rankings-results { display: flex; gap: 12px; flex-wrap: wrap; }
.rankings-item { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 140px; max-width: 100%; border-bottom: 5px solid var(--team-color); padding: 8px; }
.rankings-item img, .rankings-placeholder { width: 96px; height: 112px; object-fit: contain; object-position: center; display: grid; place-items: center; background: var(--surface-2); font-size: 30px; }
.rankings-item b { text-align: center; overflow-wrap: anywhere; }
.rankings-item select { max-width: 100%; }
.rankings-credits { overflow-wrap: anywhere; margin-top: 24px; }
.rankings-editor .controls-row { margin: 10px 0; }
@media (max-width: 600px) { .rankings-stage { padding: 10px; } .rankings-row { width: 100%; } .rankings-item { width: 115px; } }

/* Search suggestions stay beside their field inside scrolling maker controls. */
.player-search { position: relative; max-width: 100%; }
.player-search .search-results { position: static; width: 100%; max-height: 240px; overflow-y: auto; margin-top: 4px; }
.gd-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: center; }
.gd-side.has-photo { background: #101318; }
.gd-photo-frame { position: relative; flex: 1 1 0; min-height: 0; overflow: hidden; background: #101318; isolation: isolate; }
.gd-photo-frame .gd-photo-bg { position: absolute; inset: -5%; width: 110%; height: 110%; object-fit: cover; filter: blur(8px) brightness(.55); opacity: .6; }
.gd-photo-frame .gd-photo { z-index: 1; }
.gd-side.has-photo .gd-name { flex: 0 0 auto; background: #101318; border-top: 2px solid var(--c); }

/* Dropdown links use the page palette, including pointer and keyboard highlights. */
.site-header .graphics-options a:hover, .site-header .graphics-options a:focus-visible { color: var(--text); background: var(--row-hover); text-decoration: none; }

/* Current-page dropdown links must not inherit the black header’s white ink. */
.site-header .graphics-options a { color: var(--text); border-bottom-color: transparent; }
.site-header .graphics-options a[aria-current="page"], .site-header .graphics-options a:active { color: var(--text); background: var(--row-hover); border-bottom-color: var(--brand); }

.rankings-items { justify-content: center; }
.rankings-vacant .rankings-placeholder { border: 2px dashed var(--border-strong); background: transparent; color: var(--muted); }

.account-presets { position: relative; display: inline-block; }
.account-presets summary { cursor: pointer; list-style: none; }
.preset-panel { position: absolute; z-index: 80; right: 0; width: min(360px, 85vw); max-height: 65vh; overflow: auto; background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); padding: 12px; box-shadow: 0 6px 24px #0003; }
.preset-panel input { width: 100%; margin: 4px 0 8px; }
.preset-row { display: flex; gap: 8px; margin-top: 8px; align-items: center; }
.preset-row .btn { flex: 1; white-space: normal; text-align: left; }
.lab-presentation { position: fixed; inset: 0; margin: 0; padding: 16px; border: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; background: var(--bg); color: var(--text); }
.lab-presentation[open] { display: flex; flex-direction: column; gap: 8px; }
.lab-presentation::backdrop { background: #000c; }
.presentation-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; flex-shrink: 0; }
.presentation-toolbar b { flex: 1; min-width: 150px; }
.presentation-help { margin: 0; color: var(--muted); }
.presentation-slide { flex: 1; min-height: 0; overflow: auto; display: flex; align-items: stretch; justify-content: center; }
.presentation-content { width: 100% !important; max-width: 1600px; min-height: 300px; height: 100% !important; transform: none !important; }
.presentation-content.widget { display: flex; flex-direction: column; font-size: 1.15rem; }
.presentation-content .w-body, .presentation-content .wbody { flex: 1; min-height: 0; }
.presentation-content .w-title, .presentation-content .wtitle { font-size: 1.3rem; }
.presentation-content canvas { max-width: 100%; max-height: 100%; object-fit: contain; }
@media (max-width: 600px) { .lab-presentation { padding: 8px; } .presentation-toolbar .btn { min-height: 44px; } }

/* Schedule: compact desktop columns, readable cards when its container is narrow. */
.team-schedule { container: schedule / inline-size; scroll-margin-top: calc(var(--header-h, 90px) + 16px); }
.schedule-caption { margin: 0 0 14px; color: var(--muted); font-size: 13px; }
.schedule-table-wrap { overflow-x: auto; }
.schedule-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.schedule-table th { padding: 10px 12px; background: var(--surface-2); font-size: 12px; text-align: left; white-space: nowrap; }
.schedule-table td { padding: 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.schedule-table tbody tr:last-child td { border-bottom: 0; }
.schedule-table th:nth-last-child(-n+5), .schedule-table td:nth-last-child(-n+5) { text-align: right; }
.schedule-matchup { display: inline-flex; align-items: center; min-height: 40px; font-weight: 700; white-space: nowrap; }
.schedule-cards { display: none; gap: 12px; }
.schedule-game { min-width: 0; padding: 14px 16px; border: 1px solid var(--border); background: var(--surface); }
.schedule-game-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.schedule-date { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.schedule-game .schedule-matchup { font-size: 19px; }
.schedule-record { flex: none; text-align: right; }
.schedule-record span { display: block; color: var(--muted); font-size: 12px; }
.schedule-record strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.schedule-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 0; padding-top: 10px; border-top: 1px solid var(--border); }
.schedule-stat { min-width: 0; }
.schedule-stat dt { color: var(--muted); font-size: 12px; line-height: 1.5; white-space: nowrap; }
.schedule-stat dd { margin: 3px 0 0; font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.schedule-about { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; }
.schedule-about summary { width: fit-content; min-height: 36px; cursor: pointer; color: var(--text-2); font-weight: 600; }
.schedule-about p { max-width: 80ch; margin: 6px 0 10px; }
@container schedule (max-width: 900px) {
 .schedule-table-wrap { display: none; }
 .schedule-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container schedule (max-width: 600px) {
 .schedule-cards { grid-template-columns: minmax(0, 1fr); }
}
@media print {
 .schedule-table-wrap { display: block; }
 .schedule-cards { display: none; }
}

/* Any six-digit color is allowed; text keeps the theme contrast. */
.rankings-row { border-top-color: var(--rank-color, var(--accent, #38618c)); }
.rankings-color-control { display: inline-flex; align-items: center; gap: 6px; }
.rankings-color-control input[type="color"] { width: 42px; min-width: 42px; height: 34px; padding: 2px; cursor: pointer; }
.rankings-row-editor input[type="text"][size="8"] { width: 90px; min-width: 90px; }

/* Broadcast-style rankings: a vivid default, fully editable without changing text on hover. */
.rankings-stage { background: var(--ranking-canvas, #0b1220); color: var(--ranking-text, #f8fafc); border: 1px solid #ffffff24; border-radius: var(--ranking-radius, 16px); padding: 24px; box-shadow: 0 12px 32px #00000018; }
.rankings-stage > h2 { color: var(--ranking-text, #f8fafc); font-size: clamp(24px, 4vw, 36px); letter-spacing: .02em; margin-bottom: 6px; }
.rankings-stage .rankings-row { background: var(--rank-fill, var(--ranking-row, #132239)); color: var(--ranking-text, #f8fafc); border: 1px solid #ffffff26; border-top: 5px solid var(--rank-color, #22d3ee); border-radius: var(--ranking-radius, 16px); box-shadow: 0 4px 12px #00000012; }
.rankings-stage .rankings-row h3 { color: var(--ranking-text, #f8fafc); }
.rankings-stage .rankings-item { color: var(--ranking-text, #f8fafc); background: var(--ranking-tile, #1d304b); border-radius: var(--ranking-radius, 16px); }
.rankings-stage .linkish { color: var(--ranking-text, #f8fafc); text-decoration: underline; }
.rankings-stage .rankings-credits { color: var(--ranking-text, #f8fafc); opacity: .85; }
.rankings-style-controls { border: 1px solid var(--border); margin: 16px 0; padding: 12px; }
.rankings-style-controls legend { font-weight: 700; padding: 0 6px; }
.rankings-palette-field { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.rankings-palette-field > span { min-width: 140px; }
.rankings-palette-field input[type="color"] { width: 42px; min-width: 42px; height: 34px; padding: 2px; }
.rankings-palette-field input[type="text"] { width: 90px; min-width: 90px; }
@media (max-width: 600px) { .rankings-stage { padding: 12px; } .rankings-palette-field > span { width: 100%; } }

/* Selection and Escape stay dismissed while the old hover/focus remains. */
.graphics-nav.dropdown-dismissed .graphics-options { display: none !important; }

/* Games and Teams directories: existing recorded facts, with room to read them. */
.games-directory .controls-row { gap: 12px; }
.directory-date-head { align-items: baseline; gap: 12px; margin-bottom: 10px; }
.directory-date-head h2 { margin-bottom: 0; font-size: 1.05rem; }
.directory-games-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,290px),1fr)); gap: 12px; }
.directory-game-card { display: block; min-width: 0; padding: 14px; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.directory-game-card:hover { background: var(--row-hover); text-decoration: none; border-color: var(--border-strong); }
.directory-game-card:focus-visible, .directory-team-card:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.directory-game-top { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 10px; color: var(--muted); font-size: .75rem; font-weight: 600; }
.directory-game-line { display: grid; grid-template-columns: 4px minmax(0,1fr) auto; gap: 10px; align-items: center; padding: 7px 0; }
.directory-team-accent { width: 4px; height: 32px; background: var(--tc,var(--muted)); border-radius: 2px; }
.directory-game-team { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.directory-side { color: var(--muted); font-size: .66rem; text-transform: uppercase; letter-spacing: .04em; }
.directory-game-team strong { font-size: .95rem; font-weight: 500; line-height: 1.25; overflow-wrap: anywhere; }
.directory-game-score { font-size: 1.65rem; line-height: 1; font-weight: 500; font-variant-numeric: tabular-nums; }
.directory-game-line.is-winner strong, .directory-game-line.is-winner .directory-game-score { font-weight: 700; }
.directory-game-action { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--grid); font-size: .75rem; color: var(--link); font-weight: 600; }
.teams-directory .team-index { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; }
.teams-directory .team-div h2 { font-size: 1rem; line-height: 1.35; padding-bottom: 8px; margin-bottom: 10px; }
.teams-directory .team-div ul { display: grid; gap: 8px; }
.teams-directory .team-div li { display: block; padding: 0; border: 0; }
.directory-team-card { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 78px; padding: 13px 16px; border: 1px solid var(--border); border-left: 4px solid var(--tc,var(--muted)); border-radius: 7px; background: var(--surface); color: var(--text); }
.directory-team-card:hover { background: var(--row-hover); text-decoration: none; border-top-color: var(--border-strong); border-right-color: var(--border-strong); border-bottom-color: var(--border-strong); }
.directory-team-name { min-width: 0; font-size: 1rem; line-height: 1.3; font-weight: 600; overflow-wrap: anywhere; }
.directory-team-record { display: flex; flex: 0 0 auto; flex-direction: column; align-items: flex-end; gap: 2px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.directory-team-record small { font-size: .68rem; color: var(--muted); letter-spacing: .035em; }
.directory-team-record strong { font-size: 1.1rem; font-weight: 600; }
@media (max-width: 700px) {
 .teams-directory .team-index { grid-template-columns: minmax(0,1fr); gap: 20px; }
 .directory-games-grid { grid-template-columns: minmax(0,1fr); }
 .directory-date-head { flex-wrap: wrap; gap: 4px 10px; }
 .directory-game-card { padding: 12px; }
 .directory-team-card { padding: 12px; gap: 12px; }
}

/* Tablet/phone dashboard reading layout. Saved desktop columns/heights stay in the board model. */
@media (max-width: 1280px) {
  .board.cells { --cols: 1; grid-auto-rows: auto; min-height: 400px; width: 100% !important; }
  .board.cells > .widget { grid-column: 1 / -1 !important; grid-row: auto !important; min-height: 0; }
  .board.cells .w-resize { display: none; }
  .board.cells .w-body.chart { flex: none; height: 340px; }
  .board.cells .radar-w .w-body.chart { height: 400px; }
  .board.cells .w-head { flex-shrink: 0; }
  .board.cells .w-title { white-space: normal; overflow: visible; text-overflow: clip; }
  .board.cells .tiles-w .w-body, .board.cells .answer .w-body, .board.cells .story-w .w-body, .board.cells [data-type="note"] .w-body { flex: none; height: auto; overflow: visible; }
  .board.cells .tiles { height: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .board.cells .tile { min-height: 140px; justify-content: flex-start; gap: 5px; padding: 14px; }
  .board.cells .tile .k, .board.cells .tile .r, .board.cells .tile .q, .board.cells .tile .p { font-size: 14px; line-height: 1.4; white-space: normal; overflow: visible; overflow-wrap: anywhere; }
  .board.cells .tile .v { font-size: 30px; }
  .board.cells .tiles-w { overflow: visible; }
}
@media (max-width: 600px) {
  .board.cells .tiles { grid-template-columns: minmax(0, 1fr); }
  .board.cells .tile { min-height: 120px; }
  .board.cells .w-body.chart { height: 320px; }
  .board.cells .radar-w .w-body.chart { height: 380px; }
}

/* Clearing a phone dashboard must leave a reachable way to restore it. */
@media (max-width: 700px) {
  .dash-page.empty-board:not(.locked):not(.editing) .dash-top > .dash-undo:not(:disabled),
  .dash-page.empty-board:not(.locked):not(.editing) .dash-top > .dash-redo:not(:disabled) { display: inline-flex; }
}

/* A selected menu item closes immediately, even while the pointer remains over it. */
.graphics-nav.dropdown-dismissed .graphics-options { display:none !important; }

.gfx-toolbar { margin:8px 0 0; padding:8px 0; border-top:1px solid var(--border); align-items:center; }

/* Directory cards retain the existing season/filter data and make each entire result tappable. */
.games-directory .matchup-grid {display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,300px),1fr));gap:12px}
.games-directory .score {display:block;min-width:0;padding:14px 16px;border:1px solid var(--border);background:var(--surface);color:var(--text);text-decoration:none;font-size:.95rem;transition:border-color .15s}
.games-directory .score:hover,.games-directory .score:focus-visible {border-color:var(--text);background:var(--surface2,var(--surface));color:var(--text)}
.games-directory .score .st {font-size:.72rem;margin-bottom:12px}
.games-directory .score .ln {align-items:center;min-height:44px;margin:6px 0}
.matchup-team {display:flex;align-items:center;gap:10px;min-width:0}
.matchup-team>span:last-child {min-width:0;overflow-wrap:anywhere}
.matchup-team small {display:block;font-size:.7rem;font-weight:400}
.matchup-code {flex:0 0 45px;border-left:4px solid;padding:5px 0 5px 7px;font-size:.72rem;font-weight:700}
.matchup-score {font-size:1.5rem;line-height:1;font-weight:600;min-width:2.4ch;text-align:right}
.teams-directory .team-index {gap:24px;grid-template-columns:repeat(auto-fit,minmax(min(100%,350px),1fr))}
.teams-directory .team-div h2 {font-size:1rem;min-height:2.2em}
.teams-directory .team-div li {display:block;border:0;padding:5px 0}
.team-directory-card {display:flex;justify-content:space-between;align-items:center;gap:12px;padding:14px;border:1px solid var(--border);border-left:4px solid;background:var(--surface);color:var(--text);text-decoration:none;min-height:86px}
.team-directory-card:hover,.team-directory-card:focus-visible {color:var(--text);border-top-color:var(--text);border-right-color:var(--text);border-bottom-color:var(--text);text-decoration:none}
.team-directory-identity {display:grid;gap:5px;min-width:0}
.team-directory-identity strong {overflow-wrap:anywhere}
.team-directory-code {font-size:.72rem;color:var(--muted);letter-spacing:.06em}
.team-directory-result {text-align:right;flex:0 0 auto;display:grid;gap:5px}
.team-directory-result .team-rec {font-size:1.2rem;color:var(--text)}
.team-directory-result small {font-size:.7rem}
@media(max-width:480px){.games-directory .score{padding:12px}.teams-directory .team-index{gap:18px}.team-directory-card{padding:12px}.team-directory-result small{max-width:100px}}

/* Data caveats under a table (public/js/caveat-ui.js): 12 px at least, never cut. */
.stat-caveats { margin: 6px 0 12px; }
.stat-caveat { margin: 2px 0; font-size: 12px; line-height: 1.45; color: var(--muted); overflow-wrap: anywhere; }

/* Edit dashboard is for touch screens; with a mouse a dashboard is always in it. Out of it, a touch screen's widgets carry no tools. */
.dash-top .edit-toggle { display: none; }
@media (hover: none), (pointer: coarse) {
  .dash-top .edit-toggle { display: inline-flex; }
  .dash-page:not(.editing) .board.cells .w-tools, .dash-page:not(.editing) .widget .wtools, .dash-page:not(.editing) .board.stacked .widget .wtools { display: none !important; }
}

/* Sizing with a finger (the owner, 2026-11-01): in Edit dashboard on a touch screen the corners are round knobs a fingertip can
   hold and the edges are wide strips. Inside the widget, since a widget clips what overflows it. */
@media (pointer: coarse) {
  .dash-page.editing .board.cells .widget :is(.w-resize, .w-edge-nw, .w-edge-ne, .w-edge-sw) { width: 34px; height: 34px; border-radius: 50%; background: transparent; z-index: 7; }
  .dash-page.editing .board.cells .widget .w-resize { background: var(--surface); border: 3px solid var(--brand); box-shadow: 0 1px 4px rgba(0, 0, 0, .35); }
  .dash-page.editing .board.cells .widget .w-resize { right: 2px; bottom: 2px; }
  .dash-page.editing .board.cells .widget :is(.w-edge-e, .w-edge-w) { width: 20px; top: 40px; bottom: 40px; }
  .dash-page.editing .board.cells .widget :is(.w-edge-n, .w-edge-s) { height: 20px; left: 40px; right: 40px; }
}

/* The data credit and when the data was last loaded, under the dashboard toolbar (2026-11-02). */
.data-stamp { margin: 2px 0 6px; font-size: 12px; color: var(--muted); }

/* The site's name on every chart, board widget and page section, so a screenshot still says where it came from (the owner,
   2026-11-02: "people can screenshot without exporting"). Exports draw their own credit; this is the page's. Bold and in the text colour, a little faded (2026-11-13: the 10 px faint one could not be read on a stream),
   in the bottom-right corner clear of the resize grip, and never in the way of a click. */
.widget::after, .box::after { content: "rinksidelab.com"; position: absolute; right: 16px; bottom: 3px; z-index: 3; font: 700 12px/1 var(--font, Roboto, Arial, sans-serif); letter-spacing: .02em; color: var(--text); opacity: .8; pointer-events: none; user-select: none; white-space: nowrap; }
/* (Its own strip at the bottom, so it never covers an axis label or a row.) */
.widget { padding-bottom: 16px; }
.box { position: relative; padding-bottom: 18px; }
/* (Once per picture: a section inside a section or a widget carries none of its own.) */
.box .box::after, .widget .box::after, .widget .widget::after { content: none; }

/* Each card's tools on a game page (views/game.js cardTools): open the board in the dashboard maker, save the card as a PNG. */
.game-board .w-head .w-page-tools { margin-left: auto; display: flex; gap: 4px; flex-shrink: 0; align-items: center; }
.game-board .w-head .w-page-tools .btn.small { padding: 2px 7px; font-size: .72rem; }
@media (max-width: 760px) { .game-board .w-head { flex-wrap: wrap; } }
/* A game page's chart titles wrap whole, never cut with "…": "Every meeting since 2022-23 to this one: ORL vs GSW, the Magic's
   margin · Regular season…" dropped "and playoffs", so it read as the regular season only (site audit 2026-11-09 round 5, H5-28). */
.game-board .w-head .w-title { display: block; -webkit-line-clamp: unset; line-clamp: none; overflow: visible; text-overflow: clip; white-space: normal; }
@media (max-width: 760px) { .game-board.board.cells > .widget[data-type=hbar] { min-height: var(--wh, 280px); } .game-board.board.cells > .widget[data-type=hbar] .w-body.chart { height: calc(var(--wh, 330px) - 60px); } }

/* "Seen on shows" (/videos, views/videos.js): a few cards, two or three across, one on a phone. */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 20px; margin: 8px 0 32px; }
.video-card, main .video-grid .video-card.box { display: flex; flex-direction: column; padding: 0; overflow: hidden; min-width: 0; transition: border-color .15s, transform .15s; }
.video-card:hover { border-color: var(--brand); transform: translateY(-2px); }
.video-card::after { content: none; }
.video-thumb { position: relative; display: block; aspect-ratio: 16 / 9; background: #111; overflow: hidden; }
.video-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.video-thumb-blank { display: flex; align-items: center; justify-content: center; height: 100%; padding: 16px; text-align: center; font: 700 1.3rem/1.2 var(--font); color: #fff; }
.video-play { position: absolute; left: 50%; top: 50%; width: 60px; height: 42px; margin: -21px 0 0 -30px; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: rgba(0, 0, 0, .7); color: #fff; font-size: 1.1rem; transition: background .15s; }
.video-thumb:hover .video-play, .video-thumb:focus-visible .video-play { background: #e00; }
.video-at { position: absolute; right: 8px; bottom: 8px; padding: 2px 7px; border-radius: 4px; background: rgba(0, 0, 0, .8); color: #fff; font: 600 .78rem/1.4 var(--font); }
.video-body { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 16px; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.video-show { display: flex; align-items: center; gap: 10px; }
.video-show strong { display: block; font-size: .92rem; line-height: 1.25; }
.video-logo { flex: none; width: 36px; height: 36px; border-radius: 6px; object-fit: cover; background: var(--surface-2); }
.video-host { display: block; font-size: .8rem; color: var(--muted); }
.video-title { margin: 2px 0 0; font-size: 1.05rem; line-height: 1.3; }
.video-line { margin: 0; color: var(--text-2); font-size: .9rem; }
.video-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 4px; }
.video-links .btn span { color: var(--brand); font-size: .7rem; }
/* About: the report box at the top, spaced from the box under it like the page's other sections. */
.report-box + .box { margin-top: 26px; }

/* Lab Rankings page (2026-11-13 polish). A breadcrumb back to Graphics and Creator Tools; two page actions (Present, Copy
   snapshot link); then the editor beside the board on a wide screen, so each change shows without scrolling, and stacked on a
   phone. Signed out with nothing ranked: how it works and the sign-in button beside a small preview of the tiers. The page ends
   where the board ends: no screen-tall main under it. */
main:has(> .rankings-page), main:has(> * > .rankings-page) { min-height: 0; }
.rankings-eyebrow { margin: 0 0 4px; font-family: var(--display); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.rankings-eyebrow a { color: inherit; text-decoration: none; }
.rankings-eyebrow a:hover { color: var(--text); text-decoration: underline; }
.rankings-page .page-head p { max-width: 82ch; }
.rankings-page > .rankings-actions { align-items: center; margin: 14px 0 4px; }
.rankings-actions-hint { margin-left: 2px; }
.rankings-page > .rankings-actions[hidden], .rankings-actions-hint[hidden] { display: none; }
.rankings-page > .rankings-status:empty { display: none; }
.rankings-page > .rankings-status { margin: 6px 0 0; }
.rankings-workspace { display: grid; gap: 20px; align-items: start; margin-top: 12px; }
.rankings-page .rankings-workspace .rankings-editor { margin: 0; min-width: 0; }
.rankings-page .rankings-editor::after { content: none; }
.rankings-stage-home { min-width: 0; }
.rankings-stage-home > .rankings-stage { margin-top: 0; }
@media (min-width: 1100px) {
  .rankings-workspace { grid-template-columns: minmax(340px, 400px) minmax(0, 1fr); }
  .rankings-page .rankings-workspace > .rankings-editor { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; overscroll-behavior: contain; }
}
@media (min-width: 800px) { .rankings-signed-out .rankings-workspace { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } }
.rankings-page.rankings-signed-out .rankings-workspace > .rankings-editor { position: static; max-height: none; }
.rankings-page .rankings-signin > h2 { margin: 0 0 12px; }
.rankings-steps { display: grid; gap: 10px; margin: 0 0 18px; padding-left: 22px; line-height: 1.45; }
.rankings-signin-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.rankings-signin > p { margin: 0 0 12px; }
.rankings-stage.rankings-quiet { padding: 18px 20px; }
.rankings-quiet .rankings-row { margin: 8px auto; padding: 8px 12px; }
.rankings-quiet .rankings-row h3 { margin: 0; font-size: 15px; }
.rankings-quiet .rankings-items { display: none; }
.rankings-add { padding: 14px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-2); }
.rankings-add > h3 { margin: 0 0 4px; font-family: var(--display); font-size: 15px; letter-spacing: .03em; text-transform: uppercase; }
.rankings-page :is(.rankings-add, .rankings-basics) > .field { display: grid; gap: 6px; margin: 10px 0; font-size: 14px; font-weight: 600; }
.rankings-page :is(.rankings-add, .rankings-basics) :is(input, select) { width: 100%; box-sizing: border-box; }
.rankings-page .rankings-add .rankings-results { margin: 10px 0 6px; }
.rankings-page .rankings-add .rankings-team-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 6px; }
.rankings-page .rankings-add .rankings-team-picks .btn { justify-content: center; margin: 0; padding: 0 4px; }
.rankings-page .rankings-add .rankings-vacant-add { font-size: 14px; padding-left: 0; padding-right: 0; }
.rankings-basics { margin-top: 6px; }
.rankings-fold { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.rankings-fold > summary { display: block; min-height: 32px; padding: 6px 0; line-height: 1.45; font-weight: 700; cursor: pointer; }
/* The arrow is a real span: on touch screens summary::before is the site's 44px tap area. */
.rankings-fold-mark { display: inline-block; width: 1.1em; color: var(--text-2); transition: transform .15s; }
.rankings-fold[open] .rankings-fold-mark { transform: rotate(90deg); }
.rankings-fold > summary::-webkit-details-marker { display: none; }
.rankings-fold > summary { list-style: none; }
.rankings-page .rankings-fold .rankings-row-editor { grid-template-columns: auto minmax(84px, 110px) 1fr; }
.rankings-page .rankings-fold .rankings-row-editor > input:first-child { grid-column: 1 / -1; width: 100%; box-sizing: border-box; }
.rankings-page .rankings-fold .rankings-row-editor > button { justify-self: end; }
.rankings-page .rankings-fold .rankings-style-controls { grid-template-columns: 1fr; margin: 4px 0 0; }
.rankings-team-badge { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--badge, #38618c); color: var(--badge-ink, #fff); font: 700 22px/1 var(--display, sans-serif); letter-spacing: .02em; box-shadow: 0 0 0 3px #ffffff26; }
.rankings-show-stage .rankings-team-badge { --s: max(30px, min(120px, 9vw, calc((100dvh - 220px) / var(--ranking-show-count, 4) - 100px))); width: var(--s); height: var(--s); font-size: calc(var(--s) * .3); }
.rankings-empty-hint { margin: 14px 0 0; text-align: center; opacity: .9; }
/* Initials when a player has no photo: lettering on a tint of the board text, readable on any palette (was white on light grey). */
.rankings-stage .rankings-item .rankings-placeholder { background: color-mix(in srgb, var(--ranking-text, #f8fafc) 16%, transparent); color: var(--ranking-text, #f8fafc); font-family: var(--display, sans-serif); font-weight: 700; }
.rankings-stage .rankings-vacant .rankings-placeholder { background: transparent; }
.rankings-stage .rankings-item select { width: 100%; font-size: 12px; }
@media (max-width: 600px) {
  .rankings-workspace { gap: 14px; }
  .rankings-stage.rankings-quiet { padding: 14px; }
  .rankings-team-badge { width: 56px; height: 56px; font-size: 18px; }
  .rankings-stage:not(.rankings-show-stage) .rankings-items { gap: 8px; }
  .rankings-stage:not(.rankings-show-stage) .rankings-item { width: 96px; padding: 6px; }
  .rankings-stage:not(.rankings-show-stage) .rankings-item img, .rankings-stage:not(.rankings-show-stage) .rankings-placeholder { width: 80px; height: 94px; }
  .rankings-stage .rankings-item select { font-size: 12px; }
  .rankings-stage .rankings-item b { font-size: 13px; }
}

/* Tables and comparisons side by side (the owner, 2026-11-14: "this kind of stuff should more clearly show the data side by side
   so my eyes don't have to move across the whole screen"). One shared rule for every stat table (.tbl, table.stats) and the
   comparison tables (.sbs-table): as wide as their columns (never stretched across a wide page, so a row's numbers sit together),
   scrolling inside their box on a phone; numbers right-aligned in tabular figures; the reference (a picked player or club, the
   season being matched) first and highlighted in the same columns; an optional signed difference from it. */
.tbl-wrap:has(> table.tbl), .tbl-wrap:has(> table.stats), .tbl-wrap:has(> label.tbl-diff), .sbs-wrap { width: fit-content; max-width: 100%; }
.tbl-wrap > table.tbl, .tbl-wrap > table.stats { width: auto; }
.tbl tr.ref td, table.stats tr.ref td, table.sbs-table tr.ref td { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); font-weight: 700; border-bottom: 2px solid var(--border-strong); }
.tbl .d, .sbs-table .d { font-weight: 500; font-size: .92em; color: var(--muted); }
/* (A difference is grey either way: up is not always better, an ERA 0.38 higher is worse.) */
.tbl-diff { display: flex; align-items: center; gap: 6px; padding: 6px 8px; font-size: .76rem; color: var(--text-2); position: sticky; left: 0; }
.sbs-wrap { overflow-x: auto; border: 1px solid var(--border); background: var(--surface); margin: 10px 0; }
.sbs-table { border-collapse: collapse; width: auto; font-size: .82rem; font-variant-numeric: tabular-nums; }
table.sbs-table th, table.sbs-table td { padding: 5px 9px; border-bottom: 1px solid var(--grid); white-space: nowrap; text-align: right; vertical-align: top; }
table.sbs-table :is(th, td).l { text-align: left; }
table.sbs-table td.w { white-space: normal; min-width: 380px; max-width: 480px; }
table.sbs-table thead th { background: var(--surface-2); color: var(--text); font-weight: 700; border-bottom: 1px solid var(--border-strong); }
.sbs-table thead th[title] { text-decoration: underline dotted; text-underline-offset: 3px; cursor: help; }
table.sbs-table tbody tr:nth-child(even):not(.ref) td { background: var(--row-alt); }
table.sbs-table td { background: var(--surface); }
.sbs-table :is(th, td):first-child { position: sticky; left: 0; z-index: 1; }
@media (max-width: 600px) { table.sbs-table { font-size: .76rem; } table.sbs-table th, table.sbs-table td { padding: 5px 6px; } table.sbs-table td.w { white-space: nowrap; max-width: none; min-width: 0; } }

/* "How good is our data?" on About (public/js/views/data-quality.js; the owner, 2026-11-17): short headed cards, in up to three
   balanced columns on a wide screen, one on a phone; the report card first. */
.dq-box .dq-lede { max-width: 60em; margin: 4px 0 0; }
.dq-grid { columns: 3 300px; column-gap: 14px; margin-top: 12px; }
.dq-card { border: 1px solid var(--border); background: var(--surface-2); padding: 10px 12px; min-width: 0; break-inside: avoid; margin: 0 0 12px; display: block; box-sizing: border-box; }
.dq-card h3 { font-size: 1rem; margin: 0 0 6px; }
.dq-card ul { margin: 0; padding-left: 18px; display: grid; gap: 5px; font-size: .92rem; line-height: 1.4; }
.dq-card li { overflow-wrap: anywhere; }
.dq-card p { margin: 8px 0 0; }
.dq-card .btn { height: auto; min-height: 44px; padding: 8px 14px; }
.dq-report { border-left: 3px solid var(--accent, var(--brand, currentColor)); }
.dq-part > .box + .box { margin-top: 16px; }

/* ---------- Under the hood (home, under "Not a ChatGPT wrapper"; js/underhood.js) ----------
   Pigskin Lab's field, as each sport's own surface: a court (HoopVision), a ballpark (Batter Lab), a rink (Rinkside). The surface
   is a picture, so it looks the same in light and dark; the cards on it are dark, and the nightly list uses the page's tokens. */
.uh { --uh-acc: var(--brand); display: grid; gap: 16px; }
body[data-sport="nba"] .uh { --uh-acc: #f39a1a; --uh-bg: repeating-linear-gradient(90deg, #b8773c 0 4%, #ab6c33 4% 8%); --uh-bg-m: repeating-linear-gradient(180deg, #b8773c 0 5%, #ab6c33 5% 10%);
  --uh-line: rgba(255,255,255,.8); --uh-in: #1d5fd1; --uh-out: #e06a14; --uh-zin: rgba(23,48,110,.62); --uh-zout: rgba(150,45,10,.55); --uh-zt-in: #cfe0ff; --uh-zt-out: #ffd8b8; --uh-arrow: #ffffff; }
body[data-sport="mlb"] .uh { --uh-acc: #4cc97e; --uh-bg: repeating-linear-gradient(90deg, #2a6a32 0 10%, #245d2b 10% 20%); --uh-bg-m: repeating-linear-gradient(180deg, #2a6a32 0 12%, #245d2b 12% 24%);
  --uh-line: rgba(255,255,255,.75); --uh-in: #3d8bff; --uh-out: #d88a4a; --uh-zin: rgba(22,40,84,.6); --uh-zout: rgba(150,92,48,.82); --uh-zt-in: #cfe0ff; --uh-zt-out: #ffe2c6; --uh-arrow: #ffd34d; }
body[data-sport="nhl"] .uh { --uh-acc: #6bb6ff; --uh-bg: linear-gradient(90deg, transparent calc(50% - 3px), #c8102e calc(50% - 3px), #c8102e calc(50% + 3px), transparent calc(50% + 3px)), linear-gradient(180deg, #f3f8fc, #e3eef7);
  --uh-bg-m: linear-gradient(180deg, #f3f8fc, #e3eef7);
  --uh-line: #0a7fe0; --uh-in: #0a7fe0; --uh-out: #c8102e; --uh-zin: rgba(10,127,224,.14); --uh-zout: rgba(10,127,224,.14); --uh-zt-in: #0a3f73; --uh-zt-out: #0a3f73; --uh-arrow: #0a3f73; }
.uh-head h2 { margin: 0; }
.uh-head p { margin: 4px 0 0; color: var(--muted); max-width: 62ch; }
.uh-field { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr) minmax(0, 1fr);
  border: 2px solid var(--uh-line); border-radius: 10px; overflow: hidden; color: #f4f7f4; background: var(--uh-bg); }
.uh-zone { display: grid; gap: 8px; align-content: center; padding: 14px 12px; }
.uh-in { background: var(--uh-zin); border-right: 4px solid var(--uh-line); }
.uh-out { background: var(--uh-zout); border-left: 4px solid var(--uh-line); }
.uh-zt { font-family: var(--display); font-weight: 800; font-style: italic; text-transform: uppercase; letter-spacing: .12em; font-size: .95rem; }
.uh-in .uh-zt { color: var(--uh-zt-in); } .uh-out .uh-zt { color: var(--uh-zt-out); }
.uh-card { background: rgba(12,14,18,.84); border: 1px solid rgba(255,255,255,.14); border-radius: 7px; padding: 8px 10px; min-width: 0; }
.uh-in .uh-card { border-left: 4px solid var(--uh-in); } .uh-out .uh-card { border-right: 4px solid var(--uh-out); }
.uh-card b { display: block; font-size: .9rem; } .uh-card span { display: block; font-size: .76rem; color: #c2c8cf; margin-top: 1px; }
.uh-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; align-items: center; padding: 16px 14px; }
.uh-step { position: relative; text-align: center; background: rgba(12,14,18,.86); border: 1px solid rgba(255,255,255,.14); border-top: 3px solid var(--uh-acc); border-radius: 7px; padding: 10px 8px; min-width: 0; }
.uh-step:not(:last-child)::after { content: ""; position: absolute; right: -17px; top: 50%; width: 0; height: 0; transform: translateY(-50%);
  border-left: 10px solid var(--uh-arrow); border-top: 7px solid transparent; border-bottom: 7px solid transparent; }
.uh-step .uh-n { display: block; font-family: var(--display); font-weight: 800; font-size: 1.6rem; line-height: 1; color: var(--uh-acc); }
.uh-step b { display: block; font-family: var(--display); text-transform: uppercase; letter-spacing: .08em; font-size: 1rem; margin-top: 2px; }
.uh-step span { display: block; font-size: .76rem; color: #c2c8cf; line-height: 1.35; margin-top: 3px; }
.uh-codes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.uh-code { background: #121417; color: #e8eaed; border-radius: 8px; padding: 12px; display: grid; gap: 8px; align-content: start; min-width: 0; border: 1px solid #2a2e34; }
.uh-code-head b { display: block; font-family: var(--display); text-transform: uppercase; letter-spacing: .1em; color: var(--uh-acc); }
.uh-code-head span { display: block; font-size: .8rem; color: #aeb4bb; }
.uh-code pre { margin: 0; padding: 8px 10px; background: #08090b; border-radius: 6px; }
.uh-code code { font-family: ui-monospace, Consolas, "Courier New", monospace; font-size: .76rem; }
.uh-code pre code { color: #9fe3a8; white-space: pre-wrap; overflow-wrap: anywhere; }
.uh-io { display: flex; gap: 8px; align-items: baseline; min-width: 0; } .uh-io code { overflow-wrap: anywhere; color: #e8eaed; }
.uh-k { flex: 0 0 auto; font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: 1px 6px; border-radius: 3px; background: #2a2e34; color: #aeb4bb; }
.uh-file { font-size: .7rem; color: #8a9199; font-family: ui-monospace, Consolas, monospace; }
.uh-night h3 { margin: 0 0 8px; }
.uh-night ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 10px; }
.uh-night li { display: grid; gap: 4px; align-content: start; padding: 10px 12px; border: 1px solid var(--border); border-top: 3px solid var(--brand); border-radius: 7px; background: var(--surface); }
.uh-t { font-family: var(--display); font-weight: 800; font-size: 1.15rem; color: var(--brand-ink); font-variant-numeric: tabular-nums; }
.uh-night li b { display: block; } .uh-night li span:not(.uh-t) { display: block; font-size: .82rem; color: var(--muted); line-height: 1.4; }
.uh-gate { margin: 8px 0 0; font-size: .82rem; color: var(--muted); }
.no-ai a.uh-link { margin-left: 4px; font-weight: 600; white-space: nowrap; }
@media (max-width: 900px) {
  .uh-field { grid-template-columns: minmax(0, 1fr); background: var(--uh-bg-m); }
  .uh-in { border-right: 0; border-bottom: 4px solid var(--uh-line); } .uh-out { border-left: 0; border-top: 4px solid var(--uh-line); }
  .uh-zone { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); } .uh-zt { grid-column: 1 / -1; }
  .uh-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
  .uh-step::after { display: none; }
  .uh-codes { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) { .uh-zone { grid-template-columns: minmax(0, 1fr); } }

/* The Embed dialog (js/embed-dialog.js) */
.embed-dlg { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0,0,0,.55); }
.embed-card { width: min(560px, 100%); max-height: 100%; overflow: auto; box-sizing: border-box; padding: 18px; background: var(--surface); color: var(--text, inherit); border: 1px solid var(--border-strong); border-radius: 10px; }
.embed-card h3, .embed-card h4 { margin: 0 0 8px; }
.embed-card h4 { margin-top: 14px; }
.embed-code { width: 100%; box-sizing: border-box; margin: 8px 0; font: 12px/1.4 ui-monospace, Consolas, monospace; background: var(--bg); color: inherit; border: 1px solid var(--border-strong); border-radius: 6px; padding: 8px; resize: vertical; }
.embed-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0; }
.embed-theme[aria-pressed="true"] { outline: 2px solid var(--accent, currentColor); }

/* The answer sentence under a club season's and a game's heading (lib/answers.js): plain text, a readable width. */
.page-head p.answer-line { color: var(--text); max-width: 72ch; margin: 6px 0 2px; line-height: 1.5; }

/* ui-refinements.css */
/* Shared interface refinement. Existing sport identities, chart data and exports remain native. */
:root {
  --bg:#f6f7f9; --surface:#fff; --surface-2:#f0f2f5; --surface-3:#e5e9ee;
  --border:#d8dee6; --border-strong:#94a0ae; --grid:#e8ecf1;
  --text:#17212f; --text-2:#354254; --muted:#586779;
  --row-alt:#fafbfd; --row-hover:#fff5cf;
  --ui-radius:10px; --ui-shadow:0 8px 28px #1422340d;
  --ui-menu-shadow:0 14px 36px #10182824;
}
:root[data-theme="dark"] {
  --bg:#15171b; --surface:#1d2026; --surface-2:#252a32; --surface-3:#303743;
  --border:#3b4350; --border-strong:#748194; --grid:#303641;
  --text:#f0f3f7; --text-2:#d1d9e4; --muted:#acb8c8;
  --row-alt:#21252c; --row-hover:#3b3624;
  --ui-shadow:0 8px 28px #0002; --ui-menu-shadow:0 14px 36px #0006;
}
body { line-height:1.55; }
html { scroll-padding-top:calc(var(--header-h,80px) + 16px); }
:focus-visible { outline:2px solid var(--focus); outline-offset:3px; }
button,a.btn,[role="button"],summary { touch-action:manipulation; }
button,.btn,.icon-btn { -webkit-tap-highlight-color:transparent; }
button { font:inherit; }
.btn { min-height:36px; height:auto; border-radius:7px; padding:8px 12px; font-size:.84rem; line-height:1.25; justify-content:center; }
.btn.small { min-height:30px; height:auto; padding:5px 9px; }
.btn.primary { box-shadow:0 1px 2px #0001; }
.btn:disabled { opacity:.48; }
.btn:active:not(:disabled) { background:var(--surface-3); }
.btn.primary:active:not(:disabled) { background:var(--ink-btn); opacity:.84; }
input[type="text"],input[type="search"],input[type="number"],input[type="email"],input[type="password"],input[type="date"],textarea {
  border-radius:7px; min-height:36px; padding:7px 10px; line-height:1.3;
}
/* Native WebKit menu labels clip when vertical padding consumes the control line box. */
select { border-radius:7px; min-height:36px; padding:0 10px; line-height:normal; }
textarea { color:var(--text); background:var(--surface); border:1px solid var(--border-strong); font:inherit; }
input::placeholder,textarea::placeholder { color:var(--muted); opacity:1; }
label.field { gap:5px; }
.seg { height:auto; min-height:36px; border-radius:7px; overflow:hidden; }
.seg button { min-height:34px; padding:7px 11px; }
.box,.tbl-wrap,.kpis { border-radius:var(--ui-radius); }
.tbl-wrap { scrollbar-color:var(--border-strong) var(--surface-2); }
.tbl-tools { gap:8px; padding-top:8px; padding-bottom:8px; }
.menu,.clip-menu,.pop,.popover,.search-results { border-radius:10px; box-shadow:var(--ui-menu-shadow); }
dialog { border-radius:12px; border:1px solid var(--border-strong); box-shadow:0 24px 72px #0005; }
dialog::backdrop { background:#080d1680; }
summary { cursor:pointer; text-underline-offset:3px; }
.notice { border-radius:0 8px 8px 0; line-height:1.6; }
.site-header { border-bottom-width:3px; }
.site-header>.wrap { min-height:64px; height:64px; gap:14px; padding-left:20px; padding-right:20px; }
.site-header .brand { font-size:1.27rem; letter-spacing:.045em; gap:8px; min-height:38px; }
.site-header .brand-logo { flex:none; }
.site-header .beta-pill { flex:none; margin-left:0; }
.site-header .nav { align-items:stretch; gap:1px; }
.site-header .nav>a,.site-header .graphics-nav>a { display:flex; align-items:center; font-size:.73rem; line-height:1.2; padding:0 8px; letter-spacing:.025em; }
.site-header .nav a { transition:background-color 120ms ease,color 120ms ease; }
.site-header .nav a[aria-current="page"] { background:#ffffff0b; }
.site-header .header-tools { gap:7px; }
.site-header .icon-btn { min-height:36px; height:36px; border-radius:7px; padding:0 10px; font-size:.72rem; }
.site-header .search input { width:190px; height:36px; min-height:36px; padding:7px 10px; border-radius:7px; }
.site-header .search-results { max-height:min(440px,65dvh); overflow:auto; padding:5px; border-color:var(--border-strong); }
.site-header .search-results a { min-height:42px; align-items:center; padding:9px 10px; border-radius:6px; gap:12px; }
.site-header .search-results a small { flex:none; }
.site-header .graphics-options { padding:6px; border-radius:10px; box-shadow:var(--ui-menu-shadow); min-width:220px; }
.site-header .nav .graphics-options a { display:flex; align-items:center; min-height:42px; line-height:1.25; padding:10px 12px; border:0; border-radius:6px; color:var(--text); font-size:.78rem; letter-spacing:.02em; }
.site-header .nav .graphics-options a:hover,.site-header .nav .graphics-options a:focus-visible,.site-header .nav .graphics-options a[aria-current="page"] { color:var(--text); background:var(--surface-2); }
/* This is a drawn icon, not the coarse-pointer hit-area pseudo-element from site.css. */
.site-header .menu-btn { flex:none; white-space:nowrap; }
.menu-btn::before { content:""; position:static; transform:none; display:block; flex:0 0 14px; width:14px; height:11px; border-top:2px solid currentColor; border-bottom:2px solid currentColor; background:linear-gradient(currentColor,currentColor) center/14px 2px no-repeat; }
.site-footer { margin-top:24px; background:var(--surface); border-top:1px solid var(--border); }
.site-family { gap:10px; padding-top:22px; padding-bottom:20px; }
.site-family a { border-radius:8px; padding:12px 14px; }
.site-foot-main { line-height:1.75; padding-top:16px; padding-bottom:18px; }
.shared-signin-foot { padding-top:14px; padding-bottom:18px; }
@media (max-width:1599px), (pointer:coarse) {
  .site-header>.wrap { height:auto; min-height:64px; padding-top:10px; padding-bottom:10px; flex-wrap:wrap; gap:10px; }
  .site-header .header-tools { margin-left:auto; }
  .site-header .menu-btn { display:inline-flex; }
  .site-header:not(.menu-open) .nav { display:none; }
  .site-header.menu-open .nav { order:3; display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); flex-basis:100%; gap:8px; padding:12px 0; border-top:1px solid #ffffff24; height:auto; max-height:60dvh; overflow-y:auto; overscroll-behavior:contain; }
  .site-header.menu-open .nav>a,.site-header.menu-open .graphics-nav>a { justify-content:flex-start; text-align:left; min-height:48px; padding:12px 14px; line-height:1.3; border:1px solid #ffffff2e; border-radius:8px; background:#ffffff0d; color:var(--header-ink); font-size:.82rem; font-weight:650; text-decoration:none; }
  .site-header.menu-open .nav a[aria-current="page"] { background:#ffffff20; border-color:#ffffff60; box-shadow:inset 3px 0 var(--brand); }
  .site-header.menu-open .nav :is(a:active,a:focus-visible) { background:#ffffff26; border-color:#ffffff70; color:var(--header-ink); text-decoration:none; }
  .site-header .graphics-nav>a { width:100%; }
  .site-header .graphics-options { display:none !important; }
}
@media (max-width:1000px) {
  .site-header>.wrap { padding-left:16px; padding-right:16px; }
  .site-header .search input { width:150px; }
  .site-header .icon-btn { padding:0 9px; }
}
@media (max-width:680px) {
  .site-header>.wrap { gap:8px 10px; }
  .site-header .brand { font-size:1.2rem; }
  .site-header .header-tools { flex-basis:100%; display:flex; width:100%; gap:6px; position:relative; }
  .site-header .search { flex:1; min-width:90px; position:static; }
  .site-header .search input { width:100%; font-size:16px; }
  .site-header .search-results { top:calc(100% + 6px); left:0; right:0; width:auto; }
  .site-header .icon-btn { min-height:40px; height:40px; padding:0 9px; }
  .site-header .search input { min-height:40px; height:40px; }
  .site-header #theme-label { display:none; }
  .site-header #theme-toggle { width:40px; justify-content:center; }
  .site-header.menu-open .nav { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .site-foot-main { gap:12px; }
}
@media (pointer:coarse) {
  :is(input[type="text"],input[type="search"],input[type="number"],input[type="email"],input[type="password"],input[type="date"],select,textarea) { font-size:16px; }
  .btn,.seg button { min-height:44px; }
  select { min-height:44px; }
  .site-header .icon-btn,.site-header .search input { min-height:44px; height:44px; }
  .site-header #theme-toggle { width:auto; min-width:44px; flex:none; }
}
@media (hover:hover) and (pointer:fine) {
  .btn:hover:not(:disabled) { border-color:var(--text-2); }
  .site-header .nav>a:hover,.site-header .graphics-nav>a:hover { background:#ffffff0b; }
  .site-header.menu-open .nav>a:hover,.site-header.menu-open .graphics-nav>a:hover { background:#ffffff26; border-color:#ffffff70; color:var(--header-ink); text-decoration:none; }
  .site-family a:hover { background:var(--surface-2); }
}
@media (prefers-reduced-motion:reduce) {
  .site-header .nav a { transition:none; }
}
/* Keep presentation and compact widget controls in their own established geometry. */
.wtools .btn,.w-tools .btn { min-height:26px; padding:3px 6px; }
html[data-brand] .site-header>.wrap { min-height:50px; }
@media print { body { background:#fff; } }

/* Trend cards must grow with text zoom and wrap long numeric comparisons. */
.tgroups { grid-template-columns:repeat(auto-fill,minmax(min(100%,18.125rem),1fr)); }
.tgroup { min-width:0; }
.tgroup li a { flex-wrap:wrap; }
.tgroup li a .what { min-width:0; flex:1 1 6em; overflow-wrap:anywhere; }
.tgroup li a .nums { white-space:normal; overflow-wrap:anywhere; margin-left:auto; text-align:right; }

@media (max-width:680px) { .site-header .header-tools { flex-wrap:wrap; } }

.vcard .top,.tgroup-head { flex-wrap:wrap; }

.site-header .brand { min-width:0; max-width:100%; white-space:normal; overflow-wrap:anywhere; }

/* A popup dismissal is a touch target; compact chart toolbar buttons stay unchanged. */
@media (pointer:coarse) {
  .inspector > h3 > .btn.small, .settings-modal .settings-ways > .btn.small { min-width:44px; min-height:44px; padding:8px 10px; }
}

/* Team result links show the opponent, not an unexplained game number. */
.team-result-strip { margin:12px 0; max-width:100%; }
.team-result-strip>p { margin:0 0 6px; }
.team-result-links { display:flex; flex-wrap:wrap; gap:4px; max-height:146px; overflow:auto; padding:2px 2px 4px; overscroll-behavior:contain; }
.team-result-links a,.results.team-result-strip a { display:inline-flex; align-items:center; justify-content:center; flex:none; min-width:72px; min-height:44px; height:auto; padding:8px 10px; border-radius:4px; font-size:13px; line-height:1.2; white-space:nowrap; color:#fff; text-decoration:none; }
.team-result-links a.w { background:#087b37; }
.team-result-links a.l { background:#b3261e; }
.team-result-links a.t { background:#596273; }
.team-result-links a:hover,.team-result-links a:focus-visible,.results.team-result-strip a:hover,.results.team-result-strip a:focus-visible { color:#fff; text-decoration:none; outline:2px solid var(--text); outline-offset:2px; }

/* Removable filters align their label and close control on the same centre line. */
.ask-filters .filter-chips, .ask-chips { display:flex; align-items:center; flex-wrap:wrap; gap:6px; }
.chip.filter-chip, .dash-page .ask-bar .chip.filter-chip { display:inline-flex; align-items:center; gap:6px; line-height:1.25; vertical-align:middle; }
.chip.filter-chip .chip-x { flex:none; margin:0; align-self:center; }
/* The tight right padding only makes room for the x. A chip without one (who, which seasons) keeps even padding, so its label is centred. */
.chip.filter-chip, .dash-page .ask-bar .chip.filter-chip { justify-content:center; padding:2px 10px; }
.chip.filter-chip:has(> .chip-x), .dash-page .ask-bar .chip.filter-chip:has(> .chip-x) { padding:1px 2px 1px 10px; }
/* A widget's sample line starts on the same edge as its title (.w-head has 9px). */
.w-sample { padding-left:9px; }

/* ---------- 2026-10-30, the UI audit ---------- */
/* A busy site (api.js): one quiet line while requests wait their turn. */
.net-busy { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 60; max-width: calc(100vw - 32px); padding: 8px 16px; border-radius: 999px; background: var(--surface); color: var(--text-2); border: 1px solid var(--border-strong); font-size: .85rem; box-shadow: 0 2px 10px rgba(0,0,0,.14); }
.busy-page { margin-top: 28px; margin-bottom: 32px; }
/* Charts that cannot use the board's filters (filter-hold.js): one neutral line at the end of the board. */
.filter-held-line { padding: 10px 12px; color: var(--text-2); font-size: .9rem; line-height: 1.45; border-top: 1px solid var(--border); min-width: 0; }
.filter-held-line .linkish { min-height: 32px; }
.filter-header-note { padding: 8px 12px; border-bottom: 1px solid var(--border); background: var(--surface-2, var(--bg)); color: var(--text-2); font-size: .82rem; line-height: 1.4; text-align: left; flex: 0 0 auto; }
.filter-header-note strong { display: block; color: var(--text); font-size: .88rem; }
.filter-held-note { padding: 14px; color: var(--text-2); font-size: .9rem; line-height: 1.45; text-align: left; }
.filter-held-note p { margin: 0; }
/* A chart not yet near the screen holds a chart's room. */
.widget.undrawn .w-body { min-height: 200px; }

/* The tip bar's statement: its first sentence and the link on a phone, its first three sentences from there up (the owner's wording; the full text on About). */
@media (max-width: 600px) { .tip-more { display: none; } }
.tip-strip .wrap > span a { color: inherit; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
/* A finger gets 44 px on "How it works", as on the bar's other controls (site.css; the accessibility statement promises it). */
@media (pointer: coarse) {
  .tip-strip .wrap > span a { position: relative; z-index: 1; }
  .tip-strip .wrap > span a::before { content: ''; position: absolute; left: 50%; top: 50%; width: max(100%, 44px); height: max(100%, 44px); transform: translate(-50%, -50%); }
}
/* "No ads." takes the statement past one line at desktop widths: two even lines, not the link alone on the second. */
.tip-strip .wrap > span:first-child { text-wrap: balance; }

/* (Not in Edit dashboard on an iPad, .free-edit: there the board keeps its columns so a finger can size widgets.)
   Reflow saved dashboard columns for phones and tablets without rewriting the
   board's desktop spans or dimensions. Charts get room across, not tall slivers. */
@media (max-width:1280px) {
  .dash-page:not(.free-edit) .board.cells { --cols:1; grid-auto-rows:auto; min-height:400px; }
  .dash-page:not(.free-edit) .board.cells>.widget { grid-column:1 / -1 !important; grid-row:auto !important; min-height:280px; }
  .dash-page:not(.free-edit) .board.cells>.widget.tiles-w,.dash-page:not(.free-edit) .board.cells>.widget.answer { min-height:0; }
  .dash-page .board-scroll { min-height:0; }
  .dash-page:not(.free-edit) :is(.w-resize, .w-edge) { display:none; }
  .dash-page .w-body.chart { flex:none; height:320px; }
  .dash-page .widget.radar-w .w-body.chart { height:430px; }
  .dash-page .tiles { grid-template-columns:repeat(2,minmax(0,1fr)); height:auto; }
  .dash-page .tile { min-height:120px; padding:12px; justify-content:flex-start; gap:4px; }
  .dash-page .tile .k { font-size:13px; white-space:normal; overflow:visible; line-height:1.35; }
  .dash-page .tile :is(.r,.q,.p) { font-size:14px; line-height:1.4; overflow-wrap:anywhere; }
}

@media (max-width:599px) { .dash-page .tiles { grid-template-columns:minmax(0,1fr); } }

/* Clearing a phone dashboard must leave a visible way to restore it even when
   the empty-board view hides the Edit dashboard control. */
@media (max-width:720px) {
  .dash-page.empty-board:not(.locked):not(.editing) .dash-top>:is(.dash-undo,.dash-redo):not(.x) { display:inline-flex; }
}

/* Team result links show the opponent, not an unexplained game number. */
.team-result-strip { margin:12px 0; max-width:100%; }
.team-result-strip>p { margin:0 0 6px; }
.team-result-links { display:flex; flex-wrap:wrap; gap:4px; max-height:146px; overflow:auto; padding:2px 2px 4px; overscroll-behavior:contain; }
.team-result-links a,.results.team-result-strip a { display:inline-flex; align-items:center; justify-content:center; flex:none; min-width:72px; min-height:44px; height:auto; padding:8px 10px; border-radius:4px; font-size:13px; line-height:1.2; white-space:nowrap; color:#fff; text-decoration:none; }
.team-result-links a.w { background:#087b37; }
.team-result-links a.l { background:#b3261e; }
.team-result-links a.t { background:#596273; }
.team-result-links a:hover,.team-result-links a:focus-visible,.results.team-result-strip a:hover,.results.team-result-strip a:focus-visible { color:#fff; text-decoration:none; outline:2px solid var(--text); outline-offset:2px; }

/* NBA game details use recorded box scores, with contained tables on touch screens. */
.nba-game-detail { font-size:14px; line-height:1.45; }
.nba-game-detail .small { font-size:13px; line-height:1.5; }
.nba-shot-teams { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.nba-shot-team { min-width:0; border:1px solid var(--border); border-radius:8px; padding:12px; }
.nba-shot-team h3 { margin:0 0 10px; font-size:17px; white-space:normal; }
.nba-score-stack { display:flex; min-height:44px; width:100%; overflow:hidden; border-radius:5px; margin-bottom:12px; }
.nba-score-stack>span { display:flex; align-items:center; justify-content:center; min-width:max-content; padding:0 3px; font-size:12px; font-weight:700; color:#fff; overflow:hidden; white-space:nowrap; }
.nba-score-stack .two { background:#0d6680; }.nba-score-stack .three { background:#7043a3; }.nba-score-stack .ft { background:#805a00; }
.nba-detail-scroll { max-width:100%; overflow:auto; margin:8px 0; }
.nba-detail-table { border-collapse:collapse; width:100%; font-variant-numeric:tabular-nums; font-size:14px; }
.nba-detail-table th,.nba-detail-table td { padding:9px 10px; border-bottom:1px solid var(--border); text-align:right; white-space:nowrap; }
.nba-detail-table th:first-child { text-align:left; }
.nba-detail-table thead { background:var(--surface-2); }
.nba-detail-players { margin:12px 0; padding:10px 12px; border:1px solid var(--border); border-radius:7px; }
.nba-detail-players summary { min-height:44px; display:list-item; cursor:pointer; font-weight:700; padding:10px 0; }
.nba-detail-players .nba-detail-table { min-width:610px; }
@media (max-width:700px) { .nba-shot-teams { grid-template-columns:minmax(0,1fr); }.nba-detail-table th,.nba-detail-table td { padding:9px 6px; }.nba-shot-team { padding:10px; } }
.nba-detail-table-hint { display:none; }
@media (max-width:700px) { .nba-detail-table-hint { display:block; } }
.nba-game-jumps { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin-top:14px; }
.nba-game-jumps .btn { min-height:44px; }
.game-board #game-shooting,.game-board #game-rebounds { scroll-margin-top:calc(var(--header-h,64px) + 12px); }
.nba-shot-team .nba-detail-table th:last-child { padding-right:16px; }

/* Removable filters align their label and close control on the same centre line. */
.ask-filters .filter-chips, .ask-chips { display:flex; align-items:center; flex-wrap:wrap; gap:6px; }
.chip.filter-chip, .dash-page .ask-bar .chip.filter-chip { display:inline-flex; align-items:center; gap:6px; line-height:1.25; vertical-align:middle; }
.chip.filter-chip .chip-x { flex:none; margin:0; align-self:center; }
/* The tight right padding only makes room for the x. A chip without one (who, which seasons) keeps even padding, so its label is centred. */
.chip.filter-chip, .dash-page .ask-bar .chip.filter-chip { justify-content:center; padding:2px 10px; }
.chip.filter-chip:has(> .chip-x), .dash-page .ask-bar .chip.filter-chip:has(> .chip-x) { padding:1px 2px 1px 10px; }
/* A widget's sample line starts on the same edge as its title (.w-head has 9px). */
.w-sample { padding-left:9px; }

/* Box-score cards read like numbers, with supporting labels at a readable size. */
.widget .tile { align-items:flex-start; text-align:left; padding:16px; gap:5px; justify-content:flex-start; }
.widget .tile .v { font:700 2.5rem/1.15 var(--font); font-variant-numeric:tabular-nums; }
.widget .tile :is(.r,.q,.p) { font-size:14px; line-height:1.45; }
.widget .tile .k { font-size:13px; line-height:1.4; }
@media(min-width:1281px) { .widget .tile { min-height:180px; } }
@media(max-width:600px) { .widget .tiles { grid-template-columns:1fr; } .widget .tile { min-height:150px; } }

/* ---------- 2026-10-30, the UI audit ---------- */
/* A busy site (api.js): one quiet line while requests wait their turn. */
.net-busy { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 60; max-width: calc(100vw - 32px); padding: 8px 16px; border-radius: 999px; background: var(--surface); color: var(--text-2); border: 1px solid var(--border-strong); font-size: .85rem; box-shadow: 0 2px 10px rgba(0,0,0,.14); }
.busy-page { margin-top: 28px; margin-bottom: 32px; }
/* Charts that cannot use the board's filters (filter-hold.js): one neutral line at the end of the board. */
.filter-held-line { padding: 10px 12px; color: var(--text-2); font-size: .9rem; line-height: 1.45; border-top: 1px solid var(--border); min-width: 0; }
.filter-held-line .linkish { min-height: 32px; }
.filter-header-note { padding: 8px 12px; border-bottom: 1px solid var(--border); background: var(--surface-2, var(--bg)); color: var(--text-2); font-size: .82rem; line-height: 1.4; text-align: left; flex: 0 0 auto; }
.filter-header-note strong { display: block; color: var(--text); font-size: .88rem; }
.filter-held-note { padding: 14px; color: var(--text-2); font-size: .9rem; line-height: 1.45; text-align: left; }
.filter-held-note p { margin: 0; }
/* Above the board, and where the screen lands after Ask: below the sticky header, never under it. */
.answer-nav { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 8px 2px; }
.answer-nav[hidden] { display: none; }
.answer-said { flex: 1 1 100%; font-size: .95rem; line-height: 1.4; }
.ask-unused { flex: 1 1 100%; margin: 0; padding: 6px 10px; border-left: 3px solid var(--border-strong); background: var(--surface); font-size: .9rem; line-height: 1.4; }
.answer-nav .to-ask { font-size: .85rem; min-height: 32px; }
/* The machinery of an answer, folded. */
.ask-details { font-size: .8rem; color: var(--text-2); }
.ask-details > summary { cursor: pointer; min-height: 28px; line-height: 28px; font-weight: 600; }
.ask-links { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; margin: 4px 0; }
.ask-links:empty { display: none; }
.ask-history { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
/* A chart not yet near the screen holds a chart's room. */
.widget.undrawn .w-body { min-height: 200px; }
/* Editor tools only while editing, at every width (phones already were). */
.dash-page:not(.editing):not(.empty-board) .dash-top > :is(.add-widget, .dash-clear, .paste-pop, .sep, .seg, .dash-fit, .edit-only, .account-presets, [aria-label="Keyboard shortcuts"]),
.dash-page:not(.editing) .focus-bar { display: none; }
/* Signed out: a control that needs an account says so with a small lock before it is pressed; a widget's editing tools do not show at all. */
.w-tools > [data-signin] { display: none; }
.dash-top > button[data-signin]::after, .dash-top > .pop[data-signin] > button::after, .page-head button.needs-account::after, .creator-tools button[data-signin]::after, a.btn[data-signin]::after {
  content: ''; display: inline-block; width: .62em; height: .72em; margin-left: .4em; vertical-align: -.02em; opacity: .75; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 12'%3E%3Cpath d='M2 5V3.5a3 3 0 016 0V5h1v7H1V5zm1.4 0h3.2V3.5a1.6 1.6 0 00-3.2 0z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 12'%3E%3Cpath d='M2 5V3.5a3 3 0 016 0V5h1v7H1V5zm1.4 0h3.2V3.5a1.6 1.6 0 00-3.2 0z'/%3E%3C/svg%3E") center / contain no-repeat; }
/* Games: a day at a time. */
.games-days { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0 4px; }
.games-days .day-label { font-weight: 700; flex: 1 1 auto; text-align: center; min-width: 8em; }
.games-days .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
/* A player's latest numbers, first on his page. */
.player-line { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 8px; margin: 12px 0; }
.player-line > div { padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); text-align: center; }
.player-line b { display: block; font-size: 1.35rem; line-height: 1.2; }
.player-line span { font-size: .75rem; color: var(--text-2); }
.player-line-head { margin: 16px 0 0; font-size: .95rem; }
.for-creators { margin-top: 24px; }
/* Its packs, each its name, what is in it and its two buttons (vertical, landscape), each button its own status line under it. */
.for-creators .pack-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; align-items: stretch; margin: 10px 0; }
.for-creators .pack-group { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); min-width: 0; }
.for-creators .pack-group h3 { margin: 0; font-size: 1.02rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.for-creators .pack-group > p { margin: 0; }
.for-creators .pack-buttons { display: flex; flex-direction: column; gap: 6px; margin-top: auto; }
.for-creators .pack-pro { font-size: .7rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; border: 1px solid currentColor; color: var(--text-2); }
.for-creators .prep-pack { margin: 0; }
.for-creators .prep-pack .btn { width: 100%; white-space: normal; }
.for-creators .prep-pack [role="status"] { margin: 4px 0 0; }
.for-creators .prep-pack [role="status"]:empty { display: none; }
/* Before / After: a refusal that reads as one. */
.ba-error { padding: 10px 12px; border-left: 4px solid var(--bad, #b91c1c); background: var(--surface); color: var(--text); font-size: .95rem; line-height: 1.45; }

/* The tip bar's statement: its first sentence and the link on a phone, its first three sentences from there up (the owner's wording; the full text on About). */
@media (max-width: 600px) { .tip-more { display: none; } }
.tip-strip .wrap > span a { color: inherit; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
/* A finger gets 44 px on "How it works", as on the bar's other controls (site.css; the accessibility statement promises it). */
@media (pointer: coarse) {
  .tip-strip .wrap > span a { position: relative; z-index: 1; }
  .tip-strip .wrap > span a::before { content: ''; position: absolute; left: 50%; top: 50%; width: max(100%, 44px); height: max(100%, 44px); transform: translate(-50%, -50%); }
}
/* "No ads." takes the statement past one line at desktop widths: two even lines, not the link alone on the second. */
.tip-strip .wrap > span:first-child { text-wrap: balance; text-align: center; }

/* The tip bar on one line, and a second line for creators (the owner, 2026-11-04: "that same top bar fix for hoopvision
   as well with the creator portal link", as Pigskin Lab has it). The rest of the free-during-beta statement is the
   tooltip and About#access; .tip-more is hidden on every screen now. */
.tip-strip .tip-more { display: none; }
.tip-strip .wrap > span:first-child { flex-basis: auto; }
.tip-strip-creators { flex-basis: 100%; margin: 2px 0 0; padding-top: 5px; border-top: 1px solid #3a3322; text-align: center; color: #d8d2c0; }
.tip-strip-creators b { color: #f2d27a; font-weight: 700; }
.tip-strip-creators a { color: #f2d27a; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
@media (max-width: 600px) { .tip-strip-creators { font-size: .74rem; } }
@media (pointer: coarse) {
  .tip-strip-creators a { position: relative; z-index: 1; }
  .tip-strip-creators a::before { content: ''; position: absolute; left: 50%; top: 50%; width: max(100%, 44px); height: max(100%, 44px); transform: translate(-50%, -50%); }
}

/* The header names the site by its domain (hoopvisionlab.com, the owner, 2026-11-01): a little tighter on a tablet (681 to 900 px),
   so the brand, the Beta pill and the search, sign-in, theme and menu buttons stay on one row as they did with the name. */
@media (min-width: 681px) and (max-width: 900px) { .site-header .brand { font-size: 1.1rem; letter-spacing: .02em; } }
/* The tip bar's × beside its first line, not halfway down both (the owner, 2026-11-04). */
.tip-strip .wrap:has(.tip-strip-creators) .tip-strip-close { top: 19px; }
/* A game's live box score until the refresh loads it (public/js/live-box.js; the owner, 2026-11-07): the notice at the very top
   of the page, then the score, each period, both sides' totals and the leaders. */
.live-notice { margin: 12px 0 0; padding: 10px 12px; border: 1px solid var(--border); border-left: 4px solid var(--brand); background: var(--surface); font-size: .92rem; }
.live-notice.on { border-left-color: var(--live-green); }
/* Green: this game, from the live feed. Red: everything from before tip-off (the owner, 2026-11-07). */
:root { --live-green: #1f9d55; --live-green-bg: #157a40; --pre-red: #c8102e; }
:root[data-theme="dark"] { --live-green: #3ecf73; --live-green-bg: #3ecf73; --pre-red: #ff6b61; }
.live-box { margin: 16px 0 8px; padding: 14px 16px; border: 3px solid var(--live-green); background: var(--surface); }
.live-label, .pregame-label { display: inline-block; margin: 0 0 10px; padding: 3px 12px; font-size: .9rem; font-weight: 800; letter-spacing: .12em; color: #fff; }
.live-label { background: var(--live-green-bg); }
/* (At the final: a neutral badge, not the live green. Audit 2026-11-08.) */
.live-label.live-final { background: #4b5563; color: #fff; }
:root[data-theme="dark"] .live-label.live-final { background: #9ca3af; color: #101010; }
/* (And the box's border with it: a final kept the live green border round a grey badge. Audit 2026-11-08.) */
.live-box[data-state="final"] { border-color: #4b5563; }
:root[data-theme="dark"] .live-box[data-state="final"] { border-color: #9ca3af; }
.live-box[data-state="final"] .live-chart-cap { color: var(--text-2); }
.pregame-label { background: var(--pre-red); }
:root[data-theme="dark"] .live-label, :root[data-theme="dark"] .pregame-label { color: #101010; }
/* The live box without dead space (the owner, 2026-11-07): the label and the clock on one line; the score in a tight block with
   the points by period beside it; then team totals, leaders and tonight vs season average as cards filling the width; the card
   buttons in one row. */
.live-label { vertical-align: middle; margin-right: 10px; }
.live-head { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; vertical-align: middle; margin: 0 0 10px; }
.live-top { display: grid; grid-template-columns: minmax(260px, 380px) minmax(0, 1fr); gap: 14px 28px; align-items: center; margin: 4px 0 10px; }
/* The points by period only as wide as its numbers (the owner, 2026-11-07: no stretched sparse tables): Q1 and Q2 were 250 px
   apart across the box. Each period a fixed narrow column; the table scrolls on its own in overtime on a phone. */
.live-top { grid-template-columns: minmax(260px, 380px) minmax(0, max-content); }
.live-top .live-periods { width: auto; }
.live-top .live-periods th:not(:first-child), .live-top .live-periods td { min-width: 3.2em; padding-left: 12px; padding-right: 12px; }
.live-top .live-periods th:first-child { padding-right: 20px; }
.live-score { display: grid; gap: 2px; }
.live-side { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; align-items: center; gap: 10px; border-bottom: 1px solid var(--border); padding: 4px 0; }
.live-chip { width: 14px; height: 28px; background: var(--muted); box-shadow: inset 0 0 0 1px var(--border-strong, var(--border)); }
.live-team { font-size: 1.1rem; min-width: 0; overflow-wrap: anywhere; }
.live-pts { font-size: 2rem; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.live-table { border-collapse: collapse; font-variant-numeric: tabular-nums; margin: 0; width: 100%; }
.live-table th, .live-table td { padding: 4px 8px; border-bottom: 1px solid var(--border); text-align: right; }
.live-table th[scope="row"], .live-table thead th:first-child { text-align: left; }
.live-total { font-weight: 700; }
.live-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
/* The cards under the graphs in columns that each stack their own cards (public/js/live-box.js flow): no card is stretched to a
   neighbour's height and no column is left with a hole under a short card. */
.live-flow { display: flex; gap: 14px; align-items: flex-start; min-width: 0; }
.live-flow-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.live-card { border: 1px solid var(--border); padding: 10px 12px; min-width: 0; }
.live-card h3 { margin: 0 0 6px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.live-card > p { margin: 6px 0 0; }
.live-leaders h4, .live-versus h4 { margin: 8px 0 2px; font-size: .95rem; }
.live-leaders h4:first-of-type, .live-versus h4:first-of-type { margin-top: 0; }
.live-leaders dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 0; }
.live-leaders dt { color: var(--muted); }
.live-leaders dd { margin: 0; }
.live-versus ul { margin: 0; padding-left: 18px; }
.live-versus li { margin: 2px 0; }
.live-avg { color: var(--muted); }
.live-cards { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; }
.live-cards p { flex: 1 1 280px; margin: 0; }
/* What the card shows, on its own line above the buttons, not squeezed beside them (the owner, 2026-11-07). */
.live-cards p.live-cards-about { flex: 0 0 100%; }
.live-cards [role="status"]:empty { display: none; }
/* The pregame box: its label and heading on one line, the notice under them. */
.pregame-box { margin: 18px 0 8px; padding: 12px 16px; border: 3px solid var(--pre-red); }
.pregame-box > .pregame-label { vertical-align: middle; margin: 0 10px 8px 0; }
.pregame-box > h2 { display: inline-block; vertical-align: middle; margin: 0 0 8px; font-size: 1.35rem; }
.pregame-box .game-board { margin-top: 12px; }
.pregame-notice { margin: 0; padding: 8px 12px; border: 1px solid var(--border); border-left: 4px solid var(--muted); background: var(--surface); font-size: .92rem; }
main.content-pages .live-game-page .page-head > p, .live-game-page .page-head > p { max-width: none; }
/* The live graphs (public/js/live-charts.js): the lead tracker across the box, the bars as cards; the site's text colours, the
   live green for the line and the better side's bar. */
/* The Advanced card and the Customize card panel (public/js/live-box.js). */
.live-adv td small { display: block; font-size: .72rem; }
.live-advanced h3 + table, .live-advanced table + p { margin-top: 4px; }
.live-advanced h3:not(:first-child) { margin-top: 10px; }
.live-customize { flex-basis: 100%; border: 1px solid var(--border); padding: 6px 10px; }
.live-customize summary { cursor: pointer; font-weight: 700; }
.live-customize-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 6px 14px; margin-top: 6px; }
.live-customize-body > p { grid-column: 1 / -1; margin: 0; }
.live-customize-group { border: 0; margin: 0; padding: 0; min-width: 0; }
.live-customize-group legend { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 0; margin-bottom: 2px; }
.live-customize-group label { display: block; font-size: .85rem; line-height: 1.5; }
.live-fit { margin: 6px 0 0; }
.live-preview img { display: block; max-width: 100%; height: auto; margin-top: 8px; border: 1px solid var(--border); }
/* The live-game demo (views/live-demo.js): the replay said first, the controls kept in view. */
.live-demo-banner { margin: 8px 0; padding: 10px 12px; border: 2px dashed var(--muted); background: var(--surface); }
.live-demo-public { margin-bottom: 4px; }
/* The creators' line's own × (public/js/app.js creatorsLine), apart from the bar's. */
.tip-strip-creators { position: relative; padding-right: 32px; padding-left: 32px; }
.tip-strip-creators-close { position: absolute; right: 4px; top: 50%; transform: translateY(-40%); background: none; border: 0; color: #9a927e; font-size: 1.1rem; line-height: 1; cursor: pointer; padding: 0 4px; }
.tip-strip-creators-close:hover, .tip-strip-creators-close:focus-visible { color: #fff; }
.tip-strip-creators-close::before { content: ''; position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; transform: translate(-50%, -50%); }
.live-demo { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin: 12px 0 0; padding: 8px 10px; border: 2px dashed var(--muted); background: var(--surface); font-size: .85rem; }
.live-demo-play { flex: 1 1 100%; font-variant-numeric: tabular-nums; }
/* The charts by team (public/js/live-charts.js headToHead, teamColumns): this game head to head once for both clubs, then the away
   side, then the home side. Three across on a wide screen; on a middle one the head-to-head across the top, the two clubs under
   it; one column on a phone. */
.live-teams { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.live-h2h h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-size: 1.05rem; text-transform: none; letter-spacing: 0; color: var(--text); }
.live-h2h .live-team-sec { margin-top: 4px; }
.lc-h2h { color: var(--text); }
@media (max-width: 1099px) { .live-teams { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .live-teams > .live-h2h { grid-column: 1 / -1; } }
.live-team-col h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-size: 1.05rem; text-transform: none; letter-spacing: 0; color: var(--text); }
.live-team-chip { display: inline-block; width: 6px; height: 22px; box-shadow: inset 0 0 0 1px var(--border-strong, var(--border)); }
.live-team-sec { margin-top: 10px; }
.live-team-sec h4 { margin: 0; font-size: .9rem; }
.live-team-sec .live-chart-cap { margin: 0 0 4px; }
.live-team-note { margin: 4px 0 0; }
@media (max-width: 760px) { .live-teams { grid-template-columns: minmax(0, 1fr); } }
.live-chart { margin: 0; }
.live-chart.live-lead { grid-column: 1 / -1; }
.live-chart-cap { margin: -2px 0 6px; font-size: .72rem; font-weight: 700; letter-spacing: .04em; color: var(--live-green); }
.live-svg { display: block; width: 100%; height: auto; overflow: visible; font-family: inherit; }
.live-lead .live-svg { max-height: 260px; }
/* The live win probability (live-charts.js winProbChart): across the box, the number now big over the curve. */
.live-chart.live-wp { grid-column: 1 / -1; }
.live-wp .live-svg { max-height: 260px; }
.live-wp-now { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0 0 6px; }
.live-wp-now strong { font-size: 1.9rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.live-wp-now .live-team-chip { height: 30px; }
.live-wp-final { margin: 0 0 6px; font-weight: 700; }
.live-wp-why { flex-basis: 100%; }
@media (max-width: 480px) { .live-wp-now strong { font-size: 1.5rem; } }
.live-chart figcaption { margin-top: 6px; }
.lc-grid { stroke: var(--border); stroke-width: 1; }
.lc-zero { stroke: var(--text-2, var(--text)); stroke-width: 1.5; stroke-dasharray: 4 3; }
.lc-line { fill: none; stroke: var(--live-green); stroke-width: 2.5; stroke-linejoin: round; }
.lc-dot { fill: var(--live-green); }
.lc-pt { fill: var(--live-green); opacity: .5; }
.lc-tick { fill: var(--muted); font-size: 11px; }
.lc-label { fill: var(--text); font-size: 12px; font-weight: 700; }
.lc-val { fill: var(--text); font-size: 12px; font-variant-numeric: tabular-nums; }
.lc-muted { fill: var(--muted); font-size: 13px; }
.lc-bar { fill: var(--muted); opacity: .45; }
.lc-bar.lc-best { fill: var(--live-green); opacity: 1; }
.lc-best-t { font-weight: 700; }
/* (A value written over the chart keeps a ring of the card's colour, so a line under it never runs through its letters.) */
.lc-halo { paint-order: stroke; stroke: var(--surface, #fff); stroke-width: 4px; stroke-linejoin: round; }
@media (max-width: 760px) { .live-top { grid-template-columns: minmax(0, 1fr); } }
/* (At 320 px the points by period kept their desktop padding, the more specific .live-top rule beating the phone one, and widened
   the page to 323 px with the score above them: narrower cells, the table its own scroller when overtime still needs more. Site
   audit 2026-11-08 round 4, H4-7.) */
@media (max-width: 680px) {
  .live-top > * { min-width: 0; max-width: 100%; }
  .live-top .live-periods { display: block; overflow-x: auto; max-width: 100%; }
  .live-top .live-periods th:not(:first-child), .live-top .live-periods td { min-width: 2.2em; padding-left: 5px; padding-right: 5px; }
  .live-top .live-periods th:first-child { padding-right: 8px; }
  .live-score, .live-side { min-width: 0; max-width: 100%; }
}
@media (max-width: 680px) { .live-box, .pregame-box { padding: 10px 10px; } .live-grid { grid-template-columns: 1fr; } .live-pts { font-size: 1.6rem; } .live-periods th, .live-periods td { padding: 4px 5px; } }
/* A two-club table on a game page (game-detail.js: a stat, then each club) sized to its numbers, not 1,270 px across with the two
   columns 400 px apart (the owner, 2026-11-07: no stretched sparse tables). Inside a club's half card it still fills the half. */
.nba-detail-fit .nba-detail-table { width: auto; min-width: min(100%, 460px); }
.nba-detail-fit .nba-detail-table th:not(:first-child), .nba-detail-fit .nba-detail-table td { min-width: 5.5em; padding-left: 18px; }
.nba-shot-team .nba-detail-fit .nba-detail-table { width: 100%; }
/* A full-width card on a game page whose body is words and tables, not a chart (where the final score came from, rebounds and
   ball security, the clubs' lines, each club's players, every meeting): as tall as what it holds. Its saved row count left 80 to
   150 px of empty card under the last table (the owner, 2026-11-07: no empty-bottomed cards). Alone in its row, so nothing beside
   it changes; charts keep their rows. */
.game-board.board.cells > .widget[style*="span 12"]:not(.answer):not(:has(.w-body.chart)):not(:has(svg.chart, canvas)) { grid-row: span 1 !important; }

/* The game's advanced box (public/js/game-detail.js advancedBox): the scoring breakdown, both sides on one scale from zero. */
.nba-adv-bars { display:grid; gap:10px; margin:8px 0 12px; }
.nba-adv-row { display:grid; grid-template-columns:minmax(150px,1.1fr) minmax(0,2fr) minmax(0,2fr); gap:12px; align-items:center; }
.nba-adv-label { font-weight:600; font-size:14px; }
.nba-adv-bar { display:grid; grid-template-columns:42px minmax(0,1fr) 34px; gap:8px; align-items:center; font-variant-numeric:tabular-nums; font-size:14px; }
.nba-adv-team { color:var(--muted); font-size:12px; font-weight:700; }
.nba-adv-track { display:block; height:14px; background:var(--surface-2); border-radius:3px; overflow:hidden; }
.nba-adv-fill { display:block; height:100%; border-radius:3px; }
.nba-adv-bar.a .nba-adv-fill { background:#0d6680; } .nba-adv-bar.b .nba-adv-fill { background:#b8571f; }
.nba-adv-val { text-align:right; font-weight:700; }
@media (max-width:700px) { .nba-adv-row { grid-template-columns:minmax(0,1fr); gap:4px; } .nba-adv-label { font-size:13px; } }
:root[data-theme="dark"] .nba-adv-bar.a .nba-adv-fill { background:#3fa7c8; } :root[data-theme="dark"] .nba-adv-bar.b .nba-adv-fill { background:#e08a4f; }
/* The shot chart (public/js/shotchart.js): the court beside its zones, one above the other on a narrow widget or a phone. */
.w-body.shotchart { overflow:auto; container-type:inline-size; }
.sc-wrap { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(0,1fr); gap:16px; align-items:start; padding:4px 2px; }
@container (max-width:640px) { .sc-wrap { grid-template-columns:minmax(0,1fr); } }
@media (max-width:700px) { .sc-wrap { grid-template-columns:minmax(0,1fr); } }
.sc-svg { display:block; width:100%; height:auto; max-height:520px; }
.sc-court rect, .sc-court circle, .sc-court path, .sc-court line { stroke:var(--border-strong); stroke-width:2; }
.sc-made { fill:#1f8a4c; fill-opacity:.8; stroke:#1f8a4c; stroke-width:1; }
.sc-miss { fill:none; stroke:#c8322f; stroke-opacity:.75; stroke-width:1.4; }
:root[data-theme="dark"] .sc-made { fill:#43c27a; stroke:#43c27a; } :root[data-theme="dark"] .sc-miss { stroke:#f06a5f; }
.sc-legend { display:flex; flex-wrap:wrap; gap:14px; font-size:13px; margin-top:6px; align-items:center; }
.sc-key { display:inline-block; width:11px; height:11px; border-radius:50%; margin-right:6px; vertical-align:-1px; }
.sc-key.sc-made { background:#1f8a4c; } .sc-key.sc-miss { border:1.5px solid #c8322f; box-sizing:border-box; }
:root[data-theme="dark"] .sc-key.sc-made { background:#43c27a; } :root[data-theme="dark"] .sc-key.sc-miss { border-color:#f06a5f; }
.sc-side .nba-detail-table th, .sc-side .nba-detail-table td { padding:7px 8px; }
.w-body.nba-adv-body { container-type:inline-size; }
.nba-adv-top { display:grid; grid-template-columns:minmax(0,1.5fr) minmax(0,1fr); gap:24px; align-items:start; }
@container (max-width:900px) { .nba-adv-top { grid-template-columns:minmax(0,1fr); gap:8px; } }
.nba-adv-hustle .nba-detail-scroll { margin-top:0; }
.nba-adv-hustle .nba-detail-table th, .nba-adv-hustle .nba-detail-table td { padding:6px 10px; }
/* (Narrow: the bars, then the clubs' hustle table, then each player's box.) */
@container (max-width:900px) { .nba-adv-left { display:contents; } .nba-adv-bars { order:1; } .nba-adv-hustle { order:2; } .nba-adv-left > details { order:3; } }
.nba-adv-defs { margin:10px 0 4px; font-size:13px; }
.nba-adv-defs summary { cursor:pointer; font-weight:700; min-height:32px; display:list-item; }
.nba-adv-defs dl { display:grid; grid-template-columns:minmax(120px,max-content) minmax(0,1fr); gap:4px 14px; margin:6px 0 0; }
.nba-adv-defs dt { font-weight:600; } .nba-adv-defs dd { margin:0; color:var(--muted); }
@media (max-width:700px) { .nba-adv-defs dl { grid-template-columns:minmax(0,1fr); } .nba-adv-defs dd { margin-bottom:6px; } }
.adv-foot { margin-top:10px; }
/* The club's advanced tiles fill whole rows: five a row (ten stats, eight before hustle was kept), two on a phone. */
.adv-tiles .tiles { grid-template-columns:repeat(5, minmax(0,1fr)); }
.adv-tiles .tiles:has(> .tile:nth-child(8):last-child) { grid-template-columns:repeat(4, minmax(0,1fr)); }
@media (max-width:700px) { .adv-tiles .tiles, .adv-tiles .tiles:has(> .tile:nth-child(8):last-child) { grid-template-columns:repeat(2, minmax(0,1fr)); } }
.w-body.adv-tiles { overflow:visible; }
.w-body.shotchart-page { padding:0; }
/* (A phone: the zone names wrap and the cells tighten, so all five columns fit without a sideways scroll.) */
.sc-side .nba-detail-table th[scope="row"] { white-space:normal; }
@media (max-width:700px) { .sc-side .nba-detail-table { font-size:12.5px; } .sc-side .nba-detail-table th, .sc-side .nba-detail-table td { padding:6px 4px; } }

/* A narrow table and its note side by side, no blank half card (audit 2026-11-08). */
.nba-detail-pair { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0 28px; }
.nba-detail-pair > .nba-detail-scroll { flex: 0 1 auto; }
.nba-detail-pair > p { flex: 1 1 240px; max-width: 52ch; margin-top: 14px; }
/* (No hustle table for the game: the bars and the players take the whole width, no blank column. Audit 2026-11-08.) */
.nba-adv-top:has(> :only-child) { grid-template-columns: minmax(0, 1fr) !important; }
.nba-adv-top:has(> :only-child) .nba-adv-bars { max-width: 760px; }

/* Phones: a table's club, season and position under the name, the stat columns in view (audit 2026-11-08). */
.tbl .meta-under { display: none; }
@media (max-width: 600px) {
  .tbl th.meta-col, .tbl td.meta-col { display: none; }
  .tbl .meta-under { display: block; font-size: .72rem; color: var(--muted); font-weight: 400; }
}
/* A game page's words card (the preview's text, an answer) one row, as tall as its words, never stretched to a fixed span: ~196 px of
   empty card under the preview's last line (audit 2026-11-08). */
.board.cells.game-board > .widget.answer { grid-row: auto / span 1 !important; height: auto !important; }
.board.cells.game-board > .widget.answer .w-body { height: auto; overflow: visible; }

/* Signed out with nothing ranked: the stage as tall as its words (audit 2026-11-08). */
.rankings-quiet { min-height: 0 !important; height: auto !important; }

/* The live box's card buttons and the replay controls wrap on a phone: "REPLAY card (not live) — landscape (1920 × 1080)" kept on one
   line (.btn is nowrap) widened a 320 px page to 357 px once the replay drew its box (Codex audit 2026-11-08, /live-demo?i=12). */
.live-cards .btn, .live-demo .btn { white-space: normal; height: auto; min-height: 30px; max-width: 100%; text-align: left; overflow-wrap: anywhere; }
/* A box that scrolls, reached by the keyboard (charts.js scrollable, table.js): its ring shows (Codex audit 2026-11-08). */
.scroll-focus:focus { outline: none; }
.scroll-focus:focus-visible, .nba-detail-scroll:focus-visible, .schedule-table-wrap:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
/* Photo-credit links read as links, not grey text: underlined and in the link colour (Codex audit 2026-11-08: hard to tell apart). */
.photo-credit a, .gfx-credit a, .rankings-credits a, #photos-note a { text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
/* About's sources list (views/about.js sourcesList, lib/credits.js): links underlined like the photo credits; no extra space. */
.about-sources h3 { margin: 12px 0 4px; } .about-sources ul { margin: 0 0 6px; padding-left: 1.2em; } .about-sources li { margin: 2px 0; overflow-wrap: anywhere; } .about-sources a { text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
.photo-credit .muted a, .gfx-credit a { color: var(--link); }

/* Contracts (public/js/contracts.js): the deal's figures wrap to the width, no dead space; light and dark from the page's tokens. */
.contract-figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 8px; margin: 2px 0 0; }
.contract-fig { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); min-width: 0; }
.contract-fig b { display: block; font-size: 1.1rem; line-height: 1.25; overflow-wrap: anywhere; }
.contract-fig span { font-size: .75rem; color: var(--text-2); }
.contracts-foot { overflow-wrap: anywhere; }
@media (max-width: 600px) { .contract-figs { grid-template-columns: repeat(2, minmax(0, 1fr)); } .contract-fig:last-child:nth-child(odd) { grid-column: 1 / -1; } }

/* page-refinements.css */
/* Content pages only. Maker, rankings and Creator Tools layouts are deliberately outside this scope.
   Existing brand tokens, fonts, statistics and chart colours remain the source of truth. */
main.content-pages > .wrap:not(.home) { padding-top: 8px; padding-bottom: 32px; }
main.content-pages .page-head { padding: 24px 0 20px; margin-bottom: 24px; border-bottom-color: var(--border-strong); }
main.content-pages .page-head h1 { margin-bottom: 9px; line-height: 1.12; letter-spacing: -.012em; text-wrap: balance; }
main.content-pages .page-head > p { max-width: 78ch; line-height: 1.65; }
main.content-pages .crumbs { margin-bottom: 10px; font-size: .78rem; line-height: 1.5; }
main.content-pages .section { margin-top: 32px; }
main.content-pages .section-head { margin-bottom: 14px; padding-bottom: 8px; gap: 10px 18px; align-items: baseline; }
main.content-pages .section-head h2 { line-height: 1.25; }
main.content-pages .page-head .controls-row { gap: 10px 14px; margin-top: 16px; padding: 12px; border: 1px solid var(--border); background: var(--surface-2); }
main.content-pages .page-head .controls-row:empty { display: none; }
main.content-pages .controls-row .field { gap: 6px; min-width: 0; }
main.content-pages .controls-row :is(input:not([type=checkbox]):not([type=radio]),select) { min-height: 38px; max-width: 100%; }
main.content-pages :is(.tabs,.seg) { max-width: 100%; height: auto; }
main.content-pages .page-head :is(.tabs,.seg) { flex-wrap: wrap; }
main.content-pages :is(.tabs,.seg) button { min-height: 34px; line-height: 1.2; }
main.content-pages .tbl-tools { gap: 10px; padding: 12px 0; }
main.content-pages .tbl-tools :is(input:not([type=checkbox]):not([type=radio]),select,.btn) { min-height: 36px; }
main.content-pages .tbl-wrap { border-color: var(--border-strong); scrollbar-width: thin; }
main.content-pages .tbl-wrap table.stats th { padding-top: 10px; padding-bottom: 10px; line-height: 1.3; }
main.content-pages .tbl-wrap table.stats td { padding-top: 7px; padding-bottom: 7px; line-height: 1.45; }
main.content-pages .tbl-wrap table.stats tfoot td { padding-top: 9px; padding-bottom: 9px; }
main.content-pages :is(.notice,.data-note) { padding: 12px 14px; line-height: 1.6; margin-top: 12px; margin-bottom: 16px; }
main.content-pages .loading { padding: 22px 16px; border: 1px dashed var(--border); background: var(--surface-2); line-height: 1.6; }
main.content-pages :is(.box,.card,.fx-card) { padding: 16px; min-width: 0; }
main.content-pages :is(.box,.card,.fx-card) > :is(h2,h3):first-child { margin-bottom: 12px; }
main.content-pages :is(.box,.card,.fx-card) > p { line-height: 1.65; }
main.content-pages .kpi { padding: 14px 16px; }
main.content-pages .kpi .l { margin-bottom: 5px; line-height: 1.45; }
main.content-pages .kpi .v { line-height: 1.2; }
main.content-pages :is(.games-directory,.teams-directory) .page-head { margin-bottom: 26px; }
main.content-pages .games-directory .matchup-grid { gap: 14px; }
main.content-pages .games-directory .score { border-top: 3px solid var(--border-strong); padding-top: 14px; }
main.content-pages .games-directory .score .st { letter-spacing: .035em; }
main.content-pages .teams-directory .team-div h2 { margin-bottom: 10px; padding-bottom: 8px; }
main.content-pages .team-directory-card { gap: 16px; min-height: 90px; }
main.content-pages .team-directory-result { gap: 4px; }
main.content-pages .model-card { padding: 18px; }
main.content-pages .model-card .section-head { margin-bottom: 16px; }
main.content-pages .legal { padding-bottom: 40px; }
main.content-pages .legal-sec { max-width: 76ch; }
main.content-pages .legal-sec h2 { margin-top: 28px; margin-bottom: 10px; }
main.content-pages .legal-sec :is(p,li) { line-height: 1.75; }
main.content-pages .legal-sec li + li { margin-top: 6px; }
main.content-pages .account .acct-card { padding: 22px; gap: 14px; }
main.content-pages .account .acct-card p { line-height: 1.65; }
main.content-pages .account .acct-choices { gap: 10px; }
main.content-pages .home .hero-ad { gap: 32px; padding-bottom: 30px; }
main.content-pages .home .hero-note { max-width: 68ch; line-height: 1.7; }
main.content-pages .home .home-h-row { gap: 10px 16px; align-items: baseline; }
main.content-pages .home .home-more { gap: 14px; }
main.content-pages .home .home-more > a { padding: 16px; }
@media (hover:hover) and (pointer:fine) {
  main.content-pages .games-directory .score:hover,
  main.content-pages .team-directory-card:hover { background: var(--surface-2); }
}
@media (max-width:900px) {
  main.content-pages .page-head { padding-top: 20px; }
  main.content-pages .home .hero-ad { gap: 22px; }
}
@media (max-width:700px) {
  main.content-pages .page-head { padding-top: 18px; padding-bottom: 16px; margin-bottom: 20px; }
  main.content-pages .page-head h1 { font-size: clamp(1.6rem,7vw,2rem); }
  main.content-pages .page-head .controls-row { padding: 10px; gap: 12px; }
  main.content-pages .controls-row .field { flex: 1 1 130px; }
  main.content-pages :is(.controls-row,.tbl-tools,.account) :is(input:not([type=checkbox]):not([type=radio]),select,textarea) { font-size: 16px; }
  main.content-pages :is(.controls-row,.tbl-tools) :is(select,input:not([type=checkbox]):not([type=radio]),.btn) { min-height: 42px; }
  main.content-pages .page-head :is(.tabs,.seg) button { min-height: 40px; white-space: normal; }
  main.content-pages .tbl-tools { gap: 8px 10px; }
  main.content-pages .tbl-wrap table.stats td.l:nth-child(2) { max-width: 148px; white-space: normal; overflow-wrap: anywhere; text-overflow: clip; }
  main.content-pages :is(.box,.card,.fx-card,.model-card) { padding: 14px; }
  main.content-pages .account .acct-card { padding: 18px; }
  main.content-pages .section { margin-top: 26px; }
  main.content-pages .kpi { padding: 12px; }
  main.content-pages .home .hero-ad { padding-bottom: 24px; }
}
/* Keep the player page's output links visually separate from its season-type switch. */
@media (max-width:700px) {
  main.content-pages .page-head .controls-row:has(> .seg) > b { flex: 1 0 100%; margin-top: 2px; }
  main.content-pages .team-directory-result small { max-width: 140px; line-height: 1.45; }
}
/* Let wide reference tables scroll; never squeeze linked entity names into a letter-by-letter column. */
@media (max-width:700px) {
  main.content-pages .tbl-wrap table.stats :is(th,td).l:nth-child(2) { min-width:132px; max-width:164px; }
}

/* Pending homepage demo: reserve a small, honest loading state, not an empty chart wall. */
.home .demo-board:empty { height: 80px; grid-template-columns: minmax(0, 1fr); grid-template-rows: 1fr; place-items: center; }

/* Keep a usable copy and Ask column before switching the homepage to two columns. */
@media (max-width:1180px) {
  main.content-pages .home :is(.hero-ad,.gfx-ad) { grid-template-columns:minmax(0,1fr); align-items:start; }
}

@media (min-width:681px) {
  .home .home-ask { flex-wrap:nowrap; }
  .home .home-ask .ask-input { min-width:0; }
  .home .home-ask > :is(label,button) { flex-shrink:0; }
}

/* Lab Rankings signed out is a short page: no screen-tall main under its card (audit 2026-11-08: ~440 px of empty space between the
   card and the footer). Other pages keep main's 100vh, which holds the footer still while a page loads. */
main:has(> .rankings-page), main:has(> * > .rankings-page) { min-height: 0; }

/* The "not found" page (views/notfound.js; owner-specs/NOT-FOUND-PAGE-SPEC.md): what it was, Ask, a search, the main pages. */
main > .wrap.nf, main.content-pages > .wrap.nf, main#app > .wrap.nf { display:grid; grid-template-columns:minmax(0,1fr) 300px; gap:24px 40px; align-items:start; padding-top:32px; padding-bottom:40px; }
.nf-main { min-width:0; }
/* A short page: no screen-tall main under it (as Lab Rankings signed out above): at 1440 x 900 it left ~350 px of empty space over the footer. */
main:has(> .wrap.nf) { min-height:0; }
.nf-title { font:700 clamp(1.8rem,3.6vw,2.7rem)/1.04 var(--display); text-transform:uppercase; letter-spacing:-.01em; margin:0 0 8px; }
.nf-line { margin:0 0 14px; color:var(--text-2); font-size:1.02rem; max-width:44em; }
.nf-dym { margin:0 0 14px; padding:8px 12px; border-left:3px solid var(--brand); background:var(--surface-2); font-weight:500; }
.nf-dym a { font-weight:700; }
.nf .nf-ask { margin:4px 0 8px; flex-wrap:nowrap; }
.nf .nf-ask .ask-input { flex:1 1 auto; min-width:0; }
.nf .nf-ask > :is(label,button) { flex-shrink:0; }
.nf .try { margin:0 0 20px; }
.nf-find { display:grid; gap:8px; padding-top:16px; border-top:1px solid var(--border); }
.nf-find > label, .nf-h { font:700 .78rem/1 var(--display); text-transform:uppercase; letter-spacing:.08em; color:var(--muted); margin:0; }
.nf-find-input { width:100%; max-width:420px; padding:8px 10px; border:1px solid var(--border-strong); background:var(--surface); color:var(--text); font:inherit; }
.nf-find-input:focus-visible { outline:2px solid var(--focus); outline-offset:1px; }
.nf-found { list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(auto-fill,minmax(190px,1fr)); gap:6px; }
.nf-found:empty { display:none; }
.nf-found li.muted { grid-column:1/-1; font-size:.88rem; }
.nf-found a, .nf-links a { display:flex; flex-direction:column; gap:2px; text-decoration:none; color:var(--text); }
.nf-found a { padding:7px 10px; border:1px solid var(--border); background:var(--surface); }
.nf-found a:hover { border-color:var(--brand); background:var(--row-hover); }
.nf-found small, .nf-links small { color:var(--muted); font-size:.78rem; font-weight:400; }
.nf-side { border:2px solid var(--frame); background:var(--surface); padding:14px 14px 12px; }
.nf-h { margin-bottom:8px; }
.nf-links { list-style:none; margin:0; padding:0; display:grid; gap:2px; }
.nf-links a { padding:7px 8px; border-left:3px solid transparent; }
.nf-links a:hover, .nf-links a:focus-visible { background:var(--row-hover); border-left-color:var(--brand); }
.nf-labs { margin:10px 0 0; padding-top:10px; border-top:1px solid var(--border); font-size:.76rem; color:var(--muted); }
@media (max-width:820px) {
  main > .wrap.nf, main.content-pages > .wrap.nf, main#app > .wrap.nf { grid-template-columns:1fr; gap:18px; padding-top:18px; padding-bottom:24px; }
  .nf-links { grid-template-columns:1fr 1fr; }
}
@media (max-width:480px) {
  .nf .nf-ask { flex-wrap:wrap; }
  .nf .nf-ask .ask-input { flex-basis:calc(100% - 70px); }
  .nf .nf-ask > button { width:100%; }
}

/* tool-refinements.css */
/* Component-only polish. Data queries, canvas exports and ranking presentation geometry are unchanged. */
.creator-tools, .gfx, .rankings-page, .lab-rundown { --tool-line:var(--border,#d1d5db); --tool-soft:var(--surface-2,#f3f4f6); --tool-ink:var(--text,#111); --tool-accent:var(--brand,#38618c); }
.creator-tools .creator-heading { margin-bottom:22px; }
.creator-tools .creator-heading h1 { margin:6px 0 10px; letter-spacing:-.02em; }
.creator-tools .creator-heading p { max-width:72ch; line-height:1.55; }
.creator-tools .creator-tool-grid { gap:18px; }
.creator-tools .creator-tool-grid>a { padding:24px; border-radius:12px; min-height:190px; box-sizing:border-box; }
.creator-tools .creator-tool-grid p { margin:0 0 18px; }
.creator-tools .creator-tool-grid h2 { line-height:1.15; margin-bottom:12px; }
.creator-tools .creator-open { align-self:flex-start; padding:8px 0; }
.creator-tools .creator-tool-nav { gap:8px; padding:0 0 16px; margin-bottom:24px; }
.creator-tools .creator-tool-nav a { display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:8px 12px; border-radius:7px; text-decoration:none; font-size:14px; box-sizing:border-box; }
.creator-tools :is(.creator-board-rule-grid,.creator-research-controls,.ba-controls,.matchup-picker,.creator-blind-form) { border:1px solid var(--tool-line); background:var(--surface,#fff); border-radius:12px; padding:20px; gap:18px; }
.creator-tools .creator-board-rule-grid { margin:20px 0; }
.creator-tools .creator-board-picks { gap:16px; margin:20px 0; }
.creator-tools .creator-board-pick { border-radius:10px; padding:18px; gap:14px; }
.creator-tools :is(.creator-board-field,.creator-research-field,.ba-controls>label,.matchup-picker>label) { font-size:14px; line-height:1.4; gap:7px; }
.creator-tools :is(.creator-board-field>span,.creator-research-field>span,.ba-controls>label>span) { font-weight:650; color:var(--tool-ink); }
.creator-tools :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),textarea), .gfx .gfx-sec :is(input:not([type=checkbox]):not([type=radio]):not([type=range])), .rankings-page .rankings-editor :is(input:not([type=checkbox]):not([type=radio]):not([type=color])), .lab-rundown :is(input:not([type=checkbox]),textarea) { min-height:44px; padding:10px 11px; border:1px solid var(--tool-line); border-radius:6px; font-size:16px; line-height:1.3; color:var(--tool-ink); background:var(--surface,#fff); box-sizing:border-box; }
.creator-tools select, .creator-tools :is(.creator-board-field,.creator-research-field,.creator-board-pick,.matchup-picker,.ba-controls,.creator-blind-form) select, .gfx .gfx-sec select, .rankings-page .rankings-editor select { min-height:44px; padding:0 11px; border:1px solid var(--tool-line); border-radius:6px; font-size:16px; line-height:normal; color:var(--tool-ink); background:var(--surface,#fff); box-sizing:border-box; }
.creator-tools input[type=checkbox], .creator-tools input[type=radio], .gfx input[type=checkbox], .rankings-page input[type=checkbox], .lab-rundown input[type=checkbox] { width:18px; height:18px; flex:none; accent-color:var(--tool-accent); }
.creator-tools :is(button,.btn), .gfx :is(button,.btn), .rankings-page :is(button,.btn), .lab-rundown :is(button,.btn) { min-height:44px; font-size:14px; line-height:1.3; border-radius:6px; padding:10px 12px; white-space:normal; box-sizing:border-box; touch-action:manipulation; }
.creator-tools :is(button,.btn):disabled, .gfx :is(button,.btn):disabled, .rankings-page :is(button,.btn):disabled, .lab-rundown :is(button,.btn):disabled { opacity:.5; cursor:default; }
.creator-tools :is(a,button,input,select,textarea):focus-visible, .gfx :is(a,button,input,select):focus-visible, .rankings-page :is(a,button,input,select):focus-visible, .lab-rundown :is(button,input,textarea):focus-visible { outline:2px solid var(--tool-ink); outline-offset:3px; }
.creator-tools :is(.creator-board-actions,.ba-actions,.matchup-actions) { gap:10px; margin:20px 0; align-items:center; }
.creator-tools :is(.creator-research-controls,.ba-controls)>button[type=submit] { grid-column:1/-1; justify-self:start; min-width:180px; margin-top:4px; }
.creator-tools :is(.creator-board-status,.matchup-status):not(:empty) { line-height:1.55; padding:12px 14px; border-radius:7px; background:var(--tool-soft); margin:16px 0; }
.creator-tools :is(.creator-board-receipt,.ba-definition) { border-radius:7px; line-height:1.55; }
.creator-tools .creator-board-receipt:not(:empty) { padding:18px; }
.creator-tools .creator-board-receipt li { padding:4px 0; font-variant-numeric:tabular-nums; }
.creator-tools .creator-board-saves { display:flex; padding:20px; margin-top:24px; gap:12px; border:1px solid var(--tool-line); border-radius:10px; background:var(--surface,#fff); align-items:center; }
.creator-tools .creator-board-saves>h3 { font-size:18px; margin:0; }
.creator-tools .creator-board-saves>p { line-height:1.55; margin:0 0 2px; }
.creator-tools :is(.creator-episode-list,.creator-output-list) { flex-basis:100%; padding-left:24px; margin:4px 0; }
.creator-tools :is(.creator-episode-list,.creator-output-list)>li { border:1px solid var(--tool-line); border-radius:8px; background:var(--tool-soft); padding:14px; margin:10px 0; line-height:1.5; }
.creator-tools .creator-episode-list { list-style:none; padding-left:0; }
.creator-tools .creator-output-list>li { display:list-item; }
.creator-tools .creator-output-list>li>strong { display:block; margin-bottom:8px; }
.creator-tools .creator-output-list>li>label { display:inline-flex; align-items:center; gap:7px; min-height:44px; margin-right:14px; }
.creator-tools .creator-player-options { top:48px; border-radius:8px; border-color:var(--tool-line); box-shadow:0 8px 24px #0002; }
.creator-tools .creator-player-options button { border-radius:0; min-height:48px; padding:12px; text-align:left; }
.creator-tools .creator-player-picker>span[role=status] { display:block; font-size:12px; line-height:1.4; margin-top:5px; min-height:17px; }
.creator-tools .creator-research { border:0; padding:0; margin:0; }
.creator-tools .creator-research>p:first-of-type { max-width:80ch; line-height:1.55; margin-bottom:20px; }
.creator-tools .creator-research>p[role=alert]:not(:empty) { padding:14px; border:1px solid var(--tool-line); border-left:3px solid var(--tool-accent); border-radius:7px; background:var(--tool-soft); }
.creator-tools .creator-research output { min-height:44px; display:flex; align-items:center; font-size:15px; }
.creator-tools .creator-research table { font-size:14px; font-variant-numeric:tabular-nums; }
.creator-tools :is(.creator-research-table,.ba-table,.matchup-matrix-scroll) { border:1px solid var(--tool-line); border-radius:9px; overflow:auto; margin:18px 0; overscroll-behavior-x:contain; }
.creator-tools :is(.creator-research-table,.ba-table,.matchup-matrix-scroll) th { background:var(--tool-soft); color:var(--tool-ink); line-height:1.4; }
.creator-tools :is(.creator-research-table,.ba-table,.matchup-matrix-scroll) :is(th,td) { padding:13px 12px; }
.creator-tools .matchup-matrix-table { min-width:660px; font-size:14px; }
.creator-tools .matchup-matrix-table :is(td strong,td .matchup-matrix-delta) { font-variant-numeric:tabular-nums; }
.creator-tools .matchup-matrix-table td strong { font-size:18px; }
.creator-tools .matchup-matrix-table td span { font-size:13px; line-height:1.4; }
.creator-tools .matchup-matrix-table th:first-child { position:sticky; left:0; z-index:1; background:var(--surface,#fff); box-shadow:1px 0 var(--tool-line); }
.creator-tools .ba-table table { min-width:530px; font-size:15px; font-variant-numeric:tabular-nums; }
.creator-tools .ba-table tbody th { width:36%; background:var(--surface,#fff); }
.creator-tools .ba-samples { margin:18px 0; gap:14px; }
.creator-tools .ba-samples article { border-radius:10px; padding:16px; border-top:3px solid var(--tool-accent); }
.creator-tools .ba-samples article strong { font-size:17px; }
.creator-tools .ba-samples article p { line-height:1.45; }
.creator-tools .ba-sample-dates { display:flex; flex-wrap:wrap; align-items:baseline; gap:3px 6px; font-size:13px; color:var(--muted,#555); }
.creator-tools .ba-sample-dates time { white-space:nowrap; font-variant-numeric:tabular-nums; }
.creator-tools details { margin:16px 0; border-top:1px solid var(--tool-line); padding-top:14px; }
.creator-tools details>summary { cursor:pointer; min-height:36px; font-size:14px; font-weight:650; line-height:1.5; }
.creator-tools .matchup-picker .matchup-matrix-toggle { min-height:44px; gap:10px; }
.creator-tools .matchup-matrix-options { border-radius:8px; gap:8px 14px; padding:14px; }
.creator-tools .matchup-matrix-options legend { padding:0 7px; font-size:14px; font-weight:650; }
.creator-tools .matchup-picker .matchup-matrix-options label { min-height:44px; padding:5px 7px; border-radius:6px; background:var(--tool-soft); font-size:14px; }
.creator-tools .matchup-metric, .creator-tools .matchup-panel { border-radius:10px; padding:18px; }
.creator-tools .matchup-metric h3 { font-size:15px; line-height:1.4; }
.creator-tools .matchup-game-list a { min-height:44px; align-items:center; border-bottom:1px solid var(--tool-line); padding:6px 0; }
.creator-tools .matchup-game-list li:last-child a { border:0; }
.creator-tools .matchup-game-list time { white-space:nowrap; }
/* Maker editor controls only; the canvas retains its native size, crop and export drawing. */
.gfx .gfx-panel { gap:18px; }
.gfx .gfx-sec { border-radius:9px; padding:18px 20px; gap:14px; }
.gfx .gfx-sec h3 { font-size:16px; letter-spacing:.025em; }
.gfx .gfx-sec .field { font-size:14px; line-height:1.4; gap:6px; }
.gfx .gfx-layouts { gap:10px; }
.gfx .gfx-layouts button { border-radius:7px; min-height:100px; gap:5px; padding:12px; }
.gfx .gfx-layouts button span { font-size:13px; line-height:1.35; }
.gfx .gfx-layouts button[aria-pressed=true], .gfx .gfx-anims button[aria-pressed=true] { border-color:var(--tool-ink); box-shadow:inset 0 -3px var(--tool-accent); color:var(--tool-ink); background:var(--surface,#fff); }
.gfx .gfx-subj { gap:10px; padding:10px 0 10px 10px; }
.gfx .gfx-subj-tools { gap:4px; flex-shrink:0; }
.gfx .gfx-subj-tools .btn.small { min-width:40px; min-height:44px; padding:8px; }
.gfx .gfx-stats { gap:8px; }
.gfx .gfx-stats li { padding:8px 10px; border-radius:6px; align-items:center; }
.gfx .gfx-stats li>span:first-of-type { white-space:normal; overflow:visible; overflow-wrap:anywhere; line-height:1.35; }
.gfx .gfx-stats li>span:first-of-type>.muted { display:block; font-size:12px; }
.gfx .gfx-sec .seg { flex-wrap:wrap; gap:3px; }
.gfx .gfx-row { gap:12px; }
.gfx .gfx-check { min-height:44px; gap:8px; line-height:1.45; }
.gfx .gfx-actions { gap:10px; padding:4px 0; }
.gfx .gfx-motion { border-radius:9px; padding:16px 18px; gap:14px; }
.gfx .gfx-frame { border-radius:9px; }
.gfx .gfx-ac { border-radius:8px; }
.gfx .gfx-ac li { min-height:44px; display:flex; align-items:center; padding:10px; box-sizing:border-box; }
.gfx .gfx-try-card, .gfx .gfx-thumb { border-radius:7px; }
/* Rankings: edit controls are restyled; presentation rows and player images are deliberately untouched. */
.rankings-page>.controls-row { display:flex; flex-wrap:wrap; gap:9px; margin:18px 0; }
.rankings-page .rankings-editor { border-radius:10px; padding:22px; margin:22px 0; }
.rankings-page .rankings-editor>h2 { margin:0 0 18px; font-size:23px; }
.rankings-page .rankings-editor>.field { display:grid; gap:7px; margin:14px 0; font-size:14px; font-weight:600; }
.rankings-page .rankings-style-controls { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:14px; border:1px solid var(--tool-line); border-radius:9px; padding:18px; margin:22px 0; }
.rankings-page .rankings-style-controls legend { font-weight:650; padding:0 7px; }
.rankings-page .rankings-palette-field { display:grid; grid-template-columns:1fr 44px 100px; gap:8px; align-items:center; font-size:14px; }
.rankings-page input[type=color] { width:44px; height:44px; min-height:44px; padding:3px; border:1px solid var(--tool-line); border-radius:6px; background:var(--surface,#fff); }
.rankings-page .rankings-row-editor { display:grid; grid-template-columns:minmax(160px,1fr) auto minmax(90px,120px) auto; align-items:center; gap:10px; padding:12px; margin:12px 0; border:1px solid var(--tool-line); border-radius:8px; background:var(--tool-soft); }
.rankings-page .rankings-color-control { min-height:44px; display:flex; gap:8px; align-items:center; }
.rankings-page .rankings-results { display:flex; flex-wrap:wrap; gap:8px; margin:14px 0; }
.rankings-page .rankings-results button { margin:0; }
/* Rundown dialog; audience styles and exported images remain unchanged. */
.lab-rundown.lab-rundown { width:min(1000px,calc(100% - 24px)); border-radius:12px; padding:22px; overscroll-behavior:contain; box-shadow:0 18px 70px #0005; }
.lab-rundown .rundown-heading { position:sticky; top:0; z-index:2; padding:12px 0; margin-top:-10px; background:var(--surface,#fff); border-bottom:1px solid var(--tool-line); }
.lab-rundown .rundown-heading h2 { font-size:23px; line-height:1.25; }
.lab-rundown .rundown-privacy { background:var(--tool-soft); border-left:3px solid var(--tool-accent); border-radius:6px; padding:12px; font-size:14px; line-height:1.55; }
.lab-rundown .rundown-toolbar { gap:10px; padding:14px 0; margin:16px 0; }
.lab-rundown .rundown-position { min-width:54px; padding:9px; text-align:center; border:1px solid var(--tool-line); border-radius:7px; font-variant-numeric:tabular-nums; }
.lab-rundown .rundown-notes-export { min-height:44px; align-items:center; gap:10px; font-size:14px; line-height:1.5; }
.lab-rundown .rundown-item { border-radius:9px; padding:18px; gap:18px; }
.lab-rundown .rundown-item label { font-size:14px; font-weight:600; }
.lab-rundown .rundown-item textarea { font-weight:400; min-height:110px; line-height:1.5; }
.lab-rundown .rundown-row-actions { gap:8px; }
@media(hover:hover) and (pointer:fine) {
 .creator-tools :is(.creator-tool-nav a,.creator-player-options button,.matchup-matrix-options label):hover, .gfx :is(.gfx-layouts button,.gfx-ac li):hover { color:var(--tool-ink); background:var(--tool-soft); }
}
@media(max-width:850px) {
 .creator-tools .creator-tool-grid>a { min-height:176px; }
}
@media(max-width:600px) {
 .creator-tools :is(.creator-board-rule-grid,.creator-research-controls,.ba-controls,.matchup-picker,.creator-blind-form) { padding:15px; gap:16px; }
 .creator-tools .creator-board-rule-grid, .creator-tools .creator-research-controls { grid-template-columns:1fr; }
 .creator-tools .creator-board-saves { padding:16px; }
 .creator-tools .creator-board-saves>input, .creator-tools .creator-board-saves>select { flex:1 1 100%; width:100%; }
 .creator-tools :is(.creator-board-actions,.ba-actions) .btn { flex:1 1 100%; width:100%; }
 .creator-tools :is(.creator-research-controls,.ba-controls)>button[type=submit] { width:100%; }
 .creator-tools .creator-tool-grid>a { padding:20px; }
 .creator-tools .ba-samples { gap:10px; }
 .creator-tools .ba-samples article { padding:13px; }
 .creator-tools .matchup-matrix-options { grid-template-columns:1fr; }
 .creator-tools .matchup-picker>label { flex-basis:100%; }
 .rankings-page .rankings-editor { padding:16px; }
 .rankings-page .rankings-row-editor { grid-template-columns:1fr auto; }
 .rankings-page .rankings-row-editor>input:first-child { grid-column:1/-1; width:100%; }
 .rankings-page .rankings-row-editor>input[type=text] { width:100%; max-width:none; }
 .rankings-page .rankings-row-editor>button { grid-column:1/-1; }
 .rankings-page .rankings-style-controls { grid-template-columns:1fr; padding:14px; }
 .rankings-page .rankings-palette-field { grid-template-columns:minmax(0,1fr) 44px 96px; }
 .lab-rundown.lab-rundown { padding:15px; max-height:calc(100dvh - 20px); }
 .lab-rundown .rundown-heading { top:0; }
 .lab-rundown .rundown-item { padding:14px; }
 .gfx .gfx-sec { padding:13px; }
 .gfx .gfx-layouts button { min-height:104px; }
}

/* Keep dynamically loaded rundown controls comfortably tappable. */
.lab-rundown .rundown-toolbar > .btn, .lab-rundown .rundown-row-actions > .btn { min-height: 44px; }

/* Keep the graphics prompt compact without removing any suggestions or actions. */
.gfx-ask { padding:12px; gap:8px; border-radius:10px; box-sizing:border-box; min-width:0; }
.gfx-ask .ask-input { min-height:44px; font-size:16px; min-width:0; }
.gfx-ask :is(button,.btn) { min-height:44px; box-sizing:border-box; }
.gfx-ask .gfx-toolbar { display:flex; flex-wrap:wrap; gap:8px; }
@media(max-width:600px) {
 .gfx-ask .ask-ideas { flex-wrap:wrap; max-width:100%; min-width:0; padding:2px 0 5px; gap:8px; }
 .gfx-ask .ask-ideas > * { flex:0 1 auto; max-width:100%; }
 .gfx-ask .ask-ideas .chip { white-space:normal; margin:0; padding:8px 12px; }
 .gfx-ask .gfx-toolbar { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); width:100%; gap:8px; }
 .gfx-ask .gfx-toolbar > .btn { width:100%; justify-content:center; text-align:center; margin:0; }
}

@media(max-width:600px) {
 .gfx-ask .gfx-toolbar > .account-presets { min-width:0; margin:0; }
 .gfx-ask .gfx-toolbar > .account-presets > summary { width:100%; min-height:44px; box-sizing:border-box; text-align:center; }
 .gfx-ask .gfx-toolbar > .rundown-controls { grid-column:1/-1; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; width:100%; margin:0; }
 .gfx-ask .gfx-toolbar .rundown-controls .btn { width:100%; min-height:44px; margin:0; justify-content:center; text-align:center; }
 .gfx-ask .gfx-toolbar .rundown-status:empty { display:none; }
 .gfx-ask .gfx-toolbar .rundown-status:not(:empty) { grid-column:1/-1; }
}
.ask-bar.gfx-ask > button.btn, .ask-bar.gfx-ask .ask-ideas > button.chip { min-height:44px; }
@media(max-width:600px) {
 .gfx-ask .gfx-ideas { flex-wrap:wrap; max-width:100%; min-width:0; gap:8px; padding:2px 0 5px; }
 .gfx-ask .gfx-ideas > * { flex:0 1 auto; max-width:100%; }
 .gfx-ask .gfx-ideas .chip { white-space:normal; min-height:44px; margin:0; padding:8px 12px; }
}

/* Extra actions in one field must not lower every sibling control in the row. */
.creator-tools :is(.creator-board-rule-grid,.creator-research-controls) { align-items:start; }
.creator-tools :is(.creator-board-field,.creator-research-field) { align-content:start; }

.creator-tools :is(.creator-board-rule-grid,.creator-research-controls) > :is(.creator-board-field,.creator-research-field) > span { min-height:2.8em; }
.creator-tools .creator-field-help { display:block; margin-top:6px; font-size:13px; line-height:1.4; color:var(--muted); }

/* Palette controls must fit within their card, including during tablet rotation. */
.rankings-page .rankings-style-controls { grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr)); }
.rankings-page .rankings-palette-field { min-width:0; grid-template-columns:minmax(0,1fr) 44px 100px; }
.rankings-page .rankings-palette-field > span { min-width:0; overflow-wrap:anywhere; }

/* Graphics maker on a wide screen (the owner, 2026-10-31, a 2560-pixel monitor: a narrow middle with empty sides, the
   left panel's dropdowns cut off, "Regular season / Playoffs / Both" wrapping, the card small). The page now uses the room,
   the settings column is wide enough for every label, and from 2200 px the settings run in two columns so nothing scrolls
   inside itself. */
.gfx:not(.locked) { max-width:min(2400px,100%); }
.gfx-ask { max-width:min(2400px,100%) !important; margin-left:auto !important; margin-right:auto !important; box-sizing:border-box; }
@media (min-width:901px) {
  .gfx:not(.locked):not(.section) { grid-template-columns:minmax(360px,420px) minmax(0,1fr); gap:28px; padding:20px 24px; }
}
@media (min-width:1700px) {
  .gfx:not(.locked):not(.section):not(.gfx-nostats) { grid-template-columns:minmax(360px,420px) minmax(0,1fr) minmax(320px,380px); }
}
@media (min-width:2200px) {
  .gfx:not(.locked):not(.section):not(.gfx-nostats) { grid-template-columns:minmax(0,800px) minmax(0,1fr) 380px; }
  .gfx:not(.locked):not(.section) > .gfx-panel { display:block; column-count:2; column-gap:18px; }
  .gfx:not(.locked):not(.section) > .gfx-panel > * { break-inside:avoid; margin:0 0 18px; }
  .gfx:not(.locked):not(.section) > .gfx-panel > .gfx-head { column-span:all; }
}
/* Long labels get the full width of the panel: opponents, games, size and theme stack instead of cutting. */
.gfx .gfx-row.gfx-row-wide { flex-direction:column; flex-wrap:nowrap; }
.gfx .gfx-row.gfx-row-wide > .field { flex:0 0 auto; width:100%; }
.gfx .gfx-sec select { text-overflow:clip; }
/* A choice of two or three ("Regular season / Playoffs / Both") stays one row that fills the width. */
.gfx .gfx-sec > .seg { display:flex; flex-wrap:wrap; width:100%; max-width:100%; }
.gfx .gfx-sec > .seg > button { flex:1 1 auto; }
.gfx .gfx-sec > .seg > button { white-space:nowrap; }
/* The row of Player / Club and the move and clear buttons stays inside its box: it wraps instead of pushing the X out. */
.gfx .gfx-subj-top { flex-wrap:wrap; min-width:0; }
.gfx .gfx-subj-top .gfx-subj-tools { margin-left:auto; }
.gfx .gfx-subj { min-width:0; }

/* Legibility floor (the owner, 2026-10-31: nothing hard to read on any page): real text is never under 12 pixels. */
.rankings-show-stage .rankings-credits,
.icon-btn,
label.field,
.kpi .l,
.pop .menu h4,
.badge,
.meter-label,
.score .st,
.widget .wtitle span,
.widget .wbody > .swings,
.widget .wnote,
.results a,
.site-family .family-head,
.site-family a small,
.nav a,
.inline-field,
.step-head,
.step,
.g-desc,
.g-count,
.form-title .step-head .step,
.tip-sheet .tt-note,
.chip,
.demo-chrome,
.demo-mark,
.gfx-layouts button span,
.gfx-motion-opts .field,
.gfx-thumb > span .muted,
.acct-pin-tag,
.acct-pro,
.beta-pill,
.team-div-cols,
.tone-key,
.field,
.ask-log .read,
.board.cells .board-empty .chip, .dash-page .ask-bar .chip,
.chip.filter-chip.ro, .dash-page .chip.filter-chip.ro,
.tile .k,
.tile .r,
.sql-params code,
.site-footer .notice-src,
.tile .q,
.tile .p,
.post-tag,
.gfx-ask .gfx-ideas .chip,
.ask-log .it.near .near-wrong,
.w-sample,
.wsample .wthin,
.add-head,
.fantasy .fx-lab,
.fantasy .fx-punt legend,
.games-directory .score .st,
.matchup-team small,
.matchup-code,
.team-directory-code,
.team-directory-result small,
.site-header .nav>a,.site-header .graphics-nav>a,
.site-header .icon-btn { font-size:.75rem; }
/* Choices that scrolled sideways out of sight now wrap instead, so every word shows. */
.stat-tabs { flex-wrap:wrap !important; overflow:visible !important; }
.stat-tabs > button { flex:1 1 auto !important; }
.gfx-ask .ask-ideas, .gfx-ask .gfx-ideas { flex-wrap:wrap; overflow:visible; padding-right:0; }
@media (min-width:601px) and (max-width:960px) { .site-header .search input { width:200px; } }
/* Two choices side by side only while both labels fit; otherwise each takes a line (a long club name was cut at 390). */
main.content-pages .controls-row > label.field, .controls-row > label.field { flex:1 1 min(100%,190px); }
/* The beta bar: its words centre as one block on every width (wrapped lines too), the close button sits at the edge and
   takes no room, so the row is centred on the page and not on the space the button leaves. */
.tip-strip .wrap { position:relative; justify-content:center; text-align:center; padding-left:44px; padding-right:44px; box-sizing:border-box; }
.tip-strip .wrap > span { text-align:center; }
.tip-strip-close { position:absolute; right:12px; top:50%; transform:translateY(-50%); }
/* The home demos: the links under the frame sit in the flow, clear of its offset shadow, so "Open this dashboard", "Pause
   demo" and the photo credit never touch the frame's line or each other (dark mode showed them fading into it). */
.demo-wrap { padding-bottom:0; }
.demo-wrap > :is(.demo,.gdemo) { margin:0 8px 12px 0; }
.demo-foot { position:static; margin-top:4px; gap:6px 14px; flex-wrap:wrap; }
.demo-wrap > a.small { display:block; margin-top:10px; line-height:1.5; }
/* The rest of the small print: 12 pixels, and the browser's own "small" never goes under that. */
small { font-size:max(12px,.83em); }
.chart-note, .more-cue, .chart-box .more-cue { font-size:.75rem; }
/* Orange note text on the dark page was 3.7:1; the same lighter orange the fantasy week uses. */
:root[data-theme="dark"] :is(.wsample .wthin, em.wthin, .ask-msg .ask-note) { color:#ffb070; }
/* Boxes, fields and choices on the tool pages have an outline you can see in light mode (it was 1.3:1 against white). */
.gfx .gfx-sec :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),select),
.creator-tools :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea),
.rankings-page :is(input:not([type=checkbox]):not([type=radio]):not([type=color]),select),
.lab-rundown :is(input:not([type=checkbox]),textarea) { border-color:var(--border-strong); }
.gfx :is(.gfx-layouts button,.gfx-try-card,.gfx-thumb,.gfx-anims button) { border-color:var(--border-strong); }

/* ---------- Creator tools in the graphics maker's look (the owner, 2026-11-06: "tidy up the creator tools ... so they look
   like the graphics maker"). Same panels, labels, headings, buttons and spacing as the maker; the rank card puts its
   preview beside its settings. Layout and styling only: every control, query and exported image is unchanged. ---------- */
.creator-tools.creator-tools { max-width:min(1240px,100%); padding:20px 24px 48px; box-sizing:border-box; }
.creator-tools.creator-tools:has(.creator-rank-card) { max-width:min(1500px,100%); }
.creator-tools :is(.creator-board-tools,.creator-matchup) { max-width:none; margin:0; padding-left:0; padding-right:0; }
.creator-tools .creator-heading { margin-bottom:18px; }
.creator-tools .creator-heading h1 { font-family:var(--display); font-size:clamp(1.6rem,2.4vw,2.1rem); line-height:1.1; margin:4px 0 8px; }
.creator-tools .creator-heading p { margin:0; color:var(--text-2); }
.creator-tools .creator-heading .creator-eyebrow { font-family:var(--display); letter-spacing:.06em; color:var(--muted); }
/* The tool switcher: one wrapping row of chips like the maker's choices (it scrolled sideways on a phone). */
.creator-tools .creator-tool-nav { display:flex; flex-wrap:wrap; gap:8px; overflow:visible; padding:0 0 18px; margin:0 0 24px; border-bottom:1px solid var(--border); }
.creator-tools .creator-tool-nav a { flex:0 1 auto; white-space:normal; min-height:40px; padding:8px 14px; border:1px solid var(--border-strong); border-radius:7px; background:var(--surface-2); color:var(--text); font-weight:600; font-size:14px; text-decoration:none; }
.creator-tools .creator-tool-nav a:first-child { background:var(--surface); box-shadow:inset 0 -3px var(--tool-accent); }
/* The tool list: cards like the maker's "Start from" cards. */
.creator-tools .creator-tool-grid>a { border:1px solid var(--border-strong); border-radius:9px; background:var(--surface); box-shadow:none; }
.creator-tools .creator-tool-grid>a:is(:hover,:focus-visible) { background:var(--surface); border-color:var(--frame); box-shadow:inset 0 -3px var(--tool-accent); outline:0; }
.creator-tools .creator-tool-grid h2 { font-family:var(--display); text-transform:uppercase; letter-spacing:.025em; font-size:20px; }
.creator-tools .creator-open { color:var(--tool-accent); }
/* Panels: the maker's settings boxes. */
.creator-tools :is(.creator-board-rule-grid,.creator-research-controls,.ba-controls,.matchup-picker,.creator-blind-form,.rc-controls,.rank-card-controls,.creator-board-pick,.creator-board-saves,.matchup-metric,.matchup-panel) { border:1px solid var(--border); background:var(--surface); border-radius:9px; padding:18px 20px; box-sizing:border-box; }
.creator-tools :is(.creator-board-rule-grid,.creator-research-controls,.ba-controls,.rc-controls) { gap:18px; }
.creator-tools :is(.rc-teams,.rank-card-box,.matchup-matrix-options) { border:1px solid var(--border); border-radius:8px; padding:14px 16px; background:var(--surface-2); }
/* Headings and field names: the maker's upper-case display type. */
.creator-tools .creator-tool-body :is(h2,h3), .creator-tools :is(.rc-teams,.rank-card-box,.matchup-matrix-options)>legend, .creator-tools .rc-stat-pick>summary { font-family:var(--display); text-transform:uppercase; letter-spacing:.025em; font-size:16px; line-height:1.3; color:var(--text); }
.creator-tools .creator-tool-body h2 { font-size:18px; }
.creator-tools :is(.creator-board-field,.creator-research-field,.ba-controls>label,.rc-controls>label,.rc-teams>label,.rank-card-row>label,.rank-card-team)>span:first-child { font-family:var(--display); text-transform:uppercase; letter-spacing:.03em; font-size:13px; font-weight:600; color:var(--text-2); }
.creator-tools :is(.rc-controls,.rc-teams)>label, .creator-tools .rank-card-row>label { gap:7px; font-size:14px; }
.creator-tools .rc-stat-pick>summary { min-height:40px; display:flex; align-items:center; gap:6px; }
.creator-tools .rc-stat-pick>summary .rc-count, .creator-tools .rank-card-count { font-family:var(--font); text-transform:none; letter-spacing:0; font-size:13px; }
/* Ticks in a list: a little more room per row. */
.creator-tools .rc-stats { grid-template-columns:repeat(auto-fill,minmax(min(100%,190px),1fr)); gap:6px 14px; }
.creator-tools .rc-controls label.rc-stat { min-height:40px; font-size:14px; line-height:1.3; }
.creator-tools .rank-card-stats { max-height:none; overflow:visible; gap:6px 14px; grid-template-columns:repeat(auto-fill,minmax(min(100%,180px),1fr)); }
.creator-tools .rank-card-stats label { min-height:40px; font-size:14px; }
/* Buttons and the rows they sit in. */
.creator-tools :is(.rc-actions,.rank-card-actions,.rc-stat-actions,.creator-board-actions,.ba-actions,.matchup-actions) { display:flex; flex-wrap:wrap; gap:10px; }
.creator-tools .creator-tool-body > section > p:first-child, .creator-tools .rank-card-intro { max-width:80ch; line-height:1.55; color:var(--text-2); margin:0 0 18px; }
.creator-tools .ba-definition { margin:14px 0; }
/* The card preview: the maker's striped frame. */
.creator-tools :is(.rc-preview,.rank-card-preview) { display:flex; justify-content:center; width:auto; max-width:100%; overflow:visible; margin:0 0 14px; padding:14px; border:1px solid var(--border); border-radius:9px; background:repeating-linear-gradient(45deg, var(--surface-2) 0 10px, var(--surface) 10px 20px); box-sizing:border-box; }
.creator-tools :is(.rc-canvas,.rank-card-canvas) { max-width:100%; height:auto; box-shadow:0 10px 34px rgba(0,0,0,.28); border-radius:6px; }
.creator-tools .creator-rank-card > * { min-width:0; }
/* Rank card side by side: the settings on the left, the card and its buttons on the right (as in the maker). */
@media (min-width:1000px) {
  .creator-tools .creator-rank-card { display:grid; grid-template-columns:minmax(380px,480px) minmax(0,1fr); grid-template-rows:auto auto auto auto 1fr; column-gap:28px; align-items:start; }
  .creator-tools .creator-rank-card > :is(p:first-child,.rank-card-intro) { grid-column:1 / -1; }
  .creator-tools .creator-rank-card > :is(.rc-controls,.rank-card-controls) { grid-column:1; grid-row:2 / span 4; margin:0; }
  .creator-tools .creator-rank-card > :is(.rc-preview,.rank-card-preview) { grid-column:2; grid-row:2; margin-top:0; }
  .creator-tools .creator-rank-card > :is(.rc-actions,.rank-card-actions) { grid-column:2; grid-row:3; margin:0 0 10px; }
  .creator-tools .creator-rank-card > :is(.rc-status,.rank-card-status) { grid-column:2; grid-row:4; margin:0; }
  .creator-tools .rc-teams { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .creator-tools .rank-card-teams { grid-template-columns:minmax(0,1fr); }
  .creator-tools .rank-card-row { flex-direction:column; align-items:stretch; }
  .creator-tools .rank-card-row > label, .creator-tools .rank-card-row .rank-card-title { flex:0 0 auto; min-width:0; }
}
@media (max-width:600px) {
  .creator-tools.creator-tools { padding:16px 16px 40px; }
  .creator-tools :is(.creator-board-rule-grid,.creator-research-controls,.ba-controls,.matchup-picker,.creator-blind-form,.rc-controls,.rank-card-controls,.creator-board-pick,.creator-board-saves,.matchup-metric,.matchup-panel) { padding:14px; }
  .creator-tools .creator-tool-nav a { font-size:13px; padding:8px 11px; }
  .creator-tools :is(.rc-preview,.rank-card-preview) { padding:8px; }
  /* Tables fit the phone instead of scrolling sideways. */
  .creator-tools :is(.matchup-matrix-table,.ba-table table) { min-width:0; }
}
/* The graphics maker's Ask answers grow with the page instead of scrolling in a 150-pixel box (2026-11-06). */
.gfx-ask :is(.ask-log,.ask-thread), .gfx-ask .ask-log:has(.it.near:last-child) { max-height:none; overflow:visible; }

/* The graphics maker before any stats are picked (the owner, 2026-11-07, on dead space): the long settings column beside a short
   card left a 1,400 to 1,700 px empty column under the card. With nothing under it in its column, the card keeps beside the
   settings as they scroll; the page still scrolls as one (nothing scrolls inside itself). With stats picked the card stays put,
   so it never slides over them. */
@media (min-width: 901px) {
  .gfx.gfx-nostats:not(.locked):not(.section) > .gfx-stage { position: sticky; top: calc(var(--header-h, 0px) + 12px); align-self: start; }
}

/* A table of a few short columns only as wide as its contents (the owner, 2026-11-07: no stretched sparse tables; trend watch's
   career milestones ran four columns across 1,290 px). */
.tbl-wrap > table.tbl-fit { width: auto; min-width: min(100%, 520px); }
.tbl-wrap > table.tbl-fit td, .tbl-wrap > table.tbl-fit th { padding-left: 14px; padding-right: 14px; }
.tbl-wrap:has(> table.tbl-fit) { width: fit-content; max-width: 100%; }
/* The filter bar (filter-bar.css) on the Stats page and in a chart's settings (the owner, 2026-11-14, "no walls of checkboxes"). */
.stats-bar .fbar { margin: 10px 0 0; }
.tile-bar .fbar { margin: 4px 0 0; font-size: .9rem; font-weight: 400; color: var(--text); text-transform: none; letter-spacing: normal; }
/* In a chart's settings window the picker opens in place under its chips (the window scrolls, not the page); a phone keeps the sheet. */
@media (min-width: 601px) { .tile-bar .fbar-pop { position: static; width: auto; max-height: none; margin-top: 6px; box-shadow: none; } }

/* Games on a phone (QOL sweep 2026-11-30): Season, Team and Month stood one under another, full width, and with the paragraph above
   them the first screen held no game at all. Season and Team side by side, Month under them, the paragraph a size smaller. */
@media (max-width:560px){
  .games-directory .controls-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.4fr);gap:6px 8px;padding:8px}
  .games-directory .controls-row>label.field:nth-child(3){grid-column:1/-1}
  .games-directory .controls-row>label.field{min-width:0}
  .games-directory .controls-row select{width:100%;min-width:0;padding:8px 20px 8px 6px;text-overflow:ellipsis}
  .games-directory .page-head p{font-size:.86rem;line-height:1.45}
  .games-directory .page-head h1{font-size:1.6rem}
}

/* A club's page on a phone (QOL sweep 2026-11-30): Team and Season stood full width one under another, then three buttons one per
   row: five rows of controls before the club's name. Team and Season side by side, the buttons smaller and side by side. */
@media (max-width:560px){
  .team-controls{gap:6px 8px;padding:8px}
  main .page-head .team-controls>label.field:nth-of-type(1){flex:1 1 55%;min-width:0}
  main .page-head .team-controls>label.field:nth-of-type(2){flex:1 1 30%;min-width:0}
  .team-controls>label.field select{width:100%;min-width:0}
  .team-controls>a.btn{flex:0 0 auto;min-height:36px;padding:6px 10px;font-size:.8rem}
}

/* games-schedule.css */
/* The Games page (public/js/views/games.js): tiles that fill their row, games still to play, and one club's schedule.
   Colours are the site's tokens (site.css), so the light and dark themes both read; a club's chip is tcVars (--tc). */

/* Every club: the tiles fill the row (no empty columns beside a day of two games), at least 280 px each. */
.games-directory .matchup-grid { display: flex; flex-wrap: wrap; gap: 12px; }
main.content-pages .games-directory .matchup-grid { gap: 12px; }
.games-directory .matchup-grid > .score { flex: 1 1 280px; min-width: min(100%, 280px); }
main.content-pages .games-directory .score:is(.scheduled,.today,.pending) { border-top-style: dashed; }
main.content-pages .games-directory .score.today { border-top-color: var(--brand); border-top-style: solid; }
.games-directory .score.today .st, .games-directory .score.scheduled .st { color: var(--text-2); }
main.content-pages .games-directory .score.is-live { border-top-color: var(--wrong); border-top-style: solid; }
.games-directory .score.is-live .st, .ts-status.is-live { color: var(--wrong); font-weight: 700; }
.games-directory .score.is-live .st::before, .ts-status.is-live::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--wrong); margin-right: 6px; vertical-align: 1px; }
/* A final from the live feed, before the refresh loads the game (views/games.js liveWords): grey, as the game page's FINAL badge
   (audit 2026-11-08: the list's green "FINAL · LIVE FEED" read as a game still on). Live is the only coloured state. */
main.content-pages .games-directory .score.feed-final { border-top-color: var(--final-grey, #4b5563); border-top-style: solid; }
.games-directory .score.feed-final .st, .ts-status.feed-final { color: var(--text-2); font-weight: 700; }
.games-directory .score.feed-final .st::before, .ts-status.feed-final::before { content: ''; display: inline-block; width: 7px; height: 7px; background: var(--final-grey, #4b5563); margin-right: 6px; vertical-align: 1px; }
:root[data-theme="dark"] .games-directory .score.feed-final, :root[data-theme="dark"] .ts-status.feed-final { --final-grey: #9ca3af; }
.games-block { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 26px 0 0; padding-bottom: 6px; border-bottom: 2px solid var(--border-strong); }
.games-block + .section { margin-top: 12px; }

/* ---------- one club's schedule ---------- */
.ts-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-left: 6px solid var(--tc, var(--border-strong)); }
.ts-id { display: flex; align-items: center; gap: 14px; min-width: 0; }
.ts-chip { flex: 0 0 auto; display: inline-grid; place-items: center; min-width: 54px; height: 54px; padding: 0 6px; background: var(--tc, var(--muted)); color: var(--surface); font-weight: 800; font-size: .95rem; letter-spacing: .04em; }
.ts-name { margin: 0 0 3px; font-size: 1.35rem; line-height: 1.15; overflow-wrap: anywhere; }
.ts-kpis { display: flex; flex-wrap: wrap; gap: 0; flex: 1 1 420px; border: 1px solid var(--border); }
.ts-kpi { flex: 1 1 88px; display: grid; gap: 3px; padding: 8px 10px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); margin: 0 -1px -1px 0; background: var(--surface-2); }
.ts-k { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.ts-v { font-size: 1.15rem; font-variant-numeric: tabular-nums; color: var(--text); }

.ts-next { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 16px; margin-top: 12px; padding: 14px 18px; background: var(--surface); border: 1px solid var(--border); border-left: 6px solid var(--tc, var(--border-strong)); color: var(--text); text-decoration: none; }
.ts-next:hover, .ts-next:focus-visible { border-color: var(--text); border-left-color: var(--tc, var(--text)); background: var(--surface-2); text-decoration: none; color: var(--text); }
.ts-next .ts-k { grid-column: 1; }
.ts-next-line { grid-column: 1; font-size: 1.2rem; overflow-wrap: anywhere; }
.ts-next-when { grid-column: 1; color: var(--text-2); font-size: .9rem; }
.ts-next-go { grid-column: 2; grid-row: 1 / span 3; font-weight: 700; color: var(--link); white-space: nowrap; }

.ts-lists { display: grid; grid-template-columns: minmax(0, 1fr); }
.ts-block { margin-top: 22px; min-width: 0; }
.ts-block .section-head { margin-bottom: 8px; }
.ts-list { border: 1px solid var(--border); background: var(--surface); }
.ts-cols, .ts-row { display: grid; grid-template-columns: 8.5em minmax(0, 1fr) auto 4.2em; align-items: center; gap: 10px; padding: 0 12px; }
.ts-up { grid-template-columns: 8.5em minmax(0, 1fr) auto; }
.ts-cols { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding-bottom: 5px; }
.ts-cols span:nth-child(n+3) { text-align: right; }
.ts-row { min-height: 46px; border-top: 1px solid var(--border); color: var(--text); text-decoration: none; font-variant-numeric: tabular-nums; }
.ts-row:hover, .ts-row:focus-visible { background: var(--row-hover); color: var(--text); text-decoration: none; }
.ts-month { padding: 6px 12px; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--surface-2); border-top: 1px solid var(--border); }
.ts-list > .ts-month:first-child { border-top: 0; }
.ts-date { font-size: .86rem; color: var(--text-2); display: grid; }
.ts-today { font-style: normal; font-size: .75rem; font-weight: 700; color: var(--brand-ink); text-transform: uppercase; letter-spacing: .05em; }
.ts-opp { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ts-where { flex: 0 0 1.4em; font-size: .8rem; color: var(--muted); }
.ts-ochip { flex: 0 0 auto; border-left: 4px solid var(--tc, var(--muted)); padding: 2px 0 2px 6px; font-size: .75rem; font-weight: 700; min-width: 40px; }
.ts-oname { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-res { text-align: right; white-space: nowrap; }
.ts-wl { display: inline-block; min-width: 1.3em; text-align: center; }
.ts-row.won .ts-wl { color: var(--right); }
.ts-row.lost .ts-wl { color: var(--wrong); }
.ts-rec { text-align: right; color: var(--text-2); font-size: .88rem; }
.ts-res .ts-status { font-size: inherit; }
.ts-status { text-align: right; white-space: nowrap; font-size: .88rem; color: var(--text-2); }
.ts-more { margin-top: 8px; width: 100%; justify-content: center; }

@media (max-width: 480px) {
  .ts-head { padding: 12px; }
  .ts-chip { min-width: 46px; height: 46px; font-size: .85rem; }
  .ts-name { font-size: 1.15rem; }
  .ts-kpis { flex-basis: 100%; }
  .ts-oname { display: none; }
  .ts-kpi { padding: 6px 8px; }
  .ts-v { font-size: 1rem; }
  .ts-next { padding: 12px; }
  .ts-cols, .ts-row { grid-template-columns: 5.2em minmax(0, 1fr) auto 2.9em; gap: 8px; padding: 0 10px; }
  .ts-up { grid-template-columns: 5.2em minmax(0, 1fr) auto; }
  .ts-date { font-size: .8rem; }
  .ts-where { flex-basis: 1.1em; }
}
/* A final from the live feed in the results, "W 118–104 · Final · live feed", wraps in its column on a phone instead of running over the
   opponent (it took the whole row at 320 px; Codex audit 2026-11-08, a game moved from Upcoming as it went final). */
.ts-pending .ts-res, .ts-pending .ts-status { white-space: normal; }
.ts-pending .ts-res { grid-column: 3 / span 2; max-width: 13em; line-height: 1.25; }
.ts-pending .ts-rec:empty { display: none; }
@media (max-width: 520px) { .ts-pending .ts-res { max-width: 10.5em; font-size: .8rem; } }

/* graphics-hub.css */
/* The Graphics hub (public/js/views/graphics-hub.js): the section's tabs, the shared filter panel, the heatmap and ranking
   table, the graphs and the methods page. Tabs on a wide screen, a dropdown on a phone. Ported from HoopVision Lab
   (nba-stats 02f2da5); the filter panel (public/js/graphics-filter-panel.js) is the filter bar (filter-bar.js and filter-bar.css): chips, "+ Filter" and a picker. */

.hub-tabs { display: flex; align-items: center; gap: 4px; max-width: var(--wrap, 1366px); margin: 0 auto; padding: 8px 16px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.hub-home { font-weight: 800; color: var(--text); margin-right: 10px; padding: 8px 0; }
.hub-tab-list { display: flex; gap: 2px; flex-wrap: wrap; }
.hub-tab { padding: 8px 12px; color: var(--text-2); border-bottom: 3px solid transparent; font-weight: 600; font-size: .88rem; }
.hub-tab:hover { color: var(--text); text-decoration: none; background: var(--row-hover); }
.hub-tab[aria-current="page"] { color: var(--text); border-bottom-color: var(--brand); }
.hub-select { display: none; }
@media (max-width: 700px) {
  .hub-tabs { padding: 8px 16px; gap: 10px; flex-wrap: nowrap; }
  .hub-tab-list { display: none; }
  .hub-select { display: block; flex: 1; min-width: 0; height: 40px; font: 600 .95rem var(--font); color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); padding: 0 8px; }
}

.gh-page { padding-bottom: 24px; }
.gh-ask { margin: 0 0 12px; }
.gh-ask-row { display: flex; gap: 8px; }
.gh-ask-row input { flex: 1; min-width: 0; height: 40px; font-size: .95rem; }
.gh-ask-row .btn { height: 40px; padding: 0 18px; }
.gh-ask-said { margin: 6px 0 0; font-size: .85rem; color: var(--text-2); min-height: 0; }
.gh-ask-said:empty { display: none; }

.gh-panel { background: var(--surface); border: 1px solid var(--border); padding: 10px 12px; margin-bottom: 12px; }
.gh-row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; }
.gh-field { display: flex; flex-direction: column; gap: 3px; font-size: .78rem; color: var(--text-2); min-width: 0; }
.gh-field > span { font-weight: 600; }
.gh-field select, .gh-field input { height: 32px; font: .85rem var(--font); color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); padding: 0 6px; max-width: 100%; }
.gh-num input { width: 92px; }
.gh-metric select { max-width: 260px; }
.gh-teams { max-width: 100%; }
.gh-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.gh-chip { border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text); font: 600 .75rem var(--font); padding: 3px 7px; cursor: pointer; }
.gh-note { font-size: .8rem; color: var(--muted); margin: 6px 0; }

.gh-board { transition: opacity .15s; }
.gh-board.gh-loading { opacity: .55; }
.gh-head { margin: 4px 0 8px; }
.gh-title { margin: 0 0 2px; font-size: 1.35rem; }
.gh-sub { margin: 0; color: var(--text-2); font-size: .88rem; }
.gh-refused { border-left: 3px solid var(--brand); background: var(--surface-2); padding: 6px 10px; margin: 8px 0; font-size: .85rem; }
.gh-refused p { margin: 2px 0; }
.gh-legend { font-size: .8rem; color: var(--text-2); margin: 4px 0 8px; }
.gh-scale { display: inline-flex; align-items: center; gap: 4px; }
.gh-scale i { display: inline-block; width: 18px; height: 12px; border: 1px solid var(--border); }
.gh-scroll { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
.gh-heat { border-collapse: separate; border-spacing: 2px; font-size: .85rem; min-width: 100%; }
.gh-heat th, .gh-heat td { padding: 4px 6px; text-align: center; white-space: nowrap; }
.gh-heat thead th { font-size: .75rem; color: var(--text-2); vertical-align: bottom; }
.gh-heat thead button { background: none; border: 0; color: inherit; font: 700 .75rem var(--font); cursor: pointer; padding: 2px; white-space: normal; max-width: 120px; }
.gh-heat td b { display: block; font-size: .95rem; }
.gh-heat td small { display: block; font-size: .68rem; opacity: .85; }
.gh-heat td.gh-below b, .gh-heat td.gh-below small { opacity: .75; }
.gh-heat td.gh-empty { color: var(--muted); }
/* A long name wraps to a second line, never cut with "…" ("Giannis Ante…" on HoopVision at 390 px: overnight audit 2026-11-16). */
.gh-heat .gh-name { text-align: left; position: sticky; left: 0; background: var(--surface); z-index: 1; max-width: 220px; white-space: normal; overflow-wrap: break-word; }
.gh-badge { display: inline-block; min-width: 34px; padding: 1px 3px; font: 700 .65rem var(--font); text-align: center; background: var(--badge); color: var(--badge-ink); border-radius: 9px; }
.gh-gp { color: var(--muted); }
.gh-rank td sup { font-size: .62rem; margin-left: 2px; opacity: .85; }
.gh-rank td b { display: inline; }
.gh-col { min-width: 84px; }
.gh-sort { display: block; margin: 0 auto 3px; }
.gh-colctl { display: inline-flex; gap: 1px; align-items: center; }
.gh-colctl button { border: 1px solid var(--border); background: var(--surface); color: var(--text); font: 600 .72rem var(--font); min-width: 22px; height: 22px; cursor: pointer; padding: 0 3px; }
.gh-colctl button:disabled { opacity: .35; cursor: default; }
.gh-colctl input.gh-weight { width: 30px; min-height: 0; height: 22px; padding: 0 2px; border-radius: 0; font-size: .72rem; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-align: center; -moz-appearance: textfield; }
.gh-colctl input.gh-weight::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.gh-rank thead th { white-space: normal; }
.gh-rank td { min-width: 70px; }
.gh-avg { font-weight: 700; }
.gh-formula { font-size: .78rem; color: var(--text-2); margin: 0; flex: 1 1 320px; }
.gh-chart { width: 100%; }
.gh-chart svg { display: block; width: 100%; height: auto; }
.gh-quad input { width: 170px; }
.gh-methods, .gh-tiers { margin: 12px 0; font-size: .84rem; border: 1px solid var(--border); background: var(--surface); padding: 8px 12px; }
.gh-methods summary, .gh-tiers summary { cursor: pointer; font-weight: 700; }
.gh-methods ul { padding-left: 18px; margin: 6px 0; }
.gh-metric-note { margin: 4px 0; }
.gh-basis { display: inline-block; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 1px 5px; border: 1px solid currentColor; }
.gh-basis.est { color: var(--brand-ink, var(--brand)); }
.gh-basis.meas { color: var(--muted); }
.gh-tiers p { margin: 3px 0; }
.gh-export { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin: 12px 0; }
.gh-titlein input { width: 260px; }
.gh-empty-board { padding: 18px; background: var(--surface); border: 1px solid var(--border); }
.linkish { background: none; border: 0; color: var(--link); cursor: pointer; font: inherit; padding: 0; text-decoration: underline; }
.gh-preset-list { columns: 2 260px; font-size: .9rem; }
/* The front page (2026-11-15): Creator Tools cards on top (creator-tools.css), then the ready-made boards grouped by kind, tight,
   links underlined so they read as links, and no gap before the footer. */
.gh-home .graphics-landing { margin-top: 14px; }
.gh-ready { margin-top: 22px; }
.gh-ready h2 { margin: 0 0 6px; font-size: 1.1rem; }
.gh-ready-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 4px 24px; }
.gh-ready-grid h3 { margin: 4px 0; font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.gh-ready-grid ul { margin: 0; padding-left: 18px; font-size: .92rem; }
.gh-ready-grid li { margin: 0; padding: 3px 0; line-height: 1.35; }
/* Inline, not inline-block: a name that wraps keeps its bullet on its first line. */
.gh-ready-grid a { display: inline; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 2px; }
.gh-ready-grid a:hover { text-decoration-color: currentColor; }
.gh-home > .gh-note { margin-top: 12px; }
.gh-methods-table { border-collapse: collapse; font-size: .82rem; width: 100%; min-width: 860px; }
.gh-methods-table caption { text-align: left; font-weight: 700; padding: 4px 0; }
.gh-methods-table th, .gh-methods-table td { border: 1px solid var(--border); padding: 6px 8px; vertical-align: top; text-align: left; }
.gh-methods-table th small { color: var(--muted); }
.gh-not { color: var(--muted); margin-top: 4px; }
.gh-methods-page section { margin: 18px 0; }
@media (max-width: 600px) {
  .gh-field { flex: 1 1 140px; }
  .gh-field select, .gh-field input { width: 100%; }
  .gh-num { flex: 1 1 120px; }
  .gh-num input, .gh-quad input, .gh-titlein input { width: 100%; }
  .gh-heat { font-size: .78rem; }
  .gh-heat .gh-name { max-width: 130px; font-size: .74rem; line-height: 1.25; }
  .gh-export .btn { flex: 1 1 auto; }
}
.gh-heat tr.gh-hl > th { box-shadow: inset 4px 0 0 var(--brand); font-weight: 800; }
.gh-heat tr.gh-hl > td { outline: 2px solid var(--text); outline-offset: -2px; }

/* ---------- the page's head: short, so the board is in view on first load ---------- */
.gh-pagehead { margin: 10px 0 8px; }
.gh-pagehead h1 { margin: 0; font-size: 1.5rem; }
.gh-pagehead p { margin: 2px 0 0; color: var(--text-2); font-size: .88rem; }
.gh-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 8px; }
.gh-toolbar:empty { display: none; }
.gh-modes { display: inline-flex; border: 1px solid var(--border-strong); }
.gh-modes button { border: 0; background: var(--surface); color: var(--text-2); padding: 6px 13px; font: 600 .85rem var(--font); cursor: pointer; min-height: 34px; }
.gh-modes button + button { border-left: 1px solid var(--border-strong); }
.gh-modes button[aria-pressed="true"] { background: var(--brand-btn, var(--brand)); color: #fff; }

/* ---------- the filter panel: essentials, then chips and "+ Filter" ---------- */
.gh-panel { padding: 8px 10px; }
.gh-essentials { gap: 6px 10px; }
.gh-seg { display: inline-flex; border: 1px solid var(--border-strong); align-self: flex-end; }
.gh-seg button { border: 0; background: var(--surface); color: var(--text-2); font: 600 .82rem var(--font); padding: 0 11px; height: 32px; cursor: pointer; }
.gh-seg button + button { border-left: 1px solid var(--border-strong); }
.gh-seg button[aria-pressed="true"] { background: var(--ink-btn); color: var(--ink-btn-text); }
/* The filter bar (filter-bar.css) under the board's own controls. */
.gh-panel .fbar { margin: 8px 0 0; }

/* ---------- presets: folded under the board ---------- */
.gh-presets { margin: 12px 0; font-size: .84rem; border: 1px solid var(--border); background: var(--surface); padding: 6px 12px; }
.gh-presets summary { cursor: pointer; font-weight: 700; min-height: 30px; display: flex; align-items: center; }
.gh-preset-row { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 0; }
.gh-preset { font-size: .8rem; padding: 5px 9px; border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.gh-preset:hover { background: var(--surface-2); text-decoration: none; }

/* ---------- tables: content width, right-aligned tabular numbers, the reference row pinned ---------- */
.gh-content { max-width: 900px; }
.gh-heat td, .gh-heat td b, .gh-heat td small { font-variant-numeric: tabular-nums; }
.gh-rank { min-width: 0; width: auto; }
.gh-rank td.gh-num { text-align: right; white-space: nowrap; }
.gh-rank thead th.gh-col { text-align: right; vertical-align: bottom; white-space: nowrap; }
.gh-rank .gh-sort { display: inline; margin: 0; font: 700 .78rem var(--font); }
.gh-rank tr.gh-ref > th, .gh-rank tr.gh-ref > td { box-shadow: inset 0 -2px 0 var(--focus); }
.gh-rank tr.gh-ref > th { background: var(--surface-2, var(--surface)); }
.gh-reftag { color: var(--link); font-weight: 700; }
.gh-diff { font-weight: 700; }
.gh-tablectl { margin: 0 0 6px; }
.gh-diffbtn[aria-pressed="true"] { background: var(--ink-btn); color: var(--ink-btn-text); }
.gh-colctl { position: relative; display: inline-block; margin-left: 2px; }
.gh-colbtn { border: 1px solid var(--border); background: var(--surface); color: var(--text); font: 700 .75rem var(--font); min-width: 24px; height: 22px; cursor: pointer; padding: 0 3px; line-height: 1; }
.gh-colpop { position: absolute; z-index: 20; right: 0; top: calc(100% + 4px); display: flex; flex-direction: column; gap: 4px; min-width: 200px; padding: 8px; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: 0 6px 18px rgba(0,0,0,.18); text-align: left; }
.gh-colpop[hidden] { display: none; }
.gh-colpop button { border: 1px solid var(--border); background: var(--surface); color: var(--text); font: 600 .8rem var(--font); min-height: 32px; text-align: left; padding: 0 8px; cursor: pointer; }
.gh-colpop button:disabled { opacity: .4; cursor: default; }
.gh-colpop label { display: flex; align-items: center; gap: 8px; font: 600 .8rem var(--font); color: var(--text-2); }
.gh-colpop input.gh-weight { width: 56px; height: 32px; text-align: center; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); }
.gh-quadctl { margin: 8px 0; font-size: .84rem; }
.gh-quadctl summary { cursor: pointer; font-weight: 700; min-height: 30px; }
@media (max-width: 600px) {
  .gh-pagehead p { display: none; }
  .gh-essentials .gh-field { flex: 1 1 40%; }
  .gh-essentials .gh-metric { flex: 1 1 100%; }
  .gh-seg { flex: 1 1 100%; }
  .gh-seg button { flex: 1; height: 36px; }
  .gh-rank { font-size: .76rem; }
  .gh-rank td, .gh-rank th { padding: 3px 4px; }
  .gh-rank td { min-width: 52px; }
  .gh-rank .gh-name { max-width: 118px; }
  .gh-gp, .gh-reftag { display: none; }
}
.gh-pagehead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 6px 16px; }
.gh-legend { font-size: .78rem; color: var(--text-2); margin: 2px 0 6px; }
.gh-display { font-size: .8rem; color: var(--text-2); margin: 6px 0; gap: 6px 16px; }
.gh-inline select { height: 30px; font: .8rem var(--font); color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); margin-left: 4px; }
.gh-ask { margin: 0 0 8px; }
.gh-rank .gh-col, .gh-rank td { min-width: 0; }
.gh-rank th, .gh-rank td { padding: 4px 6px; }
.gh-rank tr.gh-ref > th { background: var(--row-hover); }
.gh-rank tr.gh-ref > th a { font-weight: 800; }
.gh-short { display: none; }
.gh-tablectl { margin: 8px 0 6px; }
@media (max-width: 600px) {
  .gh-heat .gh-long { display: none; }
  .gh-heat .gh-short { display: inline; }
  .gh-rank .gh-badge, .gh-heat .gh-badge { min-width: 0; font-size: .58rem; padding: 1px 3px; }
}

/* A phone: each essential on one line, its name beside it, so the board is in view sooner (audit round 1). */
@media (max-width: 600px) {
  .gh-pagehead h1 { font-size: 1.3rem; }
  .gh-modes button { padding: 4px 10px; min-height: 32px; font-size: .8rem; }
  .gh-essentials { gap: 6px 8px; }
  .gh-essentials .gh-field { flex-direction: row; align-items: center; gap: 6px; flex: 1 1 45%; }
  .gh-essentials .gh-field > span { flex: 0 0 auto; font-size: .74rem; }
  .gh-essentials .gh-field select { flex: 1; min-width: 0; height: 34px; }
  .gh-essentials .gh-metric { flex: 1 1 100%; }
  .gh-ask-row input, .gh-ask-row .btn { height: 38px; }
  .gh-panel .fbar { margin-top: 6px; }
}
/* Black and navy club badges keep an edge on a dark page. */
:root[data-theme="dark"] .gh-badge { box-shadow: 0 0 0 1px rgba(255,255,255,.55); }

/* The legend's middle swatch keeps an edge in the dark. */
:root[data-theme="dark"] .gh-scale i { border-color: #8a8a8a; }

/* Opp. adj. stats (ported from HoopVision Lab, public/js/views/opp-adjusted.js): the card, its controls, the game-by-game chart, the ranking of every club. */
.oa-lede { max-width: 72ch; }
/* Jessie Naylor's credit under the title: smaller and muted. */
.page-head p.oa-collab { margin: 0 0 6px; font-size: .88rem; color: var(--muted, #8a93a3); }
.oa-collab a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.oa-collab a:hover { color: var(--text, inherit); }
.oa-good-word { color: var(--oa-good, #1b8748); }
.oa-bad-word { color: var(--oa-bad, #cb2d28); }
[data-theme="dark"] .oa-good-word { color: #4cc27f; }
[data-theme="dark"] .oa-bad-word { color: #f07a74; }
.oa-controls { display: flex; flex-direction: column; gap: 8px; margin: 0 0 12px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--border); }
.oa-row { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: flex-end; }
.oa-group { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.oa-label { font-size: .75rem; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: .03em; }
.oa-help { font-size: .8rem; color: var(--text-2); max-width: 70ch; margin-top: 2px; }
.oa-seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--border-strong); border-radius: 6px; overflow: hidden; }
.oa-seg button { border: 0; background: var(--surface); color: var(--text-2); padding: 7px 12px; font: 600 .85rem var(--font); cursor: pointer; min-height: 34px; }
.oa-seg button + button { border-left: 1px solid var(--border-strong); }
.oa-seg button:hover { background: var(--row-hover); color: var(--text); }
.oa-seg button[aria-checked="true"] { background: var(--brand-btn, var(--brand)); color: #fff; }
.oa-seg button:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.oa-moderow .oa-seg button { padding: 8px 14px; }
.oa-team select { height: 36px; min-width: 200px; }
.oa-more { position: relative; align-self: flex-end; }
.oa-more > summary { cursor: pointer; list-style: none; font: 600 .85rem var(--font); padding: 7px 12px; border: 1px dashed var(--border-strong); border-radius: 6px; min-height: 34px; box-sizing: border-box; }
.oa-more > summary::-webkit-details-marker { display: none; }
.oa-pop { position: absolute; z-index: 20; right: 0; top: calc(100% + 6px); display: flex; flex-direction: column; gap: 8px; padding: 12px; min-width: 220px; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: 0 6px 24px rgba(0,0,0,.18); }
.oa-status { margin: 0 0 6px; font-size: .85rem; color: var(--text-2); min-height: 1.2em; }
.oa-status:empty { min-height: 0; margin: 0; }
.oa-figure { margin: 0; }
.oa-canvas { display: block; width: 100%; height: auto; border: 1px solid var(--border); }
.oa-canvas.oa-story { max-width: 640px; }
.oa-canvas.oa-tall { max-width: 520px; }
.oa-export { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; }
.oa-export-note { font-size: .8rem; color: var(--muted); }
.oa-about { margin: 8px 0 14px; border: 1px solid var(--border); background: var(--surface); padding: 6px 10px; font-size: .85rem; }
.oa-about > summary { cursor: pointer; font-weight: 700; }
.oa-about ul { margin: 6px 0; padding-left: 18px; }
.oa-about li { margin: 2px 0; }
.oa-h { font-size: 1.1rem; margin: 10px 0 6px; }
.oa-chart { display: block; max-width: 100%; height: auto; }
.oa-bars svg { display: block; max-width: 100%; height: auto; }
.oa-open { margin: 6px 0; font-size: .85rem; }
.oa-open > summary { cursor: pointer; font-weight: 700; }
.oa-teamlist { columns: 3 220px; margin: 6px 0; padding-left: 0; list-style: none; }
.oa-teamlist li { margin: 2px 0; break-inside: avoid; }
.oa-empty { padding: 24px; border: 1px dashed var(--border-strong); text-align: center; color: var(--text-2); }
.oa-note { margin: 0; font-size: .85rem; color: var(--text-2); }
@media (max-width: 700px) {
  .oa-row { gap: 8px; }
  .oa-team select { min-width: 0; width: 100%; }
  .oa-team { flex: 1 1 100%; }
  .oa-seg button { padding: 7px 9px; font-size: .8rem; }
  .oa-pop { right: auto; left: 0; }
}
.oa-toggle { border: 1px solid var(--border-strong); border-radius: 6px; background: var(--surface); color: var(--text-2); padding: 7px 12px; font: 600 .85rem var(--font); cursor: pointer; min-height: 34px; }
.oa-toggle[aria-checked="true"] { background: var(--brand-btn, var(--brand)); color: #fff; }
.oa-toggle:disabled { opacity: .55; cursor: not-allowed; }
.oa-chip { border: 1px solid var(--brand); border-radius: 999px; background: var(--surface); color: var(--text); padding: 4px 12px; font: 600 .85rem var(--font); cursor: pointer; margin-left: 4px; }
.oa-suggest { margin: 0; font-size: .88rem; color: var(--text); }
.oa-fold > summary { cursor: pointer; font: 600 .85rem var(--font); padding: 6px 0; color: var(--text); }
.oa-fold[open] > summary { margin-bottom: 6px; }
.oa-fold > .oa-row + .oa-row { margin-top: 8px; }
.oa-games .oa-note { margin-top: 4px; }
@media (min-width: 1100px) { .oa-split { display: grid; grid-template-columns: minmax(0, 640px) minmax(0, 1fr); gap: 20px; align-items: start; } .oa-split .oa-canvas.oa-story, .oa-split .oa-canvas.oa-tall { max-width: 100%; } .oa-split .oa-about { margin-top: 0; } }
.oa-split .oa-canvas.oa-tall { max-width: 560px; }
/* Opp. adj. stats on a par with the other Graphics (2026-12-02 evening): one row of the main choices and "+ Filter" chips, one row of the
   picture's own (size, look, rows or stat, title), the picture under them. */
.oa-controls { gap: 8px; padding: 8px 12px; }
.oa-controls .oa-group, .oa-pick, .oa-titlein { gap: 2px; }
.oa-main, .oa-look { align-items: flex-end; gap: 8px 16px; }
.oa-pick { display: flex; flex-direction: column; gap: 3px; margin: 0; }
.oa-pick select { min-width: 150px; }
.oa-team select { min-width: 200px; }
.oa-filters { flex: 1 1 260px; }
.oa-filters .fbar { margin: 0; }
.oa-filters .fbar-row { min-height: 38px; }
.oa-pick select, .oa-titlein input { height: 38px; }
.oa-titlein { display: flex; flex-direction: column; gap: 3px; margin: 0; flex: 1 1 220px; max-width: 360px; }
.oa-titlein input { width: 100%; box-sizing: border-box; }
.oa-seg button { min-height: 36px; box-sizing: border-box; }
.oa-boardfig { position: relative; }
.oa-tip { position: absolute; z-index: 5; display: flex; flex-direction: column; gap: 2px; max-width: 220px; padding: 6px 9px; font-size: .82rem; background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); box-shadow: 0 4px 14px rgba(0,0,0,.18); pointer-events: none; }
.oa-tip[hidden] { display: none; }
.oa-tip-go { color: var(--text-2); font-size: .78rem; }
.oa-canvas.oa-square { max-width: 720px; }
.oa-split .oa-canvas.oa-square { max-width: 100%; }
.oa-fold > summary { font-weight: 500; }
@media (max-width: 700px) {
  /* (A phone: view and side share a line, the team under them, then the filters and the picture's own choices folded: the card
     starts on the first screen.) */
  .oa-main { gap: 8px; }
  .oa-main > .oa-group > .oa-label, .oa-main > .oa-pick > .oa-label { display: none; }
  .oa-main > .oa-group:first-child, .oa-main > .oa-group[aria-label="Side"] { flex: 0 0 auto; }
  .oa-main .oa-fold { flex: 1 1 0; min-width: 0; order: 5; align-self: center; }
  .oa-main .oa-fold[open] { flex-basis: 100%; }
  .oa-main > .oa-team { order: 3; flex: 1 1 100%; }
  .oa-main > .oa-filters { order: 4; }
  .oa-page .oa-lede { font-size: .9rem; }
  .oa-page .page-head h1 { font-size: 1.6rem; }
  .oa-filters { flex: 1 1 100%; }
  .oa-pick select { min-width: 0; width: 100%; }
  .oa-look .oa-pick, .oa-titlein { flex: 1 1 100%; max-width: none; }
}
/* Stat and side together (2026-12-03): the Stat menu (Offense and Defense groups) with the side's two buttons right beside it, both 38px
   high and lined up on their bottoms; on a phone they take a line of their own, the menu as wide as there is room. */
.oa-statpick { display: flex; align-items: flex-end; gap: 8px; min-width: 0; max-width: 100%; }
.oa-statpick .oa-stat { max-width: 22em; min-width: 180px; }
@media (max-width: 700px) {
  .oa-main > .oa-statpick { order: 3; flex: 1 1 100%; }
  .oa-main > .oa-statpick > .oa-pick { flex: 1 1 auto; min-width: 0; }
  .oa-statpick .oa-stat { min-width: 0; width: 100%; max-width: none; }
  .oa-statpick > .oa-group { flex: 0 0 auto; }
  .oa-statpick > .oa-pick > .oa-label, .oa-statpick > .oa-group > .oa-label { display: none; }
  /* (A phone's menus are 44px for the thumb, site.css: the side's buttons the same height, so both line up.) */
  .oa-statpick .oa-seg { box-sizing: border-box; height: 44px; }
  .oa-statpick .oa-seg button { min-height: 0; height: 100%; }
}
/* The card's columns (2026-12-03, "pick and choose what stats go on this graph"): one chip each as the card heads it, "+ Column"
   opening both sides' stats over the page (a bottom sheet on a phone), "Default columns" when picked. */
.oa-cols { align-items: center; gap: 6px 10px; }
.oa-colchips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0; }
.oa-colchip .fbar-chip-label { cursor: default; white-space: nowrap; }
.oa-addcol > summary.fbar-add { display: inline-flex; align-items: center; cursor: pointer; list-style: none; border-style: solid; min-height: 32px; box-sizing: border-box; }
.oa-addcol > summary::-webkit-details-marker { display: none; }
.oa-addcol[open] > summary.fbar-add { background: var(--surface); color: var(--text); }
.oa-colpop { left: 0; right: auto; width: min(640px, 92vw); max-height: 70vh; overflow: auto; }
.oa-colside { display: flex; flex-direction: column; gap: 4px; }
.oa-coltogs { display: flex; flex-wrap: wrap; gap: 6px; }
.oa-coltogs .oa-toggle { min-height: 32px; padding: 5px 10px; font-size: .8rem; }
.oa-coldone { align-self: flex-end; }
.oa-statpick.oa-cornerpick > .oa-pick > .oa-label { display: block; }
@media (max-width: 700px) {
  /* (The columns' fold shares the "+ Filter" line when it fits, so the card still starts on the first screen; open, a line of its own.) */
  .oa-page .oa-main > .oa-filters { flex: 0 1 auto; }
  .oa-page .oa-main .oa-colfold { order: 4; flex: 1 1 140px; align-self: center; }
  .oa-page .oa-main .oa-colfold[open] { flex-basis: 100%; }
  .oa-page .oa-main > .oa-fold:not(.oa-colfold) { flex-basis: 100%; }
  .oa-colfold > .oa-cols { margin-top: 4px; }
  .oa-collabel { display: none; }
  .oa-colpop { position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: auto; max-height: 75vh; border-radius: 12px 12px 0 0; z-index: 60; }
  .oa-statpick.oa-cornerpick > .oa-pick > .oa-label { display: block; }
}

/* filter-bar.css */
/* The filter bar (public/js/filter-bar.js): one row of chips naming every filter that is on, "+ Filter" opening a picker over the
   page (never in the flow, so the board does not move), a bottom sheet on a phone. Site tokens only, so light and dark follow the
   theme: --surface, --surface-2, --border, --border-strong, --text, --muted, --brand, --focus. */
.fbar { position: relative; margin-bottom: 10px; }
.fbar-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 36px; }
.fbar button { font: inherit; cursor: pointer; }
.fbar-chip { display: inline-flex; align-items: stretch; max-width: 100%; border: 1px solid var(--border-strong); border-radius: 4px; background: var(--surface); color: var(--text); font-size: .82rem; line-height: 1.2; }
.fbar-chip-label { border: 0; background: none; color: inherit; padding: 6px 10px; min-height: 32px; text-align: left; overflow-wrap: anywhere; font-weight: 600 !important; }
.fbar-chip-pinned { background: var(--surface-2); }
.fbar-chip-x { border: 0; border-left: 1px solid var(--border); background: none; color: var(--muted); padding: 0 9px; min-width: 32px; font-size: 1rem !important; line-height: 1; }
.fbar-chip-x:hover, .fbar-chip-label:hover { background: var(--surface-2); color: var(--text); }
.fbar-chip-off { border-style: dashed; color: var(--muted); }
.fbar-chip-off .fbar-chip-label { text-decoration: line-through; text-decoration-thickness: 1px; }
.fbar-preset, .fbar-add, .fbar-clear { min-height: 32px; padding: 5px 10px; border-radius: 4px; font-size: .8rem !important; }
.fbar-preset { border: 1px dashed var(--border-strong); background: none; color: var(--muted); }
.fbar-preset:hover { color: var(--text); border-style: solid; }
.fbar-add { border: 1px solid var(--text); background: var(--text); color: var(--surface); font-weight: 700 !important; }
.fbar-add[aria-expanded="true"] { background: var(--surface); color: var(--text); }
.fbar-clear { border: 0; background: none; color: var(--link, var(--text)); text-decoration: underline; padding: 5px 4px; }
.fbar :focus-visible { outline: 2px solid var(--focus, var(--brand)); outline-offset: 1px; }

/* The picker: over the page under the row, at most 680px wide. */
.fbar-pop { position: absolute; z-index: 70; top: calc(100% + 6px); left: 0; width: min(680px, calc(100vw - 32px)); max-height: min(70vh, 560px); display: flex; flex-direction: column;
  background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); border-radius: 6px; box-shadow: 0 10px 30px rgba(0, 0, 0, .22); }
.fbar-scrim { display: none; }
.fbar-pop-head { display: flex; align-items: center; gap: 6px; padding: 8px 8px 0 10px; border-bottom: 1px solid var(--border); }
.fbar-tabs { display: flex; gap: 2px; flex: 1 1 auto; min-width: 0; flex-wrap: wrap; }
.fbar-tab { border: 0; border-bottom: 3px solid transparent; background: none; color: var(--muted); padding: 8px 10px; font-size: .84rem !important; font-weight: 700 !important; white-space: nowrap; }
.fbar-tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--brand); }
.fbar-x { border: 0; background: none; color: var(--muted); font-size: 1.3rem !important; width: 36px; height: 36px; flex: 0 0 auto; }
.fbar-panel { overflow: auto; padding: 8px 12px; display: flex; flex-direction: column; gap: 2px; }
.fbar-field { display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: start; gap: 4px 12px; padding: 5px 0; border-bottom: 1px solid var(--border); }
.fbar-field:last-of-type { border-bottom: 0; }
.fbar-name { font-size: .78rem; font-weight: 700; color: var(--muted); padding-top: 8px; }
.fbar-note { grid-column: 2; font-size: .76rem; color: var(--muted); }
.fbar-field-off .fbar-name { text-decoration: line-through; }
.fbar-toggles { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.fbar-field > .fbar-tog { justify-self: start; }
.fbar-tog { border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); border-radius: 4px; padding: 4px 9px; min-height: 30px; font-size: .8rem !important; white-space: nowrap; }
.fbar-tog[aria-pressed="true"] { background: var(--text); color: var(--surface); border-color: var(--text); font-weight: 700 !important; }
.fbar-tog:disabled, .fbar-select:disabled, .fbar-find:disabled { opacity: .45; cursor: not-allowed; }
.fbar-tog[hidden] { display: none; }
.fbar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); }
.fbar-grid .fbar-tog { padding: 4px 2px; }
.fbar-search { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fbar-find, .fbar-select, .fbar-input { min-height: 32px; max-width: 100%; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 4px; padding: 3px 8px; font: inherit; font-size: .84rem; }
.fbar-find { width: 100%; box-sizing: border-box; }
.fbar-field > .fbar-select { justify-self: start; width: auto; min-width: 140px; }
.fbar-range { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fbar-dash { font-size: .8rem; color: var(--muted); }
.fbar-why { margin: 6px 0 2px; padding-left: 18px; font-size: .8rem; color: var(--muted); }
p.fbar-why { padding-left: 0; }
.fbar-pop-foot { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; padding: 8px 12px; border-top: 1px solid var(--border); }
.fbar-foot-note { flex: 1 1 220px; font-size: .74rem; color: var(--muted); }
.fbar-foot-btns { display: flex; gap: 6px; margin-left: auto; }
.fbar-foot-btns button { min-height: 34px; padding: 5px 12px; border-radius: 4px; font-size: .82rem !important; font-weight: 700 !important; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); }
.fbar-foot-btns .fbar-reset { border: 0; background: none; color: var(--muted); font-weight: 500 !important; text-decoration: underline; padding: 5px 4px; }
.fbar-foot-btns .fbar-done { background: var(--text); color: var(--surface); border-color: var(--text); }


/* A phone: the picker is a bottom sheet over a dimmed page; nothing scrolls sideways. */
@media (max-width: 600px) {
  .fbar-row { gap: 5px; }
  .fbar-chip { font-size: .78rem; }
  .fbar-chip-label, .fbar-chip-x, .fbar-preset, .fbar-add, .fbar-clear { min-height: 34px; }
  .fbar-chip-label { padding: 5px 8px; }
  .fbar-chip-x { min-width: 30px; padding: 0 7px; }
  .fbar-preset, .fbar-add { padding: 5px 8px; font-size: .76rem !important; }
  .fbar-scrim { display: block; position: fixed; inset: 0; z-index: 69; background: rgba(0, 0, 0, .45); }
  .fbar-pop { position: fixed; top: auto; left: 0; right: 0; bottom: 0; width: 100%; max-height: 82vh; max-height: 82dvh; border-radius: 12px 12px 0 0; border-bottom: 0; box-sizing: border-box; padding-bottom: env(safe-area-inset-bottom, 0); }
  .fbar-tabs { flex-wrap: wrap; }
  .fbar-tab { padding: 9px 7px; flex: 0 1 auto; }
  .fbar-field { grid-template-columns: minmax(0, 1fr); padding: 7px 0; }
  .fbar-note { grid-column: 1; }
  .fbar-name { padding-top: 0; }
  .fbar-tog { min-height: 36px; white-space: normal; }
  .fbar-grid { grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); }
  .fbar-range .fbar-select { flex: 1 1 120px; }
  .fbar-select { width: 100%; }
  .fbar-range { display: flex; }
  .fbar-foot-btns { width: 100%; }
  .fbar-foot-btns .fbar-done { flex: 1 1 auto; }
}
.fbar-say { font-size: .8rem; color: var(--muted); padding-top: 7px; }
.fbar-field > .fbar-input { justify-self: start; width: auto; min-width: 140px; max-width: 100%; }
.fbar-field > .fbar-input[type="text"] { width: min(320px, 100%); }

/* chat.css */
/* Chat (/chat; Pigskin Lab's /cfb/chat too): public/js/views/chat.js, its icons and number highlights public/js/views/chat-ui.js.
   The same file on all four Labs sites (Pigskin, HoopVision, Batter, Rinkside Lab): only each site's own colours differ, read
   from its tokens (--brand, --brand-ink, --brand-btn; site.css). The owner, 2026-12-02: "a bit more aesthetically pleasing".
   A chat app's page: one centred column; empty, the welcome sits in the middle of the screen above the box; asked, the
   conversation fills the column (your question a bubble on the right in the site's colour, the answer a card on the left
   with its number standing out and its source under it), and the box is docked at the bottom of the screen (above a
   phone's keyboard, --chat-kb). One sentence per answer: no charts. */

:is(#app, body) .wrap.chat-page {
  max-width: 780px; display: flex; flex-direction: column; padding-top: 12px; padding-bottom: 0;
  min-height: calc(100dvh - var(--header-h, 64px));
  --chat-tint: color-mix(in srgb, var(--brand) 9%, transparent);
  --chat-line: color-mix(in srgb, var(--brand) 22%, var(--border));
  --chat-shadow: 0 1px 2px rgb(0 0 0 / .05), 0 4px 14px rgb(0 0 0 / .05);
}
:root[data-theme="dark"] :is(#app, body) .wrap.chat-page { --chat-tint: color-mix(in srgb, var(--brand) 14%, transparent); --chat-shadow: 0 1px 2px rgb(0 0 0 / .4); }
main:has(.chat-page), #app.content-pages:has(> .chat-page) { padding-bottom: 0; min-height: 0; }
.chat-page h1.chat-h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; margin: -1px; padding: 0; border: 0; }

.chat-ico { display: inline-flex; flex: none; width: 1em; height: 1em; }
.chat-ico svg { width: 100%; height: 100%; display: block; }
.chat-mark svg, .chat-avatar svg { stroke-width: 2.75; }

/* ---------- the welcome ---------- */
.chat-welcome { margin: auto 0; padding: 28px 8px 18px; text-align: center;
  background: radial-gradient(closest-side at 50% 34%, var(--chat-tint), transparent) no-repeat 50% 0 / 100% 78%; }
.chat-mark { display: inline-grid; place-items: center; width: 56px; height: 56px; margin: 0 0 16px; border-radius: 16px; font-size: 30px;
  color: #fff; background: linear-gradient(145deg, var(--brand), var(--brand-btn)); box-shadow: 0 6px 18px color-mix(in srgb, var(--brand) 32%, transparent); }
.chat-welcome .chat-welcome-h { margin: 0 auto 14px; max-width: 18ch; font-family: var(--display, inherit); font-size: clamp(2rem, 4.6vw, 3rem); font-weight: 800; line-height: 1.04;
  letter-spacing: -.015em; text-transform: none; color: var(--text); text-wrap: balance; }
.chat-welcome-body { margin: 0 auto 10px; max-width: 60ch; font-size: 1.08rem; line-height: 1.55; color: var(--text-2); text-wrap: pretty; }
.chat-welcome-small { margin: 0 auto; max-width: 52ch; font-size: .9rem; line-height: 1.5; color: var(--muted); text-wrap: pretty; }
.chat-badges { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 20px 0 0; padding: 0; }
.chat-badges li { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; line-height: 1.2;
  color: var(--text-2); background: var(--surface); border: 1px solid var(--border); }
.chat-badges .chat-ico { font-size: 15px; color: var(--brand-ink); }

/* The examples: cards to tap, three across (two on a phone). */
.chat-try { margin: 30px 0 10px; font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.chat-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; text-align: left; }
.chat-card { display: flex; flex-direction: column; gap: 5px; min-height: 76px; padding: 12px 14px; font: inherit; text-align: left; cursor: pointer;
  border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgb(0 0 0 / .04);
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease; }
.chat-card-tag { font-size: .68rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--brand-ink); }
.chat-card-q { font-size: .93rem; font-weight: 500; line-height: 1.3; overflow-wrap: anywhere; }
.chat-card:hover { transform: translateY(-2px); border-color: var(--chat-line); box-shadow: var(--chat-shadow); }
.chat-card:active { transform: translateY(0); }
.chat-card:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.chat-follow-hint { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 6px; margin: 16px 0 0; font-size: .84rem; color: var(--muted); }
.chat-follow-hint .chat-ico { font-size: 14px; }
.chat-follow-hint q { quotes: "“" "”"; color: var(--text-2); font-style: italic; }
.chat-follow-hint q:not(:last-child)::after { content: close-quote ","; }

/* ---------- the conversation ---------- */
.chat-log { list-style: none; margin: 8px 0 0; padding: 12px 0 4px; display: flex; flex-direction: column; gap: 16px; }
.chat-log:empty { display: none; }
.chat-turn { max-width: 100%; min-width: 0; overflow-wrap: anywhere; }
.chat-turn.is-fresh { animation: chat-in .22s ease-out both; }
.chat-turn p { margin: 0; }
@keyframes chat-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.chat-asked { align-self: flex-end; max-width: min(80%, 560px); padding: 10px 16px; border-radius: 20px 20px 6px 20px; font-size: 1rem; line-height: 1.4;
  color: #fff; background: var(--brand-btn); box-shadow: 0 2px 8px color-mix(in srgb, var(--brand-btn) 25%, transparent); }

.chat-answer { align-self: stretch; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; align-items: start; }
.chat-avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; font-size: 18px; color: var(--brand-ink); background: var(--chat-tint);
  border: 1px solid var(--chat-line); }
.chat-bubble { min-width: 0; justify-self: start; max-width: 100%; padding: 14px 18px 12px; border-radius: 6px 20px 20px 20px; background: var(--surface);
  border: 1px solid var(--border); box-shadow: var(--chat-shadow); }
.chat-sentence { font-size: 1.08rem; line-height: 1.55; color: var(--text); text-wrap: pretty; }
.chat-num { font-weight: 750; color: var(--text); padding: 0 .22em; margin: 0 -.06em; border-radius: 5px; background: var(--chat-tint); box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.chat-sentence .wall-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chat-readas { margin-top: 6px !important; font-size: .82rem; color: var(--muted); }
.chat-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 10px !important; padding-top: 9px; border-top: 1px solid var(--border);
  font-size: .78rem; line-height: 1.4; color: var(--muted); }
.chat-foot .chat-ico { font-size: 13px; color: var(--muted); }
.chat-foot a, .chat-foot .linkish { font-size: inherit; color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.chat-foot a:hover { color: var(--link); }
.chat-foot .chat-open { display: inline-flex; align-items: center; gap: 3px; margin-left: auto; font-weight: 600; color: var(--brand-ink); text-decoration: none; }
.chat-foot .chat-open:hover { text-decoration: underline; color: var(--brand-ink); }
.chat-foot.is-action { border-top: 0; padding-top: 0; }
.chat-foot .btn { margin-top: 2px; }

/* A question back (which one?) and a "can't": friendly, set apart, never an error box. */
.chat-answer.is-clarify .chat-bubble { background: color-mix(in srgb, var(--brand) 5%, var(--surface)); border-color: var(--chat-line); }
.chat-answer.is-refused .chat-bubble { background: var(--surface-2); box-shadow: none; }
.chat-answer.is-refused .chat-avatar { color: var(--muted); background: var(--surface-2); border-color: var(--border); }
.chat-answer.is-refused .chat-sentence, .chat-answer.is-nearest .chat-sentence { color: var(--text-2); }
.chat-answer.is-refused .chat-num { background: transparent; padding: 0; margin: 0; }

.chat-options, .chat-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chat-options { margin-top: 12px; }
.chat-chip { font: inherit; font-size: .88rem; font-weight: 500; line-height: 1.25; text-align: left; padding: 7px 14px; min-height: 36px; cursor: pointer; max-width: 100%; overflow-wrap: anywhere;
  border: 1px solid var(--chat-line); border-radius: 999px; background: var(--surface); color: var(--text); transition: background .15s ease, border-color .15s ease; }
.chat-chip:hover { background: var(--chat-tint); border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); }
.chat-chip:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.chat-chip.small { font-size: .82rem; min-height: 32px; padding: 5px 12px; }
.chat-follow { align-self: stretch; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding-left: 44px; margin-top: -6px; }
.chat-follow-label { display: inline-flex; align-items: center; gap: 5px; font-size: .76rem; font-weight: 600; color: var(--muted); }
.chat-follow-label .chat-ico { font-size: 13px; }

/* Waiting: the answer's place, three dots. */
.chat-wait .chat-bubble { display: inline-flex; align-items: center; gap: 10px; padding: 12px 16px; color: var(--muted); font-size: .9rem; }
.chat-dots { display: inline-flex; gap: 4px; }
.chat-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); animation: chat-dot 1.1s infinite ease-in-out; }
.chat-dots i:nth-child(2) { animation-delay: .15s; } .chat-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes chat-dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .chat-dots i { animation: none; opacity: .7; } .chat-turn.is-fresh { animation: none; } .chat-card, .chat-card:hover { transition: none; transform: none; } }

/* ---------- the one graphic an answer may carry (lib/chat-graphic.js): Ask's own chart, small, tap to enlarge ---------- */
.chat-bubble:has(.chat-gfx) { width: 100%; }
.chat-gfx { margin: 12px 0 0; padding: 10px 12px 8px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg); }
.chat-gfx-head { display: flex; align-items: center; gap: 8px; width: 100%; padding: 0; margin: 0 0 6px; font: inherit; text-align: left; cursor: zoom-in; color: var(--text-2); background: none; border: 0; }
.chat-gfx-title { flex: 1; min-width: 0; font-size: .8rem; font-weight: 650; line-height: 1.3; }
.chat-gfx-head .chat-ico { font-size: 15px; color: var(--muted); }
.chat-gfx-head:hover .chat-ico, .chat-gfx-head:focus-visible .chat-ico { color: var(--brand-ink); }
.chat-gfx-head:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.chat-gfx .chat-gfx-body { height: 230px; padding: 0; cursor: zoom-in; overflow: hidden; }
.chat-gfx-foot { display: flex; justify-content: flex-end; margin: 6px 0 0; font-size: .76rem; }
.chat-gfx-foot a { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; color: var(--brand-ink); text-decoration: none; }
.chat-gfx-foot a:hover { text-decoration: underline; }
.chat-gfx-dialog { width: min(1040px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 16px 18px 14px; border: 1px solid var(--border); border-radius: 18px;
  background: var(--surface); color: var(--text); box-shadow: 0 24px 60px rgb(0 0 0 / .35); }
.chat-gfx-dialog::backdrop { background: rgb(0 0 0 / .55); }
.chat-gfx-dialog-head { display: flex; align-items: center; gap: 12px; margin: 0 0 10px; }
.chat-gfx-dialog-head h2 { flex: 1; margin: 0; font-size: 1rem; line-height: 1.3; text-transform: none; letter-spacing: 0; }
.chat-gfx-close { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; font-size: 18px; cursor: pointer; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border); border-radius: 50%; }
.chat-gfx-close:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.chat-gfx-dialog .chat-gfx-body { height: min(460px, calc(100dvh - 170px)); padding: 0; }
@media (max-width: 640px) {
  .chat-gfx { padding: 8px 10px 6px; margin-top: 10px; }
  .chat-gfx .chat-gfx-body { height: 200px; }
  .chat-gfx-dialog { width: calc(100vw - 16px); padding: 12px; }
}

/* ---------- the box, docked at the bottom ---------- */
.chat-dock { position: sticky; bottom: var(--chat-kb, 0px); z-index: 5; margin-top: 8px; padding: 18px 0 calc(14px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to bottom, transparent, var(--bg) 18px); }
.chat-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 4px 8px; }
.chat-meta[hidden] { display: none; }
.chat-pinned { display: inline-flex; align-items: center; gap: 7px; margin: 0; font-size: .78rem; color: var(--muted); }
.chat-pinned .chat-ico { font-size: 14px; color: var(--brand-ink); }
.chat-new { display: inline-flex; align-items: center; gap: 5px; flex: none; min-height: 30px; padding: 4px 12px 4px 9px; font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer;
  color: var(--text-2); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; }
.chat-new:hover { border-color: var(--chat-line); color: var(--text); }
.chat-new:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.chat-new .chat-ico { font-size: 14px; }
.chat-new[hidden] { display: none; }
.chat-form { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 20px; border: 1px solid var(--border-strong); border-radius: 28px; background: var(--surface);
  box-shadow: 0 2px 6px rgb(0 0 0 / .05), 0 10px 28px rgb(0 0 0 / .07); transition: border-color .15s ease, box-shadow .15s ease; }
:root[data-theme="dark"] .chat-form { box-shadow: 0 6px 24px rgb(0 0 0 / .45); }
.chat-form:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent), 0 10px 28px rgb(0 0 0 / .07); }
.chat-page .chat-input { flex: 1; min-width: 0; min-height: 44px; padding: 0; font: inherit; font-size: 16px; /* 16px: no zoom on focus in iOS */
  border: 0; outline: 0; background: transparent; color: var(--text); box-shadow: none; }
.chat-page .chat-input::placeholder { color: var(--muted); opacity: 1; }
.chat-send { display: grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0; font-size: 20px; cursor: pointer;
  border: 0; border-radius: 50%; color: #fff; background: var(--brand-btn); transition: transform .12s ease, opacity .12s ease, background .12s ease; }
.chat-send:hover { background: color-mix(in srgb, var(--brand-btn) 86%, #000); }
.chat-send:active { transform: scale(.94); }
.chat-send:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.chat-send:disabled { opacity: .45; cursor: default; transform: none; }
.chat-left { margin: 8px 4px 0; font-size: .76rem; text-align: center; color: var(--muted); }
.chat-left[hidden] { display: none; }

/* ---------- a short desktop screen (1366 x 768): the welcome and both rows of examples above the box ---------- */
@media (min-width: 641px) and (max-height: 880px) {
  .chat-welcome { padding-top: 10px; padding-bottom: 6px; }
  .chat-mark { width: 46px; height: 46px; border-radius: 13px; font-size: 24px; margin-bottom: 12px; }
  .chat-welcome .chat-welcome-h { max-width: none; font-size: clamp(2rem, 3.4vw, 2.6rem); margin-bottom: 12px; }
  .chat-welcome-body { font-size: 1.04rem; }
  .chat-badges { margin-top: 16px; }
  .chat-try { margin-top: 22px; }
  .chat-card { min-height: 64px; padding: 10px 14px; }
  .chat-follow-hint { margin-top: 12px; }
}

/* ---------- a tablet, a phone ---------- */
@media (max-width: 720px) {
  .chat-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  :is(#app, body) .wrap.chat-page { padding-top: 4px; }
  .chat-welcome { padding: 18px 0 6px; }
  .chat-mark { width: 44px; height: 44px; border-radius: 13px; font-size: 22px; margin-bottom: 12px; }
  .chat-welcome .chat-welcome-h { font-size: 1.9rem; margin-bottom: 10px; }
  .chat-welcome-body { font-size: .98rem; line-height: 1.5; }
  .chat-welcome-small { font-size: .84rem; }
  .chat-badges { margin-top: 14px; gap: 6px; }
  .chat-badges li { font-size: .74rem; padding: 5px 10px 5px 8px; }
  .chat-try { margin-top: 20px; }
  .chat-cards { gap: 8px; }
  .chat-card { min-height: 0; padding: 10px 12px; border-radius: 12px; gap: 3px; }
  .chat-card-q { font-size: .86rem; }
  .chat-follow-hint { font-size: .8rem; }
  /* (The conversation sits on the box, as a messaging app's does.) */
  .chat-log { margin-top: auto; }
  .chat-welcome:not([hidden]) + .chat-log { margin-top: 0; }
  .chat-asked { max-width: 86%; }
  .chat-answer { grid-template-columns: 28px minmax(0, 1fr); gap: 8px; }
  .chat-avatar { width: 28px; height: 28px; border-radius: 9px; font-size: 15px; }
  .chat-bubble { padding: 12px 14px 10px; }
  .chat-sentence { font-size: 1.02rem; }
  .chat-follow { padding-left: 36px; }
  .chat-dock { padding-top: 14px; padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
  .chat-form { padding-left: 16px; }
}
