/* Colour values copied from the app's light palette (app/Shablau/DesignSystem/Tokens.swift,
   "Ink and Form"). Each token is named after its job on this site. Two tokens with the same value
   stay separate when they have different jobs, so a change to one job does not change another. */

@font-face {
  font-family: "Young Serif";
  src: url("/fonts/YoungSerif-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/fonts/SchibstedGrotesk-Variable.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* The hero's line about where recordings stay */
  --recordings-line-icon: #2f6b4f;
  color-scheme: light;

  /* Surfaces */
  --page-bg: #f5f3ee;
  --header-bg: rgb(245 243 238 / 0.92);
  --footer-bg: #f8f5ec;
  --demo-band-bg: #ffffff;
  --section-rule: #e4e0d6;
  --item-rule: #d9d6ce;
  --accent-line: #9c3a2a;
  --toc-rule: #d9d6ce;
  --toc-rule-hover: #9c3a2a;
  --phone-frame: #1e2230;
  --phone-shadow: rgb(30 34 48 / 0.22);
  --phone-shadow-near: rgb(30 34 48 / 0.08);

  /* Text */
  --text-heading: #1e2230;
  --text-body: #3c4152;
  --text-muted: #575c6b;
  --text-kicker: #9c3a2a;
  --list-numeral: #9c3a2a;

  /* Links and controls */
  --link-text: #1e2230;
  --link-underline: #9c3a2a;
  --button-bg: #9c3a2a;
  --button-bg-hover: #8a3324;
  --button-edge: #6e281d;
  --button-text: #ffffff;
  --pill-stroke: #1e2230;
  --pill-bg: #ffffff;
  --pill-text: #1e2230;
  --focus-ring: #1e2230;

  /* Hero art */
  --hero-disc: #f3dc97;
  --hero-ring: #1e2230;
  --tile-bg: #ffffff;
  --tile-stroke: #1e2230;
  --tile-text: #1e2230;
  --tile-ochre-bg: #f3dc97;
  --tile-pass-bg: #cfe8d6;
  --tile-slate-text: #56628f;
  --hero-fact-mark: #2f6b4f;

  /* The example round (the app's Practice screen) */
  --demo-screen-bg: #ffffff;
  --chart-bg: #f8f5ec;
  --pitch-native: #56628f;
  --pitch-mine: #1e2230;
  --sound-letter: #1e2230;
  --sound-score: #1e2230;
  --sound-rule: #1e2230;
  --sound-off: #7a4e0e;
  --take-label-bg: #f5f3ee;
  --take-label-text: #575c6b;
  --tip-sound: #7a4e0e;
  --panel-again-bg: #f8ecd4;
  --panel-pass-bg: #cfe8d6;
  --panel-pass-pulse: #a6d3b5;
  --verdict-again: #7a4e0e;
  --verdict-pass: #2f6b4f;
  --verdict-pass-edge: #1f4a36;
  --panel-reason: #1e2230;
  --ring-again-track: #dfc28c;
  --ring-again: #7a4e0e;
  --ring-pass-track: #e4e0d6;
  --ring-pass: #2f6b4f;
  --ring-pass-disc: #2f6b4f;
  --ring-pass-number: #ffffff;
  --ring-number: #1e2230;
  --ring-tick: #1e2230;
  --badge-bg: #2f6b4f;
  --badge-text: #ffffff;
  --spark-a: #2f6b4f;
  --spark-b: #e0a33a;
  --confetti-1: #e0a33a;
  --confetti-2: #2f6b4f;
  --confetti-3: #56628f;
  --confetti-4: #9c3a2a;
  --confetti-5: #f3dc97;
  --demo-pause-bg: #ffffff;
  --bar-track: #e4e0d6;
  --bar-fill: #1e2230;
  --bar-pass-line: #1e2230;

  /* Sounds */
  --length-consonant: #e4e0d6;
  --length-consonant-text: #1e2230;
  --length-vowel: #1e2230;
  --length-vowel-text: #ffffff;
  --play-bg: #1e2230;
  --play-icon: #ffffff;
  --sound-list-word: #1e2230;

  /* Privacy panel */
  --privacy-bg: #1e2230;
  --privacy-heading: #ffffff;
  --privacy-text: #e4e0d6;
  --privacy-kicker: #f3dc97;
  --privacy-rule: rgb(255 255 255 / 0.2);
  --privacy-icon: #f3dc97;
  --privacy-link: #ffffff;
  --privacy-link-underline: #f3dc97;
  --privacy-focus-ring: #ffffff;

  /* Join */
  --join-bg: #cfe8d6;
  --join-rule: #94c4a4;
  --join-step-number: #2f6b4f;

  /* The hero's departures board */
  --flap-bg: #1e2230;
  --flap-text: #f5f3ee;
  --flap-edge: rgb(30 34 48 / 0.28);
  --board-label: #1e2230;
  --hero-langs-label: #1e2230;

  /* The comparison: other apps */
  --compare-other-bg: #e6e5e0;
  --other-card-label: #4f5463;
  --cheer-text: #2b7a1e;
  --cheer-tick-bg: #2b7a1e;
  --cheer-tick-mark: #ffffff;
  --cheer-dot-a: #e0a33a;
  --cheer-dot-b: #56628f;
  --cheer-dot-c: #9c3a2a;

  /* The comparison: Shablau */
  --compare-shablau-bg: #fffdf7;
  --shablau-card-label: #9c3a2a;
  --compare-native-band: rgb(86 98 143 / 0.26);
  --compare-native-text: #46507a;
  --compare-learner-line: #1e2230;
  --compare-off: #b3361f;
  --compare-off-tint: rgb(179 54 31 / 0.12);
  --compare-word-label: #575c6b;
  --compare-word: #1e2230;
  --compare-word-hover: rgb(30 34 48 / 0.07);
  --compare-pop-bg: #1e2230;
  --compare-pop-text: #f5f3ee;
  --compare-pop-muted: #b9bccb;
  --compare-pop-off: #ffab97;
  --compare-pop-shadow: rgb(30 34 48 / 0.25);
  --raven-bubble-text: #1e2230;

  /* Regions */
  --map-pin: #1e2230;
  --map-pin-on-centre: #ffffff;
  --region-text: #3a3f4d;
  --map-label-halo: #f4efe2;
  --country-tab-bg: #e9e6dd;
  --country-tab-hover-bg: #dedad0;
  --country-tab-on-bg: #1e2230;
  --country-tab-on-text: #f5f3ee;

  /* Type */
  --font-display: "Young Serif", Georgia, serif;
  --font-body: "Schibsted Grotesk", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;

  /* Layout. Side gutter: 16 phone, 24 tablet, 32 desktop, as in the app. */
  --content-max: 1160px;
  --gutter: 16px;
}
@media (min-width: 600px) {
  :root { --gutter: 24px; }
}
@media (min-width: 1024px) {
  :root { --gutter: 32px; }
}

/* ---- Base ---- */

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--footer-bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 80px;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--text-body);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  overflow-wrap: break-word;
  overflow-x: clip;
}

img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
h1, h2, h3 { color: var(--text-heading); }

a { color: var(--link-text); text-decoration-color: var(--link-underline); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, summary:focus-visible, button:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left));
}

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

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--button-bg);
  color: var(--button-text);
  font-weight: 600;
  z-index: 30;
}
.skip:focus { top: 12px; }

.kicker, .eyebrow {
  color: var(--text-kicker);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* The main button: the app's Falu red pill with a 4 px edge under it. */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 22px;
  border-radius: 999px;
  background: var(--button-bg);
  box-shadow: 0 4px 0 var(--button-edge);
  color: var(--button-text);
  font-weight: 650;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
}
.button:hover { background: var(--button-bg-hover); }
.button:active { transform: translateY(4px); box-shadow: 0 0 0 var(--button-edge); }
.button-large { min-height: 60px; padding: 14px 28px; font-size: 1.1875rem; }
.button-small { min-height: 40px; padding: 6px 16px; font-size: 0.9375rem; box-shadow: 0 3px 0 var(--button-edge); }
.button-icon { flex: none; fill: currentColor; }

/* The App Store and Google Play badges, side by side: on a phone both shrink (to 40 px tall at the least) so
   they still fit on one line. */
.store-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.store-badge { display: block; border-radius: 9px; }
.store-badge img { display: block; width: auto; height: clamp(40px, calc((100vw - 44px) / 6.6), 60px); }

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  color: var(--link-text);
  font-weight: 600;
}

/* ---- Header and footer ---- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--header-bg);
  border-bottom: 1px solid var(--section-rule);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  padding-block: 10px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-heading);
  font-family: var(--font-display);
  font-size: 1.5rem;
  text-decoration: none;
}
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.header-nav { display: none; margin-left: auto; }
.header-nav ul { display: flex; gap: 4px; list-style: none; padding: 0; }
.header-nav a {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--text-body);
  font-weight: 550;
  font-size: 0.9375rem;
  text-decoration: none;
}
.header-nav a:hover { color: var(--text-heading); text-decoration: underline; text-decoration-color: var(--link-underline); }
.header-nav li { white-space: nowrap; }
@media (min-width: 1024px) {
  .header-nav { display: block; }
}

/* ---- Language button, language list and phone menu ----
   Wide screens (1024 px and up; narrower, the links, language button and join button do not fit on one line in Swedish): the menu links, then the language button (globe, the language's own name,
   chevron), then the join button. Narrow screens: the language button shows a two-letter code, the join
   button moves into the Menu panel. The list and the panel are popovers (layout.html); the current
   language has a grey row and a check mark. Type sizes: 15 px buttons and names, 13 px second lines;
   17 and 14 px on phones. */
.hbtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  min-width: 44px;
  padding: 0 10px;
  border: 1px solid var(--item-rule);
  border-radius: 999px;
  background: transparent;
  color: var(--text-heading);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
}
.hbtn:hover,
.site-header:has(#lang-list:popover-open) .lang-button,
.site-header:has(#site-menu:popover-open) .menu-button { background: #ffffff; }
.hbtn[aria-expanded="true"] { background: #ffffff; }
.lang-button { margin-left: auto; anchor-name: --lang-button; }
.lang-current { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.lang-button .icon-chevron { display: none; }
.menu-button { padding: 0 12px 0 10px; }
.menu-button .icon-close,
.site-header:has(#site-menu:popover-open) .menu-button .icon-menu { display: none; }
.site-header:has(#site-menu:popover-open) .menu-button .icon-close { display: block; }
.menu-button[aria-expanded="true"] .icon-menu { display: none; }
.menu-button[aria-expanded="true"] .icon-close { display: block; }
.header-join { display: none; }
.button-small.header-join { min-height: 44px; }
@media (min-width: 1024px) {
  .header-nav { margin-left: auto; }
  .lang-button { margin-left: 0; gap: 8px; padding: 0 12px 0 10px; font-weight: 550; }
  .lang-current { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
  .lang-code { display: none; }
  .lang-button .icon-chevron { display: block; }
  .header-join { display: inline-flex; }
  .menu-button, .menu-panel, .menu-panel.is-open { display: none; }
  .menu-panel:popover-open { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .lang-button .icon-chevron { transition: rotate 150ms ease; }
}
.site-header:has(#lang-list:popover-open) .lang-button .icon-chevron { rotate: 180deg; }
.lang-button[aria-expanded="true"] .icon-chevron { rotate: 180deg; }

/* The language list. Without anchor positioning (and before the script places it) it sits under the
   header at the right; site.js then lines its right edge up with the button. */
.lang-pop {
  position: fixed;
  inset: 72px 16px auto 16px;
  width: auto;
  margin: 0;
  padding: 8px;
  border: 1px solid var(--section-rule);
  border-radius: 16px;
  background: #ffffff;
  color: var(--text-heading);
  box-shadow: 0 16px 40px rgb(30 34 48 / 0.16), 0 2px 6px rgb(30 34 48 / 0.06);
}
.lang-pop-title { margin: 0; padding: 8px 12px 6px; font-size: 0.8125rem; font-weight: 600; color: var(--text-muted); }
.lang-pop ul { display: flex; flex-direction: column; gap: 2px; list-style: none; margin: 0; padding: 0; }
.lang-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 6px 12px;
  border-radius: 10px;
  color: var(--text-heading);
  text-decoration: none;
}
.lang-row:hover { background: var(--page-bg); color: var(--text-heading); }
.lang-row[aria-current="page"] { background: #efece4; }
.lang-flag { display: grid; place-items: center; width: 32px; height: 20px; flex: none; }
.lang-flag .flag { height: 16px; width: auto; border-radius: 2px; box-shadow: 0 0 0 1px rgb(30 34 48 / 0.12); }
.lang-names { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.3; }
.lang-own { font-size: 1.0625rem; font-weight: 600; }
.lang-local { font-size: 0.875rem; color: var(--text-body); }
.lang-row .icon-check { flex: none; width: 20px; height: 20px; }
@media (min-width: 600px) and (max-width: 1023px) {
  .lang-pop { left: auto; width: 360px; }
}
@media (min-width: 1024px) {
  .lang-pop { inset: 72px max(16px, calc((100vw - var(--content-max)) / 2 + var(--gutter))) auto auto; width: 320px; }
  .lang-row { min-height: 52px; }
  .lang-own { font-size: 0.9375rem; }
  .lang-local { font-size: 0.8125rem; }
  .lang-row .icon-check { width: 18px; height: 18px; }
  @supports (anchor-name: --a) {
    .lang-pop { position-anchor: --lang-button; inset: auto; top: anchor(bottom); right: anchor(right); margin-top: 10px; }
  }
}

/* The phone menu: a full-width panel under the header. */
.menu-panel {
  position: fixed;
  inset: 65px 0 0 0;
  width: 100%;
  height: auto;
  max-height: none;
  margin: 0;
  padding: 8px 16px 24px;
  border: 0;
  background: var(--page-bg);
  color: var(--text-heading);
  overflow-y: auto;
}
.menu-panel:popover-open { display: flex; flex-direction: column; gap: 16px; }
.menu-panel.is-open { display: flex; flex-direction: column; gap: 16px; }

/* Browsers without the Popover API (iOS 16 Safari, older Android browsers) ignore the popover attribute and
   would show every popover, open, over the page. Here they stay closed; site.js (popoverShim) opens one by
   adding is-open. Pages without site.js hide the two header buttons there: the footer has the same links. */
@supports not selector(:popover-open) {
  [popover]:not(.is-open) { display: none; }
  html:not(.popover-shim) .lang-button,
  html:not(.popover-shim) .menu-button { display: none; }
}
.popover-shim [popover].is-open { position: fixed; z-index: 30; }
.menu-panel ul { list-style: none; margin: 0; padding: 0; }
.menu-panel li { border-bottom: 1px solid var(--section-rule); }
.menu-panel nav a {
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: 0 8px;
  border-radius: 8px;
  color: var(--text-heading);
  font-size: 1.0625rem;
  font-weight: 550;
  text-decoration: none;
}
.menu-panel nav a:hover { background: #efece4; }
.menu-join { width: 100%; }
.menu-lang {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-heading);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 550;
  text-align: left;
  cursor: pointer;
}
.menu-lang .icon-next { margin-left: auto; }

.site-footer { background: var(--footer-bg); border-top: 1px solid var(--section-rule); }
.footer-grid {
  display: grid;
  gap: 20px 40px;
  padding-block: 40px 32px;
  color: var(--text-muted);
  font-size: 0.9375rem;
}
@media (min-width: 760px) {
  .footer-grid { grid-template-columns: 1fr auto; align-items: start; }
  .footer-legal { grid-column: 1 / -1; }
}
.footer-about { display: flex; flex-direction: column; gap: 8px; max-width: 26em; }
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-heading);
  font-family: var(--font-display);
  font-size: 1.25rem;
}
.footer-brand img { border-radius: 6px; }
.site-footer ul { display: flex; flex-direction: column; gap: 0; list-style: none; padding: 0; margin: 0; }
.site-footer nav a { color: var(--text-body); display: inline-block; padding-block: 6px; }
.site-footer .footer-langs { flex-direction: row; flex-wrap: wrap; gap: 4px 20px; grid-column: 1 / -1; font-size: 0.875rem; }
.footer-langs a { display: inline-block; padding-block: 6px; color: var(--text-body); }
.footer-langs a[aria-current="page"] { color: var(--text-heading); font-weight: 600; text-decoration: none; }
.footer-legal { padding-top: 16px; border-top: 1px solid var(--section-rule); font-size: 0.875rem; }

/* ---- Sections shared by the home page ---- */

.section { padding-block: clamp(64px, 9vw, 120px); }
.section h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 5.2vw, 3.125rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.section-head { display: flex; flex-direction: column; gap: 14px; max-width: 38em; }
.section-head > p:not(.kicker) { font-size: 1.125rem; }

/* Phone frames around app screenshots. Corner radii are shares of the width and height, so the
   frame keeps its shape at every size. */
.phone {
  padding: 2.4%;
  border-radius: 15% / 6.9%;
  background: var(--phone-frame);
  box-shadow: 0 24px 48px -20px var(--phone-shadow), 0 2px 6px var(--phone-shadow-near);
}
.phone img { width: 100%; border-radius: 13% / 6%; }

/* ---- Hero ---- */

.hero { padding-block: clamp(32px, 6vw, 88px) clamp(56px, 8vw, 104px); overflow: clip; }
.hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.12fr 0.88fr; gap: 40px; }
}
.hero-text { display: flex; flex-direction: column; gap: 20px; }
.hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.875rem, 10.4vw, 2.75rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
}
@media (min-width: 600px) {
  .hero h1 { font-size: clamp(2.75rem, 6.4vw, 3.875rem); }
}
.lead { font-size: clamp(1.1875rem, 2.4vw, 1.3125rem); line-height: 1.5; max-width: 31em; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 6px; }
.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  list-style: none;
  padding: 0;
  margin-top: 4px;
}
.hero-facts li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-heading);
  font-size: 0.9375rem;
  font-weight: 550;
}
.hero-facts li::before {
  content: "";
  width: 14px;
  height: 14px;
  flex: none;
  background: var(--hero-fact-mark);
  clip-path: polygon(14% 52%, 0 66%, 38% 100%, 100% 22%, 86% 8%, 38% 72%);
}

.hero-art {
  position: relative;
  width: min(100%, 540px);
  aspect-ratio: 1 / 1.02;
  margin-inline: auto;
}
.hero-art > * { position: absolute; }
.art-disc {
  inset: 9% 3% 5% 5%;
  border-radius: 50%;
  background: var(--hero-disc);
}
.art-ring {
  inset: 3% 0 0 0;
  border: 2px dashed var(--hero-ring);
  border-radius: 50%;
  opacity: 0.22;
}
.art-phone { top: 0; right: 8%; width: 46%; }
.art-phone .phone { rotate: 4deg; }
/* The app's chart for the take on the phone, shown larger and lifted off the screen, as on the first
   App Store screenshot: the letters, each sound's score and the marked sound. */
.art-callout {
  top: 19%;
  left: 0;
  width: 76%;
  height: auto;
  border-radius: 18px;
  box-shadow: 0 0 0 3px var(--phone-frame), 0 28px 40px -18px var(--phone-shadow);
  rotate: -3deg;
}
.art-raven { left: 0; bottom: 0; width: 34%; filter: drop-shadow(0 12px 14px rgb(30 34 48 / 0.18)); }
.tile {
  display: grid;
  place-items: center;
  min-width: 2.2em;
  height: 2.2em;
  padding-inline: 0.35em;
  border: 2px solid var(--tile-stroke);
  border-radius: 0.55em;
  background: var(--tile-bg);
  color: var(--tile-text);
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 4.4vw, 1.875rem);
  line-height: 1;
  box-shadow: 0 4px 0 var(--tile-stroke);
}
.tile-a { top: 5%; left: 14%; rotate: -8deg; background: var(--tile-ochre-bg); }
.tile-c { bottom: 16%; right: 1%; rotate: 9deg; background: var(--tile-pass-bg); }
.tile-e { top: 2%; right: 0; rotate: 10deg; color: var(--tile-slate-text); }

