/* ==================================================================
   LEAGUE IT BEAVER — newsprint & woodcut
   Two themes, one ink. Light = cream newsprint, dark = lodge at night.
   ================================================================== */

:root {
  color-scheme: light;

  --paper:      #f2ece0;
  --surface:    #fffdf7;
  --surface-2:  #f7f1e4;
  --ink:        #14110c;
  --ink-2:      #4d463a;
  --muted:      #82786a;
  --hair:       #dbd2be;
  --rule:       #14110c;

  /* validated categorical slots (see README) */
  --series-1:   #a8431c;   /* rust */
  --series-2:   #0a6d99;   /* lake */
  --series-1-track: #f0d9cd;
  --seq-100: #f6e3d8; --seq-300: #e0a184; --seq-500: #c0653c; --seq-700: #7d3014;

  --good:     #0ca30c;
  --warning:  #fab219;
  --critical: #d03b3b;

  --art-fill: var(--surface);

  --display: Impact, Haettenschweiler, "Arial Narrow Bold", "Franklin Gothic Bold", system-ui, sans-serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --shadow: 6px 6px 0 var(--ink);
  --shadow-sm: 4px 4px 0 var(--ink);
  --maxw: 1180px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper:      #17140f;
  --surface:    #211d16;
  --surface-2:  #2a251c;
  --ink:        #f6f0e3;
  --ink-2:      #cdc4b0;
  --muted:      #968c7c;
  --hair:       #3b3529;
  --rule:       #6b6252;

  --series-1:   #d4622b;
  --series-2:   #3f9fc4;
  --series-1-track: #4a2c1c;
  --seq-100: #3a2318; --seq-300: #7c3f22; --seq-500: #b55c2c; --seq-700: #e8873f;

  --shadow: 6px 6px 0 #3a3226;
  --shadow-sm: 4px 4px 0 #3a3226;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #17140f; --surface: #211d16; --surface-2: #2a251c;
    --ink: #f6f0e3; --ink-2: #cdc4b0; --muted: #968c7c;
    --hair: #3b3529; --rule: #6b6252;
    --series-1: #d4622b; --series-2: #3f9fc4; --series-1-track: #4a2c1c;
    --seq-100: #3a2318; --seq-300: #7c3f22; --seq-500: #b55c2c; --seq-700: #e8873f;
    --shadow: 6px 6px 0 #3a3226; --shadow-sm: 4px 4px 0 #3a3226;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  overflow-x: clip;
  scroll-behavior: smooth;
  scroll-padding-top: 4.25rem;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.55 var(--sans);
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  background-image:
    radial-gradient(circle at 12% 18%, rgba(0,0,0,.035) 0 1px, transparent 1px),
    radial-gradient(circle at 62% 72%, rgba(0,0,0,.03) 0 1px, transparent 1px);
  background-size: 7px 7px, 11px 11px;
  -webkit-tap-highlight-color: color-mix(in srgb, var(--series-1) 22%, transparent);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

h1, h2, h3 { margin: 0; line-height: 1.02; letter-spacing: .01em; }
a { color: inherit; }
p { margin: 0 0 .6em; }

.skip {
  position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--paper);
  padding: .6rem 1rem; z-index: 50;
}
.skip:focus { left: 0; }

:focus-visible { outline: 3px solid var(--series-2); outline-offset: 2px; }

/* ---------------- masthead ---------------- */

.masthead { padding-top: .5rem; }
.masthead-rule { height: 0; border-top: 4px solid var(--rule); border-bottom: 2px solid var(--rule);
  padding-bottom: 3px; max-width: var(--maxw); margin: 0 auto; }
