/* Design tokens, generated from the Deutora design system's tokens.json. */
:root {
  color-scheme: light dark;
  --bg: #f6f3ec;
  --surface: #ffffff;
  --surface-sunken: #ece7dc;
  --border: #e2dccf;
  --border-input: #8c8678;
  --lip: #d6cfbf;
  --ink: #1b1d3a;
  --ink-muted: #5b5d74;
  --ink-disabled: #a8a293;
  --on-bright: #1b1d3a;
  --scrim: rgba(18, 20, 42, 0.5);
  --focus: #1b1d3a;
  --brand: #ffc52e;
  --brand-lip: #bf9422;
  --brand-soft: #fff0c2;
  --brand-strong: #8a5a00;
  --success: #4ed36b;
  --success-lip: #3a9e50;
  --success-soft: #e3f6e6;
  --success-ink: #16692c;
  --mistake: #ff6b5a;
  --mistake-lip: #bf5044;
  --mistake-soft: #ffe8e3;
  --mistake-ink: #ad2a1f;
  --genus-der: #2f62e0;
  --genus-die: #d0346d;
  --genus-das: #0c8a68;
  --genus-plural: #676b84;
  --line-u0: #3ccfb4;
  --line-u1: #8b93ff;
  --line-u2: #45b8f5;
  --line-u3: #5ad69a;
  --line-u4: #ff9b4a;
  --line-u5: #ffd23f;
  --line-u6: #ff7ab8;
  --line-u7: #b39dff;
  --line-u8: #ff8577;
  --line-u9: #b5e550;
  --line-u10: #d38cff;
  --line-u11: #37d3ea;
  --line-u12: #ff8fa3;
  --cast-lena: #9b7eff;
  --cast-lena-soft: #eee8ff;
  --cast-wagner: #3a9fbb;
  --cast-wagner-soft: #def1f5;
  --cast-mia: #ff9a45;
  --cast-mia-soft: #ffecd9;
  --cast-jonas: #b98450;
  --cast-jonas-soft: #f4e9dc;
  --cast-mehmet: #7fb03a;
  --cast-mehmet-soft: #eaf4da;
  --cast-karl: #8391ab;
  --cast-karl-soft: #e7eaf0;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-station: 88px;
  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 20px;
  --radius-xl: 28px;
  --radius-pill: 999px;
  --depth-1: 2px;
  --depth-2: 4px;
  --depth-3: 6px;
  --size-touch: 48px;
  --size-button: 56px;
  --size-station: 64px;
  --size-line: 10px;
  --size-avatar-s: 32px;
  --size-avatar-m: 56px;
  --size-avatar-l: 96px;
  --duration-press: 90ms;
  --duration-quick: 160ms;
  --duration-sheet: 280ms;
  --duration-cheer: 450ms;
  --duration-travel: 700ms;
  --easing-standard: cubic-bezier(0.2, 0, 0, 1);
  --easing-pop: cubic-bezier(0.34, 1.56, 0.64, 1);
  --easing-sheet: cubic-bezier(0.32, 0.72, 0, 1);
  --easing-cheer: cubic-bezier(0.18, 1.7, 0.4, 1);
  --shadow-sheet: 0 -8px 24px rgba(27, 29, 58, 0.10);
  --shadow-float: 0 12px 32px rgba(27, 29, 58, 0.16);
  --font-display: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
  --font-text: "Figtree", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12142a;
    --surface: #1c1f3b;
    --surface-sunken: #272b4a;
    --border: #363c62;
    --border-input: #767ca3;
    --lip: #0c0e20;
    --ink: #f3f1ea;
    --ink-muted: #aeb1cb;
    --ink-disabled: #5c6185;
    --scrim: rgba(0, 0, 0, 0.6);
    --focus: #ffc52e;
    --brand-soft: #3d3415;
    --brand-strong: #ffd766;
    --success-soft: #15331f;
    --success-ink: #86e39f;
    --mistake-soft: #3e1b18;
    --mistake-ink: #ff9f93;
    --genus-der: #7ea4ff;
    --genus-die: #ff82b6;
    --genus-das: #43d1a5;
    --genus-plural: #a7abc6;
    --cast-lena-soft: #2d2652;
    --cast-wagner-soft: #163640;
    --cast-mia-soft: #3f2a17;
    --cast-jonas-soft: #372a1e;
    --cast-mehmet-soft: #25331a;
    --cast-karl-soft: #292e3b;
    --shadow-sheet: 0 -8px 24px rgba(0, 0, 0, 0.45);
    --shadow-float: 0 12px 32px rgba(0, 0, 0, 0.55);
  }
}

