/* whiff-term as a newspaper (the owner's decision of Nov. 19, 2026: the terminal and its public copy at
   thedailywhiff.com/term/ look like The Daily Whiff). The tokens are The Daily Whiff's own, newsprint.css copied
   as it is from the whiff repo (config/site/newsprint.css, commit 5b7e9d8); this file maps the terminal's tokens
   (style.css) onto them and restyles what a newspaper does differently: paper and ink instead of panels, rules
   instead of boxes, a nameplate, one column on a phone. The screens' code is the same; only the look changes.
   Morning edition by default, the night edition under prefers-color-scheme: dark, as on The Daily Whiff. */

/* Newsreader (SIL OFL 1.1, fonts/OFL-Newsreader.txt), variable: weight 200-800, optical size from the font size. */
@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 200 800; font-display: swap; src: url("fonts/newsreader-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: "Newsreader"; font-style: normal; font-weight: 200 800; font-display: swap; src: url("fonts/newsreader-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Newsreader"; font-style: italic; font-weight: 200 800; font-display: swap; src: url("fonts/newsreader-italic-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; }

/* ---------- the terminal's tokens, on paper ---------- */
:root {
  --bg: var(--np-paper);
  --surface-1: var(--np-sheet);
  --surface-2: var(--np-paper);
  --surface-sunk: color-mix(in srgb, var(--np-ink) 6%, var(--np-paper));
  --surface-hover: color-mix(in srgb, var(--np-ink) 5%, var(--np-paper));
  --line-1: var(--np-hair);
  --line-2: color-mix(in srgb, var(--np-ink) 45%, var(--np-paper));
  --line-3: color-mix(in srgb, var(--np-ink) 60%, var(--np-paper));

  --text-1: var(--np-ink);
  --text-2: color-mix(in srgb, var(--np-ink) 82%, var(--np-paper));
  --text-3: var(--np-muted);

  --accent: var(--np-spot-fill);
  --accent-text: var(--np-spot);
  --accent-ink: #fff;
  --accent-wash: color-mix(in srgb, var(--np-spot) 12%, transparent);

  /* meaning on paper: darker than the terminal's, each AA on --np-paper */
  --good: #2f6b35;
  --bad: #b3261e;
  --warn: #855600;
  --good-wash: color-mix(in srgb, var(--good) 10%, transparent);
  --bad-wash: color-mix(in srgb, var(--bad) 9%, transparent);
  --warn-wash: color-mix(in srgb, var(--warn) 10%, transparent);
  --live: #c62828;

  --heat-any: var(--np-ink);  /* all types together: an ink ramp on paper */

  /* the data voice is Archivo with tabular figures, as a paper's agate; the titles are Newsreader */
  --font-ui: var(--np-sans);
  --font-num: var(--np-sans);
  --font-serif: var(--np-serif);

  --gauge-1: color-mix(in srgb, var(--np-ink) 10%, var(--np-paper));
  --gauge-2: color-mix(in srgb, var(--np-ink) 18%, var(--np-paper));
  --gauge-3: color-mix(in srgb, var(--np-spot) 28%, var(--np-paper));
}
@media (prefers-color-scheme: dark) {
  :root {
    --good: #86c98a;
    --bad: #ef7a6e;
    --warn: #e3b04f;
    --live: #f0645a;
  }
}

html { color-scheme: light dark; }
body { font-variant-numeric: tabular-nums; }
.num, .n, td, .kv, .pb-v { font-variant-numeric: tabular-nums lining-nums; }

/* ---------- the masthead, as The Daily Whiff's (the owner, Nov. 19, 2026): the title small and centred between two
   ears, a double rule, the screens in spaced capitals between an ink line and a hairline, then the dateline; the
   player search and the command line under it ---------- */
