/* =========================================================
   PathwayPro Houses

   Light, because this lives on a staffroom iPad and a projector in
   the hall, not on a field at night. The PathwayPro palette does the
   chrome; the houses bring their own colours, and those are the only
   loud thing on the page.
   ========================================================= */

:root {
  --ink: #253238;
  --ink-2: #3a4a52;
  --ink-3: #56666e;
  --muted: #7a878d;
  --paper: #f6f4ef;
  --card: #ffffff;
  --card-2: #f0ede6;
  --line: #e2ddd3;
  --line-2: #ece8e0;

  --gold: #cca300;
  --gold-deep: #8f7300;
  --gold-soft: rgba(204,163,0,.12);
  --terra: #c76639;
  --terra-soft: rgba(199,102,57,.12);
  --sage: #a2b4b4;
  --sage-deep: #5f8a7a;
  --sage-soft: rgba(95,138,122,.12);

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --display: "Montserrat", var(--font);
  --num: "Inter", var(--font);

  --top-h: 62px;
  --nav-h: 74px;

  --house: var(--ink);
  --house-text: #fff;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  font-family: var(--font);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
  overscroll-behavior: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}
button { cursor: pointer; border: none; background: none; }
input, select, textarea { -webkit-appearance: none; appearance: none; }
.hidden { display: none !important; }

.ic {
  width: 20px; height: 20px;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
  display: block; flex: none;
}
.ic-sm { width: 15px; height: 15px; stroke-width: 2; }
.ic-lg { width: 26px; height: 26px; stroke-width: 1.7; }

.num { font-variant-numeric: tabular-nums; }

/* ---------- Wordmark ---------- */
.wordmark {
  display: inline-flex; align-items: center;
  font-family: var(--display);
  font-weight: 900; letter-spacing: -.035em; font-size: 19px; line-height: 1;
  white-space: nowrap;
}
.wm-pathway {
  color: transparent;
  -webkit-text-stroke: 1.2px var(--ink-3);
  paint-order: stroke fill;
}
.wm-pro { color: var(--ink); }
.wm-tm {
  display: inline-grid; place-items: center;
  width: .58em; height: .58em; margin: 0 .04em;
  border: .055em solid var(--ink); border-radius: 99px;
  color: var(--ink); font-size: .62em; font-weight: 800; letter-spacing: -.04em;
  align-self: flex-start; transform: translateY(-.14em);
}
.wm-tm span { font-size: .52em; transform: translateY(-.02em); }
.wm-app { color: var(--gold-deep); letter-spacing: -.03em; margin-left: .18em; }
.wordmark-lg { font-size: 30px; }

/* =========================================================
   Shell
   ========================================================= */

.app { display: none; height: 100%; flex-direction: column; }
.app.on { display: flex; }

