/* Fonts (Markus 2026-11-20): Finlandica Text for UI and body text (400 body, 600 UI) and Finlandica Headline for
   titles (700-900), by Helsinki Type Studio, self-hosted variable woff2 from Fontsource, SIL OFL 1.1 (fonts/OFL.txt).
   The game uses the same families (fonts.json). */
@font-face {
  font-family: "Finlandica Text";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/finlandica-text-latin-wght-normal.woff2) format("woff2-variations");
  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: "Finlandica Text";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/finlandica-text-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "Finlandica Headline";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/finlandica-headline-latin-wght-normal.woff2) format("woff2-variations");
  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: "Finlandica Headline";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/finlandica-headline-latin-ext-wght-normal.woff2) format("woff2-variations");
  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-matched fallbacks (perf pass 2026-11-21): a local Arial-metric face scaled to Finlandica's average width
   and line metrics (fontTools over Finnish sample text, Liberation Sans as Arial), named in the --font stacks right
   after the web font. Text laid out in the fallback keeps nearly the same lines when the web font arrives. */
@font-face {
  font-family: "Finlandica Text Fallback";
  src: local("Arial"), local("ArialMT"), local("Liberation Sans"), local("LiberationSans"), local("Arimo"), local("Helvetica");
  font-weight: 100 550;
  size-adjust: 107.1%; ascent-override: 88.7%; descent-override: 23.4%; line-gap-override: 0%;
}
@font-face {
  font-family: "Finlandica Text Fallback";
  src: local("Arial Bold"), local("Arial-BoldMT"), local("Liberation Sans Bold"), local("LiberationSans-Bold"), local("Arimo Bold"), local("Helvetica Bold");
  font-weight: 551 900;
  size-adjust: 102.3%; ascent-override: 92.8%; descent-override: 24.4%; line-gap-override: 0%;
}
@font-face {
  font-family: "Finlandica Headline Fallback";
  src: local("Arial Bold"), local("Arial-BoldMT"), local("Liberation Sans Bold"), local("LiberationSans-Bold"), local("Arimo Bold"), local("Helvetica Bold");
  font-weight: 100 900;
  size-adjust: 96.9%; ascent-override: 98%; descent-override: 25.8%; line-gap-override: 0%;
}
/* Operaatio Pullakahvi site. Palette shared with the game (docs/palette.md, Markus 2026-11-19): blacks and
   greens lead, reds for danger, coffee and bun tones for highlights. Repo design rules: AGENTS-reference.md
   item 4. Text contrast meets WCAG AAA (e2e/site.spec.js). */
/* tokens:start (generated from design/tokens.json; node ../../tools/design_tokens.mjs) */
/* Generated from design/tokens.json by tools/design_tokens.mjs. Do not edit by hand. */
:root {
  --bg: #020202;
  --bg-raised: #0a0a0a;
  --ground: #1b1b1d;
  --ground-hi: #2b2b2e;
  --panel: #0d2818;
  --deep: #04471c;
  --edge: #058c42;
  --text: #f3ecdc;
  --muted: #b9c4b0;
  --accent: #16db65;
  --accent-hover: #4fe88a;
  --on-accent: #020202;
  --bun: #e0a94a;
  --coffee: #8a5a3b;
  --danger: #bc0202;
  --danger-fill: #830000;
  --danger-text: #ff6b5e;
  --negative-fill: #3d1f1a;
  --negative-hover: #5c2b22;
  --enemy: #ff3b30;
  --ally: #3b9eff;
  --ally-cb: #3b9eff;
  --enemy-cb: #ff9f1a;
  --enemy-tritan: #ff3ba7;
  --scrim: #000000b3;
  --line: #04471c;
  --font: "Finlandica Text", "Finlandica Text Fallback", "Segoe UI", system-ui, sans-serif;
  --font-headline: "Finlandica Headline", "Finlandica Headline Fallback", "Segoe UI", system-ui, sans-serif;
  --weight-body: 400;
  --weight-ui: 600;
  --weight-title: 700;
  --weight-hero: 900;
  --radius-sm: 0.125rem;
  --radius-md: 0.1875rem;
  --radius-lg: 0.25rem;
  --radius: var(--radius-sm);
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-ms: 0.75rem;
  --space-md: 1rem;
  --space-leading: 1.25rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;
  --surface-0: var(--bg);
  --surface-1: var(--ground);
  --surface-2: var(--ground-hi);
  --surface-3: var(--panel);
  --text-small: 0.8rem;
  --text-body: 1rem;
  --text-lead: 1.25rem;
  --text-h3: 1.5rem;
  --text-h2: 2rem;
  --text-h1: 3rem;
  --leading-body: 1.7;
  --leading-heading: 1.25;
  --width-page: 64rem;
  --width-measure: 32rem;
  --width-column: 46rem;
  --width-band: 42rem;
}
/* tokens:end */
:root { color-scheme: dark; }
/* Section backdrop (design/components.md "Mesh"): see --mesh. Use the .mesh utility. */
:root {
  /* Black only (Markus 2026-11-19: the green mesh looked bad): a quiet fade between the page black and a
     slightly lifted black, no colour, no grain. */
  --mesh: linear-gradient(180deg, var(--surface-0) 0%, var(--surface-1) 100%);
}
.mesh { background-color: var(--bg); background-image: var(--mesh); }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
/* Handbook look (Markus 2026-11-20, design/components.md "Handbook patterns"): the page sits on surface level 1, the
   handbook's dark grey; header and footer are level 0, cards and callouts level 3. Body 1rem at line height 1.7, the
   type scale and the 20 px paragraph rhythm come from design/tokens.json (type_web, leading, space). */
body { margin: 0; background: var(--surface-1); color: var(--text); font: var(--weight-body) var(--text-body)/var(--leading-body) var(--font); }
p { margin: 0 0 var(--space-leading); }
a { color: var(--accent); text-underline-offset: .15em; }
a:hover { text-decoration-thickness: 2px; }
p { text-wrap: pretty; }
h1, h2, h3 { font-family: var(--font-headline); font-weight: var(--weight-title); text-wrap: balance; line-height: var(--leading-heading); }
/* Numbers that line up or change (tables, stats, timers, codes): tabular figures and the slashed zero, as in the
   game (UiTheme.numeric). */
td, th, dl.stats dd, time, code, kbd, input.code, .num { font-variant-numeric: tabular-nums slashed-zero; }
strong, b { font-weight: var(--weight-ui); }
.skip { position: absolute; left: .5rem; top: -3rem; background: var(--accent); color: var(--on-accent); padding: .5rem .8rem; border-radius: var(--radius); z-index: 5; }
.skip:focus { top: .5rem; }
/* "Read in English" for a non-Finnish browser on a Finnish page: written into the page by the Worker (src/lang.ts),
   so it is in the first layout and moves nothing later. */
