/* ==========================================================================
   GAMESONBOARD website, shared stylesheet (all pages)
   Brand DNA from the app (Gamesonboard/apps/web/src/globals.css, fonts.css); layout, type scale, board and
   motion from docs/01 Revision 3 and docs/04 Revision 2.1. No build step: this file is served as is.

   1  Fonts                       9  Field 1, the gap (#why)
   2  Tokens                     10  Field 2, colour panels (#platform)
   3  Base, Lenis, grain         11  Field 3, the world stage (#worlds)
   4  Typography                 12  Field 4, play (#play)
   5  Layout and the game board  13  Field 5, the goal, contact
   6  Components                 14  The moving Kiko
   7  Header and navigation      15  Footer
   8  Hero, the start field      16  Motion, reduced motion, no-JS, forced colors, print
                                 17  Subpages
   ========================================================================== */

/* 1  Fonts ---------------------------------------------------------------- */
/* Google Fonts subsets, self-hosted; fallback metrics from the app's fonts.css. */
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  src: url("../fonts/nunito-latin-ext.woff2") format("woff2");
  unicode-range: U+100-2BA, U+2BD-2C5, U+2C7-2CC, U+2CE-2D7, U+2DD-2FF, U+304, U+308, U+329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  src: url("../fonts/nunito-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+131, U+152-153, U+2BB-2BC, U+2C6, U+2DA, U+2DC, U+304, U+308, U+329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Cyrillic from the app (Македонски in the hub tile); Nunito has no Greek, Ελληνικά falls back below. */
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  src: url("../fonts/nunito-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* Two fallback faces, so 800 text that Nunito cannot set (Greek) uses real Arial Bold, never thin Arial. */
@font-face {
  font-family: "Nunito Fallback";
  src: local(Arial);
  font-weight: 400 600;
  ascent-override: 99.71%;
  descent-override: 34.82%;
  line-gap-override: 0%;
  size-adjust: 101.39%;
}
@font-face {
  font-family: "Nunito Fallback";
  src: local("Arial Bold"), local("Arial-BoldMT");
  font-weight: 700 900;
  ascent-override: 99.71%;
  descent-override: 34.82%;
  line-gap-override: 0%;
  size-adjust: 101.39%;
}
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/geist-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+131, U+152-153, U+2BB-2BC, U+2C6, U+2DA, U+2DC, U+304, U+308, U+329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Geist Mono Fallback";
  src: local(Arial);
  ascent-override: 74.67%;
  descent-override: 21.92%;
  line-gap-override: 0%;
  size-adjust: 134.59%;
}

/* 2  Tokens --------------------------------------------------------------- */
/* Colours 1:1 from the app. Dark is the default, light via class `light` on <html>. */
:root {
  color-scheme: dark;

  --bg: #0f1720;
  --surface: #172230;
  --surface-raised: #1f2d3d;
  --line: #2a3a4d;
  --edge: #2a3a4d;
  --line-strong: #5a7590;
  --fg: #f3f6f9;
  --fg-muted: #9aabbd;
  --focus: #5bc0cc;
  --overlay: rgb(4 9 14 / 0.72);
  --ink: #0f1720;        /* text on every accent surface, both themes (docs/01 2.1) */
  --ink-fg: #f3f6f9;     /* light text on ink surfaces (Kiko bubbles), both themes */

  --teal: #5bc0cc;
  --teal-ink: #5bc0cc;
  --teal-edge: #3b8e99;
  --on-teal: #0f1720;

  --yellow: #ffcb00;
  --yellow-ink: #ffcb00;
  --yellow-edge: #c79c00;
  --on-yellow: #0f1720;

  --lime: #a1b91c;
  --lime-ink: #a1b91c;
  --lime-edge: #7a8c12;
  --on-lime: #0f1720;

  --orange: #e95a0c;
  --orange-ink: #ff8a3d;
  --orange-edge: #b03f04;
  --on-orange: #0f1720;

  --magenta: #b8256a;
  --magenta-ink: #f177a8;
  --magenta-edge: #8c1750;
  --on-magenta: #ffffff;

  --danger: #c42b4e;
  --danger-ink: #ff6b85;
  --danger-edge: #931c39;
  --on-danger: #ffffff;

  /* Type: the website scale (docs/01 Revision 3, section 3), fluid between 390 and 1440px */
  --font-sans: "Nunito", "Nunito Fallback", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "Geist Mono", "Geist Mono Fallback", ui-monospace, monospace;
  --text-display: clamp(2.25rem, 1.386rem + 4.571vw, 5.5rem);   /* 36px floor: three hero lines from 360px (docs/06 R2 28) */
  --text-panel: clamp(2.25rem, 1.414rem + 3.429vw, 4.5rem);
  --text-h2: clamp(2rem, 1.35rem + 2.667vw, 3.75rem);
  --text-h1-sub: clamp(2.5rem, 1.943rem + 2.286vw, 4rem);
  --text-statement: clamp(1.5rem, 1.221rem + 1.143vw, 2.25rem);
  --text-h3: clamp(1.25rem, 1.157rem + 0.381vw, 1.5rem);
  --text-lead: clamp(1.125rem, 1.032rem + 0.381vw, 1.375rem);
  --text-body: clamp(1.0625rem, 1.039rem + 0.095vw, 1.125rem);
  --text-contact: clamp(2rem, 0.886rem + 4.571vw, 5rem);
  --text-mono-lg: clamp(2.5rem, 1.757rem + 3.048vw, 4.5rem);

  /* Shape */
  --radius-card: 0.75rem;
  --radius-btn: 1rem;
  --radius-pill: 999px;

  /* Motion: interaction class, app values 1:1 (docs/04 2.1). The narration class lives in motion.js. */
  --duration-fast: 180ms;
  --duration-base: 260ms;
  --duration-slow: 420ms;
  --duration-progress: 650ms;
  --duration-rise: 300ms;
  --duration-fade: 220ms;
  --duration-pop: 320ms;
  --duration-icon-swap: 180ms;
  --ease-out-strong: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out-strong: cubic-bezier(0.77, 0, 0.175, 1);
  --rise-distance: 8px;
  --lift: -1px;
  --press: 2px;
  --edge-rest: 4px;
  --edge-hover: 5px;
  --edge-press: 2px;
  --nudge: 2px;

  /* Layout */
  --gutter: 24px;
  --header-h: 64px;
  --section-pad: 88px;    /* floors 88 / 112 / 160; with svh the rest-zone clamp() below (Rev 2.5, 04 11.15: less emptiness) */
  --h2-gap: 20px;
  --lead-gap: 40px;
  --grid-gap: 16px;
  --container: 1200px;
  --track: 0px;           /* the board's lane left of the content, 96px on the start page from 1024px (docs/01 1.3) */
  --field: 40px;
  --path-w: 8px;
}

.light {
  color-scheme: light;

  --bg: #eef2f6;
  --surface: #ffffff;
  --surface-raised: #e6edf3;
  --line: #d3dce5;
  --edge: #c3cfdb;
  --line-strong: #66798a;
  --fg: #101820;
  --fg-muted: #4b5d6e;
  --focus: #0e6e79;
  --overlay: rgb(16 24 32 / 0.48);

  --teal-ink: #0e6e79;
  --yellow-ink: #7a6100;
  --lime-ink: #5c6a10;
  --orange-ink: #b23f00;
  --magenta-ink: #b8256a;
  --danger-ink: #b02240;
}

@media (min-width: 768px) {
  :root { --gutter: 32px; --section-pad: 112px; --lead-gap: 48px; --grid-gap: 24px; }
}
@media (min-width: 1024px) {
  :root { --gutter: 48px; --header-h: 72px; --section-pad: 160px; --h2-gap: 24px; --lead-gap: 64px; --field: 64px; --path-w: 12px; }
  .board-page { --track: 96px; }
}
@media (min-width: 1360px) {
  :root { --path-w: 16px; }
}
/* Rest zone between the scenes (docs/04 11.3, Rev 2.5 11.15): the section padding grows with the viewport height. A custom property
   is never invalid at parse time, so a second declaration would also win without svh; the clamp() therefore comes
   only where svh exists and the px values above stay the fallback. */
@supports (height: 1svh) {
  :root { --section-pad: clamp(88px, 12svh, 112px); }
  @media (min-width: 768px) { :root { --section-pad: clamp(112px, 16svh, 152px); } }
  @media (min-width: 1024px) { :root { --section-pad: clamp(160px, 24svh, 256px); } }
}

/* 3  Base and reset ------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-padding-top: 80px;
  scrollbar-gutter: stable;
  scrollbar-color: var(--line-strong) transparent;
  caret-color: var(--focus);
  accent-color: var(--teal);
}
@media (min-width: 1024px) { html { scroll-padding-top: 88px; } }
/* Native smooth anchors only without JS. With JS, Lenis glides (or the jump is instant); a computed "smooth" here would
   also be copied inline by ScrollTrigger's refresh and slow down keyboard focus scrolling. */
@media (prefers-reduced-motion: no-preference) { html:not(.js) { scroll-behavior: smooth; } }
html.menu-open { overflow: hidden; }

/* Lenis (assets/vendor/lenis/lenis.css, copied here so there is one stylesheet); native smooth scrolling is off
   while Lenis drives the page, otherwise both would animate the same jump (docs/04 2.3). */
html.lenis, html.lenis body { height: auto; }
html.lenis { scroll-behavior: auto; }
.lenis:not(.lenis-autoToggle).lenis-stopped { overflow: clip; }
.lenis [data-lenis-prevent] { overscroll-behavior: contain; }

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: var(--text-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-synthesis: none;
}

/* Grain (docs/01 2.3): one fixed, static layer over everything. A file, not a data URI, so the CSP img-src 'self'
   holds. Never animated, gone in forced colors and in print. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  background-image: url("../img/grain.svg");
  background-size: 160px 160px;
  opacity: 0.035;
}
.light body::after { opacity: 0.03; }   /* binary grain (grain.svg): visible as grain, not as a veil (docs/06 R2 29) */

:where(h1, h2, h3, h4, p, ul, ol, dl, dd, figure, fieldset, legend) { margin: 0; padding: 0; }
ul[role="list"], ol[role="list"], .list-reset { list-style: none; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
fieldset { border: 0; min-width: 0; }
/* Blocks parked with the hidden attribute (project.html placeholders, Bau-Runde 9 A9) stay out, whatever display
   their own class sets */
[hidden] { display: none !important; }

::selection { background-color: var(--teal); color: var(--on-teal); }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[tabindex="-1"]:focus { outline: none; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* 4  Typography ----------------------------------------------------------- */
/* Size carries the hierarchy that boxes carried before (docs/01 3). Nunito 800 for every heading. */
h1, h2, h3, h4 { font-weight: 800; letter-spacing: -0.01em; text-wrap: balance; }

.h2 {
  font-size: var(--text-h2);
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: 16ch;
}
/* H2 that SplitText reveals line by line: balance would fight the split (gsap-plugins), the width sets the breaks */
.h2[data-reveal="lines"] { text-wrap: wrap; }
.split-line-mask { padding-bottom: 0.12em; margin-bottom: -0.12em; }
.statement {
  font-size: var(--text-statement);
  line-height: 1.15;
  letter-spacing: -0.01em;
  max-width: 28ch;
}
.h3 {
  font-size: var(--text-h3);
  line-height: 1.25;
  letter-spacing: 0;
  max-width: 28ch;
}
.lead {
  font-size: var(--text-lead);
  line-height: 1.45;
  color: var(--fg-muted);
  max-width: 48ch;
  text-wrap: pretty;
}
.body { max-width: 62ch; text-wrap: pretty; }
.muted { color: var(--fg-muted); }
.meta { color: var(--fg-muted); font-size: 1rem; line-height: 1.5; max-width: 72ch; }
.mono, .tabular {
  font-family: var(--font-mono);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.nowrap { white-space: nowrap; }
.num-sep { margin-inline: -0.2em; }   /* Geist Mono's comma is a full cell wide: pull the thousands tight (R2 46) */
p, li, dd { text-wrap: pretty; } /* no widows in body copy; headings stay `balance` */

/* 5  Layout --------------------------------------------------------------- */
/* On the start page from 1024px the container is 96px lane + 1200px content (docs/01 1.3, 2.5):
   at 1440 that leaves 72px margin on each side, and the lane centre sits on the header logo's mark. */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--track) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: calc(var(--gutter) + var(--track)) var(--gutter);
}

.board-page { position: relative; }
.board-page .section > .container:first-child { position: relative; }

.section {
  --section-bg: var(--bg);
  position: relative;
  padding-block: var(--section-pad);
  background-color: var(--section-bg);
}
.section--surface { --section-bg: var(--surface); }
.section__head .lead { margin-top: var(--h2-gap); }
:where(.container > .section__head) + * { margin-top: var(--lead-gap); }
.world-tabs__list { margin-top: var(--lead-gap); }

.skip-link {
  position: absolute;
  top: 16px; left: 16px;
  z-index: 101;
  display: inline-flex; align-items: center;
  height: 48px; padding: 0 20px;
  background: var(--surface);
  border: 2px solid var(--focus);
  border-radius: var(--radius-pill);
  color: var(--fg);
  font-weight: 800;
  text-decoration: none;
  translate: 0 -200%;
}
.skip-link:focus, .skip-link:focus-visible { translate: none; outline-offset: 2px; }

/* 5.1 The game board (docs/01 1.3, docs/04 10.2) ---------------------------
   Every section owns its field (.board-step, aria-hidden). Below 1024px the field stands above the H2 with a short
   path piece from the section top and Kiko next to it. From 1024px the field sits in the lane at the height of the
   first H2 line, the lanes alternate between the lane centre (fields 1/3/5, 16px clear of the H2) and 32px left of it
   (2/4/goal, 48px clear), so the path makes one 45° turn of 32px per section and runs straight from start to field 1
   (docs/06 R2 25). board.js (>= 1024px with JS) draws the whole path and sets html.board-geo; with html.board-live the
   one moving Kiko replaces the static poses. Stacking: section surfaces < .board (1) < fields (2) < Kiko (3)
   < colour panels (4) < header (20) < grain (100); Kiko walks under the panels (docs/04 11.1). */
.field {
  position: relative;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: var(--field);
  height: var(--field);
  border: 2px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background-color: var(--surface-raised);
  box-shadow: 0 4px 0 0 var(--edge);
  color: var(--fg-muted);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
}
.field__num { position: relative; z-index: 1; transition: color var(--duration-fast) var(--ease-out-strong); }
.field__fill {
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background-color: var(--lime);
  box-shadow: 0 4px 0 0 var(--lime-edge);
  opacity: 0;
}
.field.is-reached .field__num { color: var(--on-lime); }
/* Field 1, the gap: hollow and dashed, never lime */
.field--gap { border-style: dashed; background-color: var(--section-bg, var(--bg)); box-shadow: none; }   /* opaque: the path under it never shows (06 R3 55) */
/* The goal: lime from the start, carrying the arrowhead cut out of the logo */
.field--goal { border-color: var(--lime-edge); background-color: var(--lime); box-shadow: 0 4px 0 0 var(--lime-edge); color: var(--on-lime); }
.goal-arrow { width: 52%; height: 52%; translate: -1px 1px; fill: currentColor; stroke: currentColor; }   /* logo orientation, up and right (R2 31) */

.board-step {
  --stub: 56px;
  --pose-h: 80px;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin-top: calc(-1 * var(--section-pad));
  margin-bottom: 24px;
  padding-top: var(--stub);
  pointer-events: none;
}
/* the path piece from the section top into the field */
.board-step::before {
  content: "";
  position: absolute;
  top: 0;
  left: calc(var(--field) / 2 - var(--path-w) / 2);
  width: var(--path-w);
  height: calc(var(--stub) + 2px);
  border-radius: 0 0 var(--radius-pill) var(--radius-pill);
  background-color: var(--line);
}
.board-step--gap::before { background: repeating-linear-gradient(to bottom, var(--line) 0 16px, transparent 16px 40px); }
/* Kiko stands next to the field on the same ground line; its head reaches up to the section top */
.board-step__kiko { position: absolute; left: calc(var(--field) + 16px); bottom: -2px; height: var(--pose-h); width: auto; max-width: none; }
/* below 1024 Kiko rises from behind the field's ground line (docs/04 4.1 "kiko"): clip just under the field edge */
@media (max-width: 1023.98px) {
  .board-step { clip-path: inset(-24px -100vw -6px -100vw); }
}
@media (min-width: 768px) {
  .board-step { --stub: 72px; --pose-h: 112px; }
}
@media (min-width: 1024px) {
  .board-step {
    --lane: 0px;
    position: absolute;
    top: calc(0.525 * var(--text-h2) - var(--field) / 2);
    left: calc(var(--gutter) + var(--track) / 2 - 32px + var(--lane) - var(--field) / 2);
    display: block;
    margin: 0;
    padding: 0;
  }
  .board-step[data-field="1"], .board-step[data-field="3"], .board-step[data-field="5"] { --lane: 32px; }
  .board-step .field { font-size: 1.25rem; }
  .board-step::before {
    top: calc(-1 * (var(--section-pad) + 0.525 * var(--text-h2) - var(--field) / 2));
    height: calc(var(--section-pad) + 0.525 * var(--text-h2) - var(--field) / 2 + 2px);
  }
  .board-step__kiko {
    --pose-h: 104px;              /* 1024 to 1439: 104, clear of the text next to the lane (lead decision, 04 11.2/50) */
    position: absolute;
    left: 50%;
    bottom: calc(100% - 2px);
    max-width: none;
    translate: -50% 0;
    margin: 0;
  }
  html.board-geo .board-step::before { display: none; }
  html.board-live .board-step__kiko { display: none; }
}
@media (min-width: 1440px) {
  .board-step__kiko { --pose-h: 128px; }
}

/* Layer drawn by board.js: one SVG with one <path> per stretch (grey, lime on top), and the one moving Kiko */
.board { position: absolute; top: 0; left: 0; right: 0; height: 0; pointer-events: none; }
.board__svg { position: absolute; top: 0; left: 0; z-index: 1; overflow: visible; }
.board__seg { fill: none; stroke: var(--line); stroke-width: var(--path-w); stroke-linecap: round; stroke-linejoin: round; }
/* the gap (start to field 1): dashes 16 / 24, butt ends, a full dash right at the seam with the 3D exit strip (docs/03 1.6) */
.board__seg--gap { stroke-linecap: butt; stroke-dasharray: 16 24; }
.board__lime { fill: none; stroke: var(--lime); stroke-width: var(--path-w); stroke-linecap: round; stroke-linejoin: round; }
/* The one Kiko (docs/04 10.2, 10.3): feet at the transform origin; base size is the hero size (--fig-h), scaled down
   on the path, never up, so it stays sharp. Under the colour panels (z 3 < 4, docs/04 11.1), never focusable, never
   blocks input. */
.board-kiko { position: absolute; top: 0; left: 0; z-index: 3; width: 0; height: 0; pointer-events: none; will-change: transform; }
.board-kiko__hop, .board-kiko__face { position: absolute; left: 0; bottom: 0; width: 0; height: 0; transform-origin: 50% 100%; }
.board-kiko .board-kiko__pose {
  position: absolute;
  left: 0;
  bottom: calc(var(--fig-h, 240px) * -7 / 512);   /* transparent rows under the feet */
  height: var(--fig-h, 240px);
  width: auto;
  max-width: none;
  translate: -50% 0;
  opacity: 0;
  visibility: hidden;
  animation: none;
}
.board-kiko .hero__kiko { translate: -47.6% 0; }   /* the hero pose keeps its foot point (--kiko-foot-x) */
/* Poses wider to the right step back with the figure's size, so they keep clear of the text (docs/04 11.2/50).
   run: board.js sets --run-dx (pre-scale px): in hero size 0.13 of the figure to the right, so the tail stays in the
   viewport; on the path 0.24 of the pose to the left on the lanes 16px from the text (fields 1/3/5), centred on the
   lanes 48px from it (2/4/goal); linear on screen in between (lead decision; lane term and screen-linear: build). */
.board-kiko .board-kiko__pose[data-pose="run"] { translate: calc(-50% + var(--run-dx, -0.24 * var(--fig-h, 240px))) 0; }
/* stand poses (never mirrored: they show only while Kiko stands, facing forward): >= 12px clear of the text (lead) */
.board-kiko .board-kiko__pose[data-pose="thinking"] { translate: calc(-50% - 0.096 * var(--fig-h, 240px)) 0; }
.board-kiko .board-kiko__pose[data-pose="cheer"] { translate: calc(-50% - 0.127 * var(--fig-h, 240px)) 0; }
.board-kiko .board-kiko__pose[data-pose="curious"] { translate: calc(-50% - 0.07 * var(--fig-h, 240px)) 0; }
/* Completely under the stack: hidden as well, so the gap beside the scaled panels never shows him (docs/04 11.1) */
.board-kiko.is-under { visibility: hidden; }

/* 6  Components ----------------------------------------------------------- */

/* Icons (lucide, 24px, stroke 2, round) */
.icon {
  width: 24px; height: 24px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon--20 { width: 20px; height: 20px; }

/* Buttons: the website's own pill (docs/01 2.0, R3-G9): radius 999px, heights 64 / 52 / 44px, the app's press edge stays.
   Interaction moves with `translate`, never `transform`, so it never fights a GSAP reveal. */
.btn {
  --btn-bg: var(--surface);
  --btn-fg: var(--fg);
  --btn-edge: var(--edge);
  --btn-border: transparent;
  --btn-ring: 0 0 0 0 transparent;
  --btn-edge-y: var(--edge-rest);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  margin-bottom: var(--edge-rest);
  padding: 0 24px;
  border: 2px solid var(--btn-border);
  border-radius: var(--radius-pill);
  background-color: var(--btn-bg);
  color: var(--btn-fg);
  box-shadow: var(--btn-ring), 0 var(--btn-edge-y) 0 0 var(--btn-edge);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  user-select: none;
  cursor: pointer;
  transition-property: translate, box-shadow, background-color, border-color, color, filter;
  transition-duration: var(--duration-fast);
  transition-timing-function: var(--ease-out-strong);
}
.btn--lime { --btn-bg: var(--lime); --btn-fg: var(--on-lime); --btn-edge: var(--lime-edge); }
.btn--teal { --btn-bg: var(--teal); --btn-fg: var(--on-teal); --btn-edge: var(--teal-edge); }
.btn--orange { --btn-bg: var(--orange); --btn-fg: var(--on-orange); --btn-edge: var(--orange-edge); }
.btn--ghost { --btn-border: var(--line); }
.btn--lg { height: 64px; padding: 0 32px; font-size: 1.25rem; }
.btn--sm { height: 44px; padding: 0 20px; font-size: 1rem; }
.btn--block { width: 100%; }
.btn--lime:focus-visible, .btn--teal:focus-visible, .btn--orange:focus-visible { --btn-ring: inset 0 0 0 2px var(--bg); }

@media (hover: hover) {
  .btn--lime:hover, .btn--teal:hover, .btn--orange:hover { filter: brightness(1.05); }
  .btn--ghost:hover { --btn-border: var(--line-strong); --btn-bg: var(--surface-raised); }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .btn:hover { translate: 0 var(--lift); --btn-edge-y: var(--edge-hover); }
}
@media (prefers-reduced-motion: no-preference) {
  .btn:active { translate: 0 var(--press); --btn-edge-y: var(--edge-press); }
}

/* Round icon button (theme toggle) */
.icon-btn {
  --btn-edge-y: var(--edge-rest);
  display: inline-grid;
  place-items: center;
  width: 44px; height: 44px;
  margin-bottom: var(--edge-rest);
  padding: 0;
  border: 2px solid var(--line);
  border-radius: var(--radius-pill);
  background-color: var(--surface);
  color: var(--fg);
  box-shadow: 0 var(--btn-edge-y) 0 0 var(--edge);
  transition-property: translate, box-shadow, background-color, border-color, color;
  transition-duration: var(--duration-fast);
  transition-timing-function: var(--ease-out-strong);
}
.icon-btn > .icon { grid-area: 1 / 1; }
@media (hover: hover) {
  .icon-btn:hover { border-color: var(--line-strong); background-color: var(--surface-raised); }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .icon-btn:hover { translate: 0 var(--lift); --btn-edge-y: var(--edge-hover); }
}
@media (prefers-reduced-motion: no-preference) {
  .icon-btn:active { translate: 0 var(--press); --btn-edge-y: var(--edge-press); }
}

/* Chips: app Chip.tsx (labels, never interactive) */
.chip {
  --chip-edge: var(--edge);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  border: 2px solid var(--line);
  border-radius: var(--radius-pill);
  background-color: var(--surface-raised);
  color: var(--fg);
  box-shadow: 0 3px 0 0 var(--chip-edge);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}
.chip--yellow { --chip-edge: var(--yellow-edge); border-color: transparent; background-color: var(--yellow); color: var(--on-yellow); }
.chip--teal { --chip-edge: var(--teal-edge); border-color: transparent; background-color: var(--teal); color: var(--on-teal); }
.chip--ink { border-color: transparent; background-color: var(--ink); color: var(--ink-fg); box-shadow: none; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px 8px; padding-bottom: 3px; }

/* Cards: app Card.tsx */
.card {
  border: 2px solid var(--line);
  border-radius: var(--radius-card);
  background-color: var(--surface);
  box-shadow: 0 var(--edge-rest) 0 0 var(--edge);
}
.card--raised { background-color: var(--surface-raised); }

/* Icon tiles: stat-tile head, 48 or 40px, accent fill plus its edge */
.icon-tile {
  --tile-bg: var(--surface-raised);
  --tile-fg: var(--lime-ink);
  --tile-edge: var(--edge);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 48px; height: 48px;
  margin-bottom: var(--edge-rest);
  border-radius: var(--radius-card);
  background-color: var(--tile-bg);
  color: var(--tile-fg);
  box-shadow: 0 var(--edge-rest) 0 0 var(--tile-edge);
}
.icon-tile--40 { width: 40px; height: 40px; }
.icon-tile--40 .icon { width: 20px; height: 20px; }
.icon-tile--lime { --tile-bg: var(--lime); --tile-fg: var(--on-lime); --tile-edge: var(--lime-edge); }
.icon-tile--teal { --tile-bg: var(--teal); --tile-fg: var(--on-teal); --tile-edge: var(--teal-edge); }
.icon-tile--orange { --tile-bg: var(--orange); --tile-fg: var(--on-orange); --tile-edge: var(--orange-edge); }
.icon-tile--yellow { --tile-bg: var(--yellow); --tile-fg: var(--on-yellow); --tile-edge: var(--yellow-edge); }
.icon-tile--magenta { --tile-bg: var(--magenta); --tile-fg: var(--on-magenta); --tile-edge: var(--magenta-edge); }
.icon-tile--neutral { border: 2px solid var(--line); }

/* Text link with arrow (docs/04 3.1) */
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  color: var(--lime-ink);
  font-weight: 800;
  text-decoration: none;
}
.text-link--fg { color: var(--fg); }
.text-link__label {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-decoration-color: currentColor;
  transition: text-decoration-color var(--duration-fast) var(--ease-out-strong),
    text-decoration-thickness var(--duration-fast) var(--ease-out-strong);
}
.text-link .icon { width: 20px; height: 20px; transition: translate var(--duration-fast) var(--ease-out-strong); }
@media (hover: hover) {
  .text-link:hover .text-link__label { text-decoration-thickness: 2px; }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .text-link:hover .icon { translate: var(--nudge) 0; }
}

/* Stat tile: app StatTile.tsx */
.stat {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  border: 2px solid var(--line);
  border-radius: var(--radius-card);
  background-color: var(--surface);
  box-shadow: 0 var(--edge-rest) 0 0 var(--edge);
}
.stat .icon-tile { margin-bottom: 0; }
.stat__text { display: block; min-width: 0; }
.stat__value { display: block; font-size: 1.5rem; line-height: 1; color: var(--fg); white-space: nowrap; }
.stat__label { display: block; margin-top: 6px; font-weight: 700; line-height: 1.25; color: var(--fg-muted); }
@media (max-width: 599.98px) {
  .stat { flex-direction: column; align-items: flex-start; gap: 12px; }
}

/* Progress: app ProgressBar.tsx, filled with transform only (docs/04 3.6) */
.progress {
  height: 12px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background-color: var(--line);
}
.progress__fill {
  width: 100%; height: 100%;
  border-radius: var(--radius-pill);
  background-color: var(--lime);
  transform: translateX(calc(var(--p, 0%) - 100%));
  transition: transform var(--duration-progress) var(--ease-out-strong);
  transition-delay: calc(var(--duration-slow) + min(var(--n, 0), 5) * 100ms);   /* 420ms after its card, 0.1s steps (docs/04 4.4) */
}

/* Check list (lime check icons) */
.check-list { display: grid; gap: 10px; list-style: none; }
.check-list li { display: flex; align-items: flex-start; gap: 10px; }
.check-list .icon { width: 20px; height: 20px; margin-top: 3px; color: var(--lime-ink); }

/* 7  Header and navigation ------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--header-h);
  background-color: var(--bg);
  border-bottom: 2px solid var(--line);
}
.js .site-header:not(.is-scrolled) { border-bottom-color: transparent; }
/* The header stays in view on every page and width (Bau-Runde 10 J2, replaces docs/04 6.1 and 11.4); scroll-padding-top
   keeps anchor targets and focus clear of it. */
.header-sentinel { position: absolute; top: 8px; left: 0; width: 1px; height: 1px; pointer-events: none; }

.site-header__bar {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 100%;
}
.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-right: auto;
  color: var(--fg);
  border-radius: 8px;
}
.logo { width: 175px; height: 28px; }
@media (min-width: 1024px) { .logo { width: 200px; height: 32px; } }
/* The pictogram starts 20.4 of 500 units into the SVG: pull the link left so the mark sits on the text edge
   (7px at 28px height, 8px at 32px). The link keeps its full size. */
.brand { margin-left: -7px; }
@media (min-width: 1024px) { .site-header .brand { margin-left: -8px; } }
/* Beta chip beside the logo (Bau-Runde 9 A1), as the app's BuildBadge: pill, 2px --line, --surface-raised, extra
   bold capitals in --magenta-ink. 12px: on --surface-raised 5.7:1 (dark) / 5.6:1 (light), measured in docs/08.
   On narrow phones the logo gives way (it shrinks with its aspect ratio), so logo, chip, theme and menu button
   stay on one line down to 320px. */
.brand { gap: 8px; min-width: 0; text-decoration: none; }
.brand .logo { flex: 0 1 auto; min-width: 0; height: auto; aspect-ratio: 500 / 80; }
.brand__beta, .beta-chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border: 2px solid var(--line);
  border-radius: var(--radius-pill);
  background-color: var(--surface-raised);
  color: var(--magenta-ink);
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
/* below 600 the nav is an empty flex item (its panel is absolute): 8px gaps instead of 16 give the logo its room */
@media (max-width: 599.98px) { .js .site-header__bar { gap: 8px; } }
@media (max-width: 389.98px) {
  .site-header__actions { gap: 8px; }
  .brand { gap: 6px; }
  .brand__beta { padding: 0 6px; font-size: 0.6875rem; letter-spacing: 0.04em; }
}
@media (forced-colors: active) { .brand__beta, .beta-chip { border-color: CanvasText; } }

.site-nav__list { display: flex; align-items: center; gap: 4px; list-style: none; }
.site-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  color: var(--fg);
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color var(--duration-fast) var(--ease-out-strong), color var(--duration-fast) var(--ease-out-strong);
}
.site-nav__link::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background-color: var(--fg);
  opacity: 0;
}
.site-nav__link[aria-current]::after { opacity: 1; }
.site-nav__item--project { margin-left: 16px; }
.site-nav__item--project .site-nav__link { color: var(--fg-muted); }
@media (hover: hover) {
  .site-nav__link:hover { background-color: var(--surface); color: var(--fg); }
  .site-nav__item--project .site-nav__link:hover { color: var(--fg); }
}