@media (prefers-reduced-motion: no-preference) {
  .art-disc { animation: grow-in 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  .art-ring { animation: fade-in 1.2s 0.3s ease both; }
  .art-phone .phone { animation: phone-in 0.9s 0.15s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  .art-callout { animation: callout-in 0.7s 0.55s cubic-bezier(0.3, 1.3, 0.5, 1) both; }
  .art-raven { animation: raven-in 0.8s 0.45s cubic-bezier(0.3, 1.4, 0.5, 1) both; }
  .tile { animation: tile-in 0.6s cubic-bezier(0.3, 1.5, 0.5, 1) both; }
  .tile-a { animation-delay: 0.65s; }
  .tile-c { animation-delay: 0.85s; }
  .tile-e { animation-delay: 1.05s; }
}
@keyframes grow-in { from { scale: 0.6; opacity: 0; } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes phone-in { from { translate: 0 60px; rotate: 12deg; opacity: 0; } }
@keyframes callout-in { from { translate: 40px 10px; scale: 0.7; opacity: 0; } }
@keyframes raven-in { from { translate: -20px 30px; scale: 0.85; opacity: 0; } }
@keyframes tile-in { from { scale: 0.3; opacity: 0; } }

/* ---- The hero's departures board ----
   "Speak [Swedish] like [a Swede]." Each letter sits on its own tile.
   Without the script the board shows Swedish. src/site.js splits each tile into two halves and flips
   them to the next word; under Reduce Motion the board stays on Swedish. The board sits above the h1
   and is aria-hidden: the languages are also in the line under the h1.
   Sizes are in em of the board, and the board's size follows the width of the hero text, so the
   longest words always fit on one line and the line never changes width. The article ("a", "an")
   is part of the label, not the tiles. */

.hero-text { container-type: inline-size; }
.flip-title { font-family: var(--font-display); font-size: clamp(1.125rem, 4.6vw, 2.25rem); line-height: 1; }
@supports (width: 1cqi) {
  .flip-title { font-size: clamp(1.125rem, calc(100cqi / 18), 2.25rem); }
}
/* Three columns: the label, the flag tile, the letter tiles. The labels end at the tiles ("Speak" next to
   its flag, "like a" next to its word) and both rows of letters start at the same edge, as on a
   departures board. The second label spans the label and flag columns. */
.board {
  display: grid;
  grid-template-columns: auto 1.4em auto; /* the flag tile is 1.7em at 0.8em, plus its gap */
  justify-content: start;
  align-items: center;
  row-gap: 0.16em;
}
.board-label { color: var(--board-label); white-space: nowrap; justify-self: end; padding-right: 0.3em; }
.board-like { grid-column: 1 / 3; }
/* The flag sits one tile gap before the letters, so it reads as the first tile of the row. */
.board-flag { padding-right: 0.04em; }
/* The script writes "a" or "an" into the span. A hidden "an" shares its grid cell, so the label is always
   as wide as "an" and the board never moves. */
.article { display: inline-grid; justify-items: start; }
.article > span, .article::after { grid-area: 1 / 1; }
.article::after { content: "an"; visibility: hidden; }
/* Italian: "un" or "uno" ("come uno spagnolo"). */
.article:lang(it)::after { content: "uno"; }
.flaps { display: flex; align-items: center; gap: 0.05em; font-size: 0.8em; }
.cell {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 0.98em;
  height: 1.42em;
  border-radius: 0.14em;
  background: var(--flap-bg);
  color: var(--flap-text);
  box-shadow: 0 0.07em 0 var(--flap-edge);
}
/* The flag is never split: it fades whole to the next flag (site.js marks the shown one). */
.cell-flag { width: 1.7em; }
.cell .flag { display: none; width: auto; height: 0.74em; border-radius: 0.05em; }
.cell-flag:not(.is-live) > .flag:first-child, .cell-flag > .flag.is-shown { display: block; }
.board-stop { margin-left: 0.06em; align-self: flex-end; color: var(--board-label); font-size: 1.25em; line-height: 1; }

/* The halves the script builds: two still halves and two moving flaps. */
.half {
  position: absolute;
  left: 0;
  right: 0;
  height: 50%;
  overflow: hidden;
  background: var(--flap-bg);
  backface-visibility: hidden;
}
.half > span { position: absolute; left: 0; right: 0; height: 200%; display: flex; align-items: center; justify-content: center; }
.half-top { top: 0; border-radius: 0.14em 0.14em 0 0; }
.half-top > span { top: 0; }
.half-bottom { bottom: 0; border-radius: 0 0 0.14em 0.14em; }
.half-bottom > span { bottom: 0; }
.flap-top { z-index: 2; transform-origin: 50% 100%; }
.flap-bottom { z-index: 2; transform-origin: 50% 0; transform: perspective(4em) rotateX(90deg); }

.hero-langs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
  margin-top: -4px;
  font-size: 0.9375rem;
}
.hero-langs strong { color: var(--hero-langs-label); font-weight: 650; }
.board-pause {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 650;
  cursor: pointer;
}
.board-pause[hidden] { display: none; }
.board-pause[aria-pressed="true"] .when-running { display: none; }
.board-pause[aria-pressed="true"] .when-paused { display: inline; }

/* ---- The comparison: one take, two answers ---- */

/* The two sides run the full width of the window, each on its own colour. Their content lines up with the
   page's other content (.wrap): the outer padding is the space .wrap leaves on that side. */
.compare-section { --wrap-edge: max(var(--gutter), calc((100vw - var(--content-max)) / 2 + var(--gutter))); padding-bottom: 0; }
.compare { display: grid; margin-top: 40px; }
.compare-side { padding: clamp(40px, 6vw, 72px) var(--gutter); }
.compare-other { background: var(--compare-other-bg); }
.compare-shablau { background: var(--compare-shablau-bg); }
.compare-inner { display: flex; flex-direction: column; gap: 20px; height: 100%; }
@media (min-width: 960px) {
  .compare { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); }
  .compare-other { padding-left: var(--wrap-edge); padding-right: clamp(32px, 4vw, 64px); }
  .compare-shablau { padding-right: var(--wrap-edge); padding-left: clamp(32px, 4vw, 64px); }
}
.compare-name { font-family: var(--font-body); font-size: 0.875rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.compare-other .compare-name { color: var(--other-card-label); }
.compare-shablau .compare-name { color: var(--shablau-card-label); }

.cheer {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding-block: 24px;
  text-align: center;
}
.cheer-owl { position: relative; width: min(70%, 240px); }
.cheer-word {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--cheer-text);
  font-size: clamp(2rem, 7vw, 2.75rem);
  font-weight: 800;
  line-height: 1.1;
}
.cheer-tick { flex: none; }
.cheer-tick circle { fill: var(--cheer-tick-bg); }
.cheer-tick path { fill: none; stroke: var(--cheer-tick-mark); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.cheer-dots { position: absolute; inset: 0; pointer-events: none; }
.cheer-dots i { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--cheer-dot-a); }
.cheer-dots i:nth-child(3n + 2) { background: var(--cheer-dot-b); }
.cheer-dots i:nth-child(3n + 3) { background: var(--cheer-dot-c); width: 8px; height: 8px; }
.cheer-dots i:nth-child(1) { left: 8%; top: 14%; }
.cheer-dots i:nth-child(2) { left: 22%; top: 4%; }
.cheer-dots i:nth-child(3) { left: 84%; top: 10%; }
.cheer-dots i:nth-child(4) { left: 92%; top: 34%; }
.cheer-dots i:nth-child(5) { left: 4%; top: 46%; }
.cheer-dots i:nth-child(6) { left: 70%; top: 2%; }
.cheer-dots i:nth-child(7) { left: 5%; top: 70%; }
.cheer-dots i:nth-child(8) { left: 88%; top: 78%; }
.cheer-dots i:nth-child(9) { left: 46%; top: 0; }
.cheer-dots i:nth-child(10) { left: 94%; top: 58%; }
.compare-note { color: var(--text-body); font-size: 1rem; }

.cmp-app { display: flex; flex-direction: column; gap: 22px; }

/* The melody: the native speaker as a wide soft band, the learner as a thin line through it. */
.cmp-chart { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.cmp-key { color: var(--text-muted); font-size: 0.875rem; line-height: 1.45; }
.cmp-key .k-native { color: var(--compare-native-text); font-weight: 700; }
.cmp-key .k-mine { color: var(--compare-learner-line); font-weight: 700; }
.cmp-key .k-off { color: var(--compare-off); font-weight: 700; }
.cmp-pitch { display: block; width: 100%; height: auto; overflow: visible; }
.cmp-native { fill: none; stroke: var(--compare-native-band); stroke-width: 14; stroke-linecap: round; stroke-linejoin: round; }
.cmp-mine { fill: none; stroke: var(--compare-learner-line); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
/* The learner's line turns red over each sound to change. */
.cmp-mine-off { stroke: var(--compare-off); stroke-width: 4.5; }
.cmp-label { fill: var(--compare-word-label); font-family: var(--font-body); font-size: 13px; font-weight: 550; }
.cmp-label.is-marked { fill: var(--compare-off); font-weight: 750; }
/* On a phone the labels would be too small to read; the sentence under the chart names the words. */
@media (max-width: 600px) { .cmp-label { display: none; } }

/* The sentence: only the sounds to change are marked. Each word opens a popover with its scores. */
.cmp-sentence { display: flex; flex-wrap: wrap; gap: 2px 4px; list-style: none; padding: 0; }
.cmp-w {
  padding: 2px 6px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--compare-word);
  font-family: var(--font-display);
  font-size: clamp(1.625rem, 3.6vw, 2.25rem);
  line-height: 1.25;
  cursor: pointer;
}
.cmp-w:hover, .cmp-w:focus-visible { background: var(--compare-word-hover); }
.cmp-l.is-off, .cmp-l.is-extra { border-radius: 4px; background: var(--compare-off-tint); color: var(--compare-off); }
.cmp-l.is-extra { font-size: 0.7em; vertical-align: 0.35em; margin-left: 1px; padding-inline: 2px; }
.cmp-hint { margin-top: -14px; color: var(--text-muted); font-size: 0.875rem; }

.cmp-pop {
  inset: auto;
  margin: 0;
  min-width: 11rem;
  padding: 12px 14px;
  border: 0;
  border-radius: 12px;
  background: var(--compare-pop-bg);
  box-shadow: 0 10px 30px var(--compare-pop-shadow);
  color: var(--compare-pop-text);
  font-size: 0.9375rem;
}
/* Without the script the popover opens in the middle of the window. */
html:not(.js) .cmp-pop { inset: 0; margin: auto; height: fit-content; }
.pop-word { margin-bottom: 6px; font-family: var(--font-display); font-size: 1.25rem; }
.pop-sounds { display: grid; grid-template-columns: auto auto 1fr; gap: 2px 12px; list-style: none; padding: 0; }
.pop-sounds li { display: contents; }
.pop-letters { font-weight: 700; }
.pop-score { font-variant-numeric: tabular-nums; text-align: right; }
.pop-heard { color: var(--compare-pop-muted); }
.pop-sounds li.is-off > * { color: var(--compare-pop-off); }

/* What to change: one short tip per marked sound, next to the raven. */
.cmp-raven { display: flex; align-items: flex-start; gap: 14px; }
.cmp-raven img { flex: none; width: clamp(64px, 9vw, 92px); }
.cmp-tips { display: flex; flex-direction: column; gap: 16px; list-style: none; padding: 0; color: var(--raven-bubble-text); }
.cmp-tip { display: flex; flex-direction: column; gap: 2px; font-size: 1rem; line-height: 1.45; }
.tip-word { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; font-family: var(--font-display); font-size: 1.375rem; }
.tip-word mark { border-radius: 4px; background: var(--compare-off-tint); color: var(--compare-off); }
.tip-said { color: var(--text-muted); font-family: var(--font-body); font-size: 0.9375rem; }
.tip-practise { color: var(--text-muted); font-size: 0.9375rem; }

.cmp-players { display: flex; flex-wrap: wrap; gap: 12px; }
.cmp-clip { display: flex; flex-direction: column; gap: 4px; }
.clip-label { color: var(--text-heading); font-size: 0.875rem; font-weight: 650; }
.js .clip-label { display: none; }
.cmp-caption { color: var(--text-muted); font-size: 0.8125rem; line-height: 1.45; }

/* ---- Regions ---- */

/* The map on the left, the countries and their regions on the right. Choosing a country (src/site.js) swaps
   both. Without the script, Sweden's map shows and every country's regions are listed. */
.regions-ui { display: grid; gap: 32px; margin-top: 40px; }
@media (min-width: 860px) {
  .regions-ui { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; }
}
.maps { display: grid; justify-self: center; width: 100%; max-width: 520px; }
.map {
  position: relative;
  grid-area: 1 / 1;
  align-self: start;
  margin: 0;
  border-radius: 24px;
  overflow: hidden;
}
.map:not(.is-shown) { visibility: hidden; opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .map { transition: opacity 0.3s ease, visibility 0.3s; }
}
/* Every map is square (map-pins.json); the pins are placed in percent of that square. */
.map img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.map-pin { position: absolute; width: 0; height: 0; }
.map-pin::before {
  content: "";
  position: absolute;
  left: -4px;
  top: -4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--map-pin);
}
.map-pin.is-on::before { left: -7px; top: -7px; width: 14px; height: 14px; border: 2.5px solid var(--map-pin); background: var(--map-pin-on-centre); box-sizing: border-box; }
.map-chip {
  position: absolute;
  top: 0;
  translate: 0 -50%;
  color: var(--region-text);
  font-size: 0.8125rem;
  font-weight: 650;
  text-shadow: 0 0 3px var(--map-label-halo), 0 0 6px var(--map-label-halo), 0 0 10px var(--map-label-halo);
  line-height: 1.2;
  white-space: nowrap;
}
.map-pin.is-right .map-chip { left: 12px; }
.map-pin.is-left .map-chip { right: 12px; }
.map-pin.is-above .map-chip, .map-pin.is-below .map-chip { left: 0; translate: -50% 0; }
.map-pin.is-above .map-chip { top: auto; bottom: 9px; }
.map-pin.is-below .map-chip { top: 9px; }
.map-pin.is-on .map-chip { font-size: 0.9375rem; font-weight: 750; }

.regions-side { display: flex; flex-direction: column; gap: 32px; }
.country-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.country-tab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border: 0;
  border-radius: 999px;
  background: var(--country-tab-bg);
  color: var(--text-heading);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
.country-tab:hover { background: var(--country-tab-hover-bg); }
.country-tab[aria-selected="true"] { background: var(--country-tab-on-bg); color: var(--country-tab-on-text); }
.country-tab .flag { flex: none; width: auto; height: 16px; border-radius: 2px; }
.js .country-panel:not(.is-shown) { display: none; }
html:not(.js) .regions-side { gap: 28px; }
.country-panel { display: flex; flex-direction: column; gap: 16px; }
.country { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: 400; font-size: 1.625rem; line-height: 1.15; }
.country .flag { flex: none; width: auto; height: 22px; border-radius: 3px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px 20px; list-style: none; padding: 0; }
.chip { color: var(--region-text); font-size: 1.0625rem; font-weight: 500; line-height: 1.4; }
.chip.is-on { color: var(--text-heading); font-weight: 750; }

/* ---- Reveal: blocks rise into place once (src/site.js adds .is-in) ---- */

@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    translate: 0 28px;
    transition: opacity 0.7s ease, translate 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  .js .reveal.is-in { opacity: 1; translate: 0 0; }
  .js .pair .reveal:nth-child(2), .js .privacy-facts .reveal:nth-child(2) { transition-delay: 0.1s; }
  .js .privacy-facts .reveal:nth-child(3) { transition-delay: 0.2s; }
}