.lang-hint { margin: 0; padding: .4rem 1rem; text-align: right; background: var(--panel); border-bottom: 1px solid var(--line); }
.lang-hint a { display: inline-flex; align-items: center; min-height: 44px; color: var(--text); font-weight: 600; }
.hero { position: relative; min-height: min(70vh, 40rem); display: grid; place-items: center; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* The scrim starts at 80 % black (AAA audit 2026-11-22, 1.4.6): text on the brightest frame of the hero image keeps 7:1. */
.hero::before { content: ""; position: absolute; inset: 0; z-index: 1; background-image: linear-gradient(180deg, rgb(2 2 2 / .8) 0%, rgb(2 2 2 / .84) 55%, var(--surface-1) 100%); }
.hero-text { position: relative; z-index: 2; text-align: center; padding: 3rem 1rem; }
h1 { font-size: clamp(2.2rem, 7vw, var(--text-h1)); margin: 0; font-weight: 800; }
.tag { color: var(--text); margin: .7rem 0 1.4rem; font-size: 1.15rem; }
/* Layout widths (design/tokens.json "layout", Markus 2026-11-21): main, header, footer and every wide block use the
   page width; running text keeps the reading measure (WCAG 1.4.8), so a paragraph never runs the full page. */
main { max-width: var(--width-page); margin: 0 auto; padding: 1rem 1rem 3rem; }
/* Running text only (quick audit 2026-11-21): list rows (.rows, .db-list), tables, forms and cards keep their full width. */
:is(main > p, main :is(article, section, .sect, .callout, .content, .stack) > p, main :is(ul, ol):not([class]) > li, main .lead):not(.row, .cta, .signin-button, .feature-cta):not(.clip *) { max-width: var(--width-measure); }
/* Long-form pages (legal texts, devlog posts) are one reading column at the measure, centred. */
main.legal, main.news-article { max-width: calc(var(--width-column) + 2rem); }
section { margin-top: var(--space-xl); }
h2 { font-size: clamp(1.6rem, 5vw, var(--text-h2)); margin: 0 0 var(--space-leading); font-weight: 700; }
h3 { font-size: var(--text-h3); margin: 0 0 var(--space-ms); }
/* Hairline row (design/components.md, the signature primitive): a list with a 1 px --line rule under each item.
   Servers, weapon levels, friends, dashboard lists and comments all use .rows; .blocks stacks the item content. */
.rows { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.rows > li { display: flex; justify-content: space-between; gap: .3rem 1rem; flex-wrap: wrap; padding: var(--space-ms) var(--space-xs); border-bottom: 1px solid var(--line); }
.rows.blocks > li { display: block; }
.rows .name { font-weight: var(--weight-ui); }
.rows .meta, .muted { color: var(--muted); }
.rows .meta { font-variant-numeric: tabular-nums slashed-zero; }
.muted { font-size: .95rem; }
article { padding: 1rem 0 1.2rem; border-bottom: 1px solid var(--line); }
article:first-of-type { padding-top: 0; }
article time { color: var(--bun); font-size: .95rem; }
article p { margin: .2rem 0 0; }
/* Buttons and focus follow hyllyri.fi (hyllyri/site/AGENTS.md): 1 px border, .25rem corners, weight 700,
   44 px tall (48 for the main one), 3 px focus outline with a ring of the page colour. */
button, .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; background: none; color: var(--text); border: 1px solid var(--edge); border-radius: var(--radius); padding: .55rem 1.05rem; font: var(--weight-ui) 1rem var(--font); text-decoration: none; cursor: pointer; }
button.primary, .btn.primary, button[type="submit"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); min-height: 48px; }
button:hover, .btn:hover { border-color: var(--accent); }
button.primary:hover, .btn.primary:hover, button[type="submit"]:hover { background: var(--accent-hover); }
button.secondary { background: none; color: var(--text); }
/* Focus as in the handbook (Markus 2026-11-20): a 2 px accent outline 2 px off the element, on every surface. */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin: 1rem 0 1.4rem; }
/* Form fields (design/components.md "Forms"): one look for every input, select, textarea, fieldset and checkbox row. */
input, select, textarea { min-height: 44px; background: var(--bg); color: var(--text); border: 1px solid var(--edge); border-radius: var(--radius); padding: .5rem .7rem; font: inherit; }
textarea { width: 100%; max-width: 32rem; }
/* A group of fields (Markus 2026-11-21): no frame, the legend is a one-line label above the group like every other
   field label, and each radio or checkbox is one row with its label (radio and text together, left-aligned, the
   whole row a 44 px tap target through the label). */
fieldset { border: 0; border-radius: 0; padding: 0; margin: .4rem 0 .6rem; min-width: 0; width: 100%; max-width: 34rem; display: flex; flex-direction: column; gap: .35rem; }
legend { float: left; width: 100%; padding: 0; margin: 0 0 .35rem; font-weight: var(--weight-ui); }
legend + * { clear: left; }
input:is([type="radio"], [type="checkbox"]) { flex: none; width: 1.25rem; height: 1.25rem; min-height: 0; padding: 0; margin: 0; border: 0; accent-color: var(--accent); }
fieldset p.check { margin: 0; align-items: center; gap: 0; background: var(--surface-1); border-radius: var(--radius); padding-left: .8rem; }
fieldset p.check label { flex: 1; font-weight: var(--weight-body); min-height: 44px; display: flex; align-items: center; padding: 0 .8rem 0 .6rem; margin: 0; cursor: pointer; }
fieldset p.check:has(input:checked) { outline: 2px solid var(--accent); outline-offset: -2px; }
fieldset p.check:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
fieldset p.check input:focus-visible { outline: 0; }
/* Callout (design/components.md): a solid panel box for a note, an empty state, contents, a key or a confirm step. */
/* Handbook <Tip>/<Warn>: surface 3 with a 1 px edge line; an optional leading icon (muted, the bun tone on .warn)
   puts the text in a second column. */
.callout { background: var(--surface-3); border: 1px solid var(--edge); border-radius: var(--radius-sm); padding: var(--space-sm) var(--space-md); margin: 0 0 var(--space-leading); }
.callout:has(> .icon) { display: grid; grid-template-columns: auto 1fr; column-gap: var(--space-sm); align-items: start; }
.callout:has(> .icon) > :not(.icon) { grid-column: 2; }
.callout > .icon { margin-top: .3em; color: var(--muted); }
.callout > :first-child { margin-top: 0; }
.callout > :last-child { margin-bottom: 0; }
/* Error state (public/errors.js): the same callout with the danger edge; the retry button stays secondary. */
.callout.error-state { border-color: var(--danger); display: grid; gap: var(--space-sm); justify-items: start; }
.callout.error-state > p { margin: 0; }
.callout.error-state .error-title { font-weight: var(--weight-ui); }
.callout.confirm { background: var(--bg); border-color: var(--danger); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
main > h1 { font-size: clamp(2.2rem, 7vw, var(--text-h1)); margin: var(--space-md) 0 var(--space-leading); }
.icon { width: 1.15em; height: 1.15em; vertical-align: -0.18em; flex: none; }
/* Accent marks only actions and state (docs/ui-rules.md "Accent", Markus 2026-11-19): decorative icons take the text
   colour or --muted. */
h1 .icon, h2 .icon { color: var(--muted); margin-right: .4rem; }
button .icon, .btn .icon { margin-right: .45rem; }
.rows .name .icon { color: var(--muted); margin-right: .45rem; }
.legal ul { padding-left: 1.2rem; }
.legal li { margin: .35rem 0; }
/* Tables as in the handbook: 12 px cells, a 1 px line, every second body row on surface 2. */
.table-wrap { overflow-x: auto; margin: 0 0 var(--space-leading); }
table { border-collapse: collapse; width: 100%; }
caption { text-align: left; color: var(--muted); padding-bottom: var(--space-xs); }
th, td { text-align: left; padding: var(--space-sm) var(--space-ms); border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--text); font-weight: var(--weight-title); border-bottom-color: var(--edge); }
tbody tr:nth-child(even) { background: var(--surface-2); }
footer a { color: var(--accent); }
/* Danger buttons sit on surface 0: --danger-text keeps AAA contrast there (6.2:1 on the grey ground is AA only). */
.danger { background: var(--surface-0); color: var(--danger-text); border: 1px solid var(--danger); }
.confirm .danger { background: var(--danger-fill); color: var(--text); border-color: var(--danger); }