.wt-top {
  position: static; height: auto; display: block; padding: 22px var(--margin) 0; border: 0; background: var(--np-paper);
}
.wt-plate {
  position: relative; display: flex; justify-content: center; align-items: center; min-height: 76px;
  border-bottom: var(--np-rule-heavy) solid var(--np-ink);
}
.wt-brand {
  font: 800 var(--np-title)/1 var(--np-serif); font-stretch: 100%; letter-spacing: -.028em; color: var(--np-ink);
  text-decoration: none; padding-bottom: 8px; white-space: nowrap;
}
.wt-brand:hover { color: var(--np-ink); }
.wt-ear {
  position: absolute; top: 0; width: 260px; margin: 0; display: flex; flex-direction: column; gap: 2px;
  font: 600 var(--np-sc-size)/1.5 var(--np-sans); letter-spacing: .055em; text-transform: uppercase; color: var(--np-ink);
}
.wt-ear.l { left: 0; padding-top: 6px; }
.wt-ear.r { right: 0; padding-top: 10px; text-align: right; }
.wt-ear .big { font: 700 1.625rem/1 var(--np-serif); font-stretch: 100%; letter-spacing: -.01em; text-transform: none; }
.wt-ear .spot { color: var(--np-spot); font-weight: 700; }
.wt-nav {
  display: flex; justify-content: center; gap: 0 34px; margin: var(--np-rule-gap) 0 0; padding: 0;
  border-top: var(--np-rule); border-bottom: var(--np-rule-hair);
}
.wt-nav a {
  height: 42px; padding: 0 2px; border-radius: 0; background: none;
  font: 600 1.125rem/1 var(--np-sans); font-stretch: var(--np-sans-stretch); letter-spacing: .133em; color: var(--np-ink);
}
.wt-nav a i { display: none; }  /* F1-F9 still work; the keys are on HELP */
.wt-nav a.is-pending { display: none; }
.wt-nav a:hover { background: none; color: var(--np-spot); }
.wt-nav a[aria-current="page"] { background: none; color: var(--np-spot); box-shadow: inset 0 -3px 0 var(--np-spot); }
.wt-dateline { display: flex; justify-content: space-between; gap: 4px 24px; border-bottom: var(--np-rule); }
.wt-dateline p {
  display: flex; flex-wrap: wrap; margin: 0; padding: 8px 0; font: 600 var(--np-sc-size)/1.5 var(--np-sans);
  letter-spacing: .07em; text-transform: uppercase; color: var(--np-muted);
}
.wt-dateline p > span + span::before { content: "·"; margin: 0 .6em; color: var(--np-hair); }
.wt-dateline b { color: var(--np-ink); font-weight: 700; }
.wt-facts { justify-content: flex-end; text-align: right; }
.wt-dateline .ph { display: none; }
.wt-dateline .spot { color: var(--np-spot); font-weight: 700; }
.wt-dateline a.wt-back { color: var(--np-ink); text-decoration: underline; text-decoration-color: var(--np-hair); text-underline-offset: 3px; }
.wt-dateline a.wt-back:hover { color: var(--np-spot); text-decoration-color: currentColor; }
.wt-tools { display: flex; align-items: center; gap: 12px 28px; padding: 10px 0; border-bottom: var(--np-rule-hair); }
.wt-find, .wt-cmd {
  position: relative; display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; margin: 0;
  background: var(--np-sheet); border: var(--np-rule-hair); border-radius: 0;
}
.wt-find { flex: 0 1 420px; }
.wt-cmd { flex: 1 1 420px; max-width: 620px; }
.wt-find label, .wt-cmd label {
  font: 600 var(--np-sc-size) var(--np-sans); letter-spacing: var(--np-sc-track); text-transform: uppercase;
  color: var(--np-spot); white-space: nowrap;
}
.wt-find input, .wt-cmd input {
  flex: 1; min-width: 0; height: 100%; border: 0; padding: 0; background: transparent; outline: none;
  font: 15px var(--np-sans); color: var(--np-ink);
}
.wt-find input::placeholder, .wt-cmd input::placeholder { color: var(--np-muted); }
.wt-find:focus-within, .wt-cmd:focus-within { border-color: var(--np-ink); box-shadow: 0 0 0 1px var(--np-ink); }
.wt-cmd label { font-size: 14px; letter-spacing: 0; }

/* the public site's one line when the numbers stop short of the schedule (the season over, games not in yet) */
.wt-notice {
  margin: 0; padding: 7px var(--margin); border-bottom: var(--np-rule-hair); text-align: center;
  font: italic 400 1rem/1.35 var(--np-serif); color: var(--np-ink);
}

/* the search's list of players under it */
#find-box .pk { left: -1px; right: -1px; width: auto; z-index: 30; background: var(--np-sheet); border: var(--np-rule); border-radius: 0; }
#find-box .pk a { grid-template-columns: minmax(0, 1fr) auto; height: 34px; border-radius: 0; font: 14px var(--np-sans); }
#find-box .pk a.is-sel { background: color-mix(in srgb, var(--np-spot) 9%, transparent); box-shadow: inset 3px 0 0 var(--np-spot); }
#find-box .pk a .m { font: 600 var(--np-sc-size) var(--np-sans); letter-spacing: var(--np-sc-track); color: var(--np-spot); }
.pk-none { padding: 8px 10px; font: 14px var(--np-sans); color: var(--np-muted); }