.site-header__actions { display: flex; align-items: center; gap: 12px; }
.site-header__actions .btn, .site-header__actions .icon-btn { margin-bottom: 0; }

.theme-toggle .icon { width: 20px; height: 20px; }
.theme-toggle .icon-sun { display: none; }
.light .theme-toggle .icon-sun { display: block; }
.light .theme-toggle .icon-moon { display: none; }
.icon.is-swapping { animation: gob-icon-swap var(--duration-icon-swap) var(--ease-out-strong) both; }

.menu-button { display: none; gap: 8px; padding: 0 12px; width: auto; min-width: 44px; border-radius: var(--radius-pill); grid-auto-flow: column; }
.menu-button .icon { width: 20px; height: 20px; }
.menu-button .icon-close { display: none; }
.menu-button[aria-expanded="true"] .icon-close { display: block; }
.menu-button[aria-expanded="true"] .icon-menu { display: none; }
.menu-button__label { font-weight: 800; line-height: 1; }
.site-menu__contact { display: none; }

/* Desktop navigation */
@media (min-width: 1024px) {
  .site-menu { display: flex; align-items: center; }
}

/* Mobile and tablet (< 1024px): disclosure panel with JS, plain second row without JS */
@media (max-width: 1023.98px) {
  .js .menu-button { display: inline-grid; }
  .js .header-contact { display: none; }

  .js .site-menu {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    display: none;
    padding: 8px 0 24px;
    background-color: var(--bg);
    border-bottom: 2px solid var(--line);
    box-shadow: 0 var(--edge-rest) 0 0 var(--edge);
    /* Landscape phones and 200 % zoom: the panel scrolls itself, the page behind stays locked (docs/05 M1) */
    max-height: calc(100vh - var(--header-h));
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .js .site-menu[data-open] { display: block; animation: gob-fade var(--duration-fast) var(--ease-out-strong) both; }
  .js .site-nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .js .site-nav__item--project { margin-left: 0; }
  .js .site-nav__link {
    display: flex;
    height: 56px;
    padding: 0 var(--gutter);
    border-radius: 0;
    font-size: 1.125rem;
  }
  .js .site-nav__link::after {
    left: 0; right: auto; top: 12px; bottom: 12px;
    width: 4px; height: auto;
  }
  .js .site-menu__contact { display: flex; margin: 16px var(--gutter) 0; width: calc(100% - 2 * var(--gutter)); }

  /* Without JS the list stands as a second row; the header is not sticky then. */
  html:not(.js) .site-header { position: static; height: auto; }
  html:not(.js) .site-header__bar { flex-wrap: wrap; padding-block: 10px; }
  html:not(.js) .site-nav { order: 3; width: 100%; }
  html:not(.js) .site-nav__list { flex-wrap: wrap; gap: 0 4px; margin-left: -12px; }
  html:not(.js) .site-nav__item--project { margin-left: 0; }
}
@media (min-width: 600px) and (max-width: 1023.98px) {
  .menu-button { padding: 0 16px 0 12px; }
}
@media (max-width: 599.98px) {
  .menu-button { width: 44px; padding: 0; border-radius: var(--radius-pill); }
  .menu-button__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
html:not(.js) .theme-toggle, html:not(.js) .menu-button { display: none; }

/* 8  Hero, the start field ---------------------------------------------------
   Text top left, the floating island right of it, Kiko on the start islet bottom left (docs/03 Revision 3, 16).
   Everything hangs on the hero height H; the band is the canvas area (full hero height) from 768px. Interface:
     --hero-track-x   centre of the start field = exit strip; [data-hero-track] measures it for JS
     --kiko-foot-y    Kiko's feet on the start field, fraction of H; hero-scene.js reads it and puts the field there
     --hero-edge      top of the exit strip (front rim of the start field), fraction of H (anchors.json edgeYOfHero);
                      the page path starts at the hero's bottom edge below it (board.js)
     poster frame     2400 x 900 reference px at H 900, axis at x 640 (files 3600x1350, mobile 1170x870)
   Layers in the band: poster (1) < canvas (2, inserted by hero-scene.js) < Kiko (3). The poster is the still twin. */
.hero {
  --hero-h: clamp(680px, 100svh, 1040px);
  --hero-track-x: calc(max(var(--gutter), (100% - 1296px) / 2) + 48px);
  --board-stroke: var(--path-w);    /* exit strip width at the seam = page path width (docs/03 1.6); read by hero-scene.js */
  --hero-gap: clamp(24px, calc(0.3 * var(--hero-h) - 222px), 64px);
  --kiko-foot-y: 0.8591;
  --hero-edge: 0.9178;
  --kiko-foot-x: 0.476;            /* centre of the feet in hello@512.webp, measured (docs/03 6.2) */
  --kiko-foot-pad: 1.367%;         /* 7 transparent rows of 512 under the feet */
  --kiko-h: min(calc(0.267 * var(--hero-h)), 240px);
  --kiko-w: calc(var(--kiko-h) * 380 / 512);
  /* Sky of the City island's manifest (building.json environment.sky, contract v3), the same in both themes; stops as
     the app's SKY_STOPS (docs/03 17). Text on it is dark in both themes, contrasts measured on the pixels (17.3). */
  --sky-below: #8fc7ee;
  --sky-horizon: #cfeeff;
  --sky-middle: #6db6f2;
  --sky-top: #2f7fd6;
  --hero-ink: #101820;
  --hero-ink-soft: #24313d;
  --hero-accent: #7d1248;   /* deep magenta: #b8256a (light --magenta-ink) measured 1.5:1 on this sky, #8c1750 2.8:1 */
  position: relative;
  isolation: isolate;
  height: var(--hero-h);
  margin-top: calc(-1 * var(--header-h));
  padding-top: calc(var(--header-h) + var(--hero-gap));
  overflow: hidden;
  background: var(--sky-middle) linear-gradient(to top,
    var(--sky-below) 0%, var(--sky-horizon) 40%, var(--sky-middle) 66%, var(--sky-top) 100%);
}
@media (min-width: 768px) and (max-width: 1023.98px) {
  .hero { --kiko-h: min(calc(0.267 * var(--hero-h)), 200px); }
}
/* Tablets upright: a shorter stage, so the board starts right under the CTAs instead of after 230px of sky (R2 40) */
@media (min-width: 768px) and (max-width: 1023.98px) and (orientation: portrait) {
  .hero { --hero-h: clamp(680px, 80svh, 860px); }
}
/* Custom properties never fall back by themselves (invalid at computed time), so give old engines plain values
   (docs/05 Minor 5). */
@supports not (height: 100svh) {
  .hero { --hero-h: clamp(680px, 100vh, 1040px); }
}
/* Measuring point for JS: the lane centre (docs/03 1.5) */
.hero__track { position: absolute; top: 0; left: var(--hero-track-x); width: 0; height: 0; pointer-events: none; }

.hero__content { position: relative; z-index: 4; }
.hero__title {
  font-size: var(--text-display);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--hero-ink);
}
.hero__title-line { display: block; }   /* "Turn onboarding" / "into an adventure.": three lines on phones, two from 768 */
.hero__accent { color: var(--hero-accent); }
.hero__lead { margin-top: 24px; max-width: 48ch; color: var(--hero-ink-soft); }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 32px; }
.hero__ctas .btn { margin-bottom: 0; }