.masthead-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 1.1rem 1rem;
  display: grid; grid-template-columns: auto 1fr auto; gap: 1rem; align-items: center;
}
.mark .bv { width: 74px; height: 74px; display: block; }
.titles h1 {
  font-family: var(--display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(2.4rem, 8vw, 5.2rem); letter-spacing: .015em;
}
.tagline { font-size: .82rem; text-transform: uppercase; letter-spacing: .22em; color: var(--ink-2); margin: .35rem 0 0; }
.masthead-meta { text-align: right; display: grid; gap: .5rem; justify-items: end; }
.edition { font-size: .76rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 0; max-width: 22ch; }

.subnav {
  max-width: var(--maxw); margin: 0 auto; display: flex; flex-wrap: wrap; gap: .2rem 1.4rem;
  padding: .5rem 1rem .9rem; font-size: .78rem; text-transform: uppercase; letter-spacing: .14em;
}
.subnav a {
  text-decoration: none; color: var(--ink-2); border-bottom: 2px solid transparent;
  padding: .35rem 0 .25rem; min-height: 2.5rem; display: inline-flex; align-items: center;
}
.subnav a:hover { color: var(--ink); border-bottom-color: var(--series-1); }

/* ---------------- shared furniture ---------------- */

.band { max-width: var(--maxw); margin: 0 auto; padding: 2.2rem 1rem 1.4rem; }
.section-head { display: grid; gap: .5rem; margin-bottom: 1.2rem; }
.section-head h2 {
  font-family: var(--display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(1.9rem, 5vw, 3.1rem);
}
.sub-head {
  font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: .04em;
  font-size: 1.5rem; margin: 2.2rem 0 .5rem; padding-top: .6rem; border-top: 2px solid var(--rule);
}
.section-sub { color: var(--ink-2); font-size: .93rem; max-width: 68ch; margin: 0; }
.section-tools { display: flex; flex-wrap: wrap; gap: .8rem 1.2rem; align-items: center; justify-content: space-between; }

.divider {
  max-width: var(--maxw); margin: .15rem auto; padding: 0 1rem;
  display: flex; align-items: center; gap: .75rem; color: var(--ink);
}
.divider-rule {
  flex: 1 1 auto; height: 0; border-top: 1.5px solid var(--rule); opacity: .28; min-width: 1.5rem;
}
.bv-log {
  display: block; flex: 0 0 auto;
  width: min(200px, 46vw); height: calc(min(200px, 46vw) * 90 / 640);
  overflow: visible; opacity: .9;
}

.btn, .ghost-btn {
  font: 600 .8rem/1 var(--sans); text-transform: uppercase; letter-spacing: .1em;
  padding: .62rem .95rem; border: 2px solid var(--ink); background: var(--surface); color: var(--ink);
  cursor: pointer; border-radius: 2px; min-height: 40px;
}
.btn { background: var(--ink); color: var(--paper); box-shadow: var(--shadow-sm); }
.btn:active { transform: translate(2px,2px); box-shadow: 2px 2px 0 var(--ink); }
.ghost-btn:hover, .btn:hover { filter: brightness(1.06); }

.chips { display: flex; gap: .4rem; flex-wrap: wrap; }
.chip {
  font: 600 .72rem/1 var(--sans); text-transform: uppercase; letter-spacing: .09em;
  padding: .45rem .7rem; border: 2px solid var(--ink); background: transparent; color: var(--ink);
  cursor: pointer; border-radius: 999px; min-height: 36px;
}
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

.paper {
  background: var(--surface); border: 3px solid var(--ink); box-shadow: var(--shadow);
  padding: 1.4rem;
}

.bv { width: 100%; height: 100%; color: var(--ink); }

.fineprint { font-size: .76rem; color: var(--muted); }
#wire-more { margin-top: 1rem; }

/* ---------------- setup ---------------- */

.setup { max-width: 760px; margin: 3rem auto; padding: 0 1rem; }
.setup h2 { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: 2rem; margin-bottom: .4rem; }
.setup-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: start; margin: 1.2rem 0; }
.setup-grid label { display: grid; gap: .35rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; }
.setup-grid input {
  font: 16px var(--sans); padding: .7rem; border: 2px solid var(--ink); background: var(--surface-2); color: var(--ink);
  text-transform: none; letter-spacing: 0;
}
.setup-grid small { text-transform: none; letter-spacing: 0; color: var(--muted); font-size: .78rem; }
.or { align-self: center; font-family: var(--display); font-size: 1.3rem; color: var(--muted); padding-top: 1.4rem; }
.setup-actions { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.setup-msg { margin: 0; font-size: .85rem; color: var(--critical); }
.setup-results { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: .5rem; }
.setup-results button { width: 100%; text-align: left; text-transform: none; letter-spacing: 0; font-size: .95rem; }

/* ---------------- scoreboard ---------------- */

.week-nav { display: flex; gap: .35rem; align-items: center; flex-wrap: wrap; }
.week-nav .chip { min-width: 2.4rem; text-align: center; }

.matchups { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 1.1rem; }
.match {
  background: var(--surface); border: 3px solid var(--ink); box-shadow: var(--shadow-sm);
  padding: .9rem 1rem 1rem; display: grid; gap: .55rem;
}
.match-tag {
  font: 700 .68rem/1 var(--sans); text-transform: uppercase; letter-spacing: .14em; color: var(--muted);
  display: flex; justify-content: space-between; align-items: center; gap: .5rem;
}
.match-tag .live { color: var(--series-1); }
.side { display: grid; grid-template-columns: 34px 1fr auto; gap: .6rem; align-items: center; }
.side.lead .side-name { font-weight: 700; }
.side.trail { color: var(--ink-2); }
.avatar {
  width: 34px; height: 34px; border: 2px solid var(--ink); background: var(--surface-2);
  object-fit: cover; display: block; border-radius: 2px;
}
.side-name { min-width: 0; }
.side-name b { display: block; font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-name span { display: block; font-size: .74rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.side-score { font: 700 1.35rem/1 var(--sans); font-variant-numeric: tabular-nums; }
.match-bar { height: 8px; background: var(--series-1-track); position: relative; overflow: hidden; border-radius: 1px; }
.match-bar i { position: absolute; inset: 0 auto 0 0; background: var(--series-1); }
.match-foot { font-size: .76rem; color: var(--muted); display: flex; justify-content: space-between; gap: .5rem; }

.empty-note {
  border: 2px dashed var(--hair); padding: 1.35rem 1.1rem; text-align: center; color: var(--muted);
  background: var(--surface); max-width: 52ch; margin-inline: auto;
}

/* ---------------- spotlight (best & worst) ---------------- */

.spotlight { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.spot {
  border: 3px solid var(--ink); box-shadow: var(--shadow); padding: 1.2rem 1.2rem 1.4rem;
  display: grid; grid-template-columns: 1fr 186px; gap: 1rem; align-items: start; position: relative; overflow: hidden;
}
.spot > .bv { width: 128px; height: 150px; }
.spot h3 {
  font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: 1.55rem;
  letter-spacing: .02em; margin-bottom: .3rem;
}
.spot .who { font-size: 1.15rem; font-weight: 700; margin: .1rem 0 .1rem; }
.spot .who small { display: block; font-weight: 400; font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.spot .figure { font: 700 clamp(2.6rem, 7vw, 3.6rem)/1 var(--sans); margin: .35rem 0 .2rem; }
.spot .figure small { font-size: .34em; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-left: .35rem; }
.spot .line { font-size: .95rem; color: var(--ink-2); }
.spot .detail { font-size: .85rem; color: var(--ink-2); border-top: 2px solid var(--hair); padding-top: .5rem; margin-top: .5rem; }
.spot-good { background: var(--surface); }
.spot-bad {
  background: var(--surface);
  background-image: repeating-linear-gradient(135deg, rgba(208,59,59,.13) 0 6px, transparent 6px 12px);
}
.spot-bad h3 { color: var(--critical); }
.badge {
  display: inline-flex; align-items: center; gap: .35rem; font: 700 .68rem/1 var(--sans);
  text-transform: uppercase; letter-spacing: .12em; border: 2px solid currentColor; padding: .3rem .5rem; border-radius: 2px;
}
.badge > .bv { width: 14px; height: 14px; flex: 0 0 auto; }

.minor-awards { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px,1fr)); gap: 1rem; margin-top: 1.2rem; }
.award { border: 2px solid var(--ink); background: var(--surface); padding: .85rem .95rem; display: grid; gap: .2rem; }
.award .k { font: 700 .68rem/1.2 var(--sans); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.award .v { font-size: 1.02rem; font-weight: 700; }
.award .n { font-size: .82rem; color: var(--ink-2); }

/* ---------------- power rankings ---------------- */

.power-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.power-row {
  display: grid; grid-template-columns: 38px 40px minmax(0,1.4fr) minmax(140px,2fr) 74px 70px;
  gap: .8rem; align-items: center; background: var(--surface);
  border: 2px solid var(--ink); padding: .6rem .85rem;
}
.power-rank { font: 700 1.5rem/1 var(--sans); text-align: center; font-variant-numeric: tabular-nums; }
.power-name { min-width: 0; }
.power-name b { display: block; font-size: .98rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.power-name span { font-size: .74rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.power-bar-wrap { display: grid; gap: .25rem; }
.power-bar { height: 7px; background: var(--series-1-track); position: relative; border-radius: 2px; }
.power-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--series-1); border-radius: 0 4px 4px 0; }
.power-tier { font-size: .8rem; color: var(--muted); }
.tier-chip { font: 700 .68rem/1 var(--sans); text-transform: uppercase; letter-spacing: .1em; color: var(--series-1); font-style: normal; }
.power-score { font: 700 1.1rem/1 var(--sans); font-variant-numeric: tabular-nums; text-align: right; }
.power-score span { display: block; font-size: .64rem; font-weight: 600; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; }
.spark { width: 70px; height: 26px; display: block; }
.spark polyline { fill: none; stroke: var(--muted); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.spark circle { fill: var(--series-1); stroke: var(--surface); stroke-width: 2; }

.tag-luck { font-size: .8rem; }
.tag-luck b { font-variant-numeric: tabular-nums; }

/* ---------------- the wire ---------------- */

.wire-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.wire-item {
  display: grid; grid-template-columns: 42px 1fr auto; gap: .8rem; align-items: start;
  background: var(--surface); border: 2px solid var(--ink); padding: .75rem .9rem;
}
.wire-icon { width: 42px; height: 42px; border: 2px solid var(--ink); display: grid; place-items: center; }
.wire-icon .bv { width: 22px; height: 22px; }
.wire-icon.trade { background: var(--series-1); color: var(--surface); border-color: var(--ink); }
.wire-icon.trade .bv { color: var(--surface); }
.wire-kind { font: 700 .68rem/1 var(--sans); text-transform: uppercase; letter-spacing: .13em; color: var(--muted); }
.wire-body { display: grid; gap: .3rem; min-width: 0; }
.wire-line { font-size: .95rem; }
.wire-line .in { font-weight: 700; }
.wire-line .out { color: var(--muted); text-decoration: line-through; }
.wire-team { font-weight: 700; }
.wire-when { font-size: .74rem; color: var(--muted); text-align: right; white-space: nowrap; }
.faab { font: 700 .72rem/1 var(--sans); border: 2px solid var(--ink); padding: .22rem .4rem; border-radius: 2px; }

/* ---------------- trophy ---------------- */

.trophy-band { }
.trophy-layout { display: grid; grid-template-columns: minmax(280px, 460px) 1fr; gap: 2rem; align-items: start; }
.trophy-stage { margin: 0; }
.trophy-viewer {
  aspect-ratio: 3/4; max-height: min(70vh, 540px); width: 100%;
  background: var(--surface-2); border: 3px solid var(--ink); box-shadow: var(--shadow);
  display: grid; place-items: center; cursor: grab; touch-action: none; position: relative; overflow: hidden;
  background-image: radial-gradient(ellipse at 50% 88%, rgba(0,0,0,.16), transparent 62%);
}
.trophy-viewer:active { cursor: grabbing; }
.trophy-viewer canvas { width: 100%; height: 100%; object-fit: contain; display: block; }
.trophy-fallback { width: 78%; height: 78%; }
.trophy-stage figcaption { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; margin-top: .7rem; }
.trophy-controls { margin-top: .6rem; display: flex; gap: .5rem; }

.plaques h3 { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: 1.7rem; margin-bottom: .35rem; }
.plaque-list { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: .55rem; }
.plaque {
  display: grid; grid-template-columns: 76px 1fr auto; gap: .9rem; align-items: center;
  border: 3px double var(--ink); background:
    linear-gradient(180deg, var(--surface-2), var(--surface));
  padding: .7rem .9rem;
}
.plaque .yr { font: 700 1.35rem/1 var(--sans); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.plaque .nm { font-weight: 700; font-size: 1.02rem; }
.plaque .nm span { display: block; font-weight: 400; font-size: .8rem; color: var(--muted); }
.plaque .bv { width: 26px; height: 26px; }
.plaque.blank { border-style: dashed; color: var(--muted); }
.plaque.blank .nm { font-weight: 400; font-style: italic; }

/* ---------------- history ---------------- */

.records { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px,1fr)); gap: 1rem; }
.record-card { border: 3px solid var(--ink); background: var(--surface); padding: 1rem; box-shadow: var(--shadow-sm); }
.record-card { display: grid; gap: .15rem; }
.record-card .k { display: block; font: 700 .68rem/1.3 var(--sans); text-transform: uppercase; letter-spacing: .13em; color: var(--muted); }
.record-card .v { display: block; font: 700 2.1rem/1 var(--sans); margin: .25rem 0 .1rem; }
.record-card .n { display: block; font-size: .85rem; color: var(--ink-2); line-height: 1.35; }

.table-wrap {
  overflow-x: auto; border: 3px solid var(--ink); background: var(--surface);
  -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; max-width: 100%;
}
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { padding: .55rem .7rem; text-align: right; border-bottom: 1px solid var(--hair); white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
thead th {
  font: 700 .68rem/1.2 var(--sans); text-transform: uppercase; letter-spacing: .1em; color: var(--muted);
  border-bottom: 2px solid var(--ink); position: sticky; top: 0; background: var(--surface); z-index: 1;
}
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { font-variant-numeric: tabular-nums; }
.who-cell { display: flex; align-items: center; gap: .55rem; }
.who-cell img { width: 26px; height: 26px; border: 2px solid var(--ink); border-radius: 2px; }
.medals { display: inline-flex; align-items: center; gap: .15rem; vertical-align: -3px; }
.medals .bv { width: 15px; height: 15px; color: var(--series-1); }
.heat-legend { display: flex; align-items: center; gap: .5rem; font-size: .75rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: .1em; margin: 0 0 .6rem; }
.heat-legend i { display: block; width: 26px; height: 12px; border: 1px solid var(--hair); }

.h2h-wrap table { font-size: .82rem; }
.h2h-wrap td.cell { text-align: center; font-variant-numeric: tabular-nums; padding: .5rem .4rem; min-width: 58px; }
.h2h-wrap td.self { background: var(--surface-2); color: var(--muted); }
.h2h-wrap th.rot { font-size: .66rem; }

.loading-note { display: flex; align-items: center; gap: .7rem; color: var(--muted); font-size: .9rem; padding: .8rem 0 1.2rem; }
.spinner { width: 16px; height: 16px; border: 3px solid var(--hair); border-top-color: var(--series-1); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }

/* ---------------- footer & tooltip ---------------- */

.footer {
  max-width: var(--maxw); margin: 2rem auto 0;
  padding: 1.6rem 1rem calc(3rem + env(safe-area-inset-bottom));
  border-top: 4px solid var(--rule); display: grid; gap: .5rem; justify-items: start;
  font-size: .85rem; color: var(--ink-2);
}
.footer-mark { width: 34px; height: 34px; }

.tip {
  position: fixed; z-index: 60; pointer-events: none; max-width: 260px;
  background: var(--ink); color: var(--paper); font: 500 .8rem/1.4 var(--sans);
  padding: .5rem .65rem; border-radius: 3px; box-shadow: 0 6px 20px rgba(0,0,0,.3);
}
.tip b { font-weight: 700; }

/* ---------------- responsive ---------------- */

@media (max-width: 900px) {
  .masthead-inner { grid-template-columns: auto 1fr; }
  .masthead-meta { grid-column: 1 / -1; justify-items: start; text-align: left; }
  .spotlight { grid-template-columns: 1fr; }
  .trophy-layout { grid-template-columns: 1fr; }
  .power-row { grid-template-columns: 34px 36px minmax(0,1fr) 58px; row-gap: .45rem; }
  .power-bar-wrap { grid-column: 1 / -1; }
  .spark { display: none; }
  .setup-grid { grid-template-columns: 1fr; }
  .or { padding-top: 0; }
}

@media (max-width: 720px) {
  :root {
    --shadow: 3px 3px 0 var(--ink);
    --shadow-sm: 2px 2px 0 var(--ink);
  }
  :root[data-theme="dark"] {
    --shadow: 3px 3px 0 #3a3226;
    --shadow-sm: 2px 2px 0 #3a3226;
  }

  .masthead-inner {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: .55rem;
    padding: .8rem .9rem .4rem;
  }
  .titles { display: grid; justify-items: center; width: 100%; }
  .tagline { letter-spacing: .12em; font-size: .7rem; max-width: 36ch; }
  .masthead-meta { justify-items: center; text-align: center; }
  .edition { max-width: 42ch; line-height: 1.45; }

  .subnav {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: .1rem;
    padding: .25rem .65rem .55rem;
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--paper);
    border-bottom: 1px solid var(--hair);
  }
  .subnav::-webkit-scrollbar { display: none; }
  .subnav a {
    flex: 0 0 auto;
    padding: .55rem .7rem;
    font-size: .68rem;
    letter-spacing: .1em;
    min-height: 44px;
  }

  .band { padding: 1.7rem .9rem 1.15rem; }
  .section-head h2 { font-size: clamp(1.65rem, 8.5vw, 2.35rem); }
  .section-tools { flex-direction: column; align-items: stretch; gap: .65rem; }
  .section-sub { font-size: .88rem; }

  .btn, .ghost-btn, .chip { min-height: 44px; }

  .week-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: .1rem;
  }
  .week-nav::-webkit-scrollbar { display: none; }

  .chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: .15rem;
  }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: 0 0 auto; }

  .match { padding: .85rem .85rem .9rem; }
  .side-name b { white-space: normal; line-height: 1.2; }
  .match-foot { flex-wrap: wrap; }

  .table-wrap::before {
    content: 'Swipe for the rest →';
    display: block;
    font: 700 .66rem/1 var(--sans);
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
    padding: .5rem .7rem 0;
  }
  table { font-size: .8rem; }
  th, td { padding: .45rem .5rem; }

  .records { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
  .record-card .v { font-size: 1.7rem; }

  .plaque { grid-template-columns: 64px 1fr; }
  .plaque .bv { display: none; }
}

@media (max-width: 560px) {
  .spot { grid-template-columns: 1fr; }
  .spot > .bv { width: 104px; height: 122px; justify-self: end; margin-top: -.4rem; }
  .wire-item { grid-template-columns: 34px 1fr; }
  .wire-when { grid-column: 2; text-align: left; }
  .wire-icon { width: 34px; height: 34px; }
  .setup { margin: 1.5rem auto; }
  .paper { padding: 1.1rem; }
}

@media print {
  .subnav, .week-nav, .chips, .ghost-btn, .btn, .trophy-controls { display: none !important; }
  body { background: #fff; }
  .paper, .match, .spot, .record-card { box-shadow: none; }
}

.wire-line .ptag { font-size: .74rem; color: var(--muted); letter-spacing: .04em; }

/* ---------------- the hand-drawn box art ----------------
   Lifted off photos of the shipping box and stored as alpha masks, so the
   ink takes `currentColor` and works on cream and on charcoal alike. */

.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;
}

.art {
  display: block; background-color: currentColor;
  -webkit-mask: var(--art) center / contain no-repeat;
          mask: var(--art) center / contain no-repeat;
}
.art-run   { --art: url('../assets/beaver-run.png'); }
.art-throw { --art: url('../assets/beaver-throw.png'); }
.art-catch { --art: url('../assets/beaver-catch.png'); }

.mark-art { --art: url('../assets/beaver-catch.png'); width: 78px; height: 96px; }

.wordmark {
  --art: url('../assets/wordmark.png');
  display: block; background-color: currentColor;
  -webkit-mask: var(--art) left center / contain no-repeat;
          mask: var(--art) left center / contain no-repeat;
  width: min(360px, 58vw); aspect-ratio: 569 / 575; max-height: 168px;
}

.spot > .spot-art {
  width: min(186px, 38vw);
  height: auto;
  aspect-ratio: 715 / 474;
  max-height: 196px;
}
.spot-bad > .spot-art { aspect-ratio: 821 / 676; }
@media (max-width: 900px) {
  .spot { grid-template-columns: 1fr minmax(110px, 140px); }
  .spot > .spot-art { width: 140px; max-height: 150px; }
}
@media (max-width: 560px) {
  .spot { grid-template-columns: 1fr; }
  .spot > .spot-art {
    width: min(168px, 46vw); max-height: 140px; justify-self: end; margin-top: -.2rem;
  }
}
@media (max-width: 720px) {
  .mark-art { width: 52px; height: 64px; }
  .wordmark {
    width: min(260px, 76vw);
    max-height: 112px;
    -webkit-mask-position: center;
            mask-position: center;
  }
}

/* the photograph of the real trophy, beside the turntable */
.trophy-layout { grid-template-areas: 'stage plaques' 'real plaques'; align-content: start; }
.trophy-stage { grid-area: stage; }
.plaques { grid-area: plaques; }
.trophy-real { grid-area: real; margin: 1.4rem 0 0; }
.trophy-shots { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; max-width: 460px; }
.trophy-shots img {
  display: block; width: 100%; height: auto; max-height: 420px; object-fit: cover; object-position: center top;
  border: 3px solid var(--ink); box-shadow: var(--shadow-sm); background: var(--surface-2);
}
.trophy-real figcaption {
  font-size: .78rem; color: var(--muted); text-transform: uppercase;
  letter-spacing: .12em; margin-top: .7rem; max-width: 460px;
}
@media (max-width: 900px) {
  .trophy-layout { grid-template-areas: 'stage' 'real' 'plaques'; }
}
@media (max-width: 560px) {
  .trophy-shots { grid-template-columns: 1fr; }
  .trophy-shots img { max-height: 380px; }
  .trophy-viewer { max-height: 56vh; }
}