/* a screen's head as a story's: the kicker in the spot colour, the title, then the dek in italics */
.wt-unavail { margin: 0; font: italic 400 1rem/1.4 var(--np-serif); color: var(--np-muted); }
.wt-kicker { font: 600 var(--np-sc-size)/1.4 var(--np-sans); letter-spacing: var(--np-sc-track); text-transform: uppercase; color: var(--np-spot); }
.wt-dek { font: italic 400 1.125rem/1.4 var(--np-serif); color: var(--np-ink); max-width: 60rem; }
.home-head { flex-direction: column; align-items: flex-start; gap: 4px; min-height: 0; padding-bottom: 12px; }
.home-head .wt-name { font-size: 2.5rem; }
.pn.s4 .pn-h { flex-wrap: wrap; row-gap: 2px; }
.pn.s4 .pn-n { flex-basis: 100%; margin-left: 0; white-space: normal; }

/* ---------- the status line: the paper's foot ---------- */
.wt-status { background: var(--np-paper); border-top: var(--np-rule); font-family: var(--np-sans); color: var(--np-muted); }
.wt-status b { color: var(--np-ink); font-weight: 600; }
#help-toggle { font-family: var(--np-sans); }

/* ---------- the page: titles in Newsreader, sections under an ink rule instead of boxes ---------- */
main { padding-top: 14px; }
.grid { column-gap: var(--np-gutter-sm, 28px); row-gap: 22px; }
.wt-head { min-height: 48px; padding-bottom: 6px; border-bottom: var(--np-rule); }
.wt-name { font: 700 2rem/1.05 var(--np-serif); font-stretch: 100%; letter-spacing: -.02em; }
.wt-name .vs { font-style: italic; font-weight: 400; }
.wt-meta { font-family: var(--np-sans); }

.pn, .pn.t1, .pn.t3 {
  --pn-bg: var(--np-paper); background: transparent; border: 0; border-top: var(--np-rule-head); border-radius: 0;
}
.pn.t1 { border-top-width: 3px; }
.pn-h, .pn.t3 .pn-h { padding: 7px 0 6px; border-bottom: var(--np-rule-hair); }
.pn-t, .pn.t1 .pn-t, .pn.t3 .pn-t {
  font: 600 var(--np-sc-size) var(--np-sans); letter-spacing: var(--np-sc-track); color: var(--np-ink);
}
.pn.t1 .pn-t { font: 700 1.25rem/1.15 var(--np-serif); font-stretch: 100%; letter-spacing: -.01em; text-transform: none; }
.pn-n { font-family: var(--np-sans); color: var(--np-muted); }
.pn-b, .pn.t3 .pn-b { padding: 8px 0 10px; }
.pn-b.flush, .pn.t3 .pn-b.flush { padding: 0 0 4px; }
.pn-foot, .pn.t3 .pn-foot { padding: 6px 0 8px; border-top: var(--np-rule-hair); }
.pn.is-error { border-top-color: var(--bad); }
.empty { padding-left: 0; }

/* tables: agate, rules not fills */
th { background: var(--np-paper); font-family: var(--np-sans); color: var(--np-muted); border-bottom: var(--np-rule); }
td { border-bottom-color: var(--np-hair); }
td.pl, td.pl a { font-family: var(--np-sans); }
tbody tr.grp td { color: var(--np-ink); border-bottom: var(--np-rule); }
tbody tr.is-new td { background: color-mix(in srgb, var(--np-spot) 8%, transparent); }
td.hc.same::after { box-shadow: inset 0 0 0 1px var(--np-muted); }

/* what was drawn in chalk on graphite, in ink on paper */
.hm .sz { stroke: var(--np-ink); stroke-opacity: .85; }
.hm .sz-shadow { stroke: var(--np-paper); stroke-opacity: .7; }
.zone-grid .in { background: var(--np-paper); outline-color: var(--np-ink); }
.sg-tr > i { background: var(--gauge-1); }
.sg-tr > i:nth-child(2) { background: var(--gauge-2); }
.sg-tr > i:nth-child(3) { background: var(--gauge-3); }
.pb-m, .sg-v { box-shadow: 0 0 0 1px var(--np-paper); }
.rng-th { box-shadow: 0 0 0 2px var(--np-paper); }
.mode.live { background: var(--np-ink); color: var(--np-paper); }
.banner { border-radius: 0; color: var(--np-ink); }
.banner.good { background: var(--good-wash); border-color: var(--good); }
.banner.bad { background: var(--bad-wash); border-color: var(--bad); }
.banner.warn { background: var(--warn-wash); border-color: var(--warn); }
.vd, .tag, .btn, .sn a, .kbd, kbd, .pk, .pk a, .mode, .hm-empty { border-radius: 0; }
.btn { background: var(--np-sheet); }
.sn a { font-family: var(--np-sans); }
#tip { background: var(--np-sheet); color: var(--np-ink); border: var(--np-rule); border-radius: 0; box-shadow: 0 6px 18px var(--np-shadow); }
.pk { box-shadow: 0 8px 24px var(--np-shadow); }
.answer .num { font-family: var(--np-serif); font-stretch: 100%; }