@media (min-width: 1024px) {
  /* two lines, never more: the size gives way on short viewports so the CTAs stay clear of the board (docs/03 1.5) */
  .hero__title {
    font-size: min(var(--text-display), calc((0.56 * var(--hero-h) - 256px - var(--hero-gap)) / 2));
    text-wrap: nowrap;
  }
}

/* Band: the full hero, full viewport width, under the text (docs/03 16.1: balloon and satellites reach high) */
.hero__band {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 1;
  height: var(--hero-h);
  overflow: hidden;
  pointer-events: none;
}
/* Poster: scale H / 900, axis (x 640 of 2400) on the lane centre; the box comes from CSS, loading never shifts */
.hero__poster {
  position: absolute;
  bottom: 0;
  z-index: 1;
  height: 100%;
  width: auto;
  max-width: none;
  aspect-ratio: 2400 / 900;
  left: calc(var(--hero-track-x) - 640 * var(--hero-h) / 900);
  transition: opacity var(--duration-slow) var(--ease-out-strong);
}
.hero__poster.is-leaving { opacity: 0; }            /* outgoing copy during a theme or fallback swap (motion.js) */
.hero__poster:not([src]) { visibility: hidden; }   /* the src-less slot must never draw a broken-image frame */
.hero__canvas {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%; height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-base) var(--ease-out-strong);
}
.hero__canvas.is-live { opacity: 1; }
/* Kiko stands on the start field. The edge box ends on the foot line and clips below it, so Kiko can rise from
   behind the field (docs/04 10.3) and the transparent rows under the feet never show. */