/* ---- The example round ---- */

.demo-section, .tour-section { background: var(--demo-band-bg); border-block: 1px solid var(--section-rule); }
.demo-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; align-items: center; }
@media (min-width: 900px) {
  .demo-grid { grid-template-columns: 1fr minmax(0, 420px); gap: 72px; }
}
.demo-legend { display: flex; flex-direction: column; list-style: none; padding: 0; margin-top: 12px; border-bottom: 1px solid var(--item-rule); }
.demo-legend li { display: flex; gap: 14px; align-items: baseline; padding-block: 12px; border-top: 1px solid var(--item-rule); }
.legend-num {
  flex: none;
  width: 1.25rem;
  color: var(--list-numeral);
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1;
}
.says-pass { color: var(--verdict-pass); font-family: var(--font-display); }

.demo { position: relative; width: 100%; max-width: 420px; justify-self: center; }
/* The example sits in the same dark phone frame as the screenshots, so it reads as the app's screen. */
.demo-screen {
  padding: 20px 16px 16px;
  border: 8px solid var(--phone-frame);
  border-radius: 46px;
  background: var(--demo-screen-bg);
  box-shadow: 0 30px 60px -30px var(--phone-shadow), 0 2px 8px var(--phone-shadow-near);
}
.demo-word .word {
  color: var(--text-heading);
  font-family: var(--font-display);
  font-size: 3.25rem;
  line-height: 1;
}
.demo-word .gloss { color: var(--text-muted); font-size: 1.0625rem; margin-top: 4px; }
.demo-stage { display: grid; gap: 28px; margin-top: 16px; }
.take { display: flex; flex-direction: column; gap: 12px; position: relative; }
.take-label {
  align-self: flex-start;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--take-label-bg);
  color: var(--take-label-text);
  font-size: 0.8125rem;
  font-weight: 650;
}

.chart { padding: 10px 10px 12px; border-radius: 18px; background: var(--chart-bg); }
.pitch { width: 100%; height: auto; overflow: visible; }
.pitch path { fill: none; stroke-linecap: round; }
.pitch-native { stroke: var(--pitch-native); stroke-width: 3.5; stroke-dasharray: 0.1 7; }
.pitch-mine { stroke: var(--pitch-mine); stroke-width: 3; }
.sounds {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1.35fr 1fr;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin-top: 4px;
  text-align: center;
}
.sound {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 4px 0 6px;
  border-radius: 12px;
}
.sound .letter {
  color: var(--sound-letter);
  font-size: 1.875rem;
  font-weight: 500;
  line-height: 1.1;
}
.sound .letter::after {
  content: "";
  display: block;
  width: 1.3em;
  height: 3px;
  margin: 6px auto 0;
  border-radius: 2px;
  background: var(--sound-rule);
}
.sound .score { color: var(--sound-score); font-size: 1rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.sound.is-close .letter::after { background: var(--text-muted); opacity: 0.6; }
/* The marked sound: a dashed box, and a jagged line in place of the line under the letter. */
.sound.is-off { outline: 2px dashed var(--sound-off); outline-offset: -2px; }
.sound.is-off .letter, .sound.is-off .score { color: var(--sound-off); }
.sound.is-off .letter::after { display: none; }
.zig { fill: none; stroke: var(--sound-off); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; margin-top: 3px; }

.tip { display: flex; flex-direction: column; gap: 4px; font-size: 0.9375rem; line-height: 1.45; }
.tip-head { color: var(--text-heading); font-weight: 700; font-size: 1rem; }
.tip-sound { color: var(--tip-sound); margin-left: 6px; }

.bars { display: flex; flex-direction: column; gap: 6px; }
.bars ul { display: flex; flex-direction: column; gap: 4px; list-style: none; padding: 0; }
.bars li { display: grid; grid-template-columns: 1.8rem 1fr 2rem 2.6rem; gap: 10px; align-items: center; font-size: 0.9375rem; }
.bar-letter { color: var(--sound-letter); font-weight: 600; }
.bar { position: relative; height: 8px; border-radius: 4px; background: var(--bar-track); }
.bar::after { content: ""; position: absolute; left: 80%; top: -3px; width: 2px; height: 14px; background: var(--bar-pass-line); }
.bar i { display: block; height: 100%; border-radius: 4px; background: var(--bar-fill); }
.bar .w97 { width: 97%; }
.bar .w100 { width: 100%; }
.bar-num { color: var(--sound-score); font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.bar-word { color: var(--text-muted); }

.panel {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: auto;
  padding: 16px;
  border-radius: 22px;
}
.panel-head { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-left: 2px; }
.panel-again { background: var(--panel-again-bg); }
.panel-pass { background: var(--panel-pass-bg); }
.panel-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.verdict { font-family: var(--font-display); font-size: 2.125rem; line-height: 1.05; }
.panel-again .verdict { color: var(--verdict-again); }
.panel-pass .verdict { color: var(--verdict-pass); font-size: clamp(2rem, 10vw, 2.5rem); }
.reason { color: var(--panel-reason); font-size: 0.9375rem; }
.badge {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--badge-bg);
  color: var(--badge-text);
  font-size: 0.8125rem;
  font-weight: 650;
}
.badge svg { fill: currentColor; }
.ring { flex: none; width: 68px; height: 68px; overflow: visible; }
.ring circle { fill: none; stroke-width: 7; }
.ring .ring-arc { stroke-linecap: round; }
.panel-again .ring-track { stroke: var(--ring-again-track); }
.panel-again .ring-arc { stroke: var(--ring-again); --arc: 62.1; }
.panel-pass .ring-track { stroke: var(--ring-pass-track); }
.panel-pass .ring-arc { stroke: var(--ring-pass); --arc: 150.3; }
.ring .ring-disc { fill: var(--ring-pass-disc); stroke: none; }
.ring-tick { stroke: var(--ring-tick); stroke-width: 3; stroke-linecap: round; }
.ring-num { fill: var(--ring-number); font-family: var(--font-body); font-size: 19px; font-weight: 600; }
.panel-pass .ring-num { fill: var(--ring-pass-number); }

/* The panel's controls, drawn as the app draws them: Native, Mine and Both as one grouped control, then
   Try again and Next word. They are pictures of buttons, so the page hides them from screen readers. */
.demo-listen {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1.5px solid var(--pill-stroke);
  border-radius: 999px;
  background: var(--pill-bg);
  overflow: hidden;
}
.demo-listen span {
  padding: 7px 4px;
  color: var(--pill-text);
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
}
.demo-listen span + span { border-left: 1px solid var(--section-rule); }
.demo-listen span::before { content: "▷ "; font-size: 0.75em; }
.demo-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.demo-buttons span {
  padding: 9px 6px;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 650;
  text-align: center;
}
.demo-try { background: var(--button-bg); color: var(--button-text); box-shadow: 0 3px 0 var(--button-edge); }
.demo-next, .panel-pass .demo-try { border: 1.5px solid var(--pill-stroke); background: var(--pill-bg); color: var(--pill-text); box-shadow: 0 3px 0 var(--item-rule); }
.panel-pass .demo-next { border-color: var(--verdict-pass); background: var(--verdict-pass); color: var(--button-text); box-shadow: 0 3px 0 var(--verdict-pass-edge); }

/* The top of the Practice screen: the language chip, the word count, the round's progress. */
.demo-top { display: flex; justify-content: space-between; gap: 8px; }
.demo-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--take-label-bg);
  color: var(--text-heading);
  font-size: 0.8125rem;
  font-weight: 600;
}
.demo-chip .flag { width: auto; height: 11px; border-radius: 2px; }
.demo-chip svg:not(.flag) { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.demo-progress { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; margin-block: 12px 14px; }
.demo-progress i { height: 5px; border-radius: 3px; background: var(--section-rule); }
.demo-progress .is-pass { background: var(--verdict-pass); }
.demo-progress .is-miss { background: var(--text-muted); }
.demo-progress .is-now { background: var(--text-heading); }

/* The tab bar: Practice is the open tab. */
.demo-tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin-top: 14px;
  padding: 6px;
  border-radius: 22px;
  background: var(--chart-bg);
  list-style: none;
}
.demo-tabs li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 5px 0 4px;
  border-radius: 16px;
  color: var(--text-heading);
  font-size: 0.625rem;
  font-weight: 600;
}
.demo-tabs li.is-on { background: var(--take-label-bg); }
/* A language without phrases (de_DE, pt_BR, en_US) has four tabs. */
.demo-tabs-4 { grid-template-columns: repeat(4, 1fr); }
.demo-tabs svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.sparks, .confetti { position: absolute; pointer-events: none; }
.sparks { right: 50px; top: 50%; width: 0; height: 0; }
.sparks i, .confetti i { position: absolute; display: block; opacity: 0; }
.sparks i { width: 8px; height: 8px; margin: -4px; border-radius: 50%; background: var(--spark-a); }
.sparks i:nth-child(even) { background: var(--spark-b); }
.sparks i:nth-child(1) { --x: 0px; --y: -54px; }
.sparks i:nth-child(2) { --x: 38px; --y: -38px; }
.sparks i:nth-child(3) { --x: 54px; --y: 0px; }
.sparks i:nth-child(4) { --x: 38px; --y: 38px; }
.sparks i:nth-child(5) { --x: 0px; --y: 54px; }
.sparks i:nth-child(6) { --x: -38px; --y: 38px; }
.sparks i:nth-child(7) { --x: -54px; --y: 0px; }
.sparks i:nth-child(8) { --x: -38px; --y: -38px; }
.confetti { inset: -30px -8px 40% -8px; overflow: hidden; }
.confetti i { top: 0; width: 9px; height: 5px; border-radius: 1px; background: var(--confetti-1); }
.confetti i:nth-child(5n + 2) { background: var(--confetti-2); }
.confetti i:nth-child(5n + 3) { background: var(--confetti-3); }
.confetti i:nth-child(5n + 4) { background: var(--confetti-4); }
.confetti i:nth-child(5n + 5) { background: var(--confetti-5); }
.confetti i:nth-child(1) { left: 6%; --fall: 210px; --spin: 300deg; }
.confetti i:nth-child(2) { left: 14%; --fall: 160px; --spin: -240deg; }
.confetti i:nth-child(3) { left: 22%; --fall: 230px; --spin: 420deg; }
.confetti i:nth-child(4) { left: 31%; --fall: 180px; --spin: -360deg; }
.confetti i:nth-child(5) { left: 39%; --fall: 250px; --spin: 200deg; }
.confetti i:nth-child(6) { left: 47%; --fall: 170px; --spin: -300deg; }
.confetti i:nth-child(7) { left: 55%; --fall: 220px; --spin: 380deg; }
.confetti i:nth-child(8) { left: 63%; --fall: 190px; --spin: -200deg; }
.confetti i:nth-child(9) { left: 71%; --fall: 240px; --spin: 260deg; }
.confetti i:nth-child(10) { left: 79%; --fall: 165px; --spin: -420deg; }
.confetti i:nth-child(11) { left: 87%; --fall: 215px; --spin: 340deg; }
.confetti i:nth-child(12) { left: 94%; --fall: 185px; --spin: -280deg; }

