/* ============================================================
   Hegarty's Pub Quiz — results site
   Deep green pub-night + cream, lime accents from the logo.
   Same family as menu.hegartysbremenonline.de, but this is a
   data site: normal vertical document flow, real tables,
   sticky header, responsive down to small phones.
   No third-party CSS/JS — fonts and everything else local.
   ============================================================ */

/* --- Self-hosted fonts ------------------------------------------
   Fraunces and Manrope, SIL Open Font License 1.1
   (https://openfontlicense.org) — Fraunces © The Fraunces Project
   Authors; Manrope © Mikhail Sharanda. Variable woff2 subsets,
   shipped from static/fonts/ so the site makes zero
   third-party requests. */

/* Fraunces — variable (optical size + weight), roman, latin */
@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;
}

/* Fraunces — variable roman, latin-ext */
@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;
}

/* Fraunces — variable italic, latin */
@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;
}

/* Fraunces — variable italic, latin-ext */
@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;
}

/* Manrope — variable weight 400–700, latin */
@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;
}

/* Manrope — variable weight 400–700, latin-ext */
@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;
}

:root {
  --bg:           #08160e;   /* deep green-black               */
  --bg-deep:      #050e09;   /* base under the glow layer      */
  --panel:        #0d2317;   /* card base                      */
  --panel-hi:     #12301f;   /* card crown / highlight         */
  --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;   /* signature accent (pub logo)    */
  --lime-bright:  #d3ec60;   /* small text accents             */
  --lime-soft:    rgba(184, 217, 53, 0.38);
  --lime-wash:    rgba(184, 217, 53, 0.10);
  --ink:          #131d07;   /* text on lime                   */
  --amber:        #ffd27d;   /* warn accent                    */
  --amber-faint:  rgba(255, 210, 125, 0.13);
  --red:          #e0766b;   /* position-drop accent           */
  --red-soft:     rgba(224, 118, 107, 0.45);
  --red-faint:    rgba(224, 118, 107, 0.12);
  --font-display: "Fraunces", Georgia, serif;
  --font-body:    "Manrope", "Helvetica Neue", Arial, sans-serif;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --radius: 14px;
  --radius-sm: 12px;
  --shell: 1080px;
}

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

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

body {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--bg-deep);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* --- Atmosphere 1: pub-night glow, fixed behind everything ------
   Two soft light sources over the deep green — a lime lamp low in
   the page and a cold green sheen up top. Pure CSS, no image. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(52rem 30rem at 82% -6%, rgba(184, 217, 53, 0.07), transparent 62%),
    radial-gradient(46rem 34rem at 12% 112%, rgba(184, 217, 53, 0.055), transparent 60%),
    radial-gradient(70rem 48rem at 50% 42%, rgba(18, 48, 31, 0.55), transparent 74%),
    var(--bg);
}

/* --- Atmosphere 2: vignette + film grain ------------------------- */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
  background:
    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"),
    radial-gradient(120% 88% at 50% 30%, transparent 55%, rgba(0, 0, 0, 0.42) 100%);
  background-size: 240px 240px, 100% 100%;
  opacity: 0.05;
  mix-blend-mode: overlay;
}

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

img { display: block; max-width: 100%; }

/* --- Layout shell ------------------------------------------------ */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 32px);
}

main {
  flex: 1 0 auto;
  padding-top: clamp(20px, 4vh, 40px);
  padding-bottom: clamp(40px, 7vh, 72px);
}

.page-head {
  margin-bottom: clamp(22px, 4vh, 36px);
  text-align: center;
}

.page-head h1 {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 560;
  font-size: clamp(30px, 5.6vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.page-head .page-sub {
  margin-top: 10px;
  color: var(--cream-dim);
  font-size: 15px;
}

/* Serif section label flanked by hairlines — the page-title voice
   of the pub menu, reused for section headings. */
.section-label {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 500;
  font-size: clamp(21px, 3.4vw, 27px);
  line-height: 1.15;
  color: var(--cream);
}

.section-label::before,
.section-label::after {
  content: "";
  width: 30px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--lime-soft));
}

.section-label::after { transform: scaleX(-1); }

/* Small tracked-caps micro label (the chrome-subtitle's voice). */
.eyebrow {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cream-dim);
}

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

