/* ============================================================
   quiz.chako.dev — Hegarty's Irish Pub · Monday Pub Quiz scores
   Kin of the drinks menu and its admin: deep green / cream /
   lime, Fraunces + Manrope. Where the menu is a mobile-only
   fullscreen swiper, this is a plain, normally-scrolling
   document for desktop AND phones — a data site. Sticky slim
   header, one content column, tables that become stacked cards
   on small screens. No page locks, no page-turn scrolling.
   Breakpoints: 640px and 960px.
   ============================================================ */

/* --- Self-hosted fonts (Fraunces + Manrope, SIL OFL 1.1) --------
   Fraunces (c) The Fraunces Project Authors; Manrope (c) Mikhail
   Sharanda. Variable woff2 subsets copied from the HMM app so
   this site makes zero third-party requests. */

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/fraunces-var.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/fraunces-var-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/fraunces-italic-var.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/fraunces-italic-var-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/manrope-var.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/manrope-var-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --- Tokens ------------------------------------------------
   Same values as the menu site so both read as one brand.
   --line is the cream hairline; --line-strong steps up for
   dashed edges. --danger is the admin's muted red, reused for
   "went down" arrows. --sage is the logo's pale green and is
   used ONLY for the wordmark. */
:root {
  --bg:           #08160e;
  --bg-deep:      #050e09;
  --panel:        #0d2317;
  --panel-hi:     #12301f;
  --line:         rgba(240, 231, 211, 0.09);
  --line-strong:  rgba(240, 231, 211, 0.22);
  --cream:        #f0e7d3;
  --cream-dim:    rgba(240, 231, 211, 0.62);
  --cream-faint:  rgba(240, 231, 211, 0.32);
  --lime:         #b8d935;
  --lime-bright:  #d3ec60;
  --lime-soft:    rgba(184, 217, 53, 0.38);
  --lime-wash:    rgba(184, 217, 53, 0.08);
  --ink:          #131d07;
  --amber:        #ffd27d;
  --amber-soft:   rgba(255, 210, 125, 0.4);
  --amber-wash:   rgba(255, 210, 125, 0.07);
  --danger:       #ff9d9d;
  --danger-line:  rgba(255, 157, 157, 0.35);
  --danger-bg:    rgba(255, 157, 157, 0.07);
  --sage:         #d0db97;
  --font-display: "Fraunces", Georgia, serif;
  --font-body:    "Manrope", "Helvetica Neue", Arial, sans-serif;
  --ease:         cubic-bezier(0.22, 0.8, 0.25, 1);
  --header-h:     56px;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { height: 100%; }

body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  /* A soft green glow crowns the page; everything below falls to
     bg-deep. No photo layer here — this is a data site. */
  background:
    radial-gradient(90% 40% at 50% -6%, rgba(18, 48, 31, 0.85) 0%, rgba(18, 48, 31, 0) 70%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 60%);
  background-attachment: fixed;
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Atmosphere: a very light vignette + film grain (the menu site's
   recipe, dialled way down so tables stay the star). Fixed,
   pointer-transparent, purely decorative. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  background: radial-gradient(115% 85% at 50% 38%, transparent 58%, rgba(0, 0, 0, 0.32) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 95;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 240 240' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 240px 240px;
}

img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
input, select, textarea { font: inherit; }
[hidden] { display: none !important; }

a { color: var(--lime-bright); text-decoration-color: var(--lime-soft); text-underline-offset: 3px; }

:focus-visible {
  outline: 2px solid var(--lime-bright);
  outline-offset: 2px;
}

/* Screen-reader-only text — used for delta arrow labels and the
   weekly table's cell labels (the season table shows its labels). */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 120;
  padding: 10px 16px;
  border: 1px solid var(--lime);
  border-radius: 10px;
  background: var(--lime);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus-visible { transform: none; }

/* --- Layout ------------------------------------------------ */
.wrap {
  width: min(1040px, 100% - 40px);
  margin-inline: auto;
}
/* Wider column for the season table — the chips column wants air. */
.main--wide .wrap { width: min(1100px, 100% - 40px); }

.main {
  flex: 1 0 auto;
  padding-block: clamp(28px, 5vw, 60px) clamp(40px, 6vw, 72px);
}

/* --- Sticky header -----------------------------------------
   Slim: lockup left, text nav right. Backdrop blur + a hairline
   keeps rows legible as they scroll underneath. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  padding-top: var(--sat);
  border-bottom: 1px solid var(--line);
  background: rgba(5, 14, 9, 0.88);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.site-header-inner {
  width: min(1100px, 100% - 32px);
  min-height: var(--header-h);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* Brand lockup — the menu site's chrome voice: sage Fraunces caps
   + a quiet cream italic descriptor. */
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  text-decoration: none;
  white-space: nowrap;
}