/* The pause control is a checkbox, so it works without the script. It shows only when the example moves.
   The checkbox is hidden, as are the radio buttons of the tour and the mouth section: their labels are the controls. */
.demo-toggle, .tour-radio, .mouth-radio, .code-radio { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.demo-pause { display: none; }
.when-paused { display: none; }

/* Without motion (Reduce Motion), both tries stand one under the other and nothing moves. With
   motion, the two tries share one place and play as a 14 second loop: the first try scores sound
   by sound and ends on Again, then the second try ends on Shablau!. */
@media (prefers-reduced-motion: reduce) {
  .take-pass { padding-top: 24px; border-top: 1px solid var(--section-rule); }
  .confetti { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .demo-stage { gap: 0; }
  .demo-stage > .take { grid-area: 1 / 1; }
  .take-again { animation: take-first 14s infinite; }
  .take-pass { animation: take-second 14s infinite; }
  .take .pitch-mine { stroke-dasharray: 340; animation: draw 14s infinite; }
  .take .s1 { animation: sound-1 14s infinite; }
  .take .s2 { animation: sound-2 14s infinite; }
  .take .s3 { animation: sound-3 14s infinite; }
  .take .s4 { animation: sound-4 14s infinite; }
  .take-again .sound.is-off { animation: sound-2 14s infinite, mark 14s infinite; }
  .take-again .tip { animation: tip-in 14s infinite; }
  .take-pass .bars { animation: bars-in 14s infinite; }
  .take-pass .bar i { transform-origin: left center; animation: bar-grow 14s infinite; }
  .panel-again { animation: panel-again 14s infinite; }
  .panel-pass { animation: panel-pass 14s infinite; }
  .ring-arc { animation: ring 14s infinite; }
  .take-pass .ring-arc { animation-name: ring-pass; }
  .sparks i { animation: spark 14s infinite; }
  .confetti i { animation: confetti 14s infinite; }

  /* Under the phone, so it never covers the screen's own chips. */
  .demo { padding-bottom: 52px; }
  .demo-pause {
    position: absolute;
    bottom: 0;
    left: 50%;
    translate: -50% 0;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 4px 12px;
    border: 1.5px solid var(--pill-stroke);
    border-radius: 999px;
    background: var(--demo-pause-bg);
    color: var(--pill-text);
    font-size: 0.8125rem;
    font-weight: 650;
    cursor: pointer;
  }
  .demo-toggle:focus-visible + .demo-pause { outline: 2px solid var(--focus-ring); outline-offset: 3px; }
  .demo:has(.demo-toggle:checked) .when-running { display: none; }
  .demo:has(.demo-toggle:checked) .when-paused { display: inline; }
  .demo:has(.demo-toggle:checked) .demo-stage *,
  .demo:has(.demo-toggle:checked) .demo-stage,
  .js .demo:not(.is-live) .demo-stage *,
  .js .demo:not(.is-live) .demo-stage { animation-play-state: paused; }
}

/* Timeline, as shares of 14 s: first try 0 to 48 %, second try 50 to 97 %. */
@keyframes take-first {
  0%, 46% { opacity: 1; visibility: visible; }
  49%, 100% { opacity: 0; visibility: hidden; }
}
@keyframes take-second {
  0%, 49% { opacity: 0; visibility: hidden; }
  51%, 96% { opacity: 1; visibility: visible; }
  99%, 100% { opacity: 0; visibility: hidden; }
}
@keyframes draw {
  0%, 2% { stroke-dashoffset: 340; }
  11%, 49% { stroke-dashoffset: 0; }
  50%, 52% { stroke-dashoffset: 340; }
  61%, 100% { stroke-dashoffset: 0; }
}
@keyframes sound-1 {
  0%, 12% { opacity: 0; translate: 0 8px; }
  13.5%, 49% { opacity: 1; translate: 0 0; }
  50%, 62% { opacity: 0; translate: 0 8px; }
  63.5%, 100% { opacity: 1; translate: 0 0; }
}
@keyframes sound-2 {
  0%, 14% { opacity: 0; translate: 0 8px; }
  15.5%, 49% { opacity: 1; translate: 0 0; }
  50%, 64% { opacity: 0; translate: 0 8px; }
  65.5%, 100% { opacity: 1; translate: 0 0; }
}
@keyframes sound-3 {
  0%, 16% { opacity: 0; translate: 0 8px; }
  17.5%, 49% { opacity: 1; translate: 0 0; }
  50%, 66% { opacity: 0; translate: 0 8px; }
  67.5%, 100% { opacity: 1; translate: 0 0; }
}
@keyframes sound-4 {
  0%, 18% { opacity: 0; translate: 0 8px; }
  19.5%, 49% { opacity: 1; translate: 0 0; }
  50%, 68% { opacity: 0; translate: 0 8px; }
  69.5%, 100% { opacity: 1; translate: 0 0; }
}
@keyframes mark {
  0%, 21% { outline-color: transparent; }
  23%, 100% { outline-color: var(--sound-off); }
}
@keyframes tip-in {
  0%, 26% { opacity: 0; translate: 0 8px; }
  28.5%, 100% { opacity: 1; translate: 0 0; }
}
@keyframes bars-in {
  0%, 69% { opacity: 0; translate: 0 8px; }
  71%, 100% { opacity: 1; translate: 0 0; }
}
@keyframes bar-grow {
  0%, 69% { scale: 0 1; }
  74%, 100% { scale: 1 1; }
}
@keyframes panel-again {
  0%, 21% { opacity: 0; translate: 0 18px; }
  23.5%, 100% { opacity: 1; translate: 0 0; }
}
@keyframes panel-pass {
  0%, 71% { opacity: 0; translate: 0 18px; scale: 1; }
  73% { opacity: 1; translate: 0 0; scale: 1.04; background-color: var(--panel-pass-pulse); }
  76% { scale: 1; }
  80%, 100% { opacity: 1; translate: 0 0; background-color: var(--panel-pass-bg); }
}
@keyframes ring {
  0%, 22% { stroke-dashoffset: var(--arc); }
  27%, 100% { stroke-dashoffset: 0; }
}
@keyframes ring-pass {
  0%, 72% { stroke-dashoffset: var(--arc); }
  77%, 100% { stroke-dashoffset: 0; }
}
@keyframes spark {
  0%, 74% { opacity: 0; transform: translate(0, 0) scale(0.4); }
  75% { opacity: 1; }
  81% { opacity: 0; transform: translate(var(--x), var(--y)) scale(1); }
  100% { opacity: 0; }
}
@keyframes confetti {
  0%, 72% { opacity: 0; transform: translate(0, 0) rotate(0); }
  73% { opacity: 1; }
  90% { opacity: 1; }
  95%, 100% { opacity: 0; transform: translate(0, var(--fall)) rotate(var(--spin)); }
}

/* On phones the example is smaller, so that the whole screen fits in the browser window. */
@media (max-width: 599px) {
  .demo-screen { padding: 14px 12px 12px; border-width: 6px; border-radius: 36px; }
  .demo-word { display: flex; align-items: baseline; gap: 10px; }
  .demo-word .word { font-size: 2.5rem; }
  .demo-word .gloss { margin-top: 0; font-size: 1rem; }
  .demo-stage { margin-top: 10px; }
  .take { gap: 8px; }
  .take-label { padding: 2px 9px; font-size: 0.75rem; }
  .chart { padding: 6px 8px 8px; border-radius: 14px; }
  .sound { gap: 2px; padding-block: 2px 4px; }
  .sound .letter { font-size: 1.5rem; }
  .sound .letter::after { margin-top: 4px; }
  .sound .score { font-size: 0.9375rem; }
  .tip { gap: 2px; font-size: 0.875rem; line-height: 1.4; }
  .tip-head { font-size: 0.9375rem; }
  .bars { gap: 4px; }
  .bars ul { gap: 0; }
  .bars li { font-size: 0.875rem; line-height: 1.45; }
  .panel { gap: 8px; padding: 12px 12px 12px 14px; border-radius: 18px; }
  .verdict { font-size: 1.75rem; }
  .panel-pass .verdict { font-size: 2rem; }
  .reason { font-size: 0.875rem; }
  .badge { margin-top: 2px; }
  .ring { width: 56px; height: 56px; }
}

/* Native recordings. Without the script the browser's own player shows; the script swaps in a
   play button. */
.clip audio { width: 100%; max-width: 280px; height: 40px; }
.js .clip audio { display: none; }
.play {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 20px 8px 14px;
  border: 2px solid var(--pill-stroke);
  border-radius: 999px;
  background: var(--pill-bg);
  color: var(--pill-text);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  box-shadow: 0 3px 0 var(--pill-stroke);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.play:active { transform: translateY(3px); box-shadow: 0 0 0 var(--pill-stroke); }
.play[hidden] { display: none; }
.play svg { flex: none; fill: currentColor; }
.play .icon-stop { display: none; }
.play.is-playing .icon-play { display: none; }
.play.is-playing .icon-stop { display: inline; }
.clip-inline { margin-top: 8px; }
.play-round {
  width: 56px;
  height: 56px;
  padding: 0;
  justify-content: center;
  border-color: var(--play-bg);
  background: var(--play-bg);
  color: var(--play-icon);
}
.play-round svg { margin-left: 2px; }
.play-round.is-playing svg { margin-left: 0; }

/* ---- Sounds ---- */

.sounds-section { background: var(--footer-bg); border-block: 1px solid var(--section-rule); }
.pair { display: grid; gap: 48px; margin-top: 48px; }
@media (min-width: 760px) {
  .pair { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(40px, 6vw, 80px); }
}
.pair-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--item-rule);
}
.pair-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.pair-word { color: var(--text-heading); font-family: var(--font-display); font-size: clamp(3.5rem, 8vw, 5rem); line-height: 1; }
.pair-gloss { color: var(--text-muted); margin-top: 4px; }
.pair-item h3 { font-size: 1.1875rem; margin-top: 8px; }
.length { display: flex; gap: 4px; height: 44px; margin-top: 8px; }
.length-seg {
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--length-consonant);
  color: var(--length-consonant-text);
  font-weight: 650;
}
.seg-t, .seg-k { flex: 0 0 44px; }
.seg-a { background: var(--length-vowel); color: var(--length-vowel-text); }
/* Widths in proportion to the a in each recording: 305 ms in tak, 90 ms in tack, on a 0 to 360 ms scale. */
.seg-a-long { flex: 0 0 calc((100% - 96px) * 305 / 360); }
.seg-a-short { flex: 0 0 max(40px, calc((100% - 96px) * 90 / 360)); }
.length-label { color: var(--text-muted); font-size: 0.9375rem; }
/* A pair that differs in one sound, not in length (three and tree): equal parts, the sound that differs dark. */
.length-even .length-seg { flex: 1 1 0; }
.length-even .seg-on { background: var(--length-vowel); color: var(--length-vowel-text); }
@media (prefers-reduced-motion: no-preference) {
  .js .pair-item .seg-a { transform-origin: left center; transition: scale 0.9s 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); }
  .js .pair-item:not(.is-in) .seg-a { scale: 0.15 1; }
}
.more-sounds { margin-top: 64px; }
.more-sounds h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.625rem; text-wrap: balance; }
/* The words share one column, as wide as the longest word (subgrid), so "father" does not break in two. */
.sound-list {
  display: grid;
  grid-template-columns: minmax(4.6rem, max-content) minmax(0, 1fr);
  list-style: none;
  padding: 0;
  margin-top: 20px;
  border-bottom: 1px solid var(--item-rule);
}
.sound-list li {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 4.6rem minmax(0, 1fr);
  grid-template-columns: subgrid;
  gap: 12px;
  align-items: baseline;
  padding-block: 14px;
  border-top: 1px solid var(--item-rule);
}
@media (min-width: 600px) {
  .sound-list { grid-template-columns: minmax(8rem, max-content) minmax(0, 1fr); }
}
@media (min-width: 900px) {
  .sound-list { grid-template-columns: repeat(5, minmax(0, 1fr)); column-gap: 28px; border-bottom: 0; }
  .sound-list li { display: flex; flex-direction: column; grid-column: auto; gap: 6px; padding-block: 18px 0; }
}
.sl-word { color: var(--sound-list-word); font-family: var(--font-display); font-size: 1.625rem; line-height: 1.1; }
.sl-what { font-size: 0.9375rem; line-height: 1.45; }