/* Header and footer (2026-11-19): the game menu's look, dark olive bar, green coffee mark, Finlandica. */
/* Header (Markus 2026-11-20): fully see-through at the top of the page, solid black with its line once the page
   has scrolled (.scrolled from menu.js). */
header.site { background: transparent; border-bottom: 1px solid transparent; transition: background-color .2s ease, border-color .2s ease; position: sticky; top: 0; z-index: 3; }
header.site.scrolled { background: var(--surface-0); border-bottom-color: var(--line); }
/* Front page: the hero picture runs up under the see-through header, so the transparency shows. */
body:has(main.home > .hero) header.site { margin-bottom: -4.4rem; }
body:has(main.home > .hero) .hero-text { padding-top: 7.4rem; }
header.site .bar { max-width: var(--width-page); margin: 0 auto; padding: 0 1rem; }
header.site .bar { display: flex; align-items: center; justify-content: space-between; gap: .4rem 1.2rem; flex-wrap: wrap; min-height: 4.4rem; }
.brand { display: inline-flex; align-items: center; gap: .5rem; color: var(--text); font-family: var(--font-headline); font-weight: 800; font-size: 1.1rem; text-decoration: none; }
/* The logo mark (an image, the favicon): the same picture in the header and the footer. */
.brand .mark { display: block; flex: none; border-radius: var(--radius-sm); }
header.site nav { display: flex; gap: .2rem 1rem; flex-wrap: wrap; }
header.site nav a, footer.site nav a { display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; color: var(--text); text-decoration: none; font-weight: 600; }
/* Header items are handbook sidebar rows (Markus 2026-11-20): icon + label, 4 px corners, surface 3 on hover, and the
   current page in the accent with the fill icon on surface 3 (state, not a link colour). */
header.site nav a { padding: 0 var(--space-ms); border-radius: var(--radius-lg); }
header.site nav a:hover { background: var(--surface-3); }
footer.site nav a:hover { color: var(--accent); }
header.site nav a[aria-current="page"] { color: var(--accent); background: var(--surface-3); }
footer.site { text-align: left; margin-top: 3rem; padding: 2rem 0 2.4rem; background: var(--surface-0); border-top: 1px solid var(--line); }
footer.site nav { display: flex; flex-direction: column; }
footer.site .note { max-width: var(--width-page); margin: 1rem auto 0; padding: 0 1rem; color: var(--muted); }
.page { padding-top: 1.6rem; }
/* No decorative bar under the hero title (Markus 2026-11-21, menu polish): the uppercase heavy title stands alone. */
/* The game name in full capitals like the main menu (Markus 2026-11-22). CSS only: the text, title, SEO and screen
   readers keep "Operaatio Pullakahvi"; data-design-allow on the h1 exempts it from the no-uppercase rule. */
.hero h1 { text-transform: uppercase; }
main.home { max-width: none; padding: 0; }
main.home .content { margin: 0 auto; padding: 1rem 1rem 1rem; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lead { font-size: 1.2rem; }
/* A live summary filled by script keeps its line while empty, so the page below does not jump (CLS, perf pass 2026-11-21). */
.lead[aria-live]:empty { min-height: 1lh; }

/* Marketing rows (media/features.json): screenshot and text side by side, alternating; stacked when narrow. */
.feature { display: grid; gap: .8rem 1.6rem; align-items: center; padding: 1.4rem 0; border-bottom: 1px solid var(--line); }
.feature img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.feature h3 { margin-top: 0; }
main.home .content { max-width: var(--width-page); }
main.home .content > section:not(#game) { max-width: var(--width-column); margin-left: auto; margin-right: auto; }
main.home #game > h2, main.home #game > .lead, main.home #game > .muted { max-width: var(--width-measure); margin-left: auto; margin-right: auto; }
@media (min-width: 48rem) {
  .feature { grid-template-columns: 1.15fr 1fr; }
  .feature.flip img { order: 2; }
}

/* Footer language list */
.lang-switch { display: flex; align-items: center; gap: .3rem 1rem; max-width: var(--width-page); margin: 1.2rem auto 0; padding: 0 1rem; }
.lang-switch .icon { color: var(--muted); }
.lang-switch a { display: inline-flex; align-items: center; min-height: 44px; color: var(--text); font-weight: 600; }
.lang-switch a[aria-current] { color: var(--accent); text-decoration-thickness: 2px; }
.lang-switch a:not([aria-current]) { text-decoration: none; }

/* Profile */
.profile section { margin-top: 2.2rem; }
.who { display: flex; align-items: center; gap: 1rem; margin-top: .4rem; }
.who h1 { margin: 0; font-size: 2.1rem; }
.who p { margin: .2rem 0 0; }
.avatar { width: 4rem; height: 4rem; color: var(--muted); vertical-align: middle; }
dl.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: 0; margin: 0; border-top: 1px solid var(--line); }
dl.stats > div { padding: .7rem .2rem; border-bottom: 1px solid var(--line); }
dl.stats dt { color: var(--muted); font-size: .95rem; }
dl.stats dd { margin: .1rem 0 0; font-size: 1.35rem; font-weight: var(--weight-ui); font-variant-numeric: tabular-nums slashed-zero; }
ul.checks { list-style: none; padding: 0; margin: .4rem 0 1.4rem; }
ul.checks li { display: flex; gap: .6rem; align-items: center; padding: .35rem 0; }
ul.checks .icon { color: var(--muted); }
input.code { font-size: 1.4rem; letter-spacing: .02em; text-transform: uppercase; width: 9ch; font-weight: var(--weight-ui); }

/* Clips (media/features.json "clips"): plain video with controls, no autoplay, poster first. */
.clips { padding: 1.4rem 0; border-bottom: 1px solid var(--line); }
.clips h3 { margin-top: 0; }
.clip-row { display: grid; gap: 1.2rem; }
@media (min-width: 48rem) { .clip-row { grid-template-columns: 1fr 1fr; } }
.clip { margin: 0; }
.clip video { width: 100%; height: auto; display: block; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.clip figcaption { margin-top: .5rem; color: var(--muted); }
.clip figcaption strong { color: var(--text); margin-right: .3rem; }

/* Landing page (2026-11-19): gameplay hero with two calls to action and the live player line, one closing band. */
.cta { display: flex; gap: .7rem; justify-content: center; flex-wrap: wrap; margin: 0 0 1rem; }
.hero .btn:not(.primary) { background: var(--panel); }
.more { display: inline-flex; align-items: center; min-height: 44px; font-weight: var(--weight-ui); }
.band { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 3rem; }
.band-in { max-width: var(--width-band); margin: 0 auto; padding: 2.2rem 1rem; text-align: center; }
.band h2 { margin-top: 0; }
footer.site { margin-top: 0; }
main.page + footer.site, main:not(.home) ~ footer.site { margin-top: 3rem; }
.news-page article { padding: 1.2rem 0; }
.news-page h2 { font-size: 1.35rem; margin: .1rem 0 .4rem; }
article h2 a, article h3 a { color: var(--text); text-decoration-color: var(--accent); text-underline-offset: .2em; }
article h2 a:hover, article h3 a:hover { color: var(--accent); }
.news-article time { color: var(--bun); display: block; margin-top: .6rem; }
.news-article h1 { margin: .2rem 0 1rem; font-size: 2.1rem; }
/* News pictures (Markus 2026-11-20): our own game screenshots. A cover beside each list item (above it on a phone),
   under the post title, and inline figures with a caption. Hairline frame like the feature pictures, no shadow. */
.news-item { display: grid; gap: .8rem 1.2rem; align-items: start; }
.news-thumb, .news-cover img, .news-figure img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--panel); }
.news-text > .news-meta:first-child { margin-top: 0; }
@media (min-width: 48rem) { .news-item { grid-template-columns: 14rem 1fr; } }
.news-cover, .news-figure { margin: 0 0 1.2rem; }
.news-figure { margin-top: 1.2rem; }
.news-figure figcaption { margin-top: .5rem; color: var(--muted); }