.topbar {
  height: var(--top-h); flex: none;
  display: flex; align-items: center; gap: 12px;
  padding: 0 18px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.topbar .spacer { flex: 1; }

.pill {
  display: inline-flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 99px;
  background: var(--card-2);
  font-size: 13px; font-weight: 600; color: var(--ink-2);
  white-space: nowrap;
}
.pill .dot { width: 8px; height: 8px; border-radius: 99px; background: var(--muted); flex: none; }
.pill.live .dot { background: var(--sage-deep); box-shadow: 0 0 0 3px var(--sage-soft); }
.pill.waiting .dot { background: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.pill.alone .dot { background: var(--terra); }
button.pill { cursor: pointer; max-width: 40vw; overflow: hidden; text-overflow: ellipsis; }
button.pill:active { border-color: var(--gold); color: var(--gold-deep); }

.banner {
  flex: none;
  display: flex; align-items: center; gap: 12px;
  padding: 13px 18px;
  background: var(--terra); color: #fff;
  font-size: 14.5px; line-height: 1.45;
  cursor: pointer;
}
.banner b { font-weight: 800; }

.screens { flex: 1; overflow: hidden; position: relative; }
.screen { display: none; height: 100%; overflow: auto; -webkit-overflow-scrolling: touch; }
.screen.on { display: block; }
.pad { padding: 18px 18px 32px; max-width: 1180px; margin: 0 auto; }

.nav {
  height: var(--nav-h); flex: none;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: var(--card);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.nav button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .01em;
  border-top: 3px solid transparent;
}
.nav button.on { color: var(--gold-deep); border-top-color: var(--gold); background: var(--gold-soft); }

/* =========================================================
   Bits and pieces
   ========================================================= */

h1 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
h3 { font-size: 14px; font-weight: 700; }

.lede { color: var(--muted); font-size: 14px; line-height: 1.5; margin-top: 4px; }
.page-head { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head .spacer { flex: 1; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px;
}
.card + .card { margin-top: 14px; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head .spacer { flex: 1; }

.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .g3, .g4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 48px; padding: 0 18px;
  border-radius: var(--r-md);
  background: var(--card); border: 1px solid var(--line);
  color: var(--ink); font-weight: 700; font-size: 15px;
  transition: transform .06s ease, background .15s ease;
}
.btn:active { transform: scale(.985); }
.btn[disabled] { opacity: .38; pointer-events: none; }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #1d1700; }
.btn-ink { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-sage { background: var(--sage-deep); border-color: var(--sage-deep); color: #fff; }
.btn-quiet { background: transparent; }
.btn-danger { color: var(--terra); border-color: rgba(199,102,57,.4); }
.btn-lg { min-height: 62px; font-size: 18px; }
.btn-sm { min-height: 38px; padding: 0 12px; font-size: 13px; border-radius: var(--r-sm); }
.btn-block { width: 100%; }

label.f { display: block; }
label.f span, .f-label {
  display: block; font-size: 12px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 7px;
}
.in {
  width: 100%; height: 50px; padding: 0 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md);
  color: var(--ink); font-size: 17px; font-weight: 600;
}
.in:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.in::placeholder { color: #a7b0b4; font-weight: 500; }
textarea.in { height: auto; min-height: 84px; padding: 12px 14px; font-size: 15px; font-weight: 500; line-height: 1.5; resize: vertical; }
select.in {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237a878d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 18px;
  padding-right: 38px;
}
.in-num { font-variant-numeric: tabular-nums; }
.in-sm { height: 42px; font-size: 15px; }

.stack > * + * { margin-top: 14px; }
.row { display: flex; align-items: center; gap: 10px; }
.spacer { flex: 1; }
.row-wrap { flex-wrap: wrap; }

.note {
  border-left: 3px solid var(--gold);
  background: var(--gold-soft);
  padding: 11px 14px; border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: 13.5px; line-height: 1.55; color: var(--ink-2);
}
.note.warn { border-left-color: var(--terra); background: var(--terra-soft); }
.note.good { border-left-color: var(--sage-deep); background: var(--sage-soft); }

.tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 99px;
  font-size: 11.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  background: var(--card-2); color: var(--ink-3);
}
.tag.gold { background: var(--gold-soft); color: var(--gold-deep); }
.tag.sage { background: var(--sage-soft); color: var(--sage-deep); }
.tag.terra { background: var(--terra-soft); color: var(--terra); }
.tag.house { background: var(--house); color: var(--house-text); }

.empty { text-align: center; padding: 34px 18px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.empty .btn { margin-top: 14px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 0 14px; border-radius: 99px;
  background: var(--card); border: 1px solid var(--line);
  font-weight: 700; font-size: 14px; color: var(--ink-2);
}
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip.gold.on { background: var(--gold); border-color: var(--gold); color: #1d1700; }
.chip.terra.on { background: var(--terra); border-color: var(--terra); color: #fff; }
.chip .x { display: flex; margin-right: -6px; opacity: .6; }

/* =========================================================
   House tiles
   ========================================================= */

.houses { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 1000px) { .houses { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .houses { grid-template-columns: 1fr; } }

.house-tile {
  position: relative; text-align: left; overflow: hidden;
  border-radius: var(--r-lg); padding: 18px 18px 16px;
  background: var(--house); color: var(--house-text);
  min-height: 150px; display: flex; flex-direction: column;
  box-shadow: 0 10px 30px rgba(37,50,56,.12);
  transition: transform .08s ease;
}
.house-tile:active { transform: scale(.985); }
.house-tile::after {
  content: ""; position: absolute; right: -40px; top: -40px;
  width: 160px; height: 160px; border-radius: 99px;
  background: rgba(255,255,255,.12);
}
.house-tile .rank {
  font-size: 11.5px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; opacity: .8;
}
.house-tile .name {
  font-family: var(--display); font-size: 22px; font-weight: 900; letter-spacing: -.02em;
  margin-top: 4px; line-height: 1.1;
}
.house-tile .motto { font-size: 12.5px; opacity: .8; margin-top: 4px; }
.house-tile .pts {
  margin-top: auto; padding-top: 12px;
  display: flex; align-items: baseline; gap: 6px;
}
.house-tile .pts b { font-size: 34px; font-weight: 900; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.house-tile .pts span { font-size: 12px; font-weight: 700; opacity: .8; text-transform: uppercase; letter-spacing: .06em; }
.house-tile .go {
  position: absolute; right: 14px; bottom: 14px;
  width: 38px; height: 38px; border-radius: 99px;
  background: rgba(255,255,255,.22); display: grid; place-items: center;
}

.swatch { width: 18px; height: 18px; border-radius: 6px; flex: none; background: var(--house); }
.swatch-lg { width: 34px; height: 34px; border-radius: 10px; }

.colour-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.colour-grid button {
  height: 44px; border-radius: var(--r-sm); border: 3px solid transparent;
}
.colour-grid button.on { border-color: var(--ink); box-shadow: inset 0 0 0 2px #fff; }

/* =========================================================
   Points sheet
   ========================================================= */

.pts-quick { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.pts-quick button {
  height: 56px; border-radius: var(--r-md);
  background: var(--card-2); border: 1px solid var(--line);
  font-weight: 800; font-size: 18px; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.pts-quick button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.sign { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sign button {
  height: 44px; border-radius: var(--r-sm);
  background: var(--card-2); border: 1px solid var(--line); font-weight: 700;
}
.sign button.on.add { background: var(--sage-deep); border-color: var(--sage-deep); color: #fff; }
.sign button.on.take { background: var(--terra); border-color: var(--terra); color: #fff; }
.pts-preview {
  display: flex; align-items: baseline; gap: 8px; justify-content: center;
  padding: 10px 0 2px;
}
.pts-preview b { font-size: 40px; font-weight: 900; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.pts-preview b.add { color: var(--sage-deep); }
.pts-preview b.take { color: var(--terra); }
.pts-preview span { color: var(--muted); font-weight: 700; }
.sheet-house {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: var(--r-md);
  background: var(--house); color: var(--house-text);
  font-family: var(--display); font-weight: 900; font-size: 18px;
}

/* =========================================================
   Ledger
   ========================================================= */

.ledger { border-top: 1px solid var(--line-2); }
.led {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--line-2); font-size: 14px;
}
.led .bar { width: 6px; align-self: stretch; border-radius: 4px; background: var(--house); flex: none; }
.led .what { flex: 1; min-width: 0; }
.led .what .t { font-weight: 700; }
.led .what .s { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.led .pts { font-weight: 900; font-size: 18px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.led .pts.add { color: var(--sage-deep); }
.led .pts.take { color: var(--terra); }
.led.void { opacity: .45; }
.led.void .pts { text-decoration: line-through; }

/* =========================================================
   Events
   ========================================================= */

.ev-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 16px;
}
.ev-card.done { border-color: rgba(95,138,122,.45); }
.ev-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.ev-head .spacer { flex: 1; }
.ev-head h3 { font-size: 17px; font-weight: 800; }
.ev-meta { font-size: 12.5px; color: var(--muted); margin-top: 3px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.podium { display: flex; flex-direction: column; gap: 6px; margin: 10px 0 12px; }
.podium div {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: var(--r-sm); background: var(--card-2); font-size: 14px;
}
.podium .place { min-width: 34px; white-space: nowrap; font-weight: 900; color: var(--ink-3); font-size: 12px; letter-spacing: .04em; }
.podium .spacer { flex: 1; }
.podium b { font-variant-numeric: tabular-nums; }
.ev-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.res-row {
  display: grid; grid-template-columns: 1fr 140px 96px; gap: 10px; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--line-2);
}
.res-row .hn { display: flex; align-items: center; gap: 10px; font-weight: 800; }
@media (max-width: 480px) { .res-row { grid-template-columns: 1fr 110px 80px; } }

/* =========================================================
   Standings
   ========================================================= */

.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filters .f-label { margin: 0 4px 0 0; }

.stand { display: flex; flex-direction: column; gap: 10px; }
.stand-row {
  display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; align-items: center;
  padding: 14px 16px; border-radius: var(--r-lg);
  background: var(--card); border: 1px solid var(--line);
}
.stand-row .rk {
  width: 44px; height: 44px; border-radius: 99px;
  display: grid; place-items: center;
  font-family: var(--display); font-weight: 900; font-size: 18px;
  background: var(--card-2); color: var(--ink-3);
}
.stand-row.first .rk { background: var(--gold); color: #1d1700; }
.stand-row .nm { font-family: var(--display); font-weight: 900; font-size: 19px; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; }
.stand-row .track { height: 12px; border-radius: 99px; background: var(--card-2); margin-top: 8px; overflow: hidden; }
.stand-row .fill { height: 100%; border-radius: 99px; background: var(--house); transition: width .5s ease; }
.stand-row .sub { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.stand-row .tot { font-size: 30px; font-weight: 900; letter-spacing: -.03em; font-variant-numeric: tabular-nums; text-align: right; }
.stand-row .tot small { display: block; font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }

.stat {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 14px 16px;
}
.stat .k { font-size: 11.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.stat .v { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat .sub { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.stat.gold .v { color: var(--gold-deep); }

.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th {
  text-align: left; font-size: 11.5px; font-weight: 800; letter-spacing: .07em;
  text-transform: uppercase; color: var(--muted);
  padding: 0 10px 9px; border-bottom: 1px solid var(--line);
}
.tbl td { padding: 12px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl td.n, .tbl th.n { text-align: right; font-variant-numeric: tabular-nums; }
.tbl tr:last-child td { border-bottom: none; }
.tbl .strong { font-weight: 800; }
.tbl .hn { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.scroll-x { overflow-x: auto; }

/* =========================================================
   Setup lists
   ========================================================= */

.li {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--line-2);
}
.li:last-child { border-bottom: none; }
.li .spacer { flex: 1; }
.li .t { font-weight: 800; }
.li .s { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.scheme { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }

/* =========================================================
   Sheets, toast
   ========================================================= */

.veil {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(37,50,56,.55);
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.veil.on { display: flex; }
.sheet {
  width: 100%; max-width: 560px; max-height: 92vh; overflow: auto;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 22px;
  box-shadow: 0 30px 80px rgba(20,30,35,.35);
}
.sheet-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.sheet-head .spacer { flex: 1; }
.sheet-foot { display: flex; gap: 10px; margin-top: 20px; }
.sheet-foot .btn { flex: 1; }

.toast-wrap {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + 18px); transform: translateX(-50%);
  z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none; width: calc(100% - 36px); max-width: 520px;
}
.toast {
  background: var(--ink); border: 1px solid var(--ink-2);
  color: #fff; border-radius: var(--r-md);
  padding: 13px 17px; font-size: 15px; font-weight: 600;
  box-shadow: 0 16px 40px rgba(20,30,35,.35);
  display: flex; align-items: center; gap: 10px; width: 100%;
}
.toast.good { border-color: var(--sage-deep); }
.toast.bad { border-color: var(--terra); }

/* =========================================================
   Sign in
   ========================================================= */

.gate {
  height: 100%; display: none; align-items: center; justify-content: center; padding: 22px;
  background:
    radial-gradient(900px 500px at 50% -10%, rgba(204,163,0,.16), transparent 70%),
    var(--paper);
}
.gate.on { display: flex; }
.gate-card { width: 100%; max-width: 440px; max-height: calc(100vh - 44px); overflow: auto; }
.gate-card .wordmark { font-size: 27px; }

/* =========================================================
   The board: standings on the hall screen
   ========================================================= */

.board {
  display: none; height: 100%; overflow: auto;
  background: var(--ink); color: #fff;
  padding: 4vh 5vw;
}
.board.on { display: flex; flex-direction: column; }
.board .wordmark { font-size: 28px; }
.board .wm-pathway { -webkit-text-stroke-color: rgba(255,255,255,.55); }
.board .wm-pro, .board .wm-tm { color: #fff; border-color: #fff; }
.board .wm-app { color: var(--gold); }
.board-head { display: flex; align-items: center; gap: 16px; margin-bottom: 4vh; }
.board-head .spacer { flex: 1; }
.board-head .season { font-family: var(--display); font-weight: 900; font-size: 22px; letter-spacing: -.02em; color: rgba(255,255,255,.7); }
.board-head .upd { font-size: 13px; color: rgba(255,255,255,.5); }
.board-rows { display: flex; flex-direction: column; gap: 2.2vh; flex: 1; justify-content: center; }
.board-row {
  display: grid; grid-template-columns: 9vh 1fr auto; gap: 3vw; align-items: center;
}
.board-row .rk {
  width: 9vh; height: 9vh; border-radius: 99px; display: grid; place-items: center;
  font-family: var(--display); font-weight: 900; font-size: 4.2vh;
  background: rgba(255,255,255,.1); color: rgba(255,255,255,.75);
}
.board-row.first .rk { background: var(--gold); color: #1d1700; }
.board-row .nm { font-family: var(--display); font-weight: 900; font-size: 5vh; letter-spacing: -.02em; line-height: 1; }
.board-row .track { height: 3.2vh; border-radius: 99px; background: rgba(255,255,255,.08); margin-top: 1.4vh; overflow: hidden; }
.board-row .fill { height: 100%; border-radius: 99px; background: var(--house); transition: width .9s cubic-bezier(.2,.8,.2,1); }
.board-row .tot { font-size: 7vh; font-weight: 900; letter-spacing: -.04em; font-variant-numeric: tabular-nums; line-height: 1; text-align: right; }
.board-row .tot small { display: block; font-size: 1.6vh; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.5); font-weight: 800; margin-top: .6vh; }
.board-foot { margin-top: 3vh; font-size: 1.8vh; color: rgba(255,255,255,.5); display: flex; gap: 2vw; flex-wrap: wrap; }
.board-exit { position: fixed; right: 14px; top: 14px; color: rgba(255,255,255,.4); }

/* =========================================================
   Print
   ========================================================= */

.print-only { display: none; }

@media print {
  body { background: #fff; color: #000; overflow: visible; }
  .print-only { display: block; }
  .print-only h1 { font-size: 22px; }
  .topbar, .nav, .no-print, .toast-wrap, .veil, .banner { display: none !important; }
  .screens, .screen { overflow: visible; height: auto; }
  .screen { display: none !important; }
  .screen.print-me { display: block !important; }
  .card, .stat, .stand-row { background: #fff; border: 1px solid #bbb; break-inside: avoid; box-shadow: none; }
  .pad { max-width: none; padding: 0; }
  .note { background: #f2f2f2; color: #000; }
}

/* ---------------------------------------------------------
   The loading bar.

   ui.js already counted the work and toggled .on / .done on
   #progress; there was simply never an element or a rule to show
   for it. A tap on an iPad at the athletics track often waits on
   the network, and the app used to sit there looking untouched.

   The creep is a CSS animation because the script sets no widths:
   it eases towards nine tenths and stops there. Only real
   completion adds .done, which takes it to the end. It never
   claims to be finished before the points are actually saved.
   --------------------------------------------------------- */
.progress {
  position: fixed;
  top: env(safe-area-inset-top, 0px);
  left: 0;
  right: 0;
  height: 3px;
  z-index: 100;
  pointer-events: none;
  opacity: 0;
}
.progress.on { opacity: 1; }
.progress.on.done { opacity: 0; transition: opacity .34s ease .2s; }

.progress .bar {
  height: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold));
  box-shadow: 0 0 10px rgba(204, 163, 0, .6);
}

/* Big steps first, then smaller and smaller: a slow request reads as
   slow rather than as stuck. */
@keyframes pp-creep {
  0%   { transform: scaleX(0); }
  10%  { transform: scaleX(.26); }
  30%  { transform: scaleX(.52); }
  60%  { transform: scaleX(.74); }
  100% { transform: scaleX(.92); }
}

.progress.on .bar { animation: pp-creep 14s cubic-bezier(.15, .75, .3, 1) forwards; }
.progress.on.done .bar {
  animation: none;
  transform: scaleX(1);
  transition: transform .22s ease-out;
}

/* Still say that something is happening, without the travel. */
@media (prefers-reduced-motion: reduce) {
  .progress.on .bar { animation: none; transform: scaleX(1); }
  .progress.on.done .bar { transition: none; }
}