/* ---- The app tour ----
   Five radio buttons drive the panels without a script: the checked one shows its panel and lights its tab.
   scripts/tour.mjs writes the tour and, with scripts/tabs.mjs, the rules for the checked tab; they are added to
   the end of this stylesheet. The tab bar copies the app's: a pale pill with the open tab on a darker chip.
   The mouth section's words work the same way. */

.tour, .mouth { display: grid; gap: 28px; margin-top: 40px; }
.tour-bar {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  justify-self: center;
  width: min(100%, 560px);
  padding: 6px;
  border-radius: 999px;
  background: var(--chart-bg);
  box-shadow: inset 0 0 0 1px var(--section-rule);
}
.tour-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 2px 7px;
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 650;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
.tour-tab:hover { color: var(--text-heading); }
.tour-tab svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (min-width: 600px) { .tour-tab { font-size: 0.875rem; } }
.tour-panel { display: none; gap: 32px; align-items: center; }
.tour-panel > .phone { width: min(72vw, 300px); justify-self: center; }
.tour-text { display: flex; flex-direction: column; gap: 14px; max-width: 34em; }
.tour-text h3 { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.75rem, 4vw, 2.5rem); line-height: 1.1; color: var(--text-heading); }
.tour-lead { font-size: 1.1875rem; line-height: 1.45; color: var(--text-heading); }
.tour-facts { display: flex; flex-direction: column; list-style: none; padding: 0; border-bottom: 1px solid var(--item-rule); }
.tour-facts li { padding: 11px 0 11px 26px; border-top: 1px solid var(--item-rule); position: relative; }
.tour-facts li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 1.05em;
  width: 12px;
  height: 12px;
  background: var(--hero-fact-mark);
  clip-path: polygon(14% 52%, 0 66%, 38% 100%, 100% 22%, 86% 8%, 38% 72%);
}
@media (min-width: 860px) {
  .tour-panel { grid-template-columns: 320px minmax(0, 1fr); gap: 72px; padding-inline: clamp(0px, 4vw, 64px); }
  .tour-panel > .phone { width: 100%; }
}
@media (prefers-reduced-motion: no-preference) {
  .tour-panel > .phone { animation: tour-in 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
}
@keyframes tour-in { from { translate: 0 16px; opacity: 0; } }
/* A tab's further screens, under its facts: one row that scrolls sideways when it does not fit. */
.tour-more {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(40vw, 176px);
  gap: 20px;
  list-style: none;
  padding: 6px 4px 28px;
  margin-top: 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}
.tour-text { min-width: 0; }
@media (min-width: 860px) { .tour-panel:has(.tour-more) { align-items: start; } }
.tour-more li { display: flex; flex-direction: column; gap: 12px; scroll-snap-align: start; }
.tour-more p { color: var(--text-muted); font-size: 0.9375rem; line-height: 1.4; }

/* ---- Privacy ---- */

.privacy-section { background: var(--privacy-bg); color: var(--privacy-text); }
.join-section { background: var(--join-bg); }
.privacy-section h2 { color: var(--privacy-heading); }
.privacy-section .kicker-on-ink { color: var(--privacy-kicker); }
.privacy-facts {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  max-width: 40rem;
  list-style: none;
  padding: 0;
  margin-top: 48px;
  border-bottom: 1px solid var(--privacy-rule);
}
.privacy-facts li {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  column-gap: 20px;
  row-gap: 6px;
  padding-block: 24px;
  border-top: 1px solid var(--privacy-rule);
}
.privacy-facts li > * { grid-column: 2; }
.privacy-facts li > svg { grid-column: 1; grid-row: 1 / span 2; }
@media (min-width: 900px) {
  .privacy-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 48px; max-width: none; margin-top: 56px; border-bottom: 0; }
  .privacy-facts li { display: flex; flex-direction: column; gap: 8px; padding-block: 28px 0; }
}
.privacy-facts svg { fill: none; stroke: var(--privacy-icon); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (min-width: 900px) {
  .privacy-facts svg { margin-bottom: 10px; }
}
.privacy-facts h3 { color: var(--privacy-heading); font-size: 1.1875rem; }
.privacy-link { margin-top: 36px; }
.privacy-link a { color: var(--privacy-link); font-weight: 600; text-decoration-color: var(--privacy-link-underline); }
.privacy-link a:focus-visible { outline-color: var(--privacy-focus-ring); }

/* ---- Shablau! (the pass moment) ---- */

/* The pass section: one word from Again to Word learned (scripts/pass.mjs). Mint ground, so the section is
   the colour of a pass; the Again step stays warm sand, so a miss never reads as red. */
.pass-section {
  --pass-bg: #ddeee2;
  --pass-kicker: #1f5a40;
  --pass-green: #1f6a45;
  --pass-final-bg: #b9e0c6;
  --pass-again-bg: #fbe7cf;
  --pass-again: #8a4b10;
  --pass-card: #ffffff;
  --pass-ink: #1e2230;
  background: var(--pass-bg);
  overflow: clip;
}
.pass-section .kicker { color: var(--pass-kicker); }
.pass-head { display: grid; gap: 18px; }
.pass-title { display: flex; flex-direction: column; gap: 14px; }
.pass-title h2 { font-size: clamp(2.5rem, 7vw, 4rem); line-height: 1.02; }
.pass-again { color: var(--pass-again); }
.pass-word { color: var(--pass-green); white-space: nowrap; }
.pass-lead { font-size: 1.1875rem; line-height: 1.5; color: var(--text-heading); max-width: 34em; }
.pass-example { font-weight: 700; }
.pass-journey { position: relative; margin-top: 64px; }
.pass-path { display: none; }
.pass-steps { list-style: none; padding: 0; display: grid; gap: 56px; max-width: 420px; }
.pass-step {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 20px 22px;
  border: 2px solid var(--pass-ink);
  border-radius: 24px;
  background: var(--pass-card);
  box-shadow: 0 4px 0 var(--pass-ink);
}
.pass-step-1 { background: var(--pass-again-bg); }
.pass-step-4 { background: var(--pass-final-bg); box-shadow: 0 6px 0 var(--pass-ink); }
.pass-step-art { position: absolute; right: -4px; top: -44px; width: 96px; height: 96px; }
.pass-step-4 .pass-step-art { width: 104px; height: 104px; }
.pass-step-raven { right: -6px; top: -84px; width: 112px; height: 112px; }
.pass-when { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); padding-right: 72px; }
.pass-verdict { font-family: var(--font-display); font-size: 2.125rem; line-height: 1; color: var(--pass-green); }
.pass-step-1 .pass-verdict { color: var(--pass-again); }
.pass-what { font-size: 1rem; line-height: 1.4; }
.pass-what strong { color: var(--text-heading); }
.pass-raven { display: block; width: min(80%, 320px); margin: 24px 0 0 auto; }
.pass-foot { display: flex; flex-direction: column; gap: 8px; margin-top: 40px; padding-top: 28px; border-top: 2px solid var(--pass-ink); }
.pass-foot-title { font-family: var(--font-display); font-size: 1.5rem; color: var(--text-heading); }
.pass-foot p:last-child { font-size: 1.0625rem; max-width: 40em; }
@media (min-width: 760px) {
  .pass-head { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: end; column-gap: 56px; }
}
@media (min-width: 1000px) {
  .pass-journey { height: 560px; margin-top: 56px; }
  .pass-path { display: block; position: absolute; inset: 0; width: 100%; height: 100%; }
  .pass-path path { fill: none; stroke: var(--pass-ink); stroke-width: 3; stroke-dasharray: 2 12; stroke-linecap: round; vector-effect: non-scaling-stroke; }
  .pass-steps { position: relative; max-width: none; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 44px; align-items: start; }
  .pass-step-1 { margin-top: 250px; }
  .pass-step-2 { margin-top: 150px; }
  .pass-step-3 { margin-top: 250px; }
  .pass-step-4 { margin-top: 60px; }
  .pass-step-art { right: -16px; }
  .pass-step-raven { right: -6px; }
  .pass-raven { position: absolute; right: -24px; bottom: -14px; width: 300px; margin: 0; }
  .pass-foot { flex-direction: row; align-items: baseline; gap: 32px; }
  .pass-foot-title { flex-shrink: 0; }
}
@media (prefers-reduced-motion: no-preference) {
  /* the raven springs up and the steps rise in turn as the journey comes into view */
  .js .pass-journey .pass-raven, .js .pass-journey .pass-step {
    transition: translate 0.7s cubic-bezier(0.3, 1.4, 0.5, 1), opacity 0.4s ease-out;
  }
  .js .pass-journey .pass-step-2 { transition-delay: 0.12s; }
  .js .pass-journey .pass-step-3 { transition-delay: 0.24s; }
  .js .pass-journey .pass-step-4 { transition-delay: 0.36s; }
  .js .pass-journey .pass-raven { transform-origin: 50% 100%; transition-delay: 0.5s; }
  .js .pass-journey:not(.is-in) .pass-step { translate: 0 24px; opacity: 0; }
  .js .pass-journey:not(.is-in) .pass-raven { translate: 0 36px; }
}

/* ---- Join ---- */

.join-layout {
  position: relative;
  display: grid;
  gap: 32px;
  justify-items: center;
}
.join-raven { position: relative; width: min(52%, 220px); }
.join-text { position: relative; }
.join-confetti { position: absolute; inset: 0; pointer-events: none; }
.join-confetti i { position: absolute; width: 12px; height: 7px; border-radius: 2px; background: var(--confetti-1); }
.join-confetti i:nth-child(5n + 2) { background: var(--confetti-2); }
.join-confetti i:nth-child(5n + 3) { background: var(--confetti-3); }
.join-confetti i:nth-child(5n + 4) { background: var(--confetti-4); }
.join-confetti i:nth-child(5n + 5) { background: var(--confetti-1); }
.join-confetti i:nth-child(1) { left: 5%; top: 8%; rotate: 24deg; }
.join-confetti i:nth-child(2) { left: 16%; top: 3%; rotate: -30deg; }
.join-confetti i:nth-child(3) { left: 27%; top: 11%; rotate: 60deg; }
.join-confetti i:nth-child(4) { left: 3%; top: 40%; rotate: -12deg; }
.join-confetti i:nth-child(5) { left: 33%; top: 30%; rotate: 40deg; }
.join-confetti i:nth-child(6) { right: 4%; top: 5%; rotate: -50deg; }
.join-confetti i:nth-child(7) { right: 14%; top: 2.5%; rotate: 15deg; }
.join-confetti i:nth-child(8) { left: 2%; bottom: 22%; rotate: 70deg; }
.join-confetti i:nth-child(9) { left: 9%; bottom: 6%; rotate: -64deg; }
.join-confetti i:nth-child(10) { left: 30%; bottom: 4%; rotate: 20deg; }
@media (max-width: 759px) {
  .join-confetti i:nth-child(4), .join-confetti i:nth-child(n + 8) { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .js .join-layout .join-confetti i { transition: translate 0.9s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.6s ease; }
  .js .join-layout:not(.is-in) .join-confetti i { translate: 0 -40px; opacity: 0; }
}
.join-text { display: flex; flex-direction: column; gap: 16px; max-width: 34em; }
.join-text h2 { font-size: clamp(2.5rem, 7vw, 4rem); }
@media (min-width: 760px) {
  .join-layout { grid-template-columns: minmax(200px, 0.7fr) 1.3fr; align-items: center; justify-items: start; gap: 64px; }
  .join-raven { width: 100%; max-width: 300px; justify-self: center; }
}
.join-steps { list-style: none; padding: 0; counter-reset: join; border-bottom: 1px solid var(--join-rule); }
.join-steps li {
  display: grid;
  grid-template-columns: 1.75rem minmax(0, 1fr);
  align-items: baseline;
  gap: 12px;
  padding-block: 12px;
  border-top: 1px solid var(--join-rule);
  color: var(--text-heading);
  font-weight: 550;
  counter-increment: join;
}
.join-steps li::before {
  content: counter(join);
  color: var(--join-step-number);
  font-family: var(--font-display);
  font-size: 1.625rem;
  font-weight: 400;
  line-height: 1;
}
/* The join section's store links: the App Store and, once it is live, Google Play, side by side. */
.join-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 8px; }
.join-note { color: var(--text-body); font-size: 0.9375rem; }