/* Mobile menu (Markus 2026-11-19): below 48rem the menu folds behind a button in the top right.
   Without JavaScript (no .js-menu) the menu stays open as before. */
.menu-button { display: none; gap: .4rem; }
.menu-button .icon { color: currentColor; width: 1.4em; height: 1.4em; }
@media (max-width: 47.99rem) {
  header.site .bar { flex-wrap: nowrap; }
  .js-menu .menu-button { display: inline-flex; margin-left: auto; min-height: 44px; padding: .4rem .7rem; }
  .js-menu header.site nav { display: none; }
  .js-menu header.site nav.open { display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--surface-0); border-bottom: 1px solid var(--line); padding: .4rem 1rem 1rem; gap: var(--space-xs); }
  .js-menu header.site nav.open a { min-height: 48px; }
  header.site { position: sticky; }
  header.site .bar { position: relative; }
  .brand { font-size: 1rem; }
}

/* The same fold without waiting for menu.js (SEO pass 2026-11-21): (scripting: enabled) matches before any script
   runs, so the phone header has its final height at first paint (the .js-menu rules above shifted the whole page,
   CLS 0.1-0.25 on mobile Lighthouse). Older browsers without the media feature keep the .js-menu rules. */
@media (max-width: 47.99rem) and (scripting: enabled) {
  .menu-button { display: inline-flex; margin-left: auto; min-height: 44px; padding: .4rem .7rem; }
  header.site nav { display: none; }
  header.site nav.open { display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--surface-0); border-bottom: 1px solid var(--line); padding: .4rem 1rem 1rem; gap: var(--space-xs); }
  header.site nav.open a { min-height: 48px; }
}
section[id], [id="main"] { scroll-margin-top: 4.5rem; }

/* Leaderboard tabs and the visibility check (2026-11-19). */
.tabs { display: flex; gap: .5rem; flex-wrap: wrap; margin: .4rem 0 1rem; }
.tab[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
p.check { display: flex; gap: .6rem; align-items: flex-start; }
p.check input { width: 1.25rem; height: 1.25rem; min-height: 0; margin-top: .15rem; accent-color: var(--accent); }
td a { color: var(--text); font-weight: 600; }

/* Alpha chip (Markus 2026-11-19): beside the name in the header and first in the hero meta row under the
   buttons; small corners like hyllyri.fi. Never directly above a heading (e2e designChecks label-above-heading). */
.chip { display: inline-flex; align-items: center; margin: 0 .3rem 0 0; padding: .05rem .45rem; border: 1px solid var(--bun); border-radius: var(--radius);
  color: var(--bun); font-size: .85rem; font-weight: var(--weight-ui); line-height: 1.5; }
/* Alpha-first hero (Markus 2026-11-19): title, tagline, one-line pitch, two buttons, then a short status row
   (Markus 2026-11-20): a list of the alpha chip, the platforms, the Steam teaser and the live status, split by
   1 px lines; on a phone the items stack centred. Icons stay in the text colour (no accent on decoration); the
   status dot is accent only while a server is up. */
.pitch { max-width: 36rem; margin: 0 auto 1.2rem; color: var(--text); font-size: 1.1rem; }
.hero-meta { display: flex; flex-wrap: wrap; align-items: stretch; justify-content: center; gap: .4rem 0; margin: 0; padding: 0;
  list-style: none; font-size: .95rem; color: var(--text); }
.hero-meta li { display: inline-flex; align-items: center; gap: .4rem; padding: 0 var(--space-ms); font-weight: 600; }
.hero-meta li + li { border-left: 1px solid var(--line); }
.hero-meta li[hidden] { display: none; }
/* The live status row keeps its place (invisible, out of the tab order) until app.js writes the sentence, so the
   hero does not grow and move when the lobby answers (CLS, perf pass 2026-11-21). */
.hero-status:has(#hero-live:empty) { visibility: hidden; }
.hero-meta .chip { margin: 0; }
.hero-meta .icon { color: currentColor; width: 1.3em; height: 1.3em; }
.hero-meta a { display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; color: var(--text); text-decoration: none; }
.hero-meta a:hover, .hero-meta a:focus-visible { text-decoration: underline; }
.hero-dot { width: .6rem; height: .6rem; border-radius: 50%; background: var(--muted); flex: none; }
.hero-dot.on { background: var(--accent); }
@media (max-width: 40rem) {
  .hero-meta { flex-direction: column; align-items: center; gap: .5rem; }
  .hero-meta li + li { border-left: 0; }
}

/* Valve's own "Sign in through Steam" button (steamcommunity.com/dev asks sites to use it), served from
   our address; the link keeps a 44 px touch target. Steam avatars: opt-in, served through /api/avatar. */
.steam-signin { display: inline-flex; align-items: center; min-height: 48px; padding: 6px 0; }
.steam-signin img { display: block; }
.avatar-img { width: 4rem; height: 4rem; border-radius: var(--radius); border: 1px solid var(--line); }
.avatar-sm { width: 1.5rem; height: 1.5rem; border-radius: var(--radius); vertical-align: middle; margin-right: .45rem; }

/* Hide-on-scroll header and the icon-only brand (2026-11-19). */
header.site { transition: transform .22s ease, background-color .2s ease, border-color .2s ease; }
header.site.tucked { transform: translateY(-100%); }
@media (prefers-reduced-motion: reduce) { header.site { transition: none; } }
header.site .brand { min-height: 44px; }
.brand-wrap { display: inline-flex; align-items: center; }
header.site .brand { min-width: 44px; justify-content: center; }

/* Page furniture (2026-11-19): breadcrumbs, linked section headings, contents list, article navigation. */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .2rem .5rem; padding: 0; margin: 0 0 1rem; color: var(--muted); font-size: .95rem; }
.crumbs li { display: inline-flex; align-items: center; }
.crumbs li + li::before { content: "/"; margin-right: .5rem; color: var(--edge); }
.crumbs a { color: var(--muted); display: inline-flex; min-height: 44px; align-items: center; }
.crumbs a:hover { color: var(--accent); }
/* Current crumb as in the handbook: text colour on surface 3, not the accent. */
.crumbs [aria-current] { color: var(--text); display: inline-flex; align-self: center; padding: var(--space-xs) var(--space-sm); background: var(--surface-3); border-radius: var(--radius-sm); }
h2 .h-link { color: var(--text); text-decoration: none; }
h2 .h-link:hover, h2 .h-link:focus-visible { color: var(--accent); text-decoration: underline; text-underline-offset: .2em; }
h2 .h-link .arrow { color: var(--accent); }
.toc { margin-bottom: 1.6rem; }
.toc .toc-h { font-size: 1.15rem; margin: 0 0 .4rem; }
.toc ol { margin: 0; padding-left: 1.3rem; columns: 2 14rem; }
.toc li { margin: .15rem 0; }
.article-nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem; border-top: 1px solid var(--line); margin-top: 2rem; padding-top: .8rem; }

