/* GENERATED by `make proto-generate` from docs/web/design/spec/{palettes,themes,dials}
 * — do not edit by hand. The contract is docs/web/design/design-tokens.md.
 *
 * Colour lives on [data-theme] (+ [data-appearance=dark]); form lives on
 * [data-dials]. The two axes are independent, so palettes and shapes never
 * multiply into combined blocks. */

:root, [data-theme="alive"] {
  --action-text: #085b62;
  --bg: #faf3e5;
  --bg-light: #faf3e5;
  --bird-fg: #3b2018;
  --bird-ground: #faf3e5;
  --border: #6f5f5a;
  --border-soft: #9d9390;
  --brand-brown: #085b62;
  --brand-brown-deep: #00292d;
  --button-danger-bg-active: #ccafa4;
  --button-danger-bg-hover: #dbc7c0;
  --button-danger-border: #7d2b00;
  --button-danger-fg: #7d2b00;
  --button-disabled-border: #4b342d;
  --button-disabled-fg: #4b342d;
  --button-ghost-fg: #085b62;
  --button-link-fg: #085b62;
  --button-link-fg-hover: #3b2018;
  --button-primary-bg: #085b62;
  --button-primary-bg-active: #000e10;
  --button-primary-bg-hover: #00292d;
  --button-primary-border: #085b62;
  --button-primary-fg: #fdfcfb;
  --button-secondary-border: #085b62;
  --button-secondary-fg: #085b62;
  --danger: #7d2b00;
  --danger-bg: #dbc7c0;
  --fg: #3b2018;
  --fg-strong: #3b2018;
  --focus-ring: #085b62;
  --info: #085b62;
  --muted: #4b342d;
  --on-accent-1-strong: #faf3e5;
  --on-accent-1-strong-danger: #dbc7c0;
  --on-accent-1-strong-eyebrow: #faf3e5;
  --on-accent-1-strong-muted: #e7d6c9;
  --on-accent-1-subtle: #3b2018;
  --on-accent-1-subtle-danger: #7d2b00;
  --on-accent-1-subtle-eyebrow: #5f3d00;
  --on-accent-1-subtle-muted: #5c4842;
  --on-accent-2-strong: #faf3e5;
  --on-accent-2-strong-danger: #ccafa4;
  --on-accent-2-strong-eyebrow: #faf3e5;
  --on-accent-2-strong-muted: #e3d8c3;
  --on-accent-2-subtle: #3b2018;
  --on-accent-2-subtle-danger: #7d2b00;
  --on-accent-2-subtle-eyebrow: #5f3d00;
  --on-accent-2-subtle-muted: #4b342d;
  --on-dark: #fdfcfb;
  --on-light: #3b2018;
  --palette-aubergine: #493348;
  --palette-burnt-sienna: #7b3528;
  --palette-burnt-umber: #3b2018;
  --palette-deep-petrol: #085b62;
  --palette-golden-amber: #f4a615;
  --palette-golden-orange: #ee9008;
  --palette-golden-yellow: #fabc21;
  --palette-olive: #687343;
  --palette-rust: #a04b28;
  --palette-sage: #9ba27b;
  --palette-soft-teal: #8bb1b4;
  --palette-terracotta: #c97954;
  --palette-warm-ivory: #faf3e5;
  --panel: #faf6ef;
  --primary: #f4a615;
  --primary-deep: #5f3d00;
  --primary-soft: #f4e4d0;
  --shadow-color: rgba(22, 6, 3, 0.12);
  --success: #485223;
  --success-bg: #cccfc5;
  --surface-accent-1-strong: #7b3528;
  --surface-accent-1-subtle: #cfbeba;
  --surface-accent-2-strong: #5f3d00;
  --surface-accent-2-subtle: #f4a615;
  --surface-footer: #f1d9ba;
  --warn: #5e3500;
}

:root[data-appearance="dark"], [data-theme="alive"][data-appearance="dark"] {
  --action-text: #68888c;
  --bg: #0e0b05;
  --bg-light: #faf3e5;
  --bird-fg: #fefcfb;
  --bird-ground: #0e0b05;
  --border: #3b2018;
  --border-soft: #3b2018;
  --brand-brown: #085b62;
  --brand-brown-deep: #00292d;
  --button-danger-bg-active: #4d1700;
  --button-danger-bg-hover: #4d1700;
  --button-danger-border: #b68674;
  --button-danger-fg: #b68674;
  --button-disabled-border: #9d9390;
  --button-disabled-fg: #9d9390;
  --button-ghost-fg: #68888c;
  --button-link-fg: #68888c;
  --button-link-fg-hover: #fefcfb;
  --button-primary-bg: #085b62;
  --button-primary-bg-active: #000e10;
  --button-primary-bg-hover: #00292d;
  --button-primary-border: #085b62;
  --button-primary-fg: #fdfcfb;
  --button-secondary-border: #68888c;
  --button-secondary-fg: #68888c;
  --danger: #b68674;
  --danger-bg: #4d1700;
  --fg: #dad6d4;
  --fg-strong: #fefcfb;
  --focus-ring: #68888c;
  --info: #68888c;
  --muted: #9d9390;
  --on-accent-1-strong: #faf3e5;
  --on-accent-1-strong-danger: #dbc7c0;
  --on-accent-1-strong-eyebrow: #faf3e5;
  --on-accent-1-strong-muted: #e7d6c9;
  --on-accent-1-subtle: #3b2018;
  --on-accent-1-subtle-danger: #7d2b00;
  --on-accent-1-subtle-eyebrow: #5f3d00;
  --on-accent-1-subtle-muted: #5c4842;
  --on-accent-2-strong: #faf3e5;
  --on-accent-2-strong-danger: #ccafa4;
  --on-accent-2-strong-eyebrow: #faf3e5;
  --on-accent-2-strong-muted: #e3d8c3;
  --on-accent-2-subtle: #3b2018;
  --on-accent-2-subtle-danger: #7d2b00;
  --on-accent-2-subtle-eyebrow: #5f3d00;
  --on-accent-2-subtle-muted: #4b342d;
  --on-dark: #fdfcfb;
  --on-light: #3b2018;
  --palette-aubergine: #493348;
  --palette-burnt-sienna: #7b3528;
  --palette-burnt-umber: #3b2018;
  --palette-deep-petrol: #085b62;
  --palette-golden-amber: #f4a615;
  --palette-golden-orange: #ee9008;
  --palette-golden-yellow: #fabc21;
  --palette-olive: #687343;
  --palette-rust: #a04b28;
  --palette-sage: #9ba27b;
  --palette-soft-teal: #8bb1b4;
  --palette-terracotta: #c97954;
  --palette-warm-ivory: #faf3e5;
  --panel: #1b1811;
  --primary: #f4a615;
  --primary-deep: #f4a615;
  --primary-soft: #5f3d00;
  --shadow-color: rgba(22, 6, 3, 0.45);
  --success: #949b82;
  --success-bg: #293104;
  --surface-accent-1-strong: #7b3528;
  --surface-accent-1-subtle: #cfbeba;
  --surface-accent-2-strong: #5f3d00;
  --surface-accent-2-subtle: #f4a615;
  --surface-footer: #3e2f17;
  --warn: #e9ab6d;
}

[data-theme="neutral"] {
  --action-text: #3d4c5c;
  --bg: #f6f7f8;
  --bg-light: #f6f7f8;
  --bird-fg: #070b12;
  --bird-ground: #f6f7f8;
  --border: #8e939b;
  --border-soft: #b4b7bb;
  --brand-brown: #3d4c5c;
  --brand-brown-deep: #16222f;
  --button-danger-bg-active: #d5a8a1;
  --button-danger-bg-hover: #e1c2bd;
  --button-danger-border: #890002;
  --button-danger-fg: #890002;
  --button-disabled-border: #242b36;
  --button-disabled-fg: #242b36;
  --button-ghost-fg: #3d4c5c;
  --button-link-fg: #3d4c5c;
  --button-link-fg-hover: #070b12;
  --button-primary-bg: #3d4c5c;
  --button-primary-bg-active: #050c15;
  --button-primary-bg-hover: #16222f;
  --button-primary-border: #3d4c5c;
  --button-primary-fg: #fcfcfc;
  --button-secondary-border: #3d4c5c;
  --button-secondary-fg: #3d4c5c;
  --danger: #890002;
  --danger-bg: #e1c2bd;
  --fg: #070b12;
  --fg-strong: #070b12;
  --focus-ring: #3d4c5c;
  --info: #55707a;
  --muted: #242b36;
  --on-accent-1-strong: #f6f7f8;
  --on-accent-1-strong-danger: #d5a8a1;
  --on-accent-1-strong-eyebrow: #f6f7f8;
  --on-accent-1-strong-muted: #d9dbdd;
  --on-accent-1-subtle: #070b12;
  --on-accent-1-subtle-danger: #550001;
  --on-accent-1-subtle-eyebrow: #070c11;
  --on-accent-1-subtle-muted: #242b36;
  --on-accent-2-strong: #f6f7f8;
  --on-accent-2-strong-danger: #fffbfb;
  --on-accent-2-strong-eyebrow: #f6f7f8;
  --on-accent-2-strong-muted: #f6f7f8;
  --on-accent-2-subtle: #070b12;
  --on-accent-2-subtle-danger: #890002;
  --on-accent-2-subtle-eyebrow: #363e47;
  --on-accent-2-subtle-muted: #414a56;
  --on-dark: #fcfcfc;
  --on-light: #070b12;
  --palette-brick: #b3261e;
  --palette-ink: #3d4c5c;
  --palette-mist: #f6f7f8;
  --palette-ochre: #8a6a1f;
  --palette-pine: #1f5130;
  --palette-seafoam: #55707a;
  --palette-slate: #5f6875;
  --palette-steel: #97a1ad;
  --panel: #f8f9f9;
  --primary: #97a1ad;
  --primary-deep: #070c11;
  --primary-soft: #dddfe2;
  --shadow-color: rgba(7, 11, 18, 0.12);
  --success: #1f5130;
  --success-bg: #b9c3bb;
  --surface-accent-1-strong: #363e47;
  --surface-accent-1-subtle: #97a1ad;
  --surface-accent-2-strong: #55707a;
  --surface-accent-2-subtle: #c8ced0;
  --surface-footer: #cfd2d6;
  --warn: #644a00;
}

[data-theme="neutral"][data-appearance="dark"] {
  --action-text: #8c939a;
  --bg: #0b0b0c;
  --bg-light: #f6f7f8;
  --bird-fg: #fcfcfd;
  --bird-ground: #0b0b0c;
  --border: #5f6875;
  --border-soft: #242b36;
  --brand-brown: #3d4c5c;
  --brand-brown-deep: #16222f;
  --button-danger-bg-active: #550001;
  --button-danger-bg-hover: #550001;
  --button-danger-border: #c27a70;
  --button-danger-fg: #c27a70;
  --button-disabled-border: #7d848d;
  --button-disabled-fg: #7d848d;
  --button-ghost-fg: #8c939a;
  --button-link-fg: #8c939a;
  --button-link-fg-hover: #fcfcfd;
  --button-primary-bg: #3d4c5c;
  --button-primary-bg-active: #050c15;
  --button-primary-bg-hover: #16222f;
  --button-primary-border: #3d4c5c;
  --button-primary-fg: #fcfcfc;
  --button-secondary-border: #8c939a;
  --button-secondary-fg: #8c939a;
  --danger: #c27a70;
  --danger-bg: #550001;
  --fg: #e2e3e5;
  --fg-strong: #fcfcfd;
  --focus-ring: #8c939a;
  --info: #788a91;
  --muted: #7d848d;
  --on-accent-1-strong: #f6f7f8;
  --on-accent-1-strong-danger: #d5a8a1;
  --on-accent-1-strong-eyebrow: #f6f7f8;
  --on-accent-1-strong-muted: #d9dbdd;
  --on-accent-1-subtle: #070b12;
  --on-accent-1-subtle-danger: #550001;
  --on-accent-1-subtle-eyebrow: #070c11;
  --on-accent-1-subtle-muted: #242b36;
  --on-accent-2-strong: #f6f7f8;
  --on-accent-2-strong-danger: #fffbfb;
  --on-accent-2-strong-eyebrow: #f6f7f8;
  --on-accent-2-strong-muted: #f6f7f8;
  --on-accent-2-subtle: #070b12;
  --on-accent-2-subtle-danger: #890002;
  --on-accent-2-subtle-eyebrow: #363e47;
  --on-accent-2-subtle-muted: #414a56;
  --on-dark: #fcfcfc;
  --on-light: #070b12;
  --palette-brick: #b3261e;
  --palette-ink: #3d4c5c;
  --palette-mist: #f6f7f8;
  --palette-ochre: #8a6a1f;
  --palette-pine: #1f5130;
  --palette-seafoam: #55707a;
  --palette-slate: #5f6875;
  --palette-steel: #97a1ad;
  --panel: #181819;
  --primary: #97a1ad;
  --primary-deep: #a1aab4;
  --primary-soft: #363e47;
  --shadow-color: rgba(7, 11, 18, 0.45);
  --success: #819586;
  --success-bg: #002810;
  --surface-accent-1-strong: #363e47;
  --surface-accent-1-subtle: #97a1ad;
  --surface-accent-2-strong: #55707a;
  --surface-accent-2-subtle: #c8ced0;
  --surface-footer: #2d2e31;
  --warn: #b5a88e;
}

:root, [data-dials="calm"] {
  --band-y: clamp(48px, calc(25.846px + 6.154vw), 96px);
  --font-body: "Alegreya Sans", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: var(--font-body);
  --font-heading: var(--font-body);
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --fs-2xl: calc(clamp(1.514rem, calc(1.312rem + 0.956vw), 1.953rem) * var(--text-scale));
  --fs-3xl: calc(clamp(1.739rem, calc(1.415rem + 1.531vw), 2.441rem) * var(--text-scale));
  --fs-4xl: calc(clamp(1.997rem, calc(1.51rem + 2.298vw), 3.052rem) * var(--text-scale));
  --fs-base: calc(1rem * var(--text-scale));
  --fs-lg: calc(clamp(1.148rem, calc(1.101rem + 0.221vw), 1.25rem) * var(--text-scale));
  --fs-sm: calc(0.875rem * var(--text-scale));
  --fs-xl: calc(clamp(1.319rem, calc(1.206rem + 0.531vw), 1.563rem) * var(--text-scale));
  --fs-xs: calc(0.716rem * var(--text-scale));
  --gutter: clamp(16px, 4vw, 24px);
  --leading-body: 1.6;
  --leading-heading: 1.15;
  --measure: 66ch;
  --motion: 240ms ease-out;
  --radius: 16px;
  --radius-action: 999px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --radius-sm: 12px;
  --root-size: 106.25%;
  --shadow-geometry: 0 6px 24px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --surface-border: 0;
  --text-scale: 1.2;
  --veil-alpha: 0.07;
  --wrap: 1140px;
  --wrap-wide: 1340px;
}

[data-dials="crisp"] {
  --band-y: clamp(32px, calc(17.231px + 4.103vw), 64px);
  --font-body: "Alegreya Sans", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: var(--font-body);
  --font-heading: var(--font-body);
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --fs-2xl: calc(clamp(1.404rem, calc(1.254rem + 0.707vw), 1.728rem) * var(--text-scale));
  --fs-3xl: calc(clamp(1.572rem, calc(1.34rem + 1.094vw), 2.074rem) * var(--text-scale));
  --fs-4xl: calc(clamp(1.76rem, calc(1.424rem + 1.588vw), 2.488rem) * var(--text-scale));
  --fs-base: calc(1rem * var(--text-scale));
  --fs-lg: calc(clamp(1.12rem, calc(1.083rem + 0.175vw), 1.2rem) * var(--text-scale));
  --fs-sm: calc(0.896rem * var(--text-scale));
  --fs-xl: calc(clamp(1.254rem, calc(1.168rem + 0.406vw), 1.44rem) * var(--text-scale));
  --fs-xs: calc(0.761rem * var(--text-scale));
  --gutter: clamp(16px, 4vw, 20px);
  --leading-body: 1.6;
  --leading-heading: 1.15;
  --measure: 66ch;
  --motion: 240ms ease-out;
  --radius: 10px;
  --radius-action: 8px;
  --radius-lg: 12px;
  --radius-pill: 999px;
  --radius-sm: 6px;
  --root-size: 106.25%;
  --shadow-geometry: 0 0 0;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 48px;
  --space-9: 64px;
  --surface-border: 1px;
  --text-scale: 1.2;
  --veil-alpha: 0.07;
  --wrap: 1140px;
  --wrap-wide: 1340px;
}

[data-dials="editorial"] {
  --band-y: clamp(64px, calc(34.462px + 8.205vw), 128px);
  --font-body: Arial, Helvetica, "Helvetica Neue", sans-serif;
  --font-display: Georgia, "Times New Roman", Times, serif;
  --font-heading: var(--font-display);
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --fs-2xl: calc(clamp(1.707rem, calc(1.401rem + 1.442vw), 2.369rem) * var(--text-scale));
  --fs-3xl: calc(clamp(2.04rem, calc(1.524rem + 2.436vw), 3.157rem) * var(--text-scale));
  --fs-4xl: calc(clamp(2.438rem, calc(1.62rem + 3.86vw), 4.209rem) * var(--text-scale));
  --fs-base: calc(1rem * var(--text-scale));
  --fs-lg: calc(clamp(1.195rem, calc(1.131rem + 0.301vw), 1.333rem) * var(--text-scale));
  --fs-sm: calc(0.842rem * var(--text-scale));
  --fs-xl: calc(clamp(1.428rem, calc(1.267rem + 0.76vw), 1.777rem) * var(--text-scale));
  --fs-xs: calc(0.65rem * var(--text-scale));
  --gutter: clamp(24px, 4vw, 32px);
  --leading-body: 1.6;
  --leading-heading: 1.15;
  --measure: 66ch;
  --motion: 240ms ease-out;
  --radius: 10px;
  --radius-action: 8px;
  --radius-lg: 12px;
  --radius-pill: 999px;
  --radius-sm: 6px;
  --root-size: 106.25%;
  --shadow-geometry: 0 6px 24px;
  --space-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;
  --space-7: 64px;
  --space-8: 96px;
  --space-9: 128px;
  --surface-border: 0;
  --text-scale: 1.2;
  --veil-alpha: 0.07;
  --wrap: 1140px;
  --wrap-wide: 1340px;
}

/* The text-size axis (change 1794553108): a chosen step overrides the
 * dials set's own --text-scale; every --fs-* rung is written against it. */
[data-textsize="100"] {
  --text-scale: 1;
}

[data-textsize="110"] {
  --text-scale: 1.1;
}

[data-textsize="120"] {
  --text-scale: 1.2;
}

[data-textsize="130"] {
  --text-scale: 1.3;
}

[data-textsize="140"] {
  --text-scale: 1.4;
}

[data-textsize="150"] {
  --text-scale: 1.5;
}

/* The shadow is where the two axes meet: geometry from the dials,
 * colour from the theme. Composing here keeps them from multiplying. */
:root {
  --shadow-card: var(--shadow-geometry) var(--shadow-color);
}

/* spec.css — stylesheet for the spec-generated prototype pages.
 *
 * TOKEN NAMES ARE CANONICAL, TOKEN VALUES ARE PLACEHOLDERS.
 *
 * Every custom property below is a name from the design system
 * (design-system/tokens.md), which is the single source of truth and the same
 * vocabulary that lands in `ui.CSS()` `:root`. The VALUES here are a neutral
 * grey stand-in so the demo shows structure rather than brand: bringing in the
 * real design is a value swap in this one block, never a rename, and never a
 * second vocabulary.
 *
 * Roles are honoured, not just names — the primary CTA is a `--button-primary-bg` pill
 * with a `--button-primary-fg` label (per tokens.md), `--primary` stays decorative, and
 * body text is always `--fg`.
 *
 * Class names here are the ones component templates reference; adding a
 * component means adding its rules here in the same change.
 */

/* The :root token block is GENERATED into tokens.css from
 * spec/{palettes,themes,dials} — see docs/web/design/design-tokens.md. This file
 * holds only hand-written COMPONENT rules, so a regeneration can never clobber
 * authored CSS, and every value below references a token rather than a literal. */

/* ── fonts ────────────────────────────────────────────────────────────────────
 * Alegreya Sans (Huerta Tipográfica, Google Fonts build v28, SIL OFL 1.1 —
 * web/assets/fonts/LICENSE.txt), SELF-HOSTED so the site, the prototype and
 * Figma (which previews in Alegreya Sans) draw the same glyphs. The face has no
 * variable cut and no Semi Bold, so it ships as static cuts — exactly the
 * weights the rules below use: 400 body · 600 emphasis + headings · 700 badges.
 * The Medium file answers BOTH 500 and 600 (`font-weight: 500 600`), so every
 * 600 rule renders Medium — the moderate, not heavy, heading voice tokens.md
 * names — instead of the browser rounding 600 up to Bold. Each cut is Google's
 * two splits: `latin` (Finnish ä/ö/å, €, typographic punctuation — the one the
 * shell preloads) and `latin-ext` (š/ž and the rest of Latin Extended), fetched
 * only when a page holds such a glyph (`unicode-range`). `swap` shows the
 * fallback stack at once and swaps Alegreya Sans in when it lands — text is
 * never invisible. The family NAME is what the generated `--font-*` tokens
 * reference; this block only makes it load. */
@font-face {
  font-family: "Alegreya Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/alegreya-sans-400.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: "Alegreya Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/alegreya-sans-400-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Alegreya Sans";
  font-style: normal;
  font-weight: 500 600;
  font-display: swap;
  src: url(/assets/fonts/alegreya-sans-500.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: "Alegreya Sans";
  font-style: normal;
  font-weight: 500 600;
  font-display: swap;
  src: url(/assets/fonts/alegreya-sans-500-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Alegreya Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/assets/fonts/alegreya-sans-700.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: "Alegreya Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/assets/fonts/alegreya-sans-700-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* The root ALWAYS reserves the scrollbar's gutter (change 1794331320 fix round 2, Q-154:
 * "Opening menu should not have any effect on the other site"): a scroll lock (the open
 * menu, a modal dialog) or a page too short to scroll never changes the layout width — nor
 * `vw`, which a stable root gutter takes out of the viewport, so the fluid type never moves. */
html { font-size: var(--root-size); scrollbar-gutter: stable; } /* 17px root (a GENERATED token — the fluid
                                       * type anchors resolve against the same value) */

/* TEXT SIZE (change 1794553108): every `--fs-*` rung is multiplied by the generated
 * `--text-scale` (the text-size dial, 100–150 %). A MARK that sits on a text line — the
 * brand heart + wordmark + bird, an icon, a drawn chevron, a badge's disc, a check or a
 * radio, a numbered step — grows with it: sized in `em`, or `calc(<px> * var(--text-scale))`
 * where the box carries no text (an icon-only button at font-size 0). Spacing, widths,
 * hairlines and the 44px target NEVER take the scale — a 44px box keeps 44px. */

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font: var(--fs-base)/var(--leading-body) var(--font-body);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  line-height: var(--leading-heading);
  color: var(--fg-strong);
  font-weight: 600;
  letter-spacing: -.02em;
  text-wrap: balance;
  /* A long Finnish compound ("kommunikaatiomenetelmä") is wider than a 390px column
   * once the text-size dial grows the heading rungs (change 1794553108): hyphenate
   * by the page language, and break the word rather than scroll the page sideways. */
  hyphens: auto;
  overflow-wrap: break-word;
}

p { text-wrap: pretty; }

main { flex: 1 0 auto; }

/* The sticky footer: body is the flex column and `main` takes the space a short
 * page leaves. Production renders into a hydration mount (`#app`, and in it the page
 * view's root `div`) that the prototype does not have; neither takes a box of its
 * own, so the navbar, `main` and the footer are body's flex items in BOTH — one
 * layout tree. Inert in the prototype (it has no `#app`). The pages with no client
 * page of their own wrap the bar in one more mount (`#sitechrome`, only as tall as
 * the bar): it takes no box either, or the sticky bar would have no room to stick
 * in and scroll away on /login, /forgot-password and the 404 (change 1794075039). */
#app, #app > div, #sitechrome { display: contents; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* The skip link is a link on the --panel card: --action-text, which the generator
 * searches to AA on --panel in both appearances — never the browser's default
 * blue (2.09:1 on the dark panel; change 1793564174). It sits outside every tone. */
.skip-link { position: absolute; left: -9999px; color: var(--action-text); }
.skip-link:focus {
  left: var(--space-4);
  top: var(--space-4);
  z-index: 10;
  background: var(--panel);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
}

/* --- navbar ------------------------------------------------------------- */

/* The background comes from the navbar's TONE, so a shell can sit on a brand
 * band instead of always being a pale strip. */
.navbar {
  position: sticky;
  top: 0;
  z-index: 5;
}

/* `position: relative` makes this the containing block for the menu panel, so
 * the panel hangs off the CONTENT column rather than the full-bleed bar. */
.navbar .wrap {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  min-height: calc(60px * var(--text-scale)); /* the bar keeps its proportion to the brand mark it holds (change 1794553108) */
  flex-wrap: nowrap;
  position: relative;
}

.navbrand {
  font-family: var(--font-body);
  text-decoration: none; /* it is a link home, worn as a wordmark */
  font-size: var(--fs-lg);
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--fg-strong);
  margin-right: auto;
  display: flex;
  align-items: center;
  flex: none;
  white-space: nowrap;
  gap: var(--space-3);
}

.navbrand-plain { letter-spacing: -.02em; }

/* A text-only brand (the showcase's) wears a drawn dot as its mark. */
.navbrand::before {
  content: "";
  width: calc(22px * var(--text-scale));
  height: calc(22px * var(--text-scale));
  border-radius: 50%;
  background: var(--primary);
}

/* With the brand library artwork the link IS the artwork: no drawn dot, and the
 * brand text stays only as the accessible name (the images are decorative). The
 * link keeps a 44px hit area whatever the artwork's height. */
.navbrand:has(.logo) { min-height: 44px; }
.navbrand:has(.logo)::before { content: none; }
.navbrand:has(.logo) .navbrand-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* --- logo --------------------------------------------------------------- */

/* Brand artwork as the Figma website design paints it: the library master is
 * the MASK (its own fill is irrelevant), the token the design binds is the
 * paint — heart AND wordmark `fg-strong`, the burnt-umber text brown on the ivory
 * bar (GATE 1 round 2, 2026-11-01; figma.md → navbar). The parent
 * sets the height; aspect-ratio (the master viewBox) sets the width, so the
 * artwork never stretches, and `flex: none` keeps a crowded row from squashing
 * it. Absolute /assets/ paths: the prototype and the site both serve the brand
 * kit there, and the site inlines this sheet into pages at any depth. */
.logo {
  display: block;
  flex: none;
  -webkit-mask: center / contain no-repeat;
  mask: center / contain no-repeat;
}
.logo-heart {
  aspect-ratio: 300 / 237.124;
  background: var(--fg-strong);
  -webkit-mask-image: url(/assets/logo_heart.svg);
  mask-image: url(/assets/logo_heart.svg);
}
.logo-wordmark {
  aspect-ratio: 300 / 79.5764;
  background: var(--fg-strong);
  -webkit-mask-image: url(/assets/logo_wordmark.svg);
  mask-image: url(/assets/logo_wordmark.svg);
}

/* The Figma navbar 1440 (14:296): a 60 x 47.425 heart and a 34px wordmark, the
 * gap the design binds (--space-3, the .navbrand gap). The wordmark sits OPTICALLY
 * on the heart at every width (GATE 3, 2026-10-31: "the logo text is a bit too
 * high"): its letters (cap top to baseline) fill the top 0.675 of its box — the
 * rest is descender flourish — so, centred on the heart by the brand's
 * align-items, it is moved down by (0.5 - 0.675 / 2) = 16.25% of its own height,
 * putting the letters' centre on the heart's centre. At 1440 that is the Figma
 * placement within 0.5px (top 12.24 vs 11.75); `translate` leaves the layout
 * box, so the link's height and hit area do not change. */
.navbrand .logo-heart { height: calc(47.425px * var(--text-scale)); }
.navbrand .logo-wordmark { height: calc(34px * var(--text-scale)); translate: 0 16.25%; }

/* --- bird (change 1793633543) ------------------------------------------- */

/* The pixel bird: ONE sprite (web/assets/bird_sprite.svg — four 12 x 7 art-pixel
 * cells: perched · wings up · wings down · the twig) used as a MASK and painted
 * by the bird's own token, the same technique and the same ink as the wordmark
 * (`--bird-fg`, generated = `--fg-strong`). A frame is a class that moves the
 * mask to its cell — never a per-frame background animation.
 *
 * The TWIG is in the brand link's flow, right after the wordmark: it takes its
 * width in the row from the first paint, so nothing shifts when the bird moves.
 * Its branch is drawn by ::before (a mask on the twig itself would clip the bird
 * inside it). `position: relative` makes it the nesting bird's containing block;
 * `top` (a relative offset: no layout effect and, unlike a transform, no
 * containing block for the flying bird) puts the branch on the wordmark's
 * baseline. Size: 2px per art pixel beside the 34px wordmark (about its
 * x-height), 1.5px below md beside the 27px one — it scales with the wordmark. */
.bird-twig {
  position: relative;
  top: calc(4.5px * var(--text-scale));
  flex: none;
  width: calc(24px * var(--text-scale));
  height: calc(14px * var(--text-scale));
}
.bird-twig::before,
.bird {
  background: var(--bird-fg);
  -webkit-mask: url(/assets/bird_sprite.svg) 0 0 / 400% 100% no-repeat;
  mask: url(/assets/bird_sprite.svg) 0 0 / 400% 100% no-repeat;
  image-rendering: pixelated;
}
.bird-twig::before {
  content: "";
  position: absolute;
  inset: 0;
  -webkit-mask-position: 100% 0;
  mask-position: 100% 0;
}

/* The BIRD nests over its twig, its feet one art pixel up (on the branch). It
 * never takes pointer events, so it never covers what is under it. Its `color`
 * is NOT text (it draws none): it carries the free-to-fly ground
 * (`--bird-ground`, generated = the navbar's `--bg`) RESOLVED, which is how
 * bird.js reads the ground to compare with each surface's computed background —
 * the token stays the one source. */
.bird {
  position: absolute;
  left: 0;
  bottom: calc(100% / 7);
  width: calc(24px * var(--text-scale));
  height: calc(14px * var(--text-scale));
  color: var(--bird-ground);
  pointer-events: none;
}
.bird-up { -webkit-mask-position: 33.333% 0; mask-position: 33.333% 0; }
.bird-down { -webkit-mask-position: 66.667% 0; mask-position: 66.667% 0; }
/* Facing: the individual `scale` property flips it around its centre BEFORE
 * the script's `translate`, so a flip never moves it. */
.bird-left { scale: -1 1; }

/* Off the twig (flying, and perched elsewhere) it is viewport-positioned: the
 * script sets only `translate` (compositor-only). The sticky navbar's stacking
 * context keeps it above the page and below a dialog. */