.brand-wordmark {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sage);
}

.brand-sub {
  font-family: var(--font-display);
  font-size: 10.5px;
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cream);
  opacity: 0.9;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  border-bottom: 2px solid transparent;
  color: var(--cream-dim);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: color 180ms ease, border-color 180ms ease;
}

@media (hover: hover) {
  .nav-link:hover { color: var(--cream); }
}

/* Current page — the menu marks it with a lime stroke in the
   margin; here it is the lime stroke under the foot. Declared
   after :hover so it always wins. */
.nav-link[aria-current="page"] {
  color: var(--lime-bright);
  border-bottom-color: var(--lime);
}

.nav-label-short { display: none; }

@media (max-width: 639px) {
  .nav-label-full { display: none; }
  .nav-label-short { display: inline; }
  .nav-link { padding: 0 8px; font-size: 0.78rem; }
  .brand-wordmark { font-size: 15px; }
  .brand-sub { font-size: 9px; letter-spacing: 0.14em; }
}

/* --- Footer micro-line ------------------------------------- */
.site-footer {
  flex: 0 0 auto;
  border-top: 1px solid var(--line);
  padding-block: 22px calc(22px + var(--sab));
}

.footer-line {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cream-dim);
}

/* --- Page heads --------------------------------------------
   Editorial left-aligned: micro-caps eyebrow, big Fraunces
   title, plain meta line, then a hairline with a lime tick.
   Whitespace between head and content is generous on purpose. */
.page-head { margin-bottom: clamp(24px, 4vw, 44px); }

.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cream-dim);
}

.page-title {
  margin-top: 10px;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 560;
  font-size: clamp(32px, 5.4vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.page-meta {
  margin-top: 12px;
  color: var(--cream-dim);
  font-size: 0.95rem;
}

.page-rule {
  margin-top: 22px;
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, var(--lime-soft) 0 48px, var(--line) 48px 100%);
}

/* --- Panels ------------------------------------------------
   The brand's stage card: gradient panel-hi -> panel, hairline
   border, 14px radius. Used for the selected-week panel and the
   admin form. */
.panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--panel-hi), var(--panel));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
  padding: clamp(16px, 2.6vw, 30px);
}

.panel + .panel { margin-top: 18px; }

.panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 18px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.panel-title {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 560;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.1;
}

.panel-meta {
  color: var(--cream-dim);
  font-size: 0.85rem;
}

/* --- Buttons -----------------------------------------------
   Solid lime = the menu's badge pill recipe grown up (ink text,
   lime glow). Ghost = hairline. Both are big tap targets. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-indent: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: filter 180ms ease, border-color 180ms ease, color 180ms ease,
              background 180ms ease, box-shadow 180ms ease;
}

.btn--solid {
  background: linear-gradient(180deg, var(--lime-bright), var(--lime));
  color: var(--ink);
  box-shadow: 0 6px 18px rgba(184, 217, 53, 0.22);
}

.btn--ghost {
  border-color: var(--line-strong);
  background: rgba(5, 14, 9, 0.4);
  color: var(--cream);
}

.btn--big {
  min-height: 60px;
  padding: 16px 34px;
  font-size: 0.84rem;
}

.btn:disabled { opacity: 0.5; cursor: not-allowed; }

@media (hover: hover) {
  .btn--solid:not(:disabled):hover {
    filter: brightness(1.06);
    box-shadow: 0 10px 26px rgba(184, 217, 53, 0.32);
  }
  .btn--ghost:not(:disabled):hover {
    border-color: var(--lime-soft);
    color: var(--lime-bright);
  }
}

.btn--solid:active:not(:disabled) { filter: brightness(0.96); }

/* The landing's two big doors out. */
.cta-row {
  display: grid;
  gap: 14px;
  margin-top: clamp(32px, 5vw, 52px);
}

@media (min-width: 640px) {
  .cta-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
}

/* --- Week chips + delta arrow ------------------------------
   One small component, two homes: podium cards and season rows.
   "W7 42" = that Monday's score. */
.wk-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
}

.wk-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(5, 14, 9, 0.45);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--cream);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.wk-chip-w {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cream-dim);
}

/* Delta: up is lime, down is the admin's muted red, flat is a
   faint en-dash. The glyph is aria-hidden; a visually-hidden
   sentence carries the meaning ("up 2 places since last week"). */