/* ---- Credits ---- */

/* The credits page: one row per speaker, with every file in a <details> under it. */
.credits h3 { margin-top: 28px; }
.legal .credit-list { list-style: none; padding: 0; font-size: 0.9375rem; }
.credit-list > li { padding-block: 8px; border-top: 1px solid var(--item-rule); }
.credit-list summary { cursor: pointer; }
.legal .credit-files { margin: 8px 0 4px; padding-left: 1.25rem; color: var(--text-muted); font-size: 0.875rem; overflow-wrap: anywhere; }
.credit-files li + li { margin-top: 4px; }
.credit-item { color: var(--text-heading); font-weight: 600; }

/* ---- Inner pages: privacy, support, 404 ---- */

.page { padding-block: clamp(40px, 6vw, 80px) clamp(56px, 8vw, 104px); }
.page-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 40px; padding-bottom: 32px; border-bottom: 1px solid var(--section-rule); }
.page h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.5rem, 6vw, 3.75rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.page-lead { font-size: 1.1875rem; max-width: 34em; }
.updated { color: var(--text-muted); font-size: 0.9375rem; }

.page-body { display: flex; flex-wrap: wrap; gap: 40px 64px; align-items: flex-start; }
.legal, .faq { flex: 999 1 560px; min-width: 0; max-width: 720px; }

.toc { flex: 1 1 220px; max-width: 280px; }
@media (min-width: 900px) {
  .toc { position: sticky; top: 88px; }
}
.toc-label { color: var(--text-muted); font-size: 0.875rem; font-weight: 600; margin-bottom: 10px; }
.toc ol { list-style: none; padding: 0; margin: 0; font-size: 0.9375rem; line-height: 1.35; }
.toc a {
  display: block;
  padding: 6px 0 6px 14px;
  border-left: 2px solid var(--toc-rule);
  color: var(--text-body);
  text-decoration: none;
}
.toc a:hover { border-left-color: var(--toc-rule-hover); color: var(--text-heading); }

.legal { line-height: 1.65; }
.legal .intro {
  padding-left: 20px;
  border-left: 3px solid var(--accent-line);
  font-size: 1.1875rem;
  color: var(--text-heading);
}
.legal h2 {
  margin-top: 48px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.75rem;
  line-height: 1.2;
}
.legal p, .legal ul { margin-top: 14px; }
.legal ul { padding-left: 1.25rem; }
.legal li + li { margin-top: 8px; }
.legal strong { color: var(--text-heading); font-weight: 600; }

/* The press page's screenshots: a grid of phone screens, each linking to its full-size PNG. */
.legal .press-shots { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 24px 16px; }
.press-shots li { margin: 0; display: flex; flex-direction: column; gap: 8px; color: var(--text-muted); font-size: 0.875rem; line-height: 1.35; }
.legal .press-shots li + li { margin-top: 0; }
.press-shots img { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--item-rule); }

.faq { display: flex; flex-direction: column; }
.faq > h2, .contact h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.75rem;
  line-height: 1.2;
}
.faq > h2 { margin-bottom: 16px; }
.faq details { border-top: 1px solid var(--item-rule); }
.faq details:last-of-type { border-bottom: 1px solid var(--item-rule); }
.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-block: 20px;
  color: var(--text-heading);
  font-size: 1.0625rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; color: var(--list-numeral); font-size: 1.375rem; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p, .faq details ol { padding-bottom: 22px; margin: 0; }
.faq details ol { padding-left: 1.25rem; }
.faq details li + li { margin-top: 6px; }

.contact {
  flex: 1 1 280px;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-left: 22px;
  border-left: 3px solid var(--accent-line);
}
.contact .button { align-self: flex-start; overflow-wrap: anywhere; }

.not-found { display: flex; flex-direction: column; gap: 16px; }

/* The phone icon and the sentence about recordings, from docs/design/paywall-2026-10-20/final (S9). */
.recordings-line {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  max-width: 31em;
  font-size: 0.9375rem;
  line-height: 1.5;
}
.recordings-line svg {
  margin-top: 2px;
  fill: none;
  stroke: var(--recordings-line-icon);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---- The Swedish home page and the code pages (body.easy) ----
   Same type scale as the English home page: section headings as .section h2, the hero heading as
   .hero h1, the lead as .lead, labels at 13-15 px. */

body.easy {
  --sv-ink: #1e2230;
  --sv-body: #3c4152;
  --sv-quiet: #575c6b;
  --sv-card: #ffffff;
  --sv-band: #f3dc97;
  --sv-rule: #d9d6ce;
  --sv-red: #9c3a2a;
  --sv-pine: #2f6b4f;
  --sv-pass-bg: #cfe8d6;
  --sv-again-bg: #f8ecd4;
  --sv-umber: #7a4e0e;
}
.sv-section h2, .sv-band h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 5.2vw, 3.125rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.sv-narrow { display: flex; flex-direction: column; gap: 16px; }
.sv-narrow > * { max-width: 40rem; }
.sv-section { padding-block: clamp(64px, 9vw, 120px); border-top: 1px solid var(--sv-rule); }
.sv-lead { font-size: clamp(1.1875rem, 2.4vw, 1.3125rem); line-height: 1.5; max-width: 31em; }
.sv-textlink { display: inline-flex; align-items: center; min-height: 48px; font-weight: 600; }

/* Hero */
.sv-hero { padding-block: clamp(32px, 6vw, 88px) clamp(56px, 8vw, 104px); }
.sv-hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) {
  .sv-hero-grid { grid-template-columns: 1.05fr 1fr; gap: 56px; }
}
.sv-hero-text { display: flex; flex-direction: column; gap: 20px; }
.sv-hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.875rem, 10.4vw, 2.75rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
@media (min-width: 600px) {
  .sv-hero h1 { font-size: clamp(2.75rem, 6.4vw, 3.875rem); }
}
.sv-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 6px; }
.sv-facts { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; }
.sv-facts li {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 12px; border: 1px solid var(--sv-rule); border-radius: 999px; background: var(--sv-card);
  font-size: 0.9375rem; font-weight: 550; color: var(--sv-ink);
}
.sv-facts li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--sv-pine); }

/* The bar scene: the order, and the answer in Spanish */
.sv-scene { position: relative; margin: 0; padding: 24px 20px 20px; border-radius: 24px; background: var(--sv-band); display: grid; gap: 16px; }
.sv-scene-raven { position: absolute; right: 12px; bottom: 16px; width: clamp(80px, 20%, 130px); }
.sv-bubbles { display: flex; flex-direction: column; gap: 14px; padding-right: clamp(64px, 20%, 130px); }
.sv-bubble {
  display: flex; flex-direction: column; gap: 2px; max-width: 24rem;
  padding: 12px 16px 14px; border-radius: 18px; background: var(--sv-card);
  border: 2px solid var(--sv-ink); box-shadow: 0 3px 0 var(--sv-ink);
}
.sv-bubble-you { border-bottom-left-radius: 6px; }
.sv-bubble-them { margin-left: clamp(16px, 8%, 48px); border-bottom-right-radius: 6px; background: var(--sv-pass-bg); }
.sv-who { font-size: 0.8125rem; font-weight: 700; color: var(--sv-quiet); }
.sv-es { font-family: var(--font-display); font-size: clamp(1.25rem, 2.6vw, 1.5rem); line-height: 1.2; color: var(--sv-ink); }
.sv-sv { font-size: 0.9375rem; color: var(--sv-body); }
.sv-scene figcaption { font-size: 0.9375rem; font-weight: 650; color: var(--sv-ink); padding-right: clamp(80px, 22%, 140px); min-height: 3em; }

/* How it works, with the example round */
.sv-band { background: var(--sv-card); border-top: 1px solid var(--sv-rule); padding-block: clamp(64px, 9vw, 120px); }
.sv-band-grid { display: grid; gap: 40px; align-items: start; }
@media (min-width: 960px) {
  .sv-band-grid { grid-template-columns: 1fr 1fr; gap: 56px; }
}
.sv-band-text { display: flex; flex-direction: column; gap: 16px; }
.sv-steps { display: flex; flex-direction: column; gap: 10px; padding-left: 1.5em; margin: 0; }
.sv-steps li { padding-left: 4px; }
.sv-steps li::marker { color: var(--sv-red); font-family: var(--font-display); }
.sv-pass-word { font-weight: 700; color: var(--sv-pine); }

.sv-takes { margin: 0; display: grid; gap: 14px; }
.sv-take { border-radius: 20px; padding: 16px 18px; background: var(--sv-again-bg); display: flex; flex-direction: column; gap: 8px; }
.sv-take-pass { background: var(--sv-pass-bg); }
.sv-take-label { font-size: 0.8125rem; font-weight: 650; color: var(--sv-quiet); }
.sv-word { font-family: var(--font-display); font-size: 2rem; line-height: 1; color: var(--sv-ink); }
.sv-sounds { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; }
.sv-sounds li {
  display: flex; flex-direction: column; align-items: center; min-width: 44px; padding: 4px 6px;
  border-radius: 10px; background: var(--sv-card); border: 1px solid var(--sv-rule);
}
.sv-sounds li span:first-child { font-family: var(--font-display); font-size: 1.25rem; color: var(--sv-ink); }
.sv-sounds li span:last-child { font-size: 0.9375rem; font-weight: 650; color: var(--sv-ink); }
.sv-sounds li.is-off { border: 2px solid var(--sv-umber); }
.sv-sounds li.is-off span:last-child { color: var(--sv-umber); }
.sv-sounds li.is-fixed { border: 2px solid var(--sv-pine); }
.sv-sounds li.is-fixed span:last-child { color: var(--sv-pine); }
.sv-reason { font-weight: 700; color: var(--sv-umber); }
.sv-tip { font-size: 0.9375rem; }
.sv-shablau { font-family: var(--font-display); font-size: 1.75rem; color: var(--sv-pine); }
.sv-takes figcaption { font-size: 0.875rem; color: var(--sv-quiet); }

/* Privacy */
.sv-privacy-box { display: flex; flex-direction: column; gap: 16px; border-left: 4px solid var(--sv-pine); padding-left: clamp(16px, 3vw, 28px); }

/* Meetups and codes */
.sv-meet-grid { display: grid; gap: 20px; }
@media (min-width: 860px) {
  .sv-meet-grid { grid-template-columns: 1.2fr 1fr; }
}
.sv-meet-card { display: flex; flex-direction: column; gap: 14px; padding: clamp(22px, 3.5vw, 36px); border-radius: 22px; background: var(--sv-card); border: 2px solid var(--sv-ink); }
.sv-meet-card h2 { font-size: clamp(1.625rem, 3.4vw, 2.125rem); }
.sv-code-card { background: var(--sv-band); }