.bird-flying {
  position: fixed;
  left: 0;
  top: 0;
  bottom: auto;
}
/* `will-change` ONLY for the flight itself — set on take-off, cleared on landing,
 * so a perched bird holds no compositor layer. */
.bird-moving { will-change: translate; }

/* The bar links are the only flexible item in the row: brand, search, buttons and
 * burger all keep their size, so a squeeze lands here. The row NEVER wraps —
 * a nav that reflows onto a second line changes the bar's height and pushes the
 * page down — and nav.js moves WHOLE links into the menu before any of them
 * would be cut in half. `overflow: hidden` is the backstop for the instant
 * before that runs. */
.navlinks {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  flex: 0 1 auto;
  flex-wrap: nowrap;
  min-width: 0;
  overflow: hidden;
}

.navlink {
  display: inline-flex;
  align-items: center;
  flex: none;
  white-space: nowrap;
  min-height: 44px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-sm);
  color: var(--fg);
  text-decoration: none;
  font-size: var(--fs-sm);
}
.navlink:hover { background: var(--primary-soft); color: var(--fg-strong); }
/* The active item is marked by an UNDERLINE, not colour alone — ux-patterns.md */
.navlink-current { color: var(--fg-strong); font-weight: 600; box-shadow: inset 0 -2px 0 currentColor; }

/* `display: contents` lets the bar row and the menu panel be siblings in the
 * flex row on wide screens while still being ONE element to show as a drawer on
 * narrow ones — which is what lets the same link live in both places without
 * being rendered twice. */
.navgroup { display: contents; }

/* A LIGHT SURFACE that sits on any band must escape the band's tone scope:
 * inside a strong accent band --fg-strong is light, and light text on a pale panel is
 * invisible. Only --bg-light / --on-light are safe here — the ivory ground and the brown ink, both FIXED
 * across appearances and never rebound (the pair is AA-asserted), the same reasoning the media trigger
 * uses — so the surface re-establishes the light context from them for
 * everything inside it, ONCE, instead of every label, hint, error, link and
 * focus ring carrying its own escape. Two components are such a surface: the
 * navbar's menu panel and the in-place text editor (`form` variant `editor`).
 * Links take --brand-brown, which is never rebound and whose pairing with
 * --on-dark is the primary CTA's own AA-asserted pair. The phone drawer
 * (.navgroup in the max-width: 768px block) repeats this list because it sits
 * in a media query — keep the two in sync. */
.navmenu,
.form-editor {
  background: var(--bg-light);
  color: var(--on-light);

  --fg: var(--on-light);
  --fg-strong: var(--on-light);
  --muted: color-mix(in oklab, var(--on-light) 72%, transparent);
  --border: color-mix(in oklab, var(--on-light) 16%, transparent);
  --primary-soft: color-mix(in oklab, var(--on-light) 8%, transparent);
  --primary-deep: var(--on-light);
  --action-text: var(--brand-brown);
  --focus-ring: var(--brand-brown);
  --button-secondary-fg: var(--brand-brown);
  --button-secondary-border: var(--brand-brown);
  --button-ghost-fg: var(--brand-brown);
  --button-link-fg: var(--brand-brown);
  --button-link-fg-hover: var(--on-light);
  --button-disabled-fg: var(--on-light);
  --button-disabled-border: var(--on-light);
}

/* The menu panel. It hangs off the STICKY bar, so it stays on screen: a panel taller
 * than the screen would leave its last entries where no scroll reaches (change
 * 1794075039). So it ends a step above the screen's bottom — `100%` is the bar's
 * height, the containing block of an absolute box; `dvh`, so a phone's collapsing
 * toolbar never hides the bottom — and scrolls its OWN entries, never chaining into
 * the page, which is locked while a menu is open (below): ONE scroll area at a time. */
.navmenu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 6;
  flex-direction: column;
  max-height: calc(100dvh - 100% - var(--space-2));
  overflow-y: auto;
  overscroll-behavior: contain;
  min-width: 12rem;
  padding: var(--space-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.navbar.nav-open .navmenu { display: flex; }

/* While a menu is open the page behind it does not scroll (Q-115: one scroll area,
 * the menu's). `overflow: hidden` on the root keeps its scroll offset, so nothing
 * jumps on open and closing gives the reader back the same place; the root's permanent
 * gutter (`html` above) keeps the width, so the page does not shift sideways or rescale. */
html:has(.navbar.nav-open) { overflow: hidden; }

/* A click or tap OUTSIDE the open menu closes it and does nothing else (change
 * 1794322153): the open bar's transparent `::before` covers the whole screen behind
 * the bar's own contents (fixed to the viewport; at -1 inside the sticky bar's stacking
 * context, so above the page and below the panel), and while open the bar row lets the
 * pointer through to it everywhere except the panel and the burger — the brand, the
 * bar buttons and the empty bar are "outside" too. So a click outside lands on the
 * header ITSELF (the delegated `navOutside`, data-self="click"; nav.js in the
 * prototype) and the link or button under the pointer never receives it. The burger
 * still toggles; Escape still closes. */
.navbar.nav-open::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
}
.navbar.nav-open .wrap { pointer-events: none; }
.navbar.nav-open .navgroup,
.navbar.nav-open .navburger { pointer-events: auto; }

/* A menu entry. A signed-in viewer's "log out" entry is a form's submit button
 * (SUM-12): the reset (width, border, background, font, alignment) makes it the same
 * row as the links around it. */
.menulink {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 0 var(--space-3);
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--fg);
  text-decoration: none;
  font: inherit;
  font-size: var(--fs-sm);
  text-align: start;
  white-space: nowrap;
  cursor: pointer;
}
.menulink:hover { background: var(--primary-soft); color: var(--fg-strong); }
.menulink-current { color: var(--fg-strong); font-weight: 600; }

/* A rule between two groups of entries (an <hr>: role separator, never
 * focusable). Fixed breathing room — it is internal to the list it divides. A
 * separator with nothing before it (an empty group) never shows: a list never
 * opens on a rule. */
.separator {
  flex: none;
  height: 0;
  margin: var(--space-2) 0;
  border: 0;
  border-top: 1px solid var(--border);
}
.separator:first-child { display: none; }

/* The burger is a real control, so it gets a real 44px target. It is hidden on
 * wide screens unless the menu actually holds something — which :has() answers
 * live, so a link that nav.js pushes out of the bar brings the button with it. */
.navburger {
  display: none;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--fg-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.navburger:hover { background: var(--primary-soft); }
.navbar:has(.navmenu a) .navburger { display: inline-flex; }

/* Three stripes rather than two borders plus a centred ::after: absolute insets
 * resolve against the PADDING box, so the middle bar sat a pixel low and the top
 * gap read wider than the bottom one. As background positions the two gaps are
 * equal by construction — 2px bars in a 14px box leave 4px twice. */
.navburger-bars {
  width: calc(20px * var(--text-scale));
  height: calc(14px * var(--text-scale));
  background-image:
    linear-gradient(currentColor, currentColor),
    linear-gradient(currentColor, currentColor),
    linear-gradient(currentColor, currentColor);
  background-size: 100% 2px;
  background-position: left top, left center, left bottom;
  background-repeat: no-repeat;
}
/* The search affordance from the study: drawn, no icon dependency. The burger
 * beside it is NOT drawn this way — it is a real button. */
.navsearch {
  width: calc(16px * var(--text-scale));
  height: calc(16px * var(--text-scale));
  flex: none;
  border: 2px solid currentColor;
  border-radius: 50%;
  color: var(--fg);
  position: relative;
}
.navsearch::after {
  content: "";
  position: absolute;
  right: calc(-5px * var(--text-scale));
  bottom: calc(-3px * var(--text-scale));
  width: calc(7px * var(--text-scale));
  border-top: 2px solid currentColor;
  transform: rotate(45deg);
}

/* A bar button (the admin edit trigger, the profile link) is a `button` child: the same .btn as everywhere, sized for a bar
 * — it keeps its width and never wraps, so the link row absorbs any squeeze. */
.navbar .btn { flex: none; white-space: nowrap; font-size: var(--fs-sm); padding: 0 var(--space-4); }

/* --- sections ----------------------------------------------------------- */

.section { padding: var(--band-y) 0; }
.tone-plain { background: var(--bg); }
/* A band edge is the SOFT hairline (--border-soft): it divides, never weighs
 * (developer 2026-11-11: "that hairline is good but it could be little less dark
 * so it would be even thinner"). */
.tone-raised { background: var(--panel); border-block: 1px solid var(--border-soft); }
/* A SUNKEN band: the recessed alternate section — the DARKER IVORY of the five
 * section backgrounds (change 1794076697, Q-121: "ivory our default background …
 * in addition to lighter and darker ivory"): plain = the ivory page ground, raised =
 * the lighter ivory (--panel), sunken = this darker ivory, framed by the page
 * hairline (the softer --border-soft, developer 2026-11-11) above and below. Until this change it was the amber subtle band
 * itself — a second name for the yellow, which the developer's five keep as
 * accent-2-subtle (Tausta 5). The ground is the page ground deepened by 7 % of the text ink, so
 * every page token keeps reading on it unchanged (alive light ≈ #ece2d5, measured on
 * the 8-bit value: --fg 11.67:1, --muted 6.67:1 (#5c4842; 8.97:1 with the earlier #4b342d), the petrol --action-text 6.11:1, the
 * eyebrow --primary-deep 7.62:1, --danger 7.40:1); nothing is rebound.
 * Stage 3 replaces the mix with a GENERATED --surface-sunken (a surface-ramp step
 * whose page pairs join designtokens.AAPairs), so no colour maths ships. */
.tone-sunken {
  border-block: 1px solid var(--border-soft);
  background: color-mix(in oklab, var(--bg) 93%, var(--fg-strong));
}

/* A band REBINDS the tokens for everything inside it, rather than restyling
 * each child. Cards, badges, marks, buttons and anything added later adapt with no
 * per-component band rules and no change to the page spec — the section already
 * declared the tone, so a card never has to be told where it sits.
 *
 * SHAPE IS IDENTITY, COLOUR IS CONTEXT: nothing here touches radius, padding or
 * type. A card on a band is the same card.
 *
 * Rebinding tokens is allowed ONLY in a tone scope. Anywhere else, --panel must
 * keep meaning what tokens.md says it means. */

/* ACCENT bands (change 1793601632): rank <n> × strength, with FIXED token names —
 * the theme decides which hue sits behind a rank, so swapping a hue never touches
 * these rules. SUBTLE tints the page (a light band, dark ink); STRONG is the
 * high-contrast band of the same family (a dark band, light ink). Each band takes
 * its generated ink for text, links, eyebrows and secondary text — every pair is
 * AA-asserted by the generator — and provides the INVERSE button set: the
 * secondary, ghost and link label + outline and the focus ring become the band's
 * ink, while the primary button stays the action colour (Q-68). A strong band also
 * trades the shadow for a lighter film, as a shadow is invisible on dark, lays a
 * film of its ink as the chip fill (badges, card marks). A danger action takes the
 * band's searched danger ink (`--on-accent-<n>-<strength>-danger`: the danger ramp
 * step nearest the solid red that reads on the band — a light rose on a dark one).
 * (alive, change 1794076697: accent-1 = burnt sienna — the red band is accent-1-strong;
 * accent-2 = golden amber — the yellow band is accent-2-subtle; each seed lands unchanged.) */
.tone-accent-1-subtle {
  background: var(--surface-accent-1-subtle);
  color: var(--on-accent-1-subtle);

  --fg: var(--on-accent-1-subtle);
  --fg-strong: var(--on-accent-1-subtle);
  --muted: var(--on-accent-1-subtle-muted);
  --primary-deep: var(--on-accent-1-subtle-eyebrow);
  --action-text: var(--on-accent-1-subtle);
  --border: color-mix(in oklab, var(--on-accent-1-subtle) 30%, transparent);
  --focus-ring: var(--on-accent-1-subtle);
  --button-secondary-fg: var(--on-accent-1-subtle);
  --button-secondary-border: var(--on-accent-1-subtle);
  --button-ghost-fg: var(--on-accent-1-subtle);
  --button-link-fg: var(--on-accent-1-subtle);
  --button-link-fg-hover: var(--on-accent-1-subtle);
  --button-disabled-fg: var(--on-accent-1-subtle-muted);
  --button-disabled-border: var(--on-accent-1-subtle-muted);
  --button-danger-fg: var(--on-accent-1-subtle-danger);
  --button-danger-border: var(--on-accent-1-subtle-danger);
  --button-danger-bg-hover: color-mix(in oklab, var(--on-accent-1-subtle-danger) 12%, transparent);
  --button-danger-bg-active: color-mix(in oklab, var(--on-accent-1-subtle-danger) 20%, transparent);
}

.tone-accent-1-strong {
  background: var(--surface-accent-1-strong);
  color: var(--on-accent-1-strong);

  --panel: color-mix(in oklab, var(--on-accent-1-strong) calc(var(--veil-alpha) * 100%), transparent);
  --fg: var(--on-accent-1-strong);
  --fg-strong: var(--on-accent-1-strong);
  --muted: var(--on-accent-1-strong-muted);
  --primary-deep: var(--on-accent-1-strong-eyebrow);
  --action-text: var(--on-accent-1-strong);
  --border: color-mix(in oklab, var(--on-accent-1-strong) 25%, transparent);
  --shadow-card: none;
  --shadow-color: transparent;
  --focus-ring: var(--on-accent-1-strong);
  --button-secondary-fg: var(--on-accent-1-strong);
  --button-secondary-border: var(--on-accent-1-strong);
  --button-ghost-fg: var(--on-accent-1-strong);
  --button-link-fg: var(--on-accent-1-strong);
  --button-link-fg-hover: var(--on-accent-1-strong);
  --button-disabled-fg: var(--on-accent-1-strong-muted);
  --button-disabled-border: var(--on-accent-1-strong-muted);
  --button-danger-fg: var(--on-accent-1-strong-danger);
  --button-danger-border: var(--on-accent-1-strong-danger);
  --button-danger-bg-hover: color-mix(in oklab, var(--on-accent-1-strong-danger) 12%, transparent);
  --button-danger-bg-active: color-mix(in oklab, var(--on-accent-1-strong-danger) 20%, transparent);
  --primary-soft: color-mix(in oklab, var(--on-accent-1-strong) calc(var(--veil-alpha) * 170%), transparent);
}

.tone-accent-2-subtle {
  background: var(--surface-accent-2-subtle);
  color: var(--on-accent-2-subtle);

  --fg: var(--on-accent-2-subtle);
  --fg-strong: var(--on-accent-2-subtle);
  --muted: var(--on-accent-2-subtle-muted);
  --primary-deep: var(--on-accent-2-subtle-eyebrow);
  --action-text: var(--on-accent-2-subtle);
  --border: color-mix(in oklab, var(--on-accent-2-subtle) 30%, transparent);
  --focus-ring: var(--on-accent-2-subtle);
  --button-secondary-fg: var(--on-accent-2-subtle);
  --button-secondary-border: var(--on-accent-2-subtle);
  --button-ghost-fg: var(--on-accent-2-subtle);
  --button-link-fg: var(--on-accent-2-subtle);
  --button-link-fg-hover: var(--on-accent-2-subtle);
  --button-disabled-fg: var(--on-accent-2-subtle-muted);
  --button-disabled-border: var(--on-accent-2-subtle-muted);
  --button-danger-fg: var(--on-accent-2-subtle-danger);
  --button-danger-border: var(--on-accent-2-subtle-danger);
  --button-danger-bg-hover: color-mix(in oklab, var(--on-accent-2-subtle-danger) 12%, transparent);
  --button-danger-bg-active: color-mix(in oklab, var(--on-accent-2-subtle-danger) 20%, transparent);
}

.tone-accent-2-strong {
  background: var(--surface-accent-2-strong);
  color: var(--on-accent-2-strong);

  --panel: color-mix(in oklab, var(--on-accent-2-strong) calc(var(--veil-alpha) * 100%), transparent);
  --fg: var(--on-accent-2-strong);
  --fg-strong: var(--on-accent-2-strong);
  --muted: var(--on-accent-2-strong-muted);
  --primary-deep: var(--on-accent-2-strong-eyebrow);
  --action-text: var(--on-accent-2-strong);
  --border: color-mix(in oklab, var(--on-accent-2-strong) 25%, transparent);
  --shadow-card: none;
  --shadow-color: transparent;
  --focus-ring: var(--on-accent-2-strong);
  --button-secondary-fg: var(--on-accent-2-strong);
  --button-secondary-border: var(--on-accent-2-strong);
  --button-ghost-fg: var(--on-accent-2-strong);
  --button-link-fg: var(--on-accent-2-strong);
  --button-link-fg-hover: var(--on-accent-2-strong);
  --button-disabled-fg: var(--on-accent-2-strong-muted);
  --button-disabled-border: var(--on-accent-2-strong-muted);
  --button-danger-fg: var(--on-accent-2-strong-danger);
  --button-danger-border: var(--on-accent-2-strong-danger);
  --button-danger-bg-hover: color-mix(in oklab, var(--on-accent-2-strong-danger) 12%, transparent);
  --button-danger-bg-active: color-mix(in oklab, var(--on-accent-2-strong-danger) 20%, transparent);
  --primary-soft: color-mix(in oklab, var(--on-accent-2-strong) calc(var(--veil-alpha) * 170%), transparent);
}

.prose { max-width: var(--measure); }
/* The TEXT-ONLY elements' WIDTH (`prose`, `infosection`, `cta`: the `width` setting, change
 * 1794076697 — developer 2026-11-07 "yes center, with good width, can still be left aligned"
 * and 2026-11-08 "one which goes as wide as other content in desktop and one which stays
 * centered and expands to good reading width"): `measure` (default, "Lukuleveys") keeps the
 * --measure column and CENTRES it in the page, its text left-aligned (`head-center` centres the
 * text too); `wide` ("Leveä") lets the column fill the content width (--wrap), so the element
 * lines up with the cards, lists and media around it. Below the measure both fill the gutter. */
.width-measure > .wrap > .prose { margin-inline: auto; }
.width-wide > .wrap > .prose { max-width: none; }
.prose h2 { font-size: var(--fs-2xl); margin: 0 0 var(--space-4); }
.prose p { margin: 0 0 var(--space-3); color: var(--muted); }
/* A prose block's one way onward (the newsletter teaser): a 44px button under the copy. */
.prose > .btn { margin-top: var(--space-4); }
/* Two actions in one prose row keep the row gap the hero and the form actions use. */
.prose > .btn + .btn { margin-left: var(--space-3); }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--primary-deep);
  margin: 0 0 var(--space-2);
}

/* --- hero --------------------------------------------------------------- */

/* The hero takes a TONE like any other band rather than owning a background, so
 * a page composes its light/dark rhythm in one vocabulary. */
/* The hero sits tighter to the band below it than to the bar above — the ratio
 * is preserved as the rhythm scales, rather than being two fixed numbers. */
.hero { padding: var(--band-y) 0 calc(var(--band-y) * .7); }
.hero h1 {
  font-family: var(--font-display);
  /* ONE rung above the public h2 (--fs-2xl: prose, split, offers, cta): best practice is one
   * step between adjacent heading levels (developer 2026-11-13, change 1794553108 — was 4xl,
   * two steps). The rung IS fluid — a clamp here would scale it twice. */
  font-size: var(--fs-3xl);
  letter-spacing: -.03em;
  margin: 0 0 var(--space-4);
  max-width: 16ch;
}
.lede {
  font-size: var(--fs-lg);
  color: var(--muted);
  max-width: var(--measure);
  margin: 0 0 var(--space-6);
}


/* --- buttons ------------------------------------------------------------ */

/* One shape for every action; variants change EMPHASIS only, never geometry.
 * --radius-action comes from the roundness dial, so a pill character and a
 * rounded-rect one need no per-button override.
 *
 * THE HIERARCHY (button.yaml, change 1793601632): primary (filled) · secondary
 * (outlined) · ghost (no fill, no outline until hover) · link (inline text) ·
 * danger (outlined, destructive). Every colour is a SEMANTIC token
 * (`--button-<variant>-bg|fg|border` + `-hover` / `-active`, `--button-disabled-*`,
 * one `--focus-ring`) generated from the theme roles; a tone scope rebinds the
 * secondary / ghost / link / disabled ones and the ring to its band ink, never the
 * primary. Every variant has every state: hover, active (pressed), focus-visible,
 * disabled — hover and active are deeper steps of the SAME role (the primary) or a
 * film of the label colour (the rest), never another hue. `.btn-state-*` pins a
 * state for the prototype's specimens (the components page) and nothing else.
 *
 * All variants share ONE box: a 1px border on every one (the fill colour on the
 * primary, transparent on ghost / link), so a primary and a secondary side by side
 * are exactly the same size. */
/* A .btn may be a real <button> (a submit, the logout, a dialog's action): the
 * element resets live HERE, so a native control wears the site's type exactly
 * like an <a class="btn"> — they were once on .btn-primary only, and every other
 * <button class="btn"> rendered in the UA's Arial with an outset border. */
.btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--space-5);
  border-radius: var(--radius-action);
  background: var(--button-primary-bg);
  color: var(--button-primary-fg);
  text-decoration: none;
  border: 1px solid var(--button-primary-border);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}
.btn:hover,
.btn.btn-state-hover { background: var(--button-primary-bg-hover); border-color: var(--button-primary-bg-hover); }
.btn:active,
.btn.btn-state-active { background: var(--button-primary-bg-active); border-color: var(--button-primary-bg-active); }
/* Focus is a visible RING outside the button, in the scope's ink — it clears 3:1
 * against the surface around it on every band (the generator asserts the page
 * pair; each band's ink is AA on its band). Never removed for looks. */
.btn:focus-visible,
.btn.btn-state-focus { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

/* The PRIMARY by name — a form's own submit, at the start of its row, set solid.
 * (No variant paints the same filled primary.) */
.btn-primary {
  align-self: flex-start;
  font: 600 var(--fs-base)/1 var(--font-body);
}

/* SECONDARY: outlined and transparent, label + outline in --button-secondary-fg —
 * petrol on a pale section, the band's ink on an accent band (Q-68: the action of
 * a band whose main action lives elsewhere). Filling it pale was wrong: on the
 * amber band the label turned white and it read as an empty box. */
.btn-secondary {
  background: transparent;
  color: var(--button-secondary-fg);
  border-color: var(--button-secondary-border);
}
/* GHOST: no fill and no outline until hover — repeated and low-emphasis actions. */
.btn-ghost {
  background: transparent;
  color: var(--button-ghost-fg);
  border-color: transparent;
}
.btn-secondary:hover, .btn-secondary.btn-state-hover,
.btn-ghost:hover, .btn-ghost.btn-state-hover { background: color-mix(in oklab, currentColor 12%, transparent); }
.btn-secondary:active, .btn-secondary.btn-state-active,
.btn-ghost:active, .btn-ghost.btn-state-active { background: color-mix(in oklab, currentColor 20%, transparent); }
.btn-secondary:hover, .btn-secondary.btn-state-hover,
.btn-secondary:active, .btn-secondary.btn-state-active { border-color: var(--button-secondary-border); }
.btn-ghost:hover, .btn-ghost.btn-state-hover,
.btn-ghost:active, .btn-ghost.btn-state-active { border-color: transparent; }

/* LINK: an inline text action that must still be a button — underlined, so colour
 * is never its only cue, and still a 44px target. */
.btn-link {
  background: transparent;
  color: var(--button-link-fg);
  border-color: transparent;
  padding-inline: var(--space-2);
  text-decoration: underline;
  text-underline-offset: .2em;
}
.btn-link:hover, .btn-link.btn-state-hover,
.btn-link:active, .btn-link.btn-state-active { background: transparent; border-color: transparent; color: var(--button-link-fg-hover); text-decoration-thickness: 2px; }

/* DANGER: outlined in the danger colour, not filled — a filled red button is the
 * easiest thing on the screen to hit by accident; the final confirmation sits
 * behind the typed-name dialog. */
.btn-danger {
  background: transparent;
  color: var(--button-danger-fg);
  border-color: var(--button-danger-border);
}
.btn-danger:hover, .btn-danger.btn-state-hover { background: var(--button-danger-bg-hover); border-color: var(--button-danger-border); }
.btn-danger:active, .btn-danger.btn-state-active { background: var(--button-danger-bg-active); border-color: var(--button-danger-border); }

/* The media trigger ("Vaihda media", a `secondary` inside a media slot) sits on a
 * PHOTO, not a band: it takes the fixed light well (--on-dark fill, --on-light
 * label — never rebound, AA-asserted) so it reads on any image. */
.media > .btn-secondary {
  background: var(--on-dark);
  color: var(--on-light);
  border-color: var(--on-dark);
}
.media > .btn-secondary:hover,
.media > .btn-secondary:active { background: var(--surface-accent-2-subtle); border-color: var(--surface-accent-2-subtle); }

/* DISABLED (`button.disabled`, change 1793449369): the action exists but cannot be
 * used yet. It comes AFTER every variant rule, the media trigger's light well
 * included — same specificity, so the later rule wins (change 1793601632). It cannot be
 * used yet — the member's once-a-week "Salli sähköpostit". The same in every
 * variant: transparent, a DASHED outline (shape, not colour alone) and the muted
 * label, which stays AA-legible; never hoverable. It keeps its 44px target and its
 * shape, and its reason + date sit beside it in an `infobox`. */
.btn.btn-disabled,
.btn.btn-disabled:hover,
.btn.btn-disabled:active,
.btn:disabled,
.btn:disabled:hover,
.btn:disabled:active {
  background: transparent;
  color: var(--button-disabled-fg);
  border: 1px dashed var(--button-disabled-border);
  cursor: not-allowed;
}

/* The signed-in bar's profile link (`button` icon `profile`): icon-only, a
 * 44px circle that is the hit area, holding a 24px person glyph in currentColor —
 * so it takes the bar's text colour like the burger beside it. Its text
 * ("Profiili") is the accessible name, visually hidden with a zero font size (the
 * `.btn-edit` precedent). Fixed, never shrinking: the brand wordmark is the bar's
 * only shrinking item.
 *
 * The glyph is the icon sheet's `user` (Lucide `circle-user-round`, ISC),
 * `var(--ico-user)` (internal/web/ui/icon) — one source of the SVG bytes. */
.btn-profile {
  position: relative;
  justify-content: center;
  flex: none;
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 0;
  font-size: 0;
  color: var(--fg-strong);
  background: transparent;
  border: 0;
  border-radius: 50%;
}
.btn-profile::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: calc(24px * var(--text-scale));
  height: calc(24px * var(--text-scale));
  background-color: currentColor;
  -webkit-mask: var(--ico-user) center / contain no-repeat;
  mask: var(--ico-user) center / contain no-repeat;
}
.btn-profile:hover,
.btn-profile:active { background: var(--primary-soft); color: var(--fg-strong); }
.btn-profile:focus-visible { outline: 2px solid currentColor; outline-offset: -2px; }
/* The generic `.navbar .btn` padding and type would undo the hit area. */
.navbar .btn.btn-profile { width: 44px; padding: 0; font-size: 0; }

/* --- cards -------------------------------------------------------------- */

.cards { display: grid; gap: var(--space-5); margin-top: var(--space-6); }
.cols-2 .cards { grid-template-columns: repeat(2, 1fr); }
.cols-3 .cards { grid-template-columns: repeat(3, 1fr); }
.cols-4 .cards { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--panel);
  border: var(--surface-border) solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-5);
  box-shadow: var(--shadow-card);
}
/* Variants are an AUTHORING choice (the spec picks them), unlike tone which is
 * derived from context. They change emphasis only — never shape. */
.card-flat { box-shadow: none; }
/* A variant may author stronger GEOMETRY, but the colour still comes from the
 * theme — a literal here ignores the appearance and left a brown shadow under an
 * elevated card on the dark band. */
.card-elevated { box-shadow: 0 10px 32px var(--shadow-color); }

.card h3 { font-size: var(--fs-lg); margin: 0 0 var(--space-2); }
.card p { margin: 0; color: var(--muted); font-size: var(--fs-sm); }

/* The card mark is a CSS monogram — no image asset, no icon font. */
.cardmark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-deep);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: var(--fs-sm);
  margin-bottom: var(--space-3);
}

.badge {
  display: inline-block;
  margin-top: var(--space-3);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill);
  background: var(--primary-soft);
  color: var(--primary-deep);
  font-size: var(--fs-xs);
  font-weight: 600;
}

/* --- snippet ------------------------------------------------------------ */

.snippet {
  margin: var(--space-6) 0 0;
  background: var(--brand-brown-deep);
  color: var(--on-dark);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  overflow-x: auto;
  font: var(--fs-sm)/var(--leading-body) var(--font-mono);
  box-shadow: var(--shadow-card);
}
.snippet code { white-space: pre; }
.snippet-label {
  font: 700 var(--fs-xs)/1 var(--font-body);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 var(--space-3);
}

/* --- app shell ---------------------------------------------------------- */

.content {
  width: 100%;
  flex: 1 0 auto;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: calc(var(--band-y) * .5) var(--gutter);
}
/* A detail page opens with its back-link row (`breadcrumb` with a `back` link, change
 * 1794378700): the row sits CLOSE under the navbar — the same --space-3 above it as the row
 * leaves below it to the page head. */
.content:has(> .breadcrumb:first-child > .wrap > .link-back) { padding-top: var(--space-3); }
/* A data-dense list page (`appmain` width `wide`): the --wrap-wide cap (--wrap + 200px), so
 * a table's rows — the users list's two dates and both row actions — fit on one
 * line on a wide screen. Same gutter; only the cap moves. */
.content.content-wide {
  max-width: var(--wrap-wide);
}
/* ...and a nested section's own .wrap (a table carries one) takes the wider
 * column too, so the page head, the page action and the table share one edge. */
.content.content-wide .wrap {
  max-width: none;
}
/* A single short task (`appmain` width `narrow`, change 1794408116 — /register's wait and
 * sign-in-to-continue panels): the column caps at the text measure plus its two gutters
 * and centres (.content already centres), so a panel's notice and form share one
 * readable edge (the form rule: capped at --measure, centred, full width when narrower). */
.content.content-narrow {
  max-width: calc(var(--measure) + 2 * var(--gutter));
}

/* A section component brings its own .wrap gutter because it is normally a
 * top-level block. Inside .content that gutter is applied twice, so every nested
 * section sat one --space-5 right of the page heading. The content column owns
 * the gutter here. */
.content .wrap { padding-inline: 0; }

/* Buttons placed side by side straight in the content column (a page's ways out —
 * "Avaa sivu", "Muokkaa suomeksi" …) keep a FIXED gap: it is internal to the row,
 * not measured against the screen. Without it they touched — the only space was
 * the whitespace between inline tags, which a rendered DOM does not have. */