.delta {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.delta--up   { color: var(--lime-bright); }
.delta--down { color: var(--danger); }
.delta--flat { color: var(--cream-dim); font-weight: 400; }

/* "New" in the standings — no prior week to compare against. A
   quiet cream chip, deliberately neither lime nor red, so it can
   never read as up or down. */
.delta--new {
  padding: 2px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(5, 14, 9, 0.45);
  color: var(--cream-dim);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-indent: 0.12em;
  text-transform: uppercase;
}

/* --- Podium (landing) --------------------------------------
   Classic 1-2-3 blocks. DOM order is 1st/2nd/3rd (screen-reader
   order); desktop places them 2nd | 1st | 3rd via grid columns
   and bottom-aligns them so height alone reads as rank. Phones
   stack 1st-2nd-3rd. Medal treatment stays inside the brand:
   1st = solid lime + glow + ink text, 2nd = cream outline,
   3rd = amber outline. */
.podium {
  list-style: none;
  display: grid;
  gap: 14px;
}

.podium-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(18px, 3vw, 26px);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--panel-hi), var(--panel));
  transition: transform 220ms var(--ease), box-shadow 220ms var(--ease);
}

@media (hover: hover) {
  .podium-card:hover { transform: translateY(-3px); }
}

/* 1st — the only filled surface on the page. */
.podium-card--slot1 {
  border-color: transparent;
  background: linear-gradient(180deg, var(--lime-bright), var(--lime));
  color: var(--ink);
  box-shadow: 0 24px 64px rgba(184, 217, 53, 0.24), 0 2px 16px rgba(184, 217, 53, 0.18);
}

/* 2nd — silver-look: cream outline over a cream wash. */
.podium-card--slot2 {
  border-color: rgba(240, 231, 211, 0.4);
  background:
    linear-gradient(180deg, rgba(240, 231, 211, 0.1), rgba(240, 231, 211, 0.02)),
    linear-gradient(180deg, var(--panel-hi), var(--panel));
}

/* 3rd — amber outline, faint amber wash. */
.podium-card--slot3 {
  border-color: var(--amber-soft);
  background:
    linear-gradient(180deg, var(--amber-wash), rgba(255, 210, 125, 0)),
    linear-gradient(180deg, var(--panel-hi), var(--panel));
}

/* Medal badge — the rank numeral stamped in a ring. */
.podium-medal {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: 26px;
  font-weight: 560;
  line-height: 1;
}

.podium-card--slot1 .podium-medal {
  background: var(--ink);
  color: var(--lime-bright);
}

.podium-card--slot2 .podium-medal {
  border: 1.5px solid rgba(240, 231, 211, 0.55);
  color: var(--cream);
}

.podium-card--slot3 .podium-medal {
  border: 1.5px solid var(--amber-soft);
  color: var(--amber);
}

.podium-team {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 560;
  font-size: clamp(22px, 3.4vw, 30px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  overflow-wrap: break-word;
  text-wrap: balance;
}

.podium-score {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 600;
  font-size: clamp(42px, 7vw, 62px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.podium-score-cap {
  display: block;
  margin-top: 8px;
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cream-dim);
}

.podium-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
  font-size: 0.85rem;
  color: var(--cream-dim);
}

/* Chips settle at the foot; the 1st card is taller, so its extra
   height becomes air between score and chips — height as rank. */
.podium-card .wk-chips { margin-top: auto; }

/* Ink-tinted internals for the filled lime card. */
.podium-card--slot1 .podium-score-cap { color: rgba(19, 29, 7, 0.72); }
.podium-card--slot1 .podium-sub { color: rgba(19, 29, 7, 0.78); }
.podium-card--slot1 .wk-chip {
  border-color: rgba(19, 29, 7, 0.25);
  background: rgba(19, 29, 7, 0.08);
  color: var(--ink);
}
.podium-card--slot1 .wk-chip-w { color: rgba(19, 29, 7, 0.62); }
.podium-card--slot1 .delta--up { color: var(--ink); }
.podium-card--slot1 .delta--down { color: rgba(120, 20, 20, 0.85); }
.podium-card--slot1 .delta--flat { color: rgba(19, 29, 7, 0.55); }
.podium-card--slot1 .delta--new {
  border-color: rgba(19, 29, 7, 0.25);
  background: rgba(19, 29, 7, 0.08);
  color: rgba(19, 29, 7, 0.72);
}

@media (min-width: 640px) {
  .podium {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: end;
    gap: 18px;
  }
  .podium-card--slot1 { grid-column: 2; grid-row: 1; min-height: 360px; }
  .podium-card--slot2 { grid-column: 1; grid-row: 1; min-height: 306px; }
  .podium-card--slot3 { grid-column: 3; grid-row: 1; min-height: 280px; }
}

@media (min-width: 960px) {
  .podium { gap: 22px; }
  .podium-card--slot1 { min-height: 400px; }
  .podium-card--slot2 { min-height: 338px; }
  .podium-card--slot3 { min-height: 308px; }
}

/* --- Latest results (landing) -------------------------------
   The most recent Monday's top three, said in the score-table's
   own language — rank / team / score — at card scale. The card
   gets a lime-crowned wash over the panel gradient and a
   stepped-up edge so it reads as a surface, not text floating
   between the podium and the CTA row. Rows are hairline-ruled;
   the rank sits in a medal chip (lime fill for 1st, cream edge
   for 2nd, amber for 3rd). Skipped server-side until the first
   scores land. */
.latest-card {
  margin-top: clamp(30px, 4.5vw, 48px);
  padding: clamp(20px, 2.8vw, 26px);
  border-color: var(--line-strong);
  background:
    radial-gradient(120% 90% at 50% 0%, var(--lime-wash), rgba(184, 217, 53, 0) 55%),
    linear-gradient(180deg, var(--panel-hi), var(--panel));
}

.latest-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 16px;
  margin-bottom: 16px;
}

