/*
  NoHitter components. Requires tokens.css.
  Class names are prefixed nh- and written as blocks (nh-ticket) with elements
  (nh-ticket__stub) and modifiers (nh-cap--xl). State classes: is-mine, is-win,
  is-loss, is-dirty. Team colours arrive as inline custom properties:
  style="--c1:#25224f;--c2:#f2b632". The web app (web/src) writes this markup.
*/

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body.nh {
  --nh-surface: var(--nh-paper-1);
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--nh-paper-1);
  /* paper grain */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .09 0 0 0 0 .13 0 0 0 0 .1 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color: var(--nh-ink-1);
  font: 400 var(--nh-fs-body)/var(--nh-lh-body) var(--nh-font-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, p, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
b, strong { font-weight: 700; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--nh-stitch-ink); }

:focus-visible { outline: 3px solid var(--nh-stitch); outline-offset: 2px; }
.nh-board :focus-visible, .nh-masthead :focus-visible { outline-color: var(--nh-lamp); }

abbr[title] { text-decoration: none; cursor: help; }
.nh-nowrap { white-space: nowrap; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.nh-skip {
  position: absolute; left: var(--nh-s3); top: -60px; z-index: 20;
  padding: var(--nh-s2) var(--nh-s3); background: var(--nh-lamp); color: var(--nh-ink-1);
  font-weight: 700; text-decoration: none;
}
.nh-skip:focus { top: var(--nh-s3); }

/* ------------------------------------------------------------------ layout */
.nh-page {
  flex: 1;
  width: 100%;
  max-width: var(--nh-page-max);
  margin: 0 auto;
  padding: var(--nh-s5) var(--nh-gutter) var(--nh-s8);
  display: grid;
  gap: var(--nh-s7);
  align-content: start;
}
.nh-page--wide { max-width: var(--nh-page-wide); }

/* Grid children may shrink, so wide tables scroll inside their wrapper instead of widening the page. */
.nh-page > *, .nh-split > *, .nh-stack > *, .nh-trio > *, .nh-box > *, .nh-standings-grid > *,
.nh-press__items > *, .nh-books > *, .nh-player > *, .nh-scout__cols > * { min-width: 0; }
.nh-split { display: grid; gap: var(--nh-s6); align-items: start; }
.nh-stack { display: grid; gap: var(--nh-s5); align-content: start; }
.nh-stack--loose { gap: var(--nh-s7); }
.nh-trio { display: grid; gap: var(--nh-s6) var(--nh-s5); align-items: start; }

@media (min-width: 760px) {
  .nh-trio { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1160px) {
  .nh-trio { grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr) minmax(0, 1.15fr); }
}

@media (max-width: 999px) {
  /* On a phone the owner's next game (the thing to act on) comes before the league's finals. */
  .nh-split--home > .nh-ticket { order: -1; }
}

@media (min-width: 1000px) {
  .nh-split { grid-template-columns: minmax(0, 1fr) 380px; }
  .nh-split--wide-right { grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); }
}

/* ------------------------------------------------------------------ masthead */
.nh-masthead {
  position: relative;
  background-color: var(--nh-board-1);
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(0, 0, 0, 0.1)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color: var(--nh-chalk-1);
  border-bottom: 3px solid var(--nh-board-3);
}

.nh-masthead__inner {
  max-width: var(--nh-page-max);
  margin: 0 auto;
  padding: var(--nh-s2) var(--nh-gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: var(--nh-s5);
  row-gap: var(--nh-s1);
  min-height: 68px;
}

.nh-wordmark {
  position: relative;
  display: inline-block;
  padding: 0 6px 10px 0;
  color: var(--nh-chalk-1);
  font: 400 2.15rem/1 var(--nh-font-script);
  text-decoration: none;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
  white-space: nowrap;
}
.nh-wordmark::after {
  /* the script's tail swash, like a jersey underline */
  content: '';
  position: absolute;
  left: 18%;
  right: -4px;
  bottom: 1px;
  height: 11px;
  background: var(--nh-lamp);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 22' preserveAspectRatio='none'%3E%3Cpath d='M0 19 C 60 14 130 8 200 1 C 150 12 80 20 0 22 Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 22' preserveAspectRatio='none'%3E%3Cpath d='M0 19 C 60 14 130 8 200 1 C 150 12 80 20 0 22 Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.nh-wordmark:hover { color: var(--nh-chalk-1); }

.nh-nav, .nh-nav__group { display: flex; gap: 2px; }
.nh-nav { flex-wrap: wrap; }          /* narrower than the page, the groups wrap rather than run off it */
/* a hairline between the groups of tabs: the games, running the club, the market, the admin */
.nh-nav__group + .nh-nav__group::before { content: ''; flex: none; align-self: center; width: 1px; height: 20px; margin: 0 5px; background: var(--nh-chalk-2); opacity: 0.35; }
.nh-nav a {
  display: block;
  flex: none;
  white-space: nowrap;
  padding: 10px 6px 8px;               /* fourteen tabs and the club's badge on one line at the page's width */
  color: var(--nh-chalk-2);
  font: 700 1rem/1 var(--nh-font-display);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: var(--nh-r-1);
}
.nh-nav a:hover { color: var(--nh-chalk-1); background: rgba(255, 255, 255, 0.06); }
.nh-nav a[aria-current='page'] { color: var(--nh-chalk-1); box-shadow: inset 0 -3px 0 var(--nh-lamp); }
.nh-nav a.nh-nav__market, .nh-nav a.nh-nav__market:hover { color: var(--nh-lamp); }   /* the market, lit up */

.nh-club {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: var(--nh-s2);
  padding: 5px 12px 5px 5px;
  background: var(--nh-board-3);
  border: 1px solid var(--nh-board-edge);
  border-radius: var(--nh-r-1);
  color: var(--nh-chalk-1);
  text-decoration: none;
  box-shadow: var(--nh-shadow-plate);
}
.nh-club:hover { color: var(--nh-chalk-1); border-color: rgba(255, 201, 60, 0.5); }
.nh-club__abbr { font: 800 1.2rem/1 var(--nh-font-display); letter-spacing: 0.06em; }
.nh-club__rec { font: 600 var(--nh-fs-small)/1 var(--nh-font-data); color: var(--nh-chalk-2); font-variant-numeric: tabular-nums; }

.nh-strip {
  background: var(--nh-board-2);
  color: var(--nh-chalk-2);
  border-bottom: 1px solid rgba(0, 0, 0, 0.3);
  font: 600 var(--nh-fs-label)/1 var(--nh-font-data);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.nh-strip__inner {
  max-width: var(--nh-page-max);
  margin: 0 auto;
  padding: 7px var(--nh-gutter);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
}
.nh-strip__live { color: var(--nh-chalk-1); }
.nh-strip__live::before,
.nh-strip__paused::before {
  content: '';
  display: inline-block;
  width: 7px; height: 7px;
  margin: 0 7px 1px 0;
  border-radius: 50%;
  background: var(--nh-lamp);
  box-shadow: 0 0 6px var(--nh-lamp);
}
/* Late: the bulb goes red (the banner under the strip says why). Paused: an unlit bulb. */
.nh-strip__live.is-late::before { background: var(--nh-stitch); box-shadow: 0 0 6px var(--nh-stitch); }
.nh-strip__now { display: contents; }
.nh-strip__onair { color: var(--nh-chalk-1); text-decoration: none; }
.nh-strip__onair::before { content: ''; margin: 0 7px 1px 0; }
.nh-strip__paused { color: var(--nh-chalk-1); }
.nh-strip__paused::before { background: none; box-shadow: inset 0 0 0 1px var(--nh-chalk-2); }

/* Too narrow for the menu between the wordmark and the club: the menu takes a row of its own under them. */
@media (max-width: 1229px) {
  .nh-nav { order: 3; flex: 1 1 100%; }
}
@media (max-width: 719px) {
  .nh-masthead__inner { column-gap: var(--nh-s3); padding-top: var(--nh-s2); padding-bottom: 0; }
  .nh-wordmark { font-size: 1.85rem; }
  .nh-nav { order: 3; flex: 1 1 100%; flex-wrap: nowrap; margin: 0 calc(var(--nh-gutter) * -1); padding: 0 calc(var(--nh-gutter) - 12px); overflow-x: auto; scrollbar-width: none; }
  .nh-nav a { padding: 12px 12px 10px; }
  .nh-strip__inner { gap: 4px 12px; }
}

/* ------------------------------------------------------------------ type helpers */
.nh-eyebrow {
  font: 600 var(--nh-fs-label)/1.2 var(--nh-font-data);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--nh-stitch-ink);
}
.nh-eyebrow a { text-decoration: none; }
.nh-eyebrow a:hover { text-decoration: underline; }

.nh-title {
  font: 800 var(--nh-fs-h1)/0.95 var(--nh-font-display);
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.nh-title--h2 { font-size: var(--nh-fs-h2); }   /* where the page below needs the screen: a broadcast */

.nh-pagehead { display: grid; gap: var(--nh-s2); }
.nh-pagehead--split { grid-template-columns: minmax(0, 1fr) auto; align-items: end; column-gap: var(--nh-s5); }
.nh-pagehead--split > :not(.nh-ladder) { grid-column: 1; }
/* The ladder beside a level's name: its levels top first, this one lit, the rest a click away. */
.nh-ladder { grid-column: 2; grid-row: 1 / span 2; display: grid; gap: 6px; min-width: 128px; }
.nh-ladder ol { display: grid; gap: 4px; }
.nh-ladder__rung > a, .nh-ladder__rung > span {
  display: block;
  padding: 4px 10px;
  border: 1.5px solid var(--nh-rule-2);
  font: 700 var(--nh-fs-label)/1.2 var(--nh-font-data);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  color: var(--nh-ink-2);
}
.nh-ladder__rung > a:hover { border-color: var(--nh-board-1); color: var(--nh-ink-1); }
.nh-ladder__rung.is-here > a { background: var(--nh-board-1); border-color: var(--nh-board-1); color: var(--nh-chalk-1); }
.nh-ladder__rung.is-opening > span { border-style: dashed; color: var(--nh-ink-3); }
.nh-ladder__rung small { display: block; margin-top: 2px; font: 400 var(--nh-fs-label)/1.2 var(--nh-font-data); color: var(--nh-ink-3); text-align: center; }
.nh-ladder__all { font: 700 var(--nh-fs-label)/1.2 var(--nh-font-data); letter-spacing: 0.1em; text-transform: uppercase; text-align: center; }
@media (max-width: 559px) { .nh-ladder { min-width: 104px; } }

/* Newspaper section rule: thick over thin, title set in the gothic. */
.nh-section-head {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--nh-s1) var(--nh-s4);
  padding-top: 10px;
  margin-bottom: var(--nh-s4);
  border-top: 3px solid var(--nh-ink-1);
}
.nh-section-head::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 2px;
  border-top: 1px solid var(--nh-ink-1);
}
.nh-section-head h2 {
  font: 800 var(--nh-fs-h2)/1 var(--nh-font-display);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.nh-section-head__meta {
  font: 600 var(--nh-fs-label)/1.2 var(--nh-font-data);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--nh-ink-3);
}
.nh-section-head__meta a { color: var(--nh-ink-1); }

.nh-subhead {
  font: 700 var(--nh-fs-label)/1.2 var(--nh-font-data);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--nh-ink-2);
  padding-bottom: 6px;
  margin-bottom: 2px;
  border-bottom: 1px solid var(--nh-rule-2);
}

/* ------------------------------------------------------------------ team marks */
.nh-cap {
  --size: 26px;
  flex: none;
  display: inline-grid;
  place-items: center;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: var(--c1, var(--nh-ink-1));
  color: var(--c2, var(--nh-paper-0));
  box-shadow: 0 0 0 1.5px var(--nh-paper-0), 0 0 0 2.5px rgba(22, 33, 27, 0.25);
  font: 900 calc(var(--size) * 0.62)/1 var(--nh-font-display);
  text-transform: uppercase;
  padding-top: calc(var(--size) * 0.04);
}
.nh-cap--sm { --size: 20px; }
.nh-cap--md { --size: 34px; }
.nh-cap--lg { --size: 52px; box-shadow: 0 0 0 3px var(--nh-paper-0), 0 3px 8px rgba(0, 0, 0, 0.25); }
.nh-cap--xl { --size: 92px; box-shadow: 0 0 0 4px var(--c2), 0 0 0 6px var(--c1), 0 6px 16px rgba(0, 0, 0, 0.3); }
.nh-board .nh-cap { box-shadow: 0 0 0 1.5px rgba(241, 239, 228, 0.55); }

.nh-teamlink {
  display: inline-flex;
  align-items: center;
  gap: var(--nh-s2);
  text-decoration: none;
  font-weight: 600;
  min-width: 0;
}
.nh-teamlink:hover .nh-teamlink__name { text-decoration: underline; }
.nh-teamlink__nick { font-weight: 400; color: var(--nh-ink-2); }

/* ------------------------------------------------------------------ scoreboard */
.nh-board {
  --nh-surface: var(--nh-board-1);
  position: relative;
  color: var(--nh-chalk-1);
  background-color: var(--nh-board-1);
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(0, 0, 0, 0.14)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .25 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  border: 5px solid var(--nh-board-3);
  border-radius: var(--nh-r-1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), var(--nh-shadow-lift);
  padding: var(--nh-s4) var(--nh-s4) var(--nh-s5);
}
.nh-board a { color: inherit; }

.nh-board__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--nh-s1) var(--nh-s4);
  padding-bottom: var(--nh-s3);
  margin-bottom: var(--nh-s4);
  border-bottom: 2px solid rgba(241, 239, 228, 0.28);
}
.nh-board__title {
  font: 800 1.65rem/1 var(--nh-font-display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--nh-chalk-1);
}
.nh-board__sub {
  font: 600 var(--nh-fs-label)/1.2 var(--nh-font-data);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--nh-chalk-2);
}

/* A hung number plate: painted steel with two hanging holes. */
.nh-plate {
  position: relative;
  display: inline-grid;
  place-items: center;
  min-width: 1.7em;
  height: 1.95em;
  padding: 0.12em 0.22em 0;
  background: linear-gradient(180deg, #14301f, var(--nh-board-3) 55%);
  color: var(--nh-chalk-1);
  border-radius: var(--nh-r-1);
  box-shadow: var(--nh-shadow-plate);
  font: 800 1.3rem/1 var(--nh-font-display);
  font-variant-numeric: lining-nums;
}
.nh-plate::before {
  content: '';
  position: absolute;
  top: 3px; left: 50%;
  width: 14px; height: 3px;
  margin-left: -7px;
  background:
    radial-gradient(circle, rgba(0, 0, 0, 0.75) 0 1.2px, transparent 1.6px) 0 0 / 3px 3px no-repeat,
    radial-gradient(circle, rgba(0, 0, 0, 0.75) 0 1.2px, transparent 1.6px) 11px 0 / 3px 3px no-repeat;
}
.nh-plate.is-lit { color: var(--nh-lamp); }
.nh-plate.is-blank { color: var(--nh-chalk-2); opacity: 0.55; }
.nh-plate.is-dim { color: var(--nh-chalk-2); }

/* Yesterday's finals, laid out like an out-of-town scoreboard. */
.nh-finals {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--nh-s3);
}
.nh-final__link {
  display: grid;
  gap: 5px;
  padding: 9px 10px 8px;
  background: rgba(0, 0, 0, 0.16);
  border: 1px solid var(--nh-board-edge);
  border-radius: var(--nh-r-1);
  text-decoration: none;
  transition: background 0.15s var(--nh-ease), border-color 0.15s var(--nh-ease);
}
.nh-final__link:hover { background: rgba(0, 0, 0, 0.3); border-color: rgba(241, 239, 228, 0.35); color: inherit; }
.nh-final__row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.nh-final__abbr {
  font: 700 1.2rem/1 var(--nh-font-display);
  letter-spacing: 0.08em;
  color: var(--nh-chalk-2);
}
.nh-final__row.is-winner .nh-final__abbr { color: var(--nh-chalk-1); }
.nh-final__row .nh-plate { min-width: 1.75em; font-size: 1.2rem; }
.nh-final__status {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2px 6px;
  white-space: nowrap;
  padding-top: 5px;
  border-top: 1px solid var(--nh-board-edge);
  font: 600 var(--nh-fs-label)/1 var(--nh-font-data);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--nh-chalk-2);
}
.nh-final__flag { color: var(--nh-lamp); }
.nh-final.is-mine .nh-final__link { border-color: rgba(255, 201, 60, 0.75); box-shadow: inset 3px 0 0 var(--nh-lamp); }