.steps { padding-left: 1.4rem; margin: 0 0 1.4rem; }
.steps li { margin: .4rem 0; padding-left: .3rem; }
.steps li::marker { color: var(--muted); font-weight: var(--weight-ui); }
.empty p:first-child { font-weight: var(--weight-ui); }
.news-meta { display: flex; align-items: center; gap: .6rem; margin: 0 0 .2rem; }
.news-meta .chip.kind { margin: 0; }

/* Cards and settings groups (2026-11-19, design/components.md "Card"): panel fill, a 1 px edge, no stripes.
   Danger zone sits on the page colour so the red text keeps AAA contrast (--danger-text is for --bg only). */
.chip.dev { background: var(--bun); color: var(--bg); }
.warn { color: var(--bun); }
.consent { max-width: 36rem; }
.consent h2 { margin-top: 0; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 1.1rem 1.2rem; }
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.card h3 { font-size: 1.2rem; margin: 0 0 .6rem; }
.cards { display: grid; gap: 1rem; align-items: start; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.cards > .card:first-child { grid-column: 1 / -1; }
#testaajat .cards > .card { margin: 0; }
.profile .cards > .card { margin-top: 0; }
.card.danger-zone { background: var(--bg); border-color: var(--danger); margin-top: 2.6rem; }
.card.danger-zone h2 .icon { color: var(--danger-text); }
.danger-zone .confirm { border: 0; padding: 0; margin-top: .4rem; }
form.stack { display: flex; flex-direction: column; align-items: flex-start; gap: .45rem; }
form.stack input:not([type="radio"], [type="checkbox"]) { width: 100%; max-width: 22rem; }
form.stack .row { margin: .3rem 0 0; }
form.stack p { margin: 0; }
.ts-box { min-height: 0; margin: .4rem 0; }

/* Profile card and the signed-out sign-in card. */
.who-card .who { margin-top: 0; }
.who-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: .9rem 0 0; }
.who-chips .chip { margin: 0; }
.who-chips .chip:empty { display: none; }
.who-card .row { margin: .9rem 0 0; }
.signin { display: grid; place-items: center; margin-top: 1rem; }
.signin-card { width: 100%; max-width: 32rem; padding: 1.6rem 1.4rem; }
.signin-card h1 { font-size: 2rem; margin: 0 0 .6rem; }
.signin-card h2 { font-size: 1.2rem; margin: 1.2rem 0 .3rem; }
.signin-card .lead { margin: 0 0 .6rem; }
.signin-button { margin: .4rem 0; }
.signin-card ul.checks { margin-bottom: 1rem; }
.signin-card ul.checks li { align-items: flex-start; }
.signin-card ul.checks .icon { margin-top: .25em; }
#out-msg:empty, #acc-msg:empty { display: none; }

/* Header profile link: the player's opt-in Steam picture takes the icon's place at the icon's size. */
.nav-avatar { width: 1.15em; height: 1.15em; border-radius: var(--radius-sm); object-fit: cover; flex: none; }

/* Skeleton loaders (2026-11-19): placeholders the size of the real content while a region loads (the region
   has aria-busy="true"; the skeleton is aria-hidden). Palette tokens only; a still block for reduced motion. */
.skel { display: block; border-radius: var(--radius-sm); background-color: var(--panel); background-clip: content-box; }
.skel-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); border-top: 1px solid var(--line); margin: 0; }
.skel-tiles > div { padding: .7rem .2rem; border-bottom: 1px solid var(--line); }
.sk-dt { height: 1.52rem; width: 60%; padding-block: .35rem; }
.sk-dd { height: 2.16rem; width: 45%; padding-block: .4rem; margin-top: .1rem; }
.skel-rows { border-top: 1px solid var(--line); margin: .6rem 0 1rem; }
.sk-row { height: 3.2rem; padding-block: 1rem; border-bottom: 1px solid var(--line); border-radius: 0; }
/* /palvelimet placeholders sized like one server row and one health card, so the page does not jump when they
   arrive (CLS 0.2 on mobile before, perf pass 2026-11-21). */