/* ---------- a phone or a narrow window: one column, the page scrolls down, never sideways ---------- */
@media (max-width: 999px) {
  body { min-width: 0; }
  .wt-top { padding-top: 14px; }
  .wt-plate { min-height: 0; }
  .wt-brand { font-size: var(--np-title-phone); padding-bottom: 10px; }
  .wt-ear { display: none; }
  .wt-dateline .ph { display: inline; }
  .wt-nav { justify-content: flex-start; gap: 0 22px; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
  .wt-nav::-webkit-scrollbar { display: none; }
  .wt-nav a { flex: 0 0 auto; height: 42px; font-size: 1rem; }
  .wt-dateline { flex-direction: column; gap: 0; }
  .wt-dateline p { padding: 6px 0; }
  .wt-date { padding-bottom: 0 !important; }
  .wt-facts { justify-content: flex-start; text-align: left; }
  .wt-tools { flex-direction: column; align-items: stretch; gap: 8px; }
  .wt-find, .wt-cmd { flex: 0 0 auto; max-width: none; height: 40px; }
  .wt-cmd .k-idle, .wt-cmd .k-act { display: none !important; }
  .wt-cmd-err { white-space: normal; right: -1px; }
  .wt-status { position: static; flex-wrap: wrap; height: auto; gap: 4px 14px; padding: 8px var(--margin); white-space: normal; }
  .wt-status .end { margin-left: 0; }
  main { padding-left: var(--margin); padding-right: var(--margin); }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .grid > * { grid-column: 1 / -1 !important; }
  .wt-head { flex-wrap: wrap; gap: 6px 12px; }
  .wt-name, .wt-meta { white-space: normal; }
  .wt-head .sn { margin-left: 0; flex-wrap: wrap; }
  .kp { flex-wrap: wrap; row-gap: 10px; }
  .kp > div { flex: 1 1 140px; }
  .kv, .ks, .kl { white-space: normal; }
  .cal, .mixes { grid-template-columns: minmax(0, 1fr); }
  .pk { width: min(420px, calc(100vw - 24px)); }
  .heats { gap: 12px; }
  .rp { flex-wrap: wrap; }
  .rp-keys { display: none; }
  .pn-h { flex-wrap: wrap; }
  .pn-t, .pn.t1 .pn-t { white-space: normal; }
  .pn-b [style*="width:"] { max-width: 100%; }  /* blocks the screens size in pixels (DATA's KPI row) */
  .pn-b [style*="grid-template-columns"] { grid-template-columns: minmax(0, 1fr) !important; }  /* their side by side, stacked */
  .pn-n { white-space: normal; margin-left: 0; }
  /* inline flex rows the screens draw (LIVE's strip, BRF's head) wrap instead of running off the page */
  .grid > section > div[style*="display:flex"], .grid > div[style*="display:flex"] { flex-wrap: wrap; }
  td.wrap { min-width: 200px; }
}

/* the columns a narrow page leaves out (ui.table's o1 and o2): the details behind the main number, never the
   number or its sample */
@media (max-width: 999px) { th.o1, td.o1 { display: none; } }
@media (max-width: 599px) {
  th.o2, td.o2, th.cic, td.cic { display: none; }  /* an interval's drawing too: its numbers stay */
  td.pl, td.l { white-space: normal; }
  .sg.inline .sg-tr { width: 48px; }
  td, th { padding-left: 5px; padding-right: 5px; }
}
/* a phone: the screen's content first, so the masthead keeps the title, the menu, the day and the search; the
   command line and the counts (also in the foot) are for a keyboard and a wider page */
@media (max-width: 599px) {
  .wt-cmd, .wt-facts { display: none !important; }
  .wt-tools { padding: 8px 0; }
}
@media (max-width: 399px) { td, th { padding-left: 3px; padding-right: 3px; } .cb > span:first-child { width: 40px; } }

/* from one screen to the next (app.js, View Transitions): a short cross-fade of the page under a still masthead,
   and the clicked player's name moving into his screen's heading; nothing moves for a reader who asks for less */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 160ms; animation-timing-function: ease-out; }
::view-transition-group(wt-player) { animation-duration: 260ms; animation-timing-function: cubic-bezier(.2, .7, .2, 1); }
::view-transition-old(wt-player), ::view-transition-new(wt-player) { height: 100%; width: auto; object-fit: none; object-position: left center; }
.wt-top { view-transition-name: wt-masthead; }
::view-transition-group(wt-masthead) { animation: none; }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* the paper on a printer: no controls, ink on white */
@media print {
  .wt-cmd, .wt-nav, .wt-status, #tip, .rp, .sn .keys { display: none !important; }
  body { min-width: 0; background: #fff; }
  .wt-top { position: static; }
}