/* Keyboard users' first tab stop: jumps past the header. */
.skip-link {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translate(-50%, -260%);
  z-index: 100;
  padding: 10px 18px;
  border: 1px solid var(--lime-soft);
  border-radius: 999px;
  background: var(--bg-deep);
  color: var(--lime-bright);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 180ms ease;
}

.skip-link:focus-visible { transform: translate(-50%, 0); }

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

::selection { background: rgba(184, 217, 53, 0.28); color: var(--cream); }

/* --- Header: sticky pub chrome ----------------------------------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  padding-top: calc(var(--sat) + 10px);
  background: rgba(5, 14, 9, 0.82);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  flex-wrap: wrap;
  padding-block: 10px 12px;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  text-decoration: none;
}

.brand-name {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 560;
  font-size: clamp(21px, 3.2vw, 26px);
  line-height: 1;
  letter-spacing: 0.01em;
  color: var(--cream);
  white-space: nowrap;
}

.brand-name .apos { color: var(--lime-bright); }

.season-chip {
  padding: 4px 11px;
  border: 1px solid var(--lime-soft);
  border-radius: 999px;
  background: var(--lime-wash);
  color: var(--lime-bright);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}

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

.site-nav a {
  position: relative;
  display: inline-block;
  padding: 8px 13px;
  border-radius: 999px;
  color: var(--cream-dim);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
  transition: color 160ms ease, background 160ms ease;
}

.site-nav a::before {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 4px;
  height: 1px;
  background: var(--lime);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.site-nav a:hover { color: var(--cream); }
.site-nav a:hover::before { transform: scaleX(1); }

/* Active page — the lime stroke in the margin, like the pub menu. */
.site-nav a[aria-current="page"] { color: var(--lime-bright); }
.site-nav a[aria-current="page"]::before { transform: scaleX(1); }

.site-nav .nav-admin { color: var(--cream-faint); }

/* --- Footer ------------------------------------------------------- */
.site-foot {
  flex-shrink: 0;
  border-top: 1px solid var(--line);
  background: rgba(5, 14, 9, 0.6);
  padding-block: 22px calc(var(--sab) + 22px);
}

.foot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  flex-wrap: wrap;
}

.foot-updated {
  color: var(--cream-faint);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.foot-pub {
  color: var(--cream-dim);
  font-size: 13px;
}

.foot-pub a { color: var(--cream-dim); text-decoration-color: var(--lime-soft); }
.foot-pub a:hover { color: var(--lime-bright); }

.foot-pub .sep { color: var(--cream-faint); padding-inline: 6px; }

/* --- Panels ------------------------------------------------------- */
.panel {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(18, 48, 31, 0.5), rgba(13, 35, 23, 0.28));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

/* --- Podium (season leaders) --------------------------------------
   1st elevated centre, 2nd and 3rd flanking. Grid areas let the DOM
   stay in rank order (1, 2, 3 — good for screen readers) while the
   visual arrangement is 2 · 1 · 3 on desktop and 1 / 2 / 3 stacked
   on mobile. Different heights + offsets make it read as a podium. */
.podium {
  display: grid;
  grid-template-areas: "one"
                       "two"
                       "three";
  gap: 14px;
  align-items: stretch;
}

.podium .pod { grid-area: auto; }
.podium .pod--1 { grid-area: one; }
.podium .pod--2 { grid-area: two; }
.podium .pod--3 { grid-area: three; }

.pod {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 26px 20px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(18, 48, 31, 0.5), rgba(13, 35, 23, 0.28));
  text-align: center;
  transition: transform 220ms cubic-bezier(0.22, 0.8, 0.25, 1), border-color 220ms ease;
}

.pod-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  padding: 3px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--cream-dim);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.pod-team {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 560;
  font-size: clamp(19px, 2.4vw, 25px);
  line-height: 1.18;
  letter-spacing: -0.01em;
  color: var(--cream);
  text-wrap: balance;
  max-width: 24ch;
}

.pod-value {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: auto;
}

.pod-value .num {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 620;
  font-size: clamp(34px, 4.6vw, 52px);
  line-height: 1;
  color: var(--cream);
  font-variant-numeric: tabular-nums;
}