/* Line score. */
/* The plates' spacing is taken back at the wrapper's top and bottom, not the table's: a table pulled
   up inside the scroller clipped the inning numbers and gave the scroller a vertical bar. */
.nh-linescore-wrap { overflow-x: auto; overflow-y: hidden; margin: -6px calc(var(--nh-s2) * -1); padding: 0 var(--nh-s2); }
.nh-linescore { border-collapse: separate; border-spacing: 5px 6px; margin: 0 -5px; }
.nh-linescore thead th {
  padding: 0 0 2px;
  font: 700 1rem/1 var(--nh-font-display);
  letter-spacing: 0.06em;
  color: var(--nh-chalk-2);
  text-align: center;
}
.nh-linescore tbody th { text-align: left; padding-right: var(--nh-s3); white-space: nowrap; }
.nh-linescore td { padding: 0; }
.nh-linescore .nh-plate { width: 100%; min-width: 2.6rem; height: 3.2rem; font-size: 2.1rem; }
.nh-linescore .rhe .nh-plate { min-width: 3rem; }
/* The half-inning being played, ringed in the lamp's colour (Rob: "put an outline on the top/bottom inning of
   where we currently are .. just so it's really easy to look quickly"). */
/* Inside the plate: the line score's wrap hides what overflows it, and cut a ring outside off at the
   bottom row (Rob: "the rectangle around the 0 in the 9th inning .. seems like it's cutoff"). */
.nh-linescore td.is-now .nh-plate { box-shadow: inset 0 0 0 2px var(--nh-lamp), 0 0 8px rgb(255 201 60 / 0.45); }
.nh-linescore .gap { width: 10px; }
.nh-linescore__team { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.nh-linescore__abbr { font: 800 2.1rem/1 var(--nh-font-display); letter-spacing: 0.05em; }
.nh-linescore__rec { display: block; font: 600 var(--nh-fs-label)/1.2 var(--nh-font-data); letter-spacing: 0.08em; color: var(--nh-chalk-2); text-transform: uppercase; }
@media (max-width: 1099px) { .nh-linescore__nick { display: none; } }
@media (max-width: 1099px) {
  .nh-linescore .nh-plate { min-width: 2rem; height: 2.6rem; font-size: 1.6rem; }
  .nh-linescore .rhe .nh-plate { min-width: 2.3rem; }
}
@media (max-width: 560px) {
  /* The club column stays put while a long game's innings scroll past it. */
  .nh-linescore th:first-child { position: sticky; left: 0; z-index: 1; background: var(--nh-board-1); }
  .nh-linescore-wrap { margin-top: -5px; margin-bottom: -5px; }
  .nh-linescore { border-spacing: 3px 5px; margin: 0 -3px; }
  .nh-linescore .nh-plate { min-width: 1.15rem; height: 2.05rem; font-size: 1.1rem; padding: 0.16em 0.06em 0; }
  .nh-linescore .nh-plate::before { display: none; }
  .nh-linescore .rhe .nh-plate { min-width: 1.45rem; }
  .nh-linescore thead th { font-size: 0.8rem; }
  .nh-linescore tbody th { padding-right: 2px; }
  .nh-linescore__abbr { font-size: 1.2rem; }
  .nh-linescore__rec { font-size: 0.6875rem; letter-spacing: 0.02em; }
  .nh-linescore__team { gap: 6px; }
  .nh-linescore__team .nh-cap { display: none; }
  .nh-linescore .gap { width: 0; }
}

/* ------------------------------------------------------------------ tables */
.nh-table-wrap { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; }   /* relative: holds in the visually hidden labels of forms in its cells */
.nh-table {
  width: 100%;
  border-collapse: collapse;
  font: 500 var(--nh-fs-data)/1.25 var(--nh-font-data);
  font-variant-numeric: tabular-nums lining-nums;
}
.nh-table caption { text-align: left; }
.nh-table th, .nh-table td {
  padding: 7px 8px;
  border-bottom: 1px solid var(--nh-rule-1);
  text-align: right;
  white-space: nowrap;
  background: var(--row-bg, var(--nh-surface));
}
.nh-table thead th {
  padding-top: 4px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--nh-ink-1);
  font: 600 var(--nh-fs-label)/1.2 var(--nh-font-data);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nh-ink-3);
  vertical-align: bottom;
}
.nh-table .l { text-align: left; }
.nh-table .c { text-align: center; }
.nh-table tbody th { font-weight: 600; }
.nh-table tbody tr:hover { --row-bg: var(--nh-paper-2); }
.nh-table tbody tr.is-mine { --row-bg: var(--nh-highlight); }
.nh-table tbody tr.is-mine:hover { --row-bg: #f6e282; }
.nh-table tfoot td, .nh-table tfoot th { font-weight: 700; border-top: 2px solid var(--nh-ink-1); border-bottom: 0; }
.nh-table .div { border-left: 1px solid var(--nh-rule-2); }
.nh-table .muted { color: var(--nh-ink-3); }
.nh-table a { text-decoration: none; }
.nh-table a:hover { text-decoration: underline; }
.nh-table--sticky th:first-child, .nh-table--sticky td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  box-shadow: 1px 0 0 var(--nh-rule-1);
}
.nh-table--compact th, .nh-table--compact td { padding: 5px 6px; }
.nh-table tr.nh-table__group th {
  padding-top: var(--nh-s4);
  border-bottom: 1px solid var(--nh-ink-1);
  font: 700 var(--nh-fs-label)/1.2 var(--nh-font-data);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--nh-ink-2);
  text-align: left;
}
.nh-table tr.nh-table__group:hover { --row-bg: var(--nh-surface); }

.nh-table-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--nh-s2);
  font: 800 var(--nh-fs-h3)/1.1 var(--nh-font-display);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: var(--nh-s2);
}
.nh-table-title small {
  font: 600 var(--nh-fs-label)/1 var(--nh-font-data);
  letter-spacing: 0.1em;
  color: var(--nh-ink-3);
}

/* Standings */
.nh-standings-grid { display: grid; gap: var(--nh-s6) var(--nh-s5); }
@media (min-width: 900px) { .nh-standings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* The news (docs/life.md): a wire of short items, each with its kind. */
.nh-news { display: grid; gap: 0; }
.nh-news__item {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr) auto;
  gap: var(--nh-s1) var(--nh-s3);
  align-items: baseline;
  padding: var(--nh-s2) 0;
  border-bottom: 1px solid var(--nh-rule-1);
}
.nh-news__kind { font: 700 var(--nh-fs-label)/1.2 var(--nh-font-data); letter-spacing: 0.1em; text-transform: uppercase; color: var(--nh-ink-3); }
.nh-news__item--champion .nh-news__kind, .nh-news__item--award .nh-news__kind, .nh-news__item--hall .nh-news__kind { color: var(--nh-win); }
.nh-news__item--record .nh-news__kind, .nh-news__item--milestone .nh-news__kind { color: var(--nh-caution); }
.nh-news__item--injury .nh-news__kind { color: var(--nh-stitch-ink); }
.nh-news__when { font: 400 var(--nh-fs-small)/1.2 var(--nh-font-data); color: var(--nh-ink-3); white-space: nowrap; }
@media (max-width: 559px) {
  .nh-news__item { grid-template-columns: minmax(0, 1fr); }
}
/* What an owner missed: a slip on top of the league page. */
.nh-digest {
  display: grid;
  gap: var(--nh-s2);
  padding: var(--nh-s4);
  background: var(--nh-paper-0);
  border: 1px solid var(--nh-rule-2);
  border-left: 4px solid var(--nh-lamp);
}
.nh-digest__head { display: flex; flex-wrap: wrap; gap: var(--nh-s3); align-items: center; justify-content: space-between; }
.nh-digest__head h2 { font: 800 var(--nh-fs-h3)/1.1 var(--nh-font-display); text-transform: uppercase; }
/* Leaders: small boards side by side. */
.nh-leaders { display: grid; gap: var(--nh-s4) var(--nh-s5); grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.nh-leaders--positions { grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); }   /* a race at each position, four across: room for the names */
.nh-leaders__list { display: grid; gap: 0; counter-reset: place; }
/* A board's row (leaders.ts row): the place, the headshot, the name over the club, the number; every row
   the same height, so the board reads straight down. */
.nh-leaders__list li {
  display: grid;
  grid-template-columns: 1.5rem 40px minmax(0, 1fr) auto;
  grid-template-areas: "place face name value" "place face club value";
  column-gap: var(--nh-s3);
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--nh-rule-1);
  counter-increment: place;
}
.nh-leaders__list li::before { grid-area: place; content: counter(place); font: 700 var(--nh-fs-small)/1.2 var(--nh-font-data); color: var(--nh-ink-3); }
.nh-leaders__list--mine li { grid-template-columns: 2.5rem 40px minmax(0, 1fr) auto; }
.nh-leaders__list--mine li::before { content: attr(data-rank); }   /* My club: each one's place in the league */
.nh-leaders__face { grid-area: face; display: block; width: 40px; height: 40px; }
.nh-leaders__name { grid-area: name; align-self: end; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.nh-leaders__club { grid-area: club; align-self: start; font-size: var(--nh-fs-small); color: var(--nh-ink-3); }
.nh-leaders__list b { grid-area: value; font: 700 var(--nh-fs-data)/1.2 var(--nh-font-data); font-variant-numeric: tabular-nums; }
/* A season's postseason and awards. */
.nh-series { display: grid; gap: 0; }
.nh-series li { display: grid; grid-template-columns: 11rem minmax(0, 1fr) auto; gap: var(--nh-s3); align-items: baseline; padding: var(--nh-s1) 0; border-bottom: 1px solid var(--nh-rule-1); }
.nh-series__round, .nh-series__won { font: 400 var(--nh-fs-small)/1.2 var(--nh-font-data); color: var(--nh-ink-3); }
@media (max-width: 559px) { .nh-series li { grid-template-columns: minmax(0, 1fr); } }
.nh-honours { display: grid; gap: var(--nh-s2); grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); }
.nh-honours dt { font: 700 var(--nh-fs-label)/1.2 var(--nh-font-data); letter-spacing: 0.1em; text-transform: uppercase; color: var(--nh-ink-3); }
.nh-honours small { display: block; color: var(--nh-ink-3); }
.nh-champion { font: 800 var(--nh-fs-h3)/1.1 var(--nh-font-display); text-transform: uppercase; }
.nh-awards { display: flex; flex-wrap: wrap; gap: var(--nh-s2) var(--nh-s4); font: 700 var(--nh-fs-small)/1.3 var(--nh-font-data); color: var(--nh-win); }
/* The ladder page: a level a column, and every season's moves. */
.nh-ladder-grid { display: grid; gap: 0 var(--nh-s5); }
@media (min-width: 900px) { .nh-ladder-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.nh-moves { display: grid; gap: var(--nh-s4); }
.nh-moves p { margin-top: var(--nh-s1); }
.nh-moves small { color: var(--nh-ink-3); }
.nh-table--standings .rank {
  width: 30px;
  padding-left: 10px;
  text-align: left;
  color: var(--nh-ink-3);
  font-weight: 600;
}
.nh-table--standings tr.zone-playoff .rank { box-shadow: inset 4px 0 0 var(--nh-win); color: var(--nh-win); }
/* A club's place on the ladder, after its name: up, the relegation series, down. */
.nh-rung { margin-left: 6px; font-size: 0.7em; vertical-align: 1px; }
.nh-rung--up { color: var(--nh-win); }
.nh-rung--series { color: var(--nh-caution); }
.nh-rung--down { color: var(--nh-stitch-ink); }
.nh-table--standings tr.cutline td, .nh-table--standings tr.cutline th { border-bottom: 2px dashed var(--nh-rule-2); }
.nh-table--standings .team { width: 100%; }
.nh-table--standings .strk-w { color: var(--nh-win); font-weight: 600; }
.nh-table--standings .strk-l { color: var(--nh-stitch-ink); font-weight: 600; }
.nh-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--nh-s2) var(--nh-s4);
  margin-top: var(--nh-s4);
  font: 500 var(--nh-fs-small)/1.3 var(--nh-font-data);
  color: var(--nh-ink-2);
}
.nh-legend span { display: inline-flex; align-items: center; gap: 6px; }
.nh-legend i { width: 4px; height: 14px; background: var(--nh-rule-2); }
.nh-legend .zone-playoff i { background: var(--nh-win); }
.nh-legend .nh-rung { margin-left: 0; }
.nh-legend .zone-mine i { width: 18px; background: var(--nh-highlight); box-shadow: inset 0 0 0 1px rgba(22, 33, 27, 0.15); }

@media (max-width: 559px) {
  .nh-hide-sm { display: none; }
  .nh-teamlink__nick { display: none; }
  /* In the standings a phone shows nicknames: two Portlands and three Lakewoods share a league. */
  .nh-table--standings .nh-teamlink__name { display: none; }
  .nh-table--standings .nh-teamlink__nick { display: inline; font-weight: 600; color: var(--nh-ink-1); }
  /* Box-score titles keep the nickname too, or a same-city game has two identical headings. */
  .nh-table-title .nh-teamlink__nick { display: inline; }
}

/* ------------------------------------------------------------------ scouting grades */
.nh-grade {
  --g-bg: var(--nh-g50);
  --g-ink: var(--nh-g50-ink);
  position: relative;
  display: inline-grid;
  place-items: center;
  min-width: 2.15em;
  height: 1.6em;
  padding: 0.05em 0.3em 0;
  border-radius: 3px;
  background: var(--g-bg);
  color: var(--g-ink);
  font: 700 var(--nh-fs-data)/1 var(--nh-font-data);
  font-variant-numeric: tabular-nums;
}
.nh-grade[data-g='20'] { --g-bg: var(--nh-g20); --g-ink: var(--nh-g20-ink); }
.nh-grade[data-g='25'] { --g-bg: var(--nh-g25); --g-ink: var(--nh-g25-ink); }
.nh-grade[data-g='30'] { --g-bg: var(--nh-g30); --g-ink: var(--nh-g30-ink); }
.nh-grade[data-g='35'] { --g-bg: var(--nh-g35); --g-ink: var(--nh-g35-ink); }
.nh-grade[data-g='40'] { --g-bg: var(--nh-g40); --g-ink: var(--nh-g40-ink); }
.nh-grade[data-g='45'] { --g-bg: var(--nh-g45); --g-ink: var(--nh-g45-ink); }
.nh-grade[data-g='50'] { --g-bg: var(--nh-g50); --g-ink: var(--nh-g50-ink); }
.nh-grade[data-g='55'] { --g-bg: var(--nh-g55); --g-ink: var(--nh-g55-ink); }
.nh-grade[data-g='60'] { --g-bg: var(--nh-g60); --g-ink: var(--nh-g60-ink); }
.nh-grade[data-g='65'] { --g-bg: var(--nh-g65); --g-ink: var(--nh-g65-ink); }
.nh-grade[data-g='70'] { --g-bg: var(--nh-g70); --g-ink: var(--nh-g70-ink); }
.nh-grade[data-g='75'] { --g-bg: var(--nh-g75); --g-ink: var(--nh-g75-ink); }
.nh-grade[data-g='80'] { --g-bg: var(--nh-g80); --g-ink: var(--nh-g80-ink); }
/* A scout circles anything 70 or better in red pencil. */
.nh-grade[data-g='70']::after, .nh-grade[data-g='75']::after, .nh-grade[data-g='80']::after {
  content: '';
  position: absolute;
  inset: -4px -5px -3px -4px;
  border: 2px solid var(--nh-stitch);
  border-radius: 48% 52% 44% 56% / 58% 46% 54% 42%;
  transform: rotate(-7deg);
  pointer-events: none;
}
.nh-grade--lg { font-size: 1.35rem; min-width: 2.1em; height: 1.75em; }