.hero__kiko-edge {
  position: absolute;
  z-index: 3;
  left: calc(var(--hero-track-x) - var(--kiko-foot-x) * var(--kiko-w));
  bottom: calc((1 - var(--kiko-foot-y)) * var(--hero-h));
  width: var(--kiko-w);
  height: var(--kiko-h);
  clip-path: inset(-50% -50% 0 -50%);
}
.hero__kiko {
  position: absolute;
  left: 0;
  bottom: calc(-1 * var(--kiko-foot-pad));
  height: 100%;
  width: auto;
  max-width: none;
}

/* The island can be dragged (docs/03 16.3): the canvas takes pointers wherever no text lies above it. The text
   column lets them through except on its glyph boxes and buttons. */
@media (min-width: 768px) {
  .hero > .container, .hero__content { pointer-events: none; }
  .hero__title, .hero__lead, .hero__ctas { pointer-events: auto; width: fit-content; }
}

/* Mobile (< 768px): flex column, band in flow at the end (390 x 290), poster only (docs/03 1.5, 6.2) */
@media (max-width: 767.98px) {
  .hero {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 0;
    padding-top: calc(var(--header-h) + 32px);
  }
  .hero__content { padding-bottom: 16px; }
  .hero__ctas { flex-direction: column; gap: 12px; }
  .hero__ctas .btn { width: 100%; }
  .hero__ctas .btn--ghost { height: 52px; font-size: 1.0625rem; }
  .hero__band {
    position: relative;
    height: auto;
    aspect-ratio: 390 / 290;
  }
  .hero__poster { left: 0; width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; object-position: 50% 100%; }
  .hero__kiko-edge { left: 1.75%; bottom: 24.81%; width: 15.4%; height: auto; aspect-ratio: 380 / 512; } /* mobile poster camera (r3o): foot x 35.4 of 390 (trackX 44, 06 R4 63), y 0.7577 x 297 - 7 of 290; width = 1.35 x start field (44.6 px) */
}
html:not(.js) .hero { margin-top: 0; padding-top: var(--hero-gap); }
@media (max-width: 767.98px) { html:not(.js) .hero { padding-top: 32px; } }
@media (min-width: 1024px) { html:not(.js) .hero { margin-top: calc(-1 * var(--header-h)); padding-top: calc(var(--header-h) + var(--hero-gap)); } }

/* 9  Field 1, the gap (#why): no accent colour, no box, no sticky ---------- */
.why__list { display: grid; gap: 40px; list-style: none; margin-top: 56px; }
.why__item p { margin-top: 8px; max-width: 52ch; color: var(--fg-muted); }
.why__close {
  margin-top: 72px;
  padding-top: 40px;
  border-top: 2px solid var(--line);
  font-size: var(--text-h2);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: 16ch;
  text-wrap: balance;
}
@media (min-width: 1024px) {
  .why .container { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; }
  .why__head { grid-column: 1 / span 6; }
  .why__list { grid-column: 3 / span 9; gap: 56px; margin-top: var(--lead-gap); }
  .why__close { grid-column: 3 / span 10; margin-top: 96px; padding-top: 56px; max-width: none; }
}

/* 10 Field 2, the companion (#platform): three colour panels, the page's one fixed place ---------------
   Panels lie over the board (z 4 > 1, 2, 3), so path, fields and Kiko run underneath (docs/04 11.1). With
   html.stack-live (>= 1024 x 700, motion allowed, every panel fits) each panel sticks below the header and motion.js
   scrubs only the covered one. A section's rest zone lies between the lead and the stack (docs/04 11.3). */