.content > .btn { margin: 0 var(--space-2) var(--space-2) 0; } /* trailing: a wrapped row starts flush */
/* A list screen's ADD action ("Lisää sivu", "Lisää asettelu") stands alone between the tab row
 * and the list: the same space below it as the tab row leaves above it (GATE 1 round 3,
 * developer 2026-11-08: "Lisää asettelu has more margin below than above"). Below 1200px the
 * compact list then opens on its rule straight away (see .tablewrap there). */
/* The media library's "Lataa tiedosto" (change 1794557517) is the same kind of list action. */
.content > .btn-add,
.content > .btn-upload { margin-bottom: var(--space-5); }
/* `link` variant `back`: a detail page's way back up ("Takaisin"), first in its
 * breadcrumb's row under the navbar (the `back` slot, change 1794378700). The mirror of
 * `link-arrow`: the same chevron drawn by CSS, but LEADING and pointing left,
 * so it can never wrap away from its label; a 44px target. */
.link-back {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  margin-bottom: var(--space-3);
  color: var(--action-text);
  text-decoration: none;
  font-size: var(--fs-sm);
  font-weight: 600;
}
.link-back::before,
.breadcrumb:has(> .wrap > .link-back) .crumb:nth-last-child(2) > .crumblink::before {
  content: "";
  width: calc(7px * var(--text-scale));
  height: calc(7px * var(--text-scale));
  border-bottom: 1.5px solid currentColor;
  border-left: 1.5px solid currentColor;
  transform: rotate(45deg);
}
.link-back:hover { color: var(--fg-strong); }

.page-head { margin-bottom: var(--space-6); }
.page-title {
  font-family: var(--font-heading);
  font-size: var(--fs-xl);
  margin: 0 0 var(--space-2);
}
.muted { color: var(--muted); margin: 0; }

/* --- forms -------------------------------------------------------------- */

.form { display: flex; flex-direction: column; gap: var(--space-5); }
/* A form in the app shell's content column (profile, settings-password,
 * settings-email, users-invite) is capped at the text measure like every other
 * form (dev POLICY: never stretched across a 1440 column); the app shell's
 * headings are left-aligned, so the form stays at the column's start. Full width
 * below the measure (change 1793449369). */
.content > .form { max-width: var(--measure); }

.field { display: flex; flex-direction: column; gap: var(--space-2); }

.field-label {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--fg-strong);
}

/* A required field is marked in the LABEL, not by colour alone. */
.field-required .field-label::after {
  content: " *";
  color: var(--danger);
}

.input {
  width: 100%;
  min-height: 44px;
  padding: 0 var(--space-4);
  font: var(--fs-base)/var(--leading-body) var(--font-body);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
/* A CONTROL IS A LIGHT WELL ON EVERY TONE. A control carries its own fill, so it
 * cannot take the band's text colour: on a strong accent band --fg is light while the
 * fill stays pale, and the typed text vanished (the hero heading's editor showed
 * an empty box). Text and fill are therefore the FIXED pair --on-light on
 * --on-dark (19:1, never rebound, the same in both appearances) for every
 * control: the text input, the textarea, the file input, the select and the picture check's board. One
 * rule, not one per control and not one per tone. */
.input,
.captcha-board,
.toolfield-select {
  color: var(--on-light);
  background-color: var(--on-dark);
}
.input::placeholder { color: color-mix(in oklab, var(--on-light) 72%, transparent); }
.input:hover { border-color: var(--muted); }

/* Focus is a visible RING, never an outline removed for looks. */
.input:focus-visible {
  outline: 2px solid var(--primary-deep);
  outline-offset: 2px;
  border-color: var(--primary-deep);
}

.input[aria-invalid="true"] { border-color: var(--danger); }

.field-err {
  font-size: var(--fs-sm);
  color: var(--danger);
}

.form-err {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  background: var(--danger-bg);
  color: var(--danger);
  font-size: var(--fs-sm);
  border: 1px solid var(--danger);
}

/* --- auth card ---------------------------------------------------------- */

/* No 100vh here: the body is already a full-height column and <main> grows to
 * fill it, so the card centres in whatever the bar and footer leave — a fixed
 * 100vh under a navbar would add one bar-height of scroll to every auth page.
 * No background of its own (change 1794125555, GATE 1): the plain page background. */
.auth-wrap {
  display: grid;
  place-items: center;
  padding: var(--space-6) var(--gutter);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  padding: var(--space-7);
  background: var(--panel);
  border: var(--surface-border) solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.auth-title {
  font-family: var(--font-heading);
  font-size: var(--fs-xl);
  text-align: center;
  margin: 0 0 var(--space-6);
}

/* --- table -------------------------------------------------------------- */

.tablewrap {
  overflow-x: auto;
  background: var(--panel);
  border: var(--surface-border) solid var(--border);
  border-radius: var(--radius);
}

.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}
/* Cells: --space-4 above and below, --space-3 at the sides: with six columns (the users list) wider sides
 * pushed the actions column out of the table at its narrowest (1200px). */
.tbl th,
.tbl td {
  text-align: left;
  padding: var(--space-4) var(--space-3);
  border-bottom: 1px solid var(--border);
}
.tbl th {
  font-weight: 600;
  color: var(--muted);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.tbl tbody tr:last-child td { border-bottom: 0; }

/* --- badge variants ----------------------------------------------------- */

.badge-admin { background: var(--primary-soft); color: var(--primary-deep); }
.badge-user { background: var(--surface-accent-2-subtle); color: var(--muted); }
.badge-anonymous { background: var(--surface-accent-2-subtle); color: var(--muted); }
.badge-active { background: var(--success-bg); color: var(--success); }
.badge-inactive { background: var(--danger-bg); color: var(--danger); }
/* Change 1794343431: an account whose sign-in an admin blocked — red: the person cannot get in. */
.badge-blocked { background: var(--danger-bg); color: var(--danger); }
/* F-004 delivery status (CD-003 → Status → badge → label): colour by the raw
 * state, the word from the catalog. `opened` is OUTLINED (an inset ring, so the
 * chip keeps its size) — it is a hint, not a status. */
.badge-invited { background: var(--surface-accent-2-subtle); color: var(--muted); }
/* An invitation past its expiry: a warning — the admin has something to do
 * (re-send or cancel), unlike a live `invited` one. */
.badge-expired { background: var(--primary-soft); color: var(--warn); }
.badge-pending { background: var(--surface-accent-2-subtle); color: var(--muted); }
.badge-delivered { background: var(--success-bg); color: var(--success); }
.badge-deferred { background: var(--primary-soft); color: var(--warn); }
.badge-failed { background: var(--danger-bg); color: var(--danger); }
.badge-opened { background: transparent; color: var(--info); box-shadow: inset 0 0 0 1px currentColor; }
/* Chips in a table cell (a status and its opened hint) sit centred on the row
 * (no chip top margin) and keep a fixed gap after
 * each one. */
.tbl td > .badge { margin: var(--space-1) var(--space-2) var(--space-1) 0; }
/* A `meta` cell (the date an account was added) is a column of its own: muted,
 * tabular numerals so the dates line up, never broken mid-value. Stacked, it
 * keeps its label ("Lisätty") and follows the state on its line when it fits. */
.tbl .cell-meta { white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; }
.tbl .cell-index { white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; }
/* The running number is as narrow as its digits (`width: 1%` shrink-wraps an auto-layout column), so
 * the name column starts at the same place in every numbered table — the layout editor and the page
 * screen list the same elements and must line up (GATE 1 round 3). */
@media (min-width: 1200px) { .tbl .cell-index { width: 1%; } }
/* A cell's `note`: muted context on its own line — the email under the username. */
.tbl .cell-note { display: block; color: var(--muted); }
/* A record's note line keeps a clear gap under its name — two lines, not one crowded block
 * (GATE 1 round 3: "not enough padding or margin under the titles"). */
.tbl .cell-primary .cell-note { margin-top: var(--space-2); }
/* The record's name (the `primary` cell) is strong; its note is not. */
.tbl .cell-primary { font-weight: 600; }
/* The record's link is a line of its own (shrink-wrapped, so the click target stays
 * the text): a `text` after it — the users list's person name — starts the next
 * line even when there is no `note` between (a newsletter-only person, whose
 * address is the link). */
.tbl .cell-primary > .link { display: block; width: fit-content; }
.tbl .cell-primary .cell-note { font-weight: 400; }
/* A row action and a state chip keep their label on one line — "Lähetä / salasanalinkki" broken
 * over two lines in a squeezed column reads as two buttons. */
.tbl .btn, .tbl .badge { white-space: nowrap; }
/* A row's actions stay side by side on one line in the table. */
.tbl .cell-actions { white-space: nowrap; }
/* A numbered step row (`index`: a course plan's step) with three or four actions (Siirrä ylös ·
 * Siirrä alas · Muokkaa · Poista) wraps them two to a line so the table fits its panel; Poista
 * stays last. */
@media (min-width: 1200px) {
  .tbl tr:has(> .cell-index) > .cell-actions:has(> .form-inline:nth-child(3)) { white-space: normal; width: 18rem; }
}
/* A table INSIDE a panel (user-detail's email history) is the panel's content:
 * the panel is the surface, so the wrapper drops its own (never a card in a
 * card) and pulls out by the cell padding so the cell text lines up with the
 * panel heading. Below 1200px the compact list's own rules take over. */
@media (min-width: 1200px) {
  .panel .tablewrap { background: none; border: 0; border-radius: 0; margin-inline: calc(-1 * var(--space-3)); }
}

/* --- footer ------------------------------------------------------------- */

/* The footer is set apart by its GROUND alone, never by a rule (developer
 * 2026-11-11: "there is also separate line before footer, its distracting, the
 * footer could be just different color"), and that ground is WARM, not grey
 * (GATE 1, Q-160: "gray footer is uggly, use little more colorful and darker hue
 * than ivory"): the GENERATED --surface-footer (alive light: the primary ramp's
 * step 4, a sand; dark: a deep warm brown). Its text is --fg, AA-asserted on that
 * ground by the generator with --fg-strong (the link hover) and the focus ring;
 * the legal line stays secondary by its smaller size. */
.footer {
  background: var(--surface-footer);
  padding: var(--space-7) 0;
  color: var(--fg);
  font-size: var(--fs-sm);
  text-align: center;
}
/* The band that ends the page meets the footer's own ground: the ground divides
 * them, so a RAISED band drops its bottom hairline. A SUNKEN band keeps it: its
 * ground (alive light 1.07:1 to the footer) is too close to divide them alone. */
main > .section:last-child:not(.tone-sunken) { border-bottom: 0; }

/* --- hero layout -------------------------------------------------------- */

.herogrid { display: grid; gap: var(--space-8); }
/* Two columns exactly when the hero HAS a media child — its presence is the
 * layout decision, so there is no placement prop to keep in step with it. */
.herogrid:has(> .media) { grid-template-columns: 1fr 1fr; align-items: center; }
.herobody { min-width: 0; }
.heroactions { display: inline-flex; flex-wrap: wrap; gap: var(--space-4); }

/* --- section head alignment ---------------------------------------------- */

.head-left { text-align: left; }

/* The study centres its section heads and flanks the eyebrow with rules. The
 * rules are drawn, not characters, so they scale with the type. */
.head-center .prose { max-width: var(--measure); margin-inline: auto; text-align: center; }
.head-center .eyebrow { display: flex; align-items: center; justify-content: center; gap: var(--space-4); }
.head-center .eyebrow::before,
.head-center .eyebrow::after {
  content: "";
  width: var(--space-8);
  border-top: 1px solid var(--border);
}

/* The section head's trailing link is pushed to the right edge by its own auto
 * margin, so it never shifts the centred heading and never depends on the
 * section's height — an absolute `bottom` put it below the cards. */
/* `.cards` is the inner GRID, not the section — the head link lives beside it,
 * under `.section`. */
.section .headlink {
  display: flex;
  width: fit-content;
  margin-left: auto;
  margin-top: 0;
}

/* --- split band ---------------------------------------------------------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: var(--space-8);
}
.split-body { max-width: var(--measure); }
.split-body h2 { font-size: var(--fs-2xl); margin: 0 0 var(--space-4); }
.split-body p { color: var(--muted); margin: 0 0 var(--space-5); }

.split-media-right .split > .media { order: 2; }
.split-media-left .split > .media { order: -1; }

/* --- card media + arrow links -------------------------------------------- */

/* The card's media strip is full-bleed across the card's own padding, so the
 * image sits flush at the top — see the media section. */

.link-arrow,
.btn-arrow { display: inline-flex; align-items: center; gap: var(--space-3); }

.link-arrow {
  margin-top: var(--space-4);
  color: var(--action-text);
  text-decoration: none;
  font-size: var(--fs-sm);
  font-weight: 600;
}
.link-arrow:hover { color: var(--fg-strong); }

/* The arrow is drawn from borders — no icon font, no inline svg. */
.link-arrow::after,
.btn-arrow::after {
  content: "";
  width: calc(7px * var(--text-scale));
  height: calc(7px * var(--text-scale));
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: rotate(45deg);
}

/* --- quotes -------------------------------------------------------------- */

.quotes { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-5); margin-top: var(--space-6); }

.quote {
  margin: 0;
  padding: var(--space-5);
  background: var(--panel);
  border: var(--surface-border) solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  color: var(--fg);
}

.cite {
  display: block;
  margin-top: var(--space-4);
  font-size: var(--fs-sm);
  color: var(--muted);
}

/* --- newsletter ---------------------------------------------------------- */

.newsletter-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: var(--space-3);
  margin-top: var(--space-6);
}
.head-center .newsletter-form { justify-content: center; }
.newsletter-form .field-label { width: 100%; }
.head-center .newsletter-form .field-label { text-align: center; }
.newsletter-form .input { width: auto; min-width: 16rem; }

/* --- toolbar ------------------------------------------------------------ */

/* A band of small labelled controls. It spans the FULL viewport so its rule and
 * ground reach both edges, while its contents stay aligned with the rest of the
 * page: the inline padding accounts for BOTH the content cap and the gutter that
 * .wrap adds inside it, so matching only the cap would leave the first label one
 * gutter short of every other block.
 *
 * It is padding rather than an inner .wrap because a toolbar is furniture at the
 * page edge, not a content column — there is no measure to respect.
 *
 * Its ground and text come from the tone it carries in its template
 * (`tone-accent-2-subtle`), never from the page: a fixed tool surface keeps its
 * own on-colours in every appearance — the page's --muted turned light in dark
 * and the labels vanished on the yellow (task 1794379069). */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-5);
  width: 100%;
  padding-block: var(--space-4);
  padding-inline: max(var(--gutter), calc((100% - var(--wrap)) / 2 + var(--gutter)));
  border-top: 1px solid var(--border);
  font-size: var(--fs-xs);
}

/* The label and its control are ONE flex item. As two siblings in the toolbar's
 * flex row they could wrap apart, leaving a label at the end of one line and the
 * select it names at the start of the next — which is what the flat row did. */
.toolfield {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}

.toolfield-label {
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}

/* The native arrow sits hard against the border, so the control is drawn instead:
 * appearance:none plus a chevron inset by the same space as the text, giving even
 * padding on both sides of the content rather than text-padding-only. */
.toolfield-select {
  appearance: none;
  min-height: 44px;
  min-width: 0;
  padding-block: 0;
  padding-inline: var(--space-3) var(--space-7);
  font: var(--fs-sm)/1 var(--font-body);
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
                    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-size: calc(6px * var(--text-scale)) calc(6px * var(--text-scale)), calc(6px * var(--text-scale)) calc(6px * var(--text-scale));
  background-position: right calc(var(--space-4) + 6px * var(--text-scale)) center, right var(--space-4) center;
  background-repeat: no-repeat;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.toolfield-select:hover { border-color: var(--muted); }
.toolfield-select:focus-visible { outline: 2px solid var(--primary-deep); outline-offset: 2px; }

/* A link after the controls (the prototype's screen index) is the bar's way
 * onward, not one of its settings: it takes a line of its own at every width
 * (flex-basis 100%), its text centred under the controls, and it is a full 44px
 * target like the selects. */
.toolbar .link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  flex-basis: 100%;
  justify-content: center;
  font-size: var(--fs-sm);
  font-weight: 700;
}

/* --- motion ------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  .navlink, .btn { transition: background var(--motion), color var(--motion); }
}

/* Reduced motion: the bird never leaves its twig — bird.js does not fly it, and
 * this rule holds it home even if a script tried. */
@media (prefers-reduced-motion: reduce) {
  .bird.bird-flying { position: absolute; top: auto; bottom: calc(100% / 7); translate: none; }
  .bird.bird-moving { will-change: auto; }
}

/* --- responsive (breakpoints: sm 480 · md 768 · lg 1024, per tokens.md)
 *
 * Only STEPS live here. Anything that merely gets smaller is a fluid token
 * (--fs-*, --gutter, --band-y) and never appears in a media query. ------- */

@media (max-width: 1024px) {
  .cols-3 .cards, .cols-4 .cards { grid-template-columns: repeat(2, 1fr); }
}

/* Data tables switch at 1200px — a step of their own, above lg: the users list's
 * six columns (two "dd.mm.yyyy hh.mm" dates, both row actions side by side) need
 * ~1090px of content (measured: one line from a 1135px viewport) at the text
 * sizes we keep; 1200 leaves room for longer real data. Below it, the list. */
@media (max-width: 1199px) {
  /* ux-patterns.md: a data table is a table >= 1200px and a COMPACT LIST below it —
   * the standard mobile shape of a desktop table. No card chrome and no second
   * inset: the wrapper drops its panel, so every record aligns with the page
   * gutter (one alignment edge). The list has a clear START — section spacing
   * and a rule above its first record — so the page action above it (Kutsu
   * käyttäjä, Uusi sivu) never reads as part of the first record; records are
   * divided by the same rule with equal spacing on both sides. Hierarchy replaces
   * the column labels: each cell's `role` places it (the row is a wrapping flex
   * line) in one fixed rhythm — the heading block (`primary`, then `secondary` as
   * a muted line under it), the state line (every `badges` cell and the muted
   * `meta` value at their natural widths, wrapping as whole items), any plain
   * fields (label and value on one line), then `actions`: natural-width 44px
   * buttons in a wrapping row. A `value: empty` ("—") cell is left out. Fixed
   * spacing — all of it is internal to the list. */
  .tablewrap { overflow: visible; margin-top: var(--space-6); background: none; border: 0; border-top: 1px solid var(--border); border-radius: 0; }
  /* Inside a panel the list follows the panel intro, which already spaces it. */
  .panel .tablewrap { margin-top: 0; }
  /* After a list screen's add action, the button's own bottom space is the opening space. */
  .content > .btn-add + .wrap > .tablewrap { margin-top: 0; }
  /* An add button above a list INSIDE a panel (change 1794230992, "Lisää pääsyavain"):
     the list opens a step below it, so its first rule never touches the button. */
  .panel > .btn + .wrap > .tablewrap { margin-top: var(--space-5); }
  .tbl thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .tbl, .tbl tbody { display: block; width: 100%; }
  .tbl tr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: var(--space-2);
    padding: var(--space-4) 0;
    border-bottom: 1px solid var(--border);
  }
  /* The list opens on a rule and divides its records with one; the last record
   * ends without one (and without its bottom padding), so only the page's own
   * section spacing follows it — never two spacings stacked. */
  .tbl tbody tr:last-child { padding-bottom: 0; border-bottom: 0; }
  .tbl .cell { flex: 1 0 100%; min-width: 0; margin-top: var(--space-2); padding: 0; border: 0; overflow-wrap: anywhere; }
  /* ONE label style for every card: the column name in sentence case, muted, at
   * the value's size ("Lisätty 18.10.2026", "Asettelu Etusivu") in a fixed-width
   * label column so the values line up — not the
   * uppercase micro-label of a table header. */
  .tbl .cell::before { content: attr(data-label); display: inline-block; min-width: 7rem; margin-right: var(--space-2); color: var(--muted); }
  /* A labelled field's value HANGS in its column: the cell is indented by the label column and
   * the label is pulled back into that indent, so a long value wraps under its own first line,
   * never back under the label (change 1793886701 — "Selite", "Ilmoittaudu viimeistään …").
   * Not a grid: the value's inline children (text, a link, a note) would split into cells. */
  .tbl .cell:not(.cell-primary, .cell-secondary, .cell-badges, .cell-actions, .cell-index) { padding-inline-start: calc(7rem + var(--space-2)); }
  .tbl .cell:not(.cell-primary, .cell-secondary, .cell-badges, .cell-actions, .cell-index)::before { width: 7rem; margin-inline-start: calc(-7rem - var(--space-2)); }
  .tbl .cell-primary::before,
  .tbl .cell-secondary::before,
  .tbl .cell-badges::before,
  .tbl .cell-actions::before { content: none; }
  /* ONE order for every card, whatever the column order: heading (+ its chip) →
   * secondary line → the badges row (badges ONLY) → labelled fields and dates,
   * one per row →
   * actions. Done with CSS `order`, never by reordering the markup
   * (responsiveness.md): the reading and Tab order stay the table's, and the
   * only focusable things (links in the heading, the actions) keep their places
   * at the start and the end. */
  .tbl .cell-secondary { order: 1; }
  .tbl .cell-badges { order: 2; }
  .tbl .cell:not(.cell-primary, .cell-secondary, .cell-badges, .cell-actions) { order: 3; }
  .tbl .cell-actions { order: 4; }
  /* A record whose heading is followed by chips (the users list: role, then
   * state) gets a right-aligned CHIP COLUMN at its top: the first chip on the
   * heading line, the next directly under it on the note (email) line, both on
   * one right edge. The row becomes a two-column grid for that — markup and
   * reading order unchanged; the heading column is minmax(0, 1fr), so a long
   * email wraps before it can reach the chips. Every later cell spans the full
   * width in the shared order. Without such chips (the pages list) the row stays
   * the wrapping line above. */
  .tbl .cell-primary { margin-top: 0; font-size: var(--fs-base); }
  /* A row's running number (`index`, a course plan's step) is no labelled field: it stands
   * in front of the heading as "1.", the heading indented beside it, so the steps read
   * as a numbered list. */
  .tbl tr:has(> .cell-index) { position: relative; }
  .tbl tr:has(> .cell-index) > .cell-primary { padding-left: 1.75rem; }
  .tbl .cell-index { position: absolute; left: 0; top: var(--space-4); display: flex; margin: 0; line-height: inherit; }
  .tbl .cell-index::before { content: none; }
  .tbl .cell-index::after { content: "."; }
  .tbl .cell-primary .cell-note { font-size: var(--fs-sm); }
  .tbl tr:has(> .cell-primary + .cell-badges:not(.cell-empty)) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: var(--space-3);
    align-items: start;
  }
  .tbl .cell { grid-column: 1 / -1; }
  .tbl .cell-primary:has(+ .cell-badges:not(.cell-empty)) { grid-column: 1; grid-row: 1 / span 2; }
  .tbl .cell-primary + .cell-badges:not(.cell-empty) { grid-column: 2; grid-row: 1; justify-self: end; margin-top: 0; }
  .tbl .cell-primary + .cell-badges:not(.cell-empty) + .cell-badges:not(.cell-empty) { grid-column: 2; grid-row: 2; justify-self: end; margin-top: var(--space-1); }
  .tbl .cell-secondary { margin-top: 0; color: var(--muted); }
  .tbl .cell-badges { flex: 0 1 auto; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
  .tbl .cell-badges > .badge { margin: 0; }
  /* Several chips in ONE chip-column cell (an email's status + its opened hint)
   * stack on the right edge like the users list's two chip cells — side by
   * side they squeezed the heading until a word broke mid-letter. The second chip
   * cell stacks its own chips the same way (the state + the mail-blocked mark,
   * change 1793433282). */
  .tbl .cell-primary + .cell-badges:not(.cell-empty),
  .tbl .cell-primary + .cell-badges:not(.cell-empty) + .cell-badges:not(.cell-empty) { flex-direction: column; align-items: flex-end; gap: var(--space-1); }
  /* A member's plan step (heading, Laji chip, then a `secondary` state + time line) keeps its
   * heading full width — a step name never wraps beside its chip: heading, the Laji chip on
   * its own line, then the state and time. */
  .tbl tr:has(> .cell-primary + .cell-badges):has(> .cell-secondary) { display: flex; }
  .tbl tr:has(> .cell-secondary) > .cell-primary + .cell-badges:not(.cell-empty) { order: 1; flex-direction: row; align-items: center; margin-top: var(--space-2); }
  .tbl tr:has(> .cell-primary + .cell-badges) > .cell-secondary { order: 2; margin-top: var(--space-2); }
  .tbl .cell-meta { overflow-wrap: normal; }
  .tbl .cell-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-3); }
  .tbl .cell-empty { display: none; }
}

@media (max-width: 768px) {
  .quotes { grid-template-columns: 1fr; }
  /* Band padding is NOT stepped here — --band-y already carries it down
   * continuously. Stepping it as well produced a 96px-to-48px drop across one
   * pixel of width, under a heading that had been scaling smoothly the whole
   * way. */
  .cols-2 .cards, .cols-3 .cards, .cols-4 .cards { grid-template-columns: 1fr; }

  /* Two-column bands become ONE column with the media FIRST. Side by side at
   * 360px gives each half ~155px: the image is too small to read as an image and
   * the text column falls below a usable measure. Full-width media above the
   * copy is the honest version of the same composition — it keeps the visual
   * hook and gives the prose the whole column.
   *
   * `order` rather than a DOM change, so the source order (copy first) stays the
   * reading and tab order a screen reader gets on any width. */
  .herogrid:has(> .media),
  .split { grid-template-columns: 1fr; }
  .herogrid, .split { gap: var(--space-6); }
  .herogrid > .media,
  .split-media-right .split > .media,
  .split-media-left .split > .media { order: -1; }



  /* The heading's 16ch cap is a DESKTOP measure: it exists to stop a display
   * heading running the full 1140px. On one narrow column it only forces early
   * wraps. */
  .hero h1 { max-width: none; }

  /* The flanking rules shrink before the eyebrow's text does. */
  .head-center .eyebrow::before,
  .head-center .eyebrow::after { flex: 0 1 var(--space-8); min-width: 0; }

  /* A fixed 16rem minimum is wider than the column it sits in below ~400px. */
  .newsletter-form .input { min-width: min(16rem, 100%); }

  .auth-card { padding: var(--space-5); }
  .snippet { padding: var(--space-4); }
  /* The bar carries brand + its icon buttons + burger at 390px, which it
   * only does because all three step down here. The brand is additionally the
   * one item allowed to SHRINK, so a narrower phone clips the wordmark rather
   * than pushing a button off-screen and giving the whole page a sideways
   * scrollbar. */
  .navbar .wrap { min-height: 56px; padding-block: var(--space-2); gap: var(--space-3); }
  .navbrand { font-size: var(--fs-base); gap: var(--space-2); flex: 0 1 auto; min-width: 0; overflow: hidden; }
  .navbrand::before { width: calc(16px * var(--text-scale)); height: calc(16px * var(--text-scale)); flex: none; }
  /* Below md the heart is as tall as the 27px wordmark (GATE 1, 2026-10-31: the
   * Figma 390 navbar 14:305 draws it 12.647px and lags), gap --space-2; the
   * wordmark keeps its optical offset (above). */
  .navbrand .logo-heart { height: calc(27px * var(--text-scale)); }
  .navbrand .logo-wordmark { height: calc(27px * var(--text-scale)); }
  /* The bird and its twig follow the 27px wordmark: 1.5px per art pixel. */
  .bird-twig { top: calc(3.75px * var(--text-scale)); width: calc(18px * var(--text-scale)); height: calc(10.5px * var(--text-scale)); }
  .bird { width: calc(18px * var(--text-scale)); height: calc(10.5px * var(--text-scale)); }
  .navbar .btn { padding: 0 var(--space-3); font-size: var(--fs-xs); }

  /* Below the breakpoint the WHOLE group becomes the drawer, so the bar links
   * and the menu links end up in one panel without either being rendered twice.
   * The burger is always present here — there is nowhere else for the links to
   * go — so it is not gated on :has() as it is on wide screens. Open, it is a
   * FULL-SCREEN sheet under the sticky bar: edge to edge, down to the screen's
   * bottom (`100%` is the bar's height, the containing block of an absolute box;
   * `dvh`, so a phone's collapsing toolbar never hides the bottom), scrolling its
   * own entries while the page behind is locked (`html:has(.navbar.nav-open)`
   * above) — one scroll area at a time (change 1794075039, Q-115). */
  .navgroup {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 6;
    flex-direction: column;
    height: calc(100dvh - 100%);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: var(--space-2) var(--gutter);
    background: var(--bg-light);
    color: var(--on-light);
    border: 0;
    border-top: 1px solid var(--border);
    border-radius: 0;
    box-shadow: none;

    --fg: var(--on-light);
    --fg-strong: var(--on-light);
    --muted: color-mix(in oklab, var(--on-light) 72%, transparent);
    --border: color-mix(in oklab, var(--on-light) 16%, transparent);
    --primary-soft: color-mix(in oklab, var(--on-light) 8%, transparent);
    --primary-deep: var(--on-light);
    --action-text: var(--brand-brown);
    --focus-ring: var(--brand-brown);
    --button-secondary-fg: var(--brand-brown);
    --button-secondary-border: var(--brand-brown);
    --button-ghost-fg: var(--brand-brown);
    --button-link-fg: var(--brand-brown);
    --button-link-fg-hover: var(--on-light);
    --button-disabled-fg: var(--on-light);
    --button-disabled-border: var(--on-light);
    /* the light-surface escape — keep in sync with `.navmenu, .form-editor` */
  }
  .navbar.nav-open .navgroup { display: flex; }

  .navlinks { flex-direction: column; align-items: stretch; width: 100%; overflow: visible; }
  .navlink { width: 100%; }
  /* In the drawer the current page is still marked by an underline, but under its
   * LABEL: the bar's inset edge shadow would run the full row and bend round the
   * row's rounded corners (change 1794075039). */
  .navlink-current {
    box-shadow: none;
    text-decoration: underline 2px;
    text-underline-offset: 4px;
  }
  /* In the drawer a row has the drawer's width and nothing to fold into, so a page
   * label longer than that wraps inside its row (F-003: labels are admin-written
   * data) — never a sideways scroll. In the bar at md+ a link never wraps: it folds. */
  .navlink, .menulink { white-space: normal; overflow-wrap: anywhere; }

  /* Inside the drawer the menu is no longer a panel of its own — it is the
   * second half of one list, separated by a rule. */
  .navmenu {
    display: flex;
    position: static;
    max-height: none;
    overflow: visible; /* the drawer scrolls as one list — never a list inside it */
    min-width: 0;
    padding: var(--space-2) 0 0;
    margin-top: var(--space-2);
    background: none;
    border: 0;
    border-top: 1px solid var(--border);
    border-radius: 0;
    box-shadow: none;
  }
  .navburger { display: inline-flex; }
  .navsearch { display: none; }
}

/* Below sm the toolbar is always one control per line, so each field can span
 * the row and push its control to the right edge — stacked, a ragged left-to-
 * right run of labels and selects reads as three unrelated things rather than
 * one list. Between sm and the width where they still fit on one line they stay
 * ragged, which is the honest trade for not guessing at a wrap. */