.latest-title {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 560;
  font-size: clamp(20px, 2.6vw, 26px);
  line-height: 1.1;
}

.latest-date {
  color: var(--cream-dim);
  font-size: 0.85rem;
}

.latest-list {
  list-style: none;
  display: grid;
}

.latest-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 14px;
  padding: 11px 2px;
  border-top: 1px solid var(--line);
}

.latest-row:first-child { border-top: 0; }

/* Rank chip — the podium's medal ring flattened into a pill. */
.latest-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  padding: 3px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--cream-dim);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-indent: 0.06em;
  font-variant-numeric: tabular-nums;
}

.latest-row--1 .latest-rank {
  border-color: transparent;
  background: linear-gradient(180deg, var(--lime-bright), var(--lime));
  color: var(--ink);
  box-shadow: 0 4px 14px rgba(184, 217, 53, 0.28);
}

.latest-row--2 .latest-rank { border-color: rgba(240, 231, 211, 0.5); color: var(--cream); }
.latest-row--3 .latest-rank { border-color: var(--amber-soft); color: var(--amber); }

.latest-team {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  overflow-wrap: break-word;
}

.latest-score {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--lime-bright);
  font-variant-numeric: tabular-nums;
}

.latest-more {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
  font-weight: 700;
}

.latest-more a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* --- Season status (landing) ---------------------------------
   Five facts in one segmented bar: micro-caps label above a
   Fraunces value, 1st stat carrying the lime accent. The 1px
   grid gap lets the --line token through as hairlines. Phones
   pair the facts up, 640px runs three across, 960px becomes a
   single row of five. */
.season-status { margin-top: clamp(24px, 3.6vw, 36px); }

.stat-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--line);
  overflow: hidden;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

.stat {
  padding: clamp(14px, 1.8vw, 18px) clamp(12px, 1.6vw, 16px) clamp(12px, 1.6vw, 16px);
  background: linear-gradient(180deg, var(--panel-hi), var(--panel));
}

.stat dt {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cream-dim);
}

.stat dd {
  margin-top: 4px;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 560;
  font-size: clamp(19px, 2.4vw, 24px);
  line-height: 1.1;
  color: var(--cream);
  font-variant-numeric: tabular-nums;
  overflow-wrap: break-word;
}

.stat-dim {
  font-size: 0.8em;
  color: var(--cream-dim);
}

/* Five facts in an even grid: the last one closes its row so no
   empty slot can show the hairline colour through. */
.stat:last-child { grid-column: span 2; }

@media (min-width: 640px) {
  .stat-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 960px) {
  .stat-strip { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .stat:last-child { grid-column: auto; }
}

/* --- Week selector -----------------------------------------
   Plain links in a horizontal scroller — works with JS off.
   Three states: played (quiet), unplayed (dashed, opens the
   empty state), future (disabled, not a link). Selected week is
   solid lime. quiz.js only centres the selected pill in view. */
.week-bar {
  margin-bottom: clamp(18px, 3vw, 28px);
}

.week-list {
  list-style: none;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: 2px 2px 12px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: var(--lime-soft) transparent;
  -webkit-overflow-scrolling: touch;
}

.week-pill {
  scroll-snap-align: center;
  flex: 0 0 auto;
  min-width: 68px;
  min-height: 54px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(5, 14, 9, 0.45);
  color: var(--cream-dim);
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: border-color 180ms ease, color 180ms ease, background 180ms ease;
}

.week-pill-w {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 560;
  line-height: 1;
  color: var(--cream);
}

.week-pill-date {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cream-dim);
  white-space: nowrap;
}

@media (hover: hover) {
  .week-pill:hover { border-color: var(--lime-soft); color: var(--cream); }
}

/* Unplayed-but-openable: dashed edge, clearly "not yet". */
.week-pill.is-unplayed { border-style: dashed; }
.week-pill.is-unplayed .week-pill-w { color: var(--cream-dim); }

/* Future Mondays beyond current_week: not a link, not a target. */
.week-pill.is-future {
  opacity: 0.5;
  cursor: default;
}