/* ------------------------------------------------------------------ ticket */
.nh-ticket {
  /* the shadow follows the punched outline of the paper inside */
  filter: drop-shadow(0 1px 1px rgba(22, 33, 27, 0.1)) drop-shadow(0 12px 16px rgba(22, 33, 27, 0.16));
}
.nh-ticket__paper {
  --nh-surface: var(--nh-ticket);
  --stub: 54px;
  --notch: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--stub);
  background-color: var(--nh-ticket);
  background-image:
    repeating-linear-gradient(135deg, rgba(168, 40, 30, 0.045) 0 1px, transparent 1px 7px),
    repeating-linear-gradient(45deg, rgba(168, 40, 30, 0.045) 0 1px, transparent 1px 7px);
  color: var(--nh-ink-1);
  border-radius: var(--nh-r-ticket);
  /* punched notches at each end of the perforation */
  -webkit-mask:
    radial-gradient(circle var(--notch) at calc(100% - var(--stub)) 0, transparent calc(var(--notch) - 0.5px), #000 var(--notch)) top / 100% 51% no-repeat,
    radial-gradient(circle var(--notch) at calc(100% - var(--stub)) 100%, transparent calc(var(--notch) - 0.5px), #000 var(--notch)) bottom / 100% 51% no-repeat;
  mask:
    radial-gradient(circle var(--notch) at calc(100% - var(--stub)) 0, transparent calc(var(--notch) - 0.5px), #000 var(--notch)) top / 100% 51% no-repeat,
    radial-gradient(circle var(--notch) at calc(100% - var(--stub)) 100%, transparent calc(var(--notch) - 0.5px), #000 var(--notch)) bottom / 100% 51% no-repeat;
}
.nh-ticket__main { padding: var(--nh-s4) var(--nh-s5) var(--nh-s5); display: grid; gap: var(--nh-s3); min-width: 0; }
.nh-ticket__kicker { display: flex; justify-content: space-between; gap: var(--nh-s2); font: 700 var(--nh-fs-label)/1.2 var(--nh-font-data); letter-spacing: 0.12em; text-transform: uppercase; color: var(--nh-stitch-ink); }
.nh-ticket__title { display: grid; gap: 2px; font: 800 2.1rem/0.92 var(--nh-font-display); text-transform: uppercase; letter-spacing: 0.01em; }
.nh-ticket__title a { text-decoration: none; display: inline-flex; align-items: center; gap: 10px; }
.nh-ticket__title a:hover { color: var(--nh-ink-1); text-decoration: underline; text-decoration-thickness: 2px; }
.nh-ticket__at { font: 400 1.45rem/1 var(--nh-font-script); text-transform: none; color: var(--nh-stitch-ink); padding-left: 44px; }
.nh-ticket__facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--nh-s2) var(--nh-s4); border-top: 1px solid rgba(22, 33, 27, 0.22); padding-top: var(--nh-s3); }
.nh-ticket__facts dt { font: 600 var(--nh-fs-label)/1.2 var(--nh-font-data); letter-spacing: 0.1em; text-transform: uppercase; color: var(--nh-ink-2); }
.nh-ticket__facts dd { font: 600 0.95rem/1.3 var(--nh-font-data); }
.nh-ticket__stub {
  display: flex;
  align-items: center;
  justify-content: center;
  border-left: 2px dashed rgba(22, 33, 27, 0.35);
}
.nh-ticket__stub span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font: 800 0.95rem/1 var(--nh-font-display);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--nh-ink-2);
  white-space: nowrap;
}
.nh-ticket__actions { display: flex; flex-wrap: wrap; gap: var(--nh-s2); align-items: center; }
.nh-ticket__actions .nh-btn { padding-left: 14px; padding-right: 14px; letter-spacing: 0.08em; }

.nh-probables { display: grid; gap: 6px; border-top: 1px solid rgba(22, 33, 27, 0.22); padding-top: var(--nh-s3); }
.nh-probable { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.nh-probable__name { font: 700 1rem/1.15 var(--nh-font-data); text-decoration: none; }
.nh-probable__name:hover { text-decoration: underline; }
.nh-probable__line { display: block; font: 500 var(--nh-fs-small)/1.2 var(--nh-font-data); color: var(--nh-ink-2); font-variant-numeric: tabular-nums; }
/* The line on the game (ui.ts lineBox), ruled off like the probables above it. */
.nh-line { display: grid; gap: 6px; border-top: 1px solid rgba(22, 33, 27, 0.22); padding-top: var(--nh-s3); }
.nh-line .nh-table th, .nh-line .nh-table td { padding: 5px 4px; }
.nh-line__total { font: 500 var(--nh-fs-small)/1.3 var(--nh-font-data); color: var(--nh-ink-2); font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ buttons, tags */
.nh-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--nh-s2);
  padding: 11px 16px 9px;
  background: var(--nh-ink-1);
  color: var(--nh-paper-0);
  border: 0;
  border-radius: var(--nh-r-1);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.28);
  font: 800 1rem/1 var(--nh-font-display);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}
.nh-btn:hover { background: var(--nh-board-1); color: var(--nh-chalk-1); }
.nh-btn--ghost { background: transparent; color: var(--nh-ink-1); box-shadow: inset 0 0 0 2px var(--nh-ink-1); }
.nh-btn--ghost:hover { background: var(--nh-ink-1); color: var(--nh-paper-0); }
/* A button that's switched on, as Following a club is: the win green. */
.nh-btn--on { background: var(--nh-win); color: var(--nh-paper-0); }
.nh-btn--on:hover { background: var(--nh-board-1); color: var(--nh-chalk-1); }
/* A club page's top line: where it plays on the left, Follow on the right (pages/team.ts). */
.nh-digest__club { display: grid; gap: var(--nh-s2); }
.nh-digest__club > p { margin: 0; }
.nh-digest__club .nh-cap { --size: 18px; }
/* The finances' forecast (pages/finances.ts): a rule down its side in the verdict's colour. */
.nh-forecast { display: grid; gap: var(--nh-s2); padding: var(--nh-s3) var(--nh-s4); background: var(--nh-paper-0);
  border: 1px solid var(--nh-rule-1); border-left: 6px solid var(--nh-ink-3); }
.nh-forecast__title { margin: 0; font: 800 var(--nh-fs-label)/1.2 var(--nh-font-data); letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--nh-ink-3); }
.nh-forecast__head { margin: 0; font: 800 var(--nh-fs-h3)/1.2 var(--nh-font-display); color: var(--nh-ink-1); }
.nh-forecast__why { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; }
.nh-forecast--growing { border-left-color: var(--nh-win); }
.nh-forecast--slipping { border-left-color: var(--nh-outbid); }
.nh-forecast--danger, .nh-forecast--bust { border-left-color: var(--nh-stitch-ink); }
.nh-forecast--danger .nh-forecast__head, .nh-forecast--bust .nh-forecast__head { color: var(--nh-stitch-ink); }
.nh-teamtop { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--nh-s2) var(--nh-s4); }

.nh-tag {
  display: inline-block;
  padding: 3px 6px 2px;
  border: 1px solid currentColor;
  border-radius: var(--nh-r-1);
  font: 700 0.6875rem/1 var(--nh-font-data);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: 2px;
  white-space: nowrap;
}
.nh-tag--win { color: var(--nh-win); }
.nh-tag--loss { color: var(--nh-stitch-ink); }
.nh-tag--save { color: var(--nh-ink-2); }
.nh-tag--soon { color: var(--nh-ink-2); border-style: dashed; }   /* a game still to play */
/* Tags in a row that wraps, inside a table cell too. */
.nh-chips { display: flex; flex-wrap: wrap; gap: 4px; white-space: normal; }
.nh-chips .nh-tag { vertical-align: 0; }

/* ------------------------------------------------------------------ press box */
.nh-press__items { display: grid; gap: var(--nh-s5); }
@media (min-width: 700px) { .nh-press__items { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) {
  .nh-press__items { grid-template-columns: 1.35fr repeat(3, minmax(0, 1fr)); gap: 0; }
  .nh-story { padding: 0 var(--nh-s5); }
  .nh-story:first-child { padding-left: 0; }
  .nh-story:last-child { padding-right: 0; }
  .nh-story + .nh-story { border-left: 1px solid var(--nh-rule-2); }
}
.nh-story { display: grid; gap: var(--nh-s2); align-content: start; }
.nh-story__kicker { font: 700 var(--nh-fs-label)/1.2 var(--nh-font-data); letter-spacing: 0.12em; text-transform: uppercase; color: var(--nh-stitch-ink); }
.nh-story__head { font: 800 1.45rem/1 var(--nh-font-display); text-transform: uppercase; letter-spacing: 0.01em; }
.nh-story:first-child .nh-story__head { font-size: 2rem; }
.nh-story__head a { text-decoration: none; }
.nh-story__head a:hover { color: var(--nh-ink-1); text-decoration: underline; text-decoration-thickness: 2px; }
.nh-story__deck { color: var(--nh-ink-2); font-size: 0.95rem; }
.nh-story__deck a { color: var(--nh-ink-1); }

/* ------------------------------------------------------------------ team page */
.nh-teamband {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--nh-s5);
  padding: var(--nh-s5) 88px var(--nh-s5) var(--nh-s5);
  background-color: var(--c1);
  background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.04) 0 2px, transparent 2px 7px);
  color: var(--c2);
  clip-path: polygon(0 0, 100% 0, calc(100% - 48px) 50%, 100% 100%, 0 100%);
  box-shadow: var(--nh-shadow-lift);
}
.nh-teamband::after {
  /* stitched felt trim */
  content: '';
  position: absolute;
  inset: 8px 0 8px 8px;
  border: 2px dashed var(--c2);
  border-right: 0;
  opacity: 0.45;
  pointer-events: none;
}
.nh-teamband__text { display: grid; gap: 2px; min-width: 0; }
.nh-teamband__city { font: 800 1.15rem/1 var(--nh-font-display); letter-spacing: 0.24em; text-transform: uppercase; }
.nh-teamband__nick { font: 400 clamp(2.6rem, 7vw, 4.4rem)/1.05 var(--nh-font-script); text-shadow: 0 2px 0 rgba(0, 0, 0, 0.18); overflow-wrap: anywhere; }
.nh-teamband__meta { font: 600 var(--nh-fs-small)/1.3 var(--nh-font-data); letter-spacing: 0.06em; opacity: 0.9; }
.nh-teamband .nh-cap--xl { box-shadow: 0 0 0 4px var(--c1), 0 0 0 6px var(--c2), 0 6px 16px rgba(0, 0, 0, 0.3); background: var(--c2); color: var(--c1); }
.nh-teamband__record { margin-left: auto; text-align: right; display: grid; gap: 4px; }
.nh-teamband__record b { font: 800 clamp(3rem, 6vw, 4.6rem)/0.85 var(--nh-font-display); letter-spacing: 0.01em; }
.nh-teamband__record span { font: 700 var(--nh-fs-label)/1.2 var(--nh-font-data); letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.9; }
@media (max-width: 759px) { .nh-teamband__record { display: none; } }
@media (max-width: 599px) {
  .nh-teamband { gap: var(--nh-s3); padding: var(--nh-s4) 52px var(--nh-s4) var(--nh-s4); clip-path: polygon(0 0, 100% 0, calc(100% - 30px) 50%, 100% 100%, 0 100%); }
  .nh-teamband .nh-cap--xl { --size: 58px; }
  .nh-teamband__city { font-size: 0.95rem; letter-spacing: 0.18em; }
}