.pod-value .unit {
  color: var(--cream-faint);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* First place: the lime seat. */
.pod--1 {
  padding-top: 34px;
  padding-bottom: 32px;
  border-color: var(--lime-soft);
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(184, 217, 53, 0.14), transparent 55%),
    linear-gradient(180deg, rgba(18, 48, 31, 0.72), rgba(13, 35, 23, 0.35));
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(184, 217, 53, 0.08),
    0 10px 42px rgba(184, 217, 53, 0.10);
}

.pod--1 .pod-rank {
  border-color: var(--lime);
  background: linear-gradient(180deg, var(--lime-bright), var(--lime));
  color: var(--ink);
  box-shadow: 0 6px 18px rgba(184, 217, 53, 0.30);
}

.pod--1 .pod-team { font-size: clamp(25px, 3vw, 32px); }

.pod--1 .pod-value .num { color: var(--lime-bright); font-size: clamp(42px, 6vw, 68px); }

/* Second place: silver-ish cream edge, slightly taller than third. */
.pod--2 { border-color: var(--line-strong); }

/* Third place: sits a touch lower, quieter. */
.pod--3 { padding-top: 20px; }

.pod-crown {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 14px;
  border: 1px solid var(--lime);
  border-radius: 999px;
  background: linear-gradient(180deg, var(--lime-bright), var(--lime));
  color: var(--ink);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-indent: 0.2em;
  text-transform: uppercase;
  box-shadow: 0 8px 22px rgba(184, 217, 53, 0.35);
}

@media (min-width: 720px) {
  .podium {
    grid-template-areas: "two one three";
    grid-template-columns: 1fr 1.18fr 1fr;
    gap: 18px;
    align-items: end;
  }
  .pod--1 { transform: translateY(-14px); }
  .pod--3 { transform: translateY(4px); padding-bottom: 18px; }
  .pod:hover { transform: translateY(-4px); }
  .pod--1:hover { transform: translateY(-18px); }
}

/* --- Latest week card --------------------------------------------- */
.latest-card { padding: 22px 24px 20px; }

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

.latest-weekno {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 560;
  font-size: clamp(20px, 2.6vw, 24px);
  color: var(--cream);
}

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

/* Mini results list: rank · team · score rows. */
.mini-list { list-style: none; display: grid; }

.mini-list li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 12px;
  padding: 10px 2px;
  border-top: 1px solid var(--line);
}

.mini-list li:first-child { border-top: 0; }

.mini-rank {
  font-family: var(--font-display);
  font-weight: 620;
  font-size: 15px;
  color: var(--cream-faint);
  font-variant-numeric: tabular-nums;
}

.mini-list li:nth-child(1) .mini-rank { color: var(--lime-bright); }

.mini-team {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 600;
  color: var(--cream);
}

.mini-score {
  font-family: var(--font-display);
  font-weight: 560;
  font-size: 17px;
  color: var(--lime-bright);
  font-variant-numeric: tabular-nums;
}

/* --- Week timeline (season ribbon on the landing page) ------------ */
.week-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.week-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(13, 35, 23, 0.35);
  color: var(--cream-dim);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

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

.week-dot.is-current {
  border-color: var(--lime);
  background: var(--lime-wash);
  color: var(--lime-bright);
}

.week-dot .w-teams { color: var(--cream-faint); font-weight: 600; letter-spacing: 0; }