@media (max-width: 480px) {
  .toolfield { width: 100%; justify-content: space-between; }
  .toolfield-select { flex: 0 1 60%; }
}

/* --- status page -------------------------------------------------------- */

/* A message that IS the page. Centred and capped at a readable measure, so it
 * needs no breakpoint — there is nothing beside it to collapse. */
.status { padding: var(--band-y) 0; text-align: center; }
.status .wrap { max-width: var(--measure); }
.status h1 { font-size: var(--fs-3xl); margin: 0 0 var(--space-4); }

/* The code is a label, not a headline: it names which failure this is, and the
 * sentence under it is what the reader actually needs. */
.statuscode {
  font: 700 var(--fs-sm)/1 var(--font-body);
  letter-spacing: .18em;
  color: var(--muted);
  margin: 0 0 var(--space-4);
}
.statustext { color: var(--muted); margin: 0 0 var(--space-6); }

/* --- breadcrumb --------------------------------------------------------- */

.breadcrumb { margin: 0 0 var(--space-5); font-size: var(--fs-sm); }
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  list-style: none;
  margin: 0;
  padding: 0;
}

/* The separator is drawn BEFORE each crumb but the first, so it can never wrap
 * onto a line of its own ahead of nothing. */
.crumb { display: flex; align-items: center; gap: var(--space-2); color: var(--muted); }
.crumb + .crumb::before { content: "›"; color: var(--muted); }
.crumblink { color: var(--muted); text-decoration: none; }
.crumblink:hover { color: var(--fg-strong); text-decoration: underline; }
.crumbhere { color: var(--fg-strong); font-weight: 600; }

/* The BACK-LINK ROW (change 1794378700, developer 2026-11-11): a trail whose `back` slot
 * holds the page's way back is the ONE compact row straight under the navbar —
 * "‹ Takaisin · Oma tili › Asetukset › Vaihda sähköposti". The back link leads, a dot
 * sets it off from the trail, every link is a 44px target, and the row carries no
 * line or border of its own. Its gap to the navbar and to the page head is the SAME
 * one token (--space-3, set where the row sits: `.content` / public `main`). */
.breadcrumb:has(> .wrap > .link-back) { margin-bottom: var(--space-3); }
.breadcrumb:has(> .wrap > .link-back) > .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 var(--space-2);
}
.breadcrumb > .wrap > .link-back { margin: 0; }
.breadcrumb > .wrap > .link-back + ol::before { content: "·"; color: var(--muted); }
.breadcrumb:has(> .wrap > .link-back) .crumblink { display: inline-flex; align-items: center; min-height: 44px; }
/* The parent crumb's own chevron — shown only in the phone row below; the geometry is
 * the back link's (.link-back::before), one rule for both. */
.breadcrumb:has(> .wrap > .link-back) .crumb:nth-last-child(2) > .crumblink::before { display: none; }

/* Below 768px the row is ONE line: only the parent crumb, drawn as the way back —
 * "‹ NVC-peruskurssi verkossa" — because the parent IS the back link's target. The back
 * link, the dot, the other crumbs and the separators are hidden by CSS (no script, the
 * markup is the same at every width); a parent name longer than the column ellipsises. */
@media (max-width: 767px) {
  .breadcrumb:has(> .wrap > .link-back) > .wrap { flex-wrap: nowrap; }
  .breadcrumb > .wrap > .link-back,
  .breadcrumb:has(> .wrap > .link-back) .crumb:not(:nth-last-child(2)) { display: none; }
  .breadcrumb > .wrap > .link-back + ol { min-width: 0; flex-wrap: nowrap; }
  .breadcrumb > .wrap > .link-back + ol::before,
  .breadcrumb:has(> .wrap > .link-back) .crumb::before { content: none; }
  .breadcrumb:has(> .wrap > .link-back) .crumb:nth-last-child(2) { min-width: 0; }
  .breadcrumb:has(> .wrap > .link-back) .crumb:nth-last-child(2) > .crumblink {
    display: block;
    min-width: 0;
    line-height: 44px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--action-text);
    font-weight: 600;
    text-decoration: none;
  }
  .breadcrumb:has(> .wrap > .link-back) .crumb:nth-last-child(2) > .crumblink:hover { color: var(--fg-strong); }
  .breadcrumb:has(> .wrap > .link-back) .crumb:nth-last-child(2) > .crumblink::before {
    display: inline-block;
    margin-inline: 2px var(--space-2);
    vertical-align: 1px;
  }
}

/* --- article (long-form document) --------------------------------------- */

.article .wrap { max-width: var(--measure); }
/* ONE rung above its clause h2 (--fs-lg), change 1794553108 — was 2xl, two steps. */
.article h1 { font-size: var(--fs-xl); margin: 0 0 var(--space-3); }
.articlemeta { color: var(--muted); font-size: var(--fs-sm); margin: 0 0 var(--space-5); }

/* A standing note about the document itself (draft, pending content) — marked as
 * a note rather than set in the body voice, so it is not mistaken for a clause. */
.articlenote {
  padding: var(--space-4);
  border-left: 3px solid var(--primary);
  background: var(--primary-soft);
  color: var(--fg);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 0 0 var(--space-6);
}

.clause { margin: 0 0 var(--space-6); }
.clause h2 { font-size: var(--fs-lg); margin: 0 0 var(--space-2); }
.clause p { margin: 0; color: var(--muted); }

/* --- text links (footer, consent) --------------------------------------- */

/* The arrow and back variants carry their affordance in the chevron and their colour
 * in --action-text (declared on their own rules, earlier), so both are excluded from
 * the inherited colour and the underline here rather than re-declared on a rule that
 * sits earlier — an unexcluded `.link { color: inherit }` silently overrode them. */
.link:not(.link-arrow, .link-back) { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.link:hover { color: var(--fg-strong); }

/* Links lead, legal follows: a centred stack, the row wrapping as it must. */
.footerlinks { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 var(--space-5); margin-top: calc((1lh - 44px) / 2); }
/* Each link is a 44px touch target; its own box replaces the row gap. The row (the rule above) is
 * pulled up by the half of that box its text does not fill (1lh is the text's
 * own line), so the link TEXT starts at the footer's top padding just as the
 * legal line's text ends at its bottom padding — equal space above and below. */
.footerlinks .link { text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.footerlinks .link:hover { text-decoration: underline; }
.footertext { margin: var(--space-4) 0 0; font-size: var(--fs-xs); display: flex; flex-wrap: wrap; justify-content: center; gap: 0 var(--space-5); }
/* The site version closes the legal line (change 1794688133): one unit that never
 * breaks inside ("Versio 0.7.2"), set apart from the copyright by the SAME gap that
 * separates the footer links (--space-5) — no dot, no new row, so the footer keeps its
 * vocabulary and its rhythm, and a wrapped line (a narrow screen, a long legal text)
 * starts clean, centred, with no orphan separator. Its colour stays the legal line's
 * --fg: --muted is NOT AA on the footer ground in dark (alive 4.32:1, neutral 3.59:1)
 * — the version reads as secondary by its size and place, like the line it ends. */
.footerversion { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* --- panel (app shell card) --------------------------------------------- */

/* One settings group, one form, one set of actions. Same surface vocabulary as
 * .card — this is the app-shell sibling of it, not a second surface language. */
.panel {
  background: var(--panel);
  border: var(--surface-border) solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-6);
  box-shadow: var(--shadow-card);
  margin-bottom: var(--space-5);
}
.panel h2 { font-size: var(--fs-lg); margin: 0 0 var(--space-2); }
.panelintro { color: var(--muted); margin: 0 0 var(--space-5); font-size: var(--fs-sm); }
/* A notice in a panel keeps the panel's rhythm: the intro's --space-5 above it, the same
   below (the notice's own --space-6 belongs to the page column) — one gap each side. */
.panel > .notice { margin-bottom: var(--space-5); }

/* The irreversible ones read as a different kind of thing BEFORE they are read:
 * the border carries it, not the button alone, so the whole group is marked. */
.panel-danger { border-color: var(--danger); }
.panel-danger h2 { color: var(--danger); }

/* A card grid straight in the app shell's content column (the account overview's
 * "Tilisi sivut", change 1794125853). The column owns the vertical rhythm, so the
 * section drops a marketing band's --band-y padding (it left a band-sized hole under
 * the panel above) and its heading takes the panel heading's rung — one heading
 * level, one size, on the same page. */
.content > .section { padding: 0; margin-bottom: var(--space-5); }
.content > .section h2 { font-size: var(--fs-lg); margin: 0; }
.content > .section .cards { margin-top: var(--space-4); }
/* There a card's arrow link IS the way into the page it names — a 44px target. */
.content > .section .card .link { min-height: 44px; align-items: center; margin-top: var(--space-2); }

/* --- paragraph + buttons in flow ----------------------------------------- */

.paragraph { color: var(--muted); margin: 0 0 var(--space-3); font-size: var(--fs-sm); }
.panel .btn + .paragraph { margin-top: var(--space-5); }
.panel > .paragraph { max-width: var(--measure); }
/* A second way to submit UNDER a panel's form (change 1794230992, checkout "Kirjaudu
   pääsyavaimella ja jatka"): the row gap of the form's own actions, never touching its primary. */
.panel > .form + .btn { margin-top: var(--space-3); }
/* The passkey-FIRST checkout sign-in (checkout-login-passkey-hint): the passkey primary leads as its own
   inline form, the password form follows under a hairline — the auth-card's passkey-first rhythm. */
.panel > .form.form-inline:has(+ .form:not(.form-inline)) { display: flex; margin: 0; }
.panel > .form.form-inline + .form:not(.form-inline) { margin-top: var(--space-5); padding-top: var(--space-5); border-top: 1px solid var(--border); }
.panel .btn + .btn { margin-left: var(--space-3); }
/* A `formactions` row spaces its buttons with its own gap: the pair margin above
 * would double the space on one line (24 px) and indent every wrapped button. */
.panel .formactions > .btn + .btn { margin-left: 0; }

/* --- checkbox ----------------------------------------------------------- */

/* The box aligns to the label's FIRST line rather than to the centre of the
 * block, so a two-line label does not leave it floating in the middle. */
.check {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--space-2) var(--space-3);
  margin-bottom: var(--space-4);
}
.checkbox { width: calc(20px * var(--text-scale)); height: calc(20px * var(--text-scale)); margin: 2px 0 0; flex: none; accent-color: var(--primary-deep); }
.checklabel { flex: 1 1 12rem; min-width: 0; min-height: 44px; color: var(--fg); } /* the label is the 44px target; the box stays on its first line */
.check-required .checklabel::after { content: " *"; color: var(--danger); }
.checklinks { display: flex; flex-wrap: wrap; gap: var(--space-3); font-size: var(--fs-sm); width: 100%; }

/* --- field help + form note --------------------------------------------- */

.field-help { font-size: var(--fs-sm); color: var(--muted); }

/* A sentence and the document it refers to, placed in a form's flow (the contact
 * form's privacy line): the sentence sits tight above its link, and the link is
 * a 44px target sized to its text rather than stretched across the column. */
.form > .paragraph { margin: 0; }
.form > .paragraph + .link { display: inline-flex; align-items: center; align-self: flex-start; min-height: 44px; margin-top: calc(var(--space-3) - var(--space-5)); font-size: var(--fs-sm); }
.formnote { font-size: var(--fs-sm); color: var(--muted); margin: var(--space-2) 0 0; }

/* A FORM IN THE PAGE FLOW (formsection: the newsletter band, the contact form)
 * is capped at the text measure, and under a centred heading it is centred too —
 * full width below the measure, never stretched across a 1440 column (developer
 * decision 2026-10-31, dev POLICY "Design Spec": every form follows it). The
 * notice above it shares the same column. */
.section > .wrap > .form,
.section > .wrap > .notice { max-width: var(--measure); }
.head-center > .wrap > .form,
.head-center > .wrap > .notice { margin-inline: auto; }

/* The spam trap (honeypot, F-005 D11): visually hidden, NOT display:none — a bot
 * reading the markup still fills it; people never see or reach it. */
.honeypot { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* --- picture check (captcha, change 1793433282) -------------------------- */

/* A fieldset in the form's column: legend, task, outcome message, the board,
 * the help sentence and its contact link. No JavaScript — the squares are
 * native checkboxes and the selected look is `:checked + label`. */
.captcha { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; margin: 0; padding: 0; border: 0; }
.captcha > .field-label { padding: 0; margin-bottom: var(--space-2); }
.captcha-task { margin: 0; color: var(--fg-strong); }
.captcha-err { margin: 0; font-size: var(--fs-sm); color: var(--danger); }
.captcha-help { margin: 0; font-size: var(--fs-sm); color: var(--muted); }
.captcha-time { margin: 0; font-size: var(--fs-sm); color: var(--muted); } /* the answer time beside "Näytä kuva" (WCAG 2.2.1) */
.captcha > .link { display: inline-flex; align-items: center; align-self: flex-start; min-height: 44px; margin-top: calc(var(--space-2) - var(--space-3)); font-size: var(--fs-sm); }

/* The board: a square capped at 312px and at the column, divided evenly into
 * the squares (104px at 3 × 3, 78px at 4 × 4). The picture and the prototype's
 * placeholder are positioned OUT of the grid so the labels auto-place into its
 * cells, and the labels are positioned so they paint above the picture. Its
 * colours are the control light well (.input rule above). */
.captcha-board {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  width: min(100%, 312px);
  aspect-ratio: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.captcha-grid-3 .captcha-board { grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); }
.captcha-grid-4 .captcha-board { grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(4, 1fr); }
.captcha-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.captcha-ph { position: absolute; inset: 0; display: grid; place-items: center; font-size: var(--fs-sm); color: color-mix(in oklab, var(--on-light) 72%, transparent); }

/* The picture ON REQUEST (SUM-4, ddfd254): the board waits in a closed <details>
 * whose <summary> is a primary button; the lazily loaded picture is not fetched
 * until it opens, so the answer window starts when the person asks to see it. The
 * summary drops its disclosure marker and hides once the picture is open (closing it
 * would not stop the time). */
.captcha-reveal { margin: 0; }
.captcha-show { list-style: none; }
.captcha-show::-webkit-details-marker { display: none; }
.captcha-show::marker { content: ""; }
.captcha-reveal[open] > .captcha-show { display: none; }

/* ONE PRIMARY AT A TIME (change 1794551080): while the picture is closed, "Näytä kuva"
 * is the form's only primary — the form's own submit is not shown (absent, never
 * greyed out); once the picture is open the summary hides (rule above) and the submit
 * is back as the only primary. A button row holding nothing else goes with it, so no
 * empty row keeps its gap. Pure CSS on the native <details> state: holds with the
 * client off, and the server still verifies the answer. */
.form:has(.captcha-reveal:not([open])) > .formactions > .btn-primary[type=submit] { display: none; }
.form:has(.captcha-reveal:not([open])) > .formactions:not(:has(> :not(.btn-primary[type=submit]))) { display: none; }

/* The checkbox stays focusable (never display:none) but takes no space; its
 * label IS the square. The label's text is the accessible name only. */
.captcha-box { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
.captcha-tile { position: relative; min-width: 44px; min-height: 44px; cursor: pointer; box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--on-light) 16%, transparent); }
.captcha-tilename { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.captcha-box:checked + .captcha-tile { background: color-mix(in oklab, var(--on-light) 14%, transparent); outline: 4px solid var(--on-light); outline-offset: -4px; }
.captcha-box:focus-visible + .captcha-tile { box-shadow: inset 0 0 0 2px var(--on-dark), inset 0 0 0 4px var(--on-light); }

/* The outcome on a re-render: a wrong answer marks the board, a timed-out
 * picture is information (a fresh picture), not an error. */
.captcha-wrong .captcha-board { border-color: var(--danger); }
.captcha-expired .captcha-err { color: var(--fg-strong); }

/* --- auth card additions ------------------------------------------------ */

.auth-intro { color: var(--muted); margin: 0 0 var(--space-6); }
.auth-card > .btn { width: 100%; justify-content: center; }
/* A second way in UNDER the card's form (change 1794230992: "Kirjaudu pääsyavaimella" under
   the password form): its own group — a hairline across the card between the form and the
   button, so the full-width secondary never reads as part of the password form's actions. The rule is the
   FORM's bottom border (never a pseudo-element: the button's ::before is its passkey mark). */
.auth-card > .form:has(+ .btn) { padding-bottom: var(--space-4); border-bottom: 1px solid var(--border); }
.auth-card > .form + .btn { margin-top: var(--space-4); }
/* The passkey-FIRST card (change 1794230992, login-passkey-hint): the remembered passkey sign-in is
   its own inline form BEFORE the password form — full width, then the password form under the
   same hairline, so the two ways read as two groups either way round (reading = tab order). */
.auth-card > .form.form-inline { display: flex; margin: 0; }
.auth-card > .form.form-inline > .formactions, .auth-card > .form.form-inline .btn { width: 100%; justify-content: center; }
.auth-card > .form.form-inline + .form { margin-top: var(--space-4); padding-top: var(--space-4); border-top: 1px solid var(--border); }
/* Two actions in the card (the passkey offer: "Luo pääsyavain" over "Ei nyt") stack full width. */
.auth-card > .btn + .btn { margin-top: var(--space-3); }
.auth-alt { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2) var(--space-4); margin: var(--space-6) 0 0; font-size: var(--fs-sm); color: var(--muted); }
.auth-alt .link { color: var(--action-text); }
/* The consent card (change 1793947168): a fact inside the auth card — the app, its return
   address, the account, what it may do — stacks its name above its value at every width:
   the 420px card has no room for the 12rem name column the admin pages give it. */
.auth-card .form > .pagetext { grid-template-columns: minmax(0, 1fr); gap: var(--space-1); min-height: 0; }
.auth-card .form > .pagetext .pagetext-value { color: var(--fg-strong); }
.auth-card .form > .notice { margin: 0; }

/* --- page head additions ------------------------------------------------ */

.page-head { display: flex; align-items: flex-start; gap: var(--space-4); }
.page-headbody { min-width: 0; }
/* A formatted lead of more than one piece — the content of a course step, usually opening with a
 * subheading (change 1794754585 request 4,
 * developer 2026-11-15: the content was glued to the part title): the title keeps a page
 * heading's bottom margin — the --space-6 a page head keeps below it — never the 8px of its context line. */
.page-headbody > .page-title:has(+ .richtext) { margin-bottom: var(--space-6); }
/* Its headings sit one rung under the title (the adjacent-levels rule): production draws them as
 * h2 / h3 under the h1 (base 1), the prototype's rich text as h3 / h4. */
.page-headbody > .richtext :is(h2, h3, h4) { font-family: var(--font-heading); line-height: var(--leading-heading); color: var(--fg-strong); text-wrap: balance; margin: 0; }
.page-headbody > .richtext > * + :is(h2, h3, h4) { margin-top: var(--space-6); }
.page-headbody > .richtext :is(h2, h3) { font-size: var(--fs-lg); }
.page-headbody > .richtext h4 { font-size: var(--fs-base); }
.page-headbadges { display: inline-flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-2); }

/* Initials, not a photograph — the prototype has no portraits, and initials are
 * what the real view falls back to anyway. */
.avatar {
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-deep);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: var(--fs-sm);
}

/* A card's link slot holds a LIST, so links in a card stack as rows rather than
 * running on as a sentence — whether they carry the arrow (a single "read more")
 * or not (the sitemap's six per card). */
.card .link { display: flex; }
.card .link + .link { margin-top: var(--space-2); }

/* --- media -------------------------------------------------------------- */

/* One media slot. The slot has no kind; `.media-image|video|audio` name the kind
 * of the asset it DISPLAYS. A media takes its SHAPE from its parent: a 4/3 panel
 * in a hero or a split, a full-bleed 16/10 strip in a card, its own ratio in
 * flow. An empty slot (no element inside) is the drawn placeholder — the layout
 * study uses grey boxes, and a structural prototype should not pretend to have
 * art it lacks. */
.media { position: relative; margin: 0; max-width: 100%; }
.media-el { display: block; width: 100%; max-width: 100%; height: auto; }

/* Placeholders are a TINT of the foreground, not a surface token: a fixed token
 * is invisible whenever it matches the band behind it (an amber placeholder on the
 * yellow band). A foreground tint reads on every tone
 * and inverts with the appearance for free. */
.herogrid > .media,
.split > .media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius);
  background: color-mix(in oklab, var(--fg) 12%, transparent);
  border: var(--surface-border) solid var(--border);
}
.card > .media {
  aspect-ratio: 16 / 10;
  max-width: none; /* full-bleed: the negative margins widen it past the content box */
  overflow: hidden;
  margin: calc(var(--space-5) * -1) calc(var(--space-5) * -1) var(--space-5);
  border-radius: var(--radius) var(--radius) 0 0;
  background: color-mix(in oklab, var(--fg) 12%, transparent);
  border-bottom: 1px solid var(--border);
}
/* In a panel the picture or video FILLS the box — the box's ratio is the
 * design's, the file's is not. */
.herogrid > .media .media-el,
.split > .media .media-el,
.card > .media .media-el { height: 100%; }
.media-image .media-el,
.media-video .media-el { object-fit: cover; }
/* An UNFRAMED cropped PICTURE keeps its TOP and loses its bottom — a portrait's head stays
 * in the box (change 1794345436); a FRAMED one keeps its stored focal point in view (change
 * 1794554050). Both are the ONE rule of every frame that crops a slot image — hero, split, card,
 * carousel, table thumbnail: "media framing" below. A video keeps the centred crop. */
.media-video .media-el { background: var(--fg-strong); }
/* An audio clip is a player bar, not a picture: no box, no tint, its native
 * height wherever it sits. */
.herogrid > .media-audio,
.split > .media-audio,
.card > .media-audio { aspect-ratio: auto; background: none; border: 0; }

/* A media directly in a page's flow — a kit photograph between bands — capped at
 * the content width with the gutter, like every band. */
main > .media {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto var(--band-y);
  padding: 0 var(--gutter);
}
/* ...but in the app shell's content column (a course step's video) the column
 * already owns the gutter and the rhythm is the column's: the media spans the
 * column like the panel under it, one small FIXED gap above it (GATE 3 Q-90,
 * "small as in figma" — the band's --band-y here was two margins adding up). */
main.content > .media {
  margin: 0 0 var(--space-4);
  padding: 0;
}
main > .media .media-el { border-radius: var(--radius); }
main > .media:not(:has(.media-el)) {
  aspect-ratio: 16 / 10;
  background: color-mix(in oklab, var(--fg) 12%, transparent);
  border-radius: var(--radius);
}

/* The admin's trigger inside a slot: bottom-right over a filled one, centred in
 * an empty one. It stays a 44px .btn either way. */
.media > .btn { position: absolute; right: var(--space-3); bottom: var(--space-3); }
.media:not(:has(.media-el)) > .btn { inset: 0; margin: auto; width: fit-content; height: fit-content; }

/* --- media framing (change 1794554050) ---------------------------------- */

/* ONE stored framing for every width: a FOCAL POINT (fx, fy — percent of the picture from its
 * left / top edge) and a ZOOM, carried as the media's enum classes `media-fx-* media-fy-*
 * media-zoom-*` (never an inline style — the policy and the CSP forbid one). The picture covers
 * its frame; `object-position: fx fy` puts the picture's point (fx, fy) ON the frame's point
 * (fx, fy), and the zoom scales around that same point — so the focal point stays in view in
 * every frame shape, and in a frame no wider than the picture (the picture's height fills it) the
 * vertical view and the zoom are the same at every width: only the left / right edges move with
 * the frame's proportion. The frame's own `overflow: hidden` clips the zoom. The three component
 * properties default to today's unframed crop — the width's centre, the TOP kept (change
 * 1794345436), no zoom — so a slot with no stored framing renders exactly as before. A video
 * keeps its centred crop; a media in page flow does not crop and is never framed. */
.media { --frame-x: 50%; --frame-y: 0%; --frame-zoom: 1; }
.media-image .media-el {
  object-position: var(--frame-x) var(--frame-y);
  transform-origin: var(--frame-x) var(--frame-y);
  scale: var(--frame-zoom);
}
.media-fx-0 { --frame-x: 0%; }
.media-fx-5 { --frame-x: 5%; }
.media-fx-10 { --frame-x: 10%; }
.media-fx-15 { --frame-x: 15%; }
.media-fx-20 { --frame-x: 20%; }
.media-fx-25 { --frame-x: 25%; }
.media-fx-30 { --frame-x: 30%; }
.media-fx-35 { --frame-x: 35%; }
.media-fx-40 { --frame-x: 40%; }
.media-fx-45 { --frame-x: 45%; }
.media-fx-50 { --frame-x: 50%; }
.media-fx-55 { --frame-x: 55%; }
.media-fx-60 { --frame-x: 60%; }
.media-fx-65 { --frame-x: 65%; }
.media-fx-70 { --frame-x: 70%; }
.media-fx-75 { --frame-x: 75%; }
.media-fx-80 { --frame-x: 80%; }
.media-fx-85 { --frame-x: 85%; }
.media-fx-90 { --frame-x: 90%; }
.media-fx-95 { --frame-x: 95%; }
.media-fx-100 { --frame-x: 100%; }
.media-fy-0 { --frame-y: 0%; }
.media-fy-5 { --frame-y: 5%; }
.media-fy-10 { --frame-y: 10%; }
.media-fy-15 { --frame-y: 15%; }
.media-fy-20 { --frame-y: 20%; }
.media-fy-25 { --frame-y: 25%; }
.media-fy-30 { --frame-y: 30%; }
.media-fy-35 { --frame-y: 35%; }
.media-fy-40 { --frame-y: 40%; }
.media-fy-45 { --frame-y: 45%; }
.media-fy-50 { --frame-y: 50%; }
.media-fy-55 { --frame-y: 55%; }
.media-fy-60 { --frame-y: 60%; }
.media-fy-65 { --frame-y: 65%; }
.media-fy-70 { --frame-y: 70%; }
.media-fy-75 { --frame-y: 75%; }
.media-fy-80 { --frame-y: 80%; }
.media-fy-85 { --frame-y: 85%; }
.media-fy-90 { --frame-y: 90%; }
.media-fy-95 { --frame-y: 95%; }
.media-fy-100 { --frame-y: 100%; }
.media-zoom-100 { --frame-zoom: 1; }
.media-zoom-125 { --frame-zoom: 1.25; }
.media-zoom-150 { --frame-zoom: 1.5; }
.media-zoom-175 { --frame-zoom: 1.75; }
.media-zoom-200 { --frame-zoom: 2; }
.media-zoom-250 { --frame-zoom: 2.5; }
.media-zoom-300 { --frame-zoom: 3; }

/* The FOCAL marker (editing mode): a 28px ring centred on the frame's point (fx, fy) — exactly
 * where the picture's focal point sits — held inside the frame at its edges. Light ring + dot with
 * a dark hairline either side, so it reads on a bright sky and a dark forest alike; it takes no
 * pointer events, so a tap reaches the picture (production sets the point there, stage 3). */
.focal {
  position: absolute;
  left: clamp(14px, var(--frame-x), calc(100% - 14px));
  top: clamp(14px, var(--frame-y), calc(100% - 14px));
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
  border: 2px solid var(--on-dark);
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--on-light), inset 0 0 0 1px var(--on-light);
  pointer-events: none;
}
.focal::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--on-dark);
  box-shadow: 0 0 0 1px var(--on-light);
}

/* The FRAMING TOOLBARS (editing mode, GATE 1 round 2): VERTICAL toolbars INSIDE the picture — never
 * a horizontal bar over it. The `framebar` is a transparent grid laid over the frame with one equal
 * --space-2 inset (it takes no pointer events, so a tap between the toolbars reaches the picture);
 * its three `framegroup`s draw the fixed light well (--on-dark fill, --on-light ink — never rebound,
 * so they read on any picture and any band) and where two groups join into ONE toolbar their wells
 * meet without a seam: one shadow for the whole bar (a drop-shadow of the union), the corners only on
 * the toolbar's own ends. The ARRANGEMENT steps by the FRAME's height (a size container query — a card
 * strip at 1440 is as short as a hero at 390); mobile-first, the base is the most compact:
 *   strip  (< 208px)   two toolbars, each folded into two columns — move ↑ ↓ over ← → on the left,
 *                      + − over the reset on the right: 8 + 88 + 8 + 44 (trigger) + 8 = 156px;
 *   short  (208–339px) two toolbars — move on the left, zoom + reset on the right:
 *                      8 + 88 + 8 + 44 (+ the gap) + 8 + 44 (trigger) + 8 = 208px;
 *   tall   (≥ 340px)   ONE toolbar on the left: 8 + 88 + 8 + 176 + 8 + 44 + 8 = 340px.
 * The trigger keeps the bottom-right corner (same --space-2 inset) and the focal marker draws BELOW
 * the toolbars (SUM-6 39ec782): a point under a toolbar never covers a tool, and the ring stays
 * visible wherever the toolbars are not. */
.media:has(> .framebar) { container-type: size; }
.media:has(> .framebar) > .btn { right: var(--space-2); bottom: var(--space-2); }
.media > .focal { z-index: 1; }
.media > .framebar {
  z-index: 2;
  position: absolute;
  inset: var(--space-2);
  display: grid;
  grid-template-columns: 88px 1fr 88px;
  grid-template-rows: min-content min-content 1fr;
  align-items: start;
  align-content: start;
  pointer-events: none;
  filter: drop-shadow(var(--shadow-geometry) var(--shadow-color));
}
.framegroup {
  display: flex;
  flex-direction: column;
  background: var(--on-dark);
  color: var(--on-light);
  pointer-events: auto;
}
.framegroup > .btn { color: var(--on-light); }
/* A tool fills exactly its 44px cell of the well: the toolbar owns its tools' boxes, so no flow
 * margin of the surface it sits on reaches in — the panel's button-pair gap (`.panel .btn + .btn`)
 * once pushed every tool after the first 12px out of its well on the product page's picture rows
 * (change 1794647034). Selector weight above that rule's, written after it. */
.framebar .framegroup > .btn { margin: 0; }
.framegroup > .btn:focus-visible { outline: 2px solid var(--on-light); outline-offset: -4px; }
/* A tool that cannot act (the edge, the zoom limit, the default framing) keeps its square and its
 * place: the dashed outline marks it by shape, the ink a step softer — still the light well's ink. */
.framegroup > .btn.btn-disabled {
  color: color-mix(in oklab, var(--on-light) 62%, var(--on-dark));
  border: 1px dashed color-mix(in oklab, var(--on-light) 62%, var(--on-dark));
}
/* strip: the move pad ↑ ↓ over ← → (the markup stays ↑ ← → ↓ — the reading and Tab order); the zoom
 * row + − over the reset, the two wells one toolbar. */