.nh-statline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  border-top: 2px solid var(--nh-ink-1);
  border-bottom: 1px solid var(--nh-rule-2);
}
.nh-statline > div { padding: var(--nh-s3) var(--nh-s3) var(--nh-s3) 0; }
.nh-statline > div + div { padding-left: var(--nh-s3); border-left: 1px solid var(--nh-rule-1); }
.nh-statline dt { font: 600 var(--nh-fs-label)/1.2 var(--nh-font-data); letter-spacing: 0.1em; text-transform: uppercase; color: var(--nh-ink-3); }
.nh-statline dd { font: 700 1.6rem/1.1 var(--nh-font-text); letter-spacing: -0.01em; }
.nh-statline dd small { font: 600 var(--nh-fs-small)/1 var(--nh-font-data); color: var(--nh-ink-3); letter-spacing: 0.02em; }
@media (max-width: 599px) {
  .nh-statline { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .nh-statline > div:nth-child(3n + 1) { padding-left: 0; border-left: 0; }
  .nh-statline > div:nth-child(n + 4) { border-top: 1px solid var(--nh-rule-1); }
  .nh-statline dd { font-size: 1.3rem; }
}

/* The manager's lineup card: a ruled index card filled in with a marker. */
.nh-lineupcard {
  --nh-surface: var(--nh-paper-0);
  --line: 2.25rem;
  position: relative;
  padding: var(--nh-s4) var(--nh-s4) var(--nh-s4) 58px;
  background-color: var(--nh-paper-0);
  background-image: linear-gradient(transparent calc(var(--line) - 1px), rgba(31, 47, 107, 0.22) calc(var(--line) - 1px));
  background-size: 100% var(--line);
  background-position: 0 calc(var(--nh-s4) + 3.3rem + 2px);
  border-radius: var(--nh-r-1);
  box-shadow: var(--nh-shadow-lift);
  transform: rotate(-0.5deg);
}
.nh-lineupcard::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0; left: 44px;
  border-left: 1.5px solid rgba(200, 52, 42, 0.45);
}
.nh-lineupcard__head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--nh-s2); height: 3.3rem; margin: calc(var(--nh-s4) * -1) calc(var(--nh-s4) * -1) 0 -58px; padding: var(--nh-s4) var(--nh-s4) 0 58px; box-sizing: content-box; background: var(--nh-paper-0); border-bottom: 2px solid rgba(200, 52, 42, 0.5); border-radius: var(--nh-r-1) var(--nh-r-1) 0 0; }
.nh-lineupcard__title { font: 800 1.5rem/1 var(--nh-font-display); letter-spacing: 0.14em; text-transform: uppercase; }
.nh-lineupcard__vs { font: 600 var(--nh-fs-label)/1.3 var(--nh-font-data); letter-spacing: 0.1em; text-transform: uppercase; color: var(--nh-ink-3); text-align: right; }
.nh-lineupcard ol { counter-reset: order; }
.nh-lineupcard li {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 3.2rem 2.2rem;
  align-items: end;
  gap: var(--nh-s2);
  height: var(--line);
  padding-bottom: 5px;
}
.nh-lineupcard li::before {
  counter-increment: order;
  content: counter(order);
  position: absolute;
  left: -40px;
  bottom: 6px;
  width: 26px;
  text-align: right;
  font: 700 1rem/1 var(--nh-font-data);
  color: var(--nh-ink-3);
}
.nh-hand { font: 400 1.3rem/1 var(--nh-font-hand); color: var(--nh-ink-hand); letter-spacing: 0.02em; }
.nh-lineupcard a.nh-hand { text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nh-lineupcard a.nh-hand:hover { text-decoration: underline; color: var(--nh-ink-hand); }
.nh-lineupcard .nh-hand--pos { font-size: 1.1rem; text-align: center; }
.nh-lineupcard .nh-grade { font-size: 0.8rem; align-self: center; margin-top: 6px; }
.nh-lineupcard__foot { display: grid; grid-template-columns: auto minmax(0, 1fr) 2.2rem; gap: var(--nh-s2); align-items: end; margin-top: var(--nh-s2); padding-top: var(--nh-s2); border-top: 2px solid rgba(200, 52, 42, 0.5); }
.nh-lineupcard__foot .lbl { font: 700 var(--nh-fs-label)/1 var(--nh-font-data); letter-spacing: 0.12em; text-transform: uppercase; color: var(--nh-ink-3); padding-bottom: 5px; }
.nh-lineupcard__foot .nh-grade { font-size: 0.8rem; }

.nh-results { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.nh-results > li { display: grid; }
.nh-result {
  display: grid;
  align-content: start;
  gap: 3px;
  padding: 9px 8px 8px;
  background: var(--nh-paper-0);
  border: 1px solid var(--nh-rule-1);
  border-top: 4px solid var(--nh-rule-2);
  text-decoration: none;
  font: 600 var(--nh-fs-small)/1.15 var(--nh-font-data);
  color: var(--nh-ink-2);
  min-width: 0;
}
.nh-result:hover { border-color: var(--nh-ink-1); color: var(--nh-ink-1); }
.nh-result__wl { display: flex; align-items: baseline; gap: 8px; font: 800 1.6rem/1 var(--nh-font-display); color: var(--nh-ink-1); }
.nh-result__wl small { font: 800 1.6rem/1 var(--nh-font-display); color: var(--nh-ink-1); letter-spacing: 0.01em; }
.nh-result.is-win { border-top-color: var(--nh-win); }
.nh-result.is-win .nh-result__wl span { color: var(--nh-win); }
.nh-result.is-loss { border-top-color: var(--nh-stitch); }
.nh-result.is-loss .nh-result__wl span { color: var(--nh-stitch-ink); }
.nh-result__opp { font-weight: 700; color: var(--nh-ink-1); letter-spacing: 0.04em; }
.nh-result__flag { font-weight: 700; font-size: var(--nh-fs-label); letter-spacing: 0.08em; text-transform: uppercase; color: var(--nh-stitch-ink); }
.nh-result__flag { white-space: nowrap; }
@media (max-width: 559px) {
  .nh-result { padding: 8px 6px 7px; }
  .nh-result__flag { letter-spacing: 0.02em; }
  .nh-result__wl { flex-direction: column; align-items: flex-start; gap: 2px; }
  .nh-result__wl small { font-size: 1.15rem; }
}

/* ------------------------------------------------------------------ finances */
.nh-books { display: grid; gap: var(--nh-s5); }
@media (min-width: 760px) { .nh-books { grid-template-columns: 240px minmax(0, 1fr); } }
.nh-tile { display: grid; gap: 4px; align-content: start; }
.nh-tile__label { font: 600 var(--nh-fs-label)/1.2 var(--nh-font-data); letter-spacing: 0.1em; text-transform: uppercase; color: var(--nh-ink-3); }
.nh-tile__value { font: 700 2.4rem/1 var(--nh-font-text); letter-spacing: -0.02em; }
.nh-tile__delta { font: 600 var(--nh-fs-small)/1.3 var(--nh-font-data); color: var(--nh-ink-2); }
.nh-tile__delta.is-up { color: var(--nh-win); }
.nh-tile__delta.is-down { color: var(--nh-stitch-ink); }
.nh-tiles { display: grid; gap: var(--nh-s5); align-content: start; }
.nh-spark-wrap { position: relative; margin-top: 8px; }
.nh-spark { width: 100%; height: 44px; overflow: visible; }
.nh-spark__dot { position: absolute; right: -4px; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%; background: var(--nh-win); box-shadow: 0 0 0 2px var(--nh-paper-1); }
.nh-spark__ends { display: flex; justify-content: space-between; margin-top: 4px; font: 600 var(--nh-fs-label)/1 var(--nh-font-data); letter-spacing: 0.06em; color: var(--nh-ink-3); }
.nh-spark__line { fill: none; stroke: var(--nh-ink-1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.nh-spark__area { fill: rgba(30, 106, 68, 0.1); }
.nh-meter { height: 8px; background: var(--nh-paper-3); border-radius: 1px; overflow: hidden; margin-top: 6px; }
.nh-meter i { display: block; height: 100%; background: var(--nh-board-1); }
/* The staff page's training (staff.ts): bars across, the weeks as columns, and which focus works what. */
.nh-hbars { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; font: 500 var(--nh-fs-small)/1.2 var(--nh-font-data); }
.nh-hbars li { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr) 3.5rem; align-items: center; gap: var(--nh-s2); }
.nh-hbars .nh-meter { margin-top: 0; }
.nh-hbars__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nh-hbars__value { text-align: right; font-variant-numeric: tabular-nums; color: var(--nh-ink-2); }
.nh-weekbars { position: relative; display: flex; align-items: flex-end; gap: 4px; height: 120px; padding-left: 3rem; border-bottom: 1px solid var(--nh-rule-1); }
.nh-weekbars__top { position: absolute; top: 0; left: 0; width: 2.6rem; border-top: 1px dashed var(--nh-rule-1); font: 600 var(--nh-fs-label)/1.4 var(--nh-font-data); color: var(--nh-ink-3); font-variant-numeric: tabular-nums; }
.nh-weekbars__week { position: relative; flex: 0 1 22px; display: flex; align-items: flex-end; height: 100%; }
.nh-weekbars__week i { display: block; width: 100%; background: var(--nh-board-1); }
.nh-weekbars__week b { position: absolute; bottom: -1.3em; left: 0; right: 0; text-align: center; font: 600 var(--nh-fs-label)/1 var(--nh-font-data); color: var(--nh-ink-3); }
.nh-trainingcharts { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: var(--nh-s5); margin-top: var(--nh-s3); }
.nh-trainingchart { display: grid; gap: var(--nh-s3); margin: 0; align-content: start; }
.nh-trainingchart .nh-weekbars { margin-bottom: 1.4em; }
.nh-focusgrid tr.is-mine th, .nh-focusgrid tr.is-mine td { --row-bg: var(--nh-paper-2); font-weight: 700; }
.nh-focusgrid__main { color: var(--nh-board-1); }
.nh-focusgrid__side { color: var(--nh-ink-3); }

.nh-table--ledger { --nh-surface: transparent; }
.nh-table--ledger td, .nh-table--ledger th { padding: 6px 8px; }
.nh-table--ledger .bar { width: 38%; padding-right: 0; }
.nh-table--ledger .bar i { display: block; height: 10px; margin-left: auto; background: var(--nh-board-1); border-radius: 0 0 0 0; }
.nh-table--ledger .is-exp .bar i { background: var(--nh-ink-3); }
.nh-table--ledger .sect th { padding-top: var(--nh-s3); border-bottom: 1px solid var(--nh-ink-1); font: 700 var(--nh-fs-label)/1.2 var(--nh-font-data); letter-spacing: 0.12em; text-transform: uppercase; color: var(--nh-ink-2); text-align: left; }
.nh-table--ledger .net td, .nh-table--ledger .net th { border-top: 2px solid var(--nh-ink-1); border-bottom: 3px double var(--nh-ink-1); font-weight: 700; }
.nh-table--ledger .sub td, .nh-table--ledger .sub th { border-top: 1px solid var(--nh-ink-1); font-weight: 700; }   /* a part's total */
.nh-table--ledger tbody th.l { white-space: normal; }        /* a long line wraps; the amounts stay in view */
@media (max-width: 479px) { .nh-table--ledger .bar { display: none; } }

/* ------------------------------------------------------------------ ballpark model */
/* The club's park as a paper model (docs/graphics.md): wide screens with WebGL; the seating chart elsewhere. */
.nh-park { display: none; }
@media (min-width: 760px) { .nh-park { display: block; aspect-ratio: 2 / 1; cursor: grab; } }
.nh-park:active { cursor: grabbing; }
.nh-park__canvas { display: block; width: 100%; height: 100%; touch-action: none; }

/* ------------------------------------------------------------------ replays */
/* A game played back in the home park (docs/live.md): the model, a scoreboard over it, the call
   under it, the controls. Wide screens with WebGL, as the ballpark model. */
/* The field and what's under it in the middle; each club's box score beside it on a wide screen (the
   visitors left, the home club right), under it in two columns on a middling one, after the booth
   on a phone. */
.nh-live { display: grid; gap: var(--nh-s4) var(--nh-s5); grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "head" "main" "deck" "booth" "away" "home"; align-items: start; }
/* The controls, or the word that the game's on the air: under the field, and on a wide screen in the
   corner under the visitors' box score, so the booth comes straight under the field. */
.nh-live__deck { grid-area: deck; }
.nh-live__main { grid-area: main; display: grid; gap: var(--nh-s3); min-width: 0; }
.nh-live__side--away { grid-area: away; }
.nh-live__side--home { grid-area: home; }
.nh-live > .nh-booth { grid-area: booth; }
@media (min-width: 760px) {
  .nh-live { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "head head" "main main" "deck deck" "away home" "booth booth"; }
}
@media (min-width: 1440px) {
  .nh-live { grid-template-columns: 330px minmax(0, 1fr) 330px; grid-template-areas: "head head head" "away main home" "deck booth home"; }
}
.nh-live__screen { position: relative; }
.nh-live__stage { cursor: grab; }   /* its height fits the screen (player.ts) */
.nh-live__stage:active { cursor: grabbing; }
.nh-live__stage .nh-park__canvas { touch-action: pan-y; }   /* on a phone a swipe up or down scrolls the page; across, it turns the view */
/* The headline, and beside it the scoreboard (player.ts; Rob: "something like image2 .. but put it at
   the top (next to the headline, and above the stadium)"): the game page's line score on smaller
   plates, the inning in its corner, and beside it the inning's situation: the runners, the count, the
   outs and who's up against whom. Under the headline when there isn't room beside it. */
.nh-live__head { grid-area: head; display: flex; flex-wrap: wrap; align-items: center; gap: var(--nh-s3); }
.nh-live__head > .nh-pagehead { margin-right: auto; padding-right: var(--nh-s4); }
.nh-livehead { display: flex; flex-wrap: wrap; align-items: center; gap: var(--nh-s2) var(--nh-s4); padding: 8px 14px 10px;
  font: 700 0.95rem/1.2 var(--nh-font-data); }
.nh-livehead:empty { display: none; }
.nh-livehead .nh-linescore-wrap { margin: 0; padding: 0; }
.nh-livehead .nh-linescore { border-spacing: 4px; margin: -4px 0; }   /* no side margins: they made it wider than its box, which scrolled */
.nh-livehead .nh-linescore thead th { font-size: 0.9rem; }
.nh-livehead .nh-linescore tbody th { padding-right: var(--nh-s2); }
.nh-livehead .nh-plate { width: 100%; min-width: 1.75rem; height: 2rem; font-size: 1.2rem; }
.nh-livehead .rhe .nh-plate { min-width: 2rem; }
.nh-livehead .gap { width: 8px; }
.nh-livehead .nh-linescore__abbr { font-size: 1.25rem; }
.nh-livehead__inning { text-align: left; }
.nh-livehead .nh-linescore thead .nh-livehead__inning { font: 800 1.05rem/1 var(--nh-font-display); letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--nh-chalk-1); }
.nh-livehead__inning i { margin-right: 3px; font-style: normal; font-size: 0.75em; color: var(--nh-lamp); }
/* Wide enough for most names at bat and on the mound, so a new one doesn't move the head row about. */
.nh-livehead__now { display: grid; gap: 5px; min-width: 15rem; padding-left: var(--nh-s4); border-left: 2px solid rgba(241, 239, 228, 0.28); }
.nh-livehead__sit { display: flex; align-items: center; gap: 14px; }
.nh-live__count { font: 800 1.5rem/1 var(--nh-font-display); letter-spacing: 0.02em; }
.nh-live__outs { display: inline-flex; align-items: center; gap: 7px; }
.nh-live__outs b { font: 800 0.9rem/1 var(--nh-font-data); letter-spacing: 0.08em; text-transform: uppercase; }
.nh-livehead .nh-outs { flex-direction: row; gap: 5px; padding-top: 0; }
.nh-livehead .nh-outs i { width: 13px; height: 13px; border-width: 2px; }
.nh-livehead .nh-bases { width: 46px; height: 32px; margin: 0; }
.nh-livehead .nh-bases i { width: 12px; height: 12px; border-width: 2px; }
.nh-livehead .nh-bases .b2 { left: 16px; top: 1px; }
.nh-livehead .nh-bases .b3 { left: 3px; top: 14px; }
.nh-livehead .nh-bases .b1 { left: 29px; top: 14px; }
.nh-livehead .nh-outs i, .nh-livehead .nh-bases i { border-color: var(--nh-chalk-2); }
.nh-livehead .nh-outs i.on { background: var(--nh-stitch); border-color: var(--nh-stitch); }
.nh-livehead .nh-bases i.on { background: var(--nh-lamp); border-color: var(--nh-lamp); }
@media (max-width: 719px) {
  .nh-livehead { padding: 8px 10px 10px; font-size: 0.85rem; }
  .nh-livehead .nh-linescore { border-spacing: 3px; margin: -3px 0; }
  .nh-livehead .nh-plate { min-width: 1.15rem; height: 1.9rem; font-size: 1.05rem; padding: 0.16em 0.06em 0; }
  .nh-livehead .nh-plate::before { display: none; }
  .nh-livehead .rhe .nh-plate { min-width: 1.45rem; }
  .nh-livehead .gap { width: 0; }
  .nh-livehead .nh-linescore__abbr { font-size: 1.1rem; }
  .nh-livehead__now { min-width: 0; padding-left: 0; border-left: 0; }
  .nh-livehead .nh-linescore th:first-child { position: static; background: none; }   /* it fits: nothing scrolls under it */
  .nh-live__count { font-size: 1.25rem; }
}
@media (max-width: 400px) {   /* a phone: nine innings and R H E across, nothing scrolling sideways */
  .nh-livehead { padding-left: 8px; padding-right: 8px; }
  .nh-livehead .nh-linescore { border-spacing: 2px; margin: -2px 0; }
  .nh-livehead .nh-plate { min-width: 1rem; }
  .nh-livehead .rhe .nh-plate { min-width: 1.3rem; }
}
/* Each club keyed to what it wears on the field (web/src/live/kits.ts): a chip of its jersey ringed in
   the colour of its bases; the club at bat underlined in the lamp; who's up and who's pitching. */
.nh-live__club { display: inline-flex; align-items: center; gap: 6px; padding-bottom: 2px; }
.nh-live__club.is-up { box-shadow: inset 0 -2px 0 var(--nh-lamp); }
.nh-live__kit { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 50%;
  background: var(--kit); box-shadow: 0 0 0 2px var(--kit-base); }
.nh-live__who { display: flex; align-items: center; gap: 7px; font-weight: 600; color: var(--nh-chalk-1); }
.nh-live__who small { font: inherit; color: var(--nh-chalk-2); }
/* A club's box score beside the field (player.ts): its name and R H E, then its batters and pitchers
   in compact scorebook tables, today's lines and the season's rate, on one line each; the man at bat
   and the pitcher on the mound lit. */
.nh-live__side { display: grid; gap: var(--nh-s3); align-content: start; min-width: 0; }
.nh-live__side:empty { display: none; }
.nh-live__team { display: flex; align-items: center; gap: 8px; padding-bottom: 6px; border-bottom: 2px solid var(--nh-ink-1);
  font: 800 var(--nh-fs-h3)/1.05 var(--nh-font-display); letter-spacing: 0.02em; text-transform: uppercase; }
.nh-live__team > b { flex: 1; min-width: 0; }
.nh-live__rhe { display: inline-flex; gap: 10px; font: 700 var(--nh-fs-label)/1 var(--nh-font-data); letter-spacing: 0.06em; color: var(--nh-ink-3); }
.nh-live__rhe b { font-size: var(--nh-fs-data); color: var(--nh-ink-1); }
.nh-live__box { font-size: var(--nh-fs-small); }
.nh-live__box th small { margin-left: 4px; color: var(--nh-ink-3); font-weight: 600; }
.nh-live__spot { display: inline-block; min-width: 1.4em; color: var(--nh-ink-3); }
.nh-live__box tr.is-up { --row-bg: var(--nh-highlight); }
.nh-live__call { min-height: 1.4em; margin: 0; font: 600 1.0625rem/1.4 var(--nh-font-text); }
.nh-live__controls { display: flex; flex-wrap: wrap; align-items: center; gap: var(--nh-s2); }
.nh-live__speeds { display: inline-flex; gap: 4px; }
.nh-live__speeds .nh-btn { padding: 9px 10px 7px; }
.nh-live__speeds [aria-pressed="true"] { background: var(--nh-ink-1); color: var(--nh-paper-0); }
.nh-live__jump .nh-input { min-width: 9rem; }
/* The call box: the latest pitch or play, big, beside the scoreboard as tall as it is and as wide
   whatever it says, so the board never moves (Rob: "the 'now batting' and all alerts .. can go next to
   the scoreboard (to the left of it)"). Its bar says what kind: chalk a ball, stitching red a strike
   or an out, the lamp a ball in play or a man on; a run lights the whole box. Under the scoreboard on
   a phone. */
.nh-live__action {
  align-self: stretch; display: grid; align-content: center; justify-items: end; gap: 4px; width: 16rem; padding: 9px 14px 10px;
  background: var(--nh-board-1); color: var(--nh-chalk-1); border-radius: var(--nh-r-1);
  border-top: 5px solid var(--nh-chalk-2); box-shadow: 0 2px 0 rgba(0, 0, 0, 0.28); text-align: right;
}
.nh-live__action:empty { display: none; }
.nh-live__action b { font: 800 1.85rem/1 var(--nh-font-display); letter-spacing: var(--nh-track-sign); text-transform: uppercase; }
@media (max-width: 719px) {
  .nh-live__action { order: 1; width: 100%; justify-items: start; text-align: left; }
  .nh-live__action b { font-size: 1.6rem; }
}
.nh-live__action span { font: 700 var(--nh-fs-small)/1.2 var(--nh-font-data); letter-spacing: var(--nh-track-caps); text-transform: uppercase; color: var(--nh-chalk-2); }
.nh-live__action.is-strike, .nh-live__action.is-out { border-top-color: var(--nh-stitch); }
.nh-live__action.is-play, .nh-live__action.is-on, .nh-live__action.is-hit { border-top-color: var(--nh-lamp); }
.nh-live__action.is-hit b { color: var(--nh-lamp); }
.nh-live__action.is-big { background: var(--nh-lamp); border-top-color: var(--nh-board-3); color: var(--nh-board-3); }
.nh-live__action.is-big span { color: var(--nh-board-2); }
.nh-live__action.is-new { animation: nh-pop 260ms ease-out; }
/* A tense wait for the next pitch: the situation, under a lamp that blinks. */
.nh-live__action.is-tense { border-top-color: var(--nh-lamp); animation: nh-tense 1.1s ease-in-out infinite; }
.nh-live__action.is-tense.is-new { animation: nh-pop 260ms ease-out, nh-tense 1.1s ease-in-out infinite; }
@keyframes nh-pop { from { transform: scale(1.08); } to { transform: none; } }
@keyframes nh-tense { 50% { border-top-color: var(--nh-board-3); } }
@media (prefers-reduced-motion: reduce) { .nh-live__action.is-new, .nh-live__action.is-tense { animation: none; } }
/* The banner a big moment earns (calls.ts): a homer as it clears the wall, a walk-off as it's won,
   across the bottom of the field in the lamp's gold, clear of the play; a walk-off's bigger, on a lit
   board. A run's number pops on the scoreboard as it crosses the plate. */
.nh-live__banner { display: none; }
.nh-live__banner.is-up {
  position: absolute; left: 50%; bottom: 3%; transform: translateX(-50%);
  display: grid; justify-items: center; gap: 2px; padding: 8px 22px 10px; max-width: 92%;
  background: var(--nh-board-1); color: var(--nh-lamp); border-radius: var(--nh-r-1);
  border-top: 6px solid var(--nh-lamp); box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3); text-align: center;
  animation: nh-banner 520ms cubic-bezier(0.2, 1.4, 0.4, 1);
}
.nh-live__banner b { font: 900 clamp(1.6rem, 3.2vw, 2.8rem)/1 var(--nh-font-display); letter-spacing: var(--nh-track-sign); text-transform: uppercase; white-space: nowrap; }
.nh-live__banner span { font: 700 var(--nh-fs-small)/1.2 var(--nh-font-data); letter-spacing: var(--nh-track-caps); text-transform: uppercase; color: var(--nh-chalk-1); }
.nh-live__banner.is-walkoff { background: var(--nh-lamp); color: var(--nh-board-3); border-top-color: var(--nh-stitch); }
.nh-live__banner.is-walkoff b { font-size: clamp(1.9rem, 3.8vw, 3.3rem); }
.nh-live__banner.is-walkoff span { color: var(--nh-board-2); }
@keyframes nh-banner { from { transform: translateX(-50%) scale(0.4); opacity: 0; } to { transform: translateX(-50%); opacity: 1; } }
.nh-livehead .nh-plate.is-new { animation: nh-score 700ms ease-out; }
@keyframes nh-score { 0% { transform: scale(1.9); color: var(--nh-chalk-1); } 100% { transform: none; } }
@media (prefers-reduced-motion: reduce) { .nh-live__banner.is-up, .nh-livehead .nh-plate.is-new { animation: none; } }
/* The broadcast in words, where the stage can't show (a phone, or no WebGL): the board, the call box
   and the banner in the flow. */
.nh-live--text .nh-live__screen { display: grid; gap: var(--nh-s3); }
.nh-live--text .nh-live__banner.is-up { position: static; transform: none; max-width: none; animation: none; }
/* On the air: a red bulb that breathes. */
.nh-live__onair { display: inline-flex; align-items: center; gap: 8px; margin: 0; color: var(--nh-stitch-ink);
  font: 800 var(--nh-fs-small)/1 var(--nh-font-data); letter-spacing: 0.12em; text-transform: uppercase; }
.nh-live__onair a { color: inherit; }
/* The clubs the viewer follows, their games' scores under On the air (pages/live.ts). */
.nh-elsewhere { display: grid; gap: var(--nh-s2); margin-top: var(--nh-s3); }
.nh-elsewhere[hidden] { display: none; }
.nh-elsewhere__title { margin: 0; font: 800 var(--nh-fs-label)/1.2 var(--nh-font-data); letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--nh-ink-3); }
.nh-elsewhere__games { display: grid; gap: var(--nh-s2); margin: 0; padding: 0; list-style: none; }
.nh-elsewhere__game a { display: flex; flex-wrap: wrap; align-items: center; gap: 4px var(--nh-s3); padding: 6px 10px;
  border-left: 3px solid var(--nh-rule-2); color: var(--nh-ink-1); text-decoration: none;
  font: 600 var(--nh-fs-small)/1.2 var(--nh-font-data); }