#live-region .sk-row { height: 4.2rem; }
#health-region .sk-row { height: 24.5rem; }
@media (min-width: 48rem) { #live-region .sk-row { height: 3.3rem; } #health-region .sk-row { height: 20.5rem; } }
.skel-who { display: flex; align-items: center; gap: 1rem; margin: .4rem 0 2rem; }
.sk-avatar { width: 4rem; height: 4rem; }
.sk-col { flex: 1; }
.sk-h1 { height: 2.6rem; width: 50%; padding-block: .3rem; }
.sk-line { height: 1.5rem; width: 70%; padding-block: .35rem; margin-top: .2rem; }
@media (prefers-reduced-motion: no-preference) {
  /* Solid colours only (Transparency rule, black-only gradients, Markus 2026-11-19): a slow colour pulse. */
  .skel { animation: skel-pulse 1.4s ease-in-out infinite alternate; }
  @keyframes skel-pulse { from { background-color: var(--panel); } to { background-color: var(--deep); } }
}
[aria-busy="false"] > .skel-wrap { display: none; }
/* An empty list waits out of the layout while its skeleton shows, so filling it swaps one box for the other
   instead of sliding the list up from under the skeleton (CLS, perf pass 2026-11-21). */
[aria-busy="true"] > .rows:empty { display: none; }
.table-wrap th, .table-wrap td { white-space: nowrap; }
/* Profile while loading: the sign-in card keeps its place (invisible) under the skeleton, so a signed-out
   visitor sees no layout shift; a signed-in one gets the profile in its place. */
#profile-region { position: relative; }
#profile-region[aria-busy="true"] > #out { visibility: hidden; }
#profile-region > .skel-overlay { position: absolute; inset: 0 0 auto 0; }

/* Download page (/lataa, closed alpha 2026-11-19): the closed alpha note or the per-platform placeholder. */
.dl-card { max-width: 40rem; padding: 1.6rem 1.4rem; }
.dl-card h2 { margin-top: 0; }
.dl-card code { overflow-wrap: anywhere; }
.dl-platforms > .card:first-child { grid-column: auto; }
.dl-platforms .card h2 { margin-top: 0; }
/* Alpha sign-up (2026-11-19): the form on /lataa, platform radios in a fieldset, the withdraw step. */
.dl-card h3 { margin-top: 1.4rem; }
.apply-form fieldset { max-width: 32rem; }
.apply-form fieldset p.check { max-width: 22rem; }
.apply-form > label { font-weight: 600; margin-top: .4rem; }
.apply-form .muted { max-width: 36rem; }
.withdraw { max-width: 40rem; margin-top: 1.4rem; }
.withdraw .confirm { margin-top: .6rem; }
.withdraw .confirm p { margin: 0 0 .4rem; }

/* Dashboard (/dashboard) and community servers (/oma-palvelin), Markus 2026-11-19. */
.dashboard section { margin-top: 2.2rem; }
/* Section nav (Markus 2026-11-21): first on the dashboard (.db-*), then as the generic component (.sect-*,
   public/sections.js) on /profile, the player page, /lataa and /oma-palvelin. Grouped sidebar on wide screens, one
   part at a time by #hash; phone: a top bar whose menu button opens the list. .sect-toc keeps every part visible. */
.db-nav ul, .sect-nav ul { list-style: none; padding: 0; margin: 0 0 var(--space-sm); }
.db-nav a, .sect-nav a { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); min-height: 44px; padding: 0 var(--space-sm); border-radius: var(--radius-sm); }
.db-nav a[aria-current="page"], .sect-nav a[aria-current] { background: var(--surface-2); font-weight: var(--weight-ui); text-decoration: none; }
.db-nav-h { margin: var(--space-sm) 0 var(--space-xs); font-size: var(--text-small); font-weight: var(--weight-ui); color: var(--muted); }
.db-badge, .sect-badge { min-width: 1.6rem; padding: 0 .4rem; border-radius: var(--radius-sm); background: var(--danger-fill); color: var(--text); font-size: var(--text-small); text-align: center; }
.db-menu, .sect-menu { width: 100%; justify-content: space-between; }
.db-layout > section, .sect-layout > .sect > section:first-child { margin-top: 0; }
.db-nav, .sect-nav { border-bottom: 1px solid var(--line); padding-bottom: var(--space-sm); margin-bottom: var(--space-md); }
@media (max-width: 59.99rem) { .db-nav .db-menu[aria-expanded="false"] + #db-nav-list, .sect-menu[aria-expanded="false"] + .sect-nav-list { display: none; } }
@media (min-width: 60rem) {
  .db-layout, .sect-layout { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: var(--space-lg); align-items: start; }
  .db-layout > *, .sect-layout > * { grid-column: 2; grid-row: 1; }
  .sect-toc > *, .sect-layout[data-sections="toc"] > * { grid-row: auto; }  /* the toc layout before sections.js too (CLS) */
  .db-layout > .db-nav, .sect-layout > .sect-nav { grid-column: 1; position: sticky; top: var(--space-md); border-bottom: 0; border-right: 1px solid var(--line); padding: 0 var(--space-sm) 0 0; margin: 0; }
  /* Not sticky: the sticky site header would cover its top links on long parts (axe target-size). */
  .sect-layout > .sect-nav { position: static; }
  .sect-toc > .sect-nav, .sect-layout[data-sections="toc"] > .sect-nav { grid-row: 1 / span 20; }
  .db-menu, .sect-menu { display: none; }
}
.attn { padding-left: var(--space-leading); }
.attn li { margin: var(--space-xs) 0; }
/* A part opened by #hash scrolls clear of the sticky site header, so the nav and heading stay uncovered. */
/* Before sections.js runs, a one-part layout shows only its first part (the script then adds .sect-on and takes
   over), so the later parts do not paint and vanish again: no layout shift (Lighthouse CLS, 2026-11-21). */
@media (scripting: enabled) { html:not(.sect-all) .sect-layout:not(.sect-on, [data-sections="toc"]) > .sect ~ .sect { display: none; } }
.sect-layout { scroll-margin-top: calc(var(--space-xl) * 2.5); }
.sect, .sect h2, .sect h3 { scroll-margin-top: calc(var(--space-xl) * 2.5); }
/* Tabs variant (player page): a wrapping row of links at every width, no menu button and no sidebar. */
.sect-layout.sect-tabs { display: block; }
.sect-tabs > .sect-nav { position: static; border-right: 0; border-bottom: 1px solid var(--line); padding: 0 0 var(--space-sm); margin: 0 0 var(--space-md); }
.sect-tabs .sect-nav ul { display: flex; flex-wrap: wrap; gap: var(--space-xs); margin: 0; }
.sect-tabs .sect-menu { display: none; }
.sect-tabs .sect-menu[aria-expanded="false"] + .sect-nav-list { display: block; }
.db-list li h3 { margin: 0 0 .3rem; }
.db-list li p { margin: .2rem 0; overflow-wrap: anywhere; }
.db-list .row { margin: .6rem 0 .2rem; }
.db-form input:not([type="radio"], [type="checkbox"]), .db-form select { width: 100%; max-width: 22rem; }
.host .dl-card input:not([type="radio"], [type="checkbox"]) { width: 100%; max-width: 22rem; }
.key-box p { margin: .3rem 0; }
.key-box code, .code-wrap code { overflow-wrap: anywhere; font-size: .95rem; }
/* Code as in the handbook: blocks on surface 3 with 16 px padding, inline code on surface 2. */
.code-wrap pre { margin: 0; padding: var(--space-md); background: var(--surface-3); border-radius: var(--radius-sm); }
:not(pre) > code { background: var(--surface-2); padding: .1em .35em; border-radius: var(--radius-sm); font-size: .92em; }
kbd { background: var(--surface-0); border: 1px solid var(--edge); border-bottom-width: 2px; border-radius: var(--radius-sm); color: var(--text); font: inherit; font-size: .9em; padding: 0 .4em; white-space: nowrap; }

/* Header Home link and current items (Markus 2026-11-19): the current page's icon is the fill weight. */
header.site nav a[aria-current="page"] .icon { color: var(--accent); }

/* Dashboard header on the green mesh. */
.db-head { margin: 0 0 1.4rem; padding: 1.2rem 1rem 1rem; border-radius: var(--radius-md); border: 1px solid var(--line); }
.db-head h1 { margin: 0 0 .6rem; font-size: 2.1rem; }
.db-head .lead { margin: 0; }
.db-head .signin-button { margin: .6rem 0 0; }

/* Server health chips on /palvelimet: a fill icon and a text label, never colour alone. */
.chip.state { gap: .3rem; margin-left: .4rem; background: var(--bg); }
.chip.state .icon { width: 1.05em; height: 1.05em; }
.chip.state.online { color: var(--accent); border-color: var(--accent); }
.chip.state.stale { color: var(--bun); border-color: var(--bun); }
.chip.state.offline { color: var(--danger-text); border-color: var(--danger); }
/* The front page "Closed alpha" chip (Markus 2026-11-20): a state, in the danger red (#ff6b5e on the dark chip
   fill is AAA). */
.chip.state.closed { color: var(--danger-text); border-color: var(--danger-text); }
.hero-meta .chip.state { margin: 0; }
.servers.health .name { display: inline-flex; align-items: center; flex-wrap: wrap; gap: .2rem; }
.tabs .tab .icon { margin-right: .4rem; }

/* Player history chart: an SVG line on a fixed-ratio plot, labels in HTML so they keep their size on phones. */
.chart { margin: .6rem 0 .4rem; }
.chart-body { display: grid; grid-template-columns: auto 1fr; gap: .5rem; }
.chart-y { display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; color: var(--muted); font-size: .9rem;
  font-variant-numeric: tabular-nums slashed-zero; line-height: 1; padding-block: 0; }
.chart-svg { display: block; width: 100%; height: 12rem; background: var(--panel); border-radius: var(--radius-sm); }
.chart-svg .grid { stroke: var(--line); stroke-width: 1; }
.chart-svg .axis { stroke: var(--edge); stroke-width: 1; }
.chart-svg .line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; }
.chart-svg .area { fill: var(--deep); stroke: none; }
.chart-x { display: flex; justify-content: space-between; color: var(--muted); font-size: .9rem; margin: .3rem 0 0 2.2rem; font-variant-numeric: tabular-nums slashed-zero; }
.chart figcaption { margin-top: .5rem; color: var(--text); }
.chart-table summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: var(--weight-ui); color: var(--accent); }
.chart-table th[scope="row"] { font-weight: 600; }
@media (prefers-reduced-motion: no-preference) { .chart-svg .line, .chart-svg .area { transition: d .2s ease; } }

