/*
 * SHFstats Magazine. The SHFstats identity "Målgården" (DESIGN.md): Inter only, weights 400/500/600, Nattblå
 * dominant, flat surfaces and hairlines, radius 2-4 px, one Signal mark (the active section underline), tabular
 * figures. Magazine-specific deviations (larger editorial display sizes, the reading measure, the phone section row)
 * are listed in docs/magazine/design-direction.md for operator approval.
 *
 * Tokens mirror web/src/brand.php (brand_tokens_css) value for value; keep them in step.
 */

@font-face {
    font-family: "Inter"; font-style: normal; font-display: optional; font-weight: 100 900;
    src: url("/fonts/inter-latin-wght-normal.woff2") format("woff2-variations"), url("/fonts/inter-latin-wght-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
        U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Inter"; font-style: normal; font-display: optional; font-weight: 100 900;
    src: url("/fonts/inter-latin-ext-wght-normal.woff2") format("woff2-variations"), url("/fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
        U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* metric fallback (same bands as brand_fallback_font_css) so a late Inter never reflows the page */
@font-face { font-family: "Inter Fallback"; font-weight: 100 450; src: local("Arial"), local("ArialMT"), local("Liberation Sans"), local("Arimo"); size-adjust: 105%; ascent-override: 92.26%; descent-override: 22.97%; line-gap-override: 0%; }
@font-face { font-family: "Inter Fallback"; font-weight: 451 550; src: local("Arial"), local("ArialMT"), local("Liberation Sans"), local("Arimo"); size-adjust: 103.4%; ascent-override: 93.69%; descent-override: 23.33%; line-gap-override: 0%; }
@font-face { font-family: "Inter Fallback"; font-weight: 551 900; src: local("Arial Bold"), local("Arial-BoldMT"), local("Liberation Sans Bold"), local("Arimo Bold"); size-adjust: 101.3%; ascent-override: 95.63%; descent-override: 23.81%; line-gap-override: 0%; }

:root {
    --brand-night: #0E1B2C; --brand-deep: #16263A; --brand-line: #F5F6F8; --brand-white: #FFFFFF;
    --brand-blue: #2F6FB5; --brand-ice: #6FA8E8; --brand-signal: #E3A23B; --brand-signal-dark: #9A5B0B;
    --brand-slate: #5B6878; --brand-mist: #8A9AAE; --brand-teal: #2E8C82; --brand-loss: #C4513F;
    --font-sans: "Inter", "Inter Fallback", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    --radius-1: 2px; --radius-2: 3px; --radius-3: 4px;
    --ease: cubic-bezier(0.65, 0, 0.35, 1); --dur-micro: 200ms;
    --col: 1240px; --gutter: 16px; --rail: 380px;

    color-scheme: dark;
    --surface-page: var(--brand-night); --surface-card: var(--brand-deep); --surface-sunken: #0A1522;
    --surface-head: #132236; --surface-hover: #1B2D44; --surface-selected: #1F3858;
    --text-primary: var(--brand-line); --text-secondary: var(--brand-mist); --text-strong: #FFFFFF; --text-on-action: #FFFFFF;
    --border-subtle: #24364D; --border-rule: #1E2F44; --border-strong: #35506F;
    --link: var(--brand-ice); --data: var(--brand-ice); --focus: var(--brand-ice); --action: var(--brand-blue);
    --signal: var(--brand-signal);
    --state-warn-bg: #3A2D14; --state-warn-text: #EDC277;
    --state-neutral-bg: #1C2E44; --state-neutral-text: #C3CEDB;
    --state-live-bg: #17324F; --state-live-text: #CFE3FA; --state-live-dot: var(--brand-ice);
    --state-info-bg: #132538; --state-info-text: #C9D5E3;
    --chart-grid: #24364D;
}
:root[data-theme="light"] {
    color-scheme: light;
    --surface-page: var(--brand-line); --surface-card: var(--brand-white); --surface-sunken: #ECEFF3;
    --surface-head: #EEF1F5; --surface-hover: #F8F9FB; --surface-selected: #E3ECF7;
    --text-primary: var(--brand-night); --text-secondary: var(--brand-slate); --text-strong: var(--brand-night); --text-on-action: #FFFFFF;
    --border-subtle: #D5DBE3; --border-rule: #E4E8EE; --border-strong: #B4BFCC;
    --link: var(--brand-blue); --data: var(--brand-blue); --focus: var(--brand-blue); --action: var(--brand-blue);
    --state-warn-bg: #FAEFD8; --state-warn-text: #7A4706;
    --state-neutral-bg: #E8ECF1; --state-neutral-text: #354253;
    --state-live-bg: #E3ECF7; --state-live-text: #1D4A80; --state-live-dot: var(--brand-blue);
    --state-info-bg: #EDF2F8; --state-info-text: #283A50;
    --chart-grid: #E4E8EE;
}
@media (prefers-color-scheme: light) {
    :root:not([data-theme]) {
        color-scheme: light;
        --surface-page: var(--brand-line); --surface-card: var(--brand-white); --surface-sunken: #ECEFF3;
        --surface-head: #EEF1F5; --surface-hover: #F8F9FB; --surface-selected: #E3ECF7;
        --text-primary: var(--brand-night); --text-secondary: var(--brand-slate); --text-strong: var(--brand-night);
        --border-subtle: #D5DBE3; --border-rule: #E4E8EE; --border-strong: #B4BFCC;
        --link: var(--brand-blue); --data: var(--brand-blue); --focus: var(--brand-blue);
        --state-warn-bg: #FAEFD8; --state-warn-text: #7A4706; --state-neutral-bg: #E8ECF1; --state-neutral-text: #354253;
        --state-live-bg: #E3ECF7; --state-live-text: #1D4A80; --state-live-dot: var(--brand-blue);
        --state-info-bg: #EDF2F8; --state-info-text: #283A50; --chart-grid: #E4E8EE;
    }
}
@media (min-width: 1600px) { :root { --col: 1440px; } }
@media (min-width: 700px) { :root { --gutter: 24px; } }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
    margin: 0; background: var(--surface-page); color: var(--text-primary);
    font: 400 16px/1.45 var(--font-sans); font-feature-settings: "cv05", "cv08";
    -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, b, strong { font-weight: 600; }
h1, h2, h3 { text-wrap: balance; }
p, li, dd { text-wrap: pretty; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
::selection { background: var(--action); color: var(--text-on-action); }
img { max-width: 100%; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.nb { white-space: nowrap; }
.fig, .num, .sc, time, .count { font-variant-numeric: tabular-nums; }
.fig { font-weight: 600; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 30; padding: 10px 14px; background: var(--surface-card); color: var(--text-primary); border: 1px solid var(--border-subtle); border-radius: var(--radius-2); }
.skip:focus { top: 8px; }

/* ---------- header bar (always Nattblå) ---------- */
.bar {
    position: sticky; top: 0; z-index: 20; background: #0E1B2C; color: #F5F6F8; border-bottom: 1px solid #24364D;
    --focus: #6FA8E8;
}
.bar-in {
    max-width: calc(var(--col) + 2 * var(--gutter)); margin: 0 auto; padding: 0 max(var(--gutter), env(safe-area-inset-left));
    display: flex; align-items: center; gap: 28px; min-height: 56px;
}
.brand { display: inline-flex; align-items: center; height: 48px; color: inherit; flex: none; }
.brand-logo { display: block; height: 24px; width: auto; aspect-ratio: 296.695 / 44; fill: currentColor; }
.brand-publication { margin-left: 14px; padding-left: 14px; border-left: 1px solid #35506F; color: #C3CEDB; font-size: 12px; font-weight: 500; letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; }
.brand-word { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; }
.sections { flex: 1; min-width: 0; }
.sections ul { display: flex; gap: 22px; margin: 0; padding: 0; list-style: none; }
.sections a {
    display: inline-flex; align-items: center; min-height: 56px; color: #8A9AAE; text-decoration: none;
    font-size: 15px; font-weight: 500; white-space: nowrap; box-shadow: inset 0 -2px 0 transparent;
    transition: color var(--dur-micro) var(--ease);
}
.sections a:hover { color: #F5F6F8; }
.sections a[aria-current="page"] { color: #F5F6F8; box-shadow: inset 0 -2px 0 var(--brand-signal); }
.bar-theme { flex: none; }
.bar .theme-switch { --ts-border: #35506F; --ts-text: #8A9AAE; --ts-active-bg: #1F3858; --ts-active-text: #F5F6F8; }
@media (max-width: 1023px) { .bar-theme { display: none; } }
@media (min-width: 700px) and (max-width: 1023px) {
    .sections { overflow-x: auto; scrollbar-width: none; }
    .sections::-webkit-scrollbar { display: none; }
    .sections ul { width: max-content; }
}
@media (max-width: 699px) {
    .bar-in { flex-wrap: wrap; gap: 0; min-height: 0; }
    .brand { height: 52px; }
    .brand-logo { height: 20px; }
    .brand-publication { margin-left: 10px; padding-left: 10px; }
    .sections { flex-basis: 100%; margin: 0; padding: 0; border-top: 1px solid #1E2F44; }
    .sections::-webkit-scrollbar { display: none; }
    .sections ul { flex-wrap: wrap; gap: 0 20px; }
    .sections a { min-height: 44px; font-size: 15px; }
}

/* theme switch (theme.php mechanism, brand shape) */
.theme-switch { display: inline-flex; margin: 0; padding: 2px; gap: 2px; min-width: 0; border: 1px solid var(--ts-border, var(--border-subtle)); border-radius: var(--radius-2); }
.theme-switch[hidden] { display: none; }
.theme-switch label { position: relative; display: inline-flex; }
.theme-switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.theme-switch span {
    display: inline-flex; align-items: center; min-height: 32px; padding: 0 10px; border-radius: var(--radius-1);
    font-size: 13px; font-weight: 500; color: var(--ts-text, var(--text-secondary)); cursor: pointer;
    transition: background-color var(--dur-micro) var(--ease), color var(--dur-micro) var(--ease);
}
.theme-switch input:checked + span { background: var(--ts-active-bg, var(--surface-selected)); color: var(--ts-active-text, var(--text-primary)); }
.theme-switch input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 1px; }
@media (hover: hover) { .theme-switch label:hover span { color: var(--ts-active-text, var(--text-primary)); } }
@media (pointer: coarse) { .theme-switch span { min-height: 44px; padding: 0 14px; } }

.staging-bar {
    background: var(--state-info-bg); color: var(--state-info-text); border-bottom: 1px solid var(--border-subtle);
    font-size: 13px; padding: 6px var(--gutter); text-align: center;
}

/* ---------- page column ---------- */
main.page { display: block; padding: 0 0 80px; }
.col { max-width: calc(var(--col) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
main > .col:first-child { padding-top: 28px; }
.sec { margin-top: 56px; }
.sec-h {
    margin: 0 0 12px; padding-top: 10px; border-top: 2px solid var(--text-primary);
    font-size: 24px; line-height: 1.15; letter-spacing: -0.015em;
}
.sec-h a { color: inherit; text-decoration: none; }
.sec-h a:hover { color: var(--link); }
.lede { margin: 0 0 20px; max-width: 70ch; font-size: 17px; line-height: 1.5; color: var(--text-primary); }
.legend { margin: 10px 0 0; max-width: 72ch; font-size: 13px; color: var(--text-secondary); }
.note { margin: 12px 0 0; font-size: 14px; color: var(--text-secondary); }
.more { margin: 14px 0 0; font-size: 15px; font-weight: 500; }
.count-line { margin: 24px 0 0; font-size: 13px; font-weight: 500; color: var(--text-secondary); }
.empty {
    margin: 0; padding: 22px 18px; border: 1px dashed var(--border-strong); border-radius: var(--radius-2);
    background: var(--surface-card); color: var(--text-secondary); max-width: 72ch;
}
.empty p { margin: 0; }
.empty .empty-lead { color: var(--text-primary); font-weight: 600; }
.empty p + p { margin-top: 6px; }
.button {
    display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 16px;
    border: 1px solid var(--border-strong); border-radius: var(--radius-2); background: var(--state-neutral-bg);
    color: var(--text-primary); font: 600 14px/1 var(--font-sans); text-decoration: none; cursor: pointer; white-space: nowrap;
}
.button:hover { border-color: var(--focus); }

/* ---------- masthead (home) ---------- */
.home-intro {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 0.58fr); align-items: end;
    gap: 6px 36px; padding-bottom: 18px; border-bottom: 1px solid var(--border-rule);
}
.masthead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; padding-bottom: 12px; }
.mast-h { margin: 0; font-size: clamp(32px, 4.4vw, 60px); font-weight: 600; line-height: 1.02; letter-spacing: -0.035em; }
.issue { margin: 0; font-size: 14px; color: var(--text-secondary); white-space: nowrap; }
.mag-search { display: grid; gap: 7px; grid-template-columns: minmax(0, 1fr); align-items: end; max-width: 700px; margin: 8px 0 18px; }
.home-intro .mag-search { max-width: none; margin: 0 0 20px; }
.home-intro .region-tabs { grid-column: 1 / -1; }
.mag-search-label { grid-column: 1 / -1; font-size: 14px; font-weight: 600; }
.mag-search-controls { display: flex; gap: 8px; min-width: 0; }
.mag-search-controls .button { flex: none; }
.mag-search-input { width: 100%; min-width: 0; min-height: 46px; padding: 9px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-2); background: var(--surface-page); color: var(--text-primary); font: 400 16px/1.35 var(--font-sans); }
.mag-search-input::placeholder { color: var(--text-secondary); opacity: 1; }
.mag-search .button { min-height: 46px; }
.mag-search-hint { grid-column: 1 / -1; margin: 0; font-size: 13px; color: var(--text-secondary); }
.search-message { margin: 18px 0 0; max-width: 70ch; color: var(--text-secondary); }
.search-results { margin-top: 32px; }
.search-list { margin: 0; padding: 0; list-style: none; border-bottom: 1px solid var(--border-strong); }
.search-list .story { padding: 16px 0; border-top: 1px solid var(--border-rule); }

/* text tabs */
.tabs { overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--border-rule); }
.tabs::-webkit-scrollbar { display: none; }
.tabs ul { display: flex; gap: 24px; margin: 0; padding: 0; list-style: none; }
.tabs a {
    display: inline-flex; align-items: center; min-height: 44px; color: var(--text-secondary); text-decoration: none;
    font-size: 15px; font-weight: 500; white-space: nowrap; box-shadow: inset 0 -2px 0 transparent;
    transition: color var(--dur-micro) var(--ease);
}
.tabs a:hover { color: var(--text-primary); }
.tabs a[aria-current] { color: var(--text-primary); box-shadow: inset 0 -2px 0 var(--text-primary); }
@media (max-width: 699px) { .tabs { margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); } .tabs ul { flex-wrap: wrap; gap: 0 20px; } }
@media (max-width: 799px) {
    .home-intro { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .home-intro .mag-search { margin: 8px 0 12px; }
    .home-intro .masthead { padding-bottom: 8px; }
}

/* ---------- front: lead + rail ---------- */
.front { margin-top: 32px; display: grid; gap: 40px; }
@media (min-width: 1024px) { .front.has-rail { grid-template-columns: minmax(0, 1fr) var(--rail); gap: 56px; } }
.lead-h { margin: 0; font-size: clamp(32px, 5.4vw, 68px); line-height: 1.02; letter-spacing: -0.032em; max-width: 18ch; }
.lead-h a { color: inherit; text-decoration: none; }
.lead-h a:hover { color: var(--link); }
.lead-dek { margin: 16px 0 0; max-width: 46ch; font-size: clamp(18px, 1.9vw, 22px); line-height: 1.4; font-weight: 500; color: var(--text-secondary); }
.story-meta { margin: 12px 0 0; font-size: 13px; color: var(--text-secondary); }
.lead-visual { margin-top: 28px; }
.draft-inline { color: var(--state-warn-text); font-weight: 500; }

.front-rail { display: grid; gap: 40px; align-content: start; }
.rail-h { margin: 0 0 4px; padding-top: 8px; border-top: 2px solid var(--text-primary); font-size: 14px; }

/* story rows */
.stories { margin: 0; padding: 0; list-style: none; }
.story { padding: 16px 0; border-bottom: 1px solid var(--border-rule); }
.story:first-child { padding-top: 10px; }
.story-h { margin: 0; font-size: 19px; line-height: 1.3; letter-spacing: -0.01em; }
.story-h a { color: inherit; text-decoration: none; }
.story-h a:hover { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; }
.story-dek { margin: 6px 0 0; color: var(--text-secondary); font-size: 15px; max-width: 60ch; }
.story .story-meta { margin-top: 8px; }
@media (min-width: 900px) {
    .stories.grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; }
    .stories.grid .story:nth-child(2) { padding-top: 10px; }
}
.stories.index .story-h { font-size: 22px; }

/* key figure (evidence) */
.keyfig { margin: 0; display: grid; gap: 4px; }
.keyfig-v { font-size: clamp(56px, 9vw, 104px); line-height: .95; font-weight: 600; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; color: var(--data); }
.keyfig-u { font-size: .4em; letter-spacing: 0; }
.keyfig-l { font-size: 15px; color: var(--text-secondary); max-width: 40ch; }

/* score plate (lead, article) */
.plate { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px; max-width: 760px; }
.pt { display: grid; justify-items: center; gap: 10px; text-align: center; font-size: 17px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.pt-crest { width: 64px; height: 64px; object-fit: contain; }
.plate-article .pt-crest { width: 56px; height: 56px; }
.pt-score { display: flex; align-items: center; gap: 10px; font-size: clamp(44px, 7vw, 76px); font-weight: 600; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; line-height: 1; }
.pt-dash { color: var(--text-secondary); font-weight: 400; }
.pt-pending { font-size: .6em; }

/* ---------- Helgen i siffror ---------- */
.digest-h { margin: 0; padding-top: 12px; border-top: 2px solid var(--text-primary); font-size: clamp(30px, 4.2vw, 52px); line-height: 1.04; letter-spacing: -0.03em; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; }
.digest-when { font-size: 15px; font-weight: 500; letter-spacing: 0; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.sec-h .digest-when { margin-left: 12px; }
.digest-lede { margin: 18px 0 0; max-width: 46ch; font-size: clamp(19px, 2.1vw, 25px); line-height: 1.4; }
.digest-lede .fig { color: var(--data); }
.dg-cards { margin-top: 32px; display: grid; gap: 32px; }
@media (min-width: 700px) { .dg-cards { grid-template-columns: 1fr 1fr; gap: 40px; } }
.dg-card { border-top: 1px solid var(--border-strong); padding-top: 12px; }
.match-stories { margin-top: 40px; padding-top: 18px; border-top: 2px solid var(--text-primary); }
.match-stories > h3 { margin: 0; max-width: 24ch; font-size: clamp(22px, 3vw, 30px); line-height: 1.15; letter-spacing: -0.02em; }
.match-stories ol { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; margin: 12px 0 0; padding: 0; list-style: none; }
.match-stories li { min-width: 0; padding: 16px 0 18px; border-top: 1px solid var(--border-rule); }
.match-stories h4 { margin: 0; font-size: 18px; line-height: 1.3; overflow-wrap: anywhere; }
.match-stories .ms-score { margin: 5px 0 0; font-size: 23px; font-weight: 600; font-variant-numeric: tabular-nums; }
.match-stories .ms-meta { margin: 4px 0 8px; color: var(--text-secondary); font-size: 13px; line-height: 1.5; }
.match-stories li > p:last-child { max-width: 48ch; margin: 0; line-height: 1.5; }
@media (min-width: 700px) { .match-stories ol { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; } }
.dg-label { margin: 0; display: flex; justify-content: space-between; gap: 12px; font-size: 14px; font-weight: 600; }
.dg-fig { color: var(--text-secondary); font-weight: 500; font-variant-numeric: tabular-nums; }
.dg-board { margin-top: 18px; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; }
.dg-team { display: grid; justify-items: center; gap: 8px; text-align: center; font-size: 15px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.dg-crest { width: 40px; height: 40px; object-fit: contain; }
.dg-score { font-size: clamp(36px, 4.4vw, 48px); font-weight: 600; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; white-space: nowrap; line-height: 1; }
.dg-meta { margin: 16px 0 0; font-size: 13px; color: var(--text-secondary); text-align: center; }
.dg-more { margin-top: 32px; border-top: 1px solid var(--border-rule); }
.dg-more summary {
    display: flex; align-items: center; gap: 10px; min-height: 48px; cursor: pointer; list-style: none; font-size: 15px; font-weight: 600;
}
.dg-more summary::-webkit-details-marker { display: none; }
.dg-more summary::after {
    content: ""; width: 7px; height: 7px; margin-left: 4px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px); transition: transform var(--dur-micro) var(--ease);
}
.dg-more[open] summary::after { transform: rotate(-135deg); }
.count { font-weight: 400; color: var(--text-secondary); }

/* result rows */
.results { margin: 0; padding: 0; list-style: none; border-bottom: 1px solid var(--border-strong); }
.rr {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "teams score" "meta meta";
    column-gap: 16px; padding: 10px 0; border-top: 1px solid var(--border-rule);
}
.rr-teams { grid-area: teams; display: grid; gap: 4px; }
.rr-t { display: flex; align-items: center; gap: 8px; font-size: 15px; overflow-wrap: anywhere; }
.rr-t.won { font-weight: 600; }
.rr-t .crest { width: 20px; height: 20px; object-fit: contain; flex: none; }
.rr-score { grid-area: score; align-self: center; font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--text-primary); text-decoration: none; min-height: 24px; display: inline-flex; align-items: center; }
a.rr-score:hover { color: var(--link); text-decoration: underline; }
.rr-meta { grid-area: meta; margin-top: 4px; font-size: 13px; color: var(--text-secondary); }
@media (min-width: 900px) {
    .results.cols { columns: 2; column-gap: 40px; }
}

/* season teaser + pulse chart */
.pulse { position: relative; margin-top: 8px; padding-bottom: 24px; }
.pulse-svg { display: block; width: 100%; height: clamp(110px, 16vw, 180px); overflow: visible; }
.pl-played { fill: var(--data); }
.pl-sched { fill: none; stroke: var(--border-strong); stroke-width: 1; }
.pl-base { stroke: var(--text-primary); stroke-width: 1; }
.pl-tick { stroke: var(--border-strong); stroke-width: 1; }
.pl-now { stroke: var(--text-primary); stroke-width: 1; stroke-dasharray: 3 3; }
.pl-labels { position: absolute; left: 0; right: 0; bottom: 0; height: 20px; font-size: 12px; color: var(--text-secondary); }
.pl-month, .pl-now-l { position: absolute; top: 2px; padding-left: 4px; white-space: nowrap; }
.pl-now-l { top: auto; bottom: calc(100% + clamp(110px, 16vw, 180px) - 2px); color: var(--text-primary); font-weight: 600; transform: translateX(4px); }
.pl-now-l.end { transform: translateX(calc(-100% - 6px)); }
@media (max-width: 559px) { .pl-month:nth-child(even) { display: none; } }
.lg { display: inline-block; width: 12px; height: 10px; margin: 0 6px 0 10px; vertical-align: -1px; border-radius: var(--radius-1); }
.lg:first-child { margin-left: 0; }
.lg-played { background: var(--data); }
.lg-sched { border: 1px solid var(--border-strong); }
.lg-home { width: 9px; height: 9px; border-radius: 50%; background: var(--data); }
.lg-away { width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--data); }

/* ---------- featured live match ---------- */
.live { background: var(--surface-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-2); padding: 16px 18px 18px; }
.lv-h { margin: 0; font-size: 14px; }
.lv-headline { margin: 6px 0 0; font-size: 17px; font-weight: 600; line-height: 1.3; }
.lv-context { margin: 4px 0 0; font-size: 13px; color: var(--text-secondary); }
.lv-board { margin-top: 18px; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: start; gap: 10px; }
.lv-team { display: grid; justify-items: center; gap: 8px; text-align: center; font-size: 15px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; hyphens: manual; }
.lv-crest { width: 56px; height: 56px; object-fit: contain; }
.lv-crest-empty { display: block; width: 56px; height: 56px; }
.lv-centre { align-self: start; padding-top: 10px; text-align: center; }
.lv-score { display: inline-flex; gap: 6px; font-size: 40px; font-weight: 600; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; line-height: 1; }
.lv-dash { color: var(--text-secondary); font-weight: 400; }
.lv-kick { display: grid; gap: 4px; }
.lv-kick-time { font-size: 30px; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.lv-kick-day { font-size: 13px; color: var(--text-secondary); white-space: nowrap; }
.lv-status { margin-top: 16px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 12px; }
.lv-badge {
    display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: var(--radius-2);
    font-size: 13px; font-weight: 500; line-height: 1.45; white-space: nowrap;
    background: var(--state-neutral-bg); color: var(--state-neutral-text);
}
.lv-live { background: var(--state-live-bg); color: var(--state-live-text); box-shadow: inset 0 0 0 1px var(--focus); }
.lv-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--state-live-dot); }
.lv-period { font-size: 14px; font-weight: 600; }
.lv-fresh { margin: 10px 0 0; text-align: center; font-size: 13px; color: var(--text-secondary); }
.lv-events { margin: 16px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--border-rule); }
.lv-events li { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border-rule); font-size: 14px; }
.lv-ev-time, .lv-ev-score { font-weight: 600; font-variant-numeric: tabular-nums; }
.lv-ev-team { color: var(--text-secondary); }
.lv-foot { margin-top: 16px; }
.lv-official {
    display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 12px;
    border: 1px solid var(--focus); border-radius: var(--radius-2); color: var(--state-live-text); background: transparent;
    font-size: 14px; font-weight: 600; text-decoration: none;
}
:root[data-theme="light"] .lv-official { color: var(--link); }
.lv-official:hover { background: var(--surface-selected); }
.lv-note { margin: 10px 0 0; font-size: 12px; line-height: 1.45; color: var(--text-secondary); }
.live-gallery { display: grid; gap: 32px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); margin-top: 24px; }

/* ---------- season ---------- */
.season-head { padding-bottom: 8px; }
.season-h { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 18px; line-height: .92; }
.season-word { font-size: clamp(24px, 3vw, 36px); letter-spacing: -0.02em; color: var(--text-secondary); font-weight: 500; }
.season-num { font-size: clamp(64px, 12.5vw, 168px); letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.season-lede { margin-top: 20px; font-size: clamp(17px, 1.8vw, 21px); max-width: 52ch; }
.season-lede .fig { color: var(--data); }
.season-head .pulse { margin-top: 28px; }
.filters { margin-top: 40px; display: grid; gap: 0; }
.level-tabs a { font-size: 14px; min-height: 44px; }

.chapter { margin-top: 48px; }
.ch-h {
    margin: 0; padding-bottom: 8px; border-bottom: 2px solid var(--text-primary);
    display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px;
}
.ch-num { font-size: clamp(32px, 4.6vw, 52px); letter-spacing: -0.03em; line-height: 1.1; }
.ch-meta { font-size: 14px; font-weight: 400; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.chapter-ahead .ch-num { color: var(--text-secondary); }

.tl { margin: 0; padding: 0; list-style: none; }
.tl-e {
    display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; column-gap: 20px;
    padding: 16px 0; border-bottom: 1px solid var(--border-rule); scroll-margin-top: 120px;
}
.tl-date { display: grid; align-content: start; gap: 2px; padding-top: 3px; }
.tl-dow { font-size: 11px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-secondary); }
.tl-day { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tl-h { margin: 0; font-size: 19px; line-height: 1.3; letter-spacing: -0.01em; }
.tl-h a { color: inherit; text-decoration: none; }
.tl-h a:hover { color: var(--link); text-decoration: underline; }
.tl-sub, .tl-fig, .tl-meta { margin: 6px 0 0; font-size: 15px; color: var(--text-secondary); }
.tl-fig .fig { color: var(--text-primary); }
.tl-meta { font-size: 13px; }
.tl-kind { font-size: 13px; color: var(--text-secondary); padding-top: 4px; white-space: nowrap; }
.tl-results { margin: 10px 0 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; font-size: 15px; }
.tl-results dt { color: var(--text-secondary); font-size: 13px; padding-top: 2px; }
.tl-results dd { margin: 0; }
.tl-results a { color: var(--text-primary); text-decoration: none; }
.tl-results a:hover { color: var(--link); text-decoration: underline; }
.tl-results .sc { font-weight: 600; white-space: nowrap; }
.tl-comp { color: var(--text-secondary); font-size: 13px; margin-left: 6px; }
.tl-list { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 2px; font-size: 15px; }
.tl-list li { min-height: 28px; display: flex; align-items: baseline; flex-wrap: wrap; }
.tl-list a { color: var(--text-primary); text-decoration: none; padding-block: 3px; }
.tl-list a:hover { color: var(--link); text-decoration: underline; }
.tl-more { margin-top: 6px; }
.tl-more summary { display: inline-flex; align-items: center; min-height: 44px; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--link); }
.tl-sub a { color: var(--text-primary); }
.tl-milestone .tl-h { font-size: 19px; }
.fig-xl { font-size: clamp(30px, 3.6vw, 40px); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--data); margin-right: 4px; }
.tl-article .tl-h { font-size: 21px; }
@media (max-width: 559px) {
    .tl-e { grid-template-columns: 52px minmax(0, 1fr); column-gap: 14px; }
    .tl-kind { grid-column: 2; padding-top: 6px; order: 3; }
    .tl-results { grid-template-columns: 1fr; gap: 2px; }
    .tl-results dd { margin-bottom: 6px; }
}
.season-index { margin-top: 56px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; font-size: 13px; color: var(--text-secondary); }
.season-index ul { display: flex; gap: 8px; margin: 0; padding: 0; list-style: none; }
.season-index a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; border-radius: var(--radius-2); font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; }
.season-index a:hover { background: var(--surface-selected); }

/* ---------- index pages, filters ---------- */
.index-head { padding-bottom: 8px; }
.index-h { margin: 0 0 12px; font-size: clamp(32px, 6vw, 56px); line-height: 1.02; letter-spacing: -0.03em; }
.filter-form + .empty, .active-filters + .empty { margin-top: 24px; }
.filter-form { margin-top: 24px; display: flex; flex-wrap: wrap; align-items: end; gap: 12px 16px; padding: 16px 0; border-top: 2px solid var(--text-primary); border-bottom: 1px solid var(--border-rule); }
.field { display: grid; gap: 6px; min-width: 0; flex: 1 1 180px; }
.field-l { font-size: 13px; font-weight: 500; color: var(--text-secondary); }
.field select {
    min-height: 44px; padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-2);
    background: var(--surface-sunken); color: var(--text-primary); font: 400 16px/1.2 var(--font-sans); width: 100%; max-width: 100%; min-width: 0;
}
.js .filter-form[data-autosubmit] .button { display: none; }
.active-filters { margin: 12px 0 0; padding: 0; list-style: none; font-size: 14px; display: flex; gap: 16px; flex-wrap: wrap; }
.regions { margin: 24px 0 0; padding: 0; list-style: none; border-top: 2px solid var(--text-primary); border-bottom: 1px solid var(--border-strong); }
.region-row + .region-row { border-top: 1px solid var(--border-rule); }
.region-row a { display: grid; gap: 2px; padding: 14px 0; min-height: 64px; color: var(--text-primary); text-decoration: none; }
.region-row a:hover { background: var(--surface-hover); }
.rg-name { font-size: 22px; font-weight: 600; letter-spacing: -0.015em; }
.rg-meta { font-size: 14px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.club-head { display: flex; gap: 24px; align-items: center; }
.club-plate { flex: none; width: 104px; height: 104px; padding: 12px; background: var(--surface-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-2); display: grid; place-items: center; }
.club-crest { width: 80px; height: 80px; object-fit: contain; }
@media (max-width: 559px) { .club-plate { width: 72px; height: 72px; padding: 8px; } .club-crest { width: 56px; height: 56px; } }

/* data tables (standard tier) */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
table.data th { font-size: 13px; font-weight: 500; color: var(--text-secondary); text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border-strong); white-space: nowrap; }
table.data td, table.data tbody th { padding: 9px 12px; border-bottom: 1px solid var(--border-rule); vertical-align: middle; text-align: left; font-weight: 400; }
table.data tr:last-child td, table.data tr:last-child th { border-bottom: 1px solid var(--border-strong); }
table.data :is(th, td):first-child { padding-left: 0; }
table.data :is(th, td):last-child { padding-right: 0; }
table.data .num { text-align: right; }
table.data .strong, table.data .key { font-weight: 600; }
table.data td.strong { font-size: 17px; }
table.data td.name { min-width: 160px; overflow-wrap: anywhere; }
table.data abbr { text-decoration: none; }
@media (max-width: 650px) { table.data { font-size: 14px; } table.data td, table.data th { padding: 8px 9px; } }
@media (max-width: 520px) { table.data .opt { display: none; } }
table.bars .bar { width: 40%; }
table.bars .track { display: block; height: 6px; background: var(--border-rule); border-radius: var(--radius-1); }
table.bars .fill { display: block; height: 100%; background: var(--data); border-radius: var(--radius-1); }
table.bars .sub { display: block; font-size: 13px; color: var(--text-secondary); }
table.bars .rk { width: 2.5em; color: var(--text-secondary); text-align: right; }