/* FAQ: the same rows as the support page's .faq */
.sv-faq { display: flex; flex-direction: column; }
.sv-faq details { border-top: 1px solid var(--item-rule); }
.sv-faq details:last-of-type { border-bottom: 1px solid var(--item-rule); }
.sv-faq summary {
  display: flex; justify-content: space-between; gap: 16px; padding-block: 20px;
  color: var(--text-heading); font-size: 1.0625rem; font-weight: 600; cursor: pointer; list-style: none;
}
.sv-faq summary::-webkit-details-marker { display: none; }
.sv-faq summary::after { content: "+"; flex: none; color: var(--list-numeral); font-size: 1.375rem; line-height: 1; }
.sv-faq details[open] summary::after { content: "−"; }
.sv-faq details p { padding-bottom: 22px; max-width: 38em; }

/* Join */
.sv-join-grid { display: grid; gap: 28px; align-items: center; }
.sv-join-grid > div { display: flex; flex-direction: column; gap: 16px; }
.sv-join-raven { width: 160px; }
@media (min-width: 760px) {
  .sv-join-grid { grid-template-columns: 200px 1fr; }
  .sv-join-raven { width: 200px; }
}

/* Code pages */
.sv-code-page { border-top: 0; }
.sv-code-page h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(2.5rem, 6vw, 3.75rem); line-height: 1.05; letter-spacing: -0.01em; }
.sv-code-page h2 { font-size: 1.75rem; line-height: 1.2; margin-top: 16px; }
.sv-steps-big { gap: 12px; }
/* The code pages' iPhone and Android tabs: radio buttons (scripts/tabs.mjs), the pills as in the mouth section. */
.code-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.code-panel { display: none; gap: 16px; }

.sv-credit { margin-top: 24px; color: var(--text-muted); font-size: 0.875rem; }

/* The mouth section (#mouth). Colours are the app's LessonMouth tokens (Tokens+Lesson.swift); the
   drawings and the tab selectors come from scripts/mouth.mjs. */
:root {
  --mouth-card: #f7f4ec;
  --mouth-skin: #ebdccb;
  --mouth-air: #ffffff;
  --mouth-tongue: #d9867e;
  --mouth-lip: #c9776f;
  --mouth-inside: #3a2b31;
  --mouth-tooth: #fffdf6;
  --mouth-said: #7a4e0e;
  --mouth-nose: #56628f;
  --mouth-line: #1e2230;
  --tab-on-bg: #1e2230;
  --tab-on-text: #f5f3ee;
}
.mouth-section { background: var(--footer-bg); border-bottom: 1px solid var(--section-rule); }
.mouth-bar { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.mouth-tab, .code-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--item-rule);
  border-radius: 999px;
  background: var(--pill-bg);
  color: var(--text-heading);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
.mouth-tab:hover, .code-tab:hover { border-color: var(--text-heading); }
.mouth-tab svg { width: auto; height: 12px; border-radius: 2px; }
.mouth-panel { display: none; gap: 28px; padding: 28px; border-radius: 24px; background: var(--tile-bg); box-shadow: 0 0 0 1px var(--section-rule); }
.mouth-lang { color: var(--text-kicker); font-size: 0.8125rem; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; }
.mouth-spelling { font-family: var(--font-display); font-size: clamp(2.75rem, 7vw, 4rem); line-height: 1.05; color: var(--text-heading); }
.mouth-spelling mark { background: none; color: var(--mouth-said); text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 8px; }
.mouth-meaning { color: var(--text-muted); font-size: 1.0625rem; }
.mouth-figure { display: grid; gap: 24px; align-items: center; }
.mouth-side { width: min(100%, 360px); height: auto; justify-self: center; }
.mouth-side-text { display: flex; flex-direction: column; gap: 20px; }
.mouth-lips-row { display: flex; flex-wrap: wrap; gap: 16px; }
.mouth-lip { display: flex; flex-direction: column; gap: 6px; align-items: center; color: var(--text-muted); font-size: 0.875rem; }
.mouth-lip.is-said figcaption { color: var(--mouth-said); }
.mouth-lips { width: 120px; height: auto; }
.mouth-cues { display: flex; flex-direction: column; gap: 10px; list-style: none; padding: 0; }
.mouth-cues li { padding-left: 18px; position: relative; font-size: 1.125rem; line-height: 1.4; color: var(--text-heading); }
.mouth-cues li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 8px; height: 8px; border-radius: 50%; background: var(--mouth-line); }
@media (min-width: 760px) {
  .mouth-panel { grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr); align-items: center; padding: 40px; }
  .mouth-figure { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
}
.m-card { fill: var(--mouth-card); }
.m-skin { fill: var(--mouth-skin); }
.m-air { fill: var(--mouth-air); }
.m-palate { fill: var(--mouth-skin); stroke: var(--mouth-line); stroke-width: 1.6; stroke-linejoin: round; }
.m-tongue { fill: var(--mouth-tongue); }
.m-tooth { fill: var(--mouth-tooth); stroke: var(--mouth-line); stroke-width: 1.3; stroke-linejoin: round; }
.m-line { fill: none; stroke: var(--mouth-line); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.m-wall { stroke-width: 1.6; }
.m-tongue-line { stroke-width: 1.5; }
.m-said { fill: none; stroke: var(--mouth-said); stroke-width: 2.6; stroke-dasharray: 6 5; stroke-linecap: round; }
.m-nose, .m-nose-head { fill: none; stroke: var(--mouth-nose); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.m-nose { stroke-dasharray: 4 4; }
.m-mark { fill: var(--mouth-line); stroke: var(--mouth-air); stroke-width: 2.2; }
.m-lips-card { fill: var(--mouth-skin); }
.m-lips-said { fill: none; stroke: var(--mouth-said); stroke-width: 1.6; stroke-dasharray: 5 4; }
.m-lip { fill: var(--mouth-lip); stroke: var(--mouth-line); stroke-width: 1.4; stroke-linejoin: round; }
.m-inside { fill: var(--mouth-inside); stroke: var(--mouth-line); stroke-width: 1.2; }
.m-tooth-front { fill: var(--mouth-tooth); }

/* Map pins, written by scripts/regions.mjs from src/data/map-pins.json */
.pin-brazil-0 { left: 61.4%; top: 49.8%; }
.pin-brazil-1 { left: 63.6%; top: 64.6%; }
.pin-brazil-2 { left: 69.4%; top: 63.1%; }
.pin-brazil-3 { left: 84.9%; top: 36.7%; }
.pin-brazil-4 { left: 55%; top: 77.3%; }
.pin-france-0 { left: 49.3%; top: 47.9%; }
.pin-germany-0 { left: 45.9%; top: 36.6%; }
.pin-germany-1 { left: 68.4%; top: 34.8%; }
.pin-germany-2 { left: 58.2%; top: 78.7%; }
.pin-germany-3 { left: 47.6%; top: 25.4%; }
.pin-germany-4 { left: 71.4%; top: 49%; }
.pin-germany-5 { left: 41.6%; top: 72.1%; }
.pin-italy-0 { left: 47.3%; top: 38.9%; }
.pin-spain-0 { left: 47.1%; top: 43.4%; }
.pin-spain-1 { left: 33%; top: 65.6%; }
.pin-spain-2 { left: 14.5%; top: 82%; }
.pin-spain-3 { left: 20.9%; top: 25.3%; }
.pin-spain-4 { left: 79.4%; top: 35.1%; }
.pin-sweden-0 { left: 52.7%; top: 62.8%; }
.pin-sweden-1 { left: 36.5%; top: 83.5%; }
.pin-sweden-2 { left: 32.6%; top: 71.8%; }
.pin-sweden-3 { left: 51.1%; top: 28.9%; }
.pin-sweden-4 { left: 54.2%; top: 73.9%; }
.pin-sweden-5 { left: 62.8%; top: 41.5%; }
.pin-uk-0 { left: 63.1%; top: 74%; }
.pin-usa-0 { left: 49.6%; top: 42.9%; }
.pin-usa-1 { left: 69.3%; top: 46%; }
.pin-usa-2 { left: 63.9%; top: 56.4%; }
.pin-usa-3 { left: 77%; top: 40.7%; }
.pin-usa-4 { left: 79.5%; top: 37.3%; }
#tour-practice:checked ~ .tour-panels .tour-panel-practice,
#tour-phrases:checked ~ .tour-panels .tour-panel-phrases,
#tour-words:checked ~ .tour-panels .tour-panel-words,
#tour-progress:checked ~ .tour-panels .tour-panel-progress,
#tour-settings:checked ~ .tour-panels .tour-panel-settings { display: grid; }
#tour-practice:checked ~ .tour-bar .tour-tab-practice,
#tour-phrases:checked ~ .tour-bar .tour-tab-phrases,
#tour-words:checked ~ .tour-bar .tour-tab-words,
#tour-progress:checked ~ .tour-bar .tour-tab-progress,
#tour-settings:checked ~ .tour-bar .tour-tab-settings { background: var(--take-label-bg); color: var(--text-heading); box-shadow: 0 0 0 1px var(--section-rule); }
#tour-practice:focus-visible ~ .tour-bar .tour-tab-practice,
#tour-phrases:focus-visible ~ .tour-bar .tour-tab-phrases,
#tour-words:focus-visible ~ .tour-bar .tour-tab-words,
#tour-progress:focus-visible ~ .tour-bar .tour-tab-progress,
#tour-settings:focus-visible ~ .tour-bar .tour-tab-settings { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
#mouth-think:checked ~ .mouth-panels .mouth-panel-think,
#mouth-mujer:checked ~ .mouth-panels .mouth-panel-mujer,
#mouth-rue:checked ~ .mouth-panels .mouth-panel-rue,
#mouth-gnocchi:checked ~ .mouth-panels .mouth-panel-gnocchi,
#mouth-schoen:checked ~ .mouth-panels .mouth-panel-schoen,
#mouth-pao:checked ~ .mouth-panels .mouth-panel-pao,
#mouth-cykel:checked ~ .mouth-panels .mouth-panel-cykel { display: grid; }
#mouth-think:checked ~ .mouth-bar .mouth-tab-think,
#mouth-mujer:checked ~ .mouth-bar .mouth-tab-mujer,
#mouth-rue:checked ~ .mouth-bar .mouth-tab-rue,
#mouth-gnocchi:checked ~ .mouth-bar .mouth-tab-gnocchi,
#mouth-schoen:checked ~ .mouth-bar .mouth-tab-schoen,
#mouth-pao:checked ~ .mouth-bar .mouth-tab-pao,
#mouth-cykel:checked ~ .mouth-bar .mouth-tab-cykel { background: var(--tab-on-bg); color: var(--tab-on-text); border-color: var(--tab-on-bg); }
#mouth-think:focus-visible ~ .mouth-bar .mouth-tab-think,
#mouth-mujer:focus-visible ~ .mouth-bar .mouth-tab-mujer,
#mouth-rue:focus-visible ~ .mouth-bar .mouth-tab-rue,
#mouth-gnocchi:focus-visible ~ .mouth-bar .mouth-tab-gnocchi,
#mouth-schoen:focus-visible ~ .mouth-bar .mouth-tab-schoen,
#mouth-pao:focus-visible ~ .mouth-bar .mouth-tab-pao,
#mouth-cykel:focus-visible ~ .mouth-bar .mouth-tab-cykel { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
#code-iphone:checked ~ .code-panels .code-panel-iphone,
#code-android:checked ~ .code-panels .code-panel-android { display: grid; }
#code-iphone:checked ~ .code-bar .code-tab-iphone,
#code-android:checked ~ .code-bar .code-tab-android { background: var(--tab-on-bg); color: var(--tab-on-text); border-color: var(--tab-on-bg); }
#code-iphone:focus-visible ~ .code-bar .code-tab-iphone,
#code-android:focus-visible ~ .code-bar .code-tab-android { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