.framegroup-move {
  grid-column: 1;
  grid-row: 1 / -1;
  display: grid;
  grid-template-columns: 44px 44px;
  border-radius: min(var(--radius-action), 22px);
}
.framegroup-move > .btn-up { grid-area: 1 / 1; }
.framegroup-move > .btn-down { grid-area: 1 / 2; }
.framegroup-move > .btn-left { grid-area: 2 / 1; }
.framegroup-move > .btn-right { grid-area: 2 / 2; }
.framegroup-zoom {
  grid-column: 3;
  grid-row: 1;
  flex-direction: row;
  border-radius: min(var(--radius-action), 22px) min(var(--radius-action), 22px) 0 0;
}
.framegroup-reset {
  grid-column: 3;
  grid-row: 2;
  align-items: center;
  border-radius: 0 0 min(var(--radius-action), 22px) min(var(--radius-action), 22px);
}
/* short: two single-column toolbars — move down the left edge, zoom + reset down the right edge,
 * the reset set apart from the zoom by one --space-2 inside the same well. */
@container (min-height: 208px) {
  .media > .framebar { grid-template-columns: 44px 1fr 44px; }
  .framegroup-move { display: flex; }
  .framegroup-zoom { flex-direction: column; }
  .framegroup-reset { padding-top: var(--space-2); }
}
/* tall: ONE toolbar down the left edge — + − · ↑ ← → ↓ · reset, the move group set apart by one
 * --space-2 above and below inside the one well. */
@container (min-height: 340px) {
  .media > .framebar { grid-template-columns: 44px; grid-template-rows: none; }
  .framegroup-move,
  .framegroup-zoom,
  .framegroup-reset { grid-column: 1; grid-row: auto; }
  .framegroup-move { padding-block: var(--space-2); border-radius: 0; }
  .framegroup-reset { padding-top: 0; }
}
/* A frame under 156px tall (a card strip of four at 1440, orchestrator decision S1-2): "Vaihda media"
 * becomes an icon-only 44px circle in the same corner — the label leaves the box (font-size 0, the
 * text pencil's pattern) and stays the accessible name; the pencil mask says "edit". */
@container (max-height: 155.98px) {
  .media > .btn-secondary {
    justify-content: center;
    width: 44px;
    min-width: 44px;
    padding: 0;
    font-size: 0;
    border-radius: 50%;
  }
  .media > .btn-secondary::after {
    content: "";
    width: calc(18px * var(--text-scale));
    height: calc(18px * var(--text-scale));
    background-color: currentColor;
    -webkit-mask: var(--ico-pencil) center / contain no-repeat;
    mask: var(--ico-pencil) center / contain no-repeat;
  }
}

@media (max-width: 768px) {
  /* Wider than tall once it spans the column — a 4/3 box at full width eats most
   * of a phone screen before a word of copy is visible. (After the base panel
   * rules, which share this specificity.) */
  .herogrid > .media, .split > .media { aspect-ratio: 16 / 10; }
  .herogrid > .media-audio, .split > .media-audio { aspect-ratio: auto; }
}

/* --- editing surface (F-002) ------------------------------------------- */

/* The admin's text trigger: an icon-only button whose 44px box is the HIT AREA
 * only — what is drawn is a 28px dashed ring centred in it (::before) holding a
 * 14px pencil (::after). Its text is the accessible name ("Muokkaa: Otsikko"),
 * visually hidden with a zero font size. The pencil is the Lucide mask from the
 * icon sheet, `var(--ico-pencil)` (internal/web/ui/icon), painted in
 * currentColor — monochrome, no inline svg, no glyph in the markup — and the
 * colour follows the tone scope it sits in, so it reads on a brand band too.
 * Negative block margins of half the box (-22px) leave it a zero-height margin
 * box centred on the line (vertical-align: middle), so it never grows the line
 * box — a trigger at the end of a paragraph or an eyebrow does not push the next
 * line down, and the ring simply overlays the line it ends. The same rule draws
 * it in the navbar. */
.btn-edit {
  position: relative;
  justify-content: center;
  flex: none;
  width: 44px;
  min-width: 44px;
  height: 44px;
  margin-block: -22px;
  align-self: center;
  padding: 0;
  font-size: 0;
  vertical-align: middle;
  color: var(--fg-strong);
  background: transparent;
  border: 0;
  border-radius: 50%;
}
.btn-edit::before,
.btn-edit::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
}
.btn-edit::before {
  width: calc(28px * var(--text-scale));
  height: calc(28px * var(--text-scale));
  border: 1px dashed currentColor;
  border-radius: 50%;
}
.btn-edit::after {
  width: calc(14px * var(--text-scale));
  height: calc(14px * var(--text-scale));
  background-color: currentColor;
  -webkit-mask: var(--ico-pencil) center / contain no-repeat;
  mask: var(--ico-pencil) center / contain no-repeat;
}
.btn-edit:hover,
.btn-edit:active { background: transparent; }
.btn-edit:hover::before { background: color-mix(in oklab, currentColor 12%, transparent); }
/* The focus ring hugs the drawn ring (28px + a 2px gap), not the invisible box. */
.btn-edit:focus-visible { outline: 2px solid currentColor; outline-offset: calc(14px * var(--text-scale) - 20px); }
/* Where the trigger is NOT in a run of text: a flex row (the newsletter form, which
 * aligns its items to the end) centres the zero-height box on the line through
 * `align-self` above, and a block parent (the card's mark, a fixed monogram) gives
 * it its full 44px line, so its hit area never overlaps the heading below it. */
.cardmark + .btn-edit { margin-block: 0; }
/* In the bar the generic `.navbar .btn` padding and type would undo the hit area. */
.navbar .btn.btn-edit { width: 44px; padding: 0; font-size: 0; }

/* ICON-ONLY ROW ACTIONS + THE ADD MARK (change 1794076697, developer 2026-11-08): `up` / `down`
 * / `trash` show only their Lucide mask from the icon sheet (`var(--ico-arrow-up)` …), 18px in
 * currentColor inside a fixed 44px square; the label stays in the markup at font-size 0 as the
 * accessible name, the variant (secondary / danger) keeps its outline + colour tokens. `add`
 * keeps its label and draws a leading plus at the label size. */
.btn-up, .btn-down, .btn-pencil, .btn-trash,
.btn-left, .btn-right, .btn-zoomin, .btn-zoomout, .btn-reset {
  justify-content: center;
  flex: none;
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 0;
  font-size: 0;
}
.btn-up::after, .btn-down::after, .btn-pencil::after, .btn-trash::after, .btn-add::before,
.btn-left::after, .btn-right::after, .btn-zoomin::after, .btn-zoomout::after, .btn-reset::after,
.btn-search::before, .btn-download::before, .btn-upload::before, .btn-calendar::before, .btn-logout::before, .btn-passkey::before {
  content: "";
  flex: none;
  background-color: currentColor;
}
.btn-up::after, .btn-down::after, .btn-pencil::after, .btn-trash::after,
.btn-left::after, .btn-right::after, .btn-zoomin::after, .btn-zoomout::after, .btn-reset::after { width: calc(18px * var(--text-scale)); height: calc(18px * var(--text-scale)); }
.btn-up::after { -webkit-mask: var(--ico-arrow-up) center / contain no-repeat; mask: var(--ico-arrow-up) center / contain no-repeat; }
.btn-down::after { -webkit-mask: var(--ico-arrow-down) center / contain no-repeat; mask: var(--ico-arrow-down) center / contain no-repeat; }
.btn-trash::after { -webkit-mask: var(--ico-trash-2) center / contain no-repeat; mask: var(--ico-trash-2) center / contain no-repeat; }
/* `pencil` — the listing row's edit action (GATE 1 round 3), the icon sheet's existing pencil mask. */
.btn-pencil::after { -webkit-mask: var(--ico-pencil) center / contain no-repeat; mask: var(--ico-pencil) center / contain no-repeat; }
/* THE FRAMING TOOLS (change 1794554050): the same 44px icon-only square. `left` / `right` are the
 * arrow-up mask turned a quarter (Lucide's arrow-left / -right are that same line); `zoomin` the
 * plus; `zoomout` the icon sheet's Lucide `minus`, `reset` its Lucide `rotate-ccw` — the standard
 * counter-clockwise circular arrow WITH its arrowhead (GATE 1 round 2, developer: "reset to default
 * icon is just 3/4 circle not best practice"; the stage-1 CSS stand-ins swapped in stage 3). Their
 * marks take the row actions' size above — 18px × the text-size dial, like every icon-only button
 * (TEXT SIZE) — so ← → + − ⟲ draw as large as ↑ ↓ in the one toolbar (change 1794647034; they were
 * a fixed 18px beside the scaled ↑ ↓, 21.6px at the default 120 %). */
.btn-left::after { -webkit-mask: var(--ico-arrow-up) center / contain no-repeat; mask: var(--ico-arrow-up) center / contain no-repeat; rotate: -90deg; }
.btn-right::after { -webkit-mask: var(--ico-arrow-up) center / contain no-repeat; mask: var(--ico-arrow-up) center / contain no-repeat; rotate: 90deg; }
.btn-zoomin::after { -webkit-mask: var(--ico-plus) center / contain no-repeat; mask: var(--ico-plus) center / contain no-repeat; }
.btn-zoomout::after { -webkit-mask: var(--ico-minus) center / contain no-repeat; mask: var(--ico-minus) center / contain no-repeat; }
.btn-reset::after { -webkit-mask: var(--ico-rotate-ccw) center / contain no-repeat; mask: var(--ico-rotate-ccw) center / contain no-repeat; }
.btn-add, .btn-search, .btn-download, .btn-upload, .btn-calendar, .btn-logout, .btn-passkey { gap: var(--space-2); }
/* An icon-only button has no text baseline (font-size 0), so a row of inline row-action forms
 * aligns on the middle, not the baseline — labelled and icon-only actions share one line. */
.form.form-inline { vertical-align: middle; }
.btn-add::before { width: 1em; height: 1em; -webkit-mask: var(--ico-plus) center / contain no-repeat; mask: var(--ico-plus) center / contain no-repeat; }
/* LEADING ACTION MARKS (change 1794125555): the same 1em leading mask as the plus, each from the icon
 * sheet — `search` the filter submit ("Hae"), `download` / `upload` a file to / from the user,
 * `calendar` "Lisää kalenteriin", `logout` "Kirjaudu ulos" (the nav's own log-out mark). */
.btn-search::before, .btn-download::before, .btn-upload::before, .btn-calendar::before, .btn-logout::before, .btn-passkey::before { width: 1em; height: 1em; }
.btn-search::before { -webkit-mask: var(--ico-search) center / contain no-repeat; mask: var(--ico-search) center / contain no-repeat; }
.btn-download::before { -webkit-mask: var(--ico-download) center / contain no-repeat; mask: var(--ico-download) center / contain no-repeat; }
.btn-upload::before { -webkit-mask: var(--ico-upload) center / contain no-repeat; mask: var(--ico-upload) center / contain no-repeat; }
.btn-calendar::before { -webkit-mask: var(--ico-calendar-plus) center / contain no-repeat; mask: var(--ico-calendar-plus) center / contain no-repeat; }
.btn-logout::before { -webkit-mask: var(--ico-log-out) center / contain no-repeat; mask: var(--ico-log-out) center / contain no-repeat; }
/* `passkey` (change 1794230992): the passkey mark — a person beside a standing key, line art in
 * the set's style (developer 2026-11-09: "like the official icon but in our style of icons") —
 * before every passkey sign-in action and "Luo pääsyavain"; "Lisää pääsyavain" keeps the plus. */
.btn-passkey::before { -webkit-mask: var(--ico-passkey) center / contain no-repeat; mask: var(--ico-passkey) center / contain no-repeat; }
/* The same mark beside the Pääsyavaimet headings (the Asetukset panel, the passkeys page) and at
 * the start of each passkey row: a leading 1em mask in the text colour, never a separate node. */
.panel-icon-passkey > h2, .page-head-icon-passkey .page-title { display: flex; align-items: center; gap: var(--space-2); }
.cell-icon-passkey > .cell-name { display: inline-flex; align-items: flex-start; gap: var(--space-2); }
/* A wrapped two-line name keeps the mark on its FIRST line (the line box is ~1.5em). */
.cell-icon-passkey > .cell-name::before { margin-top: 0.2em; }
.panel-icon-passkey > h2::before, .page-head-icon-passkey .page-title::before, .cell-icon-passkey > .cell-name::before {
  content: "";
  flex: none;
  width: 1em;
  height: 1em;
  background-color: currentColor;
  -webkit-mask: var(--ico-passkey) center / contain no-repeat;
  mask: var(--ico-passkey) center / contain no-repeat;
}

/* Editing outcomes as states. `saved` is a text chip. `missing` is ICON-ONLY: the
 * Lucide warning triangle from the icon sheet, `var(--ico-triangle-alert)`, in
 * --danger (::after), on a 22px --on-dark disc. Its text stays in the markup as
 * the accessible name and the `title` tooltip, visually hidden with a zero font
 * size (the `.btn-edit` precedent). The disc is the glyph's OWN backing, so its
 * non-text contrast (WCAG 1.4.11) never depends on what the badge sits on:
 * --danger on --on-dark is ≈9.2:1 (#7d2b00; ≈3.1:1 for the dark #b68674; --on-dark is
 * never rebound, --danger is not rebound by any tone) — on the pale inverse
 * trigger the disc merges with the pill, on the brand-filled or hovered one it
 * still carries the glyph (--danger straight on the #085b62 brand fill is ≈1.2:1). */
.badge-saved { background: var(--success-bg); color: var(--success); }
/* A badge INSIDE a button (the media trigger's state) follows the label with a
 * fixed gap and no chip top margin — internal to the component, so not a dial:
 * the `missing` disc adds exactly 30px to the button. */
.btn > .badge { margin: 0 0 0 8px; }
.badge-missing {
  position: relative;
  flex: none;
  width: calc(22px * var(--text-scale));
  height: calc(22px * var(--text-scale));
  padding: 0;
  font-size: 0;
  vertical-align: middle;
  border-radius: 50%;
  background: var(--on-dark);
  color: var(--danger);
}
.badge-missing::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: calc(16px * var(--text-scale));
  height: calc(16px * var(--text-scale));
  background-color: currentColor;
  -webkit-mask: var(--ico-triangle-alert) center / contain no-repeat;
  mask: var(--ico-triangle-alert) center / contain no-repeat;
}

/* The submit and its secondary actions share one row; the controls above stay a
 * single column. */
.formactions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
/* Forms stacked in one section (the editor showcase) are separate units. */
.form + .form { margin-top: var(--space-6); padding-top: var(--space-6); border-top: 1px solid var(--border); }
/* The `inline` form is a ROW ACTION (the users list' resend / cancel / password
 * link): hidden fields + one button, sitting beside its siblings on the line —
 * never the stacked-forms separator above. Below 1200px the row is a list record and
 * its actions a wrapping row (the `actions` cell's gap) of natural-width 44px
 * buttons — never full width, which made one record a screen tall. (Same 1200px step as the table.) */
.form.form-inline,
.form + .form.form-inline { display: inline-flex; margin: var(--space-2) var(--space-2) 0 0; padding: 0; border: 0; }
@media (max-width: 1199px) {
  .form.form-inline,
  .form + .form.form-inline { margin: 0; }
  /* Row actions straight in a panel (user-detail's Toiminnot) are not in a list
   * record's gap-spaced actions row, so they keep their own gap when they wrap. */
  .panel > .form.form-inline { margin: var(--space-2) var(--space-2) 0 0; }
}
/* A row action straight in main (the course module's "Merkitse suoritetuksi", change
 * 1793454763 slice 6 part 3): the neighbour link after it keeps a gap on the line at every
 * width — the server writes no whitespace between them. */
main > .form.form-inline { margin-inline-end: var(--space-3); }
/* …and so does the pair of neighbour links (Edellinen · Seuraava) after it: a trailing
 * gap, harmless at the end of a wrapped line. */
main > .link-back { margin-inline-end: var(--space-4); }
/* A course step's page in the admin's editor (course-module-edit, the slice-6 review's
 * (aa)): a PUBLIC <main> (no `content` column) opens with the back-link row; the trail's own
 * .wrap gives it the column's edge, and it keeps the SAME small gap above and below as in
 * the app column (change 1794378700) — the band rhythm starts with the first band after it.
 * ONLY a row with a back link: a public page whose main opens with a trail alone (privacy,
 * terms, accessibility) keeps the breadcrumb's own spacing. */
main:not(.content) > .breadcrumb:first-child:has(> .wrap > .link-back) { padding-top: var(--space-3); margin-bottom: var(--space-3); }
/* An action and its standing rule (`infobox`, change 1793449369): one wrapping row,
 * the action at its natural width, the boxed note filling the rest while ~16rem is
 * left for it, else wrapping under the action at full width — continuous, no
 * breakpoint. Its inline form drops the row-action margins: the row gap spaces it. */
.infobox { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-4); margin: 0 0 var(--space-5); }
.infobox > .form.form-inline { margin: 0; }
/* The info FRAME — shared by the app's standing rule (`.infoboxtext`) and a content
 * page's info box (`.infosection`, change 1794076697): one look, the info-coloured rule
 * on the soft fill. */
.infoboxtext,
.infosectionbox {
  margin: 0;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  border-left: 4px solid var(--info);
  background: var(--primary-soft);
  color: var(--fg);
  overflow-wrap: anywhere;
}
.infoboxtext { flex: 1 1 16rem; font-size: var(--fs-sm); }
/* The in-place text editor (`form` variant `editor`): the light surface declared
 * with the menu panel above, given its own padding and outline so it reads as one
 * unit wherever it opens — in a hero on the brand band, in a card, in the media
 * dialog. Its shape is the same on every band (shape is identity); the surface
 * escape is what makes its label, hint, counter, error and buttons legible on a
 * dark one. After `.form + .form` so stacked editors keep their own padding. */
.form.form-editor {
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* The multi-line control: the shared .input look, padded for running text, and
 * resizable only vertically so it can never widen the column. */
.textarea {
  display: block;
  padding: var(--space-3) var(--space-4);
  resize: vertical;
}
/* A field whose error line is present marks its control — the error line elides
 * when there is none, so its presence IS the state. */
.field:has(> .field-err) .input { border-color: var(--danger); }

/* The file control keeps the 44px floor; the native button inherits the type. */
.filefield .input { cursor: pointer; }
.fileinput { padding: var(--space-2) var(--space-3); font-size: var(--fs-sm); }
.filefield-chosen { font-size: var(--fs-sm); color: var(--fg); overflow-wrap: anywhere; }

/* --- dialog ------------------------------------------------------------- */

/* Shown modally in production (`:modal`): a CENTRED panel at every width — capped at
 * 40rem, the gutter on both sides at 390, never docked to the bottom edge (change
 * 1794331320: "They should be centered instead"). Rendered `open` in flow by the
 * prototype, which is the only way a static page can show it. Display is left to the
 * browser so a closed dialog stays hidden. Three parts: the head (heading + the ✕ top
 * right), the body, the action row (the dialog's own action leftmost, "Peruuta" to its
 * right). */
.dialog {
  width: min(40rem, 100% - 2 * var(--gutter));
  max-width: 100%;
  margin: var(--space-6) auto;
  padding: 0;
  color: var(--fg);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}
.dialog:not(:modal) { position: static; }
/* A dialog production renders `open` (by its address, a refused POST) is painted in the
 * modal's own box from its very first frame, before the client makes it modal — never in
 * flow, where it pushed the page and then jumped to the centre (change 1794331320 fix round
 * 2, Q-154: "The dialog just should appear in the right place"). Without the client it stays
 * that centred, scrolling panel. Inert in the prototype (it has no `#app`), which draws the
 * dialog in flow. No transition or animation on a dialog or its backdrop. */
.dialog:modal, #app .dialog[open] { position: fixed; inset: 0; margin: auto; max-height: 90dvh; overflow: auto; overscroll-behavior: contain; }
.dialog::backdrop { background: color-mix(in oklab, var(--fg-strong) 45%, transparent); }
/* While a dialog is open modally the page behind does not scroll (its own content scrolls inside
 * it, the actions reachable); the page scrolls again once it closes — change 1794293257 fix
 * round 2 (the developer: "the gui does not scroll there"). */
html:has(.dialog:modal) { overflow: hidden; }
/* A long heading wraps beside the ✕, which stays on its first line. */
.dialoghead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-2) var(--space-2) var(--space-5);
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.dialoghead h2 { margin: 0; padding-block: calc((44px - 1.25em) / 2); font-size: var(--fs-lg); line-height: 1.25; min-width: 0; overflow-wrap: anywhere; }
/* The ✕ (the icon sheet's `x` mask, 20px in the text colour) in a fixed 44px square, the
 * ghost button's hover / active / focus ring; its label ("Sulje") stays in the markup at
 * font-size 0 as the accessible name. */
.dialogclose { flex: none; justify-content: center; width: 44px; min-width: 44px; height: 44px; padding: 0; font-size: 0; color: var(--fg); }
.dialogclose::after {
  content: "";
  flex: none;
  width: calc(20px * var(--text-scale));
  height: calc(20px * var(--text-scale));
  background-color: currentColor;
  -webkit-mask: var(--ico-x) center / contain no-repeat;
  mask: var(--ico-x) center / contain no-repeat;
}
.dialogtext { margin: var(--space-4) var(--space-5) 0; font-size: var(--fs-sm); color: var(--muted); }
.dialogbody { display: flex; flex-direction: column; gap: var(--space-6); padding: var(--space-5); }
/* A form whose action the dialog's action row carries keeps its fields in the body; its own
 * (then empty) action row and an empty body form take no room. */
.dialogbody .formactions:not(:has(*)) { display: none; }
.dialogbody > .form:not(:has(> :not(.formactions, input[type=hidden]), .formactions > *)) { display: none; }
/* A body holding nothing visible — only the hidden fields of the form the action row posts
 * (passkeys remove / off, app revoke, order cancel) — takes no room at all, and the dialog's
 * text line then keeps the same space below it as above (change 1794343431 S0-3: its padding
 * left 48 px blank under the text, 16 above). Each test is its own relative selector (:has()
 * does not nest). */
.dialogbody:not(:has(> :not(.form))):not(:has(> .form > :not(.formactions, input[type=hidden], [hidden]))):not(:has(> .form > .formactions > *)) { display: none; }
.dialogtext:not(:has(+ .dialogbody > :not(.form))):not(:has(+ .dialogbody > .form > :not(.formactions, input[type=hidden], [hidden]))):not(:has(+ .dialogbody > .form > .formactions > *)) { margin-bottom: var(--space-4); }
/* The action row at the foot: the dialog's own action
 * LEFTMOST, "Peruuta" to its right (the developer 2026-11-10: "in dialog primary button is
 * leftmost"); a long pair wraps. The close form is transparent to the row, so its button is
 * a row item like the action. */
.dialogactions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  background: var(--panel);
  border-top: 1px solid var(--border);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.dialogactions > form { display: contents; }
/* Pinned only where the dialog is its own scroll box (shown modally, or production's open one before
 * the client upgrades it): the head at the top, the action row at the foot, while the body scrolls
 * between them. In flow (the prototype) the page scrolls and both stay in place. */
.dialog:modal > .dialoghead, #app .dialog[open] > .dialoghead { position: sticky; top: 0; z-index: 1; }
.dialog:modal > .dialogactions, #app .dialog[open] > .dialogactions { position: sticky; bottom: 0; z-index: 1; }

/* --- edit bar ----------------------------------------------------------- */

/* Between the navbar and the page, in editing mode only. One row at md and
 * above, where the status line is the one item that shrinks. */
.editbar { background: var(--primary-soft); color: var(--fg-strong); border-bottom: 1px solid var(--border); }
.editbar-row { display: flex; align-items: center; gap: var(--space-2) var(--space-5); min-height: 52px; }
.editbar-status {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.editbar-links { display: flex; flex: none; gap: 0 var(--space-5); }
.editbar .link { display: inline-flex; align-items: center; min-height: 44px; font-size: var(--fs-sm); white-space: nowrap; }

/* ELEMENT BAR (change 1794076697, GATE 1 round 2): in editing mode the admin-only strip above
 * each element — its name, an "overridden on this page" badge and the "Asetukset" link. The
 * same soft fill as the edit bar, a dashed top rule so it reads as a handle on the element
 * under it, never as a band of its own. One wrapping row, no breakpoint. */
.elementbar { background: var(--primary-soft); color: var(--fg-strong); border-top: 1px dashed var(--border); }
.elementbar-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--space-4); min-height: 44px; }
.elementbar-name { margin: 0; font-size: var(--fs-sm); font-weight: 600; }
.elementbar-links { display: flex; gap: 0 var(--space-5); margin-left: auto; }
.elementbar .link { display: inline-flex; align-items: center; min-height: 44px; font-size: var(--fs-sm); }


/* --- page details + page states (F-003) ---------------------------------
 * The page's own texts (nav label, title, description) in editing mode, under
 * the edit bar; the same lines read-only on the settings screen. Name and value
 * side by side at md and above, stacked below (the @media block further down);
 * the value breaks anywhere, so a long path never scrolls the page sideways. */
.pagemeta { background: var(--bg); color: var(--fg); border-bottom: 1px solid var(--border); padding-block: var(--space-3); }
.pagemeta-head {
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--primary-deep);
  margin: 0 0 var(--space-2);
}
.pagemeta-list { display: grid; gap: var(--space-1); }
/* One labelled value: a SMALL MUTED LABEL ABOVE the value at every width (GATE 1 round 3, developer
 * 2026-11-08: "the field title and value are visually too much alike") — the label is a caption,
 * the value the content. A receipt line (`.totals`, `.summary`) keeps its own side-by-side row. */
.pagetext { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-1); margin: 0; padding-block: var(--space-2); }
.pagetext-label { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .02em; color: var(--muted); }
.pagetext-value { min-width: 0; overflow-wrap: anywhere; color: var(--fg-strong); }
/* A LABELLED action of the value ("Sivun asetukset", "Palauta asettelun arvo", the ghost "Lisää: Kuvaus")
 * sits on its own line under the value with a gap above it; the icon-only `edit` trigger stays at
 * the end of the value's run (its own zero-height placement). */
.pagetext-value > .btn:not(.btn-edit) { display: flex; width: fit-content; margin-top: var(--space-2); }

/* A badge INSIDE a nav link or a menu entry (the admin's draft marker) follows
 * the label like the media trigger's badge does in a button. */
.navlink > .badge,
.menulink > .badge { margin: 0 0 0 var(--space-2); }
/* Page states: a draft is not an error (neutral, dashed), published is the
 * success pair, fixed (the code-owned front page) a neutral outline. */
.badge-draft { background: var(--surface-accent-2-subtle); color: var(--muted); box-shadow: inset 0 0 0 1px var(--border); }
.badge-published { background: var(--success-bg); color: var(--success); }
.badge-fixed { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--border); }

/* --- asset store (picker) ----------------------------------------------- */

.assets { display: flex; flex-direction: column; gap: var(--space-3); }
.assetshead { margin: 0; font-size: var(--fs-base); }
.assetsempty { margin: 0; font-size: var(--fs-sm); color: var(--muted); }
/* Continuous: auto-fill with an 8rem floor — two tiles on a phone, four in the
 * dialog, no breakpoint. */
.assetsgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr)); gap: var(--space-3); }
.asset {
  display: flex;
  flex-direction: column;
  min-height: 44px;
  padding: 0;
  overflow: hidden;
  text-align: left;
  font: inherit;
  color: var(--fg);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.asset:hover { border-color: var(--muted); }
.asset:focus-visible { outline: 2px solid var(--primary-deep); outline-offset: 2px; }
.asset-thumb { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.asset-meta { padding: var(--space-2); font-size: var(--fs-xs); color: var(--muted); }
.asset-image .asset-meta { border-top: 1px solid var(--border); }
/* Video and audio have no generated poster: a tinted square stands in, and the
 * meta line names the kind. */
.asset-file::before, /* DL 75: a PDF — no thumbnail (no rendering of the document), the meta line says PDF */
.asset-video::before,
.asset-audio::before {
  content: "";
  display: block;
  aspect-ratio: 1;
  background: color-mix(in oklab, var(--fg) 12%, transparent);
  border-bottom: 1px solid var(--border);
}

@media (max-width: 768px) {
  /* The bar steps to two rows: the status line wraps freely above the leave link,
   * so the language it names is never cut by an ellipsis. */
  .editbar-row { flex-direction: column; align-items: stretch; padding-block: var(--space-2); }
  .editbar-status { white-space: normal; }
  .editbar-links { flex-wrap: wrap; }

  /* The dialog stays a CENTRED panel (no bottom sheet, change 1794331320); its padding steps
   * down like every surface, and its action row stacks full width, the action on top. */
  .dialoghead { padding-left: var(--space-4); }
  .dialogtext { margin-inline: var(--space-4); }
  .dialogbody { padding: var(--space-4); }
  .dialogactions { flex-direction: column; align-items: stretch; padding: var(--space-3) var(--space-4); }
  .dialogactions .btn { align-self: stretch; justify-content: center; }
}

/* A page placed in BOTH the bar and the menu (F-003): at md and above its menu
 * entry is an ordinary row; the phone drawer lists the bar pages above the menu
 * pages, so there the entry is hidden and the page appears once. */
@media (max-width: 768px) {
  .menulink-both { display: none; }
  /* ...and a separator whose group before it holds only such hidden entries
   * would open the drawer's menu half on a rule, doubling the one above it. */
  .separator:not(.menulink:not(.menulink-both) ~ .separator) { display: none; }
}

/* --- notice (F-004) -------------------------------------------------------- */
/* The outcome of the previous action, one line above the content it concerns. Full
   width of its column, wraps, fixed internal padding; the tone colours it. */

.notice {
  margin: 0 0 var(--space-6);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  border-left: 4px solid currentColor;
  font-size: var(--fs-base);
  overflow-wrap: anywhere;
}
.notice-success { background: var(--success-bg); color: var(--success); }
.notice-danger { background: var(--danger-bg); color: var(--danger); }
.notice-info { background: var(--panel); color: var(--info); }
.notice-warn { background: var(--panel); color: var(--warn); box-shadow: inset 4px 0 0 var(--warn); }

/* --- shop (F-006, change 1793454763) ---------------------------------------
 * The offer slot, the bar's basket link, the totals, the desk's
 * tabs and the shop's state chips. Tokens only; 44px targets; the form cap rule
 * above holds for the checkout's forms. */

/* The site bar's basket link (`button` variant `basket`): the profile link's
 * 44px icon-only circle, with a CSS-drawn basket (a body with a rounded base and
 * a handle arc — a STAND-IN for the icon `basket`, the brand library's own `Icon / basket` 18:89, until the icon sheet carries it in stage 3) in currentColor, and the line
 * count pinned top-right as a solid `count` chip. The text is the accessible
 * name, visually hidden by the zero font size; the chip sets its own size. */
.btn-basket {
  position: relative;
  justify-content: center;
  flex: none;
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 0;
  font-size: 0;
  color: var(--fg-strong);
  background: transparent;
  border: 0;
  border-radius: 50%;
}
.btn-basket::before {
  content: "";
  position: absolute;
  left: calc(22px - 10px * var(--text-scale));
  top: calc(22px - 3px * var(--text-scale));
  width: calc(20px * var(--text-scale));
  height: calc(12px * var(--text-scale));
  border: 2px solid currentColor;
  border-radius: 1px 1px 4px 4px;
  box-sizing: border-box;
  transform: perspective(24px) rotateX(-12deg); /* the tapered body of the drawn basket mark */
}
.btn-basket::after {
  content: "";
  position: absolute;
  left: calc(22px - 6px * var(--text-scale));
  top: calc(22px - 10px * var(--text-scale));
  width: calc(12px * var(--text-scale));
  height: calc(8px * var(--text-scale));
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  box-sizing: border-box;
}
.btn-basket:hover { background: var(--primary-soft); color: var(--fg-strong); }
.btn-basket:focus-visible { outline: 2px solid currentColor; outline-offset: -2px; }
.navbar .btn.btn-basket { width: 44px; padding: 0; font-size: 0; }
.btn-basket > .badge-count {
  position: absolute;
  /* The badge keeps its place on the basket glyph as both scale about the 44px box's centre. */
  top: calc(22px - 20px * var(--text-scale));
  right: calc(22px - 24px * var(--text-scale));
  margin: 0;
  min-width: calc(20px * var(--text-scale));
  height: calc(20px * var(--text-scale));
  padding: 0 var(--space-1);
  border-radius: var(--radius-pill);
  background: var(--on-light);
  color: var(--on-dark);
  font-size: var(--fs-xs);
  font-weight: 700;
  line-height: calc(20px * var(--text-scale));
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* Shop state chips — colour by the raw state, the word from the catalog. */
.badge-paid,
.badge-completed { background: var(--success-bg); color: var(--success); }
.badge-shipped { background: transparent; color: var(--success); box-shadow: inset 0 0 0 1px currentColor; }
.badge-cancelled,
.badge-archived { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--border); }
.badge-refunded { background: var(--danger-bg); color: var(--danger); }
.badge-count { background: var(--on-light); color: var(--on-dark); } /* a fixed dark chip: it reads on the brand bar AND on a light menu panel */

/* The offer: a band holding one surface — the description beside the buy column. */
.offer { /* one product card (the .offercard surface) in a sales slot */ }
.offer-when, .offer-where { /* the event's dates and place: .offerfact */ }
.offercard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18rem;
  gap: var(--space-6);
  max-width: calc(var(--measure) + 18rem + var(--space-6) * 3);
  margin-inline: auto;
  background: var(--panel);
  border: var(--surface-border) solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-6);
  box-shadow: var(--shadow-card);
}
.offerbody { min-width: 0; }
.offerbody > .eyebrow { margin: 0 0 var(--space-2); }
.offername { font-size: var(--fs-xl); margin: 0 0 var(--space-3); }
.offertext { margin: 0 0 var(--space-4); color: var(--muted); }
.offerfact { margin: 0 0 var(--space-1); font-size: var(--fs-sm); font-weight: 600; color: var(--fg); }
.offerbody > .badge { margin-top: var(--space-3); }
.offerbuy {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  /* no divider: the card gap separates the product from its price (GATE 1 round 8) */
}
.offerprice { margin: 0; font-family: var(--font-heading); font-size: var(--fs-xl); font-weight: 700; color: var(--fg-strong); font-variant-numeric: tabular-nums; }
.offervat { margin: 0; font-size: var(--fs-xs); color: var(--muted); }
.offeravail { margin: var(--space-2) 0 0; font-size: var(--fs-sm); color: var(--fg); }
.offernote { margin: var(--space-2) 0 0; font-size: var(--fs-sm); font-weight: 600; color: var(--fg-strong); }
.offeractions { display: flex; flex-direction: column; align-items: stretch; gap: var(--space-2); margin-top: var(--space-4); }
.offeractions > .btn { justify-content: center; }
/* Production posts an action natively: the button sits in its own form element (POST /basket, the
 * editor's moves), which takes the button's place in the column (change 1793454763). */