/* ---------- article ---------- */
.draft-banner {
    max-width: 72ch; margin: 0 0 24px; padding: 12px 16px; border-radius: var(--radius-2);
    background: var(--state-warn-bg); color: var(--state-warn-text); font-size: 15px;
}
.article { max-width: 1000px; }
.art-head { padding-bottom: 20px; border-bottom: 1px solid var(--border-subtle); }
.art-h { margin: 0; font-size: clamp(32px, 5vw, 60px); line-height: 1.04; letter-spacing: -0.03em; max-width: 20ch; }
.art-dek { margin: 18px 0 0; max-width: 48ch; font-size: clamp(18px, 1.9vw, 22px); line-height: 1.42; font-weight: 500; color: var(--text-secondary); }
.art-dates { margin: 18px 0 0; font-size: 14px; color: var(--text-secondary); }
.art-dates a { color: var(--text-primary); text-decoration: none; font-weight: 500; }
.art-dates a:hover { color: var(--link); text-decoration: underline; }
.variant { margin: 32px 0 0; }
.v-h { margin: 0 0 10px; font-size: 14px; padding-top: 8px; border-top: 2px solid var(--text-primary); }
.v-match .plate { margin: 8px auto 0; }
.v-ctx { margin: 14px 0 0; font-size: 14px; color: var(--text-secondary); text-align: center; }
.v-match .v-ctx { text-align: center; }
.v-chart { margin-top: 28px; }
.v-official { margin: 16px 0 0; font-size: 15px; font-weight: 500; }
.chart.progression { display: block; width: 100%; height: auto; }
.pg-grid { stroke: var(--chart-grid); stroke-width: 1; vector-effect: non-scaling-stroke; }
.pg-zero { stroke: var(--text-secondary); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.pg-half { stroke: var(--border-strong); stroke-dasharray: 5 5; stroke-width: 1; vector-effect: non-scaling-stroke; }
.pg-l, .pg-side { font: 500 12px var(--font-sans); fill: var(--text-secondary); font-variant-numeric: tabular-nums; }
.pg-line { fill: none; stroke: var(--data); stroke-width: 2.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.pg-dot { stroke: var(--data); stroke-width: 2; }
.pg-home { fill: var(--data); }
.pg-away { fill: var(--surface-page); }
.prose { margin-top: 36px; max-width: 68ch; font-size: 18px; line-height: 1.62; }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 1.1em; }
.prose h2 { margin: 1.9em 0 .5em; font-size: 24px; line-height: 1.2; letter-spacing: -0.015em; }
.prose h3 { margin: 1.6em 0 .4em; font-size: 19px; line-height: 1.3; }
.prose ul, .prose ol { margin: 0 0 1.1em; padding-left: 1.3em; }
.prose li { margin: .3em 0; }
.prose blockquote { margin: 1.4em 0; padding: 2px 0 2px 20px; border-left: 1px solid var(--border-strong); font-size: 20px; line-height: 1.45; font-weight: 500; }
.prose blockquote p { margin: 0; }
.prose code { font-size: .9em; }
.prose .table-wrap { margin: 1.4em 0; font-size: 15px; }
.empty-inline { color: var(--text-secondary); }
.sources { margin-top: 48px; max-width: 68ch; font-size: 15px; }
.sources p { margin: 0 0 8px; }
.src-note { color: var(--text-secondary); font-size: 14px; }
.src-list { margin: 8px 0 0; padding: 0; list-style: none; }
.src-list li { padding: 8px 0; border-bottom: 1px solid var(--border-rule); }
.src-kind { display: block; font-size: 13px; color: var(--text-secondary); }
.art-foot { margin-top: 40px; }
.tags { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 4px 20px; border-top: 1px solid var(--border-subtle); padding-top: 10px; }
.tags a { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; font-weight: 500; color: var(--text-primary); text-decoration: none; }
.tags a:hover { color: var(--link); text-decoration: underline; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--border-subtle); background: var(--surface-page); }
.foot-in {
    max-width: calc(var(--col) + 2 * var(--gutter)); margin: 0 auto; padding: 28px var(--gutter) 40px;
    display: grid; gap: 16px; grid-template-columns: 1fr; align-items: start;
}
.foot-brand { color: var(--text-primary); }
.foot-brand .brand-logo { height: 20px; }
.foot-about { margin: 0; max-width: 66ch; font-size: 14px; color: var(--text-secondary); }
.foot-theme { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--text-secondary); }
@media (min-width: 1024px) { .foot-in { grid-template-columns: auto 1fr; column-gap: 40px; } .foot-theme { display: none; } }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
    .bar, .foot, .filters, .tabs, .staging-bar { display: none; }
    body { background: #fff; color: #000; }
}