/* Public profile (Markus 2026-11-19): the edit form on /profile and the "About the player" section on /pelaaja. */
.cards > .card.wide { grid-column: 1 / -1; }
.pf-form label { font-weight: 600; display: inline-flex; align-items: center; gap: .4rem; }
.pf-form label .icon { color: var(--muted); }
.pf-grid { display: grid; gap: .6rem 1rem; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); width: 100%; }
.pf-grid p { display: flex; flex-direction: column; gap: .3rem; margin: 0; }
.pf-grid select { width: 100%; }
.pf-form fieldset input[type="url"] { width: 100%; }
#pf-bio-count { margin: 0; }
.bio { font-size: 1.1rem; overflow-wrap: anywhere; max-width: 36rem; }
dl.facts { display: flex; flex-wrap: wrap; gap: .4rem 2rem; margin: .6rem 0; }
dl.facts dt { color: var(--muted); font-size: .95rem; display: inline-flex; align-items: center; gap: .35rem; }
dl.facts dt .icon { color: var(--muted); }
dl.facts dd { margin: .1rem 0 0; font-weight: var(--weight-ui); }
.pl-links { list-style: none; padding: 0; margin: .6rem 0 0; display: flex; flex-wrap: wrap; gap: .2rem 1.4rem; }
.pl-links a { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; overflow-wrap: anywhere; }

/* Footer (2026-11-19): brand column and three link groups, then language and credit on one row. */
.foot-grid, .foot-bottom { max-width: var(--width-page); margin-left: auto; margin-right: auto; padding-left: 1rem; padding-right: 1rem; box-sizing: border-box; }
.foot-bottom { margin-top: var(--space-lg); }
.foot-grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: var(--space-lg); }
.foot-col { display: flex; flex-direction: column; gap: var(--space-sm); }
.foot-h { margin: 0 0 var(--space-xs); color: var(--muted); font-weight: 600; }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-md);
  padding-top: var(--space-md); border-top: 1px solid var(--deep); }
.foot-bottom p { margin: 0; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }
@media (max-width: 420px) { .foot-grid { grid-template-columns: 1fr; } }

/* Comments (Markus 2026-11-19, public/comments.js): plain list on the page colour, one line between comments. */
/* Devlog reactions (Markus 2026-11-21, design/components.md "Reactions"): toggle buttons like .tab, the chosen one in
   the accent with the fill icon; signed out the same chips as plain text. */
.reactions { margin-top: var(--space-xl); }
.rx-list { display: flex; flex-wrap: wrap; gap: var(--space-sm); list-style: none; margin: 0 0 var(--space-ms); padding: 0; }
.rx-btn { display: inline-flex; align-items: center; gap: var(--space-sm); }
.rx-btn[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.rx-static { min-height: 44px; padding: 0 var(--space-ms); border-radius: var(--radius-md); background: var(--surface-2); }
.rx-count { font-weight: var(--weight-ui); }
.comments { margin-top: 2.5rem; }
.cmt-list { margin-bottom: 1.2rem; }
/* Overhaul 2026-11-21 (design/components.md "Comment"): avatar and name on one line, replies indented one level
   with a hairline, the counter under the box. */
.cmt-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm); margin: 0 0 var(--space-xs); }
.cmt-head > .icon { width: 2rem; height: 2rem; color: var(--muted); }
.cmt-avatar { width: 2rem; height: 2rem; border-radius: var(--radius-lg); }
.cmt-replies { margin: var(--space-ms) 0 0 var(--space-lg); padding-left: var(--space-md); border-left: 1px solid var(--line); }
.cmt-count { margin: 0; font-variant-numeric: tabular-nums slashed-zero; }
.cmt-actions .btn .icon { margin-right: var(--space-xs); }
.cmt-text { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.cmt-actions { margin: .4rem 0 0; }
.cmt .report summary { cursor: pointer; margin-top: .4rem; }
.cmt-form textarea { width: 100%; }
/* Map and mode pages (media/game-pages.json). */
.game-pic { width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius-md); margin: .4rem 0 1rem; }
.game-page dl.facts { margin: 1rem 0; }
/* Card links (handbook <CardLinks>, Markus 2026-11-20): a grid of linked cards, each a muted icon, a bold title and
   one muted line, on surface 3 with a 1 px line. The current page is state: accent title and the fill icon. */