.nh-elsewhere__game a > span { display: inline-flex; align-items: center; gap: 6px; }
.nh-elsewhere__game small { color: var(--nh-ink-3); }
.nh-elsewhere__game .nh-cap { --size: 16px; }
.nh-elsewhere__game.is-lit a { border-left-color: var(--nh-stitch-ink); }
.nh-elsewhere__game.is-lit small { color: var(--nh-stitch-ink); font-weight: 800; }
.nh-live__dot, .nh-strip__onair::before {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--nh-stitch); box-shadow: 0 0 6px var(--nh-stitch); animation: nh-onair 1.6s ease-in-out infinite;
}
@keyframes nh-onair { 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { .nh-live__dot, .nh-strip__onair::before { animation: none; } }
/* The booth: everything said so far, the newest on top. */
.nh-booth {
  display: grid; gap: 2px; max-height: 20rem; overflow-y: auto; margin: 0; padding: var(--nh-s2) var(--nh-s3);
  list-style: none; background: var(--nh-paper-0); border-left: 4px solid var(--nh-rule-2);
  font: 400 var(--nh-fs-small)/1.45 var(--nh-font-text); color: var(--nh-ink-2);
}
.nh-booth:empty { display: none; }
.nh-booth__line { padding: 3px 0; }
.nh-booth__line--call { color: var(--nh-ink-1); font-weight: 600; }
.nh-booth__line--color { color: var(--nh-ink-1); font-style: italic; }
.nh-booth__line--change { color: var(--nh-ink-1); }
.nh-booth__line--inning, .nh-booth__line--final {
  margin-top: 4px; padding-top: 7px; border-top: 1px solid var(--nh-rule-1); color: var(--nh-ink-1);
  font: 700 var(--nh-fs-label)/1.3 var(--nh-font-data); letter-spacing: 0.08em; text-transform: uppercase;
}
/* A game on the scoreboard while it's on the air. */
.nh-final.is-live .nh-final__status span:first-child::before {
  content: ''; display: inline-block; width: 6px; height: 6px; margin: 0 5px 1px 0; border-radius: 50%;
  background: var(--nh-stitch); box-shadow: 0 0 5px var(--nh-stitch);
}

/* ------------------------------------------------------------------ front office */
.nh-tiles--row { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.nh-toggle { display: inline-flex; align-items: center; gap: var(--nh-s2); font: 700 var(--nh-fs-small)/1.3 var(--nh-font-data); letter-spacing: 0.04em; cursor: pointer; }
.nh-toggle input { width: 18px; height: 18px; accent-color: var(--nh-board-1); }
.nh-price { width: 6.5rem; padding: 6px 8px 5px; text-align: right; font-variant-numeric: tabular-nums; }
.nh-price:disabled { color: var(--nh-ink-3); background: transparent; border-color: transparent; }
.nh-workform__fields { display: grid; gap: var(--nh-s4); }
@media (min-width: 640px) { .nh-workform__fields { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.nh-workorder {
  display: grid;
  gap: var(--nh-s2);
  padding: var(--nh-s4);
  background: var(--nh-paper-0);
  border: 2px dashed var(--nh-rule-2);
  border-left: 6px solid var(--nh-caution);
}
.nh-workorder__kicker { font: 700 var(--nh-fs-label)/1.2 var(--nh-font-data); letter-spacing: 0.12em; text-transform: uppercase; color: var(--nh-ink-3); }
.nh-workorder__what { font: 700 1.25rem/1.3 var(--nh-font-text); }

/* ------------------------------------------------------------------ the market and the roster */
.nh-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: var(--nh-s2) var(--nh-s4);
  padding: var(--nh-s3) var(--nh-s4);
  background: var(--nh-paper-2);
  border-left: 4px solid var(--nh-rule-2);
}
.nh-filters .nh-field { gap: 4px; }
.nh-filters .nh-input { width: auto; padding: 6px 8px 5px; }
.nh-filters input.nh-input { width: 7rem; text-align: right; font-variant-numeric: tabular-nums; }
.nh-btn--sm { padding: 7px 10px 5px; font-size: 0.85rem; letter-spacing: 0.08em; }
.nh-bid { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; }
.nh-bid .nh-input { width: 7.5rem; padding: 6px 8px 5px; text-align: right; font-variant-numeric: tabular-nums; }
.nh-bid select.nh-input { width: auto; text-align: left; }
.nh-tag--lead { color: var(--nh-win); }
.nh-tag--out { color: var(--nh-stitch-ink); }
.nh-tag--fa { color: var(--nh-ink-2); }
/* The market's auctions (market.ts auctionTable): where each one's bidding stands on two lines, the
   price over who'd pay it or the viewer's place; the closing time and the bid form never wrap, so
   every row is the same height. */
.nh-bidding { display: inline-grid; justify-items: end; gap: 2px; white-space: nowrap; }
.nh-contract b { font-weight: 600; }
.nh-bidding b { font-weight: 700; }
.nh-bidding small { display: inline-flex; align-items: center; gap: 4px; font: 600 var(--nh-fs-small)/1.2 var(--nh-font-data); color: var(--nh-ink-3); }
/* The viewer's own bid: a filled pill, green leading, red outbid; an outbid row is marked in red. */
.nh-pill { display: inline-block; padding: 4px 9px 3px; border-radius: 999px; font: 700 0.75rem/1 var(--nh-font-data); letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; color: #fff; }
.nh-pill--lead { background: var(--nh-win); }
.nh-pill--out { background: var(--nh-stitch); }
.nh-table tbody tr.is-outbid { --row-bg: color-mix(in srgb, var(--nh-stitch) 9%, var(--nh-surface)); }
.nh-table tbody tr.is-outbid > :first-child { box-shadow: inset 4px 0 0 var(--nh-stitch); }
.nh-bidding .nh-cap { --size: 15px; }
/* The pill sits on the bids' line, no taller than it, so every auction row is the same height. */
.nh-bidding .nh-pill { padding: 2px 7px 1px; font-size: 0.7rem; }
/* An auction's bidding history: one line a bid, the latest first. */
.nh-bidlog { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.nh-bidlog li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--nh-s2); }
.nh-bidlog .nh-cap { --size: 15px; }
.nh-bidlog__when { min-width: 9rem; color: var(--nh-ink-3); }
/* The closing time on two lines, day over hour, so the bid box has room for seven digits and the
   auctions still fit the page with the Bid button (Rob: "missing the actual bid button", then "the
   10300 in the third row is cut off"). */
.nh-table--auctions .nh-closes { width: 5.5rem; color: var(--nh-ink-2); }
.nh-table--auctions .nh-bid { flex-wrap: nowrap; }
.nh-table--auctions .nh-bid .nh-input { width: 5.25rem; padding-inline: 6px; font-variant-numeric: tabular-nums; }
.nh-table--auctions .nh-bid input.nh-input { appearance: textfield; }
.nh-table--auctions .nh-bid input::-webkit-inner-spin-button { appearance: none; margin: 0; }
.nh-table--auctions .nh-bid select.nh-input { width: 4.75rem; }
.nh-table tbody tr.nh-manage-row,
.nh-table tbody tr.nh-manage-row:hover { --row-bg: var(--nh-paper-0); }
.nh-manage { display: grid; gap: var(--nh-s4); padding: var(--nh-s2) 0 var(--nh-s3); white-space: normal; text-align: left; }
@media (min-width: 760px) { .nh-manage { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); } }
.nh-manage__block { display: grid; gap: var(--nh-s2); align-content: start; font: 500 var(--nh-fs-small)/1.35 var(--nh-font-data); }
.nh-manage__block .nh-bid { justify-content: flex-start; }
.nh-manage__title { font: 700 var(--nh-fs-label)/1.2 var(--nh-font-data); letter-spacing: 0.1em; text-transform: uppercase; color: var(--nh-ink-3); }

/* ------------------------------------------------------------------ depth: rest days and the injured list */
/* The lineup card's next game: who sits, and who stands in. */
.nh-today { display: grid; gap: var(--nh-s2); padding: var(--nh-s3) var(--nh-s4); background: var(--nh-paper-2); border-left: 4px solid var(--nh-lamp); }
.nh-today__title { font: 700 var(--nh-fs-label)/1.2 var(--nh-font-data); letter-spacing: 0.1em; text-transform: uppercase; color: var(--nh-ink-3); }
.nh-today__list { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; font: 500 var(--nh-fs-small)/1.4 var(--nh-font-data); }
.nh-editrow.is-out .nh-editrow__player { text-decoration: line-through; text-decoration-color: var(--nh-stitch-ink); }

/* ------------------------------------------------------------------ the academy and the draft */
/* A prospect's potential: the scouts' estimate, and the range they give it. */
.nh-range { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.nh-range small { font: 600 var(--nh-fs-small)/1 var(--nh-font-data); color: var(--nh-ink-3); font-variant-numeric: tabular-nums; }
.nh-actions { display: inline-flex; flex-wrap: nowrap; align-items: center; justify-content: flex-end; gap: 6px; }
/* A row with many actions (the admin's owners): they wrap onto a second line rather than push the
   table past the page (Rob: "scrolling here is annoying"). */
/* The admin's owners (admin.ts ownersTab): one line an owner, plain text controls, "on" in ink. */
.nh-oneline td, .nh-oneline th { white-space: nowrap; }
.nh-oneline__cut { display: inline-block; max-width: 11rem; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.nh-oneline .nh-linkbtn { color: var(--nh-ink-3); }
.nh-oneline .nh-linkbtn.is-on { color: var(--nh-ink-1); font-weight: 700; }
.nh-oneline .nh-linkbtn:hover { color: var(--nh-stitch-ink); }
.nh-oneline__ask { color: var(--nh-stitch-ink); font-weight: 700; }

/* ------------------------------------------------------------------ game page */
.nh-gamehead { display: grid; gap: var(--nh-s4); }
.nh-gamehead__top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--nh-s2) var(--nh-s4); }
.nh-gamehead__status { display: inline-flex; align-items: center; gap: 10px; font: 800 1.1rem/1 var(--nh-font-display); letter-spacing: 0.16em; text-transform: uppercase; }
.nh-gamehead__status b { color: var(--nh-lamp); font-weight: 800; }
.nh-gamehead__facts { display: flex; flex-wrap: wrap; gap: 4px 16px; font: 600 var(--nh-fs-label)/1.3 var(--nh-font-data); letter-spacing: 0.1em; text-transform: uppercase; color: var(--nh-chalk-2); }
.nh-gamehead__body { display: grid; gap: var(--nh-s4); align-items: center; }
.nh-decisions { display: flex; flex-wrap: wrap; gap: var(--nh-s3) var(--nh-s5); padding-top: var(--nh-s3); border-top: 2px solid rgba(241, 239, 228, 0.28); font: 600 1rem/1.2 var(--nh-font-data); }
.nh-decisions > span { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; align-items: center; color: var(--nh-chalk-2); }
.nh-decisions b { grid-row: span 2; font-size: 1.1rem; min-width: 1.5em; height: 1.75em; }
.nh-decisions a { text-decoration: none; color: var(--nh-chalk-1); font-weight: 700; }
.nh-decisions a:hover { text-decoration: underline; }
.nh-decisions small { font: 600 var(--nh-fs-label)/1.2 var(--nh-font-data); letter-spacing: 0.08em; text-transform: uppercase; color: var(--nh-chalk-2); }
@media (min-width: 1000px) {
  .nh-gamehead__body { grid-template-columns: auto minmax(0, 1fr); gap: var(--nh-s6); }
  .nh-decisions { flex-direction: column; padding: 0 0 0 var(--nh-s5); border-top: 0; border-left: 2px solid rgba(241, 239, 228, 0.28); }
}
/* Extra innings need the full width for the line score; decisions drop below it. */
.nh-gamehead--long .nh-gamehead__body { grid-template-columns: minmax(0, 1fr); }
.nh-gamehead--long .nh-decisions { flex-direction: row; padding: var(--nh-s3) 0 0; border-left: 0; border-top: 2px solid rgba(241, 239, 228, 0.28); }

/* Win probability, one line against the even-money rule. */
.nh-wp { display: grid; gap: var(--nh-s2); }
.nh-wp__plot { position: relative; height: 200px; margin: 0 0 22px 44px; border-top: 1px solid var(--nh-rule-1); border-bottom: 1px solid var(--nh-rule-1); }
.nh-wp__plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.nh-wp__line { fill: none; stroke: var(--nh-ink-1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.nh-wp__area { fill: rgba(22, 33, 27, 0.07); }
.nh-wp__even { stroke: var(--nh-rule-2); stroke-width: 1; vector-effect: non-scaling-stroke; }
.nh-wp__inning { stroke: var(--nh-rule-1); stroke-width: 1; vector-effect: non-scaling-stroke; }
.nh-wp__hit { fill: transparent; }
.nh-wp__hit:hover { fill: rgba(22, 33, 27, 0.06); }
.nh-wp__side {
  position: absolute;
  left: -44px;
  display: flex;
  align-items: center;
  gap: 4px;
  font: 700 var(--nh-fs-label)/1 var(--nh-font-data);
  letter-spacing: 0.08em;
  color: var(--nh-ink-2);
}
.nh-wp__side--top { top: 4px; }
.nh-wp__side--bottom { bottom: 4px; }
.nh-wp__side--mid { top: 50%; transform: translateY(-50%); color: var(--nh-ink-3); font-weight: 600; }
.nh-wp__x { position: absolute; top: 100%; margin-top: 5px; transform: translateX(-50%); font: 600 var(--nh-fs-label)/1 var(--nh-font-data); color: var(--nh-ink-3); }
.nh-wp__mark {
  position: absolute;
  display: grid;
  place-items: center;
  width: 22px; height: 22px;
  margin: -11px 0 0 -11px;
  border-radius: 50%;
  background: var(--nh-stitch);
  color: #fff;
  box-shadow: 0 0 0 2px var(--nh-paper-1);
  font: 800 0.8rem/1 var(--nh-font-data);
  text-decoration: none;
  z-index: 1;
}
.nh-wp__mark:hover { background: var(--nh-ink-1); color: #fff; }
.nh-wp figcaption { font: 500 var(--nh-fs-small)/1.3 var(--nh-font-data); color: var(--nh-ink-3); }

.nh-moments { display: grid; gap: 0; counter-reset: moment; }
.nh-moment {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 4px var(--nh-s3);
  align-items: baseline;
  padding: var(--nh-s3) 0;
  border-bottom: 1px solid var(--nh-rule-1);
}
.nh-moment:first-child { padding-top: 0; }
.nh-moment__n { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--nh-stitch); color: #fff; font: 800 0.8rem/1 var(--nh-font-data); align-self: start; margin-top: 2px; }
.nh-moment__when { font: 700 var(--nh-fs-label)/1.2 var(--nh-font-data); letter-spacing: 0.1em; text-transform: uppercase; color: var(--nh-ink-3); }
.nh-moment__text { font-size: 0.975rem; line-height: 1.4; }
.nh-moment__swing { font: 700 1.05rem/1 var(--nh-font-data); font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.nh-moment__swing small { display: block; margin-top: 3px; font: 600 var(--nh-fs-label)/1 var(--nh-font-data); letter-spacing: 0.06em; color: var(--nh-ink-3); }

.nh-box { display: grid; gap: var(--nh-s6); }
@media (min-width: 1000px) { .nh-box { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--nh-s5); } }
.nh-table--box .pos { color: var(--nh-ink-3); font-weight: 500; font-size: var(--nh-fs-small); margin-left: 6px; text-transform: lowercase; }
.nh-table--box td.star { font-weight: 700; }
.nh-boxnotes { margin-top: var(--nh-s3); font: 500 var(--nh-fs-small)/1.55 var(--nh-font-data); color: var(--nh-ink-2); }
.nh-boxnotes b { color: var(--nh-ink-1); letter-spacing: 0.04em; }
.nh-boxnotes p + p { margin-top: 2px; }

/* Play-by-play: one row per inning, top and bottom halves side by side like a scorebook spread. */
.nh-pbp { display: grid; }
.nh-inning {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1fr);
  gap: 0 var(--nh-s5);
  padding: var(--nh-s4) 0;
  border-top: 1px solid var(--nh-rule-2);
}
.nh-inning__num { font: 800 2.3rem/0.9 var(--nh-font-display); letter-spacing: -0.01em; color: var(--nh-ink-1); }
.nh-inning__num sup { font-size: 0.45em; vertical-align: 0.9em; letter-spacing: 0.04em; }
.nh-half { min-width: 0; }
.nh-half__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--nh-s2);
  padding-bottom: 5px;
  margin-bottom: 2px;
  border-bottom: 1px solid var(--nh-ink-1);
  font: 700 var(--nh-fs-label)/1.2 var(--nh-font-data);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.nh-half__line { font-weight: 600; color: var(--nh-ink-3); letter-spacing: 0.06em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nh-half__line b { color: var(--nh-ink-1); }
.nh-play {
  display: grid;
  grid-template-columns: 26px 14px minmax(0, 1fr);
  gap: var(--nh-s2);
  align-items: start;
  padding: 6px 0 5px;
  border-bottom: 1px solid var(--nh-rule-1);
  font-size: 0.925rem;
  line-height: 1.35;
}
.nh-play:last-child { border-bottom: 0; }
.nh-play__text b { font-weight: 700; }
.nh-play__score {
  display: inline-block;
  margin-left: 4px;
  padding: 3px 6px 1px;
  background: var(--nh-board-1);
  color: var(--nh-chalk-1);
  border-radius: var(--nh-r-1);
  font: 800 0.8rem/1 var(--nh-font-display);
  letter-spacing: 0.08em;
  white-space: nowrap;
  vertical-align: 1px;
}
.nh-play.is-key .nh-play__text { font-weight: 600; }
.nh-play.is-change { grid-template-columns: 48px minmax(0, 1fr); color: var(--nh-ink-3); font-style: italic; font-size: var(--nh-fs-small); }
.nh-play__kmark { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 4px; border-radius: 50%; background: var(--nh-stitch); color: #fff; font: 800 0.7rem/1 var(--nh-font-data); font-style: normal; vertical-align: 1px; }
@media (max-width: 799px) {
  .nh-inning { grid-template-columns: minmax(0, 1fr); gap: var(--nh-s3); }
  .nh-inning__num { font-size: 1.9rem; }
}

/* Base-state diamond and outs, as a scorer would mark them. */
.nh-bases { position: relative; display: inline-block; width: 26px; height: 18px; margin-top: 1px; }
.nh-bases i {
  position: absolute;
  width: 7px; height: 7px;
  border: 1.5px solid var(--nh-ink-3);
  transform: rotate(45deg);
  background: transparent;
}
.nh-bases .b2 { left: 9.5px; top: 1px; }
.nh-bases .b3 { left: 2px; top: 8.5px; }
.nh-bases .b1 { left: 17px; top: 8.5px; }
.nh-bases i.on { background: var(--nh-ink-1); border-color: var(--nh-ink-1); }
.nh-outs { display: inline-flex; flex-direction: column; gap: 3px; padding-top: 3px; }
.nh-outs i { width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--nh-ink-3); }
.nh-outs i.on { background: var(--nh-stitch); border-color: var(--nh-stitch); }

/* ------------------------------------------------------------------ player page */
.nh-player { display: grid; gap: var(--nh-s6); align-items: start; }
@media (min-width: 1000px) {
  .nh-player { grid-template-columns: 340px minmax(0, 1fr); }
  .nh-player__card { position: sticky; top: var(--nh-s5); }
}

/* Card front: white-bordered, die-cut corners; the player's portrait (web/src/portrait.ts) on his
   club's colour, lightened, under a halftone screen, his position on a plate in the corner. */
.nh-bbcard {
  position: relative;
  container-type: inline-size;
  width: min(100%, 340px);
  aspect-ratio: 5 / 7;
  margin: 0 auto;
  padding: 14px;
  background: #fcfbf6;
  border-radius: var(--nh-r-card);
  box-shadow: 0 1px 0 rgba(22, 33, 27, 0.08), 0 22px 40px -12px rgba(22, 33, 27, 0.4), 0 4px 10px rgba(22, 33, 27, 0.12);
  transform: rotate(-1.2deg);
}
.nh-bbcard__art {
  position: absolute;
  inset: 14px 14px 92px;
  overflow: hidden;
  border-radius: 3px;
  background-color: color-mix(in srgb, var(--c1) 20%, #efe6d3);
  background-image: linear-gradient(160deg, rgba(255, 255, 255, 0.25), transparent 50%, rgba(0, 0, 0, 0.08));
}
.nh-bbcard__art::before {
  /* halftone screen */
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, var(--c1) 1.2px, transparent 1.6px);
  background-size: 7px 7px;
  opacity: 0.2;
  -webkit-mask-image: linear-gradient(200deg, #000 0%, transparent 62%);
  mask-image: linear-gradient(200deg, #000 0%, transparent 62%);
}
.nh-bbcard__ball {
  /* a giant baseball behind him: outline, seams and stitches in the club's colour */
  position: absolute;
  width: 118%;
  left: 8%;
  top: -12%;
  color: var(--c1);
  opacity: 0.08;
}
.nh-bbcard__art .nh-portrait { position: absolute; inset: 0; width: 100%; height: 100%; }
.nh-bbcard__pos {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 5px 8px 3px;
  font: 900 1.45rem/1 var(--nh-font-display);
  color: var(--c2);
  background: var(--c1);
  box-shadow: 0 0 0 2px var(--c2), 0 0 0 4px var(--c1);
}
.nh-bbcard__plate {
  position: absolute;
  left: 14px; right: 14px; bottom: 14px;
  height: 70px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 4px;
  text-align: center;
}
.nh-bbcard__name { font: 400 min(2.1rem, 10cqi)/1 var(--nh-font-script); color: var(--nh-ink-1); white-space: nowrap; }
.nh-bbcard__team { font: 700 var(--nh-fs-label)/1 var(--nh-font-data); letter-spacing: 0.18em; text-transform: uppercase; color: var(--nh-ink-2); }
.nh-bbcard__badge {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--nh-lamp);
  color: var(--nh-ink-1);
  box-shadow: 0 0 0 3px #fcfbf6, 0 4px 10px rgba(0, 0, 0, 0.3);
  text-align: center;
}
.nh-bbcard__badge b { display: block; font: 800 1.7rem/0.9 var(--nh-font-display); }
.nh-bbcard__badge small { display: block; font: 700 0.625rem/1 var(--nh-font-data); letter-spacing: 0.14em; }

/* A player's head in lists and on the broadcast (portrait.ts avatar): round, on his club's colour. */
.nh-face {
  display: inline-block;
  flex: none;
  vertical-align: middle;
  border-radius: 50%;
  overflow: hidden;
  background: color-mix(in srgb, var(--c1) 20%, #efe6d3);
  box-shadow: 0 0 0 1.5px var(--c1);
}
.nh-face--sm { width: 28px; height: 28px; }
.nh-face--md { width: 40px; height: 40px; }
.nh-face--lg { width: 56px; height: 56px; }
.nh-face .nh-portrait { display: block; width: 100%; height: 100%; }
.nh-who { display: inline-flex; align-items: center; gap: 8px; }
/* An international signing's flag (flags.ts), beside his name. */
.nh-flag { display: inline-block; flex: none; width: 18px; height: 12px; vertical-align: -1px; border-radius: 1px; box-shadow: 0 0 0 1px rgb(0 0 0 / 0.18); }
.nh-bbback__name .nh-flag { width: 27px; height: 18px; vertical-align: 0.1em; }
.nh-flags { display: inline-flex; flex-wrap: wrap; gap: 4px; vertical-align: middle; }

/* Card back: grey board stock printed in two colours. */
.nh-bbback {
  --nh-surface: #dcd8c6;
  background-color: #dcd8c6;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='1' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .27 0 0 0 0 .2 0 0 0 .16 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  border-radius: var(--nh-r-card);
  padding: var(--nh-s5);
  box-shadow: var(--nh-shadow-paper);
  display: grid;
  gap: var(--nh-s4);
  min-width: 0;
}
.nh-bbback__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--nh-s2) var(--nh-s4); padding-bottom: var(--nh-s3); border-bottom: 3px solid var(--nh-stitch-ink); }
.nh-bbback__name { font: 800 2.2rem/0.95 var(--nh-font-display); text-transform: uppercase; letter-spacing: 0.01em; }
.nh-bbback__pos { font: 700 var(--nh-fs-small)/1.2 var(--nh-font-data); letter-spacing: 0.14em; text-transform: uppercase; color: var(--nh-stitch-ink); }
.nh-bio { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: var(--nh-s2) var(--nh-s4); }
.nh-bio dt { font: 700 var(--nh-fs-label)/1.2 var(--nh-font-data); letter-spacing: 0.1em; text-transform: uppercase; color: var(--nh-stitch-ink); }
.nh-bio dd { font: 600 1rem/1.25 var(--nh-font-data); }
.nh-bbback .nh-table thead th { color: var(--nh-stitch-ink); border-bottom-color: var(--nh-stitch-ink); }
.nh-bbback .nh-table tbody tr:hover { --row-bg: #d2cdb9; }
.nh-bbback__note { font: italic 500 0.975rem/1.45 var(--nh-font-text); color: var(--nh-ink-2); padding-top: var(--nh-s3); border-top: 1px solid rgba(168, 40, 30, 0.35); }
.nh-bbback__note b { font-style: normal; font: 700 var(--nh-fs-label)/1 var(--nh-font-data); letter-spacing: 0.12em; text-transform: uppercase; color: var(--nh-stitch-ink); margin-right: 6px; }

/* The scout's report: tools on the 20-80 scale. */
.nh-scout {
  --nh-surface: var(--nh-paper-0);
  background: var(--nh-paper-0);
  border: 1px solid var(--nh-rule-2);
  box-shadow: var(--nh-shadow-paper);
  padding: var(--nh-s5);
  display: grid;
  gap: var(--nh-s4);
}
.nh-scout__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--nh-s2); border-bottom: 3px double var(--nh-ink-1); padding-bottom: var(--nh-s2); }
.nh-scout__title { font: 800 1.5rem/1 var(--nh-font-display); letter-spacing: 0.1em; text-transform: uppercase; }
.nh-scout__cols { display: grid; gap: var(--nh-s5); }
@media (min-width: 700px) { .nh-scout__cols { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }
.nh-tools { display: grid; }
.nh-tool {
  display: grid;
  grid-template-columns: 7.2rem minmax(0, 1fr) 3rem;
  align-items: center;
  gap: var(--nh-s3);
  padding: 8px 0;
  border-bottom: 1px solid var(--nh-rule-1);
}
.nh-tool__name { font: 600 0.95rem/1.2 var(--nh-font-data); }
.nh-tool__name small { display: block; font: 500 var(--nh-fs-label)/1.2 var(--nh-font-data); color: var(--nh-ink-3); letter-spacing: 0.02em; }
.nh-tool .nh-grade { justify-self: end; }
/* The playoff bracket (league.ts bracket): the rounds left to right, each matchup's two clubs, the
   better seed on top; a club that's out greys, a series won lights its wins, the viewer's club is
   marked as in the standings. Sideways on a phone. */
.nh-bracket-wrap { overflow-x: auto; }
.nh-bracket { display: grid; grid-template-columns: repeat(4, minmax(170px, 1fr)); gap: var(--nh-s4); min-width: 720px; }
.nh-bracket__round { display: grid; grid-template-rows: auto 1fr; gap: var(--nh-s3); }
.nh-bracket__games { display: grid; align-content: space-around; gap: var(--nh-s3); }
.nh-bracket__name { margin: 0; font: 700 var(--nh-fs-label)/1.3 var(--nh-font-data); letter-spacing: 0.1em; text-transform: uppercase; color: var(--nh-ink-2); }
.nh-bracket__name small { display: block; font-weight: 600; letter-spacing: 0.06em; color: var(--nh-ink-3); }
.nh-bracket__match { display: grid; border: 1px solid var(--nh-rule-1); border-radius: var(--nh-r-1); background: var(--nh-paper-1); }
.nh-bracket__team { display: flex; align-items: center; justify-content: space-between; gap: var(--nh-s2); min-height: 2.6em; padding: 6px 10px; }
.nh-bracket__team + .nh-bracket__team { border-top: 1px solid var(--nh-rule-1); }
.nh-bracket__team b { font: 700 0.95rem/1 var(--nh-font-data); font-variant-numeric: tabular-nums; }
.nh-bracket__team b.is-won { color: var(--nh-win); }
.nh-bracket__team.is-out { opacity: 0.5; }
.nh-bracket__team.is-open { font: 500 var(--nh-fs-small)/1.2 var(--nh-font-data); color: var(--nh-ink-3); }
.nh-bracket__team.is-mine { box-shadow: inset 3px 0 0 var(--nh-lamp); }
/* A glove grade at a position he's still learning (lineup.ts gloveChip): ringed in a dashed line. */
.nh-learning { display: inline-block; }
.nh-learning .nh-grade { outline: 2px dashed var(--nh-ink-3); outline-offset: 2px; }
/* A position he's never played (lineup.ts gloveChip): the grade he'd start at, faint, no chip. */
.nh-newpos { display: inline-grid; place-items: center; min-width: 2.15em; height: 1.6em; font: 600 var(--nh-fs-data)/1 var(--nh-font-data); font-variant-numeric: tabular-nums; color: var(--nh-ink-3); }
.nh-scale { position: relative; height: 14px; }
.nh-scale::before {
  /* the printed 0-100 ruler: a tick every 10 */
  content: '';
  position: absolute;
  inset: 3px 0;
  background:
    linear-gradient(90deg, var(--nh-rule-2) 1px, transparent 1px) 0 0 / calc(100% / 10 - 0.1px) 100% repeat-x,
    linear-gradient(var(--nh-rule-1), var(--nh-rule-1)) 0 50% / 100% 1px no-repeat;
  border-right: 1px solid var(--nh-rule-2);
}
.nh-scale i {
  position: absolute;
  left: 0;
  top: 3px;
  bottom: 3px;
  width: calc(var(--g) * 1%);
  background: var(--nh-board-1);
  border-radius: 0 2px 2px 0;
}
.nh-scale i::after {
  content: '';
  position: absolute;
  right: -4px;
  top: -3px;
  bottom: -3px;
  width: 4px;
  background: var(--nh-ink-1);
  border-radius: 1px;
}
.nh-scale--legend { height: 16px; font: 600 var(--nh-fs-label)/1 var(--nh-font-data); color: var(--nh-ink-3); }
.nh-scale--legend::before { display: none; }
.nh-scale--legend span { position: absolute; transform: translateX(-50%); top: 2px; }
.nh-overall { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--nh-s3); }
.nh-overall > div { display: grid; gap: 6px; justify-items: start; padding: var(--nh-s3); background: var(--nh-paper-1); border: 1px solid var(--nh-rule-1); }
.nh-overall dt { font: 700 var(--nh-fs-label)/1.2 var(--nh-font-data); letter-spacing: 0.1em; text-transform: uppercase; color: var(--nh-ink-3); }
.nh-overall dd { display: flex; align-items: center; gap: 10px; font: 600 var(--nh-fs-small)/1.2 var(--nh-font-data); color: var(--nh-ink-2); }

/* ------------------------------------------------------------------ footer */
.nh-footer {
  border-top: 3px solid var(--nh-board-3);
  background: var(--nh-board-2);
  color: var(--nh-chalk-2);
  font: 500 var(--nh-fs-small)/1.5 var(--nh-font-data);
}
.nh-footer__inner { max-width: var(--nh-page-max); margin: 0 auto; padding: var(--nh-s5) var(--nh-gutter); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--nh-s2) var(--nh-s5); }
.nh-footer .nh-wordmark { font-size: 1.5rem; padding-bottom: 8px; }

/* ------------------------------------------------------------------ app frame */
.nh-app { display: flex; flex-direction: column; min-height: 100vh; }

/* A lamp that runs under the masthead while a page loads (after a beat, so quick loads don't flicker). */
.nh-loadbar { position: absolute; left: 0; right: 0; bottom: -3px; height: 3px; overflow: hidden; pointer-events: none; }
.is-loading .nh-loadbar::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 30%;
  background: var(--nh-lamp);
  box-shadow: 0 0 8px var(--nh-lamp);
  animation: nh-load 1.1s var(--nh-ease) 0.15s infinite both;
}
@keyframes nh-load { from { transform: translateX(-100%); } to { transform: translateX(340%); } }

.nh-club--empty { padding: 9px 12px 7px; font: 800 1rem/1 var(--nh-font-display); letter-spacing: 0.1em; text-transform: uppercase; }

.nh-strip__inner { align-items: center; }
.nh-strip__end { margin-left: auto; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.nh-strip__who { color: var(--nh-chalk-1); text-decoration: none; }
a.nh-strip__who:hover { color: var(--nh-lamp); text-decoration: underline; }
.nh-strip__btn {
  padding: 5px 8px 4px;
  background: none;
  border: 1px solid var(--nh-board-edge);
  border-radius: var(--nh-r-1);
  color: var(--nh-chalk-1);
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  text-decoration: none;
  cursor: pointer;
}
.nh-strip__btn:hover { border-color: rgba(255, 201, 60, 0.6); color: var(--nh-lamp); }
.nh-strip__btn[disabled] { cursor: progress; opacity: 0.7; }
@media (max-width: 719px) { .nh-strip__end { margin-left: 0; } }

/* Local development only: the dev server saw new code and offers a reload. */
.nh-devnote {
  position: fixed;
  right: var(--nh-s4);
  bottom: calc(var(--nh-s4) + env(safe-area-inset-bottom, 0px));
  z-index: 30;
  padding: 10px 14px 8px;
  background: var(--nh-lamp);
  color: var(--nh-ink-1);
  border: 0;
  border-radius: var(--nh-r-1);
  box-shadow: var(--nh-shadow-lift);
  font: 800 0.9rem/1 var(--nh-font-display);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

/* Every error lands here, in red; confirmations in scoreboard green. */
.nh-banner-slot:empty { display: none; }
.nh-banner-slot { display: grid; gap: var(--nh-s2); margin-bottom: calc(var(--nh-s5) - var(--nh-s7)); }
.nh-banner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--nh-s4);
  padding: var(--nh-s3) var(--nh-s4);
  background: var(--nh-stitch-ink);
  color: var(--nh-paper-0);
  border-radius: var(--nh-r-1);
  box-shadow: var(--nh-shadow-paper);
  font: 600 0.95rem/1.4 var(--nh-font-data);
}
.nh-banner a { color: inherit; }
.nh-banner--outbid { background: var(--nh-outbid); color: var(--nh-ink-1); }
.nh-banner--ok { background: var(--nh-board-1); color: var(--nh-chalk-1); box-shadow: inset 4px 0 0 var(--nh-lamp), var(--nh-shadow-paper); }
.nh-banner__close {
  flex: none;
  padding: 5px 8px 4px;
  background: none;
  border: 1px solid currentColor;
  border-radius: var(--nh-r-1);
  color: inherit;
  font: 700 var(--nh-fs-label)/1 var(--nh-font-data);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

.nh-lede { max-width: 62ch; font-size: 1.05rem; line-height: 1.5; color: var(--nh-ink-2); }
.nh-lede a { color: var(--nh-ink-1); }
.nh-empty { max-width: 62ch; padding: var(--nh-s4) 0; border-top: 1px solid var(--nh-rule-1); border-bottom: 1px solid var(--nh-rule-1); color: var(--nh-ink-2); }
.nh-title--with-cap { display: flex; align-items: center; gap: var(--nh-s4); }
.nh-board__empty { font: 600 1rem/1.4 var(--nh-font-data); color: var(--nh-chalk-2); }
.nh-ticket__lede { font-size: 0.95rem; line-height: 1.45; color: var(--nh-ink-2); }

/* ------------------------------------------------------------------ sign in: an owner's pass */
.nh-account { display: grid; gap: var(--nh-s6); align-items: start; }
@media (min-width: 900px) { .nh-account { grid-template-columns: minmax(0, 1fr) minmax(0, 27rem); align-items: center; } }
.nh-account__pitch { display: grid; gap: var(--nh-s3); }
.nh-pass { background: var(--nh-paper-0); border-radius: var(--nh-r-ticket); box-shadow: var(--nh-shadow-lift); overflow: hidden; }
.nh-pass__band {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: var(--nh-s4);
  padding: 26px var(--nh-s4) var(--nh-s3);
  background: var(--nh-board-1);
  color: var(--nh-chalk-1);
  font: 800 1rem/1 var(--nh-font-display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.nh-pass__band span + span { color: var(--nh-lamp); }
.nh-pass__band::before {
  /* the lanyard slot */
  content: '';
  position: absolute;
  top: 9px; left: 50%;
  width: 46px; height: 8px;
  margin-left: -23px;
  border-radius: 4px;
  background: var(--nh-paper-1);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.45);
}
.nh-pass__body { padding: var(--nh-s5) var(--nh-s4); }

.nh-form { display: grid; gap: var(--nh-s4); }
.nh-field { display: grid; align-content: start; gap: 6px; }   /* fields side by side keep their tops in line */
.nh-field__label { font: 700 var(--nh-fs-label)/1.2 var(--nh-font-data); letter-spacing: 0.1em; text-transform: uppercase; color: var(--nh-ink-2); }
.nh-input {
  width: 100%;
  padding: 10px 12px 9px;
  background: var(--nh-paper-1);
  color: var(--nh-ink-1);
  border: 1px solid var(--nh-rule-2);
  border-bottom: 2px solid var(--nh-ink-1);
  border-radius: var(--nh-r-1) var(--nh-r-1) 0 0;
  font: 500 1rem/1.3 var(--nh-font-text);
}
.nh-input:focus-visible { outline: 3px solid var(--nh-stitch); outline-offset: 1px; background: var(--nh-paper-0); }
/* A password box's eye (ui.ts passwordInput): shows what's been typed; the slash shows while it does. */
.nh-reveal { position: relative; display: block; }
.nh-reveal .nh-input { padding-right: 44px; }
.nh-reveal__btn {
  position: absolute; top: 0; right: 0; bottom: 2px; width: 42px;
  display: grid; place-items: center; padding: 0;
  background: none; border: 0; color: var(--nh-ink-2); cursor: pointer;
}
.nh-reveal__btn:hover { color: var(--nh-ink-1); }
.nh-reveal__btn:focus-visible { outline: 3px solid var(--nh-stitch); outline-offset: -3px; }
.nh-reveal__btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nh-reveal__slash { display: none; }
.nh-reveal.is-shown .nh-reveal__slash { display: inline; }
.nh-confirm .nh-reveal { display: inline-block; }
.nh-field__hint { font: 500 var(--nh-fs-small)/1.35 var(--nh-font-data); color: var(--nh-ink-3); }
.nh-form__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--nh-s2) var(--nh-s4); font: 600 var(--nh-fs-small)/1.3 var(--nh-font-data); }
.nh-btn[disabled] { opacity: 0.55; cursor: default; }
.nh-btn[disabled]:hover { background: var(--nh-ink-1); color: var(--nh-paper-0); }
.nh-btn--ghost[disabled]:hover { background: transparent; color: var(--nh-ink-1); }

/* ------------------------------------------------------------------ the clubs */
.nh-clubgrid { display: grid; gap: var(--nh-s3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 232px), 1fr)); }
/* Six clubs a division: two rows of three. */
@media (min-width: 900px) { .nh-clubgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.nh-clubcard {
  display: grid;
  gap: var(--nh-s3);
  align-content: start;
  padding: var(--nh-s3) var(--nh-s4) var(--nh-s4);
  background: var(--nh-paper-0);
  border: 1px solid var(--nh-rule-1);
  border-top: 6px solid var(--c1);
  box-shadow: var(--nh-shadow-paper);
}
.nh-clubcard.is-owned { background: transparent; box-shadow: none; }
.nh-clubcard.is-mine { background: var(--nh-highlight); }
.nh-clubcard__name { display: flex; align-items: center; gap: var(--nh-s3); min-width: 0; text-decoration: none; }
.nh-clubcard__name:hover .nh-clubcard__city { text-decoration: underline; }
.nh-clubcard__city { display: block; font: 800 1.3rem/1 var(--nh-font-display); letter-spacing: 0.02em; text-transform: uppercase; }
.nh-clubcard__nick { display: block; font: 600 var(--nh-fs-small)/1.2 var(--nh-font-data); color: var(--nh-ink-2); }
.nh-clubcard__meta {
  display: flex;
  justify-content: space-between;
  gap: var(--nh-s2);
  padding-top: var(--nh-s2);
  border-top: 1px solid var(--nh-rule-1);
  font: 600 var(--nh-fs-label)/1.2 var(--nh-font-data);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nh-ink-3);
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------------ getting a club, naming it, the first week */
.nh-placements { max-width: 62ch; gap: 0; }
.nh-placement {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--nh-s3);
  align-items: start;
  padding: var(--nh-s3) 0;
  border-top: 1px solid var(--nh-rule-1);
  font: 500 var(--nh-fs-small)/1.4 var(--nh-font-data);
  color: var(--nh-ink-2);
  cursor: pointer;
}
.nh-placement input[type="radio"] { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--nh-board-1); }
.nh-placement b { display: block; font: 700 var(--nh-fs-data)/1.3 var(--nh-font-data); color: var(--nh-ink-1); }
.nh-placement select { margin-top: var(--nh-s2); }
.nh-placements .nh-form__actions { padding-top: var(--nh-s4); border-top: 1px solid var(--nh-rule-1); }
.nh-naming__fields { display: grid; gap: var(--nh-s4); }
@media (min-width: 640px) { .nh-naming__fields { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.nh-swatches { display: flex; flex-wrap: wrap; gap: var(--nh-s2); margin: 0; padding: 0; border: 0; }
.nh-swatches legend { width: 100%; margin-bottom: var(--nh-s2); }
.nh-swatch { position: relative; cursor: pointer; }
.nh-swatch input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.nh-swatch span {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--c1);
  color: var(--c2);
  box-shadow: inset 0 0 0 2px var(--c2);
  font: 800 1.1rem/1 var(--nh-font-display);
}
.nh-swatch input:checked + span { outline: 3px solid var(--nh-ink-1); outline-offset: 2px; }
.nh-swatch input:focus-visible + span { outline: 3px solid var(--nh-stitch); outline-offset: 2px; }
.nh-checklist { display: grid; gap: var(--nh-s2); max-width: 70ch; margin: 0; padding-left: 1.4em; }
.nh-checklist li::marker { font: 700 var(--nh-fs-data)/1 var(--nh-font-data); color: var(--nh-stitch-ink); }

/* ------------------------------------------------------------------ running the league: the admin page */
.nh-adminbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--nh-s2) var(--nh-s3); }
.nh-adminbar__form { display: flex; flex-wrap: wrap; align-items: center; gap: var(--nh-s2); max-width: 44rem; }
.nh-adminbar__form .nh-input { flex: 1 1 14rem; width: auto; }
.nh-linkbox {
  display: grid;
  gap: var(--nh-s2);
  max-width: 44rem;
  padding: var(--nh-s3) var(--nh-s4);
  background: var(--nh-paper-0);
  border: 1px solid var(--nh-rule-2);
  border-left: 4px solid var(--nh-win);
  font: 500 var(--nh-fs-small)/1.4 var(--nh-font-data);
}
.nh-linkbox b { color: var(--nh-ink-1); }
.nh-linkbox__row { display: flex; gap: var(--nh-s2); }
.nh-linkbox__row .nh-input { flex: 1; min-width: 0; font-family: var(--nh-font-data); }
.nh-confirm { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; font: 600 var(--nh-fs-small)/1.35 var(--nh-font-data); white-space: normal; }
.nh-confirm .nh-input { width: 11rem; padding: 6px 8px 5px; }
/* One page in parts: the current part is underlined like a newspaper rule. */
.nh-tabs { display: flex; flex-wrap: wrap; gap: var(--nh-s1) var(--nh-s5); border-bottom: 2px solid var(--nh-ink-1); }
.nh-tabs a {
  margin-bottom: -2px;
  padding: var(--nh-s2) 0 var(--nh-s1);
  border-bottom: 4px solid transparent;
  color: var(--nh-ink-2);
  font: 800 1.05rem/1 var(--nh-font-display);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
}
.nh-tabs a:hover { color: var(--nh-ink-1); }
.nh-tabs a[aria-current="page"] { color: var(--nh-ink-1); border-bottom-color: var(--nh-ink-1); }
/* Starting the league over: what goes, said in stitch red, around the button that does it. */
.nh-danger { display: grid; gap: var(--nh-s3); max-width: 62rem; padding: var(--nh-s4); background: var(--nh-paper-0); border: 2px solid var(--nh-stitch-ink); }
.nh-danger p { max-width: 75ch; }
.nh-danger b { color: var(--nh-stitch-ink); }
.nh-danger .nh-placements { max-width: none; }
.nh-danger .nh-adminbar__form { padding-top: var(--nh-s3); border-top: 1px solid var(--nh-rule-1); max-width: none; }
.nh-danger__title { font: 800 var(--nh-fs-h3)/1 var(--nh-font-display); letter-spacing: 0.06em; text-transform: uppercase; color: var(--nh-stitch-ink); }
.nh-btn--danger { background: var(--nh-stitch-ink); color: var(--nh-paper-0); }
.nh-btn--danger:hover { background: var(--nh-stitch); color: var(--nh-paper-0); }
.nh-errorlog { display: grid; gap: var(--nh-s2); margin: 0; padding: 0; list-style: none; }
.nh-errorlog__item summary { cursor: pointer; font: 500 var(--nh-fs-small)/1.4 var(--nh-font-data); }
.nh-errorlog__item code { font: 700 var(--nh-fs-small)/1.4 var(--nh-font-data); }
.nh-errorlog__trace {
  max-height: 24rem;
  overflow: auto;
  margin: var(--nh-s2) 0 0;
  padding: var(--nh-s3);
  background: var(--nh-paper-2);
  font: 400 0.75rem/1.45 ui-monospace, Consolas, monospace;
  white-space: pre;
}