/* digest grid: the ranked results left, the weekend's senior results as a rail */
.dg-grid { display: grid; gap: 0 40px; }
@media (min-width: 1100px) { .dg-grid { grid-template-columns: minmax(0, 1fr) 400px; gap: 0 56px; } }
.dg-side .results { border-bottom: 0; }
.dg-side .dg-more { margin-top: 0; }
.dg-side .rail-h { margin-top: 32px; }
@media (min-width: 1100px) { .dg-side .rail-h { margin-top: 22px; } }
.dg-cards { margin-top: 32px; }
@media (min-width: 700px) and (max-width: 1099px) { .dg-cards { grid-template-columns: 1fr 1fr; } }

/* timeline weights: the weeks are the spine, openings and cups lighter */
.tl-week .tl-h { font-size: 24px; letter-spacing: -0.015em; }
.tl-open .tl-h, .tl-cup .tl-h { font-size: 17px; }
.tl-later > summary { display: flex; align-items: center; min-height: 48px; cursor: pointer; font-size: 15px; font-weight: 600; color: var(--link); border-bottom: 1px solid var(--border-rule); }

/* lead without a rail: text and its visual side by side */
@media (min-width: 1024px) {
    .front:not(.has-rail) .lead.has-visual { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 56px; align-items: end; }
    .front:not(.has-rail) .lead.has-visual .lead-visual { margin-top: 0; }
}
.lead { padding-bottom: 8px; }
/* cup figures: the figure-strip grammar (DESIGN.md profile masthead) */
.cupfacts { border-top: 2px solid var(--text-primary); padding-top: 10px; }
.cupfacts-h { margin: 0; font-size: 17px; font-weight: 600; display: grid; gap: 2px; }
.cupfacts-h span { font-size: 14px; font-weight: 400; color: var(--text-secondary); }
.figstrip { margin: 18px 0 0; display: flex; flex-wrap: wrap; }
.figstrip > div { padding: 0 22px; border-left: 1px solid var(--border-subtle); min-width: 72px; }
.figstrip > div:first-child { padding-left: 0; border-left: 0; }
.figstrip dt { font-size: 13px; font-weight: 500; color: var(--text-secondary); }
.figstrip dd { margin: 2px 0 0; font-size: clamp(30px, 3.6vw, 44px); font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.05; }