.card-links { list-style: none; padding: 0; margin: 0 0 var(--space-leading); display: grid; gap: var(--space-sm);
  grid-template-columns: repeat(auto-fill, minmax(min(16rem, 100%), 1fr)); }
.card-link { display: grid; grid-template-columns: auto 1fr; column-gap: var(--space-sm); align-items: start; align-content: start; height: 100%; min-height: 44px;
  padding: var(--space-sm) var(--space-md); background: var(--surface-3); border: 1px solid var(--line); border-radius: var(--radius-sm);
  color: var(--text); text-decoration: none; }
.card-link > .icon { margin-top: .3em; color: var(--muted); }
.card-link-title { font-weight: var(--weight-title); }
.card-link-text { grid-column: 2; color: var(--muted); font-size: .95rem; }
a.card-link:hover .card-link-title { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .15em; }
.card-link[aria-current] .card-link-title, .card-link[aria-current] > .icon { color: var(--accent); }
/* Long Finnish compounds (Saavutettavuusseloste) wrap on a phone instead of widening the page. */
h1, h2, .crumbs li, .foot-col a { overflow-wrap: anywhere; hyphens: auto; }

/* Friends on /profile (Markus 2026-11-20): hairline-ruled rows; name links to /pelaaja, status chip, row actions. */
.friends > li { align-items: center; }
.friends .who { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; }
.friends .acts { display: flex; flex-wrap: wrap; gap: .5rem; }
.fr-form input:not([type="radio"], [type="checkbox"]) { max-width: 32rem; }

/* Signed in: no Steam sign-in buttons anywhere (Markus 2026-11-21, public/session.js sets data-session). */
html[data-session="in"] .signin-button { display: none; }
/* No flash of the sign-in button for a signed-in visitor (quick audit 2026-11-21 site part 4 item 7): a one-line head
   script marks the page "pending" until /api/me answers (session.js sets in/out/steam). Without JavaScript nothing is
   pending and the button shows. If the answer never comes, the button appears after 3 s anyway. */
html[data-session="pending"] .signin-button { visibility: hidden; animation: pk-reveal 0s 3s forwards; }
@keyframes pk-reveal { to { visibility: visible; } }
/* Closed-alpha gate (public/alpha-gate.js): what the feature is, that it opens for testers, the status and a link. */
.alpha-gate > p { margin: 0 0 var(--space-xs, .4rem); }
.alpha-gate > p:last-child { margin-bottom: 0; }
/* Official server key dialog (public/officialkeys.js): the server.env is shown once, wrapped, never cut off. */
#ok-dialog { max-width: min(46rem, calc(100vw - 2rem)); background: var(--surface-2); color: var(--text); border: 1px solid var(--edge); border-radius: var(--radius); padding: var(--space-md, 1rem); }
#ok-dialog::backdrop { background: var(--scrim); }
#ok-env { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--surface-3); padding: var(--space-md, 1rem); border-radius: var(--radius-sm); }

/* Card polish (Markus 2026-11-21, same treatment as the game main menu): pictures sit a little darker so the page is
   calm; a linked card or news item stands out on hover and keyboard focus (slight scale, brighter, edge line), the
   others stay as they are. Reduced motion: no scale, only the brightness and the outline. */
.feature img, .news-thumb { filter: brightness(.86); }
.news-item { border-radius: var(--radius-md); }
a.card-link:focus-visible, .news-item:has(a:focus-visible) { filter: brightness(1.12); border-color: var(--edge); }
/* One focus ring on a news item: the item's outline replaces the link's own ring. */
.news-item:has(a:focus-visible) { outline: 2px solid var(--accent); outline-offset: 4px; }
.news-item a:focus-visible { outline: 0; }
.news-item:has(a:focus-visible) .news-thumb { filter: none; }
/* Hover only on devices that hover (touch would leave a card stuck scaled). */
@media (hover: hover) {
  a.card-link:hover, .news-item:has(a:hover) { filter: brightness(1.12); border-color: var(--edge); }
  .news-item:has(a:hover) .news-thumb { filter: none; }
}
/* Motion only for people who have not asked for less: the scale and its transition. */
@media (prefers-reduced-motion: no-preference) {
  a.card-link, .news-item { transition: transform .15s ease, filter .15s ease, border-color .15s ease; }
  a.card-link:focus-visible, .news-item:has(a:focus-visible) { transform: scale(1.03); }
}
@media (prefers-reduced-motion: no-preference) and (hover: hover) {
  a.card-link:hover, .news-item:has(a:hover) { transform: scale(1.03); }
}
/* Status row in the hero: even spacing, one hairline separator between items, nothing clipped. An item keeps to one
   line only from 40rem up; narrower (320 px, 200 % text, text spacing) it may wrap (day audit 2026-11-21, WCAG
   1.4.10 and 1.4.12). The padding lives in the rule above. */
@media (min-width: 40rem) { .hero-meta li { white-space: nowrap; } }

/* WCAG AAA (audit 2026-11-22, docs/audits/2026-11-22-wcag-aaa.md). 1.4.8: every paragraph and description keeps the
   reading measure (at most 80 characters a line, e2e/aaa-checks.js lineLength); centred ones stay centred.
   2.5.5: every target that is not a link inside a sentence is at least 44 x 44 px (e2e/aaa-checks.js targetSize).
   2.4.12: a focused element scrolled into view clears the sticky header.
   Layout fix 2026-11-22: the measure caps running text only. Rows, buttons, chips, form rows, facts, data rows and
   hero lines keep their container's width (e2e/layout-checks.js guards the designed widths). */
main :is(p, dd, blockquote, figcaption):not(.row, .cta, .who-chips, .signin-button, .feature-cta, .news-meta, .meta, .tag):not(.rows *, .hero-text *, .clip *) { max-width: var(--width-measure); }
:is(.band-in, .hero-text, [style*="text-align: center"]) > p { margin-inline: auto; }
summary { min-height: 44px; display: list-item; padding-block: .55rem; cursor: pointer; }
.foot-col a, .toc li a, #sub-rss, #sub-atom { display: inline-flex; align-items: center; min-height: 44px; }
.toc li { margin: 0; }
header.site nav a { min-width: 44px; justify-content: center; }
html { scroll-padding-top: 5rem; }
/* :where() keeps these at zero specificity: a component's own display (card links, section navigation) wins. */
:where(main li > a:only-child, td > a:only-child, main p > a:only-child, main :is(h2, h3) > a, h2 .h-link, .cmt-head a, p.check > label) { display: inline-flex; align-items: center; min-height: 44px; }
#sub-rss, #sub-atom, .tab { min-width: 44px; justify-content: center; }
.steps li { max-width: var(--width-measure); }
.checks li > a:only-child, .crumbs a { min-width: 44px; justify-content: center; }
video:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Links built from several spans keep the spaces between them (a flex box drops them: "Versiov0.0.13"): a block or
   inline block with padding reaches 44 px instead (layout fix 2026-11-22). */
#site-version { display: inline-block; padding-block: .6rem; }
.article-nav .more { display: block; padding-block: .6rem; }