/* Type: Bricolage Grotesque and Figtree (SIL OFL 1.1), subset to Latin, served from this site. */
@font-face { font-family: "Bricolage Grotesque"; font-weight: 700; font-display: swap; src: url("/fonts/bricolage_bold.ttf") format("truetype"); }
@font-face { font-family: "Bricolage Grotesque"; font-weight: 800; font-display: swap; src: url("/fonts/bricolage_extrabold.ttf") format("truetype"); }
@font-face { font-family: "Figtree"; font-weight: 500; font-display: swap; src: url("/fonts/figtree_medium.ttf") format("truetype"); }
@font-face { font-family: "Figtree"; font-weight: 600; font-display: swap; src: url("/fonts/figtree_semibold.ttf") format("truetype"); }
@font-face { font-family: "Figtree"; font-weight: 700; font-display: swap; src: url("/fonts/figtree_bold.ttf") format("truetype"); }
@font-face { font-family: "Figtree"; font-weight: 800; font-display: swap; src: url("/fonts/figtree_extrabold.ttf") format("truetype"); }

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; overflow-x: clip; background: var(--bg); color: var(--ink); font: 500 16px/24px var(--font-text); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, figure, blockquote { margin: 0; }
img, svg { display: block; max-width: 100%; }
a { color: var(--brand-strong); font-weight: 700; text-underline-offset: 3px; }
:where(.dt-press, button, a, input, [tabindex]):focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.wrap { width: min(100% - 32px, 1160px); margin-inline: auto; }
.label { text-transform: uppercase; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; z-index: 10; left: 16px; top: -100px; padding: 10px 16px; border-radius: var(--radius-m); background: var(--brand); color: var(--on-bright); text-decoration: none; }
.skip:focus { top: 12px; }
html:not(.js) [data-clips] { visibility: hidden; }

/* Wayfinding components, after the Deutora design system (dt- classes). */
.dt-icon { width: 24px; height: 24px; flex: none; fill: currentColor; }

.dt-press { --lip-h: var(--depth-2); --lip-c: var(--lip); position: relative; box-shadow: 0 var(--lip-h) 0 var(--lip-c); margin-bottom: var(--lip-h); cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform var(--duration-press) var(--easing-standard), box-shadow var(--duration-press) var(--easing-standard), background-color var(--duration-quick) var(--easing-standard), border-color var(--duration-quick) var(--easing-standard); }
@media (hover: hover) { .dt-press:hover { transform: translateY(-1px); box-shadow: 0 calc(var(--lip-h) + 1px) 0 var(--lip-c); } }
.dt-press:active { transform: translateY(var(--lip-h)); box-shadow: 0 0 0 var(--lip-c); }

.dt-btn { appearance: none; border: 0; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-height: var(--size-button); padding: 0 var(--space-6); border-radius: var(--radius-l); background: var(--brand); color: var(--on-bright); --lip-c: var(--brand-lip); font: 700 16px/24px var(--font-text); text-decoration: none; white-space: nowrap; }
.dt-btn--s { min-height: 44px; padding: 0 var(--space-4); border-radius: var(--radius-m); font-size: 15px; }
.dt-btn--secondary { background: var(--surface); color: var(--ink); border: 2px solid var(--border); --lip-c: var(--lip); }
.dt-btn--mistake { background: var(--mistake); --lip-c: var(--mistake-lip); }
.dt-btn__en { font: 600 12px/14px var(--font-text); }