@media (min-width: 1100px) {
    .dg-cards { grid-template-columns: 1fr; gap: 36px; }
    .dg-board { max-width: 600px; }
}
/* article with a related rail from 1200 px */
.art-layout { display: grid; gap: 56px; }
@media (min-width: 1200px) { .art-layout { grid-template-columns: minmax(0, 1000px) minmax(0, 300px); justify-content: space-between; } }
.art-rail { align-self: start; }
.art-rail .story-h { font-size: 17px; }

.staging-note { margin: 0 0 8px; padding: 8px 12px; border-radius: var(--radius-2); background: var(--state-info-bg); color: var(--state-info-text); font-size: 13px; }

/* article variants */
.v-stat .keyfig { margin-bottom: 24px; }
.v-stat-plate { margin: 8px 0 28px; }
.v-stat .plate { margin: 0 auto; }
.v-tournament .cupfacts { margin-bottom: 28px; }
table.path td.stage { color: var(--text-secondary); font-size: 14px; white-space: nowrap; }
table.path tr.decider td { font-weight: 600; }
table.path tr.decider td.stage { color: var(--text-primary); }
table.path abbr { text-decoration: none; }
table.path .sub, table.data .sub { display: block; font-size: 13px; font-weight: 400; color: var(--text-secondary); }
.v-classes { margin-top: 28px; }

@media (max-width: 699px) { .season-index ul { flex-wrap: wrap; min-width: 0; max-width: 100%; } }