/* --- Buttons ------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 12px 30px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-indent: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: filter 180ms ease, box-shadow 180ms ease, border-color 180ms ease, color 180ms ease, background 180ms ease;
}

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

@media (hover: hover) {
  .btn-primary:hover { filter: brightness(1.06); box-shadow: 0 10px 30px rgba(184, 217, 53, 0.34); }
}

.btn-primary:active { filter: brightness(0.96); }

.btn-ghost {
  border-color: var(--line-strong);
  background: rgba(13, 35, 23, 0.3);
  color: var(--cream);
}

@media (hover: hover) {
  .btn-ghost:hover { border-color: var(--lime-soft); color: var(--lime-bright); background: rgba(184, 217, 53, 0.07); }
}

.btn-ghost:active { filter: brightness(0.96); }

.btn-danger {
  border-color: var(--red-soft);
  background: rgba(224, 118, 107, 0.06);
  color: var(--red);
}

@media (hover: hover) {
  .btn-danger:hover { border-color: var(--red); background: rgba(224, 118, 107, 0.14); color: #eda296; }
}

.btn[disabled],
.btn.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.4);
  box-shadow: none;
}

.btn[disabled]:hover, .btn.is-disabled:hover { filter: grayscale(0.4); }

.cta-row {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}

@media (min-width: 560px) {
  .cta-row { grid-template-columns: 1fr 1fr; }
}

.cta {
  justify-content: space-between;
  padding: 18px 26px;
  border-radius: var(--radius);
}

.cta .cta-copy { display: grid; gap: 3px; text-align: left; }

.cta .cta-title {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 560;
  font-size: clamp(18px, 2.4vw, 22px);
  letter-spacing: 0;
  text-indent: 0;
  text-transform: none;
  color: var(--cream);
}

.cta .cta-sub { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.72; }

.cta .cta-arrow { font-size: 20px; line-height: 1; }

.cta--primary {
  border-color: var(--lime);
  background:
    radial-gradient(130% 130% at 12% -10%, rgba(211, 236, 96, 0.32), transparent 52%),
    linear-gradient(180deg, rgba(18, 48, 31, 0.85), rgba(13, 35, 23, 0.5));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.4), 0 8px 30px rgba(184, 217, 53, 0.12);
}

.cta--primary .cta-title { color: var(--lime-bright); }

.cta--ghost {
  border-color: var(--line-strong);
  background: linear-gradient(180deg, rgba(18, 48, 31, 0.5), rgba(13, 35, 23, 0.3));
}

@media (hover: hover) {
  .cta:hover { transform: translateY(-2px); }
  .cta--primary:hover { border-color: var(--lime-bright); }
  .cta--ghost:hover { border-color: rgba(240, 231, 211, 0.4); }
}

/* --- Summary strip ------------------------------------------------- */
.summary-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
  overflow: hidden;
}

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

.summary-strip .stat {
  padding: 16px 14px 14px;
  background: linear-gradient(180deg, rgba(18, 48, 31, 0.55), rgba(13, 35, 23, 0.3));
}

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

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

.summary-strip .stat--accent dd { color: var(--lime-bright); }

/* --- Week chips (weekly page selector) ----------------------------- */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.chip {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(13, 35, 23, 0.35);
  color: var(--cream-dim);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.chip .chip-week { letter-spacing: 0.04em; }
.chip .chip-meta { color: var(--cream-faint); font-size: 11.5px; font-weight: 600; letter-spacing: 0.02em; }

.chip:hover { border-color: var(--lime-soft); color: var(--cream); }

.chip.is-current {
  border-color: var(--lime);
  background: linear-gradient(180deg, var(--lime-bright), var(--lime));
  color: var(--ink);
}

.chip.is-current .chip-meta { color: rgba(19, 29, 7, 0.66); }

/* --- Tables --------------------------------------------------------
   Real tables: desktop roomy, mobile compact (weekly) or card-ified
   via CSS only (season). No JS table transforms anywhere. */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(18, 48, 31, 0.45), rgba(13, 35, 23, 0.25));
  scrollbar-color: var(--lime-soft) transparent;
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

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

table.data th, table.data td { text-align: left; }

table.data thead th {
  position: sticky;
  top: 0;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line-strong);
  background: rgba(5, 14, 9, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--cream-dim);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
}

table.data thead th.num, table.data td.num { text-align: right; }

table.data tbody td {
  padding: 13px 18px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  color: var(--cream);
}

table.data tbody tr:first-child td { border-top: 0; }

@media (hover: hover) {
  table.data tbody tr:hover td { background: rgba(184, 217, 53, 0.045); }
}

/* Rank cell */
td.rank {
  width: 3.4em;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 560;
  font-size: 17px;
  color: var(--cream-dim);
  font-variant-numeric: tabular-nums;
}