.offeractions > form { display: flex; flex-direction: column; }
.offer-edit .offeractions > form { flex-direction: row; }
.offeractions > form > .btn { justify-content: center; }
/* The claim's name step (change 1794332846): a full `form` in the action column — its submit
 * fills the column like every other card action. */
.offeractions > .form > .formactions > .btn { flex: 1 1 100%; justify-content: center; }
.offeractions > .link { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; font-size: var(--fs-sm); }
/* States: an added offer confirms in success; a closed / sold-out / locked one says
 * why in the warn colour and dims its price; owned confirms quietly. */
.offer-added .offernote,
.offer-owned .offernote { color: var(--success); }
.offer-soldout .offernote,
.offer-closed .offernote,
.offer-locked .offernote { color: var(--warn); }
.offer-soldout .offerprice,
.offer-closed .offerprice { color: var(--muted); }
.offer-sale { /* the default: price + the add action */ }
/* Price options (change 1793886701): the radio group replaces the single price line. Each
 * row: radio · name · price (right, tabular) on one line, the explanation under the name. */
.priceoptions { margin: 0; padding: 0; border: 0; min-width: 0; }
.priceoptionslegend { padding: 0; margin: 0 0 var(--space-2); font-size: var(--fs-sm); font-weight: 600; color: var(--fg-strong); }
.priceoptions .choice { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: var(--space-3); row-gap: var(--space-1); align-items: center; background: var(--panel); }
.priceoptions .choice:has(:checked) { background: var(--primary-soft); }
.priceoptions .choicetext { font-weight: 600; color: var(--fg-strong); }
.choiceprice { font-weight: 700; color: var(--fg-strong); font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.choicenote { grid-column: 2 / -1; font-size: var(--fs-sm); color: var(--muted); }
.priceoptionshelp { margin: 0 0 var(--space-1); font-size: var(--fs-xs); color: var(--muted); }
.offer-claim { /* free to claim: the price line reads "Maksuton" */ }
/* Editing mode only: the unbound slot's placeholder — dashed, flat, centred. */
.offer-edit.offercard { grid-template-columns: minmax(0, 1fr) auto; box-shadow: none; border: 1px dashed var(--border); background: var(--panel); padding: var(--space-4) var(--space-5); align-items: center; }
.offer-edit .offername { font-size: var(--fs-lg); margin: 0; }
.offer-edit .offerbuy { padding-left: 0; border-left: 0; flex-direction: row; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.offer-edit .offeractions { flex-direction: row; flex-wrap: wrap; margin: 0; }


/* The totals: label left, amount right, the last row (the total) strong. */
.totals { max-width: 28rem; margin: var(--space-5) 0 0 auto; }
.totals > .pagetext { grid-template-columns: minmax(0, 1fr) auto; min-height: 0; padding-block: var(--space-1); }
.totals > .pagetext .pagetext-value { text-align: right; font-variant-numeric: tabular-nums; }
.totals > .pagetext .pagetext-label { font-size: var(--fs-sm); letter-spacing: 0; }
.totals > .pagetext .pagetext-value { color: inherit; }
.totals > .pagetext:last-of-type { border-top: 1px solid var(--border); margin-top: var(--space-2); padding-top: var(--space-3); }
.totals > .pagetext:last-of-type .pagetext-label,
.totals > .pagetext:last-of-type .pagetext-value { font-size: var(--fs-lg); font-weight: 700; color: var(--fg-strong); }
.totalsnote { margin: var(--space-2) 0 0; font-size: var(--fs-xs); color: var(--muted); text-align: right; }

/* The desk's tabs: one row with a bottom rule; on a narrow screen the row scrolls sideways inside itself (the page never does). */
.tabs { margin: 0 0 var(--space-5); border-bottom: 1px solid var(--border); overflow-x: auto; }
.tablist { display: flex; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.tab { flex: none; }
.tablink {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 0 var(--space-3);
  color: var(--muted);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
}
.tablink:hover { color: var(--fg-strong); }
.tab-current .tablink { color: var(--fg-strong); border-bottom-color: var(--primary-deep); }
.tablink > .badge { margin: 0; }

/* A list of lines and its totals inside a panel; the checkout's two identify
 * forms side by side at md and above. Below md: everything stacks. */
@media (max-width: 767px) {
  .offercard { grid-template-columns: minmax(0, 1fr); gap: var(--space-5); padding: var(--space-5); }
  .offer-edit.offercard { grid-template-columns: minmax(0, 1fr); }
  .offer-edit .offerbuy { border-top: 0; padding-top: 0; }
  .totals { max-width: none; }
}

/* A form INSIDE a panel (the checkout's identify forms, the product settings) is
 * capped at the text measure like every form (dev POLICY: a form is never
 * stretched across the column); a row action (`inline`) and the in-place editor
 * keep their own sizing. */
.panel > .form:not(.form-inline, .form-editor) { max-width: var(--measure); }

/* A way in from a panel or a dialog ("Avaa: NVC-peruskurssi", "Avaa Tuotteet") and
 * a row's arrow link (the inventory's "Jatka kurssia"), and a link placed in a
 * form's flow ("Unohditko salasanan?"): each a 44px target sized to its text. */
.panel > .link-arrow,
.dialogbody > .link-arrow,
.tbl .cell-actions > .link-arrow,
.form > .link {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  min-height: 44px;
}
.panel > .link-arrow,
.dialogbody > .link-arrow { display: flex; width: fit-content; }
/* A row's arrow link (Tositteet "Lataa (PDF)") sits on the row's vertical centre like every cell. */
@media (min-width: 1200px) {
  .tbl .cell-actions > .link-arrow { margin-top: 0; }
}
/* ONE vertical rhythm in a dialog body (change 1794343431 S0-2): its row gap is the space between
 * two blocks and its padding the frame around them, so a block's own page margin (a notice's
 * --space-6, a paragraph's --space-3) never adds to either — it doubled the gap under a notice
 * and left more room below the last paragraph than above the first. */
.dialogbody > * { margin-block: 0; }
/* …and stacked forms (the media dialog) keep their hairline in the middle of that gap: the row
 * gap above it, their own --space-6 padding below — `.form + .form`'s margin would double it. */
.dialogbody > .form + .form { margin-top: 0; }
/* A contact link right after a refusal notice belongs to it (settings-delete-blocked). */
.dialogbody > .notice + .link-arrow { margin-top: calc(var(--space-2) - var(--space-6)); }
/* The sign-in link under the notice that ends a purchase session (change 1794408116,
 * order-pending-signin / order-claim-signin): a standalone action — the SAME --space-6 above
 * (the notice's own margin) and below it, never the arrow's --space-4 on top of the notice's
 * gap with nothing under it (measured 48 above / 0 below before). */
main.content > .notice + .link-arrow { display: flex; width: fit-content; margin-top: 0; margin-bottom: var(--space-6); }
.form > .link { font-size: var(--fs-sm); }
/* A secondary link in a table cell (the order a desk line belongs to) keeps a 44px
 * target; the record's own name link (`primary`) sets the row's heading line. */
.tbl td:not(.cell-primary) > .link { display: inline-flex; align-items: center; min-height: 44px; }

/* --- checkout layout (change 1793454763, GATE 1 round 2) ------------------ */

/* The step indicator: numbered discs joined by a rule; the current step filled,
 * a done step checked. */
.steps { margin: 0 0 var(--space-6); }
.steplist { display: flex; flex-wrap: nowrap; gap: var(--space-3); margin: 0; padding: 0; list-style: none; counter-reset: none; }
.step { display: flex; align-items: center; gap: var(--space-2); flex: none; min-width: 0; color: var(--muted); font-size: var(--fs-sm); font-weight: 600; }
.step + .step::before { content: ""; order: -1; flex: 0 0 var(--space-6); height: 1px; background: var(--border); }
.stepmark { display: grid; place-items: center; flex: none; width: calc(32px * var(--text-scale)); height: calc(32px * var(--text-scale)); border-radius: 50%; border: 1px solid var(--border); background: var(--panel); color: var(--muted); font-variant-numeric: tabular-nums; }
.steptext { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step-current { color: var(--fg-strong); }
.step-current .stepmark { background: var(--primary-deep); border-color: var(--primary-deep); color: var(--on-dark); }
.step-done .stepmark { background: var(--success-bg); border-color: var(--success-bg); color: var(--success); }

/* The order screen: the work beside the summary. */
.orderlayout { display: grid; grid-template-columns: minmax(0, 1fr) 22rem; gap: var(--space-6); align-items: start; }
.ordermain { min-width: 0; }
.ordermain > .panel:last-child { margin-bottom: 0; }

/* The summary: a panel-like surface, lines name ↔ amount, the totals, the action. */
.summary {
  position: sticky;
  top: var(--space-5);
  background: var(--panel);
  border: var(--surface-border) solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-6);
  box-shadow: var(--shadow-card);
}
.summarytitle { font-size: var(--fs-lg); margin: 0 0 var(--space-4); }
.summary > .pagetext { grid-template-columns: minmax(0, 1fr) auto; min-height: 0; padding-block: var(--space-1); gap: var(--space-3); }
.summary > .pagetext .pagetext-label { font-size: var(--fs-sm); letter-spacing: 0; font-weight: 400; color: var(--fg); }
.summary > .pagetext .pagetext-value { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.summary > .totals { max-width: none; margin: var(--space-3) 0 0; padding-top: var(--space-3); border-top: 1px solid var(--border); }
.summary > .totals .totalsnote { text-align: left; }
.summary > .btn { display: flex; justify-content: center; width: 100%; margin-top: var(--space-5); }
.summary > .btn + .btn { margin-top: var(--space-3); }
.summary > .link { display: inline-flex; align-items: center; min-height: 44px; margin-top: var(--space-2); font-size: var(--fs-sm); }
.summarynote { margin: var(--space-4) 0 0; font-size: var(--fs-sm); color: var(--muted); }

/* The quantity stepper: − n +, the signs drawn, the texts the accessible names. */
.stepper { display: inline-flex; align-items: center; gap: var(--space-1); }
.stepperbtn {
  position: relative;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--fg-strong);
  cursor: pointer;
}
.stepperbtn:hover { background: var(--primary-soft); }
.stepperbtn::before,
.stepper-more::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: calc(14px * var(--text-scale));
  height: 2px;
  background: currentColor;
}
.stepper-more::after { width: 2px; height: calc(14px * var(--text-scale)); }
.stepper-less { }
.stepperlabel { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.stepperval { min-width: 2ch; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.form.form-inline:has(> .stepper) { display: inline-flex; }

@media (max-width: 1023px) {
  .orderlayout { grid-template-columns: minmax(0, 1fr); }
  .summary { position: static; }
}
@media (max-width: 767px) {
  .step:not(.step-current) .steptext { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .step { flex: 0 0 auto; }
  .step-current { flex: 1 1 auto; }
  .step + .step::before { flex-basis: var(--space-3); }
}

/* --- GATE 1 round 3 (change 1793454763) ------------------------------------ */

/* Money columns: the amount and its header right-aligned (tabular numerals), so
 * the totals line up under them. Stacked below 1200px the cell is a labelled
 * field and keeps the field's own alignment. */
.tbl .col-end { text-align: right; }
@media (min-width: 1200px) {
  .tbl .cell-end { text-align: right; font-variant-numeric: tabular-nums; }
}
/* The amount to pay directly above the ordering button (the EU button rule): a
 * one-row `totals` as the form's last control. */
.form > .totals { max-width: none; margin: 0; }
.form > .totals > .pagetext:last-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
/* The stepper's number keeps 8px each side. */
.stepperval { padding-inline: var(--space-2); }
/* `table` layout `fixed`: lists that sit one under another share their column
 * widths (the inventory's groups, the orders list) — the name column takes 40%,
 * the rest share the remainder; every cell is centred on its row. */
.tbl-fixed .tbl { table-layout: fixed; }
.tbl-fixed .tbl th:first-child { width: 40%; }
.tbl-fixed .tbl td,
.orderlayout .tbl td { vertical-align: middle; }
@media (max-width: 767px) {
  /* the desk's tabs run to the screen edge, so the next tab peeks and the row reads as scrollable */
  .tabs { margin-right: calc(-1 * var(--gutter)); }
}

/* --- GATE 1 round 5: sales slot, course pages ------------------------------ */

/* A sales slot: an optional head, then its product cards in one centred column. */
.offers { /* a section band (tone + band padding from .section) */ }
.offerseyebrow { text-align: center; margin: 0 0 var(--space-2); }
.offershead { text-align: center; font-size: var(--fs-2xl); margin: 0 0 var(--space-6); }
.offerlist { display: grid; gap: var(--space-5); }
.offerlist > .offercard { width: 100%; }
.offersactions { display: flex; justify-content: center; margin-top: var(--space-5); }
.offersactions:empty { display: none; }

/* Progress: a label + count line over an 8px bar. */
.progress { margin: 0 0 var(--space-5); }
.progresshead { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-2); margin: 0 0 var(--space-2); font-size: var(--fs-sm); }
.progresslabel { font-weight: 600; color: var(--fg-strong); }
.progresstext { color: var(--muted); font-variant-numeric: tabular-nums; }
.progressbar { display: block; width: 100%; height: 8px; border: 0; border-radius: var(--radius-pill); background: var(--primary-soft); }
.progressbar::-webkit-meter-bar { background: var(--primary-soft); border: 0; border-radius: var(--radius-pill); height: 8px; }
.progressbar::-webkit-meter-optimum-value { background: var(--primary-deep); border-radius: var(--radius-pill); }
.progressbar::-moz-meter-bar { background: var(--primary-deep); border-radius: var(--radius-pill); }

/* A quiz question: legend, full-width 44px option rows, the result line. */
.question { margin: 0 0 var(--space-5); padding: 0; border: 0; min-width: 0; }
.questionlegend { padding: 0; margin: 0 0 var(--space-3); font-weight: 600; color: var(--fg-strong); }
.choice { display: flex; align-items: center; gap: var(--space-3); min-height: 44px; padding: var(--space-2) var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: var(--space-2); cursor: pointer; }
.choice:has(:checked) { border-color: var(--primary-deep); background: var(--primary-soft); }
.choiceradio { width: calc(20px * var(--text-scale)); height: calc(20px * var(--text-scale)); margin: 0; flex: none; accent-color: var(--primary-deep); }
.choicetext { min-width: 0; color: var(--fg); }
.questionnote { margin: var(--space-2) 0 0; font-size: var(--fs-sm); }
.question-right .questionnote { color: var(--success); }
.question-wrong .questionnote { color: var(--danger); }
.question-right .choice:has(:checked) { border-color: var(--success); background: var(--success-bg); }
.question-wrong .choice:has(:checked) { border-color: var(--danger); background: var(--danger-bg); }

/* Course chips: a module's kind (neutral outline) and "done". */
.badge-kind { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--border); }
/* An asset no page, product or course uses (the media library, change 1794557517): not an error and not
 * a kind — the neutral outline DASHED, so it never reads as the type chip beside it. */
.badge-unused { background: transparent; color: var(--muted); box-shadow: none; outline: 1px dashed var(--muted); outline-offset: -1px; }
.badge-done { background: var(--success-bg); color: var(--success); }
.badge-locked { background: var(--panel); color: var(--muted); box-shadow: inset 0 0 0 1px var(--border); }
.badge-held { background: var(--success-bg); color: var(--success); }
.badge-upcoming { background: transparent; color: var(--info); box-shadow: inset 0 0 0 1px var(--info); }

/* --- GATE 1 round 6 ------------------------------------------------------- */
/* A panel's action under its table ("Lisää toteutus", "Lisää moduuli") keeps space-4 from the list. */
.panel > .wrap + .btn { margin-top: var(--space-4); }
.panel > .wrap + .form,
.panel > .wrap + .pagetext { margin-top: var(--space-6); }
/* The editor's product rows keep the price and actions at the right edge. */
.offer-edit .offerbuy { justify-content: flex-end; }
/* A breadcrumb wraps between words, never inside one. */
.crumb { overflow-wrap: normal; word-break: normal; hyphens: manual; }

/* --- image carousel (Q-40, change 1793454763) ------------------------------ */
/* A scroll-snap track of the product's images: swipe works with no script; the arrows and the
 * dots' behaviour come with `carousel-ready` (2+ images). */
.carousel { position: relative; margin: 0 0 var(--space-4); min-width: 0; }
.carouseltrack { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: var(--radius); }
.carouseltrack::-webkit-scrollbar { display: none; }
.carouseltrack:focus-visible { outline: 2px solid var(--primary-deep); outline-offset: 2px; }
.carouseltrack > .media { flex: 0 0 100%; max-width: none; margin: 0; scroll-snap-align: start; aspect-ratio: 16 / 9; overflow: hidden; }
.carouseltrack > .media .media-el { display: block; width: 100%; height: 100%; object-fit: cover; }
.carousel-card { }
.carousel-wide .carouseltrack > .media { aspect-ratio: 21 / 9; }
.carouselbtn {
  display: none;
  position: absolute;
  top: calc(50% - 22px - var(--space-4));
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: color-mix(in oklab, var(--panel) 90%, transparent);
  box-shadow: var(--shadow-card);
  cursor: pointer;
}
.carousel-ready .carouselbtn { display: grid; place-items: center; }
.carousel-prev { left: var(--space-3); }
.carousel-next { right: var(--space-3); }
.carouselbtn::before { content: ""; width: 10px; height: 10px; border-left: 2px solid var(--fg-strong); border-bottom: 2px solid var(--fg-strong); transform: translateX(2px) rotate(45deg); }
.carousel-next::before { transform: translateX(-2px) rotate(-135deg); }
.carouselbtn:focus-visible { outline: 2px solid var(--primary-deep); outline-offset: 2px; }
.carouseldots { display: flex; justify-content: center; }
.dot { position: relative; width: 44px; height: 44px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.dot::before { content: ""; position: absolute; inset: 0; margin: auto; width: 8px; height: 8px; border-radius: var(--radius-pill); background: var(--border); }
.dot-current::before { width: 20px; background: var(--primary-deep); }
.dot:focus-visible { outline: 2px solid var(--primary-deep); outline-offset: -8px; border-radius: var(--radius-pill); }
@media (max-width: 767px) {
  .carousel-ready .carouselbtn { display: none; }
  .carouseltrack > .media,
  .carousel-wide .carouseltrack > .media { aspect-ratio: 4 / 3; }
}
/* A thumbnail before a line's name (basket, order and the admin's image list): the product's
 * first image, 56px square — never a carousel. */
.tbl td > .media { float: left; width: 56px; height: 56px; aspect-ratio: 1; margin: 0 var(--space-3) 0 0; border-radius: var(--radius-sm); overflow: hidden; }
/* The name beside the thumbnail is its own block formatting context, so it sits BESIDE the float at
 * its fit-content width — a plain fit-content block starts under the float and its shortened line
 * boxes broke "Tunnekortit" one letter per line (change 1793886701). */
.tbl td > .media + .link,
.tbl td > .media + .cell-name { display: flow-root; }
/* An image row (a product's Kuvat) in the wide table: the thumbnail stands alone on its line and its badge and
 * "Kuva n / N" go under it — never beside it in one row and under it in the next. */
@media (min-width: 1200px) {
  .tbl td > .media + .badge,
  .tbl td > .media + .cell-note { clear: left; }
}
.tbl td > .media .media-el { display: block; width: 100%; height: 100%; object-fit: cover; }
/* ...and the muted note under a thumbnailed row's link (the media library's alt text, change 1794557517)
 * is its own block formatting context too, so a two-line note wraps BESIDE the thumbnail, never under it. */
.tbl td > .media + .link + .cell-note { display: flow-root; }
/* A PREVIEW in a panel (the media library's asset page, change 1794557517): the whole file — never
 * cropped — at its own width up to the panel's, never taller than 32rem, so a portrait stays on the screen. */
.panel > .media .media-el { width: auto; max-height: 32rem; border-radius: var(--radius-sm); }
/* SEVERAL LINKS in one cell (the media library's "Käyttö": every place that uses the file, change
 * 1794557517) — one wrapping run, a muted middle dot centred in the gap between them. The dot is
 * OUT OF FLOW (absolute, in the gap left of the link), so the link's underline never runs under it. */
.tbl td > .link + .link { position: relative; margin-left: var(--space-3); }
.tbl td > .link + .link::before { content: "\00B7"; position: absolute; right: 100%; width: calc(var(--space-3) + .3em); text-align: center; color: var(--muted); }
/* A NON-PICTURE thumbnail (the media library's list, change 1794557517): a video, an audio clip or a
 * file has no poster — the 56px square is a TINT of the foreground (the placeholder rule: it reads on
 * every tone) with the kind's mark centred, the course plan's marks from the icon sheet. */
.tbl td > .media:not(:has(.media-el)) { display: grid; place-items: center; background: color-mix(in oklab, var(--fg) 12%, transparent); }
.tbl td > .media-video:not(:has(.media-el))::after,
.tbl td > .media-audio:not(:has(.media-el))::after,
.tbl td > .media-file:not(:has(.media-el))::after {
  content: "";
  width: 24px;
  height: 24px;
  background: var(--muted);
  -webkit-mask: center / contain no-repeat;
  mask: center / contain no-repeat;
}
.tbl td > .media-video:not(:has(.media-el))::after { -webkit-mask-image: var(--ico-play); mask-image: var(--ico-play); }
.tbl td > .media-audio:not(:has(.media-el))::after { -webkit-mask-image: var(--ico-headphones); mask-image: var(--ico-headphones); }
.tbl td > .media-file:not(:has(.media-el))::after { -webkit-mask-image: var(--ico-file-text); mask-image: var(--ico-file-text); }
/* A PRODUCT PICTURE being framed (the admin product page's Kuvat rows, change 1794554050): the row's
 * image is no 56px thumbnail but the picture in the carousel's 16/9 shape, large enough to hold the
 * framing toolbars — the same tools, the same light well and the same arrangement by height as a
 * page's media slot (a 384px frame is 216px tall: two toolbars; on a phone they fold). Its presence is the
 * switch (`:has(> .framebar)`), so a basket's or an order's thumbnail stays 56px. It never floats:
 * the "Kuva n / N" line and the badge stand under it with one --space-2 gap. Fixed width (not a
 * percentage — an auto-layout table column would size itself from it), capped by the cell. */
.tbl td > .media:has(> .framebar) {
  float: none;
  width: 24rem;
  max-width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  margin: 0 0 var(--space-2);
  border-radius: var(--radius);
}
/* ...and the carousel's PHONE shape below md (4/3, the carousel's own step), so the admin frames what a
 * phone shows — and a 310px phone frame is 232px tall: two single-column toolbars, not the fold. */
@media (max-width: 767px) {
  .tbl td > .media:has(> .framebar) { aspect-ratio: 4 / 3; }
}

/* --- typed-name delete confirmation (Q-44, change 1793454763) ---------------- */
/* Inside a dialog: what goes with the deleted thing and the name field; the danger button
 * (disabled until the typed name matches) is the dialog's action, in its action row. */
.confirmdelete { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-4); }
.confirmdelete > .field { align-self: stretch; }
.confirmdeletewhat { margin: 0; font-size: var(--fs-sm); color: var(--fg); }
.confirmdeletevalue { display: inline-block; max-width: 100%; } /* kept whole on its own line; wraps inside only when longer than the line */
.confirmdeletevalue::before,
.confirmdeletevalue::after { content: "\201D"; }
/* A refused delete (no name to type: users-cancel-blocked) shows no name field. */
.confirmdelete > .field:has(.confirmdeletevalue:empty) { display: none; }
.confirmdeletehelp { margin: calc(-1 * var(--space-2)) 0 0; font-size: var(--fs-sm); color: var(--muted); }

/* --- filter row (round 13, change 1793454763) --------------------------------- */
/* A GET filter (the desk's Kaikki tilaukset, Tositteet): its controls and the submit in ONE row
 * capped at the content column at md and above; stacked below md like every form. Fields align
 * at the top (a help line hangs below its own input), the submit sits on the input baseline. */
.form-filter { max-width: 64rem; margin-bottom: var(--space-6); display: flex; flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: var(--space-4); }
.form-filter > .field { flex: 1 1 11rem; margin: 0; }
.form-filter > .formactions { align-self: flex-end; margin: 0; }
.form-filter > .form-err:empty,
.form-filter > .formnote:empty { display: none; }
@media (max-width: 767px) {
  .form-filter { display: block; }
  .form-filter > .field { margin: 0 0 var(--space-4); }
}

/* A panel's actions (course-remote "Seuraava tapaaminen", an order's Tositteet, Kieli): below md
 * each further action takes its own line, flush left with a gap — never indented by the
 * inline gap of the wide row, never touching the one above. */
@media (max-width: 767px) {
  .panel > .btn + .btn { display: flex; width: fit-content; margin: var(--space-3) 0 0; }
}

/* --- download (DL 75) -----------------------------------------------------
 * One downloadable file (a PDF): the link + its type and size. In a page's flow it
 * sits in the content column at the text measure, centred like a form; in the app
 * shell's column (a course step) it spans the column under the text panel. An EMPTY
 * slot (no link) is hidden from a visitor; in editing mode it shows the trigger. */
.download {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-4);
  margin: 0;
}
.download:not(:has(.download-link)):not(:has(.btn)) { display: none; }
.download-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--action-text);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  overflow-wrap: anywhere;
}
.download-link:hover { color: var(--fg-strong); }
.download-meta { color: var(--muted); font-size: var(--fs-sm); }
main > .download {
  width: 100%;
  max-width: calc(var(--measure) + 2 * var(--gutter));
  justify-content: center; /* under a centred section, like a form */
  margin: 0 auto var(--band-y);
  padding: 0 var(--gutter);
}
main.content > .download {
  max-width: none;
  justify-content: flex-start;
  margin: 0 0 var(--space-4);
  padding: 0;
}

/* --- layout elements (change 1794076697) -----------------------------------
 * The element types an admin arranges a LAYOUT from, beyond the bands above:
 * call to action, info box, the four tag-filtered lists, course details and the site
 * map — plus the tag input of the admin forms. Every band takes the five element
 * backgrounds through its `tone` (plain · raised · sunken · accent-1-strong ·
 * accent-2-subtle), so none of these rules names a colour of a band. */

/* CALL TO ACTION: one centred column at the text measure — eyebrow, a larger heading,
 * one line, ONE button. Continuous: only the fluid heading rung and --band-y move. */
.cta { /* a section band (tone + band padding from .section) */ }
.ctabody { max-width: var(--measure); }
.width-measure .ctabody { margin-inline: auto; text-align: center; } /* the call to action's own centred column */
.width-wide .ctabody { max-width: none; } /* the content width, start-aligned like every element head */
.width-wide .ctatext { max-width: var(--measure); } /* the line stays readable */
/* The public h2 rung (--fs-2xl), one below the hero h1 (change 1794553108 — was 3xl, the h1 size). */
.ctahead { font-size: var(--fs-2xl); margin: 0 0 var(--space-4); text-wrap: balance; }
.ctatext { margin: 0 0 var(--space-6); color: var(--muted); font-size: var(--fs-lg); }
.ctabody > .btn { margin: 0; }

/* INFO BOX: the shared info frame (above, with .infoboxtext) at the text measure,
 * left-aligned with the text bands; heading small, body copy at body size. */