/* ------------------------------------------------------------------ lineup card editor */
.nh-editor { display: grid; gap: var(--nh-s6); }
.nh-editor > * { min-width: 0; }
.nh-editbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--nh-s2) var(--nh-s4);
  padding: var(--nh-s3) var(--nh-s4);
  background: var(--nh-paper-2);
  border-left: 4px solid var(--nh-rule-2);
  box-shadow: var(--nh-shadow-paper);
}
.nh-editbar.is-dirty { background: var(--nh-highlight); border-left-color: var(--nh-stitch); }
.nh-editbar__status { font: 700 var(--nh-fs-small)/1.3 var(--nh-font-data); letter-spacing: 0.04em; }
.nh-editbar__buttons { display: flex; flex-wrap: wrap; gap: var(--nh-s2); }
.nh-editbar .nh-btn { padding: 9px 12px 7px; font-size: 0.9rem; }
/* The manager's orders on the staff page: what each means, a line each. */
.nh-orders { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; font: 500 var(--nh-fs-small)/1.4 var(--nh-font-data); color: var(--nh-ink-2); }
.nh-editbar__pick { display: inline-flex; align-items: center; gap: var(--nh-s2); font: 700 var(--nh-fs-small)/1.3 var(--nh-font-data); }
.nh-editbar__pick .nh-input { width: auto; padding-block: 6px 5px; }