/* Selected — solid lime, wins over :hover. */
.week-pill.is-selected {
  border-color: transparent;
  background: linear-gradient(180deg, var(--lime-bright), var(--lime));
  color: var(--ink);
  box-shadow: 0 6px 18px rgba(184, 217, 53, 0.22);
}
.week-pill.is-selected .week-pill-w,
.week-pill.is-selected .week-pill-date { color: var(--ink); }
.week-pill.is-selected .week-pill-date { opacity: 0.75; }

/* --- Team search (weekly + season) --------------------------
   Filters the score rows in place. Display is gated on
   html.no-js, so a JS-off page never shows a dead input: base.html
   marks <html> as .no-js and an inline head hook (repeated by
   quiz.js) swaps in .js before the first paint — no flash and no
   shift when the box appears. The input owns the border and the
   standard :focus-visible ring; the magnifier and the clear button
   sit over it. Hidden rows use the global [hidden] rule, so the
   desktop table and the mobile card layout behave identically. */
.no-js .team-search { display: none; }

/* One left-aligned column: never a full-width field stretched
   across the 1100px season table. */
.team-search {
  max-width: 480px;
  margin-bottom: clamp(16px, 2.4vw, 24px);
}

/* Label left, live count right — one line at every width, so the
   status text can change without moving anything. */
.team-search-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 14px;
  margin-bottom: 8px;
}

.team-search-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cream-dim);
}

.team-search-status {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--cream-dim);
  font-variant-numeric: tabular-nums;
}

.team-search-field { position: relative; }

.team-search-input {
  width: 100%;
  min-height: 46px;
  padding: 11px 46px 11px 38px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(5, 14, 9, 0.45);
  color: var(--cream);
  /* >=16px so iOS does not zoom the page on focus. */
  font-size: 1.1rem;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 180ms ease, background 180ms ease;
}

.team-search-input::placeholder { color: var(--cream-faint); }

/* WebKit's own clear button would double up with the one below. */
.team-search-input::-webkit-search-cancel-button,
.team-search-input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}

@media (hover: hover) {
  .team-search-input:hover { border-color: var(--lime-soft); }
}

.team-search-input:focus {
  border-color: var(--lime-soft);
  background: rgba(5, 14, 9, 0.65);
}

.team-search-icon {
  position: absolute;
  top: 50%;
  left: 13px;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  color: var(--cream-dim);
  pointer-events: none;
}

.team-search-field:focus-within .team-search-icon { color: var(--lime-bright); }

.team-search-clear {
  position: absolute;
  top: 50%;
  right: 6px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--cream-dim);
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease;
}

@media (hover: hover) {
  .team-search-clear:hover { color: var(--cream); background: var(--lime-wash); }
}

/* The matched run inside a team name. */
.team-hit {
  padding: 0 0.12em;
  border-radius: 3px;
  background: var(--lime-soft);
  color: var(--cream);
}

/* A long query echoed into the zero-match state must still wrap. */
.team-search-q { overflow-wrap: anywhere; }

/* --- Score tables ------------------------------------------
   One markup, two shapes. Base = real table with a sticky head
   (rows scroll under the site header). Below each table's
   threshold the SAME table reflows into stacked cards; explicit
   ARIA roles keep the row/cell semantics alive through the
   display switch. Season goes wide at 960px (six columns), the
   weekly table already works at 640px (three columns). */
.score-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.score-table caption { text-align: left; }

.score-table th {
  position: sticky;
  top: calc(var(--sat) + var(--header-h) + 1px);
  z-index: 2;
  padding: 10px 14px;
  background: #0a1b11; /* opaque — rows pass underneath */
  border-bottom: 1px solid var(--line-strong);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cream-dim);
  text-align: left;
  white-space: nowrap;
}

.th-sub {
  display: block;
  margin-top: 2px;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--cream-dim);
  opacity: 0.85;
}

.score-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.score-table tbody tr:last-child td { border-bottom: 0; }

@media (hover: hover) {
  .score-table tbody tr:hover { background: var(--lime-wash); }
}

/* Column treatment: rank in Fraunces (a numeral with character),
   team in Fraunces 500, score emphasised. */
.cell--rank {
  width: 56px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 560;
  color: var(--cream-dim);
}

.cell--team {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  overflow-wrap: break-word;
}

.cell--score {
  text-align: right;
  white-space: nowrap;
}

.cell--score .cell-num {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--cream);
}

.cell--weeks {
  text-align: right;
  color: var(--cream-dim);
  white-space: nowrap;
}

.cell--change { text-align: right; }

.cell--chips .wk-chips { justify-content: flex-start; }

/* Row labels: shown only in the card shape (the table shape has
   column headers instead). */
.cell-label { display: none; }

/* Top-3 echo of the podium medals — a hairline stroke in the
   rank cell plus a whisper of wash. Deliberately subtle. */