/* Team names don't break mid-word */
td.team, td.team .team-name {
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* Score columns */
td.score {
  font-family: var(--font-display);
  font-weight: 560;
  font-size: 17px;
  color: var(--lime-bright);
}

td.muted { color: var(--cream-dim); }

/* Podium echo: top 3 rows get a soft lime wash + edge. */
table.data tbody tr.top td {
  background: linear-gradient(90deg, rgba(184, 217, 53, 0.09), rgba(184, 217, 53, 0.0) 62%);
}

table.data tbody tr.top td:first-child {
  box-shadow: inset 2px 0 0 var(--lime-soft);
}

table.data tbody tr.top td.rank { color: var(--lime-bright); }

/* Delta arrows (season standings) */
.delta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 1.6em;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.delta--up { color: var(--lime-bright); }
.delta--down { color: var(--red); }
.delta--same { color: var(--cream-faint); }

.delta--new {
  padding: 2px 8px;
  border: 1px solid var(--lime-soft);
  border-radius: 999px;
  background: var(--lime-wash);
  color: var(--lime-bright);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.delta + .delta-inline-gap { margin-left: 6px; }

/* Δ placement in the season table: arrow rides just before the team name */
.delta-cell .delta { margin-right: 9px; }

.delta-wrap { display: inline-flex; margin-right: 9px; }

/* --- Responsive tables: mobile pass ---------------------------------
   Weekly (3 columns): keep the table, tighten it.
   Season (6 columns): card-ify via CSS only — rank + arrow + team +
   value in one line per team; Total/Weeks/Δ columns fold away (the
   arrow beside the name already carries the position change). */
@media (max-width: 640px) {
  table.data thead th { padding: 10px 12px; font-size: 10px; }
  table.data tbody td { padding: 10px 12px; font-size: 14.5px; }

  td.rank { width: 2.6em; font-size: 15px; }
  td.score { font-size: 16px; }
}

@media (max-width: 640px) {
  .season-table { display: block; }

  /* Visually hidden (not display:none) so screen readers keep headers */
  .season-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .season-table tbody { display: grid; gap: 10px; }

  .season-table tbody tr {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: baseline;
    gap: 4px 10px;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: linear-gradient(180deg, rgba(18, 48, 31, 0.45), rgba(13, 35, 23, 0.28));
  }

  .season-table tbody tr.top {
    border-color: var(--lime-soft);
    box-shadow: inset 2px 0 0 var(--lime-soft);
  }

  .season-table tbody td {
    display: block;
    padding: 0;
    border: 0;
    background: none;
    font-size: 15px;
  }

  .season-table tbody tr.top td,
  .season-table tbody tr.top td:first-child { background: none; box-shadow: none; }

  .season-table tbody td.rank { font-size: 14px; color: var(--cream-faint); }
  .season-table tbody tr.top td.rank { color: var(--lime-bright); }
  .season-table tbody td.score { font-size: 19px; }

  /* Folded columns: the arrow + "new" badge beside the name carry Δ */
  .season-table tbody td.muted,
  .season-table tbody td.delta-col { display: none; }
}

/* Admin/preview column: a touch narrower than the data pages. */
.shell.narrow { max-width: 760px; }

.upload-card { padding: 22px 24px 24px; }

/* The ⇪ glyph + title split inside the dropzone */
.dropzone .dropzone-mark {
  font-family: var(--font-display);
  font-size: clamp(26px, 5vw, 34px);
  line-height: 1;
  color: var(--lime-bright);
  opacity: 0.85;
  transition: color 180ms ease;
}

.dropzone .dropzone-title {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 560;
  font-size: clamp(19px, 3vw, 24px);
  color: var(--cream);
  transition: color 180ms ease;
}

.dropzone.has-file .dropzone-title { font-size: clamp(15px, 2vw, 18px); }

/* Focus ring drawn on the whole dropzone (JS fallback + :has). */
.dropzone.is-focused,
.dropzone:has(input:focus-visible) {
  border-color: var(--lime-bright);
  outline: 2px solid var(--lime-bright);
  outline-offset: 3px;
}

/* --- Weekly empty state ------------------------------------------- */
.empty-state {
  padding: clamp(36px, 7vw, 56px) 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  text-align: center;
}

.empty-state .empty-mark {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 500;
  font-size: clamp(40px, 8vw, 60px);
  line-height: 1;
  color: var(--lime-soft);
}

.empty-state h2 {
  margin-top: 12px;
  font-family: var(--font-display);
  font-weight: 560;
  font-size: clamp(20px, 3vw, 26px);
  color: var(--cream);
}

.empty-state p {
  margin: 8px auto 0;
  max-width: 44ch;
  color: var(--cream-dim);
  font-size: 14.5px;
}

.empty-state .btn { margin-top: 18px; }

/* --- Admin --------------------------------------------------------- */
.notice {
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, rgba(18, 48, 31, 0.55), rgba(13, 35, 23, 0.3));
  color: var(--cream);
  font-size: 14.5px;
}

.notice p + p { margin-top: 6px; }

.notice--success {
  border-color: rgba(184, 217, 53, 0.5);
  background:
    radial-gradient(120% 130% at 10% 0%, rgba(184, 217, 53, 0.13), transparent 55%),
    linear-gradient(180deg, rgba(18, 48, 31, 0.6), rgba(13, 35, 23, 0.32));
}

.notice--success .notice-title { color: var(--lime-bright); font-weight: 700; }

.notice-title { font-weight: 700; }

.steps {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  counter-reset: step;
  list-style: none;
  margin-top: 14px;
}

@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
}

