/* Business Class Table Tennis — site styles

   How this file is layered (later layers refine earlier ones; keep that order):
     1. Base            layout, components and pages (the 2026 rebuild)
     2. Dark mode       html[data-theme="dark"] overrides for the base
     3. Brand           navy / cream, red buttons, stripe colours, Barlow fonts, dark mode for the brand
     4. 70s layer       sand paper, slanted headlines, racing stripes, pills, score tiles, league-blue bands
     5. Type            Sofia Sans (free stand-in for American Grotesk) and the stacked wordmark
     6. Features        live strip, Rally arcade, motion, Hall of Fame timeline, team pages, Easter egg
   Colour tokens live in :root in layer 3 (and layer 4 for light mode only). Every animation has a
   prefers-reduced-motion fallback. */

:root {
  --teal-900: #123f48;
  --teal-800: #1a5360;
  --teal-700: #216775;
  --teal-500: #00948a;
  --teal-400: #19b3a6;
  --teal-50: #e9f0f1;
  --teal-25: #f4f8f8;
  --ink: #1d2433;
  --ink-soft: #4b5565;
  --line: #dbe4e6;
  --white: #ffffff;
  --gold: #e8b23a;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(18, 63, 72, .06), 0 8px 24px rgba(18, 63, 72, .08);
  --max: 1160px;
  --font-head: "Outfit", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-700); }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .5em; color: var(--teal-900); letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.section { padding: 72px 0; }
.section--tint { background: var(--teal-25); }
.section__head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.section__head h2 { margin: 0; }
.eyebrow { display: inline-block; font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--teal-500); margin-bottom: 8px; }
.muted { color: var(--ink-soft); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; border: 2px solid transparent;
  font: 600 .95rem/1 var(--font-body); text-decoration: none; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, transform .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--teal-500); color: var(--white); }
.btn--primary:hover { background: var(--teal-700); }
.btn--light { background: var(--white); color: var(--teal-800); }
.btn--light:hover { background: var(--teal-50); }
.btn--ghost { border-color: currentColor; color: var(--teal-700); background: transparent; }
.btn--ghost:hover { background: var(--teal-700); color: var(--white); border-color: var(--teal-700); }
.link-arrow { font-weight: 600; text-decoration: none; white-space: nowrap; }
.link-arrow::after { content: " →"; }
.link-arrow:hover { text-decoration: underline; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.94); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.site-header__inner { display: flex; align-items: center; gap: 24px; height: 70px; }
.brand { display: flex; align-items: center; gap: 12px; flex: none; white-space: nowrap; text-decoration: none; color: var(--teal-900); }
.brand img { width: 28px; height: 44px; }
.brand span { display: grid; font: 700 1rem/1.1 var(--font-head); letter-spacing: .09em; text-transform: uppercase; }
/* "Table Tennis" spread to the same width as "Business Class" */
.brand small { display: flex; justify-content: space-between; margin-top: 4px; font-weight: 600; font-size: .74rem; letter-spacing: 0; color: var(--teal-500); }
.brand small i { font-style: normal; }
/* Links: quiet text, a teal bar under the page you're on */
.nav { margin-left: auto; display: flex; align-items: center; align-self: stretch; gap: 0; }
.nav a { position: relative; display: flex; align-items: center; align-self: stretch; padding: 0 13px; font-weight: 500; font-size: .94rem; color: var(--ink); text-decoration: none; white-space: nowrap; opacity: .72; transition: opacity .15s; }
.nav a:hover, .nav a.is-active { opacity: 1; }
.nav a::after { content: ""; position: absolute; left: 13px; right: 13px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--teal-500); transform: scaleX(0); transition: transform .2s ease; }
.nav a.is-active::after { transform: scaleX(1); }
.nav a:not(.btn):hover::after { transform: scaleX(.35); }
.nav .btn { align-self: center; position: relative; margin-left: 30px; padding: 9px 18px; font-size: .92rem; color: var(--white); opacity: 1; }
/* a thin divider between the links and the button */
.nav .btn::after { left: -16px; right: auto; top: 50%; bottom: auto; width: 1px; height: 22px; border-radius: 0; background: var(--line); transform: translateY(-50%); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; padding: 8px; cursor: pointer; color: var(--teal-900); }
.nav-toggle svg { width: 28px; height: 28px; }

@media (max-width: 1080px) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 70px; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 20px; background: var(--white); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .nav.is-open { display: flex; }
  .nav a { padding: 14px 12px; border-radius: var(--radius-sm); font-size: 1.05rem; opacity: 1; }
  .nav a::after, .nav .btn::after { display: none; }
  .nav a.is-active { background: var(--teal-50); color: var(--teal-700); }
  .nav .btn { margin: 12px 0 0; justify-content: center; align-self: stretch; }
}

/* Hero */
.hero { position: relative; background: var(--teal-900); color: var(--white); overflow: hidden; }
.hero__slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.hero__slides::-webkit-scrollbar { display: none; }
.hero__slide { position: relative; flex: 0 0 100%; scroll-snap-align: start; min-height: clamp(460px, 72vh, 680px); display: flex; align-items: end; }
.hero__slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(18,63,72,.05) 20%, rgba(18,63,72,.55) 60%, rgba(10,36,42,.92) 100%); }
.hero__content { position: relative; z-index: 1; padding-bottom: 72px; max-width: 820px; }
.hero__content h1, .hero__content h2 { color: var(--white); text-shadow: 0 2px 20px rgba(0,0,0,.25); }
.hero__content h2 { font-size: clamp(1.9rem, 4.4vw, 3.2rem); }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.hero__dots { position: absolute; z-index: 2; bottom: 28px; right: 20px; display: flex; gap: 8px; }
.hero__dots button { width: 10px; height: 10px; border-radius: 50%; border: 0; padding: 0; background: rgba(255,255,255,.45); cursor: pointer; }
.hero__dots button[aria-current="true"] { background: var(--white); width: 28px; border-radius: 999px; }

/* Stats strip */
.stats { background: var(--teal-700); color: var(--white); }
.stat strong { display: block; font: 700 clamp(1.8rem, 3.5vw, 2.6rem)/1 var(--font-head); }
.stat span { font-size: .9rem; opacity: .85; }

/* Cards */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card__body { padding: 24px; }
.grid-2 { display: grid; grid-template-columns: 1.15fr 1fr; gap: 24px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2--hof { grid-template-columns: 1fr 1.4fr; }
@media (max-width: 900px) { .grid-2, .grid-2--hof, .grid-3 { grid-template-columns: 1fr; } }

/* Team badges */
.badge-img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--teal-50); border: 1px solid var(--line); flex: none; }
.badge-img--lg { width: 64px; height: 64px; }