.platform { padding-bottom: 0; }
.pillars { position: relative; margin-top: calc(var(--section-pad) + 32px); }   /* rest zone, all widths (04 11.15) */
.pillar {
  --fg: var(--ink);
  --fg-muted: var(--ink);
  --focus: var(--ink);
  position: relative;
  z-index: 4;
  padding-block: 72px;
  color: var(--ink);
  background-color: var(--pillar-bg);
}
.pillar--lime { --pillar-bg: var(--lime); }
.pillar--teal { --pillar-bg: var(--teal); }
.pillar--orange { --pillar-bg: var(--orange); }
.pillar__shade { position: absolute; inset: 0; z-index: 3; background-color: var(--overlay); opacity: 0; pointer-events: none; }
.pillar__inner { display: grid; gap: 48px; }
.pillar__title {
  font-size: var(--text-panel);
  line-height: 1.02;
  letter-spacing: -0.025em;
  max-width: 14ch;
}
.pillar__body { margin-top: 24px; font-size: var(--text-lead); line-height: 1.45; max-width: 44ch; }
.pillar__foot { margin-top: 24px; }
.pillar :focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.text-link--on { color: var(--ink); }
.lang-row { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.lang-row li {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  background-color: var(--ink);
  color: #5bc0cc;
  font-weight: 800;
  line-height: 1.2;
}

/* Kiko's example conversation on the orange panel: an app quote, bubbles dark in both themes (docs/01 R3-S3) */
.convo { display: grid; gap: 12px; align-content: center; }
.convo__row { display: flex; align-items: flex-end; gap: 10px; }
.convo__row--user { justify-content: flex-end; }
.bubble {
  max-width: 30ch;
  padding: 12px 16px;
  border-radius: 16px;
  background-color: var(--ink);
  color: var(--ink-fg);
  line-height: 1.45;
}
.convo__row--user .bubble { border-bottom-right-radius: 4px; }
.convo__row--kiko .bubble { border-bottom-left-radius: 4px; }
.convo__who { display: block; font-weight: 800; color: #ff8a3d; }
.convo__row--user .convo__who { color: #9aabbd; }
/* Kiko names the document he answered from (app: sources under the answer), quiet, inside his bubble */
.convo__source {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgb(154 171 189 / 0.24);
  color: #9aabbd;
  font-size: 1rem;
  line-height: 1.35;
}
.convo__source .icon { width: 16px; height: 16px; stroke-width: 2.25; }
.avatar {
  flex-shrink: 0;
  width: 48px; height: 48px;
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  background-color: #1f2d3d;
  overflow: hidden;
}
.avatar img { width: 180%; max-width: none; height: auto; margin: -6px 0 0 -40%; }

/* One object per panel in columns 8 to 12 (docs/06 R2 27a): the quest card (app quote, dark in both themes) on lime,
   the languages as a typographic column on teal, Kiko's conversation on orange. */
.pillar .quest-card {
  --fg: var(--ink-fg);
  --fg-muted: #9aabbd;
  --focus: #5bc0cc;
  max-width: 32rem;
  border-color: var(--ink);
  background-color: var(--ink);
  color: var(--ink-fg);
  box-shadow: 0 4px 0 0 rgb(15 23 32 / 0.5);
}
.pillar .quest-card .quest-card__title .icon { color: #a1b91c; }
.pillar .quest-card .progress { border-color: #5a7590; background-color: #1f2d3d; }

@media (min-width: 1024px) {
  .pillar { display: flex; align-items: center; padding-block: 96px; }
  .pillar__inner { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: center; }
  .pillar__text { grid-column: 1 / span 7; }
  .pillar .convo, .pillar .quest-card, .pillar .lang-row { grid-column: 8 / span 5; }
  .pillar .quest-card { max-width: none; }
  .pillar .lang-row { display: block; }
  .pillar .lang-row li {
    display: flex;
    min-height: 56px;
    padding: 0;
    border-top: 2px solid rgb(15 23 32 / 0.24);
    border-radius: 0;
    background-color: transparent;
    color: var(--ink);
    font-size: var(--text-statement);
    line-height: 1.15;
  }
  .pillar .lang-row li:last-child { border-bottom: 2px solid rgb(15 23 32 / 0.24); }
  /* The stack shows its edges: each panel sticks 24px lower than the one before (docs/06 R2 27b) */
  html.stack-live .pillar {
    position: sticky;
    top: 0;
    min-height: calc(100svh - 48px);
    padding-top: calc(var(--header-h) + 48px);   /* a visible header lies over this padding, never over text (04 10.4) */
    transform-origin: 50% 0%;
  }
  html.stack-live .pillar--teal { top: 24px; }
  html.stack-live .pillar--orange { top: 48px; }
  /* room for the last panel to reach its sticky line, so both edges show above orange; the room overlaps the next
     section's empty top padding, so the page does not get longer */
  html.stack-live .pillars { margin-bottom: -48px; }
  html.stack-live .pillars::after { content: ""; display: block; height: 48px; }   /* in the content box: sticky stays inside it */
  html.stack-live .pillar--lime, html.stack-live .pillar--teal { will-change: transform; }   /* docs/04 10.5 */
  /* Rest zone after the stack: the 48px overhang of the stack plus 16px (docs/04 11.15, was +96) */
  .worlds { padding-top: calc(var(--section-pad) + 64px); }
  /* Anchor target independent of the padding: the H2 lands 248px below the top (88 + 160), for any --section-pad >= 160 (04 11.11) */
  .board-page .section[id] { scroll-margin-top: min(0px, calc(160px - var(--section-pad))); }
  .board-page .section.worlds[id] { scroll-margin-top: min(0px, calc(96px - var(--section-pad))); }
  /* Panels in the flow (no stack-live): no overhang, so 32px more than with the stack (04 11.15, was +160) */
  html:not(.stack-live) .worlds { padding-top: calc(var(--section-pad) + 96px); }
  html:not(.stack-live) .board-page .section.worlds[id] { scroll-margin-top: min(0px, calc(64px - var(--section-pad))); }
}

/* 11 Field 3, your world (#worlds): an open stage, Kiko jumped off the board into it -------------------- */
.world-tabs__list { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 4px; }
.world-tab {
  --btn-edge-y: var(--edge-rest);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 20px 0 16px;
  border: 2px solid var(--line);
  border-radius: var(--radius-pill);
  background-color: var(--surface-raised);
  color: var(--fg);
  box-shadow: 0 var(--btn-edge-y) 0 0 var(--edge);
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition-property: translate, box-shadow, background-color, border-color, color;
  transition-duration: var(--duration-fast);
  transition-timing-function: var(--ease-out-strong);
}
.world-tab .icon { color: var(--lime-ink); }
.world-tab[aria-selected="true"] {
  border-color: transparent;
  background-color: var(--lime);
  color: var(--on-lime);
  box-shadow: 0 var(--edge-rest) 0 0 var(--lime-edge);
  cursor: default;
}
.world-tab[aria-selected="true"] .icon { color: currentColor; }
.light .world-tab[aria-selected="true"] { border-color: var(--lime-edge); } /* 3:1 against white, not fill alone (docs/05 Minor 7) */
.world-tab[aria-selected="true"]:focus-visible { box-shadow: inset 0 0 0 2px var(--bg), 0 var(--edge-rest) 0 0 var(--lime-edge); }
@media (hover: hover) {
  .world-tab:not([aria-selected="true"]):hover { border-color: var(--line-strong); background-color: var(--surface); }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .world-tab:not([aria-selected="true"]):hover { translate: 0 var(--lift); --btn-edge-y: var(--edge-hover); }
}
@media (prefers-reduced-motion: no-preference) {
  .world-tab:not([aria-selected="true"]):active { translate: 0 var(--press); --btn-edge-y: var(--edge-press); }
}

.world-stage {
  margin-top: var(--lead-gap);
  background-color: var(--surface);
  border-bottom: 4px solid var(--edge);
}
.world-panel { display: grid; gap: 32px; padding-block: 40px 48px; scroll-margin-top: 96px; }
.world-text { display: grid; align-content: start; gap: 16px; }
.world-text p { max-width: 52ch; }
.world-name { font-size: var(--text-panel); line-height: 1.02; letter-spacing: -0.025em; }

/* The island of each world (docs/08): the app's tile rendering in an app-quote frame. The frame carries the sky
   of the island's manifest (contract v3, the same in both themes) with the app's stops (SKY_STOPS: below 0 %,
   horizon 40 %, middle 66 %, top 100 %), so the image runs into it without a step while it loads and around the
   float. Kiko jumped off the board onto it: he stands in front of the frame's lower left corner (docs/01 1.3, field 3). */
.world-media {
  --kiko-h: 112px;
  --kiko-x: -8px;
  --kiko-drop: 14px;       /* feet below the frame's bottom border */
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
}
.world-island {
  grid-area: 1 / 1;
  overflow: hidden;
  border: 2px solid var(--line);
  border-radius: var(--radius-card);
  background-color: var(--tile-middle, #6db6f2);
  background-image: linear-gradient(to top, var(--tile-below) 0%, var(--tile-horizon) 40%, var(--tile-middle) 66%, var(--tile-top) 100%);
  box-shadow: 0 var(--edge-rest) 0 0 var(--edge);
}
/* manifest skies (restaurant.json, construction.json, engineering.json, environment.sky) */
#world-hospitality .world-island { --tile-below: #f3c4c9; --tile-horizon: #ffe6d0; --tile-middle: #a9d4f5; --tile-top: #5aa0e6; }
#world-construction .world-island { --tile-below: #d9a877; --tile-horizon: #f3dcae; --tile-middle: #9fc6e0; --tile-top: #3f86c9; }
#world-engineering .world-island { --tile-below: #3f60b8; --tile-horizon: #b3caf8; --tile-middle: #4d78d6; --tile-top: #24409c; }
.world-island__img { display: block; width: 100%; height: auto; }
/* Kiko shares the frame's grid cell: bottom left, in front, his feet below the frame */
.world-kiko {
  grid-area: 1 / 1;
  align-self: end;
  justify-self: start;
  position: relative;
  height: var(--kiko-h);
  width: auto;
  margin-left: var(--kiko-x);
  margin-bottom: calc(-1 * var(--kiko-drop));
  pointer-events: none;
}
/* The areas of the island (app manifest names), a quiet line under the frame. Every item carries its dot in
   front; the first item of each line pulls its dot out of the clipped box, so no line starts with a dot. */
.world-areas {
  --sep: 22px;
  grid-area: 2 / 1;
  display: flex;
  flex-wrap: wrap;
  row-gap: 4px;
  column-gap: var(--sep);
  overflow: hidden;
  margin-top: 28px;
  list-style: none;
  color: var(--fg-muted);
  font-size: 1rem;
  line-height: 1.5;
}
.world-areas li { position: relative; margin-left: calc(-1 * var(--sep)); padding-left: var(--sep); white-space: nowrap; }
.world-areas li::before { content: "\00b7" / ""; position: absolute; left: 0; width: var(--sep); text-align: center; color: var(--line-strong); font-weight: 800; }
@media (min-width: 1024px) {
  /* beside Kiko's feet; two lines reserved, so the stage keeps its height across the three worlds */
  .world-areas { margin-top: 16px; margin-left: calc(var(--kiko-x) + var(--kiko-h) * 0.84 + 12px); min-height: calc(2 * 1.5em + 4px); }
}

.world-outro { display: grid; gap: 4px; margin-top: 40px; }
.world-outro__line { display: flex; flex-wrap: wrap; align-items: center; column-gap: 12px; font-size: var(--text-lead); }
.world-outro__line .text-link { font-size: inherit; }
.world-outro__line .text-link strong { font-weight: 800; }

@media (min-width: 1024px) {
  .world-panel { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: center; padding-block: 56px 64px; }
  .world-media { grid-column: 1 / span 7; --kiko-h: 160px; --kiko-x: -20px; --kiko-drop: 28px; }
  .world-text { grid-column: 8 / span 5; }
  .world-name { font-size: min(var(--text-panel), 4.25vw); }
}

/* JS: one panel at a time. Without JS all panels stack, each with its island. */
.js .world-panel:not([data-active]) { display: none; }
html:not(.js) .world-panel + .world-panel { border-top: 2px solid var(--line); }

/* The island floats like in the app: 7s, +-3px, never with reduced motion or ?motion=off (docs/08) */
@media (prefers-reduced-motion: no-preference) {
  html:not(.motion-off) .world-island__img { animation: gob-island-float 7s ease-in-out infinite alternate; }
}
@keyframes gob-island-float {
  from { transform: translateY(-3px); }
  to { transform: translateY(3px); }
}

/* 12 Field 4, play (#play): the app quote of the page, frames stay on purpose ------------------------------ */
.play__row-a, .play__row-b { display: grid; gap: 40px; }
.play__row-b { margin-top: 40px; }

.types { display: grid; gap: 24px; list-style: none; }
.type { display: flex; align-items: flex-start; gap: 16px; }
.type .icon-tile { margin-bottom: 0; }
.type .h3 { max-width: none; }
.type p { margin-top: 4px; color: var(--fg-muted); line-height: 1.45; }

.quiz-card { padding: 24px; }
/* a rendered legend ignores its own top margin: the head holds the 16px (plus the chip's 3px edge) */
.quiz-card__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 3px; margin-bottom: 16px; }
.quiz legend { font-size: 1.125rem; font-weight: 800; line-height: 1.35; }
.answers { display: grid; gap: 12px; margin-top: 16px; }
.answer {
  --btn-edge-y: var(--edge-rest);
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 8px 14px 8px 10px;
  margin-bottom: var(--edge-rest);
  border: 2px solid var(--line);
  border-radius: var(--radius-card);
  background-color: var(--surface);
  box-shadow: 0 var(--btn-edge-y) 0 0 var(--edge);
  line-height: 1.3;
  cursor: pointer;
  transition-property: translate, box-shadow, background-color, border-color, color;
  transition-duration: var(--duration-fast);
  transition-timing-function: var(--ease-out-strong);
}
.answer input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.answer__key {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 32px; height: 32px;
  border: 2px solid var(--line);
  border-radius: 10px;
  color: var(--fg-muted);
  font-weight: 800;
  line-height: 1;
}
.answer__key .icon { display: none; width: 18px; height: 18px; }
.answer:has(:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
/* Without :has() (Firefox < 121): focus and choice still show on the letter key (docs/05 Minor 6) */
@supports not selector(:has(*)) {
  .answer input:focus-visible + .answer__key { outline: 2px solid var(--focus); outline-offset: 2px; }
  .answer input:checked + .answer__key { border-color: var(--line-strong); background-color: var(--surface-raised); color: var(--fg); }
}
.answer:has(:checked) { border-color: var(--fg); background-color: var(--surface-raised); }   /* chosen differs from hover by the border, >= 15:1 (audit 30.10.) */
@media (prefers-reduced-motion: no-preference) {
  .answer:has(:checked) { translate: 0 var(--press); --btn-edge-y: var(--edge-press); }
}
@media (hover: hover) {
  .answer:not(:has(:checked)):hover { border-color: var(--line-strong); background-color: var(--surface-raised); }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .answer:not(:has(:checked)):hover { translate: 0 var(--lift); --btn-edge-y: var(--edge-hover); }
}
@media (prefers-reduced-motion: no-preference) {
  .answer:active { translate: 0 var(--press); --btn-edge-y: var(--edge-press); }
}

/* Result marks on the chosen card: right = lime frame plus check; wrong = cross (never red) */
.answer.is-right { border-color: var(--lime); }
.answer.is-right .answer__key { border-color: transparent; background-color: var(--lime); color: var(--on-lime); }
.answer.is-right .answer__key .icon-ok { display: block; animation: gob-pop-in var(--duration-pop) var(--ease-out-strong) both; }
.answer.is-wrong .answer__key { border-color: var(--line-strong); color: var(--fg); }
.answer.is-wrong .answer__key .icon-no { display: block; animation: gob-fade var(--duration-fade) var(--ease-out-strong) both; }
.answer.is-right .answer__letter, .answer.is-wrong .answer__letter { display: none; }

.quiz-feedback { display: none; margin-top: 16px; padding-top: 16px; border-top: 2px solid var(--line); }
.quiz-feedback p { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-weight: 800; }
.quiz-feedback[data-for="right"] p { color: var(--lime-ink); }
.quiz-feedback .chip { animation: gob-pop-in var(--duration-pop) var(--ease-out-strong) 60ms both; }
.quiz-check { display: none; margin-top: 16px; }
.quiz-check.btn { margin-bottom: var(--edge-rest); }

/* No JS: immediate feedback via :has(). With JS: only after "Check answer". */
html:not(.js) .quiz:has(:checked[data-correct]) [data-for="right"],
html:not(.js) .quiz:has(:checked:not([data-correct])) [data-for="wrong"] { display: block; }
html:not(.js) .answer:has(:checked[data-correct]) { border-color: var(--lime); }
html:not(.js) .answer:has(:checked[data-correct]) .answer__letter,
html:not(.js) .answer:has(:checked:not([data-correct])) .answer__letter { display: none; }
html:not(.js) .answer:has(:checked[data-correct]) .icon-ok,
html:not(.js) .answer:has(:checked:not([data-correct])) .icon-no { display: block; }
.js .quiz-check { display: inline-flex; }
.js .quiz[data-result="right"] [data-for="right"],
.js .quiz[data-result="wrong"] [data-for="wrong"] { display: block; animation: gob-rise var(--duration-rise) var(--ease-out-strong) both; }

.quest-card { padding: 24px; }
.quest-card__title { display: flex; align-items: center; gap: 10px; }
.quest-card__title .icon { color: var(--lime-ink); }
.quests { display: grid; gap: 18px; margin-top: 20px; list-style: none; }
.quest__row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; font-weight: 700; line-height: 1.35; }
.quest__value { color: var(--fg-muted); font-size: 1rem; }

.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
.stats .stat:last-of-type { grid-column: 1 / -1; }
.stats__meta { grid-column: 1 / -1; }
@media (min-width: 768px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 16px; }
  .stats .stat:last-of-type { grid-column: auto; }
}
@media (min-width: 1024px) {
  .stats { grid-column: 1 / -1; grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (min-width: 768px) {
  .types { grid-template-columns: 1fr 1fr; }
  /* eight question types in pairs, the scenario (the ninth game type, not a question) across both columns */
  .type--wide { grid-column: 1 / -1; padding-top: 24px; border-top: 2px solid var(--line); }
  .type--wide p { max-width: 44ch; }
  .play__row-b { grid-template-columns: 1fr; }
}
@media (min-width: 1024px) {
  .play__row-a { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: start; }
  .types { grid-column: 1 / span 7; gap: 32px 24px; }
  .quiz-card { grid-column: 8 / span 5; }
  .play__row-b { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; margin-top: 56px; }
  .quiz-card, .quest-card { padding: 28px; }
}

/* Row c: "New in beta 0.10" as patch notes (Bau-Runde 9 A3): an open list, no cards, no icon tiles. Term bold on the
   left, the sentence on the right, a 2px line above every entry. From 1024 two columns of three (column flow). */
.play__row-c { margin-top: 64px; }
.changes__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.changes { margin-top: 24px; }
.change { display: grid; gap: 4px; padding-block: 20px; border-top: 2px solid var(--line); }
.change dt { font-weight: 800; line-height: 1.35; }
.change dd { color: var(--fg-muted); line-height: 1.5; max-width: 52ch; }
@media (min-width: 768px) {
  .change { grid-template-columns: minmax(0, 13rem) minmax(0, 1fr); column-gap: 24px; align-items: baseline; }
}
@media (min-width: 1024px) {
  .play__row-c { margin-top: 80px; }
  .changes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(3, auto); grid-auto-flow: column; column-gap: 48px; margin-top: 28px; }
  .change { grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); }
}

/* 13 Field 5 (#for-whom), the goal (#demo), contact ------------------------------------------------------ */
/* Open bands: an 8px accent stripe in the role colour on the full band height, a line between bands (R3-S6) */
.roles { list-style: none; }
.roles > li { min-width: 0; }
.role {
  --role: var(--lime);
  position: relative;
  display: grid;
  gap: 16px;
  padding: 40px 0 40px 32px;
  scroll-margin-top: 16px;
}
.role + .role { border-top: 2px solid var(--line); }
.role::before {
  content: "";
  position: absolute;
  left: 0; top: 40px; bottom: 40px;
  width: 8px;
  border-radius: var(--radius-pill);
  background-color: var(--role);
}
.role--teal { --role: var(--teal); }
.role--orange { --role: var(--orange); }
.role--lime { --role: var(--lime); }
.role__name { font-size: var(--text-statement); line-height: 1.15; letter-spacing: -0.01em; max-width: 18ch; }
.role__body { color: var(--fg-muted); max-width: 48ch; }
.role__cta { display: grid; justify-items: start; gap: 8px; min-width: 0; }
/* WCAG 1.4.12 (text spacing) on phones: the one-column band never grows past the container, long labels wrap (07 N-4) */
.role { grid-template-columns: minmax(0, 1fr); }
.role > * { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 479.98px) {
  .role__cta .btn { max-width: 100%; height: auto; min-height: 52px; padding-block: 8px; white-space: normal; text-align: center; }
}
.role__cta .btn { margin-bottom: var(--edge-rest); }
.roles-more { margin-top: 40px; color: var(--fg-muted); }
.roles-more .text-link { color: var(--fg); }

/* WCAG 1.4.10 / 1.4.12: mail addresses may break anywhere (320px plus text spacing: 21px overflow, audit 30.10.) */
a[href^="mailto:"] { overflow-wrap: anywhere; }

/* WCAG 1.4.10: below 360px long button labels and the project number may wrap */
@media (max-width: 359.98px) {
  .role__cta .btn, .login .btn { white-space: normal; text-align: center; height: auto; min-height: 52px; padding-block: 8px; }
  .nowrap { white-space: normal; overflow-wrap: anywhere; }
}
@media (min-width: 1024px) {
  .role { grid-template-columns: minmax(0, 4fr) minmax(0, 5fr) 18.5rem; column-gap: 40px; align-items: center; padding: 48px 0 48px 48px; }   /* fixed CTA column: the text columns line up across bands */
  .role::before { top: 48px; bottom: 48px; }
  .role__cta { justify-items: end; text-align: right; }
  /* WCAG 1.4.12 from 1024: with text spacing the longest label (46px over the column, audit 30.10.) wraps inside the 18.5rem column */
  .role__cta .btn { max-width: 100%; height: auto; min-height: 52px; padding-block: 8px; white-space: normal; text-align: center; text-wrap: balance; }
}

/* The goal (#demo): yellow reset band, open start row, three open login columns (R3-S7) */
.reset-band {
  --focus: var(--ink);
  margin-top: var(--lead-gap);
  padding-block: 32px;
  background-color: var(--yellow);
  color: var(--ink);
}
.reset-band__inner { display: flex; align-items: flex-start; gap: 20px; }
.reset-band__icon { width: 32px; height: 32px; margin-top: 2px; }
.reset-band__title { font-size: var(--text-h3); line-height: 1.25; }
.reset-band p { margin-top: 4px; }

.launch {
  display: grid;
  gap: 20px;
  align-items: center;
  padding-block: 40px;
  border-bottom: 2px solid var(--line);
}
.launch__info { display: grid; gap: 8px; min-width: 0; }
.launch__address { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.launch__note { color: var(--fg-muted); font-size: 1rem; line-height: 1.5; }
.launch__label { color: var(--fg-muted); }
.launch__url { font-size: var(--text-lead); font-weight: 800; overflow-wrap: anywhere; }
.launch .btn { margin-bottom: var(--edge-rest); }

.logins { display: grid; gap: 40px; margin-top: 48px; list-style: none; }
.login {
  --role: var(--lime);
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 16px;
  padding-top: 32px;
  scroll-margin-top: 16px;
}
.login::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 8px;
  border-radius: var(--radius-pill);
  background-color: var(--role);
}
.login--teal { --role: var(--teal); }
.login--orange { --role: var(--orange); }
.login--lime { --role: var(--lime); }
.login--magenta { --role: var(--magenta); }
.login--yellow { --role: var(--yellow); }
.login--neutral { --role: var(--line-strong); }   /* HR: the neutral card; --surface-raised would vanish on the surface band */
.login__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
/* One "Credentials follow" per column (docs/06 3): right of the name where it fits, else on its own line */
.login, .role-panel__access { container: cred-card / inline-size; }
@container cred-card (min-width: 300px) {
  .login__head .chip, .role-panel__head .chip { margin-left: auto; }
}
.cred-pending { color: var(--fg-muted); font-weight: 600; font-size: 1.0625rem; }
.login p { color: var(--fg-muted); }
.creds { display: grid; gap: 12px; padding-top: 16px; border-top: 2px solid var(--line); }
.creds__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.creds dt { color: var(--fg-muted); font-size: 1rem; }
.creds dd { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cred-value { font-size: 1.25rem; font-weight: 800; line-height: 1.3; letter-spacing: 0.02em; overflow-wrap: anywhere; user-select: all; }
.copy-button { width: 44px; height: 44px; flex: none; margin-bottom: 0; }
.copy-button .icon-check, .copy-button.is-copied .icon-copy { display: none; }
.copy-button.is-copied .icon-check { display: block; color: var(--teal-ink); }
html:not(.js) .copy-button { display: none; }
/* The login address (D11): label above, the address on its own line with the copy button at its end; it may break
   only before the @ (<wbr>), so "engineering@gamesonboard.ai" stays readable in a 261px card at 1024 */
.creds__row--address { display: grid; gap: 4px; }
.creds__row--address dd { justify-content: space-between; }
.creds dd.mono .cred-value { font-size: 1.0625rem; font-weight: 700; letter-spacing: 0; overflow-wrap: normal; min-width: 0; }
.demo__more { margin-top: 32px; }

/* Bau-Runde 9 (A5 to A7): two groups as in the app ("Play as a trainee" 4, "See the admin side" 1 since Bau-Runde 10),
   each card ends in a link to the demo's sign-in page; the password line is a quiet note under the address. Two
   columns from 768 (2 x 2, then one card across both): every row is full, the address stays on one line from 1024. */
.logins-group { margin-top: 48px; }
.logins-group + .logins-group { margin-top: 56px; }
.logins-group .logins { margin-top: 24px; }
.login { grid-template-rows: auto 1fr auto auto; }
.login__pw { color: var(--fg-muted); font-size: 1rem; line-height: 1.45; }
.login__access { display: grid; gap: 8px; }
.login__open { justify-self: start; max-width: 100%; }
.login__open .icon { width: 18px; height: 18px; flex: none; }
.launch__note--rollout { color: var(--fg); }
@media (max-width: 479.98px) {
  .login__open { justify-self: stretch; width: 100%; }
}

@media (min-width: 768px) {
  .launch { grid-template-columns: minmax(0, 1fr) auto; }
  .logins { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; }
  /* A group with a single card (Bau-Runde 10 J5: "See the admin side" keeps only Demo admin) spans both columns:
     name and text on the left, address and button on the right, on the same column line as the cards above */
  .login:only-child {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto auto 1fr;
    grid-template-areas: "head access" "text access" "text open";
    align-items: start;
    column-gap: 24px;
  }
  .login:only-child > .login__head { grid-area: head; }
  .login:only-child > p { grid-area: text; }
  .login:only-child > .login__access { grid-area: access; }
  .login:only-child .creds { padding-top: 0; border-top: 0; }   /* the role stripe already sits right above */
  .login:only-child > .login__open { grid-area: open; }
}
@media (max-width: 767.98px) {
  .launch .btn { width: 100%; }
}
@media (min-width: 1024px) {
  .reset-band__inner { align-items: center; gap: 24px; }
  .launch { padding-block: 48px; }
  .logins-group { margin-top: 56px; }
  .logins-group + .logins-group { margin-top: 64px; }
  .logins { gap: 40px 48px; }
  .login:only-child { column-gap: 48px; }
}

/* Contact: the address in display size, Kiko gives a high five on the footer edge (R3-S8) */
.contact { padding-bottom: 0; }
.contact__grid { position: relative; display: grid; gap: 0; }
.contact__text { padding-bottom: var(--section-pad); }
.contact__mail-line { margin-top: 32px; }
.contact__mail {
  display: inline-block;
  padding-block: 8px;
  color: var(--fg);
  font-size: var(--text-contact);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.025em;
  white-space: nowrap;
  text-decoration: underline;
  text-decoration-thickness: 4px;
  text-underline-offset: 0.14em;
  text-decoration-color: var(--line-strong);
  transition: text-decoration-color var(--duration-fast) var(--ease-out-strong);
}
@media (hover: hover) { .contact__mail:hover { text-decoration-color: var(--lime); } }
.contact__social { margin-top: 16px; }
.contact__social a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--fg);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  text-decoration-color: var(--line-strong);
  transition: text-decoration-color var(--duration-fast) var(--ease-out-strong);
}
@media (hover: hover) { .contact__social a:hover { text-decoration-color: var(--lime); } }
.contact__social a:focus-visible { text-decoration-color: currentColor; }
.contact__meta { margin-top: 24px; }
.contact__kiko-wrap { display: flex; justify-content: flex-end; align-items: flex-end; margin-top: calc(-1 * var(--section-pad) + 24px); }
.contact__kiko { height: 128px; width: auto; margin-bottom: -2px; transform-origin: 50% 100%; }
@media (max-width: 359.98px) {
  .contact__mail { font-size: 1.75rem; }
}
@media (min-width: 1024px) {
  .contact__kiko-wrap { position: absolute; right: var(--gutter); bottom: 0; margin: 0; }
  .contact__kiko { height: 240px; }
}

/* 14 The one moving Kiko on the board (board.js) ---------------------------------------------------------- */

/* 15 Footer ------------------------------------------------------------------ */
.site-footer {
  background-color: var(--surface);
  border-top: 2px solid var(--line);
  padding-block: 64px 40px;
}
.footer__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; } /* 2x2 link groups below 1024 (docs/06 21) */
.footer__brand { grid-column: 1 / -1; }
.footer__brand .logo { width: 175px; height: 28px; }
.footer__brand p { margin-top: 16px; max-width: 34ch; }
.footer__brand p + p { margin-top: 8px; }
.footer__title { font-size: 1rem; line-height: 1.2; letter-spacing: 0; color: var(--fg-muted); }
.footer__links { margin-top: 8px; list-style: none; }
.footer__links a, .footer__contact a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-decoration-color: transparent; /* link lists under their headings: the line appears on hover and focus (docs/06 12) */
  transition: text-decoration-color var(--duration-fast) var(--ease-out-strong);
}
.footer__links a:focus-visible, .footer__contact a:focus-visible { text-decoration-color: currentColor; text-decoration-thickness: 2px; }
@media (hover: hover) {
  .footer__links a:hover, .footer__contact a:hover { text-decoration-color: currentColor; text-decoration-thickness: 2px; }
}
.footer__contact p { margin-top: 8px; line-height: 1.5; }
.footer__contact p:first-of-type { margin-top: 12px; }
/* Social links (Bau-Runde 10 J1): inline SVG (simple-icons 9.21.0, CC0) in the link colour, never the brand colour,
   the name stays visible; 44px tall targets, focus ring from the global :focus-visible */
.social-links { display: flex; flex-wrap: wrap; column-gap: 24px; list-style: none; }
.social-links a { gap: 10px; }
.social-icon { display: block; flex: none; width: 20px; height: 20px; }
.footer__social { flex-direction: column; margin-top: 4px; }

.footer__legal {
  display: grid;
  gap: 24px;
  margin-top: 32px;
  padding-top: 32px;
  border-top: 2px solid var(--line);
}
/* EU emblem (docs/07 P1-9): the official colour files, never recoloured, no plate. Dark footer: negative version
   (white text, the flag keeps its white border); light footer (#ffffff): positive version. Both are <img> with alt,
   the hidden one is display:none (out of the accessibility tree, and as loading="lazy" never fetched on screen).
   Clear space >= 1/4 of the emblem height (200px wide: 11px, 240px: 13px) comes from the layout, not from padding:
   32px above (.footer__legal padding-top), 24px (mobile) or 32px (column gap) to the disclaimer, the container
   gutter to the left. Print and forced colours show the positive version on white, see the two blocks below. */
.eu-emblem { justify-self: start; line-height: 0; }
.eu-emblem__img { display: block; width: 200px; height: auto; }
.eu-emblem__img--pos { display: none; }
.light .eu-emblem__img--pos { display: block; }
.light .eu-emblem__img--neg { display: none; }
@media print {
  .eu-emblem .eu-emblem__img--pos { display: block; }
  .eu-emblem .eu-emblem__img--neg { display: none; }
}
@media (forced-colors: active) {
  .eu-emblem { forced-color-adjust: none; padding: 13px; background-color: #ffffff; }
  .eu-emblem .eu-emblem__img--pos { display: block; }
  .eu-emblem .eu-emblem__img--neg { display: none; }
}
.footer__legal-text { display: grid; gap: 12px; }
.footer__legal-text strong { color: var(--fg); }
.footer__end {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 24px;
  margin-top: 24px;
  color: var(--fg-muted);
}
.footer__end a { color: var(--fg); text-underline-offset: 4px; }
/* Licence (Andi 30.10.): the official CC BY-SA badge (88 x 31, own colours, never recoloured) and the line in one
   link; the image is decorative (alt ""), the text names the licence once. Underline only on the licence name,
   the focus ring (global :focus-visible) goes round the whole link; 44px tall as a target. */
.footer__end .footer__license { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--fg-muted); text-decoration: none; }
.footer__license-badge { display: block; flex: none; width: 88px; height: 31px; }
.footer__license-name { color: var(--fg); text-decoration: underline; text-underline-offset: 4px; white-space: nowrap; }
@media (hover: hover) { .footer__license:hover .footer__license-name { text-decoration-thickness: 2px; } }
.footer__license:focus-visible .footer__license-name { text-decoration-thickness: 2px; }

@media (min-width: 1024px) {
  .site-footer { padding-block: 80px 48px; }
  .footer__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .footer__brand { grid-column: 1 / span 4; }
  .footer__col--explore { grid-column: 5 / span 2; }
  .footer__col--project { grid-column: 7 / span 2; }
  .footer__col--legal { grid-column: 9 / span 2; }
  .footer__contact { grid-column: 11 / span 2; }
  .footer__legal { grid-template-columns: auto minmax(0, 1fr); column-gap: 32px; align-items: start; }
  .eu-emblem__img { width: 240px; }
}

/* 16 Motion, reduced motion, no-JS, forced colors, print ------------------- */
@keyframes gob-rise {
  from { opacity: 0; transform: translateY(var(--rise-distance, 8px)); }
  to { opacity: 1; transform: none; }
}
@keyframes gob-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes gob-icon-swap {
  from { opacity: 0; transform: rotate(-20deg) scale(0.92); }
  to { opacity: 1; transform: none; }
}
@keyframes gob-theme-wipe {
  from { clip-path: inset(0 0 100% 0); }
  to { clip-path: inset(0); }
}
@keyframes gob-pop-in {
  0% { opacity: 0; transform: scale(0.9); }
  70% { opacity: 1; transform: scale(1.04); }
  100% { transform: scale(1); }
}

/* Narration (docs/04 4): GSAP owns every scroll reveal and sets the start state itself, only below the first
   viewport and only as opacity. CSS has no hidden state for content, so without GSAP everything stands.
   html.reveal-on is set by motion.js once the reveal system runs; progress bars then fill 420ms after their card. */
.reveal-on [data-reveal]:not([data-revealed]) .progress__fill,
.reveal-on [data-reveal]:not([data-revealed]) .roadmap__lime { transform: translateX(-100%); }
@media (max-width: 767.98px) {
  .reveal-on [data-reveal]:not([data-revealed]) .roadmap__lime { transform: translateY(-100%); }
}

/* Hero Kiko rises from behind the start field (docs/04 10.3), in CSS so it needs no library (docs/07 N-1). Hidden
   before the first paint only while motion.js can still show it: theme-boot drops html.js on `load` if it never ran.
   Fill mode `backwards` only: after the rise, board.js may hide this Kiko inline when the moving one takes over. */
@media (prefers-reduced-motion: no-preference) {
  .js:not(.motion-off):not(.kiko-ready) .hero__kiko { opacity: 0; }
  .kiko-rise .hero__kiko { animation: gob-kiko-rise 840ms var(--ease-out-strong) backwards; }
}
/* Path start (docs/03 15, Andi 30.10.): with the 3D hero the page path below the plate (field-1 stub, first SVG stretch)
   waits for the first scroll, then motion.js draws it by length after the plate's exit strip (html.path-draw: clip on
   the stub, dash array on the SVG stretch). Before motion.js runs it is hidden as well (theme-boot drops .js/.hero-3d
   if it never runs). Poster path, fallback and below 1024px: it stands. */
@media (min-width: 1024px) {
  .js.hero-3d:not(.kiko-ready) .board-step[data-field="1"]::before,
  .js.hero-3d:not(.kiko-ready) .board__seg--gap,
  .hero-3d.path-wait .board-step[data-field="1"]::before,
  .hero-3d.path-wait .board__seg--gap,
  .hero-3d.path-draw .board__seg--gap:not([data-grow]) { visibility: hidden; }
  .hero-3d.path-draw .board-step[data-field="1"]::before { clip-path: inset(0 0 calc(100% - var(--path-grow, 0) * 100%) 0); }
}
@keyframes gob-kiko-rise {
  from { opacity: 0; transform: translateY(35%); }
  60% { opacity: 1; }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: no-preference) {
  /* World switch (docs/04 A7, docs/08): text and island fade, the pose rises 24px onto the corner 60ms later, the old panel is gone at once */
  .js .world-panel[data-active][data-switched]:not([data-instant]) .world-text {
    animation: gob-fade var(--duration-fade) var(--ease-out-strong) both;
  }
  .js .world-panel[data-active][data-switched]:not([data-instant]) .world-kiko {
    --rise-distance: 24px;
    animation: gob-rise var(--duration-base) var(--ease-out-strong) 60ms both;
  }
  /* the new island fades up out of its own sky (the frame carries it), its float starts with it */
  html.js:not(.motion-off) .world-panel[data-active][data-switched]:not([data-instant]) .world-island__img {
    animation: gob-fade var(--duration-slow) var(--ease-out-strong) both, gob-island-float 7s ease-in-out infinite alternate;
  }
}

/* Page change (docs/04 11.5): cross-document view transitions, all six pages share site.css, so both sides opt in.
   The old page stands still, the new one lies down over it (fade 260ms, rise 24px in 420ms), the header stands. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
.site-header { view-transition-name: site-header; }
html.vt-theme .site-header { view-transition-name: none; }        /* theme: the header wipes with the page */

@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root), ::view-transition-new(root) { mix-blend-mode: normal; }   /* a plain cover */
  ::view-transition-old(root) { animation: none; }
  ::view-transition-new(root) {
    animation: gob-fade var(--duration-base) var(--ease-out-strong) both,
               gob-page-rise var(--duration-slow) var(--ease-out-strong) both;
  }
  ::view-transition-group(site-header) { animation-duration: var(--duration-base); animation-timing-function: var(--ease-out-strong); }
  ::view-transition-old(site-header) { animation: none; opacity: 0; }
  ::view-transition-new(site-header) { animation: none; }

  /* Theme switch as a wipe from the top (docs/04 6.4, curve after 06 R3 49): only while html.vt-theme */
  html.vt-theme::view-transition-new(root) { animation: gob-theme-wipe var(--duration-slow) var(--ease-out-strong) both; }
}
@keyframes gob-page-rise { from { transform: translateY(24px); } }