.dt-tag { display: inline-flex; align-items: center; gap: 6px; justify-self: start; padding: 4px 10px; border-radius: var(--radius-s); font: 800 12px/16px var(--font-text); letter-spacing: 0.08em; text-transform: uppercase; }
.dt-tag--new { background: var(--brand-soft); color: var(--brand-strong); }

.dt-card { background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius-xl); box-shadow: 0 var(--depth-2) 0 var(--lip); margin-bottom: var(--depth-2); }

.dt-audio { appearance: none; border: 0; padding: 0; display: grid; place-items: center; width: 48px; height: 48px; border-radius: var(--radius-m); background: var(--brand); color: var(--on-bright); --lip-c: var(--brand-lip); }
.dt-audio .dt-icon { width: 26px; height: 26px; }
.dt-audio--slow { width: auto; display: inline-flex; align-items: center; gap: 6px; padding: 0 14px 0 10px; border-radius: var(--radius-pill); background: var(--surface); color: var(--ink); border: 2px solid var(--border); --lip-c: var(--lip); font: 700 15px/1 var(--font-text); }
.dt-audio--slow .dt-icon { width: 22px; height: 22px; }
.dt-audio.is-playing::after { content: ""; position: absolute; inset: -7px; border-radius: 20px; border: 3px solid var(--brand); pointer-events: none; animation: dt-pulse 1100ms var(--easing-standard) infinite; }
.dt-audio--slow.is-playing::after { border-radius: var(--radius-pill); }
@keyframes dt-pulse { from { opacity: 0.9; transform: scale(0.96); } to { opacity: 0; transform: scale(1.12); } }

.dt-bubble { background: var(--bubble, var(--surface)); border-radius: var(--radius-l) var(--radius-l) var(--radius-l) 6px; padding: 10px 14px 12px; }
.dt-bubble__text { display: block; font: 600 18px/26px var(--font-text); color: var(--ink); }
.dt-bubble__en { display: block; margin-top: 2px; font: 500 14px/20px var(--font-text); color: var(--ink-muted); }

.dt-genus { display: inline-flex; align-items: center; gap: 0.32em; white-space: nowrap; }
.dt-genus__article { font-weight: 800; }
.dt-genus__mark { position: relative; flex: none; display: inline-block; width: 0.62em; height: 0.62em; }
.dt-genus--der .dt-genus__mark { background: var(--genus-der); border-radius: 50%; }
.dt-genus--die .dt-genus__mark { background: var(--genus-die); border-radius: 0.08em; transform: rotate(45deg) scale(0.86); }
.dt-genus--das .dt-genus__mark { background: var(--genus-das); clip-path: polygon(50% 2%, 100% 94%, 0 94%); width: 0.7em; }
.dt-genus--plural .dt-genus__mark { width: 0.98em; }
.dt-genus--plural .dt-genus__mark::before, .dt-genus--plural .dt-genus__mark::after { content: ""; position: absolute; top: 0.1em; width: 0.42em; height: 0.42em; border-radius: 50%; background: var(--genus-plural); }
.dt-genus--plural .dt-genus__mark::before { left: 0; }
.dt-genus--plural .dt-genus__mark::after { right: 0; }

.dt-sheet { display: grid; gap: var(--space-3); padding: var(--space-5) var(--space-4) var(--space-4); background: var(--mistake-soft); border-radius: var(--radius-xl); box-shadow: var(--shadow-float); }
.dt-sheet__head { display: flex; align-items: center; gap: var(--space-3); }
.dt-sheet__badge { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--mistake); color: var(--on-bright); }
.dt-sheet__title { font: 700 24px/32px var(--font-display); color: var(--mistake-ink); }
.dt-sheet__en { display: block; font: 600 12px/14px var(--font-text); color: var(--ink-muted); }
.dt-sheet__label { display: block; font: 700 13px/18px var(--font-text); color: var(--ink-muted); }
.dt-sheet__answer { font: 600 18px/26px var(--font-text); color: var(--ink); }
.dt-sheet__answer b { font-weight: 800; text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 4px; }
.dt-sheet__answer s { color: var(--mistake-ink); text-decoration-thickness: 2px; }
.dt-sheet__rule { font: 500 16px/24px var(--font-text); color: var(--ink); }
.dt-sheet__actions { display: flex; gap: var(--space-3); margin-top: var(--space-1); }
.dt-sheet__actions .dt-btn { flex: 1; cursor: default; }
.dt-sheet__actions .dt-btn--mistake { flex: 1.6; }