/* Match list */
.matches__date { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; font-weight: 600; color: var(--teal-700); margin-bottom: 8px; }
.pill { display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: var(--teal-50); color: var(--teal-700); }
.pill--gold { background: #fdf3dc; color: #8a5a00; }
.match { padding: 12px 0; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.match:first-of-type { border-top: 0; }
.match__row { display: flex; align-items: center; gap: 12px; color: var(--ink-soft); }
.match__name { flex: 1; min-width: 0; line-height: 1.3; }
.match__score { font: 700 1.15rem/1 var(--font-head); min-width: 36px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); background: var(--teal-25); color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.match__score:empty { background: none; }
.match__row.is-winner { color: var(--teal-900); font-weight: 600; }
.match__row.is-winner .match__score { background: var(--teal-700); color: var(--white); }

/* Standings */
.standings { width: 100%; border-collapse: collapse; font-size: .95rem; }
.standings th { text-align: left; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); font-weight: 600; padding: 0 8px 10px; }
.standings td { padding: 10px 8px; border-top: 1px solid var(--line); vertical-align: middle; }
.standings td.num, .standings th.num { text-align: right; font-variant-numeric: tabular-nums; }
.standings .team-cell { display: flex; align-items: center; gap: 10px; }
.standings tr.is-top td { background: #fbf6e8; }
.standings .rank { width: 28px; color: var(--ink-soft); font-weight: 600; }
.division + .division { margin-top: 24px; }
.division h3 { font-size: 1rem; color: var(--teal-700); margin-bottom: 8px; }

/* News cards */
.news-card { display: flex; flex-direction: column; overflow: hidden; text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; }
.news-card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(18,63,72,.06), 0 16px 36px rgba(18,63,72,.14); }
.news-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.news-card .card__body { display: flex; flex-direction: column; flex: 1; }
.news-card time { font-size: .85rem; color: var(--ink-soft); }
.news-card h3 { margin: 6px 0 10px; }
.news-card p { color: var(--ink-soft); font-size: .95rem; flex: 1; }
.news-card .link-arrow { color: var(--teal-700); }

/* Champions */
.champions { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
@media (max-width: 1000px) { .champions { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 520px) { .champions { grid-template-columns: repeat(2, 1fr); } }
.champion { text-align: center; padding: 18px 10px; border-radius: var(--radius); text-decoration: none; transition: background .15s; }
.champion:hover { background: var(--teal-50); }
.champion img { margin: 0 auto 12px; }
.champion strong { display: block; font-family: var(--font-head); font-size: 1.05rem; color: var(--teal-900); }
.champion span { font-size: .85rem; color: var(--ink-soft); }
.trophy-callout { display: flex; align-items: center; gap: 16px; padding: 20px 24px; margin-bottom: 24px; background: linear-gradient(90deg, #fdf3dc, #fff9ec); border: 1px solid #f3dfae; border-radius: var(--radius); }
.trophy-callout svg { width: 36px; height: 36px; color: var(--gold); flex: none; }

/* Sponsors */
.sponsors { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 40px; }
.sponsors a { display: block; opacity: .85; transition: opacity .15s, transform .15s; }
.sponsors a:hover { opacity: 1; transform: scale(1.04); }
.sponsors img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; box-shadow: var(--shadow); }

/* CTA band */
.cta { background: radial-gradient(1200px 400px at 10% 0%, var(--teal-500), transparent), var(--teal-800); color: var(--white); border-radius: 24px; padding: clamp(32px, 6vw, 64px); display: grid; grid-template-columns: 1.4fr auto; align-items: center; gap: 24px; }
.cta h2 { color: var(--white); margin-bottom: 8px; }
.cta p { margin: 0; opacity: .9; max-width: 560px; }
@media (max-width: 760px) { .cta { grid-template-columns: 1fr; } }

/* Footer */
.site-footer { background: var(--teal-900); color: rgba(255,255,255,.8); padding: 56px 0 28px; margin-top: 72px; font-size: .95rem; }
.site-footer a { color: rgba(255,255,255,.85); text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer__grid h4 { color: var(--white); font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 14px; }
.footer__grid ul { list-style: none; padding: 0; margin: 0; }
.footer__grid li { margin-bottom: 8px; }
.footer__brand { max-width: 300px; }
.footer__brand > img { display: block; width: 160px; height: auto; margin: 0 auto 18px; }
.social { display: flex; gap: 12px; margin-top: 12px; }
.social a { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 50%; background: rgba(255,255,255,.1); }
.social svg { width: 18px; height: 18px; fill: currentColor; }
.footer__base { border-top: 1px solid rgba(255,255,255,.12); margin-top: 40px; padding-top: 20px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .85rem; color: rgba(255,255,255,.6); }
.footer__weather p { margin: 0; }
.footer__weather-reading { color: var(--white); }
.footer__weather-quip { margin-top: 10px !important; max-width: 280px; }
@media (max-width: 1000px) { .footer__grid { grid-template-columns: 1.4fr 1fr 1fr; } .footer__weather { grid-column: 1 / -1; } }
@media (max-width: 760px) { .footer__grid { grid-template-columns: 1fr 1fr; } .footer__brand { grid-column: 1 / -1; } }
/* Footer intro: left-aligned beside the link columns on wider screens; centred under the logo on phones */
.footer__brand .presented-by { justify-content: flex-start; }
@media (max-width: 760px) {
  .footer__brand { max-width: 420px; margin: 0 auto 8px; text-align: center; }
  .footer__brand .presented-by, .footer__brand .social { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ---------- Inner pages ---------- */
.page-hero { background: linear-gradient(180deg, var(--teal-50), var(--teal-25)); border-bottom: 1px solid var(--line); padding: 56px 0 44px; }
.page-hero h1 { font-size: clamp(2rem, 4.4vw, 3rem); margin-bottom: 10px; }
.page-hero p { font-size: 1.15rem; color: var(--ink-soft); max-width: 720px; margin: 0; }
.page-hero .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 16px; color: var(--ink-soft); font-size: .95rem; }
.breadcrumbs { font-size: .85rem; margin-bottom: 14px; color: var(--ink-soft); }
.breadcrumbs a { color: var(--teal-700); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs span { margin: 0 6px; opacity: .6; }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; align-items: start; }
.subnav { display: flex; gap: 4px; margin: 26px 0 -44px; }
.subnav a { position: relative; padding: 12px 14px; font-weight: 600; font-size: .95rem; color: var(--ink); text-decoration: none; opacity: .7; transition: opacity .15s; }
.subnav a:first-child { padding-left: 0; }
.subnav a:hover, .subnav a.is-active { opacity: 1; }
.subnav a::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--teal-500); transform: scaleX(0); transition: transform .2s ease; }
.subnav a:first-child::after { left: 0; }
.subnav a.is-active::after { transform: scaleX(1); }
.perks { display: grid; gap: 16px; }
.perk { display: flex; gap: 18px; align-items: flex-start; padding: 20px 22px; }
.perk img, .perk__mono { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex: none; background: #fff; box-shadow: var(--shadow); }
.perk__mono { display: grid; place-items: center; background: var(--teal-500); color: #fff; font: 800 1.6rem/1 var(--font-head); }
.perk__text { min-width: 0; }
.perk h2 { margin: 2px 0 2px; font-size: 1.25rem; }
.perk .muted { margin: 0 0 8px; font-size: .92rem; }
.perk__offer { margin: 0 0 8px; font-weight: 700; font-size: 1.05rem; color: var(--teal-700); }
.perk__how { margin: 0; font-size: .9rem; color: var(--ink-soft); }
@media (max-width: 640px) { .perk { gap: 14px; padding: 16px; } .perk img, .perk__mono { width: 52px; height: 52px; font-size: 1.3rem; } }
.layout--narrow { max-width: 760px; margin: 0 auto; display: block; }
@media (max-width: 960px) { .layout { grid-template-columns: 1fr; } }

/* Article text from the editor */
.prose { font-size: 1.06rem; line-height: 1.75; color: var(--ink); }
.prose > *:first-child { margin-top: 0; }
.prose h2 { font-size: 1.6rem; margin: 1.6em 0 .5em; }
.prose h3, .prose h4 { font-size: 1.25rem; margin: 1.4em 0 .4em; }
.prose a { color: var(--teal-700); text-underline-offset: 2px; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .35em; }
.prose img { border-radius: var(--radius-sm); }
.prose .richtext-image.left { float: left; margin: 0 1.2em 1em 0; max-width: 50%; }
.prose .richtext-image.right { float: right; margin: 0 0 1em 1.2em; max-width: 50%; }
.prose .richtext-image.full-width { width: 100%; margin: 1.4em 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: .95rem; }
.prose td, .prose th { border-bottom: 1px solid var(--line); padding: 8px; text-align: left; }
.prose::after { content: ""; display: table; clear: both; }
.lead { font-size: 1.2rem; color: var(--ink-soft); }
/* FAQ: question and answer rows (FAQBlock) */
.faq { border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; margin: 0 0 10px; }
.faq summary { cursor: pointer; list-style: none; padding: 14px 44px 14px 16px; font-weight: 600; color: var(--teal-900); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 1.3rem; color: var(--teal-700); }
.faq[open] summary::after { content: "–"; }
.faq summary:focus-visible { outline: 2px solid var(--teal-500); outline-offset: 2px; border-radius: var(--radius-sm); }
.faq__answer { padding: 0 16px 6px; color: var(--ink); }
.faq__answer > *:first-child { margin-top: 0; }

.figure { margin: 1.8em 0; }
.figure img { width: 100%; border-radius: var(--radius); }
.figure--portrait img { width: auto; max-height: 520px; margin: 0 auto; }
.figure figcaption { font-size: .9rem; color: var(--ink-soft); margin-top: 8px; text-align: center; }
.embed { position: relative; margin: 1.8em 0; border-radius: var(--radius); overflow: hidden; background: #000; }
.embed iframe { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; }

.quote { display: flex; gap: 18px; align-items: start; margin: 2em 0; padding: 24px 28px; background: var(--teal-25); border-left: 4px solid var(--teal-500); border-radius: var(--radius-sm); }
.quote img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: none; }
.quote blockquote { margin: 0; font: 500 1.25rem/1.5 var(--font-head); color: var(--teal-900); }
.quote cite { display: block; margin-top: 10px; font: 500 .95rem var(--font-body); font-style: normal; color: var(--ink-soft); }

.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.tag { display: inline-block; padding: 5px 12px; border-radius: 999px; background: var(--white); border: 1px solid var(--line); font-size: .85rem; font-weight: 500; color: var(--teal-700); text-decoration: none; }
.tag:hover, .tag.is-active { background: var(--teal-700); border-color: var(--teal-700); color: var(--white); }

.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 40px; }
.pager .muted { font-size: .9rem; }

.news-list { display: grid; gap: 24px; }
.news-row { display: grid; grid-template-columns: 280px 1fr; gap: 24px; overflow: hidden; text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; }
.news-row:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(18,63,72,.06), 0 16px 36px rgba(18,63,72,.14); }
.news-row img { width: 100%; height: 100%; min-height: 180px; object-fit: cover; }
.news-row .card__body { padding: 22px 24px 22px 0; }
.news-row time { font-size: .85rem; color: var(--ink-soft); }
.news-row h2 { font-size: 1.35rem; margin: 6px 0 8px; }
.news-row p { color: var(--ink-soft); margin-bottom: 10px; }
@media (max-width: 640px) { .news-row { grid-template-columns: 1fr; } .news-row img { aspect-ratio: 16/9; min-height: 0; } .news-row .card__body { padding: 0 20px 20px; } }

.sidebar { display: grid; gap: 24px; }
.sidebar h3 { font-size: 1rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.mini-post { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: center; text-decoration: none; color: inherit; padding: 8px 0; }
.mini-post img { width: 96px; height: 64px; object-fit: cover; border-radius: var(--radius-sm); }
.mini-post strong { display: block; font-size: .95rem; line-height: 1.3; color: var(--teal-900); }
.mini-post span { font-size: .8rem; color: var(--ink-soft); }

.author { display: flex; gap: 18px; align-items: center; }
.author img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex: none; }
.author strong { display: block; color: var(--teal-900); font-family: var(--font-head); font-size: 1.1rem; }

/* Tabs (competition pages) */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 32px; overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 12px 16px; border-bottom: 3px solid transparent; font-weight: 600; color: var(--ink-soft); text-decoration: none; white-space: nowrap; }
.tabs a:hover { color: var(--teal-700); }
.tabs a.is-active { color: var(--teal-700); border-color: var(--teal-500); }

.round { margin-bottom: 20px; }
.round summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 24px; font-weight: 600; color: var(--teal-800); }
.round summary::-webkit-details-marker { display: none; }
.round summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--teal-500); }
.round[open] summary::after { content: "–"; }
.round .card__body { padding-top: 0; }
.final-tag { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #8a5a00; background: #fdf3dc; border-radius: 999px; padding: 2px 8px; margin-left: 8px; }

.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.team-card .card__body { display: grid; gap: 12px; }
.team-card header { display: flex; align-items: center; gap: 14px; }
.team-card h3 { margin: 0; font-size: 1.15rem; }
.team-card ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.team-card li { font-size: .85rem; background: var(--teal-25); border-radius: 999px; padding: 3px 10px; color: var(--ink-soft); }

.comp-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
/* Plain rows with a line between them, not a stack of boxes */
.comp-list .comp-row { background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; padding: 16px 8px; }
.comp-list .comp-row:hover { transform: none; background: var(--teal-25); }
.comp-row { display: flex; align-items: center; gap: 18px; padding: 18px 22px; text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; }
.comp-row:hover { transform: translateY(-2px); }
.comp-row .year { font: 700 1.5rem/1 var(--font-head); color: var(--teal-500); min-width: 64px; }
.comp-row strong { display: block; color: var(--teal-900); font-size: 1.05rem; }
.comp-row span { font-size: .9rem; color: var(--ink-soft); }
.comp-row .winner { margin-left: auto; display: flex; align-items: center; gap: 10px; text-align: right; }
@media (max-width: 560px) { .comp-row { flex-wrap: wrap; } .comp-row .winner { margin-left: 0; width: 100%; text-align: left; } }

/* Forms */
.form-card { padding: clamp(24px, 4vw, 40px); }
.form-field { margin-bottom: 20px; }
.form-field label { display: block; font-weight: 600; margin-bottom: 6px; color: var(--teal-900); }
.form-field input[type=text], .form-field input[type=email], .form-field input[type=tel], .form-field input[type=number], .form-field input[type=url], .form-field input[type=date], .form-field select, .form-field textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); font: inherit; color: var(--ink); background: var(--white); transition: border-color .15s, box-shadow .15s;
}
.form-field textarea { min-height: 140px; resize: vertical; }
.form-field textarea[name*="members"] { min-height: 0; }   /* the Join form's players: four lines is enough */
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { outline: none; border-color: var(--teal-500); box-shadow: 0 0 0 4px rgba(0,148,138,.15); }
.form-field .help { font-size: .85rem; color: var(--ink-soft); margin-top: 6px; }
.form-field .error { font-size: .9rem; color: #b42318; margin-top: 6px; }
.form-field.has-error input, .form-field.has-error select, .form-field.has-error textarea { border-color: #d92d20; }
.form-field ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.form-field ul label { font-weight: 400; display: flex; gap: 8px; align-items: center; }
.notice { padding: 16px 20px; border-radius: var(--radius-sm); background: var(--teal-50); color: var(--teal-900); margin-bottom: 24px; }
.notice--success { background: #e7f6ef; color: #0c5132; }

/* Empty / error states */
.empty { text-align: center; padding: 80px 0; }
.empty .big { font: 700 clamp(4rem, 12vw, 7rem)/1 var(--font-head); color: var(--teal-500); margin-bottom: 12px; }

/* Teams directory & team profile */
.team-directory { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.team-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 24px 16px; text-align: center; text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; }
.team-tile:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(18,63,72,.06), 0 16px 36px rgba(18,63,72,.14); }
.team-tile img { margin-bottom: 6px; }
.team-tile strong { font-family: var(--font-head); font-size: 1.05rem; color: var(--teal-900); }
.team-tile > span:not(.pill) { font-size: .85rem; color: var(--ink-soft); }
.team-detail .page-hero .badge-img--lg { width: 96px; height: 96px; }
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat-cards .card__body { text-align: center; padding: 20px 12px; }
.stat-cards strong { display: block; font: 700 1.8rem/1.1 var(--font-head); color: var(--teal-700); }
.stat-cards span { font-size: .85rem; color: var(--ink-soft); }
@media (max-width: 640px) { .stat-cards { grid-template-columns: repeat(2, 1fr); } }
a.team-link { color: inherit; text-decoration: none; }
a.team-link:hover { color: var(--teal-700); text-decoration: underline; }

/* ---------- Loading screen (first page of a visit only) ----------
   Coloured frames open from the centre, the site's photos flash through,
   then it closes back to the logo. Adapted from the Profile Photos loader. */
#bc-loader { position: fixed; inset: 0; z-index: 9999; background: var(--teal-900); color: #fff; overflow: hidden; transition: opacity .6s ease, visibility .6s ease; }
#bc-loader.is-done { opacity: 0; visibility: hidden; }
html.bc-loading, html.bc-loading body { overflow: hidden; }
html.bc-loader-skip #bc-loader { display: none; }
#bc-loader .bc-title { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
#bc-loader .bc-title img { width: clamp(140px, 18vw, 220px); height: auto; }
html.bc-loading:not(.bc-loader-still) #bc-loader .bc-title { opacity: 0; }
#bc-loader .bc-footer { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; padding: 0 clamp(16px, 2.6vw, 40px) clamp(14px, 2.4vh, 28px); font: 500 clamp(10px, .9vw, 13px)/1.4 ui-monospace, Menlo, monospace; letter-spacing: .06em; text-transform: uppercase; color: rgba(255,255,255,.85); }
#bc-loader .bc-footer span { flex: 1; }
#bc-loader .bc-footer span:nth-child(2) { text-align: center; }
#bc-loader .bc-footer span:nth-child(3) { text-align: right; }
@media (max-width: 600px) { #bc-loader .bc-footer span:nth-child(2) { display: none; } }

/* Form guide & stats */
.form-guide { display: inline-flex; gap: 4px; vertical-align: middle; }
.form-guide i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.form-guide .form-W { background: var(--teal-500); }
.form-guide .form-L { background: transparent; box-shadow: inset 0 0 0 2px #c3cfd2; }
@media (max-width: 560px) { .hide-sm { display: none; } }
.rating { font: 700 1.05rem var(--font-head); color: var(--teal-700); font-variant-numeric: tabular-nums; }
.rank-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 30px; border-radius: 999px; background: var(--teal-50); color: var(--teal-800); font: 700 .9rem var(--font-head); }
.rank-badge--1 { background: #fdf3dc; color: #8a5a00; }
.spark { width: 100%; height: 72px; display: block; }
.spark path { fill: none; stroke: var(--teal-500); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.record-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.record-card h3 { font-size: 1rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 14px; }
.record-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.record-row:first-of-type { border-top: 0; }
.record-row .grow { flex: 1; min-width: 0; }
.record-row .val { font: 700 1.1rem var(--font-head); color: var(--teal-900); font-variant-numeric: tabular-nums; }
.big-fact { font: 700 clamp(2.4rem, 6vw, 3.6rem)/1 var(--font-head); color: var(--teal-700); }
.vs-hero { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; text-align: center; }
.vs-hero .side { display: grid; justify-items: center; gap: 10px; }
.vs-hero .side strong { font: 700 1.3rem var(--font-head); color: var(--teal-900); }
.vs-hero .score { font: 700 clamp(2.6rem, 8vw, 4.5rem)/1 var(--font-head); color: var(--teal-900); }
.vs-hero .score small { display: block; font: 500 .85rem var(--font-body); color: var(--ink-soft); margin-top: 8px; }
.vs-hero .badge-img--lg { width: 88px; height: 88px; }
@media (max-width: 560px) { .vs-hero .badge-img--lg { width: 56px; height: 56px; } .vs-hero .side strong { font-size: 1rem; } }

.h2h-line { font-size: .8rem; color: var(--ink-soft); padding-left: 52px; }
.h2h-line a { color: var(--teal-700); text-decoration: none; }
.h2h-line a:hover { text-decoration: underline; }

.otd { display: flex; align-items: center; gap: 20px; padding: 16px 22px; text-decoration: none; color: var(--ink); background: linear-gradient(90deg, #fff9ec, #fff); border-color: #f3dfae; }
.otd__when { text-align: center; min-width: 84px; color: #8a5a00; font-size: .8rem; line-height: 1.1; }
.otd__when strong { display: block; font: 700 2rem var(--font-head); }
.otd__what { font-weight: 500; }
@media (max-width: 600px) { .hero-extra { display: none; } }
.otd-line { margin: 8px 0 0; color: var(--ink-soft); font-size: .95rem; }
.otd-line a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
a.otd:hover { box-shadow: 0 2px 4px rgba(18,63,72,.06), 0 12px 28px rgba(18,63,72,.12); }
.tip-card { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding: 12px; margin: 0 0 12px; border: 1px solid var(--line); }
.tip-card .h2h-line { grid-column: 1 / -1; padding-left: 0; text-align: center; }
.tip-option { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm); border: 2px solid transparent; cursor: pointer; font-weight: 600; }
.tip-option input { position: absolute; opacity: 0; pointer-events: none; }
.tip-option:has(input:checked) { border-color: var(--teal-500); background: var(--teal-25); }
.tip-option:has(input:focus-visible) { outline: 3px solid rgba(0,148,138,.35); }
.tip-card .tip-option:last-of-type { flex-direction: row-reverse; text-align: right; }

/* Competition photo gallery + lightbox */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.gallery__item { padding: 0; border: 0; border-radius: var(--radius-sm); overflow: hidden; cursor: zoom-in; background: var(--teal-50); }
.gallery__item img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform .25s; }
.gallery__item:hover img { transform: scale(1.04); }
.lightbox { border: 0; padding: 0; background: transparent; max-width: 92vw; max-height: 92vh; }
.lightbox::backdrop { background: rgba(10, 30, 35, .88); }
.lightbox img { max-width: 92vw; max-height: 84vh; border-radius: var(--radius-sm); }
.lightbox p { color: #fff; text-align: center; margin: 10px 0 0; }
.lightbox__close { position: fixed; top: 16px; right: 20px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.15); color: #fff; font-size: 28px; cursor: pointer; }

.grid-2--records { grid-template-columns: 1.2fr 1fr; }
.stat-cards--3 { grid-template-columns: repeat(3, 1fr); }
.stats-strip .stat-cards > div { text-align: center; }
@media (max-width: 900px) { .grid-2--records { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .stat-cards--3 { grid-template-columns: 1fr; } .standings td, .standings th { padding-left: 4px; padding-right: 4px; } }

/* Hidden way into the Rally Challenge game: a tiny ball in the footer */
.egg { display: inline-block; width: 7px; height: 7px; margin-left: 8px; border-radius: 50%; background: #f7a541; opacity: .55; vertical-align: middle; transition: transform .2s, opacity .2s; }
.egg:hover, .egg:focus-visible { opacity: 1; transform: scale(1.8); }

/* Interest meter */
.meter { padding: 20px 24px; display: grid; grid-template-columns: 1fr auto; gap: 12px 24px; align-items: center; background: linear-gradient(90deg, #eef8f6, #fff); }
.meter__big { font: 600 1.35rem/1.25 var(--font-head); margin: 4px 0 2px; }
.meter__big strong { font-size: 2rem; color: var(--teal-700); }
.meter__sub { margin: 0; color: var(--ink-soft); }
.meter__bar { grid-column: 1 / -1; height: 14px; border-radius: 999px; background: var(--teal-50); overflow: hidden; order: 3; }
.meter__bar span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--teal-500), #f7a541); transition: width 1s ease; }
@media (max-width: 640px) { .meter { grid-template-columns: 1fr; } .meter .btn { justify-self: start; } }

/* Win chance bar */
.chance { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "pa bar pb" "lbl lbl lbl"; gap: 2px 8px; align-items: center; font-size: .78rem; color: var(--ink-soft); margin-top: 4px; }
.chance__pct { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.chance__pct:first-child { grid-area: pa; } .chance__pct:nth-child(3) { grid-area: pb; }
.chance__bar { grid-area: bar; height: 6px; border-radius: 999px; background: #f7d7a8; overflow: hidden; }
.chance__bar span { display: block; height: 100%; background: var(--teal-500); }
.chance__label { grid-area: lbl; text-align: center; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; }
.record-row.is-bot { background: #f4f8f8; border-radius: 8px; }

/* Team badges */
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; margin-top: 16px; }
.badge-tile { display: grid; justify-items: center; text-align: center; gap: 4px; padding: 14px 8px; border-radius: var(--radius-sm); background: linear-gradient(180deg, #fff8ea, #fff); border: 1px solid #f3dfae; }
.badge-tile__icon { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: #f7a541; color: #fff; box-shadow: 0 4px 12px rgba(247,165,65,.35); }
.badge-tile__icon svg { width: 26px; height: 26px; }
.badge-tile strong { font-size: .9rem; color: var(--ink); }
.badge-tile span:last-child { font-size: .75rem; color: var(--ink-soft); line-height: 1.3; }
.badge-tile.is-locked { background: var(--teal-25); border-color: var(--line); }
.badge-tile.is-locked .badge-tile__icon { background: #cfd9db; box-shadow: none; }
.badge-tile.is-locked strong { color: var(--ink-soft); }

.wrapped-link { display: inline-block; margin: -4px 0 10px 14px; font-size: .88rem; font-weight: 600; color: #c2410c; text-decoration: none; }
.wrapped-link:hover { text-decoration: underline; }
.wrapped-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.wrapped-chips a { font-size: .85rem; font-weight: 600; padding: 5px 11px; border-radius: 999px; text-decoration: none; color: #fff; background: linear-gradient(135deg, #f7a541, #e2582b); }

/* Match night hub on the home page */
.tonight { background: radial-gradient(1200px 500px at 10% -20%, #1f6f7c, #0e2f36); padding: 40px 0 36px; }
.tonight__grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; align-items: start; }
.tonight__side { display: grid; gap: 20px; }
.tonight__status { margin: -6px 0 10px 54px; font-size: .8rem; color: #a76300; }
.tonight__actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.live-dot-sm { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #e53935; margin-right: 6px; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
@media (max-width: 860px) { .tonight__grid { grid-template-columns: 1fr; } }
.follow-btn { padding: 8px 16px; font-size: .9rem; }
.follow-btn.is-on { background: var(--teal-700); }
.follow-hint { margin-top: 16px; }

/* Season Wrapped card (home page) */
/* Two equal boxes side by side, same height, buttons lined up along the bottom */
.grid-2.fun-cards { grid-template-columns: 1fr 1fr; align-items: stretch; }
@media (max-width: 900px) { .grid-2.fun-cards { grid-template-columns: 1fr; } }
.fun-card { display: flex; flex-direction: column; align-items: flex-start; padding: 26px 26px 24px; text-decoration: none; color: #fff; border: 0; }
.fun-card > .btn { margin-top: auto; }
.fun-card .wrapped-chips { margin-bottom: 18px; }
.fun-card .eyebrow { color: rgba(255,255,255,.85); margin: 0 0 6px; }
.fun-card h3 { color: #fff; font-size: 1.45rem; margin: 0 0 8px; }
.fun-card p { color: rgba(255,255,255,.9); margin: 0; }
.fun-card ul { list-style: none; padding: 0; margin: 14px 0 18px; display: grid; gap: 6px; font-size: .95rem; color: rgba(255,255,255,.92); }
.fun-card--wrapped { background: linear-gradient(135deg, #f7a541, #e2582b); }
.nav a.nav-play::before { content: ""; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #f97316; flex: none; }

/* ---- Match-night scoresheet ---- */
.se__grid { display: grid; grid-template-columns: 1fr 84px; gap: 10px; align-items: center; }
.se__grid label { font-weight: 600; }
.se__grid input { font-size: 1.4rem; text-align: center; padding: 10px; border: 1.5px solid var(--line); border-radius: 8px; width: 100%; box-sizing: border-box; }
.sheet__step { font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; color: var(--teal-900); margin: 18px 0 10px; }
.sheet__step span { font-family: var(--font-body); font-weight: 400; font-size: .85rem; color: var(--ink-soft); margin-left: 6px; }
.sheet__players { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sheet__side { background: var(--teal-25); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; display: grid; gap: 8px; align-content: start; min-width: 0; }
.sheet__team { font-size: .95rem; line-height: 1.25; overflow-wrap: anywhere; }
.sheet__pick { display: grid; gap: 4px; font-size: .8rem; color: var(--ink-soft); }
.sheet__pick select, .sheet__pick input { font: inherit; font-size: 1rem; color: var(--ink); padding: 9px 8px; border: 1.5px solid var(--line); border-radius: 8px; background: var(--white); width: 100%; box-sizing: border-box; min-width: 0; }
.sheet__rubber { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px 12px; margin: 0 0 10px; min-width: 0; }
.sheet__rubber.is-done { border-color: rgba(0, 148, 138, .45); background: rgba(0, 148, 138, .04); }
.sheet__rubber legend { padding: 0 6px; margin-left: -6px; font-size: .95rem; max-width: 100%; }
.sheet__label { font-weight: 700; color: var(--teal-700); }
.sheet__names { color: var(--ink-soft); }
.sheet__code { display: inline-block; font-size: .72rem; font-weight: 700; color: var(--teal-700); background: var(--teal-50); border-radius: 4px; padding: 1px 6px; margin-right: 2px; vertical-align: 1px; }
.sheet__ump { margin: 0 0 4px; font-size: .78rem; color: var(--ink-soft); }
.sheet__grid { display: grid; grid-template-columns: 64px 1fr 1fr; gap: 6px 8px; align-items: center; margin-top: 4px; }
.sheet__col { font-size: .78rem; font-weight: 600; color: var(--ink-soft); text-align: center; line-height: 1.2; overflow-wrap: anywhere; }
.sheet__g { font-size: .85rem; color: var(--ink-soft); }
.sheet__grid input { font-size: 1.3rem; text-align: center; padding: 8px 4px; border: 1.5px solid var(--line); border-radius: 8px; width: 100%; box-sizing: border-box; min-width: 0; -moz-appearance: textfield; }
.sheet__grid input::-webkit-outer-spin-button, .sheet__grid input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sheet__grid input:focus, .sheet__pick select:focus, .sheet__pick input:focus { outline: none; border-color: var(--teal-500); box-shadow: 0 0 0 3px rgba(0, 148, 138, .15); }
.sheet__grid [hidden] { display: none; }
.sheet__res { margin: 8px 0 0; font-size: .88rem; color: var(--ink-soft); min-height: 1em; }
.sheet__res:empty { display: none; }
.sheet__res.is-done { color: #157a4f; font-weight: 600; }
.sheet__res.is-bad { color: #b3261e; }
.sheet__total { position: sticky; bottom: 0; background: var(--teal-900); color: #fff; border-radius: var(--radius-sm); padding: 12px 14px; text-align: center; margin: 14px 0 0; font-size: .95rem; z-index: 2; }
.sheet__total strong { font-size: 1.4rem; margin: 0 4px; }
.sheet__error { background: #fdecea; color: #8c1d18; border-radius: 8px; padding: 10px 12px; margin: 10px 0 0; font-size: .9rem; }
.sheet .btn, .sheet__quick .btn { width: 100%; justify-content: center; margin-top: 12px; }
.sheet__quick { margin-top: 14px; font-size: .9rem; }
/* Save as you go: each singles/doubles has its own Save button */
.sheet__save { display: flex; flex-direction: column; align-items: stretch; }
.sheet__save [hidden] { display: none; }
.sheet__saved { margin-top: 10px; padding: 9px 12px; border-radius: 8px; background: rgba(21,122,79,.1); color: #157a4f; font-weight: 600; font-size: .92rem; text-align: center; }
.sheet__rubber.is-saved { border-color: rgba(21,122,79,.5); background: rgba(21,122,79,.05); }
.sheet__rubber.is-walkover .sheet__save { display: none; }
.sheet__msg { background: rgba(21,122,79,.1); color: #157a4f; border-radius: 8px; padding: 10px 12px; margin: 10px 0 0; font-size: .92rem; font-weight: 600; }
.sheet__msg.is-queued { background: #fff4e0; color: #8a5a00; }
.sheet__note { margin: 12px 0 0; font-size: .85rem; color: var(--ink-soft); }
.sheet__gsaved { margin: 4px 0 0; font-size: .8rem; color: #157a4f; }
.sheet__gsaved.is-queued { color: #8a5a00; }
.sheet__quick summary { cursor: pointer; color: var(--teal-700); font-weight: 600; }
.sheet__quick form { padding-top: 10px; }
@media (max-width: 380px) { .sheet__players { grid-template-columns: 1fr; } .sheet__grid { grid-template-columns: 54px 1fr 1fr; } }

/* ---- Scoresheet on match pages, player stats ---- */
.rubbers { display: grid; gap: 8px; }
.rubber { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.rubber:last-child { border-bottom: 0; }
.rubber__label { grid-column: 1 / -1; font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); font-weight: 600; margin-bottom: -6px; }
.rubber__side { font-weight: 500; line-height: 1.3; }
.rubber__side a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--line); }
.rubber__side.is-win { font-weight: 700; color: var(--teal-900); }
.rubber__side--two { text-align: right; }
.rubber__score { text-align: center; font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; white-space: nowrap; }
.rubber__games { display: block; font-family: var(--font-body); font-weight: 400; font-size: .75rem; color: var(--ink-soft); white-space: normal; }
.ptable { width: 100%; border-collapse: collapse; font-size: .92rem; }
.ptable th { text-align: left; font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-soft); font-weight: 600; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.ptable td { padding: 9px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ptable tr:last-child td { border-bottom: 0; }
.ptable .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ptable a { color: var(--ink); font-weight: 600; text-decoration: none; }
.ptable a:hover { color: var(--teal-700); }
.ptable .sub { display: block; font-size: .8rem; color: var(--ink-soft); font-weight: 400; }
.ptable-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.form-dots { display: inline-flex; gap: 3px; }
.form-dots i { width: 9px; height: 9px; border-radius: 50%; background: #c9d3d6; display: inline-block; }
.form-dots i.w { background: var(--teal-500); }
.form-dots i.l { background: #e07a5f; }

/* ---- Entry fees and invoices ---- */
.fee-card { margin-bottom: 24px; border-left: 4px solid var(--gold); scroll-margin-top: 90px; }
.fee-card.is-paid { border-left-color: var(--teal-500); }
.fee-card__title { margin: 0 0 4px; font-size: 1.6rem; }
.fee-card__title span { font-size: .9rem; font-weight: 500; color: var(--ink-soft); }
.fee-card__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.fee-card__actions form { margin: 0; }
.inv-form { display: grid; gap: 14px; }
.inv-form label { display: grid; gap: 6px; font-weight: 600; font-size: .95rem; }
.inv-form label .muted { font-weight: 400; }
.inv-form input, .inv-form textarea { font: inherit; font-weight: 400; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 8px; width: 100%; box-sizing: border-box; }
.inv-tools { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.inv-tools span { display: flex; gap: 14px; align-items: center; }
.invoice { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 36px; box-shadow: var(--shadow); color: #1d2433; }
.invoice__head { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 28px; }
.invoice__head h1 { margin: 0; font-size: 2rem; }
.invoice__ref { margin: 4px 0 0; font-weight: 600; color: var(--teal-700); }
.invoice__from { text-align: right; font-size: .9rem; line-height: 1.5; }
.invoice__meta { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 24px; font-size: .92rem; line-height: 1.5; }
.invoice__meta span { display: block; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); font-weight: 600; }
.invoice__lines { width: 100%; border-collapse: collapse; font-size: .95rem; }
.invoice__lines th { text-align: left; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); border-bottom: 2px solid #1d2433; padding: 8px 0; }
.invoice__lines td { padding: 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.invoice__lines .num { text-align: right; white-space: nowrap; }
.invoice__lines tfoot td { border-bottom: 0; padding: 6px 0; }
.invoice__lines tr.total td { font-weight: 700; border-top: 1px solid #1d2433; }
.invoice__pay { margin-top: 24px; background: var(--teal-25); border-radius: 8px; padding: 14px 16px; font-size: .92rem; }
.invoice__pay p { margin: 6px 0 0; }
.invoice__foot { margin: 28px 0 0; font-size: .85rem; color: var(--ink-soft); }
.invoice__stamp { position: absolute; top: 28px; right: 50%; transform: translateX(50%) rotate(-8deg); border: 3px solid #157a4f; color: #157a4f; font-weight: 800; font-size: 1.6rem; letter-spacing: .12em; text-transform: uppercase; padding: 4px 16px; border-radius: 8px; opacity: .85; }
@media (max-width: 560px) { .invoice { padding: 22px; } .invoice__from { text-align: left; } .invoice__meta { grid-template-columns: 1fr; } .invoice__stamp { top: 18px; right: 18px; transform: rotate(-8deg); font-size: 1.2rem; } }
@media print {
  .site-header, .site-footer, .no-print, .inv-tools, .no-print-hint, #bc-loader { display: none !important; }
  .inv-page { padding: 0 !important; }
  .invoice { border: 0; box-shadow: none; padding: 0; }
  body { background: #fff !important; }
}

.welcome-card { margin-bottom: 16px; background: var(--teal-900); color: #fff; border: 0; }
.welcome-card h2 { color: #fff; }
.welcome-card .btn--ghost { color: #fff; border-color: rgba(255,255,255,.6); }

/* ---- Captain page: team and player photos ---- */
.photos-card { margin-bottom: 24px; scroll-margin-top: 90px; }
.photos-card__title { margin: 0 0 4px; font-size: 1.25rem; }
.pc-row { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.pc-row:first-of-type { border-top: 0; }
.pc-row__name { min-width: 0; }
.pc-row__name strong { display: block; overflow-wrap: anywhere; }
.pc-row__name span { font-size: .82rem; color: var(--ink-soft); }
.pc-face { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; display: inline-grid; place-items: center; }
.pc-face--empty { background: var(--teal-50); color: var(--teal-700); font-weight: 700; }
.pc-upload { margin: 0; }
.pc-upload label { cursor: pointer; }
.btn--sm { padding: 8px 14px; font-size: .88rem; }
.sheet__hl { display: grid; gap: 4px; }
.sheet__hl textarea { font: inherit; font-size: 1rem; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 8px; width: 100%; box-sizing: border-box; resize: vertical; }
.highlights { display: grid; gap: 12px; }
.highlight { margin: 0; padding: 12px 16px; border-left: 4px solid var(--gold); background: var(--teal-25); border-radius: 0 8px 8px 0; }
.highlight p { margin: 0; font-size: 1.02rem; }
.highlight footer { margin-top: 6px; font-size: .82rem; color: var(--ink-soft); }
.form-check label { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; cursor: pointer; }
.form-check input[type="checkbox"] { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--teal-500); }
.sheet__short { display: flex; gap: 8px; align-items: center; font-size: .82rem; color: var(--ink-soft); cursor: pointer; }
.sheet__short input { width: 18px; height: 18px; accent-color: var(--teal-500); }
.sheet__rubber.is-walkover { background: var(--teal-25); }
.sheet__rubber.is-walkover .sheet__grid { display: none; }
.form-field input[type="file"] { font: inherit; font-size: .92rem; color: var(--ink-soft); width: 100%; }
.form-field input[type="file"]::file-selector-button { font: inherit; font-weight: 600; color: var(--teal-700); background: var(--teal-25); border: 1.5px solid var(--teal-500); border-radius: 999px; padding: 8px 16px; margin-right: 12px; cursor: pointer; }

/* ---- Sponsor credits ---- */
.sp-banner { display: flex; align-items: center; gap: 14px; background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: var(--radius-sm); padding: 10px 14px; margin: 0 0 16px; }
.sp-banner img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; background: #fff; box-shadow: var(--shadow); }
.sp-banner__text { display: grid; gap: 1px; min-width: 0; }
.sp-banner__lead { font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); font-weight: 600; }
.sp-banner strong { font-size: 1.05rem; color: var(--teal-900); }
.sp-banner strong a { color: inherit; text-decoration: none; }
.sp-banner__prize { font-size: .88rem; color: #8a5a00; }
.sp-banner--compact { padding: 6px 10px; gap: 10px; }
.sp-banner--compact img { width: 36px; height: 36px; }
.presented-by { display: flex; align-items: center; gap: 10px; justify-content: center; font-size: .85rem; opacity: .9; margin-top: 12px; }
.presented-by img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: #fff; }
.sp-tier { margin: 0 0 12px; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); font-weight: 700; }
.sp-perk { background: var(--teal-25); border-radius: 8px; padding: 10px 12px; margin-top: 12px; font-size: .9rem; text-align: left; }
.sp-perk code { background: #fff; border: 1px dashed var(--teal-500); padding: 1px 6px; border-radius: 4px; font-weight: 700; }
.sp-awards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 24px 0 0; }
.sp-award { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; }
.sp-award strong { display: block; color: var(--teal-900); }
.sp-award span { font-size: .88rem; color: var(--ink-soft); }
@media print { .sp-banner { break-inside: avoid; } }

/* Captain page: how each player's name shows on the site */
.names-select { font: inherit; font-size: .95rem; color: var(--ink); padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 8px; background: var(--white); max-width: 11.5rem; }
.names-select:focus { outline: none; border-color: var(--teal-500); box-shadow: 0 0 0 3px rgba(0, 148, 138, .15); }

/* For employers page (/for-employers/) */
.forward-box { margin-bottom: 32px; border: 1.5px solid var(--teal-500); }
.forward-box__buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.employer-body h2 { margin-top: 32px; }
.employer-body h2:first-child { margin-top: 0; }
.employer-fee { margin: 4px 0 8px; background: var(--teal-25, #eef8f7); border-left: 4px solid var(--gold); }
.employer-fee__price { font-family: Outfit, Inter, sans-serif; font-size: 2.2rem; font-weight: 700; color: var(--teal-900); margin: 0 0 8px; line-height: 1.1; }
.employer-fee__price span { display: block; font-family: Inter, sans-serif; font-size: .95rem; font-weight: 500; color: var(--ink-soft); margin-top: 4px; }
.print-only { display: none; }
@media print {
  .employers-page .page-hero { padding: 0 0 12px; background: none; color: #000; }
  .employers-page .page-hero h1, .employers-page .page-hero .lead, .employers-page .eyebrow { color: #000; }
  .employers-page .section { padding: 0; }
  .employers-page .employer-fee { border: 1px solid #999; }
  .print-only { display: block; }
  @page { margin: 12mm 14mm; }
  .employers-page { font-size: 10.5pt; }
  .employers-page .page-hero h1 { font-size: 20pt; margin-bottom: 4px; }
  .employers-page .page-hero p { font-size: 10.5pt; }
  .employers-page .wrap { max-width: none !important; padding: 0 !important; }
  .employers-page .prose li, .employers-page .prose p, .employers-page p { font-size: 10pt; line-height: 1.35; margin-bottom: 3px; }
  .employers-page .employer-body h2 { font-size: 13pt; margin: 12px 0 4px; }
  .employers-page .employer-fee { break-inside: avoid; box-shadow: none; }
  .employers-page .employer-fee .card__body { padding: 10px 14px; }
  .employers-page p.employer-fee__price { font-size: 18pt; margin-bottom: 4px; }
  .employers-page p.employer-fee__price span { font-size: 9.5pt; }
  .employers-page .print-logo { display: block; width: 54px; margin: 0 0 4px; }
}

/* "Get the app" box (includes/get_app.html) */
.get-app { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; color: var(--ink); text-align: left; background: var(--white); border: 1.5px solid var(--teal-500); border-radius: 14px; padding: 12px 14px; margin: 0 0 20px; box-shadow: 0 4px 14px rgba(18, 63, 72, .08); }
.get-app[hidden] { display: none; }
.get-app__icon { border-radius: 11px; display: block; }
.get-app__text { min-width: 0; }
.get-app__text strong { display: block; color: var(--teal-900); }
.get-app__text span { display: block; font-size: .85rem; color: var(--ink-soft); line-height: 1.35; }
.get-app__actions { display: flex; align-items: center; gap: 4px; }
.get-app__close { border: 0; background: none; font-size: 1.5rem; line-height: 1; color: var(--ink-soft); padding: 4px 6px; cursor: pointer; }
.get-app__guide { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 10px; font-size: .92rem; }
.get-app__guide ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.get-app__guide ol[hidden], .get-app__inapp[hidden] { display: none; }
.get-app__guide svg { vertical-align: -3px; color: var(--teal-700); }
.get-app__inapp { margin: 0 0 8px; background: #fff3d6; color: #6b4500; border-radius: 8px; padding: 8px 10px; }
@media (max-width: 480px) {
  .get-app { grid-template-columns: auto 1fr; }
  .get-app__actions { grid-column: 1 / -1; justify-content: space-between; }
}
@media print { .get-app { display: none !important; } }

/* Share bar (includes/share_bar.html) */
.share-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 18px 0 0; }
.share-bar__label { font-size: .85rem; font-weight: 600; color: var(--ink-soft); margin-right: 2px; }
.share-bar__btn { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: .88rem; font-weight: 600; line-height: 1; color: var(--teal-800, #1a5562); background: var(--white); border: 1.5px solid var(--line); border-radius: 999px; padding: 8px 13px; text-decoration: none; cursor: pointer; }
.share-bar__btn:hover { border-color: var(--teal-500); color: var(--teal-900); }
.share-bar[hidden], .share-bar__btn[hidden] { display: none; }
.share-bar__btn--main { background: var(--teal-700, #216775); border-color: var(--teal-700, #216775); color: #fff; }
.share-bar__btn--main:hover { color: #fff; }
.share-bar--dark .share-bar__label { color: rgba(255,255,255,.7); }
.share-bar--dark .share-bar__btn { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.25); color: #fff; }
.share-bar--dark .share-bar__btn--main { background: #f7a541; border-color: #f7a541; color: #1d2433; }
@media print { .share-bar { display: none !important; } }
.share-bar--center { justify-content: center; }
.team-name-suggest { margin-top: 8px; }

/* Sponsor page: "Where your logo goes" screenshots */
.where-shot { margin: 20px 0 0; }
.where-shot img { display: block; width: 100%; height: auto; border-radius: var(--radius-sm, 12px); border: 1px solid var(--line); background: #0b2429; }
.where-shot figcaption { font-size: .9rem; color: var(--ink-soft); margin-top: 8px; }
.where-key { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px 24px; }
.where-key li { display: flex; gap: 12px; align-items: flex-start; }
.where-key b { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #f7a541; color: #1d2433; font-family: var(--font-head); }
.where-key strong { display: block; color: var(--teal-900); }
.where-key span { font-size: .92rem; color: var(--ink-soft); }

.lightbox__remove { display: block; margin-top: 8px; font-size: .85rem; color: rgba(255,255,255,.75); text-align: center; }
.lightbox__remove:hover { color: #fff; }

/* Grid columns may shrink below their content (wide tables scroll inside their card, not the page) */
.layout > * { min-width: 0; }


/* ===== 2. DARK MODE (html[data-theme="dark"], set by the header switch or the device setting) ===== */
.theme-toggle { order: 3; display: grid; place-items: center; width: 38px; height: 38px; margin-left: -6px; border-radius: 50%; border: 0; background: transparent; color: var(--ink); opacity: .72; cursor: pointer; flex: none; transition: opacity .15s, background .15s; }
.theme-toggle:hover { opacity: 1; background: var(--teal-50); }
.theme-toggle svg { width: 19px; height: 19px; }
.theme-toggle__sun { display: none; }
[data-theme="dark"] .theme-toggle__sun { display: block; }
[data-theme="dark"] .theme-toggle__moon { display: none; }
.nav-toggle { order: 4; }
@media (max-width: 1080px) { .theme-toggle { margin-left: auto; } .nav-toggle { margin-left: 0; } }

[data-theme="dark"] {
  color-scheme: dark;
  --teal-900: #e4f4f2;   /* headings and strong text */
  --teal-800: #c3e6e2;
  --teal-700: #7fd6cb;   /* links */
  --teal-500: #2fbcaf;
  --teal-400: #4fd0c4;
  --teal-50: #1a3239;
  --teal-25: #11262c;
  --ink: #e2ebed;
  --ink-soft: #a8bbc0;
  --line: #2a434a;
  --white: #0c1c21;      /* page and card background */
  --gold: #e8b23a;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
  --deep: #0a2f37;       /* the dark teal bands (hero, footer, banners) */
}
[data-theme="dark"] body { background: #0b1a1f; }
[data-theme="dark"] .site-header { background: rgba(11,26,31,.94); }
[data-theme="dark"] .brand img { filter: brightness(0) invert(1); opacity: .92; }
/* Bands that are dark teal in both modes, with white text */
[data-theme="dark"] .hero, [data-theme="dark"] .site-footer, [data-theme="dark"] #bc-loader,
[data-theme="dark"] .sheet__total, [data-theme="dark"] .welcome-card { background: var(--deep); }
[data-theme="dark"] .stats { background: #0f3a43; }
[data-theme="dark"] .cta { background: radial-gradient(1200px 400px at 10% 0%, #13736b, transparent), #0f3a43; }
[data-theme="dark"] .hero, [data-theme="dark"] .hero__content h1, [data-theme="dark"] .hero__content h2,
[data-theme="dark"] .stats, [data-theme="dark"] .cta, [data-theme="dark"] .cta h2,
[data-theme="dark"] .footer__grid h4, [data-theme="dark"] .footer__weather-reading, [data-theme="dark"] .site-footer a:hover { color: #fff; }
[data-theme="dark"] .hero__dots button[aria-current="true"] { background: #fff; }
/* Buttons and chips keep white text on teal */
[data-theme="dark"] .btn--primary, [data-theme="dark"] .nav .btn { background: #13897f; color: #fff; }
[data-theme="dark"] .btn--primary:hover, [data-theme="dark"] .btn--ghost:hover { background: #1a9d92; color: #fff; border-color: #1a9d92; }
[data-theme="dark"] .btn--light { background: #e9f5f4; color: #123f48; }
[data-theme="dark"] .tag:hover, [data-theme="dark"] .tag.is-active,
[data-theme="dark"] .match__row.is-winner .match__score, [data-theme="dark"] .follow-btn.is-on { background: #13897f; border-color: #13897f; color: #fff; }
/* Fixed light colours */
[data-theme="dark"] .faq, [data-theme="dark"] .sp-perk code { background: var(--white); }
[data-theme="dark"] .pill--gold, [data-theme="dark"] .final-tag, [data-theme="dark"] .rank-badge--1 { background: #3a2f12; color: #f1c66a; }
[data-theme="dark"] .standings tr.is-top td { background: #2a2510; }
[data-theme="dark"] .trophy-callout { background: linear-gradient(90deg, #2e2611, transparent); }
[data-theme="dark"] .notice--success { background: #12352a; color: #9be3bd; }
[data-theme="dark"] .record-row.is-bot { background: var(--teal-25); }
[data-theme="dark"] .chance__bar { background: #4a3a1c; }
[data-theme="dark"] .sheet__error { background: #3a1715; color: #f4b6b0; }
[data-theme="dark"] .get-app__inapp { background: #3a2f12; color: #f1c66a; }
[data-theme="dark"] .otd, [data-theme="dark"] .meter { background: var(--teal-25); }
[data-theme="dark"] .employer-fee { background: var(--teal-25); }
[data-theme="dark"] .lightbox__remove { color: rgba(255,255,255,.75); }
[data-theme="dark"] img.badge-img, [data-theme="dark"] .sp-banner img, [data-theme="dark"] .presented-by img { background: #fff; }
/* Inline colours some pages set directly */
[data-theme="dark"] [style*="background:#fff"], [data-theme="dark"] [style*="background: #fff"],
[data-theme="dark"] [style*="background:var(--white)"] { background: var(--white) !important; }
[data-theme="dark"] [style*="color:#8a5a00"], [data-theme="dark"] [style*="color: #8a5a00"] { color: #f1c66a !important; }
/* The printed invoice stays light */
[data-theme="dark"] .invoice { background: #fff; color: #1d2433; }
[data-theme="dark"] .badge-tile.is-locked .badge-tile__icon { background: #2a434a; }
[data-theme="dark"] .badge-tile { background: linear-gradient(180deg, #2e2611, var(--white)); border-color: #4a3c18; }
[data-theme="dark"] .badge-tile.is-locked { background: var(--teal-25); border-color: var(--line); }
[data-theme="dark"] .trophy-callout, [data-theme="dark"] .otd { border-color: #4a3c18; }
[data-theme="dark"] .sp-banner__prize { color: #f1c66a; }
/* Win/loss colours some tables set inline */
[data-theme="dark"] [style*="color:#b3261e"] { color: #ff8a80 !important; }
[data-theme="dark"] [style*="color:#1e7d32"], [data-theme="dark"] [style*="color:#2e7d32"] { color: #7ddc8a !important; }
[data-theme="dark"] [style*="color:#8a1c12"] { color: #ff8a80 !important; }
[data-theme="dark"] [style*="color:#157a4f"] { color: #7ddc8a !important; }

/* ---- Home page design pass (Dec 2026): one bold element (the ball tray), everything else quieter ---- */
.home .eyebrow { text-transform: none; letter-spacing: 0; font-size: .95rem; font-weight: 600; }
.home .link-arrow::after { content: none; }
.home .sp-banner__lead { text-transform: none; letter-spacing: 0; font-size: .85rem; }
.hero__intro { margin: 0 0 14px; font-size: 1.05rem; color: rgba(255,255,255,.9); text-shadow: 0 1px 12px rgba(0,0,0,.4); }

/* Interest meter: a tray of table tennis balls, one per workplace needed */
.meter--balls { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "text balls" "btn balls"; gap: 16px 40px; padding: 28px 32px; background: var(--white); }
.meter--balls .meter__text { grid-area: text; }
.meter--balls .meter__btn { grid-area: btn; justify-self: start; align-self: end; }
.meter__title { font: 600 1rem/1.3 var(--font-body); color: var(--teal-500); margin: 0 0 4px; letter-spacing: 0; }
.meter--balls .meter__big { font-size: 1.5rem; margin: 0 0 4px; }
.meter--balls .meter__big strong { font-size: 2.4rem; letter-spacing: -.02em; }
.meter__balls { grid-area: balls; align-self: center; list-style: none; margin: 0; padding: 14px; display: grid; grid-template-columns: repeat(6, 40px); gap: 12px; border-radius: 22px; background: rgba(18,63,72,.06); box-shadow: inset 0 2px 6px rgba(18,63,72,.12); }
.ball { width: 40px; height: 40px; border-radius: 50%; border: 2px dashed rgba(0,148,138,.45); }
.ball.is-in { border: 0; background: radial-gradient(circle at 34% 30%, #fff4e2 0 9%, #fbb560 36%, #e8761c 100%); box-shadow: 0 3px 6px rgba(0,0,0,.22), inset -3px -4px 7px rgba(120,40,0,.22); animation: ball-drop .75s cubic-bezier(.3,1.55,.5,1) both; animation-delay: calc(var(--i) * 80ms + 250ms); }
@keyframes ball-drop { 0% { transform: translateY(-34px); opacity: 0; } 50% { opacity: 1; } 100% { transform: none; } }
@media (prefers-reduced-motion: reduce) { .ball.is-in { animation: none; } }
[data-theme="dark"] .meter__balls { background: rgba(0,0,0,.25); box-shadow: inset 0 2px 8px rgba(0,0,0,.45); }
@media (max-width: 760px) {
  .meter--balls { grid-template-columns: 1fr; grid-template-areas: "text" "balls" "btn"; padding: 22px 20px; }
  .meter__balls { justify-self: start; grid-template-columns: repeat(6, 34px); gap: 9px; padding: 11px; }
  .ball { width: 34px; height: 34px; }
}

/* News: one lead story, two smaller ones */
.news-lead { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.news-feature { display: block; text-decoration: none; color: inherit; }
.news-feature img { display: block; width: 100%; aspect-ratio: 2 / 1; object-fit: cover; border-radius: var(--radius); margin-bottom: 16px; }
.news-feature time, .news-side time { display: block; font-size: .85rem; color: var(--ink-soft); }
.news-feature h3 { font-size: clamp(1.35rem, 2.3vw, 1.75rem); margin: 6px 0 8px; }
.news-feature p { color: var(--ink-soft); margin: 0; max-width: 62ch; }
.news-list { display: grid; gap: 24px; }
.news-side { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 16px; align-items: start; text-decoration: none; color: inherit; }
.news-side img { display: block; width: 128px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-sm); }
.news-side strong { display: block; margin-top: 4px; font: 600 1.08rem/1.3 var(--font-head); color: var(--teal-900); }
.news-feature:hover h3, .news-side:hover strong { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 860px) { .news-lead { grid-template-columns: 1fr; } }

/* Champions: an honours list */
.honours { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: 48px; }
.honours li { border-bottom: 1px solid var(--line); }
.honours a { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 12px 2px; text-decoration: none; color: inherit; }
.honours strong { font: 600 1.05rem/1.25 var(--font-head); color: var(--teal-900); }
.honours span { color: var(--ink-soft); font-size: .92rem; text-align: right; }
.honours a:hover strong { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 700px) { .honours { grid-template-columns: 1fr; } }

/* Relive the season: the Season Wrapped card stays quiet */
.fun-card--wrapped { background: var(--white); border: 1px solid var(--line); color: var(--ink); }
.fun-card--wrapped h3 { color: var(--teal-900); }
.fun-card--wrapped p { color: var(--ink-soft); }
.fun-card--wrapped .wrapped-chips a { background: transparent; border: 1px solid var(--line); color: var(--ink); font-weight: 500; }
.fun-card--wrapped .wrapped-chips a:hover { border-color: var(--teal-500); color: var(--teal-700); }

/* Get the app on the home page: sits between the hero/meter and the latest competition */
.home-app .get-app { margin: 28px 0 0; }

/* Hero video slides: the video sits over the slide's photo and fades in once it's actually playing */
.hero__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s ease; }
.hero__video.is-playing { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .hero__video { display: none; } }

/* News article: the story's photo at the top */
.post-photo { margin: 0 0 28px; }
.post-photo img { display: block; width: 100%; height: auto; max-height: 560px; object-fit: cover; border-radius: 14px; }

/* =====================================================================
   3. BRAND LAYER (Dec 2026): navy and cream, red / orange / gold
   serve trail, Barlow Condensed headlines. Everything for the trial lives
   in this block so it can be lifted out. Style guide: design canvas
   "Business Class Retro Rebrand", page "Visual identity".
   ===================================================================== */
:root {
  --teal-900: #003049;   /* navy: headings, dark bands */
  --teal-800: #0b3a55;
  --teal-700: #1e5bc6;   /* bright blue: links, small labels (4.8:1 on cream) */
  --teal-500: #1e5bc6;   /* eyebrows, underlines */
  --blue-deep: #1e5bc6;
  --blue: #4c9bff;       /* sky blue, shapes only (form dots, fills): too light for text on cream */
  --pale-blue: #a6d0ff;  /* secondary text on navy (8.6:1) */
  --teal-400: #f77f00;
  --teal-50: #ddd3a4;    /* sand tint */
  --teal-25: #f3edd3;
  --ink: #003049;
  --ink-soft: #3b4a52;
  --line: #d3c892;
  --white: #fffbea;      /* cards */
  --gold: #fcbf49;
  --paper: #eae2b7;
  --navy: #003049;
  --red: #d62828;
  --orange: #f77f00;
  --radius: 6px;
  --radius-sm: 4px;
  --shadow: none;
  --font-head: "Barlow", "Helvetica Neue", Arial, sans-serif;
  --font-display: "Sofia Sans Extra Condensed", "Arial Narrow", sans-serif;
  --font-body: "Barlow", "Helvetica Neue", Arial, sans-serif;
}
body { background: var(--paper); color: var(--ink); }
h1, h2 { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; letter-spacing: 0; line-height: .95; }
h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); }
h2 { font-size: clamp(2rem, 3.6vw, 3rem); }
h3, h4 { font-weight: 700; }
.eyebrow, .home .eyebrow { font-family: var(--font-display); font-weight: 700; font-size: .95rem; letter-spacing: .14em; text-transform: uppercase; color: var(--blue-deep); }

/* Header: navy bar, cream text, gold underline on the current page */
.site-header { background: var(--navy); border-bottom: 0; backdrop-filter: none; }
.brand, .brand span { color: var(--paper); }
.brand img { filter: brightness(0) invert(1) sepia(.3); }
.brand span { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; letter-spacing: .02em; }
.brand small { font-family: var(--font-display); font-weight: 700; color: var(--gold); font-size: .78rem; }
.nav a { color: var(--paper); font-weight: 600; opacity: .85; }
.nav a::after { background: var(--gold); height: 3px; border-radius: 0; }
.nav .btn { color: #fff; }
.nav .btn::after { background: rgba(234,226,183,.3); }
.nav a.nav-play::before { background: var(--orange); }
.nav-toggle, .theme-toggle { color: var(--paper); }
.theme-toggle:hover { background: rgba(234,226,183,.12); }
@media (max-width: 1080px) {
  .nav { background: var(--navy); border-bottom: 4px solid var(--red); }
  .nav a.is-active { background: rgba(234,226,183,.12); color: var(--gold); }
}

/* Buttons: red with white text (5.0:1), square corners */
.btn { border-radius: 4px; font-weight: 700; }
.btn--primary { background: var(--red); color: #fff; }
.btn--primary:hover { background: #b81f1f; }
.btn--light { background: var(--paper); color: var(--navy); }
.btn--light:hover { background: #fff; }
.btn--ghost { color: var(--navy); }
.btn--ghost:hover { background: var(--navy); border-color: var(--navy); color: var(--paper); }

/* Cards: flat, outlined in navy */
.card { border: 2px solid var(--navy); box-shadow: none; }
.pill { background: var(--navy); color: var(--paper); }
.pill--gold, .final-tag, .rank-badge--1 { background: var(--gold); color: var(--navy); }
.section--tint { background: var(--teal-25); }
.standings tr.is-top td { background: #fbefc9; }
.match__row.is-winner .match__score { background: var(--gold); color: var(--navy); }
.match__score, .standings td.num, .rank-badge, .otd__when strong { font-variant-numeric: tabular-nums; }
.match__score { font-family: var(--font-display); font-weight: 800; }
.trophy-callout { background: var(--gold); border: 2px solid var(--navy); color: var(--navy); }
.trophy-callout svg { color: var(--navy); }
.otd { background: var(--white); border-color: var(--navy); }
.otd__when { color: #a61c1c; }
.otd__when strong { font-family: var(--font-display); font-weight: 800; }
.news-side strong, .honours strong { font-family: var(--font-body); font-weight: 700; }
.fun-card h3, .news-feature h3 { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: 1.9rem; line-height: 1; }

/* Interest meter: navy ball tray, cream balls in, orange dashed spaces still to fill */
.meter, .meter--balls { background: var(--white); border-width: 3px; }
.meter__title { font-family: var(--font-display); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--blue-deep); }
.meter--balls .meter__big strong { font-family: var(--font-display); font-weight: 800; font-size: 2.8rem; font-variant-numeric: tabular-nums; }
.meter__balls { background: var(--blue-deep); box-shadow: none; }
.ball { border-color: var(--orange); }
.ball.is-in { background: var(--paper); box-shadow: none; }

/* Hero: navy wash over the photo */
.hero { background: var(--navy); }
.hero__slide::after { background: linear-gradient(180deg, rgba(0,48,73,.05) 25%, rgba(0,48,73,.6) 60%, rgba(0,48,73,.95) 100%); }
.hero__content h1 { font-size: clamp(2.4rem, 5.6vw, 4.8rem); line-height: .9; text-shadow: none; }
.hero__content h2 { text-shadow: none; }
.hero__intro { font-family: var(--font-display); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--pale-blue); text-shadow: none; }
.hero__dots button[aria-current="true"] { background: var(--gold); }

/* Bands */
.stats { background: var(--blue-deep); }
.cta, .tonight { background: var(--navy); }
.form-guide .form-W { background: var(--blue); }
.cta { border-radius: 6px; }
.fun-card--wrapped { background: var(--white); border: 2px solid var(--navy); }

/* Footer: navy, with the three-stripe edge on top */
.site-footer { background: var(--blue-deep); color: #eae2b7; border-top: 8px solid var(--red); box-shadow: 0 -8px 0 var(--orange), 0 -16px 0 var(--gold); margin-top: 88px; }
.site-footer a { color: #eae2b7; }  /* fixed cream: the footer is a dark band in both modes */

/* Dark mode: deep ink ground, navy cards, cream text, gold links */
[data-theme="dark"] {
  --teal-900: #eae2b7;
  --teal-800: #ddd3a4;
  --teal-700: #a6d0ff;   /* pale blue links in dark mode (11:1) */
  --teal-500: #a6d0ff;
  --teal-400: #f77f00;
  --teal-50: #123d57;
  --teal-25: #00263b;
  --ink: #eae2b7;
  --ink-soft: #b8bfa6;
  --line: #1d4c66;
  --white: #00263b;
  --deep: #003049;
  --paper: #001219;
}
[data-theme="dark"] body { background: #001219; }
[data-theme="dark"] .site-header { background: #003049; }
[data-theme="dark"] .brand img { filter: brightness(0) invert(1) sepia(.3); opacity: 1; }
[data-theme="dark"] .brand span, [data-theme="dark"] .nav a, [data-theme="dark"] .nav-toggle, [data-theme="dark"] .theme-toggle { color: #eae2b7; }
[data-theme="dark"] .eyebrow, [data-theme="dark"] .meter__title { color: #a6d0ff; }
[data-theme="dark"] .otd__when { color: #fcbf49; }
[data-theme="dark"] .card { border-color: #1d4c66; }
[data-theme="dark"] .btn--primary, [data-theme="dark"] .nav .btn { background: #d62828; color: #fff; }
[data-theme="dark"] .btn--primary:hover { background: #b81f1f; border-color: #b81f1f; }
[data-theme="dark"] .btn--ghost { color: #eae2b7; }
[data-theme="dark"] .btn--light { background: #eae2b7; color: #003049; }
[data-theme="dark"] .hero, [data-theme="dark"] .cta, [data-theme="dark"] .tonight { background: #003049; }
[data-theme="dark"] .stats, [data-theme="dark"] .site-footer { background: #1e5bc6; }
[data-theme="dark"] .meter__balls { background: #1e5bc6; }
[data-theme="dark"] .ball.is-in { background: #eae2b7; }
[data-theme="dark"] .trophy-callout { background: #3a2f12; border-color: #fcbf49; color: #eae2b7; }
[data-theme="dark"] .trophy-callout svg { color: #fcbf49; }
[data-theme="dark"] .pill { background: #eae2b7; color: #003049; }
[data-theme="dark"] .pill--gold, [data-theme="dark"] .final-tag, [data-theme="dark"] .rank-badge--1 { background: #fcbf49; color: #003049; }
[data-theme="dark"] .match__row.is-winner .match__score { background: #fcbf49; border-color: #fcbf49; color: #003049; }
[data-theme="dark"] .fun-card--wrapped { border-color: #1d4c66; }

/* Opening animation: the serve, three-quarters of the screen. A giant cream ball sweeps across, its red, orange and
   gold stripes fill the whole screen as they pass, and when they've gone the logo is waiting behind.
   site.js adds .is-serving; reduced motion shows just the logo. */
#bc-loader { background: var(--navy, #003049); --bc-stripe: calc(24vh + 4.5vw); --bc-gap: calc(var(--bc-stripe) * .1); --bc-ball: calc(var(--bc-stripe) * 3 + var(--bc-gap) * 2); }
#bc-loader .bc-serve { position: absolute; z-index: 2; left: 0; top: 50%; width: 100vw; height: var(--bc-ball); margin-top: calc(var(--bc-ball) / -2); transform: rotate(-10deg); pointer-events: none; }
#bc-loader .bc-runner { position: absolute; top: 0; bottom: 0; --bc-run: calc(150vw + var(--bc-ball)); left: calc(var(--bc-run) * -1); width: var(--bc-run); }
#bc-loader .bc-trail { position: absolute; left: 0; right: calc(var(--bc-ball) * .5); top: 0; bottom: 0; display: flex; flex-direction: column; align-items: flex-end; gap: var(--bc-gap); }
#bc-loader .bc-stripe { display: block; height: var(--bc-stripe); border-radius: 0 999px 999px 0; }
#bc-loader .bc-stripe:nth-child(1) { width: 100%; background: #d62828; }
#bc-loader .bc-stripe:nth-child(2) { width: 88%; background: #f77f00; }
#bc-loader .bc-stripe:nth-child(3) { width: 76%; background: #fcbf49; }
#bc-loader .bc-ball { position: absolute; right: 0; top: 0; width: var(--bc-ball); height: var(--bc-ball); border-radius: 50%; background: #eae2b7; }
#bc-loader.is-serving .bc-runner { animation: bc-serve-across 1.2s cubic-bezier(.4,0,.6,1) forwards; }
@keyframes bc-serve-across { from { transform: translateX(0); } to { transform: translateX(calc(130vw + var(--bc-run))); } }
#bc-loader .bc-title { z-index: 1; place-items: center; padding: 0; }
#bc-loader .bc-title img { width: clamp(170px, 22vw, 280px); height: auto; }
html.bc-loading:not(.bc-loader-still) #bc-loader .bc-title { opacity: 0; }
#bc-loader.is-serving .bc-title { animation: bc-serve-logo .01s steps(1) .47s forwards; }
@keyframes bc-serve-logo { to { opacity: 1; } }
html.bc-loader-still #bc-loader .bc-serve { display: none; }
#bc-loader .bc-footer { z-index: 3; font-family: var(--font-display, sans-serif); font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #fcbf49; }

/* =====================================================================
   4. 70s LAYER (Dec 2026): sand paper, slanted headlines with a stacked
   gold/orange/red shadow, curved racing stripes on the hero,
   pills, rounded cards, arcade score tiles, TV-frame photos.
   Design canvas: "Business Class 70s Site".
   ===================================================================== */
:root:not([data-theme="dark"]) {
  --paper: #e9d8a6;      /* sand */
  --white: #f4ebcb;      /* cards */
  --line: #d9c893;
  --teal-25: #efe2b8;
  --teal-700: #174ba6;   /* links: 5.7:1 on sand */
  --teal-500: #174ba6;
  --blue-deep: #174ba6;
  --ink-soft: #4a4434;
}
h1, h2, .hero__content h1, .hero__content h2 { font-style: italic; }
h1, h2 { text-shadow: 2px 2px 0 var(--gold); }  /* one light offset, not a stack */
.hero__content h1, .hero__content h2 { text-shadow: 3px 3px 0 var(--red); }
.stats h2, .cta h2, .tonight h2, .welcome-card h2, .meter h2, .site-footer h2, .page-hero h1 { text-shadow: 2px 2px 0 var(--red); }
.meter__title, .eyebrow { text-shadow: none; font-style: normal; }
.brand span { font-style: normal; }  /* wordmark stays upright: Black weight, not italic */

/* Pills */
.btn { border-radius: 999px; }
.btn--primary { box-shadow: 4px 4px 0 var(--navy); }
.nav a::after { display: none; }
.nav a { border-radius: 999px; }
.nav a.is-active { background: var(--gold); color: var(--navy); opacity: 1; padding: 0 16px; align-self: center; min-height: 40px; }
.pill, .final-tag, .tag { border-radius: 999px; }

/* Rounded cards and TV-frame photos */
.card { border-radius: 28px; border-width: 3px; }
.news-feature img, .news-side img, .post-photo img { border-radius: 36px / 30px; border: 5px solid var(--navy); filter: sepia(.2) saturate(1.1); }
.news-side img { border-width: 3px; border-radius: 22px / 18px; }

/* Arcade score tiles */
.match__score { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; min-width: 40px; height: 44px; border-radius: 10px; background: var(--navy); color: #f4ebcb; }
.match__row.is-winner .match__score { background: var(--gold); color: var(--navy); }
.standings tr.is-top td { background: var(--gold); }
.trophy-callout { border-radius: 999px; }

/* Interest meter: a navy panel, bright blue ball tray */
.meter, .meter--balls { background: var(--navy); color: #f4ebcb; border-color: var(--navy); border-radius: 36px; }
.meter__title { color: var(--pale-blue); }
.meter--balls .meter__big strong { color: var(--gold); font-style: italic; }
.meter__sub { color: #dcd3b0; }
.meter__balls { background: #1e5bc6; border-radius: 26px; }
.ball { border: 3px dashed var(--pale-blue); }
.ball.is-in { background: #f4ebcb; }

/* Hero: curved racing stripes come in along the top and bend down the right */
.hero { --R: 220px; --s: 11px; --g: 0px; --T: calc(var(--s) * 3 + var(--g) * 2); }
.hero::before { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background:
    radial-gradient(circle at 0 100%, transparent calc(var(--R) - var(--T)), var(--gold) calc(var(--R) - var(--T)) calc(var(--R) - var(--s) * 2 - var(--g) * 2), transparent calc(var(--R) - var(--s) * 2 - var(--g) * 2) calc(var(--R) - var(--s) * 2 - var(--g)), var(--orange) calc(var(--R) - var(--s) * 2 - var(--g)) calc(var(--R) - var(--s) - var(--g)), transparent calc(var(--R) - var(--s) - var(--g)) calc(var(--R) - var(--s)), var(--red) calc(var(--R) - var(--s)) var(--R), transparent var(--R)) right top / var(--R) var(--R) no-repeat,
    linear-gradient(to bottom, var(--red) 0 var(--s), transparent var(--s) calc(var(--s) + var(--g)), var(--orange) calc(var(--s) + var(--g)) calc(var(--s) * 2 + var(--g)), transparent calc(var(--s) * 2 + var(--g)) calc(var(--s) * 2 + var(--g) * 2), var(--gold) calc(var(--s) * 2 + var(--g) * 2) var(--T)) left top / calc(100% - var(--R)) var(--T) no-repeat,
    linear-gradient(to right, var(--gold) 0 var(--s), transparent var(--s) calc(var(--s) + var(--g)), var(--orange) calc(var(--s) + var(--g)) calc(var(--s) * 2 + var(--g)), transparent calc(var(--s) * 2 + var(--g)) calc(var(--s) * 2 + var(--g) * 2), var(--red) calc(var(--s) * 2 + var(--g) * 2) var(--T)) right top var(--R) / var(--T) calc(100% - var(--R)) no-repeat; }

.hero__dots { right: calc(var(--T) + 24px); }
.hero__content { padding-right: calc(var(--T) + 24px); padding-top: calc(var(--T) + 28px); }
@media (max-width: 700px) { .hero__content { padding-right: calc(var(--T) + 16px); } .hero__content .hero__intro, .hero__content h1:first-of-type { margin-right: 0; } }
@media (max-width: 700px) {
  .hero { --R: 110px; --s: 6px; --g: 0px; }
}

/* Footer: navy under the stripes */
.site-footer { background: var(--navy); }
[data-theme="dark"] .site-footer { background: #003049; }
[data-theme="dark"] .site-footer, [data-theme="dark"] .site-footer a, [data-theme="dark"] .footer__base { color: #eae2b7; }
[data-theme="dark"] .match__score { background: #003049; color: #f4ebcb; }

/* Wordmark: BUSINESS stacked over CLASS, centred, heavy and tight, beside the hand-and-bat logo */
.brand span { width: min-content; white-space: normal; text-align: center; font-size: 1.5rem; line-height: .8; letter-spacing: 0; font-style: normal; }
.brand small { display: flex; justify-content: space-between; margin-top: 6px; font-size: .62rem; line-height: 1; letter-spacing: 0; }  /* "Table Tennis" spread to the width of BUSINESS */
@media (max-width: 600px) { .brand span { font-size: 1.3rem; } }

/* Lighter blue bands (light mode): the big dark areas go from navy #003049 to league blue #1B4F9C.
   Text on it: cream 6.1:1, gold 4.8:1, pale blue 5.0:1, white 7.9:1. Navy stays for text and outlines; dark mode keeps navy. */
:root:not([data-theme="dark"]) { --band: #1b4f9c; }
html:not([data-theme="dark"]) .site-header,
html:not([data-theme="dark"]) .site-footer,
html:not([data-theme="dark"]) .hero,
html:not([data-theme="dark"]) .stats,
html:not([data-theme="dark"]) .cta,
html:not([data-theme="dark"]) .tonight,
html:not([data-theme="dark"]) .welcome-card,
html:not([data-theme="dark"]) #bc-loader,
html:not([data-theme="dark"]) .meter,
html:not([data-theme="dark"]) .meter--balls { background-color: var(--band); }
html:not([data-theme="dark"]) .meter, html:not([data-theme="dark"]) .meter--balls { border-color: var(--band); }
html:not([data-theme="dark"]) .meter__balls { background: var(--navy); }
html:not([data-theme="dark"]) .hero__slide::after { background: linear-gradient(180deg, rgba(27,79,156,.05) 25%, rgba(27,79,156,.6) 60%, rgba(27,79,156,.95) 100%); }
@media (max-width: 1080px) { html:not([data-theme="dark"]) .nav { background: var(--band); } }

/* ===== 5. TYPE: free stand-ins for American Grotesk (Klim): Sofia Sans Extra Condensed for headlines, labels and
   scores (like AG Compressed); Sofia Sans Black for the wordmark and Bold for buttons and menus. */
h1, h2, .hero__content h1, .hero__content h2 { font-weight: 700; letter-spacing: .005em; line-height: .9; }
h1 { font-size: clamp(3rem, 7vw, 5.4rem); }
.hero__content h1 { font-size: clamp(2.8rem, 6.4vw, 5.6rem); }
h2 { font-size: clamp(2.3rem, 4.2vw, 3.6rem); }
.brand span { font-family: "Sofia Sans", sans-serif; font-weight: 900; font-size: 1.4rem; }
.brand small { font-family: "Sofia Sans", sans-serif; font-weight: 700; }
h3, h4, .btn, .nav a, .news-side strong, .honours strong { font-family: "Sofia Sans", "Barlow", sans-serif; font-weight: 700; }
@media (max-width: 600px) { .brand span { font-size: 1.2rem; } }


/* ===== 6. FEATURES — Live strip (home page top): ticker of live scores / next fixtures / league snippets ===== */
.live-strip { display: flex; align-items: stretch; background: var(--navy); color: #f4ebcb; font-size: .95rem; overflow: hidden; border-bottom: 3px solid var(--gold); position: relative; z-index: 3; }
.live-strip__label { flex: none; display: flex; align-items: center; gap: 8px; padding: 10px 18px; background: var(--red); color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 100%, 0 100%); padding-right: 30px; }
.live-strip--next .live-strip__label { background: var(--gold); color: var(--navy); }
.live-strip--off .live-strip__label { background: #1e5bc6; }
.live-strip__label time { font-weight: 600; letter-spacing: .02em; }
.live-strip__dot { width: 10px; height: 10px; border-radius: 50%; background: #fff; animation: strip-pulse 1.2s ease-in-out infinite; }
@keyframes strip-pulse { 50% { opacity: .25; transform: scale(.7); } }
.live-strip__viewport { flex: 1; display: flex; overflow: hidden; min-width: 0; mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent); }
.live-strip__track { display: flex; flex: none; gap: 0; margin: 0; padding: 0; list-style: none; animation: strip-scroll var(--strip-speed, 40s) linear infinite; }
.live-strip:hover .live-strip__track, .live-strip:focus-within .live-strip__track { animation-play-state: paused; }
@keyframes strip-scroll { to { transform: translateX(-100%); } }
.live-strip__item { display: flex; align-items: center; gap: 8px; padding: 10px 28px; white-space: nowrap; border-right: 2px solid rgba(244,235,203,.18); }
.live-strip__item em { font-style: normal; font-family: var(--font-display); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--gold); }
.live-strip__item a { color: #f4ebcb; font-weight: 700; }
.live-strip__item i { font-style: normal; color: var(--pale-blue, #a6d0ff); }
.live-strip__score { display: inline-grid; place-items: center; min-width: 28px; height: 30px; border-radius: 6px; background: #f4ebcb; color: var(--navy); font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.live-strip__score.is-win { background: var(--gold); }
.live-strip__score.is-flipped { animation: score-flip .6s cubic-bezier(.3,1.4,.5,1); }
@keyframes score-flip { 0% { transform: rotateX(90deg); } 100% { transform: none; } }
@media (prefers-reduced-motion: reduce) { .live-strip__track { animation: none; } .live-strip__track[aria-hidden] { display: none; } .live-strip__viewport { overflow-x: auto; } .live-strip__dot { animation: none; } }
@media (max-width: 600px) { .live-strip__label span { display: none; } .live-strip__label { padding: 8px 24px 8px 12px; font-size: .95rem; } }

/* ===== Rally Challenge arcade panel (home page) ===== */
.arcade { background: var(--navy); color: #f4ebcb; margin: 40px 0; position: relative; overflow: hidden; border-top: 6px solid var(--red); box-shadow: 0 -12px 0 var(--orange), 0 -18px 0 var(--gold); }
html:not([data-theme="dark"]) .arcade { background: var(--band, #1b4f9c); }
.arcade__inner { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 28px; padding-top: 56px; padding-bottom: 56px; align-items: start; }
.arcade h2 { color: #f4ebcb; text-shadow: 2px 2px 0 var(--red); margin: 6px 0 12px; }
.arcade .eyebrow { color: var(--gold); }
.arcade__pitch { position: relative; padding-bottom: 90px; }
.arcade__pitch p { color: #e9dfbd; max-width: 34ch; }
.arcade__play { font-size: 1.15rem; padding: 16px 30px; }
.arcade__ball { position: absolute; left: 0; bottom: 0; width: 100%; max-width: 340px; height: 80px; pointer-events: none;
  background: linear-gradient(var(--navy), var(--navy)) 0 100% / 100% 6px no-repeat, linear-gradient(#f4ebcb, #f4ebcb) 50% 100% / 4px 26px no-repeat; }
.arcade__ball::after { content: ""; position: absolute; left: 0; bottom: 6px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px var(--orange);
  animation: rally-x 2.4s ease-in-out infinite alternate, rally-y .6s cubic-bezier(.3,0,.7,1) infinite alternate; }
@keyframes rally-x { to { left: calc(100% - 18px); } }
@keyframes rally-y { from { bottom: 6px; } to { bottom: 66px; } }
.arcade__board { background: rgba(0,18,25,.55); border: 2px solid rgba(244,235,203,.25); border-radius: 22px; padding: 20px 22px; }
.arcade__board h3 { color: var(--gold); font-family: var(--font-display); text-transform: uppercase; letter-spacing: .08em; font-size: 1.1rem; margin: 0 0 12px; }
.arcade__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.arcade__list li { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 10px; animation: arcade-in .5s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i) * 90ms + 150ms); }
@keyframes arcade-in { from { opacity: 0; transform: translateX(-16px); } }
.arcade__rank { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: #f4ebcb; color: var(--navy); font-family: var(--font-display); font-weight: 800; }
.arcade__list li:first-child .arcade__rank { background: var(--gold); }
.arcade__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.arcade__name small { color: #c9d3d6; font-weight: 400; }
.arcade__score { font-family: var(--font-display); font-weight: 800; font-size: 1.4rem; color: var(--gold); font-variant-numeric: tabular-nums; }
.arcade__empty, .arcade__champ { color: #e9dfbd; margin: 0; }
.arcade__empty a { color: var(--gold); font-weight: 700; }
.arcade__champ { margin-top: 12px; font-size: .95rem; }
@media (max-width: 960px) { .arcade__inner { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .arcade__ball::after, .arcade__list li { animation: none; } }
.fun-cards { display: block; max-width: 760px; }

/* ===== Motion polish ===== */
/* Scores flip like a split-flap board when they change */
.bc-flip { animation: bc-flip .7s cubic-bezier(.3,1.4,.5,1); }
@keyframes bc-flip { 0% { transform: perspective(200px) rotateX(-90deg); filter: brightness(1.6); } 60% { transform: perspective(200px) rotateX(15deg); } 100% { transform: none; } }
/* Racing stripes draw in across the top of the hero, then down the curve */
.hero::before { animation: stripes-in 1.4s cubic-bezier(.6,0,.2,1) .2s both; }
@keyframes stripes-in { from { clip-path: inset(0 100% 100% 0); } 60% { clip-path: inset(0 0 70% 0); } to { clip-path: inset(0 0 0 0); } }
/* Buttons press down onto their shadow */
.btn { transition: transform .12s ease, box-shadow .12s ease, background .15s; }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--navy); }
/* Photos tilt a little in their frames; menu pills warm up on hover */
.news-feature img, .news-side img { transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.news-feature:hover img, .news-side:hover img { transform: rotate(-1.2deg) scale(1.03); }
.nav a:not(.btn) { transition: background .2s, color .2s; }
.nav a:not(.btn):not(.is-active):hover { background: rgba(244,235,203,.14); opacity: 1; }
/* Cards rise into view as you scroll (only once motion.js-style reveal is switched on) */
html.bc-reveal .bc-r { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.8,.2,1); transition-delay: calc(var(--d, 0) * 80ms); }
html.bc-reveal .bc-r.is-in { opacity: 1; transform: none; }
/* Champions: a burst of ticker tape in the stripe colours */
.trophy-callout { position: relative; overflow: visible; }
.bc-tape { position: absolute; top: 50%; left: 50%; width: 8px; height: 14px; border-radius: 2px; pointer-events: none; animation: tape 1.6s cubic-bezier(.2,.6,.4,1) forwards; }
@keyframes tape { 0% { transform: translate(0,0) rotate(0); opacity: 1; } 100% { transform: translate(var(--tx), var(--ty)) rotate(var(--r)); opacity: 0; } }
/* Player of the Night: the name rolls in */
.otd strong.bc-roll { display: inline-block; animation: roll-in .8s cubic-bezier(.2,1.3,.4,1) both; }
@keyframes roll-in { from { transform: translateY(110%) rotateX(80deg); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .hero::before, .bc-flip, .otd strong.bc-roll { animation: none; }
  html.bc-reveal .bc-r { opacity: 1; transform: none; transition: none; }
  .news-feature:hover img, .news-side:hover img { transform: none; }
}

/* ===== Hall of Fame timeline: racing stripes run down the page, trophies drop in ===== */
.hof-timeline { list-style: none; margin: 0; padding: 0 0 0 64px; position: relative; display: grid; gap: 34px; }
.hof-timeline::before { content: ""; position: absolute; left: 14px; top: 0; bottom: 0; width: 30px; border-radius: 15px;
  background: linear-gradient(90deg, #d62828 0 33.3%, #f77f00 33.3% 66.6%, #fcbf49 66.6%); }
.hof-group { position: relative; display: grid; gap: 12px; }
.hof-year { position: relative; margin-left: -64px; display: inline-flex; align-self: start; width: max-content; align-items: center; justify-content: center; min-width: 58px; height: 40px; padding: 0 12px; border-radius: 999px; background: var(--navy); color: #f4ebcb; font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; box-shadow: 0 0 0 4px var(--paper); z-index: 1; }
.hof-entries { display: grid; gap: 12px; }
.hof-entry { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 16px 20px; text-decoration: none; color: inherit; }
.hof-trophy { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: var(--navy); }
.hof-trophy svg { width: 24px; height: 24px; }
.hof-text span { display: block; font-size: .9rem; color: var(--ink-soft); }
.hof-text strong { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; text-transform: uppercase; line-height: 1.05; }
.hof-entry:hover .hof-text strong { text-decoration: underline; text-underline-offset: 3px; }
html.bc-reveal .hof-entry.is-in .hof-trophy { animation: trophy-drop .7s cubic-bezier(.3,1.6,.5,1) both; animation-delay: calc(var(--i) * 90ms + 150ms); }
@keyframes trophy-drop { from { transform: translateY(-40px) rotate(-25deg); opacity: 0; } }
@media (max-width: 600px) { .hof-timeline { padding-left: 46px; } .hof-timeline::before { left: 8px; width: 22px; } .hof-year { margin-left: -46px; font-size: 1.1rem; height: 34px; min-width: 50px; } .hof-text strong { font-size: 1.2rem; } }
@media (prefers-reduced-motion: reduce) { html.bc-reveal .hof-entry.is-in .hof-trophy { animation: none; } }

/* ===== Team pages and head to head ===== */
.team-detail .gallery { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important; gap: 14px; }
.team-detail .gallery img { border-radius: 22px / 18px; border: 4px solid var(--navy); }
.team-detail .stat-cards strong { font-family: var(--font-display); font-weight: 800; font-size: 2.6rem; font-variant-numeric: tabular-nums; }
.team-detail .record-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 8px; border: 2px solid var(--navy); border-radius: 16px; background: var(--white); transition: transform .2s, box-shadow .2s; }
.team-detail .record-row:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--navy); }
html.bc-reveal .badge-tile.is-in:not(.is-locked) .badge-tile__icon { animation: badge-pop .6s cubic-bezier(.3,1.7,.5,1) both; animation-delay: calc(var(--d, 0) * 80ms + 150ms); }
@keyframes badge-pop { from { transform: scale(0) rotate(-30deg); } }
.vs-hero .score { font-family: var(--font-display); font-weight: 800; font-variant-numeric: tabular-nums; color: var(--navy); text-shadow: 3px 3px 0 var(--gold); }
.vs-hero .side .badge-img--lg { transition: transform .3s; }
.vs-hero .side:hover .badge-img--lg { transform: scale(1.08) rotate(-4deg); }
.h2h-share-wrap { text-align: center; margin: 22px 0 0; }
@media (prefers-reduced-motion: reduce) { html.bc-reveal .badge-tile.is-in .badge-tile__icon { animation: none; } }

/* Easter egg: the header ball */
.egg-ball { position: fixed; left: 0; top: 0; width: 52px; height: 52px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff 0 30%, #f4ebcb 75%, #e2d4a8); box-shadow: inset -5px -6px 0 rgba(0,0,0,.08), 0 0 0 3px var(--orange), 0 8px 16px rgba(0,0,0,.18); z-index: 9000; cursor: pointer; touch-action: none; user-select: none; transition: opacity .5s; }
@media (max-width: 640px) { .egg-ball { width: 44px; height: 44px; } }
.egg-ball.is-gone { opacity: 0; }

/* Player of the Night card: the home page sets a light gradient inline, which made the light
   dark-mode text unreadable. In dark mode it gets a dark card instead. */
[data-theme="dark"] .card.otd { background: #00263b !important; border-color: #1d4c66; color: #eae2b7; }
[data-theme="dark"] .card.otd strong { color: #fcbf49; }

/* Phone pass: bigger tap area for the hero slide dots (the dot stays small, the target is 34px);
   the wordmark's "Table Tennis" line no smaller than 11px */
.hero__dots { gap: 2px; }
.hero__dots button { box-sizing: content-box; padding: 12px; background-clip: content-box; }
.hero__dots button[aria-current="true"] { background-clip: content-box; }
.brand small { font-size: max(.62rem, 11px); }

/* ---------- Design pass (Dec 2026): homepage rhythm ----------
   The three lines are always gold, orange, red with a thin gap: curving round the edge of the hero and page
   headers, straight everywhere else. No rings or sunbursts. */
.hero, .page-hero { --lines: linear-gradient(to bottom, var(--gold) 0 30%, transparent 30% 35%, var(--orange) 35% 65%, transparent 65% 70%, var(--red) 70%); }

/* Hero: keeps the curved racing stripes (top edge, bending down the right) from the 70s layer */

/* The small line above the hero headline sits on a gold tag, so it reads over any photo */
.hero__intro { display: inline-block; background: var(--gold); color: var(--navy); padding: 6px 12px; border-radius: 4px; font-size: .85rem; letter-spacing: .12em; text-shadow: none; }

/* A straight lines rule between sand sections */
.lines-rule { height: 18px; border-radius: 2px; background: linear-gradient(to bottom, var(--gold) 0 30%, transparent 30% 35%, var(--orange) 35% 65%, transparent 65% 70%, var(--red) 70%); }

/* Champions on a league-blue band, lines top and bottom, logos on cream discs */
.section--band { background: #1b4f9c; color: #f4ebcb; border-block: 18px solid transparent;
  border-image: linear-gradient(to bottom, var(--gold) 0 30%, #1b4f9c 30% 35%, var(--orange) 35% 65%, #1b4f9c 65% 70%, var(--red) 70%) 1 0; }
.section--band + .section--band { border-top: 0; }
.section--band h2 { color: #f4ebcb; text-shadow: 2px 2px 0 var(--red); }
.section--band .muted, .section--band .honours span { color: var(--pale-blue); }
.section--band .muted strong, .section--band .honours strong { color: #f4ebcb; }
.section--band .link-arrow, .section--band a.link-arrow { color: var(--gold); }
.section--band .honours li { border-color: rgba(244,235,203,.22); }
.section--band .badge-img, [data-theme="dark"] .badge-img { box-shadow: 0 0 0 3px #f4ebcb; }
[data-theme="dark"] .section--band { background: #0f2f55; border-image: linear-gradient(to bottom, var(--gold) 0 30%, #0f2f55 30% 35%, var(--orange) 35% 65%, #0f2f55 65% 70%, var(--red) 70%) 1 0; }

/* Rally arcade when nobody has played yet: one compact row */
.arcade--quiet .arcade__inner { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: center; }
.arcade__board--quiet { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.arcade__board--quiet .arcade__empty { margin: 0; }
@media (max-width: 960px) { .arcade--quiet .arcade__inner { grid-template-columns: 1fr; } }

/* Relive the season: Wrapped and the biggest rivalry side by side */
.fun-cards--two { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: none; align-items: stretch; }
@media (max-width: 900px) { .fun-cards--two { grid-template-columns: 1fr; } }
.rivalry-card { background: var(--navy); color: #f4ebcb; border-color: var(--navy); display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.rivalry-card .eyebrow { color: var(--gold); }
.rivalry-card h3 { color: #f4ebcb; margin: 0; }
.rivalry-card p { margin: 0; color: #dcd3b0; }
.rivalry-card__score strong { font: italic 900 3rem/1 var(--font-display); color: var(--gold); margin-right: 8px; }
.rivalry-card__score span { color: var(--pale-blue); }
.rivalry-card .btn { margin-top: auto; }

/* Inner page headers: a bigger title and the straight sash in the corner */
.page-hero { position: relative; overflow: hidden; }
.page-hero > .wrap { position: relative; z-index: 1; }
.page-hero h1 { font-size: clamp(2.4rem, 5.6vw, 4.2rem); }
.page-hero, .wr--brand, .curve-frame { --R: 150px; --s: 9px; --g: 0px; --T: calc(var(--s) * 3 + var(--g) * 2); }
.wr--brand, .curve-frame { position: relative; overflow: hidden; }
.curve-frame > .wrap { position: relative; z-index: 1; }
.page-hero::after, .wr--brand::after, .curve-frame::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(circle at 0 100%, transparent calc(var(--R) - var(--T)), var(--gold) calc(var(--R) - var(--T)) calc(var(--R) - var(--s) * 2 - var(--g) * 2), transparent calc(var(--R) - var(--s) * 2 - var(--g) * 2) calc(var(--R) - var(--s) * 2 - var(--g)), var(--orange) calc(var(--R) - var(--s) * 2 - var(--g)) calc(var(--R) - var(--s) - var(--g)), transparent calc(var(--R) - var(--s) - var(--g)) calc(var(--R) - var(--s)), var(--red) calc(var(--R) - var(--s)) var(--R), transparent var(--R)) right top / var(--R) var(--R) no-repeat,
    linear-gradient(to bottom, var(--red) 0 var(--s), transparent var(--s) calc(var(--s) + var(--g)), var(--orange) calc(var(--s) + var(--g)) calc(var(--s) * 2 + var(--g)), transparent calc(var(--s) * 2 + var(--g)) calc(var(--s) * 2 + var(--g) * 2), var(--gold) calc(var(--s) * 2 + var(--g) * 2) var(--T)) left top / calc(100% - var(--R)) var(--T) no-repeat,
    linear-gradient(to right, var(--gold) 0 var(--s), transparent var(--s) calc(var(--s) + var(--g)), var(--orange) calc(var(--s) + var(--g)) calc(var(--s) * 2 + var(--g)), transparent calc(var(--s) * 2 + var(--g)) calc(var(--s) * 2 + var(--g) * 2), var(--red) calc(var(--s) * 2 + var(--g) * 2) var(--T)) right top var(--R) / var(--T) calc(100% - var(--R)) no-repeat;
  animation: stripes-in 1.2s cubic-bezier(.6,0,.2,1) .15s both; }
.page-hero > .wrap { padding-top: calc(var(--T) + 8px); }
@media (max-width: 700px) { .page-hero, .wr--brand, .curve-frame { --R: 80px; --s: 5px; } .curve-frame > .wrap { padding-right: calc(var(--T) + 16px); } .page-hero > .wrap { padding-right: calc(var(--T) + 16px); } .wr--brand .wr__stack { padding-right: calc(var(--T) + 16px); } }
@media print { .page-hero::after { display: none; } }

/* Standings: first, second and third marked in the stripe colours */
.standings tbody tr:nth-child(1) td:first-child { box-shadow: inset 6px 0 0 var(--navy); }
.standings tbody tr:nth-child(2) td:first-child { box-shadow: inset 6px 0 0 var(--orange); }
.standings tbody tr:nth-child(3) td:first-child { box-shadow: inset 6px 0 0 var(--red); }

/* Form guide: a win is a tiny stack of the three lines, a loss an outline */
.form-guide i { width: 12px; height: 12px; border-radius: 3px; }
.form-guide .form-W { background: linear-gradient(to bottom, var(--gold) 0 33%, var(--orange) 33% 66%, var(--red) 66%); }

@media (prefers-reduced-motion: reduce) { .hero::before, .page-hero::after, .wr--brand::after, .curve-frame::after { animation: none; } }
/* A bigger ball in the arcade's little rally */
.arcade__ball { height: 100px; }
.arcade__ball::after { width: 28px; height: 28px; }
@keyframes rally-x { to { left: calc(100% - 28px); } }
@keyframes rally-y { from { bottom: 6px; } to { bottom: 78px; } }

/* ---------- The lines in motion and in the numbers (Dec 2026) ----------
   Straight lines only (the curve belongs to the hero and page headers). Every animation stops for reduced motion. */
:root { --lines-v: linear-gradient(to bottom, var(--gold) 0 30%, transparent 30% 35%, var(--orange) 35% 65%, transparent 65% 70%, var(--red) 70%); }

/* 2. Countdown bars in the live strip: days (out of 14), hours and minutes draining */
.cd-bars { display: inline-flex; flex-direction: column; justify-content: center; gap: 3px; width: 62px; padding: 5px 6px; border-radius: 4px; background: var(--navy); }
.cd-bar { display: block; height: 4px; border-radius: 2px; background: rgba(244,235,203,.18); overflow: hidden; }
.cd-bar i { display: block; height: 100%; width: var(--w, 100%); transition: width 1s ease; }
.cd-bar--d i { background: var(--gold); } .cd-bar--h i { background: var(--orange); } .cd-bar--m i { background: var(--red); }

/* 8. Live now: three lines pulsing one after another, like a signal */
.live-strip__lines { display: inline-flex; flex-direction: column; gap: 2px; }
.live-strip__lines i { display: block; height: 3px; border-radius: 2px; background: #fff; animation: lines-pulse 1.2s ease-in-out infinite; }
.live-strip__lines i:nth-child(1) { width: 16px; } .live-strip__lines i:nth-child(2) { width: 12px; animation-delay: .15s; } .live-strip__lines i:nth-child(3) { width: 8px; animation-delay: .3s; }
@keyframes lines-pulse { 0%, 100% { opacity: .35; } 40% { opacity: 1; } }

/* 3. Interest meter: a striped bar under the ball tray (and the plain bar, when there are no balls) */
.meter__lines { grid-column: 1 / -1; height: 16px; border-radius: 3px; background: rgba(244,235,203,.14); overflow: hidden; }
.meter__lines span, .meter__bar span { display: block; height: 100%; border-radius: 0; background: var(--lines-v); transition: width 1.4s cubic-bezier(.3,0,.2,1); }

/* 4. Win chance: the first team's share of the bar is striped */
.chance__bar { height: 12px; border-radius: 3px; background: var(--navy); }
.chance__bar span { background: var(--lines-v); border-right: 3px solid #f4ebcb; }
[data-theme="dark"] .chance__bar { background: #0e3f7a; }

/* 6. Power ranking over time, drawn as a triple line going uphill */
.spark--lines { overflow: visible; }
.spark--lines path { stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.spark--lines .spark__l1 { stroke: var(--gold); } .spark--lines .spark__l2 { stroke: var(--orange); } .spark--lines .spark__l3 { stroke: var(--red); }

/* 7. Point won: the lines streak in behind a score the moment it changes, then fade */
.bc-flip { position: relative; }
.bc-flip::after { content: ""; position: absolute; right: calc(100% + 4px); top: 50%; width: 56px; height: 16px; margin-top: -8px; pointer-events: none;
  background: var(--lines-v); clip-path: polygon(0 42%, 100% 0, 100% 100%, 0 58%); animation: point-streak .9s ease-out forwards; }
@keyframes point-streak { from { opacity: 1; transform: translateX(-24px) scaleX(.4); transform-origin: right; } 30% { opacity: 1; transform: none; } to { opacity: 0; transform: translateX(6px); } }

/* 9. Big numbers sit on the lines, 70s scoreboard style */
.big-fact { position: relative; display: inline-block; isolation: isolate; padding: 0 6px; }
.big-fact::before { content: ""; position: absolute; left: -4px; right: -4px; top: 50%; height: .36em; transform: translateY(-50%); background: var(--lines-v); z-index: -1; }

/* 10. One key word per page, underlined with the lines like a highlighter */
mark.hl { color: inherit; padding: 0 2px; background: linear-gradient(to bottom, transparent 62%, var(--gold) 62% 72%, transparent 72% 75%, var(--orange) 75% 85%, transparent 85% 88%, var(--red) 88% 98%, transparent 98%); }

/* 11. Back to top: a ball riding up its own trail */
.to-top { position: fixed; right: 18px; bottom: 18px; z-index: 800; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px; text-decoration: none; transition: opacity .3s, transform .3s; }
.to-top[hidden] { display: none; }
.to-top__ball { width: 30px; height: 30px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px var(--navy), 0 6px 14px rgba(0,0,0,.25); transition: transform .25s cubic-bezier(.3,1.6,.5,1); }
.to-top__trail { display: flex; gap: 3px; height: 30px; }
.to-top__trail i { width: 5px; border-radius: 0 0 3px 3px; background: var(--gold); }
.to-top__trail i:nth-child(2) { background: var(--orange); height: 80%; } .to-top__trail i:nth-child(3) { background: var(--red); height: 60%; }
.to-top:hover .to-top__ball, .to-top:focus-visible .to-top__ball { transform: translateY(-6px); }
@media (max-width: 700px) { .to-top { right: 10px; bottom: 10px; } .to-top__ball { width: 26px; height: 26px; } .to-top__trail { height: 22px; } }

/* 12. Earned badges hang from a striped ribbon, like a real medal */
.badge-tile { isolation: isolate; padding-top: 26px; }
.badge-tile__icon { position: relative; }
.badge-tile:not(.is-locked) .badge-tile__icon::before { content: ""; position: absolute; bottom: 55%; left: 50%; width: 30px; height: 30px; transform: translateX(-50%); z-index: -1;
  background: linear-gradient(90deg, var(--gold) 0 33%, var(--orange) 33% 66%, var(--red) 66%); clip-path: polygon(0 0, 100% 0, 82% 100%, 18% 100%); }
.badge-tile:not(.is-locked) .badge-tile__icon { background: var(--gold); color: var(--navy); box-shadow: 0 0 0 3px var(--navy), 0 4px 10px rgba(0,48,73,.25); }


@media (prefers-reduced-motion: reduce) {
  .live-strip__lines i, .bc-flip::after { animation: none; }
  .bc-flip::after { display: none; }
  .cd-bar i, .meter__lines span, .meter__bar span { transition: none; }
}

/* Home page arcade: the pitch on the left, today's board and the Office Cup side by side, the all-time top five
   under them; the little rally sits low enough that the ball never bounces over the Play button */
.arcade__pitch { grid-row: span 2; padding-bottom: 136px; }
.arcade__board--alltime { grid-column: 2 / -1; }
.arcade--quiet .arcade__board--alltime { grid-column: 2; }
.arcade__more { display: inline-block; margin-top: 12px; color: var(--gold); font-weight: 600; }
@media (max-width: 960px) { .arcade__pitch { grid-row: auto; } .arcade__board--alltime, .arcade--quiet .arcade__board--alltime { grid-column: auto; } }

/* On phones, small headings inside cards (news titles and the like) drop the offset shadow: at that size the
   shadow sits on top of the letters and blurs them. Big headlines and larger screens keep it. */
@media (max-width: 700px) { .card h2, .card h3, .news-row h2 { text-shadow: none; } }

/* Dark mode: headings are cream, so a gold shadow (almost the same lightness) smears into the letters.
   Use red there, as the navy bands already do; small card titles drop the shadow altogether. */
[data-theme="dark"] :where(h1, h2) { text-shadow: 2px 2px 0 var(--red); }
[data-theme="dark"] .card h2, [data-theme="dark"] .card h3, [data-theme="dark"] .news-row h2 { text-shadow: none; }