/* Theme switch: page colours change without trailing transitions (docs/04 3.3).
   Exempt: the hero and the band (poster cross-fade, canvas); the hero's sky itself no longer changes (docs/03 17). */
html.theme-switching *:not(.hero, .hero__band, .hero__band *),
html.theme-switching *:not(.hero, .hero__band, .hero__band *)::before,
html.theme-switching *:not(.hero, .hero__band, .hero__band *)::after { transition: none !important; }

/* Global reduced-motion rule, app 1:1 (docs/04 2.4) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
/* Test switch ?motion=off (theme-boot sets html.motion-off): same as reduced motion */
.motion-off *, .motion-off *::before, .motion-off *::after {
  animation-duration: 0.01ms !important;
  animation-delay: 0ms !important;
  transition-duration: 0.01ms !important;
  scroll-behavior: auto !important;
}
.motion-off .progress__fill { transform: translateX(calc(var(--p, 0%) - 100%)) !important; }

@media (forced-colors: active) {
  body::after { display: none; }
  .btn, .icon-btn, .chip, .card, .stat, .answer, .world-tab, .icon-tile, .field { box-shadow: none; border: 2px solid CanvasText; }
  .pillar, .reset-band { border-top: 2px solid CanvasText; }
  .progress__fill { background-color: Highlight; }
  /* States that otherwise live in colour or a hidden radio (docs/05 M2) */
  .answer:has(:checked) { border: 4px solid Highlight; }
  .world-tab[aria-selected="true"] { forced-color-adjust: none; border-color: Highlight; background-color: Highlight; color: HighlightText; box-shadow: none; }
  .site-nav__link[aria-current]::after { forced-color-adjust: none; background-color: CanvasText; }
}