.dt-keys { display: inline-flex; gap: var(--space-2); padding: var(--space-2) var(--space-2) var(--space-3); background: var(--surface-sunken); border-radius: var(--radius-m); }
.dt-key { width: 44px; height: var(--size-touch); border-radius: var(--radius-m); background: var(--surface); color: var(--ink); border: 2px solid var(--border); box-shadow: 0 var(--depth-1) 0 var(--lip); display: grid; place-items: center; font: 600 21px/1 var(--font-text); }

/* What the app shows after you speak: the line it heard, then Klar or Nochmal, never per-word marks */
.said { display: grid; gap: 10px; justify-items: start; }
.said__heard { --bubble: var(--surface-sunken); }
.said__band { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 10px; border-radius: var(--radius-m); background: var(--success-soft); color: var(--success-ink); font: 700 15px/20px var(--font-text); }

.dt-field { display: grid; gap: 6px; min-width: 0; border: 0; margin: 0; padding: 0; }
.dt-field__label { padding: 0; font: 700 15px/20px var(--font-text); color: var(--ink); }
.dt-input { width: 100%; height: var(--size-button); padding: 0 16px; border: 2px solid var(--border-input); border-radius: var(--radius-m); background: var(--surface); color: var(--ink); font: 500 17px/24px var(--font-text); }

.dt-linesign { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--radius-l); background: var(--line); color: var(--on-bright); box-shadow: 0 var(--depth-2) 0 color-mix(in srgb, var(--line) 75%, #000); margin-bottom: var(--depth-2); }
.dt-linesign__bullet { flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--on-bright); color: var(--line); display: grid; place-items: center; font: 800 22px/1 var(--font-display); font-variant-numeric: tabular-nums; }
.dt-linesign__text { min-width: 0; }
.dt-linesign__title { display: block; font: 800 19px/24px var(--font-display); }
.dt-linesign__sub { display: block; font: 600 13px/18px var(--font-text); }
.dt-linesign__tag { display: inline-block; padding: 0 6px; margin-left: 6px; border-radius: 5px; background: var(--on-bright); color: var(--line); font: 800 11px/16px var(--font-text); vertical-align: 2px; }

/* Line colours, by unit */
.l0 { --line: var(--line-u0); } .l1 { --line: var(--line-u1); } .l2 { --line: var(--line-u2); } .l3 { --line: var(--line-u3); }
.l4 { --line: var(--line-u4); } .l5 { --line: var(--line-u5); } .l6 { --line: var(--line-u6); } .l7 { --line: var(--line-u7); }
.l8 { --line: var(--line-u8); } .l9 { --line: var(--line-u9); } .l10 { --line: var(--line-u10); } .l11 { --line: var(--line-u11); }
.l12 { --line: var(--line-u12); }

/* Cast colours: soft grounds behind a character, and their ring */
.c-lena { --c: var(--cast-lena); --c-soft: var(--cast-lena-soft); }
.c-wagner { --c: var(--cast-wagner); --c-soft: var(--cast-wagner-soft); }
.c-mia { --c: var(--cast-mia); --c-soft: var(--cast-mia-soft); }
.c-jonas { --c: var(--cast-jonas); --c-soft: var(--cast-jonas-soft); }
.c-mehmet { --c: var(--cast-mehmet); --c-soft: var(--cast-mehmet-soft); }
.c-karl { --c: var(--cast-karl); --c-soft: var(--cast-karl-soft); }