.steps li {
  counter-increment: step;
  position: relative;
  padding: 12px 14px 12px 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(13, 35, 23, 0.32);
  font-size: 13.5px;
  color: var(--cream-dim);
}

.steps li::before {
  content: counter(step);
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid var(--lime-soft);
  border-radius: 50%;
  color: var(--lime-bright);
  font-size: 11px;
  font-weight: 700;
}

.steps li strong { color: var(--cream); font-weight: 700; }

/* Dropzone: the label IS the dropzone; the file input stays in the
   accessibility tree (visually tucked) so keyboard users tab to it
   and press Enter to open the picker. */
.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 190px;
  margin-top: 18px;
  padding: 28px 20px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius);
  background:
    radial-gradient(90% 120% at 50% 0%, rgba(184, 217, 53, 0.05), transparent 60%),
    rgba(13, 35, 23, 0.3);
  text-align: center;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

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

.dropzone.is-dragover {
  border-color: var(--lime-bright);
  background:
    radial-gradient(90% 120% at 50% 0%, rgba(184, 217, 53, 0.14), transparent 60%),
    rgba(184, 217, 53, 0.06);
  transform: translateY(-2px);
}

.dropzone.is-dragover .dropzone-mark,
.dropzone.is-dragover .dropzone-title { color: var(--lime-bright); }

.dropzone input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0.01;
  overflow: hidden;
  /* NOT display:none — keeps keyboard focus + picker activation */
}

.dropzone input[type="file"]:focus-visible {
  outline: 2px solid var(--lime-bright);
  outline-offset: 3px;
}

.dropzone .dropzone-mark {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 560;
  font-size: clamp(19px, 3vw, 24px);
  color: var(--cream);
  transition: color 180ms ease;
}

.dropzone .dropzone-hint { color: var(--cream-dim); font-size: 13.5px; }

.dropzone .dropzone-filename {
  display: none;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 5px 12px;
  border: 1px solid var(--lime-soft);
  border-radius: 999px;
  background: var(--lime-wash);
  color: var(--lime-bright);
  font-size: 12.5px;
  font-weight: 700;
}

.dropzone.has-file .dropzone-filename { display: inline-block; }

.upload-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.upload-note {
  margin-right: auto;
  color: var(--cream-faint);
  font-size: 12.5px;
}

/* --- Preview -------------------------------------------------------- */
.chips-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(13, 35, 23, 0.35);
  color: var(--cream-dim);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.pill .pill-value { color: var(--cream); font-variant-numeric: tabular-nums; }
.pill--accent { border-color: var(--lime-soft); background: var(--lime-wash); }
.pill--accent .pill-value { color: var(--lime-bright); }

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

.issue {
  display: grid;
  gap: 6px;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, rgba(18, 48, 31, 0.4), rgba(13, 35, 23, 0.25));
}

.issue--error {
  border-color: rgba(224, 118, 107, 0.55);
  background:
    radial-gradient(100% 140% at 0% 0%, rgba(224, 118, 107, 0.14), transparent 55%),
    linear-gradient(180deg, rgba(18, 48, 31, 0.4), rgba(13, 35, 23, 0.25));
}

.issue--warn { border-color: rgba(255, 210, 125, 0.4); background: linear-gradient(180deg, rgba(18, 48, 31, 0.4), rgba(13, 35, 23, 0.25)); }