@media print {
  body::after, .board, .board-step::before, .board-kiko { display: none !important; }
  .site-header { position: static; }
  .hero { margin-top: 0; }
  .hero__canvas, .menu-button, .theme-toggle, .skip-link { display: none !important; }
  .hero__poster, .hero__kiko { visibility: visible !important; opacity: 1 !important; }
  .pillar { position: static !important; transform: none !important; min-height: 0 !important; }
  .js .world-panel:not([data-active]) { display: grid; }
  /* Content not yet scrolled to still prints: reveals stand finished (Bau-Runde 9, two login groups on #demo) */
  [data-reveal], [data-reveal="lines"] * { opacity: 1 !important; transform: none !important; clip-path: none !important; }
}

/* ==========================================================================
   17 Subpages: demo.html, project.html, legal pages
   Same layout language, dials 4/4/5 (docs/01 2.6, R3-U1 to U3): the new type scale, pill buttons, frames only for
   app quotes and logo slots, no board path. demo.html carries the goal field, project.html the roadmap path.
   ========================================================================== */

/* 17.1 Page head: surface band, H1 in the subpage size */
.page-head {
  position: relative;
  padding-block: 48px 40px;
  background-color: var(--surface);
  border-bottom: 2px solid var(--line);
}
.h1 {
  font-size: var(--text-h1-sub);
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: 20ch;
}
.page-head .lead { margin-top: var(--h2-gap); }
.page-head__grid { display: grid; gap: 16px; }
.page-head__title-row { display: flex; align-items: center; gap: 20px; }
.page-head__title-row .field { --field: 64px; }
.jump-nav { margin-top: 32px; }
.jump-nav__list { display: flex; flex-wrap: wrap; gap: 4px 12px; list-style: none; }
.page-head__kiko-wrap { display: flex; justify-content: flex-end; align-items: flex-end; margin-bottom: -42px; }
.page-head__kiko { height: 120px; width: auto; }

@media (min-width: 1024px) {
  .page-head { padding-block: 80px 64px; }
  .page-head--kiko .page-head__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: end; }
  .page-head--kiko .page-head__text { grid-column: 1 / span 8; }
  .page-head__kiko-wrap { grid-column: 10 / span 3; justify-content: center; margin-bottom: -66px; }
  .page-head__kiko { height: 200px; }
}