/* A character's face: a cast-colour ring that pulses while they speak */
.face { position: relative; flex: none; border-radius: var(--radius-l); }
.face img { width: 100%; height: 100%; border-radius: inherit; outline: 3px solid var(--c); outline-offset: 3px; }
.is-speaking .face::after { content: ""; position: absolute; inset: -9px; border-radius: 26px; border: 3px solid var(--c); pointer-events: none; animation: dt-pulse 1100ms var(--easing-standard) infinite; }

/* Header */
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; padding-block: 20px; }
.brandmark { display: block; color: var(--ink); }
.brandmark svg { width: 136px; height: auto; aspect-ratio: 3777 / 674; fill: currentColor; }
.top__nav { order: 1; display: flex; gap: 24px; width: 100%; }
.top__nav a { padding-block: 10px; color: var(--ink); font: 700 15px/24px var(--font-text); text-decoration: none; }
.top__nav a[aria-current] { text-decoration: underline 3px var(--brand); text-underline-offset: 8px; }
@media (hover: hover) { .top__nav a:not([aria-current]):hover { text-decoration: underline 3px var(--border-input); text-underline-offset: 8px; } }
@media (min-width: 760px) { .top__nav { order: 0; width: auto; margin: 0 12px 0 auto; gap: 28px; } }

/* Hero */
.hero { display: grid; gap: 56px; padding-block: 24px 88px; }
.hero__copy { display: grid; gap: 20px; align-content: start; }
.hero__title { font: 800 clamp(46px, 6.6vw, 86px)/0.98 var(--font-display); letter-spacing: -0.02em; text-wrap: balance; }
.hero__title em { font-style: normal; white-space: nowrap;text-decoration: underline var(--size-line) var(--brand); text-underline-offset: 0.14em; }
.hero__lede { max-width: 30ch; font: 500 19px/28px var(--font-text); color: var(--ink-muted); }