.nh-cardpair { display: grid; gap: var(--nh-s6); align-items: start; }
.nh-cardpair > * { min-width: 0; }
@media (min-width: 960px) { .nh-cardpair { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); } }

/* Selects on the cards read as marker on the card, with a small caret. */
.nh-lineupcard--edit select, .nh-staffcard select {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  min-width: 0;
  padding: 2px 16px 0 2px;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M0 0h10L5 6z' fill='%231f2f6b'/%3E%3C/svg%3E") no-repeat right 3px center / 9px 6px;
  border: 0;
  border-bottom: 1px dashed transparent;
  border-radius: 0;
  color: var(--nh-ink-hand);
  font: 400 1.2rem/1.15 var(--nh-font-hand);
  text-overflow: ellipsis;
  cursor: pointer;
}
.nh-lineupcard--edit select:hover, .nh-staffcard select:hover { border-bottom-color: rgba(31, 47, 107, 0.45); }
.nh-lineupcard--edit option, .nh-staffcard option { font: 500 1rem/1.3 var(--nh-font-text); color: var(--nh-ink-1); }

.nh-lineupcard--edit { --line: 2.65rem; transform: rotate(-0.35deg); }
.nh-lineupcard--edit li { grid-template-columns: minmax(0, 1fr) 3.6rem auto auto; align-items: center; padding-bottom: 0; }
.nh-lineupcard--edit li::before { bottom: auto; top: 50%; transform: translateY(-50%); }
.nh-lineupcard--edit .nh-editrow__pos { text-align: center; text-align-last: center; font-size: 1.1rem; }
.nh-editrow__legend {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 3.6rem 4.7rem 3.5rem;
  gap: var(--nh-s2);
  height: 1.6rem;
  align-items: end;
  font: 700 0.6875rem/1 var(--nh-font-data);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--nh-ink-3);
}
.nh-editrow__legend span:nth-child(2), .nh-editrow__legend span:nth-child(3) { text-align: center; }
.nh-editrow__grades { display: inline-flex; align-items: center; gap: 4px; width: 4.7rem; justify-content: center; }
.nh-editrow__tag { display: none; font: 700 0.6875rem/1 var(--nh-font-data); letter-spacing: 0.1em; text-transform: uppercase; color: var(--nh-ink-3); }
.nh-editrow__grades .nh-grade, .nh-staffcard .nh-grade { font-size: 0.8rem; }
.nh-editrow__dash { display: inline-grid; place-items: center; min-width: 2.15em; font: 600 0.8rem/1 var(--nh-font-data); color: var(--nh-ink-3); }
.nh-editrow__moves { display: inline-flex; gap: 3px; }
.nh-move {
  display: inline-grid;
  place-items: center;
  width: 1.65rem;
  height: 1.65rem;
  padding: 0;
  background: var(--nh-paper-0);
  border: 1px solid var(--nh-rule-2);
  border-radius: var(--nh-r-1);
  color: var(--nh-ink-2);
  font: 700 0.9rem/1 var(--nh-font-data);
  cursor: pointer;
}
.nh-move:hover { border-color: var(--nh-ink-1); color: var(--nh-ink-1); }
.nh-move[disabled] { opacity: 0.3; cursor: default; }
.nh-move[disabled]:hover { border-color: var(--nh-rule-2); color: var(--nh-ink-2); }
/* On a phone each batter takes two ruled lines: name and position, then grades and the move buttons. */
@media (max-width: 479px) {
  .nh-lineupcard--edit { --line: auto; padding-left: 46px; background-image: none; }
  .nh-lineupcard--edit::before { left: 34px; }
  .nh-lineupcard--edit li::before { left: -36px; }
  .nh-lineupcard--edit .nh-lineupcard__head { margin-left: -46px; padding-left: 46px; }
  .nh-lineupcard--edit li { grid-template-columns: minmax(0, 1fr) auto; row-gap: 4px; height: auto; padding: 8px 0 7px; border-bottom: 1px solid rgba(31, 47, 107, 0.22); }
  .nh-lineupcard--edit .nh-editrow__pos { width: 3.3rem; }
  .nh-editrow__grades { width: auto; justify-content: flex-start; }
  .nh-editrow__tag { display: inline; }
  .nh-editrow__tag + .nh-grade, .nh-editrow__tag + .nh-editrow__dash { margin-right: 6px; }
  .nh-editrow__legend { display: none; }
  .nh-editbar { gap: var(--nh-s2); padding: var(--nh-s2) var(--nh-s3); }
  .nh-editbar .nh-btn { padding: 7px 8px 5px; font-size: 0.78rem; letter-spacing: 0.06em; }
  .nh-editbar__buttons { gap: 6px; }
}