/* 17.2 Subpage sections: density 5 */
.section--sub { padding-block: 32px; }
.subpage > .section--sub:last-child { padding-bottom: 80px; }
.subpage > .page-head + .section--sub { padding-top: 48px; }
.h2--sub { font-size: clamp(1.75rem, 1.4rem + 1.43vw, 2.75rem); line-height: 1.1; letter-spacing: -0.015em; max-width: 24ch; }
.section--sub .section__head + * { margin-top: 32px; }
.group-title { font-size: var(--text-h3); line-height: 1.25; }
.group-title + * { margin-top: 16px; }
.entry-title { font-size: var(--text-h3); line-height: 1.25; font-weight: 800; letter-spacing: 0; max-width: 34ch; }

@media (min-width: 768px) {
  .section--sub { padding-block: 40px; }
}
@media (min-width: 1024px) {
  .section--sub { padding-block: 56px; }
  .subpage > .page-head + .section--sub { padding-top: 72px; }
  .subpage > .section--sub:last-child { padding-bottom: 120px; }
  .section--sub .section__head + * { margin-top: 40px; }
}

/* Placeholder slot (logos, images): a drawn surface, never a broken image frame */
.slot {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  padding: 12px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background-color: var(--surface-raised);
  color: var(--fg-muted);
  text-align: center;
}
.slot > .icon { width: 28px; height: 28px; }
.partner .slot > .icon { width: 24px; height: 24px; }
/* One status chip per section, next to the H2 (docs/06 4) */
.section__title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding-bottom: 3px; }
.slot > img { width: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.chip--wrap { white-space: normal; padding-block: 6px; }

/* Open lists: a 2px line above every entry instead of a card (R3-U2) */
.fact, .partner, .meeting, .entry, .report { border-top: 2px solid var(--line); }

/* 17.3 project.html: facts as an open row (Geist Mono, no counting up) */
.facts { display: grid; gap: 32px 24px; }
.fact {
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding-top: 24px;
}
.fact__value {
  order: -1;
  margin-bottom: 12px;
  font-size: min(var(--text-mono-lg), 19cqi);   /* capped by the column so "€400,000" never overflows */
  line-height: 1;
  letter-spacing: -0.03em;
  white-space: nowrap;
}
.fact__label { font-weight: 800; }
.fact__note { color: var(--fg-muted); }
.fact__note .chip { margin-top: 8px; }
.facts-meta { margin-top: 32px; }

/* From 600 one row of equal columns for the facts that are shown (three since Bau-Runde 9): a fact parked with
   hidden leaves no empty column; the value is capped by its column (19cqi) */
@media (min-width: 600px) { .facts { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); } }

/* 17.4 Roadmap in the board's grammar (docs/01 2.6): a 16px path with round ends through four 40px fields, lime up
   to 2026. Rows have equal height (1fr), so the last field always sits at 75 % of the list: the path spans 75 %,
   the lime part one step (a third of it). Vertical below 768px. */
.roadmap { position: relative; }
.roadmap__list { display: grid; grid-auto-rows: 1fr; list-style: none; }
.roadmap__step { position: relative; z-index: 1; display: grid; justify-items: start; align-content: start; gap: 4px; padding: 6px 0 32px 64px; }
.roadmap__field { --field: 40px; position: absolute; top: 0; left: 0; }
.roadmap__step--done .field__fill, .roadmap__step--current .field__fill {
  opacity: 1;
  transition: opacity var(--duration-fast) var(--ease-out-strong) calc(var(--duration-slow) + var(--duration-progress));
}
.reveal-on .roadmap:not([data-revealed]) .field__fill { opacity: 0; }   /* the fields fill after the path (docs/04 10.6) */
.roadmap__year { font-size: var(--text-h3); line-height: 1.25; }
.roadmap__label { font-weight: 800; }
.roadmap__step .chip { margin-top: 6px; }
.roadmap__path {
  position: absolute;
  top: 20px; left: 12px;
  width: 16px; height: 75%;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background-color: var(--line);
}
.roadmap__lime {
  position: absolute;
  inset: 0 0 auto 0;
  height: calc(100% / 3);
  border-radius: var(--radius-pill);
  background-color: var(--lime);
  transition: transform var(--duration-progress) var(--ease-out-strong) var(--duration-slow);
}
@media (min-width: 768px) {
  .roadmap__list { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); grid-auto-rows: auto; }
  .roadmap__step { padding: 64px 16px 0 0; }
  .roadmap__path { top: 12px; left: 20px; width: 75%; height: 16px; }
  .roadmap__lime { inset: 0 auto 0 0; width: calc(100% / 3); height: auto; }
}

/* 17.5 Partners: an open grid, the logo slot stays framed (docs/02 D2). The associated partner (OST) is a full card
   of the same grid in its own row, so every slot has the same size: card width x 120px (Andi, 14.10.) */
.partners, .associate { display: grid; gap: 0 24px; list-style: none; }
.partner { display: flex; flex-direction: column; gap: 6px; padding: 24px 0 32px; }
.partner .slot { height: 120px; margin-bottom: calc(12px + var(--edge-rest)); }   /* one height and gap for plates and empty slots: the H3s of a row line up */
.partner .slot:not(:has(img)) { background: transparent; border: 2px dashed var(--line-strong); box-shadow: none; }   /* R2 39 */
/* Logo plate (r3q): white in both themes, because several partner files bring a white ground; logos are never
   recoloured or filtered. 2px --line-strong (>= 3:1 against the plate and against --bg in both themes) plus the
   4px print edge, as on the board fields (docs/01 2.0: logo slots keep the edge). One scale rule for every format
   (wide, square, portrait): at most 82 % of the plate's width and 72 % of its height, ratio kept, centred. */
.partner .slot--logo {
  position: relative;
  display: block;
  padding: 0;
  border-color: var(--line-strong);
  background-color: #ffffff;
  box-shadow: 0 var(--edge-rest) 0 0 var(--edge);
}
.slot--logo > img {
  position: absolute;
  inset: 0;
  display: block;
  width: auto;
  height: auto;
  max-width: 82%;
  max-height: 72%;
  margin: auto;
  object-fit: contain;
}
/* Forced colours would turn the plate into Canvas (black in dark contrast themes) and hide dark wordmarks: keep it white */
@media (forced-colors: active) { .partner .slot--logo { forced-color-adjust: none; background-color: #ffffff; } }
.partner__meta { color: var(--fg-muted); }
.partner__role { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.associate { margin-top: 24px; }
.associate .partner .chip { align-self: flex-start; }

@media (min-width: 768px) {
  .partners, .associate { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) { .partners, .associate { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* 17.6 Meetings: a date list, rows divided by the line */
.meetings { list-style: none; }
.meeting { display: grid; gap: 6px 24px; padding-block: 24px; }
.meeting__date { font-weight: 800; }
.meeting__body { display: grid; justify-items: start; gap: 6px; }
.meeting__body p { color: var(--fg-muted); }
@media (min-width: 768px) {
  .meeting { grid-template-columns: 12rem minmax(0, 1fr); }
}

/* 17.7 Updates: news (cols 1-8) and social (cols 9-12) as lists, no embeds */
.updates { display: grid; gap: 48px; }
.entries { display: grid; gap: 0 24px; list-style: none; }
.entry { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding-block: 24px; }
.entry p { color: var(--fg-muted); }
.entry__media { align-self: stretch; aspect-ratio: 16 / 9; margin-bottom: 8px; }
@media (min-width: 768px) {
  .entries--news { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .entry--lead { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); column-gap: 24px; align-content: start; justify-items: start; }
  .entry--lead .entry__media { grid-row: 1 / span 5; align-self: start; width: 100%; aspect-ratio: 4 / 3; margin-bottom: 0; }
}
@media (min-width: 1024px) {
  .updates { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; }
  .updates__news { grid-column: 1 / span 8; }
  .updates__social { grid-column: 9 / span 4; }
}

/* 17.8 Gallery: 4:3 slots, caption below the image (docs/02 D2) */
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; list-style: none; }
.gallery .slot { aspect-ratio: 4 / 3; }
@media (max-width: 767.98px) { .gallery > li:first-child { grid-column: 1 / -1; } } /* three slots: one wide, two below (docs/06 4) */
.gallery figcaption { margin-top: 10px; color: var(--fg-muted); line-height: 1.5; }
@media (min-width: 768px) { .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 24px; } }

/* 17.9 Reports: rows divided by the line */
.reports { display: grid; list-style: none; }
.report { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 16px; align-items: center; padding-block: 20px; }
.report .icon-tile { grid-row: span 2; margin-bottom: 0; }
.report__meta { color: var(--fg-muted); }
.report__status { grid-column: 2; justify-self: start; margin-top: 8px; }
@media (min-width: 768px) {
  .report { grid-template-columns: auto minmax(0, 1fr) auto; }
  .report__status { grid-column: 3; grid-row: 1 / span 2; margin-top: 0; }
}

/* 17.10 demo.html: reset band, open start row, role bands (credentials left, "what you can try" right), FAQ */
.demo-intro .reset-band { margin-top: 0; }
.subpage > .page-head + .demo-intro { padding-top: 0; }   /* R2 42 */
.role-panels { display: grid; }
.role-panel {
  --role: var(--lime);
  --panel-ink: var(--lime-ink);
  position: relative;
  display: grid;
  gap: 24px;
  padding: 40px 0 40px 32px;
  scroll-margin-top: 16px;
}
.role-panel + .role-panel { border-top: 2px solid var(--line); }
.demo-intro + .section--sub { padding-top: 0; }
.role-panel::before {
  content: "";
  position: absolute;
  left: 0; top: 40px; bottom: 40px;
  width: 8px;
  border-radius: var(--radius-pill);
  background-color: var(--role);
}
.role-panel--teal { --role: var(--teal); --panel-ink: var(--teal-ink); }
.role-panel--orange { --role: var(--orange); --panel-ink: var(--orange-ink); }
.role-panel--lime { --role: var(--lime); --panel-ink: var(--lime-ink); }
.role-panel--magenta { --role: var(--magenta); --panel-ink: var(--magenta-ink); }
.role-panel--yellow { --role: var(--yellow); --panel-ink: var(--yellow-ink); }
.role-panel--neutral { --role: var(--line-strong); --panel-ink: var(--fg-muted); }
.role-panel__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.role-panel__access > p { margin-top: 12px; color: var(--fg-muted); max-width: 40ch; }
.role-panel__access .creds { margin-top: 20px; }
.role-panel__access .login__open { margin-top: 24px; }
/* Group titles as in the app (Bau-Runde 9 A5): "Play as a trainee" above four panels, "See the admin side" above two */
.role-group__title { max-width: none; padding-top: 40px; }
.role-panel + .role-group__title { margin-top: 24px; padding-top: 56px; border-top: 2px solid var(--line); }
.role-panel__try .check-list { margin-top: 12px; }
.role-panel__try .check-list .icon { color: var(--panel-ink); }
@media (min-width: 768px) {
  .role-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
}
@media (min-width: 1024px) {
  .role-panel { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; padding: 56px 0 56px 48px; }
  .role-panel::before { top: 56px; bottom: 56px; }
  .role-panel__access { grid-column: 1 / span 5; }
  .role-panel__try { grid-column: 7 / span 6; }
}

/* FAQ: native <details>, framed because it is interactive (R3-U1); no height animation */
.faq { display: grid; gap: 16px; max-width: 48rem; }
.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 12px 20px;
  border-radius: calc(var(--radius-card) - 2px);
  font-weight: 800;
  line-height: 1.35;
  list-style: none;
  cursor: pointer;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary .icon { width: 20px; height: 20px; color: var(--fg-muted); }
.faq__item[open] summary .icon { rotate: 180deg; }
.faq__item summary:focus-visible { outline-offset: -4px; }
.faq__answer { padding: 0 20px 20px; color: var(--fg-muted); max-width: 65ch; }
.faq__answer a { color: var(--fg); text-underline-offset: 4px; text-decoration-color: var(--line-strong); }
@media (hover: hover) {
  .faq__item summary:hover { background-color: var(--surface-raised); }
  .faq__answer a:hover { text-decoration-color: currentColor; }
}

/* 17.11 Legal pages: one reading column, 65ch, no reveals (docs/02 D3) */
.prose { max-width: 65ch; }
.prose > * + * { margin-top: 16px; }
.prose > h2 {
  margin-top: 48px;
  font-size: clamp(1.5rem, 1.29rem + 0.86vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
}
.prose > :first-child { margin-top: 0; }
.prose ul { padding-left: 1.25em; list-style: disc; }
.prose li + li { margin-top: 6px; }
.prose li::marker { color: var(--fg-muted); }
.prose strong { font-weight: 800; }
.prose a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-decoration-color: var(--line-strong);
  transition: text-decoration-color var(--duration-fast) var(--ease-out-strong);
}
@media (hover: hover) { .prose a:hover { text-decoration-color: currentColor; } }

@media (forced-colors: active) {
  .slot { box-shadow: none; border: 2px solid CanvasText; }
}
/* End of section 17 */