.join { display: grid; gap: 18px; max-width: 460px; margin-top: 8px; padding: 20px; scroll-margin-top: 24px; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 2px; }
.choice { position: relative; display: block; }
.choice input { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.choice span { display: flex; align-items: center; justify-content: center; gap: 6px; height: var(--size-touch); border-radius: var(--radius-m); background: var(--surface); border: 2px solid var(--border-input); box-shadow: 0 var(--depth-1) 0 var(--lip); margin-bottom: var(--depth-1); font: 700 16px/1 var(--font-text); color: var(--ink); transition: transform var(--duration-press) var(--easing-standard), box-shadow var(--duration-press) var(--easing-standard), background-color var(--duration-quick) var(--easing-standard); }
.choice .dt-icon { display: none; width: 20px; height: 20px; }
.choice input:checked + span { background: var(--brand-soft); border-color: var(--brand-strong); color: var(--brand-strong); box-shadow: 0 var(--depth-1) 0 var(--brand-strong); }
.choice input:checked + span .dt-icon { display: block; }
.choice input:active + span { transform: translateY(var(--depth-1)); box-shadow: 0 0 0 var(--lip); }
.choice input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.join .dt-btn { margin-top: 4px; }
.fine { font: 500 13px/18px var(--font-text); color: var(--ink-muted); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.hero__art { position: relative; }
.art { width: 100%; height: auto; aspect-ratio: 480 / 288; overflow: hidden; }
.art .b-brand { fill: var(--brand); }
.art .b-ink { fill: var(--ink); }
.art .b-u6 { fill: var(--line-u6); }
.art .b-u2 { fill: var(--line-u2); }
.art .cut { fill: var(--bg); }
.art .track { fill: none; stroke-width: var(--size-line); stroke-linecap: round; stroke-linejoin: round; }
.art .t-brand { stroke: var(--brand); }
.art .t-u6 { stroke: var(--line-u6); }
.art .t-u2 { stroke: var(--line-u2); }
.art .marker { transform: translate(424px, 160px); }
.art .marker circle { fill: var(--on-bright); stroke: var(--brand); stroke-width: 5; }

.hello { position: relative; display: flex; align-items: flex-end; gap: 12px; width: min(100%, 360px); margin: -56px 0 0 auto; }
.hello .face { width: 56px; height: 56px; margin-bottom: 4px; }
.hello__bubble { flex: 1; min-width: 0; border: 2px solid var(--border); box-shadow: var(--shadow-float); }
.hello__who { display: block; margin-bottom: 2px; font: 800 12px/16px var(--font-text); color: var(--ink); }
.hello__who span { font-weight: 600; color: var(--ink-muted); }
.tools { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.demo-bubble { --bubble: var(--c-soft); justify-self: start; }
.stop__demo.dt-keys { justify-self: start; }
legend.dt-field__label { margin-bottom: 6px; }

@media (min-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; column-gap: 56px; padding-top: 40px; }
  /* The map bleeds off the right edge of the window, as it bleeds off its own box. */
  .hero__art .art { width: calc(100% + max(16px, (100vw - 1160px) / 2)); max-width: none; }
}

/* Sections */
.sec { padding-block: clamp(64px, 9vw, 120px); }
.sec__head { display: grid; gap: 12px; max-width: 660px; margin-bottom: 48px; }
.sec__title { font: 800 clamp(34px, 4.4vw, 54px)/1.04 var(--font-display); letter-spacing: -0.015em; text-wrap: balance; }
.sec__lede { max-width: 50ch; font: 500 18px/28px var(--font-text); color: var(--ink-muted); }

/* Four skills: one ride, four stops */
.ride { list-style: none; margin: 0; padding: 0; display: grid; gap: 48px; }
.stop { position: relative; display: grid; grid-template-columns: var(--size-station) minmax(0, 1fr); column-gap: 20px; row-gap: 8px; align-content: start; }
.stop__sign { position: relative; z-index: 1; grid-row: 1 / span 3; width: var(--size-station); height: var(--size-station); border-radius: var(--radius-l); background: var(--line); color: var(--on-bright); display: grid; place-items: center; box-shadow: 0 var(--depth-3) 0 color-mix(in srgb, var(--line) 75%, #000); }
.stop__sign .dt-icon { width: 32px; height: 32px; }
.stop:not(:last-child)::before { content: ""; position: absolute; left: calc(var(--size-station) / 2 - var(--size-line) / 2); top: 32px; bottom: -80px; width: var(--size-line); border-radius: 5px; background: var(--line); }
.stop__name { font: 800 26px/32px var(--font-display); }
.stop__name small { display: block; font: 700 13px/18px var(--font-text); color: var(--ink-muted); }
.stop__text { max-width: 34ch; }
.stop__demo { margin-top: 8px; }
@media (min-width: 900px) {
  .ride { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
  .stop { grid-template-columns: minmax(0, 1fr); row-gap: 10px; }
  .stop__sign { grid-row: auto; margin-bottom: 14px; }
  .stop:not(:last-child)::before { left: 32px; right: -64px; top: calc(var(--size-station) / 2 - var(--size-line) / 2); bottom: auto; width: auto; height: var(--size-line); }
}

/* Cast */
.cast { list-style: none; margin: 0; padding: 0; display: grid; gap: 24px; }
.castcard { display: grid; grid-template-columns: 88px minmax(0, 1fr); align-items: center; gap: 16px; padding: 20px; }
.castcard .face { width: 88px; height: 88px; }
.castcard__name { font: 800 22px/28px var(--font-display); }
.castcard__role { font: 500 14px/20px var(--font-text); color: var(--ink-muted); }
.castcard .dt-bubble, .castcard .tools { grid-column: 1 / -1; }
.castcard .dt-bubble { --bubble: var(--c-soft); }
.castcard .tools { margin-top: 0; }
@media (min-width: 640px) { .cast { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) {
  .cast { grid-template-columns: repeat(3, minmax(0, 1fr)); padding-bottom: 48px; }
  .castcard:nth-child(3n + 2) { translate: 0 48px; }
}

/* Mistakes: a bento of two tiles */
.bento { display: grid; gap: 24px; }
.tile { display: grid; gap: 14px; align-content: start; padding: clamp(24px, 4vw, 40px); border-radius: var(--radius-xl); }
.tile--sheet { background: var(--surface-sunken); }
.tile__title { font: 800 26px/32px var(--font-display); }
.tile__text { max-width: 46ch; color: var(--ink-muted); }
.tile .dt-sheet { max-width: 440px; margin-top: 18px; }
.genera { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 14px; font: 600 26px/34px var(--font-text); }
.genera small { display: block; font: 600 13px/18px var(--font-text); color: var(--ink-muted); }
@media (min-width: 960px) { .bento { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } }

/* Route: thirteen line signs */
.route { display: grid; gap: 40px; }
.lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
@media (min-width: 960px) {
  .route { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; }
  .route .sec__head { position: sticky; top: 40px; align-self: start; margin-bottom: 0; }
}

/* Closing */
.closing { padding-block: 16px 96px; }
.closing__box { position: relative; overflow: hidden; display: grid; gap: 18px; justify-items: start; padding: clamp(32px, 6vw, 72px); border-radius: var(--radius-xl); background: var(--brand); color: var(--on-bright); box-shadow: 0 var(--depth-3) 0 var(--brand-lip); }
.closing__title { position: relative; max-width: 11ch; font: 800 clamp(40px, 6vw, 76px)/1 var(--font-display); letter-spacing: -0.02em; }
.closing__box p, .closing__box .dt-btn { position: relative; }
.closing__box p { max-width: 34ch; font: 500 18px/28px var(--font-text); }
.closing__art { display: none; }
.closing__art .k-ink { fill: var(--on-bright); }
.closing__art .k-cut { fill: var(--brand); }
.closing__art .track { fill: none; stroke-width: var(--size-line); stroke-linecap: round; stroke-linejoin: round; }
.closing__art .t-u0 { stroke: var(--line-u0); }
.closing__art .t-u6 { stroke: var(--line-u6); }
@media (min-width: 760px) { .closing__art { display: block; position: absolute; right: 0; bottom: 0; width: min(44%, 440px); height: auto; } }

/* Footer */
.foot { border-top: 2px solid var(--border); padding-block: 40px 56px; font: 500 14px/20px var(--font-text); color: var(--ink-muted); }
.foot__grid { display: grid; gap: 24px; }
.foot .brandmark svg { width: 112px; }
.foot__tag { margin-top: 10px; }
.foot__nav { display: grid; grid-template-columns: repeat(3, max-content); gap: 24px 32px; align-items: start; }
.foot__nav div { display: grid; gap: 8px; }
.foot__head { font: 800 13px/18px var(--font-text); color: var(--ink-muted); }
.foot a { color: var(--ink); }
.foot__nav a { text-decoration: none; }
@media (hover: hover) { .foot__nav a:hover { text-decoration: underline; } }
@media (min-width: 800px) { .foot__nav { gap: 24px 56px; } }
.foot__credits { max-width: 92ch; font-size: 13px; line-height: 19px; }
.foot__credits a { color: inherit; font-weight: 600; }
@media (min-width: 800px) { .foot__grid { grid-template-columns: minmax(0, 1fr) auto; } .foot__credits { grid-column: 1 / -1; } }

/* Small pages: thanks, privacy, errors, 404 */
.page { padding-block: 32px 112px; }
.page__body { display: grid; gap: 16px; justify-items: start; max-width: 680px; padding-top: 48px; }
.page__title { font: 800 clamp(38px, 5.4vw, 60px)/1.04 var(--font-display); letter-spacing: -0.015em; text-wrap: balance; }
.page__lede { font: 500 19px/28px var(--font-text); color: var(--ink-muted); max-width: 46ch; }
.page__body .dt-btn { margin-top: 12px; }
.prose { display: grid; gap: 12px; max-width: 68ch; margin-top: 16px; }
.prose h2 { margin-top: 24px; font: 700 22px/30px var(--font-display); }
.prose ul, .prose ol { margin: 0; padding-left: 22px; display: grid; gap: 6px; }
.prose h3 { margin-top: 8px; font: 700 18px/26px var(--font-text); }
.prose strong { font-weight: 800; }
.prose a { overflow-wrap: anywhere; }
.prose blockquote { padding: 2px 0 2px 18px; border-left: 4px solid var(--brand); color: var(--ink-muted); }
.prose table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; font: 500 15px/22px var(--font-text); }
.prose th, .prose td { padding: 8px 20px 8px 0; border-bottom: 2px solid var(--border); text-align: left; vertical-align: top; }
.prose th { font-weight: 800; }
/* A German example: <p class="dt-bubble ex c-lena"> with __text and __en, in a cast colour or none */
.prose .ex { --bubble: var(--c-soft, var(--surface-sunken)); justify-self: start; }
.prose .lines { padding-left: 0; gap: 12px; }
.prose .note { padding: 16px 20px; border-radius: var(--radius-l); background: var(--brand-soft); }
.page:has(+ .closing) { padding-bottom: 48px; }

/* Blog: post header, lists of posts */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; color: var(--ink-muted); font: 700 14px/20px var(--font-text); }
.crumbs a { color: var(--ink-muted); text-decoration: none; }
.post__meta a { color: inherit; }
@media (hover: hover) { .crumbs a:hover { text-decoration: underline; } }
.post__line { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: var(--radius-m); background: var(--line); color: var(--on-bright); font: 800 15px/20px var(--font-display); }
.post__line .dt-linesign__bullet { width: 30px; height: 30px; border-radius: 9px; font-size: 16px; }
.post__meta { display: flex; flex-wrap: wrap; gap: 4px 16px; font: 600 14px/20px var(--font-text); color: var(--ink-muted); }
.posts { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; max-width: 760px; }
.posts--index { margin-top: 40px; }
.post-card { position: relative; display: grid; gap: 8px; padding: 20px 24px; }
.post-card__title { font: 800 22px/28px var(--font-display); text-wrap: balance; }
.post-card__title a { color: var(--ink); text-decoration: none; }
.post-card__title a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius-xl); }
.post-card > p:not(.post__meta) { color: var(--ink-muted); }
@media (hover: hover) {
  .post-card:hover { border-color: var(--border-input); }
  .post-card:hover .post-card__title a { text-decoration: underline 3px var(--brand); text-underline-offset: 5px; }
}
.posts--home { max-width: none; margin-bottom: 32px; }
@media (min-width: 900px) { .posts--home { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.related { max-width: 760px; margin-top: 72px; }
.related__title { margin-bottom: 20px; font: 800 26px/32px var(--font-display); }
.related .post-card__title { font-size: 19px; line-height: 25px; }

/* Motion: one arrival on load, then stillness. All of it stops for reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .art .block { transform-box: fill-box; transform-origin: center; animation: dt-arrive 620ms var(--easing-pop) both; }
  .art .b-ink { animation-delay: 90ms; }
  .art .b-u6 { animation-delay: 180ms; }
  .art .b-u2 { animation-delay: 270ms; }
  .art .track { stroke-dasharray: 1.1 2; animation: dt-draw 900ms var(--easing-standard) 300ms both; }
  .art .t-u6 { animation-delay: 480ms; }
  .art .t-u2 { animation-delay: 660ms; }
  .art .marker { animation: dt-ride 1500ms linear 1150ms both; }
  .art .marker circle { transform-box: fill-box; transform-origin: center; animation: dt-stop 420ms var(--easing-cheer) 2650ms both; }
  @keyframes dt-arrive { from { opacity: 0; transform: scale(0.7); } }
  @keyframes dt-draw { from { stroke-dashoffset: 1.2; } to { stroke-dashoffset: 0; } }
  @keyframes dt-ride {
    0% { transform: translate(160px, 128px); }
    49% { transform: translate(296px, 128px); }
    65.4% { transform: translate(328px, 160px); }
    100% { transform: translate(424px, 160px); }
  }
  @keyframes dt-stop { 50% { transform: scale(1.35); } }
}
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal { animation: dt-rise linear both; animation-timeline: view(); animation-range: entry 5% entry 70%; }
    @keyframes dt-rise { from { opacity: 0; transform: translateY(28px); } }
  }
}