.infosection { /* a section band (tone + band padding from .section) */ }
.infosectionbox { max-width: var(--measure); padding: var(--space-5); }
.width-measure .infosectionbox { margin-inline: auto; } /* centred like the text-only prose column */
.width-wide .infosectionbox { max-width: none; } /* the content width, like every other element */
.infosectionhead { font-size: var(--fs-lg); margin: 0 0 var(--space-2); }
.infosectiontext { margin: 0; }
.infosectionbox > .btn { margin-top: var(--space-4); }

/* COURSE CARD (a `card` with a kind line, fact lines and an action): the kind line
 * keeps the eyebrow's look inside a card (.card p would otherwise restyle it); the
 * price is the card's emphasis, its alv line muted under it; the buy button sits
 * above the arrow link at its natural width. */
.card .eyebrow { color: var(--primary-deep); font-size: var(--fs-xs); margin: 0 0 var(--space-2); }
.card .cardfact { margin-top: var(--space-3); color: var(--fg); font-weight: 600; }
.card .cardprice { margin-top: var(--space-3); color: var(--fg-strong); font-size: var(--fs-lg); font-weight: 600; }
.card .cardvat { color: var(--muted); font-size: var(--fs-xs); }
.card > .btn { margin-top: var(--space-4); }
.card > .btn + .link { margin-top: var(--space-3); }
/* The claim's name step on a course card (change 1794332846): the note under the price, the
 * name form in the action's place. */
.card .cardnote { margin-top: var(--space-3); color: var(--fg); }
.card > .form { margin-top: var(--space-4); }
.card > .form + .link { margin-top: var(--space-3); }

/* LISTS: the course and page lists are a card row (.cards + cols-*); the course dates
 * and product lists a sales slot's column (.offerlist, its centred head). The intro of
 * a centred list head and the EMPTY line (Q-122: the heading + the admin's own line)
 * sit at the text measure; an empty grid takes no space. */
.courselist, .pagelist { /* a section band with a card grid (.cards + cols-{n}) */ }
.coursedates, .productlist { /* a section band with an offer column (.offerlist) */ }
.listintro { max-width: var(--measure); margin: 0 auto var(--space-6); text-align: center; color: var(--muted); }
.coursedates .offershead:has(+ .listintro), .productlist .offershead:has(+ .listintro) { margin-bottom: var(--space-3); }
.listempty { max-width: var(--measure); margin: var(--space-4) 0 0; color: var(--muted); }
.coursedates .listempty, .productlist .listempty, .head-center .listempty { margin-inline: auto; text-align: center; }
.cards:not(:has(> *)), .offerlist:not(:has(> *)) { display: none; }
.courselist > .wrap > .notice, .pagelist > .wrap > .notice,
.coursedates > .wrap > .notice, .productlist > .wrap > .notice,
.coursedetails > .wrap > .notice { max-width: var(--measure); margin-top: var(--space-4); }
.coursedates > .wrap > .notice, .productlist > .wrap > .notice { margin-inline: auto; margin-bottom: var(--space-5); }

/* COURSE DETAILS: a definition list at the text measure — stepped at md (below, in the
 * responsive block): name beside value at md and above, stacked under it below. */
.coursedetails { /* a section band (tone + band padding from .section) */ }
.coursefacts { max-width: var(--measure); margin: var(--space-5) 0 0; padding: 0; border-top: 1px solid var(--border); }
.coursefacts:not(:has(> *)) { display: none; }
.fact { display: grid; grid-template-columns: 12rem minmax(0, 1fr); gap: var(--space-4); padding: var(--space-3) 0; border-bottom: 1px solid var(--border); }
.factlabel { margin: 0; color: var(--muted); font-weight: 600; }
.facttext { margin: 0; color: var(--fg); overflow-wrap: anywhere; }
.coursedetails .offerlist { margin-top: var(--space-6); }
/* Under the left-aligned fact list the offer cards align left with it, not centred. */
.coursedetails .offercard { margin-inline: 0; }

/* SITE MAP: a two-column card row (cols-2 .cards) under its heading block — the PAGE's heading
 * block (SUM-3 39ec782): its h1 takes the hero h1's rung and face, so the page title reads the
 * same as every public page's, one rung above the public h2; the intro and the card row keep
 * the section rhythm (the h1's --space-4, the intro's --space-3, the grid's --space-6). */
.sitemap { /* a section band; the grid is the card row's .cols-2 .cards */ }
.sitemap .prose h1 {
  font-family: var(--font-display);
  font-size: var(--fs-3xl);
  letter-spacing: -.03em;
  margin: 0 0 var(--space-4);
}

/* TAG INPUT: label, the chips (wrapping pills), the field — a fixed light well like
 * every .input — the hint and the polite announcement line. */
.taginput { /* a .field column: label · chips · input · help · announcement */ }
.tagchips { display: flex; flex-wrap: wrap; gap: var(--space-2); list-style: none; margin: 0; padding: 0; }
.tagchips:not(:has(> *)) { display: none; }
.tagchip {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--primary-soft);
  color: var(--fg-strong);
}
.tagchipname,
.tagchipremove {
  min-height: 44px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.tagchipname { display: inline-flex; align-items: center; text-decoration: none; } /* a link (gap 20) */
.tagchipname { padding: 0 var(--space-2) 0 var(--space-4); font-size: var(--fs-sm); font-weight: 600; border-radius: var(--radius-pill) 0 0 var(--radius-pill); }
.tagchipname:hover { text-decoration: underline; }
/* A typed, unsaved asiasana has no rename yet (SUM-3): its name is plain text, not a link. */
span.tagchipname { cursor: default; }
span.tagchipname:hover { text-decoration: none; }
.tagchipremove { position: relative; width: 44px; border-radius: 0 var(--radius-pill) var(--radius-pill) 0; }
/* The × is two CSS hairlines (no icon asset), in the chip's ink. */
.tagchipremove::before,
.tagchipremove::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: calc(14px * var(--text-scale));
  border-top: 2px solid currentColor;
}
.tagchipremove::before { transform: translate(-50%, -50%) rotate(45deg); }
.tagchipremove::after { transform: translate(-50%, -50%) rotate(-45deg); }
.tagchipremove:hover { background: color-mix(in oklab, currentColor 12%, transparent); }
.tagchipname:focus-visible,
.tagchipremove:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
/* A name the asiasana rule refuses (SUM-8): the form error's colours (the --danger on
 * --danger-bg pair the .form-err banner already uses), so the chip to fix stands out. */
.tagchip-invalid { border-color: var(--danger); background: var(--danger-bg); color: var(--danger); }
.taginputfield { /* the .input well — a text field with the suggestions <datalist> */ }
.taginputlive { font-size: var(--fs-sm); color: var(--muted); }
.taginputlive:empty { display: none; }

@media (max-width: 768px) {
  /* Course details: the fact name stacks over its value. */
  .fact { grid-template-columns: minmax(0, 1fr); gap: var(--space-1); }
}

/* A content page's trail as its own SECTION with a background (change 1794076697): the
 * band gets a short vertical padding and no bottom margin, so the hairlines of a raised
 * or sunken trail never sit tight on the text. A trail without a tone (every app and
 * admin screen) is untouched. */
.breadcrumb:is(.tone-plain, .tone-raised, .tone-sunken, .tone-accent-1-subtle, .tone-accent-1-strong, .tone-accent-2-subtle, .tone-accent-2-strong) {
  margin: 0;
  padding-block: var(--space-4);
}

/* --- course page: headbar · toggle · stepnav · neighbour · partlist · part ------------------
 * Change 1794373554 (GATE 1 Q-155, developer 2026-11-11). */

/* `headbar`: the row above a page head — the mode toggle, then the subject's own chips. */
.headbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}
.headbar > .badge { margin-top: 0; }

/* `toggle`: one mode on / off. Off = outlined like `secondary`; on (aria-pressed=true) = its
 * OWN colour, the accent-2 strong surface + its AA ink — never the petrol primary. The switch
 * mark (a 28 × 16 track, knob left = off, right = on) says it by shape too. */
.toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 44px;
  padding: 0 var(--space-4);
  border: 1px solid var(--button-secondary-border);
  border-radius: var(--radius-action);
  background: transparent;
  color: var(--button-secondary-fg);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.toggle:hover, .toggle.toggle-state-hover { background: color-mix(in oklab, currentColor 12%, transparent); }
.toggle:active, .toggle.toggle-state-active { background: color-mix(in oklab, currentColor 20%, transparent); }
.toggle:focus-visible, .toggle.toggle-state-focus { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.toggle[aria-pressed="true"] {
  background: var(--surface-accent-2-strong);
  border-color: var(--surface-accent-2-strong);
  color: var(--on-accent-2-strong);
}
.toggle[aria-pressed="true"]:hover, .toggle[aria-pressed="true"].toggle-state-hover {
  background: color-mix(in oklab, var(--surface-accent-2-strong) 88%, var(--on-accent-2-strong));
}
.toggle[aria-pressed="true"]:active, .toggle[aria-pressed="true"].toggle-state-active {
  background: color-mix(in oklab, var(--surface-accent-2-strong) 78%, var(--on-accent-2-strong));
}
.togglemark {
  position: relative;
  flex: none;
  width: calc(28px * var(--text-scale));
  height: calc(16px * var(--text-scale));
  border: 1.5px solid currentColor;
  border-radius: var(--radius-pill);
}
.togglemark::after {
  content: "";
  position: absolute;
  top: calc(2px * var(--text-scale));
  left: calc(2px * var(--text-scale));
  width: calc(9px * var(--text-scale));
  height: calc(9px * var(--text-scale));
  border-radius: 50%;
  background: currentColor;
}
.toggle[aria-pressed="true"] .togglemark::after { left: auto; right: calc(2px * var(--text-scale)); }
.toggle.toggle-disabled,
.toggle.toggle-disabled:hover,
.toggle.toggle-disabled:active {
  background: transparent;
  color: var(--button-disabled-fg);
  border: 1px dashed var(--button-disabled-border);
  cursor: not-allowed;
}

/* `stepnav`: ‹ previous · main · next › in one bar, above and below the content. */
.stepnav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-areas: "prev main next";
  align-items: center;
  gap: var(--space-3);
}
.stepnav-top,
.stepnav-bottom { margin-block: var(--space-6); } /* ONE rhythm token on both sides, no rule (Q-158 follow-up) */
.stepnav > .neighbour-prev { grid-area: prev; justify-self: start; }
.stepnav > .neighbour-next { grid-area: next; justify-self: end; }
.stepnav > .btn,
.stepnav > .form { grid-area: main; justify-self: center; margin: 0; }
.stepnav > .form .formactions { margin: 0; }
/* With no neighbours (a course overview's "Jatka") the main action starts the row. */
.stepnav:not(:has(.neighbour)) { display: flex; }
@media (max-width: 767px) {
  .stepnav { grid-template-columns: 1fr 1fr; grid-template-areas: "main main" "prev next"; }
  .stepnav:not(:has(> .btn, > .form)) { grid-template-areas: "prev next"; }
  .stepnav > .btn,
  .stepnav > .form,
  .stepnav > .form .formactions,
  .stepnav > .form .btn { justify-self: stretch; width: 100%; justify-content: center; }
  .stepnav > .neighbour { justify-self: stretch; }
}

/* `neighbour`: an outlined (secondary-look) button — only "Edellinen" / "Seuraava" + its chevron (Q-158). */
.neighbour {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 var(--space-4);
  border: 1px solid var(--button-secondary-border);
  border-radius: var(--radius-action);
  color: var(--button-secondary-fg);
  text-decoration: none;
  white-space: nowrap;
}
.neighbour[href]:hover { background: color-mix(in oklab, currentColor 12%, transparent); }
.neighbour[href]:active { background: color-mix(in oklab, currentColor 20%, transparent); }
.neighbour:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.neighbourlabel {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-sm);
  font-weight: 600;
}
.neighbour-prev .neighbourlabel::before,
.neighbour-next .neighbourlabel::after {
  content: "";
  width: calc(7px * var(--text-scale));
  height: calc(7px * var(--text-scale));
  border-bottom: 1.5px solid currentColor;
  border-left: 1.5px solid currentColor;
  transform: rotate(45deg);
}
.neighbour-next .neighbourlabel::after { transform: rotate(-135deg); }
.neighbour.neighbour-disabled {
  color: var(--button-disabled-fg);
  border-style: dashed;
  border-color: var(--button-disabled-border);
  cursor: not-allowed;
}
/* A disabled toggle's / neighbour's reason: the `title` reaches only a pointer, so the same
 * text rides inside the control visually hidden — read by touch, keyboard and screen-reader
 * users, never drawn (no visual change). */
.togglehint,
.neighbourhint { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* `partlist` + `part`: a course's parts as compact borderless rows, aligned like a table. */
.partlist {
  list-style: none;
  margin: var(--space-4) 0 0;
  padding: 0;
}
.part {
  position: relative;
  display: grid;
  grid-template-columns: calc(2.25rem * var(--text-scale)) minmax(0, 1fr) 6.5rem 8.5rem 10rem;
  grid-template-areas: "num name kind meta state" "num name kind meta reason";
  align-items: center;
  column-gap: var(--space-4);
  min-height: 44px;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
}
.part + .part { margin-top: 2px; }
.part:nth-child(even) { background: color-mix(in oklab, var(--fg) 3%, transparent); }
.partnum {
  grid-area: num;
  display: inline-grid;
  place-items: center;
  width: calc(28px * var(--text-scale));
  height: calc(28px * var(--text-scale));
  border-radius: 50%;
  border: 1.5px solid var(--border);
  color: var(--muted);
  font-size: var(--fs-xs);
  font-weight: 600;
}
.partname { grid-area: name; color: var(--fg-strong); font-weight: 600; text-decoration: none; }
.partname:not([href]) { color: var(--muted); font-weight: 400; }
.partname[href]::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.partname[href]:focus-visible { outline: none; }
.part:has(.partname[href]:hover) { background: color-mix(in oklab, var(--primary) 8%, transparent); }
.part:has(.partname[href]:focus-visible) { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.partkind, .partmeta, .partstate, .partreason { font-size: var(--fs-sm); color: var(--muted); }
.partkind { grid-area: kind; display: inline-flex; align-items: center; gap: var(--space-2); }
.partmeta { grid-area: meta; }
.partstate { grid-area: state; display: inline-flex; align-items: center; gap: var(--space-2); font-weight: 600; }
.partreason { grid-area: reason; align-self: start; font-size: var(--fs-xs); }
.part:has(.partreason) .partstate { align-self: end; }
.part:not(:has(.partreason)) .partstate { grid-row: 1 / span 2; }
.part > .btn { grid-column: 2 / -1; justify-self: start; position: relative; z-index: 1; margin-top: var(--space-2); }
/* Kind + state marks: Lucide masks from the icon sheet (`var(--ico-*)`, internal/web/ui/icon —
 * the `.btn-edit` precedent), painted in currentColor so they take the word's colour. */
.partkind::before,
.partstate::before {
  content: "";
  flex: none;
  width: calc(14px * var(--text-scale));
  height: calc(14px * var(--text-scale));
  background: currentColor;
  -webkit-mask: center / contain no-repeat;
  mask: center / contain no-repeat;
}
.part-kind-video .partkind::before { -webkit-mask-image: var(--ico-play); mask-image: var(--ico-play); }
.part-kind-audio .partkind::before { -webkit-mask-image: var(--ico-headphones); mask-image: var(--ico-headphones); }
.part-kind-article .partkind::before { -webkit-mask-image: var(--ico-file-text); mask-image: var(--ico-file-text); }
.part-kind-test .partkind::before { -webkit-mask-image: var(--ico-list-checks); mask-image: var(--ico-list-checks); }
.part-kind-session .partkind::before { -webkit-mask-image: var(--ico-users); mask-image: var(--ico-users); }
/* State marks before the state word: a check · a play mark · a ring · a padlock. */
.part-done .partstate, .part-held .partstate { color: var(--success); }
.part-done .partstate::before, .part-held .partstate::before { -webkit-mask-image: var(--ico-check); mask-image: var(--ico-check); }
.part-done .partnum, .part-held .partnum { border-color: var(--success); color: var(--success); background: var(--success-bg); }
.part-next { background: var(--primary-soft); box-shadow: inset 3px 0 0 var(--primary); }
.part-next:nth-child(even) { background: var(--primary-soft); }
.part-next .partnum { border-color: var(--primary); background: var(--primary); color: var(--on-dark); }
.part-next .partstate { color: var(--primary-deep); }
.part-next .partstate::before { -webkit-mask-image: var(--ico-play); mask-image: var(--ico-play); }
.part-open .partstate::before,
.part-upcoming .partstate::before { -webkit-mask-image: var(--ico-circle); mask-image: var(--ico-circle); }
.part-locked .partstate::before { -webkit-mask-image: var(--ico-lock); mask-image: var(--ico-lock); }
@media (max-width: 767px) {
  /* Below md: the number stays left; the name takes the first line, kind · length · state
   * wrap inline under it, the reason on its own line. */
  .part {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--space-1) var(--space-3);
    padding: var(--space-3) var(--space-3) var(--space-3) calc(var(--space-3) + 28px * var(--text-scale) + var(--space-3));
  }
  .partnum { position: absolute; left: var(--space-3); top: var(--space-3); }
  .partname { flex-basis: 100%; }
  .partreason { flex-basis: 100%; }
  .part > .btn { margin-top: var(--space-2); }
}

/* COURSE SCREEN RHYTHM (change 1794373554, Q-158 follow-up, developer 2026-11-11: "space between
 * next element above and below top jatka button is not equal … important for visual harmony"):
 * on a course screen (its content holds a step bar or a part list) every block after the page
 * head — images, media, a panel, the material, the progress, a notice, the bars — is ONE rhythm
 * step apart, --space-6, so no gap reads as a grouping that is not there. */
main.content:has(> .stepnav, .partlist) > :is(.carousel, .media, .panel, .download, .progress, .notice) { margin-block: 0 var(--space-6); }
main.content:has(> .stepnav, .partlist) > .panel + .link-arrow { display: flex; width: fit-content; margin-top: 0; }

/* --- account overview: overview · agenda · agendaday · agendaitem · learnitem (change 1794754585) ---
 * /account starts with the member's learning region (developer + desk 2026-11-15, agreed reading
 * 1–3): the week's events as ONE list grouped by day (booked + suggested), and beside it on
 * desktop the learning status and the downloads. /account/schedule reuses the agenda per month. */
.overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22rem;
  gap: var(--space-5);
  align-items: start;
  margin-bottom: var(--space-5);
}
.overviewlead, .overviewside { min-width: 0; }
.overviewlead > .panel:last-child,
.overviewside > .panel:last-child { margin-bottom: 0; }
@media (max-width: 1023px) {
  .overview { grid-template-columns: minmax(0, 1fr); }
}