tr.is-gold   > td:first-child { box-shadow: inset 2px 0 0 var(--lime); }
tr.is-silver > td:first-child { box-shadow: inset 2px 0 0 rgba(240, 231, 211, 0.5); }
tr.is-bronze > td:first-child { box-shadow: inset 2px 0 0 var(--amber-soft); }
tr.is-gold   { background: var(--lime-wash); }
tr.is-silver { background: rgba(240, 231, 211, 0.04); }
tr.is-bronze { background: var(--amber-wash); }

tr.is-gold   .cell--score .cell-num { color: var(--lime-bright); }
tr.is-gold   .cell--rank { color: var(--lime-bright); }
tr.is-silver .cell--rank { color: var(--cream); }
tr.is-bronze .cell--rank { color: var(--amber); }

/* --- Card shape: weekly table (below 640px) ----------------
   Each row becomes a small card: rank · team on the head line,
   score big on the right. Cell labels stay screen-reader-only
   here — the three fields are self-evident on a one-line card. */
@media (max-width: 639px) {
  .score-table--weekly,
  .score-table--weekly thead,
  .score-table--weekly tbody,
  .score-table--weekly th,
  .score-table--weekly td { display: block; }

  .score-table--weekly thead { display: none; }

  .score-table--weekly tr {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "rank team score";
    align-items: center;
    gap: 4px 12px;
    margin-bottom: 10px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: linear-gradient(180deg, var(--panel-hi), var(--panel));
  }

  .score-table--weekly td {
    padding: 0;
    border: 0;
  }

  .score-table--weekly .cell--rank    { grid-area: rank; width: auto; }
  .score-table--weekly .cell--team    { grid-area: team; }
  .score-table--weekly .cell--score   { grid-area: score; align-self: center; }

  .score-table--weekly tr.is-gold,
  .score-table--weekly tr.is-silver,
  .score-table--weekly tr.is-bronze { border-left-width: 2px; }
  /* Wash over the panel gradient (translucent layer first). */
  .score-table--weekly tr.is-gold   {
    border-left: 2px solid var(--lime);
    background:
      linear-gradient(180deg, var(--lime-wash), rgba(184, 217, 53, 0.02)),
      linear-gradient(180deg, var(--panel-hi), var(--panel));
  }
  .score-table--weekly tr.is-silver {
    border-left: 2px solid rgba(240, 231, 211, 0.5);
    background:
      linear-gradient(180deg, rgba(240, 231, 211, 0.05), rgba(240, 231, 211, 0)),
      linear-gradient(180deg, var(--panel-hi), var(--panel));
  }
  .score-table--weekly tr.is-bronze {
    border-left: 2px solid var(--amber-soft);
    background:
      linear-gradient(180deg, var(--amber-wash), rgba(255, 210, 125, 0)),
      linear-gradient(180deg, var(--panel-hi), var(--panel));
  }
  .score-table--weekly tr.is-gold   > td:first-child,
  .score-table--weekly tr.is-silver > td:first-child,
  .score-table--weekly tr.is-bronze > td:first-child { box-shadow: none; }
}

/* --- Card shape: season table (below 960px) ----------------
   Six fields per team, so the card runs three lines: rank · team
   · score on top, the change and weeks-played meta beneath, the
   week chips at the foot. Column headers swap for tiny visible
   cell labels. */
@media (max-width: 959px) {
  .score-table--season,
  .score-table--season thead,
  .score-table--season tbody,
  .score-table--season th,
  .score-table--season td { display: block; }

  .score-table--season thead { display: none; }

  .score-table--season tr {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "rank   team  score"
      "weeks  weeks change"
      "chips  chips chips";
    gap: 8px 12px;
    margin-bottom: 12px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: linear-gradient(180deg, var(--panel-hi), var(--panel));
  }

  .score-table--season td {
    padding: 0;
    border: 0;
  }

  .score-table--season .cell--rank   { grid-area: rank; width: auto; align-self: center; }
  .score-table--season .cell--team   { grid-area: team; align-self: center; }
  .score-table--season .cell--score  { grid-area: score; align-self: center; }
  .score-table--season .cell--weeks  { grid-area: weeks; text-align: left; align-self: center; }
  .score-table--season .cell--change { grid-area: change; align-self: center; }
  .score-table--season .cell--chips  { grid-area: chips; }

  .score-table--season tr.is-gold   > td:first-child,
  .score-table--season tr.is-silver > td:first-child,
  .score-table--season tr.is-bronze > td:first-child { box-shadow: none; }
  .score-table--season tr.is-gold   {
    border-left: 2px solid var(--lime);
    background:
      linear-gradient(180deg, var(--lime-wash), rgba(184, 217, 53, 0.02)),
      linear-gradient(180deg, var(--panel-hi), var(--panel));
  }
  .score-table--season tr.is-silver {
    border-left: 2px solid rgba(240, 231, 211, 0.5);
    background:
      linear-gradient(180deg, rgba(240, 231, 211, 0.05), rgba(240, 231, 211, 0)),
      linear-gradient(180deg, var(--panel-hi), var(--panel));
  }
  .score-table--season tr.is-bronze {
    border-left: 2px solid var(--amber-soft);
    background:
      linear-gradient(180deg, var(--amber-wash), rgba(255, 210, 125, 0)),
      linear-gradient(180deg, var(--panel-hi), var(--panel));
  }

  .score-table--season .cell-label {
    display: block;
    margin-bottom: 2px;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--cream-dim);
  }

  .score-table--season .cell--weeks .cell-label { display: none; }
}