/* Touch screens: every control a thumb can hit, about 40px, while a mouse keeps the desktop's density. */
@media (pointer: coarse) {
  .nh-btn, .nh-strip__btn, .nh-input { min-height: 40px; }
  .nh-btn--sm { min-height: 36px; padding-inline: 12px; }
  .nh-move { width: 2.4rem; height: 2.4rem; }
  .nh-lineupcard--edit select, .nh-staffcard select { min-height: 36px; }
}

/* The pitching staff: the second card on the manager's clipboard. */
.nh-staffcard {
  --nh-surface: var(--nh-paper-0);
  display: grid;
  gap: var(--nh-s2);
  padding: var(--nh-s4);
  background: var(--nh-paper-0);
  border-radius: var(--nh-r-1);
  box-shadow: var(--nh-shadow-lift);
  transform: rotate(0.35deg);
}
.nh-staffcard__head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--nh-s2); padding-bottom: var(--nh-s3); margin-bottom: var(--nh-s2); border-bottom: 2px solid rgba(200, 52, 42, 0.5); }
.nh-staffcard .nh-subhead { margin-top: var(--nh-s3); }
.nh-staffrows { display: grid; }
.nh-staffrow {
  display: grid;
  grid-template-columns: 1.5rem minmax(0, 1fr) 3rem 2.3rem;
  align-items: center;
  gap: var(--nh-s2);
  min-height: 2.5rem;
  border-bottom: 1px solid rgba(31, 47, 107, 0.22);
}
.nh-staffrow--pen { grid-template-columns: 7.2rem minmax(0, 1fr) 3rem 2.3rem; }
.nh-staffrow__label { font: 700 var(--nh-fs-label)/1.15 var(--nh-font-data); letter-spacing: 0.06em; text-transform: uppercase; color: var(--nh-ink-3); }
.nh-staffrow__rest { height: 6px; background: var(--nh-paper-3); border-radius: 1px; overflow: hidden; }
.nh-staffrow__rest i { display: block; height: 100%; background: var(--nh-board-1); }
.nh-staffcard__training { display: grid; gap: 4px; padding-top: 4px; }
@media (max-width: 479px) {
  .nh-staffrow--pen { grid-template-columns: minmax(0, 1fr) 3rem 2.3rem; }
  .nh-staffrow--pen .nh-staffrow__label { grid-column: 1 / -1; padding-top: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ------------------------------------------------------------------ help for newcomers (tips.ts) */
/* The home page's opening for a visitor: what this is, and the way in. */
.nh-intro {
  display: grid; gap: var(--nh-s3); padding: var(--nh-s5) var(--nh-s5) var(--nh-s5);
  background: var(--nh-board-1); color: var(--nh-chalk-1);
  border-radius: var(--nh-r-card); box-shadow: var(--nh-shadow-plate);
}
.nh-intro .nh-eyebrow { color: var(--nh-lamp); }
.nh-intro__title { font: 800 var(--nh-fs-h1)/0.95 var(--nh-font-display); text-transform: uppercase; letter-spacing: 0.01em; text-wrap: balance; }
.nh-intro__lede { max-width: 68ch; font: 400 var(--nh-fs-body)/var(--nh-lh-body) var(--nh-font-text); color: var(--nh-chalk-1); }
.nh-intro__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--nh-s2) var(--nh-s3); font: 600 var(--nh-fs-small)/1.3 var(--nh-font-data); }
.nh-intro .nh-btn { background: var(--nh-lamp); color: var(--nh-ink-1); border-color: var(--nh-lamp); }
.nh-intro .nh-btn--ghost { background: transparent; color: var(--nh-chalk-1); border-color: var(--nh-chalk-2); }
.nh-intro a:not(.nh-btn) { color: var(--nh-chalk-1); }
.nh-intro a:not(.nh-btn):hover { color: var(--nh-lamp); }
.nh-pagehead .nh-intro__actions { margin-top: var(--nh-s3); }
/* How it works. */
.nh-about p, .nh-about__list { max-width: 68ch; font: 400 var(--nh-fs-body)/var(--nh-lh-body) var(--nh-font-text); }
.nh-about__list { display: grid; gap: var(--nh-s2); margin: 0; padding-left: 1.2em; }
/* A page's hint, until its owner has got it. */
.nh-hint {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--nh-s2) var(--nh-s4);
  padding: var(--nh-s3) var(--nh-s4); background: var(--nh-highlight); border-left: 4px solid var(--nh-lamp);
  border-radius: var(--nh-r-1);
}
.nh-hint__text { max-width: 72ch; font: 500 var(--nh-fs-small)/1.45 var(--nh-font-data); }
.nh-hint__text b { margin-right: 0.4em; letter-spacing: var(--nh-track-caps); text-transform: uppercase; color: var(--nh-stitch-ink); }
.nh-hint__actions { display: flex; align-items: center; gap: var(--nh-s3); }
.nh-hint__off, .nh-linkbtn {
  padding: 0; background: none; border: 0; color: inherit; font: inherit; cursor: pointer;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em;
}
.nh-hint__off { font: 600 var(--nh-fs-small)/1.3 var(--nh-font-data); color: var(--nh-ink-2); }
.nh-hint__off:hover, .nh-linkbtn:hover { color: var(--nh-stitch-ink); }
.nh-account__help { display: block; margin-top: var(--nh-s2); font: 600 var(--nh-fs-small)/1.4 var(--nh-font-data); }
/* The tour: a card at a time over the page. */
.nh-tour {
  width: min(32rem, calc(100vw - 2 * var(--nh-gutter))); max-height: calc(100dvh - 2 * var(--nh-gutter)); padding: 0;
  background: var(--nh-paper-0); color: var(--nh-ink-1); border: 0; border-top: 6px solid var(--nh-lamp);
  border-radius: var(--nh-r-card); box-shadow: var(--nh-shadow-lift);
}
.nh-tour::backdrop { background: rgba(10, 24, 18, 0.62); }
.nh-tour__card { display: grid; gap: var(--nh-s3); padding: var(--nh-s5) var(--nh-s5) var(--nh-s4); }
.nh-tour__title { font: 800 var(--nh-fs-h2)/1 var(--nh-font-display); text-transform: uppercase; letter-spacing: 0.01em; text-wrap: balance; }
.nh-tour__body { font: 400 var(--nh-fs-body)/var(--nh-lh-body) var(--nh-font-text); }
.nh-tour__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--nh-s3); margin-top: var(--nh-s2); }
.nh-tour__dots { display: flex; gap: 6px; }
.nh-tour__dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--nh-rule-2); }
.nh-tour__dots span.is-on { background: var(--nh-stitch-ink); }
.nh-tour__actions { display: flex; flex-wrap: wrap; gap: var(--nh-s2); margin-left: auto; }