/* The agenda is a panel (same surface); its heading row carries the trailing link. */
.agendahead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 var(--space-4);
  margin-bottom: var(--space-2);
}
.agendahead > h2 { margin: 0; }
/* The link keeps its 44px target without making the heading row taller than a panel heading. */
.agendahead > .link { display: inline-flex; align-items: center; min-height: 44px; margin-block: calc(-1 * var(--space-2)); }
.agenda > .panelintro { margin-bottom: var(--space-4); }
.agendaempty { color: var(--muted); font-size: var(--fs-sm); margin: 0; }
.agendaday + .agendaday { margin-top: var(--space-5); }
/* With no intro the first day keeps the intro's distance from the heading: 16px (the margins collapse). */
.agendahead + .agendaday { margin-top: var(--space-4); }
.agendadate {
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--fg-strong);
  margin: 0 0 var(--space-2);
}
.agendaitems { list-style: none; margin: 0; padding: 0; }
.agendaitem {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr) auto;
  grid-template-areas: "time body state" "time actions actions";
  align-items: start;
  column-gap: var(--space-4);
  row-gap: var(--space-2);
  padding: var(--space-3);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: color-mix(in oklab, var(--fg) 3%, transparent);
}
.agendaitem + .agendaitem { margin-top: var(--space-2); }
.agendatime {
  grid-area: time;
  margin: 0;
  font-weight: 600;
  color: var(--fg-strong);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.agendabody { grid-area: body; min-width: 0; }
.agendaname { color: var(--fg-strong); font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
/* The whole event is the name's target (the `part` precedent): its link covers the row, the
 * buttons sit above it. */
.agendaitem { position: relative; }
.agendaname[href]::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.agendaname[href]:focus-visible { outline: none; }
.agendaitem:has(.agendaname[href]:hover) .agendaname { color: var(--action-text); text-decoration: underline; text-underline-offset: 2px; }
.agendaitem:has(.agendaname[href]:focus-visible) { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.agendaactions .btn { position: relative; z-index: 1; }
.agendameta, .agendanote, .agendaprice { margin: var(--space-1) 0 0; font-size: var(--fs-sm); color: var(--muted); }
.agendameta { line-height: var(--leading-body); }
.agendakind { white-space: nowrap; }
.agendakind::before { display: inline-block; vertical-align: -0.15em; margin-right: var(--space-2); }
.agendakind::after { margin-inline: var(--space-1); }
/* The separator ends the kind (inside its unbreakable box), so a wrapped place never starts with it. */
.agendakind:has(+ .agendawhere)::after { content: "·"; }
.agendaprice { color: var(--fg-strong); font-weight: 600; }
.agendastate {
  grid-area: state;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
.agendaactions { grid-area: actions; justify-self: end; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.agendaactions:empty { display: none; }
/* Kind + state marks: icon-sheet masks in currentColor (the `part` precedent). */
.agendakind::before,
.agendastate::before {
  content: "";
  flex: none;
  width: calc(14px * var(--text-scale));
  height: calc(14px * var(--text-scale));
  background: currentColor;
  -webkit-mask: center / contain no-repeat;
  mask: center / contain no-repeat;
}
.agendaitem-online .agendakind::before { -webkit-mask-image: var(--ico-globe); mask-image: var(--ico-globe); }
.agendaitem-place .agendakind::before { -webkit-mask-image: var(--ico-users); mask-image: var(--ico-users); }
.agendaitem-booked .agendastate { color: var(--success); }
.agendaitem-booked .agendastate::before { -webkit-mask-image: var(--ico-check); mask-image: var(--ico-check); }
/* A suggestion is told apart by its word and a dashed outline on the plain ground — never by colour alone. */
.agendaitem-suggested { background: transparent; border: 1px dashed var(--border); }
.agendaitem-suggested .agendastate { color: var(--primary-deep); }
.agendaitem-suggested .agendastate::before { -webkit-mask-image: var(--ico-plus); mask-image: var(--ico-plus); }
@media (max-width: 767px) {
  .agendaitem {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "time state" "body body" "actions actions";
  }
  .agendaactions { justify-self: start; }
}

/* One holding in the side column (a course: kind, name, the bar, the way on; a download: kind, name, what it holds) — one rhythm step apart. */
.learnitem + .learnitem { margin-top: var(--space-5); }
.learnkind { margin: 0; font-size: var(--fs-xs); color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.learnname { display: flex; align-items: center; min-height: 44px; margin: 0 0 var(--space-1); color: var(--fg-strong); font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.learnname[href]:hover { color: var(--action-text); text-decoration: underline; text-underline-offset: 2px; }
.learntext { margin: 0; font-size: var(--fs-sm); color: var(--muted); }
.learnname:not([href]) { color: var(--muted); }
.learnitem > .progress { margin-bottom: var(--space-2); }
.learnitem > .link { display: inline-flex; align-items: center; min-height: 44px; }

/* --- rich text (change 1794650126) -------------------------------------
 * What the ONE renderer emits for a long content text: a stack of pieces in plain semantic
 * HTML, styled here under `.richtext` (the renderer never emits a class from content). The
 * same rules style the editor's document, so a piece looks the same while it is edited. ONE
 * rhythm: --space-4 between pieces, --space-6 above a heading (it opens a new part), and a
 * typed line break (<br>) stays a line break. */
.richtext { color: var(--fg); line-height: var(--leading-body); }
.richtext > * { margin: 0; }
.richtext > * + * { margin-top: var(--space-4); }
.richtext > * + :is(h3, h4) { margin-top: var(--space-6); }
.richtext :is(h3, h4) { font-family: var(--font-heading); line-height: var(--leading-heading); color: var(--fg-strong); text-wrap: balance; }
.richtext h3 { font-size: var(--fs-xl); }
.richtext h4 { font-size: var(--fs-lg); }
.richtext strong { font-weight: 700; color: var(--fg-strong); }
/* A link in running text is the action colour and underlined — never colour alone. */
.richtext a:not(.btn, .toggle, .richmenuitem) { color: var(--action-text); text-decoration: underline; text-underline-offset: 2px; }
.richtext a:not(.btn, .toggle, .richmenuitem):hover { color: var(--fg-strong); }
.richtext :is(ul, ol) { padding-left: 1.5em; }
.richtext li + li { margin-top: var(--space-2); }
.richtext blockquote { margin-inline: 0; padding-left: var(--space-4); border-left: 3px solid var(--border); color: var(--fg-strong); }
.richtext blockquote p { margin: 0; }

/* The table: one grid at md and above; below md `stack` makes every row a card whose values
 * carry their column heading as a label, `scroll` keeps the grid and scrolls inside its own
 * region. Explicit ARIA roles (in the markup) keep it a table in both. */
.richtable { overflow-x: auto; border: 1px solid var(--border-soft); border-radius: var(--radius-sm); }
.richtable:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.richtable table { width: 100%; border-collapse: collapse; }
.richtable :is(th, td) { padding: var(--space-2) var(--space-3); text-align: left; vertical-align: top; }
.richtable th { font-weight: 600; color: var(--fg-strong); border-bottom: 2px solid var(--border); overflow-wrap: normal; }
.richtable tr + tr > td { border-top: 1px solid var(--border-soft); }
@media (max-width: 767px) {
  .richtable-scroll table { width: max-content; min-width: 100%; }
  .richtable-scroll td { max-width: 16rem; }
  .richtable-stack { overflow: visible; border: 0; border-radius: 0; }
  .richtable-stack :is(table, tbody, tr, td) { display: block; }
  .richtable-stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .richtable-stack tr { padding: var(--space-3) var(--space-4); border: 1px solid var(--border-soft); border-radius: var(--radius-sm); }
  .richtable-stack tr + tr { margin-top: var(--space-3); }
  .richtable-stack tr + tr > td { border-top: 0; }
  .richtable-stack td { padding: 0; }
  .richtable-stack td + td { margin-top: var(--space-3); }
  .richtable-stack td::before { content: attr(data-label); display: block; font-size: var(--fs-sm); font-weight: 600; color: var(--muted); }
}

/* The cards: each kind on its own EXISTING tone scope (example raised, practice sunken,
 * reflection accent-1-subtle — the renderer sets it), so every ink inside is AA-asserted; a
 * thicker leading edge marks it as set apart from the running text. Its pieces keep the
 * text's rhythm. */
.richcard { padding: var(--space-5); border: 1px solid var(--border-soft); border-radius: var(--radius); }
.richcard-example, .richcard-practice, .richcard-reflection { border-left: 4px solid var(--border); }
.richcard > * { margin: 0; }
.richcard > * + * { margin-top: var(--space-3); }
.richcard-title { font-size: var(--fs-sm); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--primary-deep); }

/* --- rich-text editor ---------------------------------------------------
 * The page-wide overlay. Every bar shares the document column — the text measure plus the
 * frame inset, centred, the gutter at least — so the tools, the pieces and the actions line
 * up at every width (the same padding expression on each). Shown modally in production (its
 * own scroll box: the toolbar pinned at the top, the bar at the foot of the visible screen);
 * in flow in the prototype, where the same sticky rules pin them to the page's viewport. */
.richeditor {
  position: static;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: none;
  min-height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--fg);
  background: var(--bg);
}
.richeditor:modal { position: fixed; inset: 0; height: 100dvh; max-height: none; overflow: auto; overscroll-behavior: contain; }
.richeditor::backdrop { background: var(--bg); }
/* The page behind gives up its scrollbar gutter (html keeps one, scrollbar-gutter: stable) while the
 * overlay is open: a fixed box stops one gutter short of the edge otherwise (measured: 819 of 834). */
html:has(.richeditor:modal) { overflow: hidden; scrollbar-gutter: auto; }
.richeditor-head, .richeditor-toolbar, .richeditor-doc, .richeditor-bar {
  padding-inline: max(var(--gutter), calc((100% - var(--measure) - 2 * var(--space-4)) / 2));
}
.richeditor-head { display: flex; align-items: center; gap: var(--space-3); padding-block: var(--space-2); background: var(--panel); }
.richeditor-title { flex: 1 1 auto; min-width: 0; }
.richeditor-title h2 { margin: 0; font-size: var(--fs-lg); }
/* THE LANGUAGE SWITCH: the `tabs` row in the head (one language at a time) — no rule under it
 * and no margin of its own; the current tab's underline is the mark. */
.richeditor-head > .tabs { flex: none; margin: 0; border-bottom: 0; overflow: visible; }
.richeditor-head .tablist { gap: var(--space-1); }
/* THE PINNED REGION: the toolbar and the message line under it stay at the top while the
 * head, the document and the bar scroll under them (GATE 1, Q-195 (2)). */
.richeditor-top {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--panel);
  border-block: 1px solid var(--border-soft);
}
.richeditor-toolbar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding-block: var(--space-1);
}
/* THE MESSAGE LINE: one notice under the tools, in the column, its one action at the end. */
.richeditor-top > .notice {
  margin: var(--space-1) max(var(--gutter), calc((100% - var(--measure) - 2 * var(--space-4)) / 2)) var(--space-2);
}
.toolgroup { display: flex; gap: var(--space-1); }
.richeditor-toolbar > .toolgroup + .toolgroup { padding-left: var(--space-2); border-left: 1px solid var(--border-soft); }
.richeditor-toolbar > .toolgroup:last-child { margin-left: auto; padding-left: 0; border-left: 0; }
.toolgroup .btn { color: var(--fg); border-radius: var(--radius-sm); }
.toolgroup .btn:not(.btn-undo, .btn-redo, .btn-more) { padding-inline: var(--space-3); }
@media (max-width: 479px) {
  .toolgroup-fold-sm { display: none; }
  .richeditor-toolbar > .toolgroup-fold-sm + .toolgroup { padding-left: 0; border-left: 0; }
}
.richeditor-doc { flex: 1 0 auto; display: flex; flex-direction: column; gap: var(--space-6); padding-block: var(--space-7) var(--space-6); }
/* (the top step clears the first piece's toolbar, which straddles its frame edge, from the pinned region) */
.richeditor-doc > * + * { margin-top: 0; }
.richeditor-doc > .btn-add { align-self: flex-start; color: var(--fg); }
/* The bar at the END of the text, in the same scroll (not pinned, Q-195 (2)): Tallenna
 * leftmost, Peruuta beside it, the status at the end (above them below sm); one spacing
 * token above and below the buttons. */
.richeditor-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  padding-block: var(--space-5);
  background: var(--panel);
  border-top: 1px solid var(--border-soft);
}
.richeditor-state { display: flex; align-items: center; gap: var(--space-3); margin-left: auto; }
.richeditor-status { margin: 0; font-size: var(--fs-sm); color: var(--muted); }
@media (max-width: 479px) {
  .richeditor-state { order: -1; flex-basis: 100%; margin: 0; }
}

/* The editor's tool marks. Icon-only 44px squares; the label stays in the markup at font-size
 * 0 as the accessible name. undo / redo the icon sheet's
 * rotate-ccw (redo mirrored); ⋯ the ellipsis; ▾ trails a label that opens a menu. */
.btn-undo, .btn-redo, .btn-more {
  justify-content: center;
  flex: none;
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 0;
  font-size: 0;
}
.btn-undo::after, .btn-redo::after, .btn-chevron::after {
  content: "";
  flex: none;
  width: calc(18px * var(--text-scale));
  height: calc(18px * var(--text-scale));
  background-color: currentColor;
  -webkit-mask: var(--ico-rotate-ccw) center / contain no-repeat;
  mask: var(--ico-rotate-ccw) center / contain no-repeat;
}
.btn-redo::after { scale: -1 1; }
.btn-chevron { gap: var(--space-1); }
.btn-chevron::after { -webkit-mask-image: var(--ico-chevron-down); mask-image: var(--ico-chevron-down); }
.btn-more::after { font-size: var(--fs-lg); line-height: 1; }
.btn-more::after { content: "\22EF"; font-weight: 700; }

/* One piece in the editor: a dashed frame, its type label on the top edge. Selected (focus
 * inside, or pinned by the prototype), the frame turns solid in the focus colour and the label
 * gives way to the piece toolbar on the same edge. The vertical inset is equal top and bottom
 * and the label / toolbar straddle the edge, so selecting a piece moves nothing. */
.editpiece { position: relative; padding: var(--space-5) var(--space-4); border: 1px dashed var(--border); border-radius: var(--radius-sm); }
.editpiece-selected, .editpiece-whole, .editpiece:focus-within { border-style: solid; border-color: var(--focus-ring); box-shadow: 0 0 0 1px var(--focus-ring); }
/* The piece's own frame (:focus-within above) IS the focus indicator of the text being typed in
 * it — the browser's outline on the editable text inside would draw a second ring. */
.editpiece [contenteditable]:focus { outline: none; }
.editpiece-label {
  position: absolute;
  top: 0;
  left: var(--space-3);
  translate: 0 -50%;
  padding: 0 var(--space-2);
  font-size: var(--fs-xs);
  font-weight: 600;
  line-height: 1.6;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-pill);
}
.editpiece-tools {
  position: absolute;
  top: 0;
  left: var(--space-3);
  z-index: 1;
  translate: 0 -55%;
  display: none;
  gap: 2px;
  padding: 2px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
}
.editpiece-selected > .editpiece-tools, .editpiece-whole > .editpiece-tools, .editpiece:focus-within > .editpiece-tools { display: flex; }
.editpiece-selected > .editpiece-label, .editpiece-whole > .editpiece-label, .editpiece:focus-within > .editpiece-label { display: none; }
.editpiece-tools .btn { color: var(--fg); }
.editpiece-tools .btn-chevron { padding-inline: var(--space-3); }
.editpiece-body > * { margin: 0; }
.richcard > .editpiece { margin-top: var(--space-5); }
/* A card's own pieces in the editor keep a narrower inset, so three nested edges (the card's
 * frame, the card, its piece) still leave the text a reading column at 390. */
.richcard .editpiece { padding-inline: var(--space-3); }
.editpiece-tools .btn, .editpiece-tools .btn-chevron { border-radius: var(--radius-sm); }

/* `toggle` ICON-ONLY (bold / italic, the editor's format tools): the same toggle — outlined
 * off, the accent-2 strong fill on — as a fixed 44px square with no switch mark; the letter is
 * the mark, the label stays in the markup at font-size 0 as the accessible name. */
.toggle-bold, .toggle-italic {
  justify-content: center;
  flex: none;
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 0;
  gap: 0;
  font-size: 0;
}
.toggle-bold > .togglemark, .toggle-italic > .togglemark { display: none; }
.toggle-bold::after, .toggle-italic::after { font-size: var(--fs-lg); line-height: 1; }
.toggle-bold::after { content: "B"; font-weight: 700; }
.toggle-italic::after { content: "I"; font-style: italic; font-weight: 500; font-family: Georgia, serif; }

/* A tool group's visible caption ("Rivi", "Sarake") — what its buttons act on. */
.toolgroup { align-items: center; }
.toolgroup-caption { margin-right: var(--space-1); font-size: var(--fs-sm); font-weight: 600; color: var(--muted); }
.toolgroup .toggle:not(.toggle-bold, .toggle-italic) { padding-inline: var(--space-3); }

/* A selected piece's OWN tool bar (a table's rows, columns, phone layout): inside
 * the frame above the piece, whole groups wrapping onto further rows, one --space-4 gap above
 * the piece; the typing hint under the piece keeps the same --space-4. Shown only while the
 * piece is selected. */
.editpiece-bar { display: none; flex-wrap: wrap; gap: var(--space-2) var(--space-5); margin-bottom: var(--space-4); }
.editpiece-selected > .editpiece-bar, .editpiece:focus-within > .editpiece-bar { display: flex; }
.editpiece-help { display: none; margin: var(--space-4) 0 0; font-size: var(--fs-sm); color: var(--muted); }
.editpiece-selected > .editpiece-help, .editpiece-whole > .editpiece-help, .editpiece:focus-within > .editpiece-help { display: block; }

/* The table being edited: the caret's ROW and COLUMN carry a soft film of the focus colour (the
 * row by :has, the column by its cells' class), the caret's own cell a focus ring — so what
 * "Poista rivi" / "Poista sarake" will remove is visible before it is pressed. */
.richtable tr:has(> .richcell-active) > td,
.richcell-column, .richhead-column { background: color-mix(in oklab, var(--focus-ring) 10%, transparent); }
.richcell-active { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
/* The prototype's stand-in for the browser's own caret. */
.caret { display: inline-block; width: 2px; height: 1.2em; margin-left: 1px; vertical-align: text-bottom; background: var(--fg-strong); }
@media (max-width: 767px) {
  /* In the editor a stacked table keeps its column headings on screen as its first card, so
   * they stay editable; the visitor page hides them (each value carries its label). */
  .editpiece .richtable-stack thead { position: static; display: block; width: auto; height: auto; overflow: visible; clip-path: none; white-space: normal; margin-bottom: var(--space-3); }
  .editpiece .richtable-stack thead tr { display: block; padding: var(--space-3) var(--space-4); border: 1px solid var(--border); border-radius: var(--radius-sm); background: color-mix(in oklab, var(--fg-strong) 6%, transparent); }
  .editpiece .richtable-stack th { display: block; padding: 0; border: 0; font-weight: 700; }
  .editpiece .richtable-stack th + th { margin-top: var(--space-2); }
  .richtable-stack tr:has(> .richcell-active) { border-color: var(--focus-ring); }
  /* Films and the caret ring get an inset of their own without moving the text. */
  .editpiece .richtable-stack td { margin-inline: calc(-1 * var(--space-2)); padding: var(--space-1) var(--space-2); border-radius: var(--radius-sm); }
  .editpiece .richtable-stack td + td { margin-top: var(--space-2); }
}
/* In a piece's tool bar a group's tools may wrap under its caption (the settings toggles at
 * 390); the captions share one width so the row and column tools line up in columns. */
.editpiece-bar > .toolgroup { flex-wrap: wrap; }
.editpiece-bar .toolgroup-caption { min-width: 3.5rem; }
.editpiece-bar .toolgroup .btn-add { padding-inline: var(--space-2); }

/* --- rich text on the visitor page (S1-3, developer 2026-11-14: "ensure that paragraphs dont
 * get extra margin left and right when rendered compared what there is now") -------------
 * A rich text takes EXACTLY the box its plain <p> had: in a `prose` the prose column (and its
 * muted body colour), in a course `panel` the `paragraph`'s type (--fs-sm, muted) and so its
 * --measure cap (a `ch` measure follows the font size). No piece adds an
 * inline margin: a list's markers hang inside its own box at the column edge, a quotation's
 * rule IS the column edge, a table and a card fill the column (a card's padding is inside its
 * tinted box). The paragraph gap is the rich text's one rhythm (--space-4). */
.prose > .richtext { margin-bottom: var(--space-3); color: var(--muted); }
.prose > .richtext p { margin-bottom: 0; }
.panel > .richtext { max-width: var(--measure); font-size: var(--fs-sm); color: var(--muted); }
/* Under a panel's --fs-lg h2 the text's own headings step down one rung each (the adjacent-levels rule). */
.panel > .richtext h3 { font-size: var(--fs-base); }
.panel > .richtext h4 { font-size: var(--fs-sm); }
.richcard { color: var(--fg); }

/* --- rich-text editor, the remaining states (S1-3) --------------------------------------- */

/* An EMPTY text: its one paragraph shows the muted hint where to start; the caret stands at
 * its start (the hint is laid over the line, never typed into it). */
.richeditor-doc p[data-placeholder] { position: relative; }
.richeditor-doc p[data-placeholder]::before { content: attr(data-placeholder); position: absolute; inset: 0 0 auto 0; color: var(--muted); pointer-events: none; }

/* A MENU (insert, change type): the list opens under its own trigger as a popover — never
 * pushing the document — at a readable width capped to the screen. */
.richmenu { position: relative; display: inline-flex; flex-direction: column; align-items: flex-start; }
.richeditor-doc > .richmenu, .richcard > .richmenu { align-self: flex-start; }
.richmenu > .btn-add { color: var(--fg); }
.btn[aria-expanded="true"] { background: color-mix(in oklab, var(--fg-strong) 8%, transparent); }
.richmenu-list {
  display: none;
  position: absolute;
  top: calc(100% + var(--space-1));
  left: 0;
  z-index: 3;
  width: min(18rem, calc(100vw - 2 * var(--gutter)));
  max-height: 70dvh;
  overflow-y: auto;
  padding: var(--space-1);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
}
.richmenu-open > .richmenu-list { display: block; }
.richmenugroup + .richmenugroup { margin-top: var(--space-1); padding-top: var(--space-1); border-top: 1px solid var(--border-soft); }
.richmenugroup-caption { margin: 0; padding: var(--space-2) var(--space-3) var(--space-1); font-size: var(--fs-xs); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.richmenuitem {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 44px;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  color: var(--fg);
  text-decoration: none;
  line-height: 1.35;
}
.richmenuitem:hover { background: color-mix(in oklab, var(--focus-ring) 10%, transparent); }
.richmenuitem:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
.richmenuitem-text { font-weight: 600; color: var(--fg-strong); }
.richmenuitem-note { font-size: var(--fs-sm); color: var(--muted); }
/* The change-type menu is a radio set: a check mark before the current type. */
.richmenuitem[aria-checked] { padding-left: calc(var(--space-3) + 24px); }
.richmenuitem[aria-checked="true"]::before {
  content: "";
  position: absolute;
  left: var(--space-3);
  top: 50%;
  width: 16px;
  height: 16px;
  translate: 0 -50%;
  background-color: var(--fg-strong);
  -webkit-mask: var(--ico-check) center / contain no-repeat;
  mask: var(--ico-check) center / contain no-repeat;
}
.richmenu-note { margin: var(--space-1) 0 0; padding: var(--space-2) var(--space-3); border-top: 1px solid var(--border-soft); font-size: var(--fs-sm); color: var(--muted); }
/* The piece toolbar's type menu sits on the frame edge with the other tools. */
.editpiece-tools > .richmenu .btn-chevron { color: var(--fg); padding-inline: var(--space-3); border-radius: var(--radius-sm); }

/* THE LINK BUBBLE: under the line of its link, starting at the text's left edge, over the text
 * below it (a popover). The address shrinks (ellipsis); the actions keep 44px. Below sm the
 * address takes its own line above the actions. */
.linkbubble {
  position: absolute;
  left: var(--space-4);
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 var(--space-1);
  max-width: calc(100% - 2 * var(--space-4));
  margin-top: 1.9em;
  padding: 2px 2px 2px var(--space-3);
  font-size: var(--fs-sm);
  line-height: 1.4;
  white-space: nowrap;
  color: var(--fg);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
}
.linkbubble-address { flex: 1 1 auto; min-width: 0; max-width: 16rem; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.linkbubble-actions { display: flex; flex: none; gap: 2px; }
.linkbubble-actions .btn { color: var(--fg); padding-inline: var(--space-3); border-radius: var(--radius-sm); }
@media (max-width: 479px) {
  .linkbubble { padding: 2px; }
  .linkbubble-address { flex-basis: 100%; max-width: none; padding: var(--space-2) var(--space-3) 0; }
}

/* COPIED FROM THE OTHER LANGUAGE (Q-195 (4)): the piece's badge on its frame's top edge at the
 * right end, shown selected or not (the label / piece toolbar keep the left end). */
.editpiece-marks { position: absolute; top: 0; right: var(--space-3); translate: 0 -50%; display: flex; gap: var(--space-1); }
.editpiece-marks > .badge { margin: 0; }

/* A notice with its one action at the end of the line (the message line's "Kumoa",
 * "Yritä uudelleen"). */
.notice:has(> .btn) { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); padding-block: var(--space-1); }
.notice > .btn { margin-left: auto; }

/* THE SPACE USED: a slim meter after the status line; over the limit both turn to the danger
 * ink (Tallenna is disabled and the notice says why). */
.richeditor-meter { flex: none; width: 6rem; height: 8px; appearance: none; background: none; border: 0; }
.richeditor-meter::-webkit-meter-bar { height: 8px; background: var(--border-soft); border: 0; border-radius: var(--radius-pill); }
.richeditor-meter::-webkit-meter-optimum-value,
.richeditor-meter::-webkit-meter-suboptimum-value,
.richeditor-meter::-webkit-meter-even-less-good-value { background: var(--fg); border-radius: var(--radius-pill); }
.richeditor-meter::-moz-meter-bar { background: var(--fg); border-radius: var(--radius-pill); }
.richeditor-over .richeditor-status { color: var(--danger); font-weight: 600; }
.richeditor-over .richeditor-meter::-webkit-meter-optimum-value,
.richeditor-over .richeditor-meter::-webkit-meter-suboptimum-value,
.richeditor-over .richeditor-meter::-webkit-meter-even-less-good-value { background: var(--danger); }
.richeditor-over .richeditor-meter::-moz-meter-bar { background: var(--danger); }

/* "MUOKKAA TEKSTINÄ": the document is one tall textarea of the stored text. */

/* A DIALOG over the editor (the link dialog, the discard confirmation). Production opens it
 * modally (the top layer + its ::backdrop); a dialog rendered `open` without the client — the
 * prototype — is painted in the same centred box over a scrim from its first frame. */
.richeditor > .dialog[open]:not(:modal) { position: fixed; inset: 0; z-index: 5; height: fit-content; max-height: 90dvh; margin: auto; overflow: auto; }
.richeditor:has(> .dialog[open]:not(:modal))::after { content: ""; position: fixed; inset: 0; z-index: 4; background: color-mix(in oklab, var(--fg-strong) 45%, transparent); }

/* THE TWO-STEP REMOVE: the table or card selected WHOLE — the frame as selected, the piece
 * under a film of the focus colour; nothing moves. */
.editpiece-whole > .editpiece-body { border-radius: var(--radius-sm); background: color-mix(in oklab, var(--focus-ring) 14%, transparent); box-shadow: 0 0 0 var(--space-2) color-mix(in oklab, var(--focus-ring) 14%, transparent); }

/* A LONG TEXT FIELD in an admin form: the text as the site shows it in a read-only well, the
 * pen on its own line after the text. */
.richfield { min-width: 0; }
.richfield-value { padding: var(--space-4); color: var(--fg); background: var(--bg); border: 1px solid var(--border-soft); border-radius: var(--radius-sm); }
.richtext > .btn-edit { display: flex; }
/* Below md a TOOLBAR menu drops from the toolbar's foot at the column's left edge (its trigger
 * may sit far right on a phone, and a list anchored there would leave the screen). */
@media (max-width: 767px) {
  .richeditor-toolbar .richmenu { position: static; }
  .richeditor-toolbar .richmenu-list { top: 100%; left: max(var(--gutter), calc((100% - var(--measure) - 2 * var(--space-4)) / 2)); }
}
:root{--ico-arrow-down:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PHBhdGggZD0iTTEyIDV2MTQiLz48cGF0aCBkPSJtMTkgMTItNyA3LTctNyIvPjwvc3ZnPg==);--ico-arrow-up:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PHBhdGggZD0ibTUgMTIgNy03IDcgNyIvPjxwYXRoIGQ9Ik0xMiAxOVY1Ii8+PC9zdmc+);--ico-calendar-plus:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PHBhdGggZD0iTTE2IDE4aDYiLz48cGF0aCBkPSJNMTYgMnYzIi8+PHBhdGggZD0iTTE5IDE1djYiLz48cGF0aCBkPSJNMjEgMTEuNVY1YTIgMiAwIDAwLTItMkg1YTIgMiAwIDAwLTIgMnYxNGEyIDIgMCAwMDIgMmg4LjMiLz48cGF0aCBkPSJNMyA5aDE4Ii8+PHBhdGggZD0iTTggMnYzIi8+PC9zdmc+);--ico-check:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PHBhdGggZD0iTTIwIDYgOSAxN2wtNS01Ii8+PC9zdmc+);--ico-chevron-down:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PHBhdGggZD0ibTYgOSA2IDYgNi02Ii8+PC9zdmc+);--ico-circle:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PGNpcmNsZSBjeD0iMTIiIGN5PSIxMiIgcj0iMTAiLz48L3N2Zz4=);--ico-cpu:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PHJlY3Qgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiB4PSI0IiB5PSI0IiByeD0iMiIvPjxyZWN0IHdpZHRoPSI2IiBoZWlnaHQ9IjYiIHg9IjkiIHk9IjkiIHJ4PSIxIi8+PHBhdGggZD0iTTE1IDJ2MiIvPjxwYXRoIGQ9Ik0xNSAyMHYyIi8+PHBhdGggZD0iTTIgMTVoMiIvPjxwYXRoIGQ9Ik0yIDloMiIvPjxwYXRoIGQ9Ik0yMCAxNWgyIi8+PHBhdGggZD0iTTIwIDloMiIvPjxwYXRoIGQ9Ik05IDJ2MiIvPjxwYXRoIGQ9Ik05IDIwdjIiLz48L3N2Zz4=);--ico-download:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PHBhdGggZD0iTTEyIDE1VjMiLz48cGF0aCBkPSJNMjEgMTV2NGEyIDIgMCAwIDEtMiAySDVhMiAyIDAgMCAxLTItMnYtNCIvPjxwYXRoIGQ9Im03IDEwIDUgNSA1LTUiLz48L3N2Zz4=);--ico-file-text:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PHBhdGggZD0iTTE1IDJINmEyIDIgMCAwIDAtMiAydjE2YTIgMiAwIDAgMCAyIDJoMTJhMiAyIDAgMCAwIDItMlY3WiIvPjxwYXRoIGQ9Ik0xNCAydjRhMiAyIDAgMCAwIDIgMmg0Ii8+PHBhdGggZD0iTTEwIDlIOCIvPjxwYXRoIGQ9Ik0xNiAxM0g4Ii8+PHBhdGggZD0iTTE2IDE3SDgiLz48L3N2Zz4=);--ico-globe:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PGNpcmNsZSBjeD0iMTIiIGN5PSIxMiIgcj0iMTAiLz48cGF0aCBkPSJNMTIgMmExNC41IDE0LjUgMCAwIDAgMCAyMCAxNC41IDE0LjUgMCAwIDAgMC0yMCIvPjxwYXRoIGQ9Ik0yIDEyaDIwIi8+PC9zdmc+);--ico-headphones:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PHBhdGggZD0iTTMgMTRoM2EyIDIgMCAwIDEgMiAydjNhMiAyIDAgMCAxLTIgMkg1YTIgMiAwIDAgMS0yLTJ2LTdhOSA5IDAgMCAxIDE4IDB2N2EyIDIgMCAwIDEtMiAyaC0xYTIgMiAwIDAgMS0yLTJ2LTNhMiAyIDAgMCAxIDItMmgzIi8+PC9zdmc+);--ico-layers:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PHBhdGggZD0iTTEyLjgzIDIuMThhMiAyIDAgMCAwLTEuNjYgMEwyLjYgNi4wOGExIDEgMCAwIDAgMCAxLjgzbDguNTggMy45MWEyIDIgMCAwIDAgMS42NiAwbDguNTgtMy45YTEgMSAwIDAgMCAwLTEuODNaIi8+PHBhdGggZD0ibTIyIDE3LjY1LTkuMTcgNC4xNmEyIDIgMCAwIDEtMS42NiAwTDIgMTcuNjUiLz48cGF0aCBkPSJtMjIgMTIuNjUtOS4xNyA0LjE2YTIgMiAwIDAgMS0xLjY2IDBMMiAxMi42NSIvPjwvc3ZnPg==);--ico-list-checks:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PHBhdGggZD0ibTMgMTcgMiAyIDQtNCIvPjxwYXRoIGQ9Im0zIDcgMiAyIDQtNCIvPjxwYXRoIGQ9Ik0xMyA2aDgiLz48cGF0aCBkPSJNMTMgMTJoOCIvPjxwYXRoIGQ9Ik0xMyAxOGg4Ii8+PC9zdmc+);--ico-lock:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PHJlY3Qgd2lkdGg9IjE4IiBoZWlnaHQ9IjExIiB4PSIzIiB5PSIxMSIgcng9IjIiIHJ5PSIyIi8+PHBhdGggZD0iTTcgMTFWN2E1IDUgMCAwIDEgMTAgMHY0Ii8+PC9zdmc+);--ico-log-in:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PHBhdGggZD0iTTE1IDNoNGEyIDIgMCAwIDEgMiAydjE0YTIgMiAwIDAgMS0yIDJoLTQiLz48cG9seWxpbmUgcG9pbnRzPSIxMCAxNyAxNSAxMiAxMCA3Ii8+PGxpbmUgeDE9IjE1IiB4Mj0iMyIgeTE9IjEyIiB5Mj0iMTIiLz48L3N2Zz4=);--ico-log-out:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PHBhdGggZD0iTTkgMjFINWEyIDIgMCAwIDEtMi0yVjVhMiAyIDAgMCAxIDItMmg0Ii8+PHBvbHlsaW5lIHBvaW50cz0iMTYgMTcgMjEgMTIgMTYgNyIvPjxsaW5lIHgxPSIyMSIgeDI9IjkiIHkxPSIxMiIgeTI9IjEyIi8+PC9zdmc+);--ico-menu:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PGxpbmUgeDE9IjQiIHgyPSIyMCIgeTE9IjEyIiB5Mj0iMTIiLz48bGluZSB4MT0iNCIgeDI9IjIwIiB5MT0iNiIgeTI9IjYiLz48bGluZSB4MT0iNCIgeDI9IjIwIiB5MT0iMTgiIHkyPSIxOCIvPjwvc3ZnPg==);--ico-minus:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PHBhdGggZD0iTTUgMTJoMTQiLz48L3N2Zz4=);--ico-passkey:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PGNpcmNsZSBjeD0iOSIgY3k9IjciIHI9IjQiLz48cGF0aCBkPSJNMiAyMXYtMWE1IDUgMCAwIDEgNS01aDQiLz48Y2lyY2xlIGN4PSIxOCIgY3k9IjkiIHI9IjMiLz48cGF0aCBkPSJNMTggMTJ2OSIvPjxwYXRoIGQ9Ik0xOCAxNmgyLjUiLz48cGF0aCBkPSJNMTggMTkuNWgyIi8+PC9zdmc+);--ico-pencil:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PHBhdGggZD0iTTIxLjE3NCA2LjgxMmExIDEgMCAwIDAtMy45ODYtMy45ODdMMy44NDIgMTYuMTc0YTIgMiAwIDAgMC0uNS44M2wtMS4zMjEgNC4zNTJhLjUuNSAwIDAgMCAuNjIzLjYyMmw0LjM1My0xLjMyYTIgMiAwIDAgMCAuODMtLjQ5N3oiLz48cGF0aCBkPSJtMTUgNSA0IDQiLz48L3N2Zz4=);--ico-play:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PHBvbHlnb24gcG9pbnRzPSI2IDMgMjAgMTIgNiAyMSA2IDMiLz48L3N2Zz4=);--ico-plus:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PHBhdGggZD0iTTUgMTJoMTQiLz48cGF0aCBkPSJNMTIgNXYxNCIvPjwvc3ZnPg==);--ico-rotate-ccw:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PHBhdGggZD0iTTMgMTJhOSA5IDAgMSAwIDktOSA5Ljc1IDkuNzUgMCAwIDAtNi43NCAyLjc0TDMgOCIvPjxwYXRoIGQ9Ik0zIDN2NWg1Ii8+PC9zdmc+);--ico-search:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PHBhdGggZD0ibTIxIDIxLTQuMzQtNC4zNCIvPjxjaXJjbGUgY3g9IjExIiBjeT0iMTEiIHI9IjgiLz48L3N2Zz4=);--ico-trash-2:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PHBhdGggZD0iTTEwIDExdjYiLz48cGF0aCBkPSJNMTQgMTF2NiIvPjxwYXRoIGQ9Ik0xOSA2djE0YTIgMiAwIDAgMS0yIDJIN2EyIDIgMCAwIDEtMi0yVjYiLz48cGF0aCBkPSJNMyA2aDE4Ii8+PHBhdGggZD0iTTggNlY0YTIgMiAwIDAgMSAyLTJoNGEyIDIgMCAwIDEgMiAydjIiLz48L3N2Zz4=);--ico-triangle-alert:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PHBhdGggZD0ibTIxLjczIDE4LTgtMTRhMiAyIDAgMCAwLTMuNDggMGwtOCAxNEEyIDIgMCAwIDAgNCAyMWgxNmEyIDIgMCAwIDAgMS43My0zIi8+PHBhdGggZD0iTTEyIDl2NCIvPjxwYXRoIGQ9Ik0xMiAxN2guMDEiLz48L3N2Zz4=);--ico-upload:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PHBhdGggZD0iTTEyIDN2MTIiLz48cGF0aCBkPSJtMTcgOC01LTUtNSA1Ii8+PHBhdGggZD0iTTIxIDE1djRhMiAyIDAgMCAxLTIgMkg1YTIgMiAwIDAgMS0yLTJ2LTQiLz48L3N2Zz4=);--ico-user:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PHBhdGggZD0iTTE4IDIwYTYgNiAwIDAgMC0xMiAwIi8+PGNpcmNsZSBjeD0iMTIiIGN5PSIxMCIgcj0iNCIvPjxjaXJjbGUgY3g9IjEyIiBjeT0iMTIiIHI9IjEwIi8+PC9zdmc+);--ico-users:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PHBhdGggZD0iTTE2IDIxdi0yYTQgNCAwIDAgMC00LTRINmE0IDQgMCAwIDAtNCA0djIiLz48Y2lyY2xlIGN4PSI5IiBjeT0iNyIgcj0iNCIvPjxwYXRoIGQ9Ik0yMiAyMXYtMmE0IDQgMCAwIDAtMy0zLjg3Ii8+PHBhdGggZD0iTTE2IDMuMTNhNCA0IDAgMCAxIDAgNy43NSIvPjwvc3ZnPg==);--ico-x:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PHBhdGggZD0iTTE4IDYgNiAxOCIvPjxwYXRoIGQ9Im02IDYgMTIgMTIiLz48L3N2Zz4=);}.ico{display:inline-block;width:1em;height:1em;flex:none;background-color:currentColor;-webkit-mask:center/contain no-repeat;mask:center/contain no-repeat;vertical-align:-.125em}.ico-arrow-down{-webkit-mask-image:var(--ico-arrow-down);mask-image:var(--ico-arrow-down)}.ico-arrow-up{-webkit-mask-image:var(--ico-arrow-up);mask-image:var(--ico-arrow-up)}.ico-calendar-plus{-webkit-mask-image:var(--ico-calendar-plus);mask-image:var(--ico-calendar-plus)}.ico-check{-webkit-mask-image:var(--ico-check);mask-image:var(--ico-check)}.ico-chevron-down{-webkit-mask-image:var(--ico-chevron-down);mask-image:var(--ico-chevron-down)}.ico-circle{-webkit-mask-image:var(--ico-circle);mask-image:var(--ico-circle)}.ico-cpu{-webkit-mask-image:var(--ico-cpu);mask-image:var(--ico-cpu)}.ico-download{-webkit-mask-image:var(--ico-download);mask-image:var(--ico-download)}.ico-file-text{-webkit-mask-image:var(--ico-file-text);mask-image:var(--ico-file-text)}.ico-globe{-webkit-mask-image:var(--ico-globe);mask-image:var(--ico-globe)}.ico-headphones{-webkit-mask-image:var(--ico-headphones);mask-image:var(--ico-headphones)}.ico-layers{-webkit-mask-image:var(--ico-layers);mask-image:var(--ico-layers)}.ico-list-checks{-webkit-mask-image:var(--ico-list-checks);mask-image:var(--ico-list-checks)}.ico-lock{-webkit-mask-image:var(--ico-lock);mask-image:var(--ico-lock)}.ico-log-in{-webkit-mask-image:var(--ico-log-in);mask-image:var(--ico-log-in)}.ico-log-out{-webkit-mask-image:var(--ico-log-out);mask-image:var(--ico-log-out)}.ico-menu{-webkit-mask-image:var(--ico-menu);mask-image:var(--ico-menu)}.ico-minus{-webkit-mask-image:var(--ico-minus);mask-image:var(--ico-minus)}.ico-passkey{-webkit-mask-image:var(--ico-passkey);mask-image:var(--ico-passkey)}.ico-pencil{-webkit-mask-image:var(--ico-pencil);mask-image:var(--ico-pencil)}.ico-play{-webkit-mask-image:var(--ico-play);mask-image:var(--ico-play)}.ico-plus{-webkit-mask-image:var(--ico-plus);mask-image:var(--ico-plus)}.ico-rotate-ccw{-webkit-mask-image:var(--ico-rotate-ccw);mask-image:var(--ico-rotate-ccw)}.ico-search{-webkit-mask-image:var(--ico-search);mask-image:var(--ico-search)}.ico-trash-2{-webkit-mask-image:var(--ico-trash-2);mask-image:var(--ico-trash-2)}.ico-triangle-alert{-webkit-mask-image:var(--ico-triangle-alert);mask-image:var(--ico-triangle-alert)}.ico-upload{-webkit-mask-image:var(--ico-upload);mask-image:var(--ico-upload)}.ico-user{-webkit-mask-image:var(--ico-user);mask-image:var(--ico-user)}.ico-users{-webkit-mask-image:var(--ico-users);mask-image:var(--ico-users)}.ico-x{-webkit-mask-image:var(--ico-x);mask-image:var(--ico-x)}