/* --- Empty states ------------------------------------------
   The admin's dashed panel voice: quiet, no alarm. */
.empty-state {
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  padding: 34px 24px;
  text-align: center;
  display: grid;
  gap: 8px;
  justify-items: center;
}

.empty-title {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: 1.35rem;
  font-weight: 560;
  color: var(--cream);
}

.empty-state p {
  max-width: 44ch;
  color: var(--cream-dim);
  font-size: 0.92rem;
  line-height: 1.55;
}

/* --- Flash blocks (admin) ----------------------------------
   Success = lime, error = the admin's muted danger. Left rule
   like the admin's note/confirm blocks. */
.flash {
  margin-bottom: 18px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--line-strong);
  border-radius: 12px;
  font-size: 0.92rem;
  line-height: 1.5;
}

.flash--ok {
  border-color: var(--lime-soft);
  border-left-color: var(--lime);
  background: var(--lime-wash);
  color: var(--lime-bright);
}

.flash--err {
  border-color: var(--danger-line);
  border-left-color: var(--danger);
  background: var(--danger-bg);
  color: var(--danger);
}

/* --- Admin intake ------------------------------------------
   Utilitarian, same family. The drop zone is one big label;
   the real file input is stretched invisibly over it so the
   whole zone is the target and the keyboard still works. */
.upload-form { display: grid; gap: 18px; }

.dropzone {
  position: relative;
  border: 1.5px dashed var(--line-strong);
  border-radius: 14px;
  background: rgba(5, 14, 9, 0.45);
  padding: clamp(28px, 6vw, 48px) 24px;
  text-align: center;
  transition: border-color 180ms ease, background 180ms ease;
}

.dropzone.is-drag,
.dropzone:focus-within {
  border-color: var(--lime);
  background: var(--lime-wash);
}

.dropzone-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.dropzone-title {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: 1.3rem;
  font-weight: 560;
  color: var(--cream);
}

.dropzone-sub {
  margin-top: 8px;
  color: var(--cream-dim);
  font-size: 0.88rem;
}

.dropzone-file {
  margin-top: 12px;
  color: var(--lime-bright);
  font-size: 0.85rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.dropzone-file:empty { display: none; }

.upload-note {
  color: var(--cream-dim);
  font-size: 0.92rem;
  line-height: 1.55;
}

/* Current state of the world, as the operator left it. */
.state-list {
  display: grid;
  gap: 14px;
}

.state-list dt {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cream-dim);
}

.state-list dd {
  margin-top: 3px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--cream);
}

@media (min-width: 640px) {
  .state-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 28px; }
}

/* --- Page-load reveal --------------------------------------
   One orchestrated entrance: head, then the data, with the
   podium landing 3rd -> 2nd -> 1st so the winner arrives last.
   Transform/opacity only. */
@keyframes rise-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.reveal {
  animation: rise-in 520ms var(--ease) both;
}

.reveal-1 { animation-delay: 70ms; }
.reveal-2 { animation-delay: 140ms; }
.reveal-3 { animation-delay: 210ms; }
.reveal-4 { animation-delay: 300ms; }
.reveal-5 { animation-delay: 390ms; }
.reveal-6 { animation-delay: 480ms; }

.podium-card--slot3.reveal { animation-delay: 220ms; }
.podium-card--slot2.reveal { animation-delay: 320ms; }
.podium-card--slot1.reveal { animation-delay: 430ms; }

/* ============================================================
   Preview screen (staged upload) — ADDITIVE components only.
   Everything else reuses the existing panel / score-table /
   wk-chip / delta / flash families untouched.
   ============================================================ */

/* --- Preview: section heads -------------------------------- */
.section { margin-top: clamp(30px, 4.5vw, 48px); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 18px;
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 560;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.1;
}

.section-note {
  color: var(--cream-dim);
  font-size: 0.85rem;
}

/* --- Preview: validation issues ----------------------------
   Severity is never colour-only: the "Error" / "Warning" badge
   and the panel titles carry it in text, the colours only
   reinforce. Shape echoes the admin note/confirm blocks. */