.issue-sev {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
}

.issue--error .issue-sev {
  border: 1px solid rgba(224, 118, 107, 0.8);
  background: rgba(224, 118, 107, 0.16);
  color: #eda296;
}

.issue--warn .issue-sev {
  border: 1px solid rgba(255, 210, 125, 0.7);
  background: rgba(255, 210, 125, 0.12);
  color: var(--amber);
}

.issue-body { min-width: 0; }

.issue-msg { color: var(--cream); font-size: 14.5px; overflow-wrap: anywhere; }

.issue-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 3px;
  color: var(--cream-faint);
  font-size: 12px;
  font-weight: 600;
}

.issue-code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--cream-dim);
}

.issue-rows { font-variant-numeric: tabular-nums; }

/* Diff section */
.diff-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .diff-grid { grid-template-columns: 1fr 1fr; }
  .diff-grid .diff-movers { grid-column: 1 / -1; }
}

.diff-block { padding: 18px 20px; }

.diff-block h3 {
  margin-bottom: 10px;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 560;
  font-size: 18px;
  color: var(--cream);
}

.diff-tags { display: flex; flex-wrap: wrap; gap: 8px; }

.tag {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.tag--added { border: 1px solid var(--lime-soft); background: var(--lime-wash); color: var(--lime-bright); }
.tag--removed { border: 1px solid var(--red-soft); background: var(--red-faint); color: #eda296; }
.tag--quiet { border: 1px solid var(--line); background: rgba(13, 35, 23, 0.3); color: var(--cream-faint); font-weight: 600; }

.diff-empty { color: var(--cream-faint); font-size: 13.5px; font-style: italic; }

/* Movers mini-table reuses table.data at compact size */
.table-compact table.data thead th { padding: 9px 14px; font-size: 10px; }
.table-compact table.data tbody td { padding: 9px 14px; font-size: 14px; }

.move-from { color: var(--cream-dim); }
.move-to { color: var(--lime-bright); }
.move-arrow { color: var(--cream-faint); padding-inline: 6px; }
.move-arrow--up { color: var(--lime-bright); }
.move-arrow--down { color: var(--red); }

/* Publish gate */
.gate {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border: 1px solid rgba(224, 118, 107, 0.55);
  border-radius: var(--radius);
  background:
    radial-gradient(110% 150% at 0% 0%, rgba(224, 118, 107, 0.13), transparent 58%),
    linear-gradient(180deg, rgba(18, 48, 31, 0.5), rgba(13, 35, 23, 0.3));
}

.gate--ok {
  border-color: rgba(184, 217, 53, 0.45);
  background:
    radial-gradient(110% 150% at 0% 0%, rgba(184, 217, 53, 0.1), transparent 58%),
    linear-gradient(180deg, rgba(18, 48, 31, 0.5), rgba(13, 35, 23, 0.3));
}

.gate-title { font-weight: 700; color: var(--cream); }
.gate--ok .gate-title { color: var(--lime-bright); }

.gate-sub { color: var(--cream-dim); font-size: 13.5px; }

.action-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.action-row form { display: contents; }

/* Mini podium (top_new on preview) */
.mini-podium { padding: 18px 20px; }

/* --- Landing composition ------------------------------------------- */
.landing-grid {
  display: grid;
  gap: clamp(20px, 3.4vh, 30px);
}

.landing-block { min-width: 0; }

.duo-grid {
  display: grid;
  gap: clamp(20px, 3.4vh, 30px);
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .duo-grid { grid-template-columns: 1.25fr 1fr; align-items: start; }
}

/* --- Reveal on load: gentle, staggered, vertical only --------------- */
@keyframes rise-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.reveal {
  animation: rise-in 480ms cubic-bezier(0.22, 0.8, 0.25, 1) both;
  animation-delay: calc(var(--reveal-i, 0) * 70ms);
}

/* --- Reduced motion: settle instantly -------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { animation: none; }
  .pod, .pod--1, .pod--3, .cta, .dropzone,
  .site-nav a, .site-nav a::before, .btn, .week-dot, .chip {
    transition: none;
    animation: none;
  }
  .pod--1, .pod--3 { transform: none; }
}

/* Big-screen breathing */
@media (min-width: 1100px) {
  :root { --shell: 1120px; }
}