.issue-stack {
  display: grid;
  gap: 14px;
}

.issues {
  border: 1px solid var(--line);
  border-left: 3px solid var(--line-strong);
  border-radius: 14px;
  padding: 16px 18px;
}

.issues--err {
  border-color: var(--danger-line);
  border-left-color: var(--danger);
  background: var(--danger-bg);
}

.issues--warn {
  border-color: var(--amber-soft);
  border-left-color: var(--amber);
  background: var(--amber-wash);
}

.issues-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.sev {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-indent: 0.14em;
  text-transform: uppercase;
  padding: 3px 10px;
  border: 1px solid;
  border-radius: 999px;
  white-space: nowrap;
}

.sev--err  { border-color: var(--danger-line); color: var(--danger); }
.sev--warn { border-color: var(--amber-soft);  color: var(--amber); }

.issues-title {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 560;
  font-size: 1.2rem;
  line-height: 1.15;
}

.issue-list {
  display: grid;
  gap: 10px;
  list-style: none;
}

.issue {
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.issue:first-child {
  padding-top: 0;
  border-top: 0;
}

.issue-msg {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--cream);
  overflow-wrap: break-word;
}

.issue-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 6px;
}

.issue-code {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-indent: 0.1em;
  text-transform: uppercase;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--cream-dim);
  white-space: nowrap;
}

.issue-where {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--cream-dim);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

/* --- Preview: summary facts -------------------------------- */
.fact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
}

.fact {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(5, 14, 9, 0.45);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--cream);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.fact--new  { border-color: var(--lime-soft);   color: var(--lime-bright); }
.fact--gone { border-color: var(--danger-line); color: var(--danger); }
.fact--file { color: var(--cream-dim); font-weight: 700; }

.fact-names {
  margin-top: 12px;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--cream);
}

.fact-names-label {
  display: inline-block;
  margin-right: 8px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cream-dim);
}

/* --- Preview: new & changed score rows ---------------------
   One compact row per team-week pair. Changed rows show the old
   value struck through, then the new one in lime. */
.change-list {
  display: grid;
  gap: 8px;
  list-style: none;
}

.change {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
  padding: 11px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(5, 14, 9, 0.45);
  font-variant-numeric: tabular-nums;
}

.change-kind {
  flex: 0 0 auto;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-indent: 0.12em;
  text-transform: uppercase;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--cream-dim);
  white-space: nowrap;
}

.change--new  .change-kind { border-color: var(--lime-soft);   color: var(--lime-bright); }
.change--edit .change-kind { border-color: var(--line-strong); color: var(--cream-dim); }

.change-wk {
  flex: 0 0 auto;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cream-dim);
}

.change-team {
  flex: 1 1 12ch;
  min-width: 0;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: 1rem;
  font-weight: 500;
  overflow-wrap: break-word;
}

.change-score {
  flex: 0 0 auto;
  margin-left: auto;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--cream);
}

.change--new .change-score { color: var(--lime-bright); }

.change-old {
  color: var(--cream-dim);
  font-weight: 500;
  text-decoration: line-through;
}

.change-arrow {
  padding: 0 6px;
  color: var(--cream-dim);
}

.change-new { color: var(--lime-bright); }

/* --- Preview: one-line empty states ------------------------ */
.empty-line {
  padding: 4px 2px;
  color: var(--cream-dim);
  font-size: 0.92rem;
  line-height: 1.55;
}

/* --- Preview: action bar -----------------------------------
   Publish left, Discard right of it, helper line under when
   publishing is blocked. Both are plain forms. */
.action-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: clamp(32px, 5vw, 52px);
  padding-top: clamp(22px, 3vw, 30px);
  border-top: 1px solid var(--line);
}

.action-form { display: flex; }
.action-form .btn { min-width: 230px; }

.btn--danger-outline {
  border-color: var(--danger-line);
  background: rgba(5, 14, 9, 0.4);
  color: var(--danger);
}

@media (hover: hover) {
  .btn--danger-outline:not(:disabled):hover {
    border-color: var(--danger);
  }
}

.action-help {
  flex: 1 1 100%;
  color: var(--danger);
  font-size: 0.88rem;
}

@media (max-width: 639px) {
  .action-form { width: 100%; }
  .action-form .btn { width: 100%; min-width: 0; }
}

/* --- Touch polish ------------------------------------------ */
.week-pill,
.btn,
.dropzone-input,
.nav-link {
  -webkit-tap-highlight-color: transparent;
}

/* --- Reduced motion: hard kill switch -----------------------
   Nothing moves that the user did not ask for — no rise-in
   (delays included), no hover lift, no smooth scrolling. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    animation-delay: 0ms !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
  .podium-card:hover { transform: none; }
}
