/* StorySpark simple frontend.
   Follows the StorySpark design system (storyspark-design-system/README.md): paper ground, ink text and
   1px ink hairlines; colour only as whole panels; square panels, pill buttons; Montserrat Medium for
   headlines and buttons; no shadows; colours, spacing and radii from tokens.css.
   Deliberate exceptions for older readers, noted where they occur: body text never below 18px and
   navigation links at 16px instead of the system's 14px header-link. */

:root {
  color-scheme: light;
  --gutter: max(16px, env(safe-area-inset-left, 0px), min(4.25vw, var(--side-default)));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px), min(4.25vw, var(--side-default)));
  /* Widths counted in grid columns: 10 and 7 columns with their gaps. */
  --wide: calc(10 * var(--column) + 9 * var(--column-gap));
  --narrow: calc(7 * var(--column) + 6 * var(--column-gap));
  --muted: color-mix(in srgb, var(--ink) 72%, var(--paper));
  --soft-rule: color-mix(in srgb, var(--ink) 25%, var(--paper));
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 18px;            /* content 18/27 */
  line-height: 1.5;
  letter-spacing: -0.01em;
}
img { max-width: 100%; display: block; }
h1, h2, h3 { font-weight: 500; line-height: 1.15; letter-spacing: -0.02em; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(32px, 4.5vw, 48px); letter-spacing: -0.04em; }
h2 { font-size: clamp(22px, 2.4vw, 26px); }
h3 { font-size: 22px; }
p { margin: 0; }
a { color: var(--terracotta); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 4px; }
main:focus { outline: none; }
.muted { color: var(--muted); }
.lead { font-size: 20px; line-height: 1.5; max-width: 60ch; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.stack { display: flex; flex-direction: column; gap: var(--space-regular); }
.button-row { display: flex; flex-wrap: wrap; gap: var(--space-small); align-items: center; }
.icon { display: inline-flex; flex-shrink: 0; vertical-align: -5px; }

.skip-link { position: absolute; left: var(--space-small); top: -80px; background: var(--ink); color: var(--paper); padding: var(--space-small); z-index: 10; }
.skip-link:focus { top: var(--space-small); outline-color: var(--paper); }

/* Header: the NavBar component - name in type, links boxed by hairlines -------------------- */
.site-header { background: var(--paper); border-bottom: var(--hairline) solid var(--ink); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; }
.site-header__inner { max-width: var(--max-full); margin: 0 auto; padding-left: var(--gutter); display: flex; flex-wrap: wrap; align-items: stretch; justify-content: space-between; min-height: 72px; }
.brand { display: inline-flex; align-items: center; color: var(--ink); text-decoration: none; font-weight: 500; font-size: 28px; letter-spacing: -0.02em; padding-block: var(--space-small); }
.site-header__right { display: flex; flex-wrap: wrap; align-items: stretch; }
.site-nav { display: flex; flex-wrap: wrap; }
/* 16px instead of the system's 14px header-link, for older readers */
.site-nav a, .lang-switch {
  display: flex; align-items: center; gap: var(--space-tiny); min-height: 72px; padding: 0 var(--space-regular);
  border: 0; border-left: var(--hairline) solid var(--ink); background: var(--paper); color: var(--ink);
  font: 500 16px var(--font-sans); text-transform: uppercase; letter-spacing: 0.02em; text-decoration: none; cursor: pointer;
  transition: background-color .2s, color .2s;
}
.site-nav a:hover, .lang-switch:hover { background: var(--cream); }
.site-nav a[aria-current] { background: var(--ink); color: var(--paper); }
.site-nav a:focus-visible, .lang-switch:focus-visible { outline-offset: -6px; }

.demo-banner { background: var(--sunflower); color: var(--ink); padding: var(--space-small) var(--gutter-r) var(--space-small) var(--gutter); text-align: center; font-size: 16px; border-bottom: var(--hairline) solid var(--ink); }
.link-button { background: none; border: 0; padding: var(--space-tiny) 0; font: inherit; color: var(--terracotta); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 44px; }
/* terracotta on sunflower is below 4.5:1 */
.demo-banner .link-button { color: var(--ink); }

/* Footer component: ink ground, name in type */
.site-footer { background: var(--ink); color: var(--paper); margin-top: var(--space-enormous); padding: var(--space-large) var(--gutter-r) var(--space-enormous) var(--gutter); }
.site-footer p { max-width: var(--max-full); margin: 0 auto; font-size: 18px; }
.site-footer strong { display: block; font-weight: 500; font-size: 34px; letter-spacing: -0.02em; margin-bottom: var(--space-tiny); }

/* Layout -------------------------------------------------------------- */
.page { max-width: calc(var(--wide) + 2 * var(--side-default)); margin: 0 auto; padding: var(--space-large) var(--gutter-r) 0 var(--gutter); display: flex; flex-direction: column; gap: var(--space-regular); }
.page--narrow { max-width: calc(var(--narrow) + 2 * var(--side-default)); }
.page--reader { max-width: calc(var(--narrow) + 2 * var(--side-default)); }
.page-head { display: flex; flex-wrap: wrap; gap: var(--space-regular); align-items: flex-end; justify-content: space-between; }
.page-head > div { display: flex; flex-direction: column; gap: var(--space-small); min-width: 0; }
.back-link { display: inline-flex; align-items: center; gap: var(--space-tiny); color: var(--ink); font-weight: 500; text-decoration: none; min-height: 44px; align-self: flex-start; }
.back-link:hover { text-decoration: underline; }
/* secondary-headline */
.section-title { text-transform: uppercase; font-size: clamp(26px, 3vw, 42px); letter-spacing: -0.02em; font-weight: 500; }

/* Buttons: the two pills of the Button component, plus a danger pill ---------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-small); min-height: 56px; padding: var(--space-small) var(--space-regular); border-radius: var(--radius-huge); border: 0; font: 500 19px/1.2 var(--font-sans); letter-spacing: -0.02em; cursor: pointer; text-decoration: none; transition: background-color .2s, color .2s; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn--large { min-height: 64px; font-size: 21px; padding-inline: var(--space-medium); }
.btn--primary { background: var(--action-orange); color: var(--ink); }
.btn--primary:hover:not(:disabled) { background: var(--ink); color: var(--paper); }
.btn--secondary { background: var(--ink); color: var(--paper); padding-inline: var(--space-medium); }
.btn--secondary:hover:not(:disabled) { background: var(--action-orange); color: var(--ink); }
.btn--danger { background: var(--terracotta); color: var(--paper); }
.btn--danger:hover:not(:disabled) { background: var(--ink); }
.btn--text { background: none; color: var(--terracotta); padding-inline: 0; min-height: 48px; align-self: flex-start; }
.icon-btn { width: 52px; height: 52px; border-radius: var(--radius-full); border: var(--hairline) solid var(--ink); background: var(--paper); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background-color .2s, color .2s; }
.icon-btn:hover:not(:disabled) { background: var(--ink); color: var(--paper); }
.icon-btn:disabled { opacity: .3; cursor: default; }

/* Forms --------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: var(--space-tiny); min-width: 0; }
.field label, .field__label { font-weight: 500; font-size: 18px; }
.field__hint { font-size: 16px; color: var(--muted); }
input[type=text], input[type=email], input[type=password], select, textarea {
  font: inherit; font-size: 19px; color: var(--ink); background: var(--paper); border: var(--hairline) solid var(--ink); border-radius: var(--radius-sm); padding: 12px var(--space-small); min-height: 56px; width: 100%;
}
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: 2px; }
textarea { min-height: 120px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--muted); }
.check { display: flex; gap: var(--space-small); align-items: flex-start; cursor: pointer; font-size: 18px; }
.check input { width: 28px; height: 28px; margin: 0; flex-shrink: 0; accent-color: var(--ink); }
.check--card { border: var(--hairline) solid var(--ink); padding: var(--space-small); background: var(--paper); }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.group-title { font-weight: 500; font-size: 22px; margin-bottom: var(--space-tiny); padding: 0; }
.grid-2 { display: grid; grid-template-columns: 2fr 1fr; gap: var(--space-small); }

.notice { padding: var(--space-small); border: var(--hairline) solid var(--ink); font-size: 18px; }
.notice--error { background: var(--blush); border-left: 6px solid var(--terracotta); }
.notice--success { background: var(--teal); }
.notice--info { background: var(--cream); }
.notice ul { margin: var(--space-tiny) 0 0; padding-left: 22px; }

.badge { display: inline-block; margin-left: var(--space-tiny); font-size: 14px; font-weight: 500; padding: 2px 10px; border-radius: var(--radius-huge); background: var(--paper); border: var(--hairline) solid var(--ink); color: var(--ink); vertical-align: 2px; white-space: nowrap; }
.pill { align-self: flex-start; display: inline-block; font-size: 14px; font-weight: 500; text-transform: uppercase; letter-spacing: .04em; padding: 4px 12px; border-radius: var(--radius-huge); border: var(--hairline) solid var(--ink); }
.pill--ready { background: var(--teal); }
.pill--busy { background: var(--sunflower); }
.pill--problem { background: var(--peach); }
.pill--quiet { background: var(--paper); }

/* Cards and panels: square, hairline-bordered, uppercase titles (content-headline) ------ */
.card { background: var(--paper); border: var(--hairline) solid var(--ink); padding: var(--space-regular); display: flex; flex-direction: column; gap: var(--space-small); }
.card > h2, .card > legend { text-transform: uppercase; }
.card > legend { font-weight: 500; font-size: 22px; letter-spacing: -0.02em; padding: 0 var(--space-tiny); margin-left: calc(-1 * var(--space-tiny)); }
fieldset.card { padding-top: var(--space-small); }
.card--quiet { background: var(--cream); }
/* Sign-in methods (settings) */
.methods { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-tiny); }
.methods__item { display: flex; flex-wrap: wrap; gap: var(--space-small); align-items: center; justify-content: space-between; padding: var(--space-small); border: var(--hairline) solid var(--ink); font-size: 18px; overflow-wrap: anywhere; }
.badge--preview { background: var(--sunflower); }
.panel--sunflower { background: var(--sunflower); }
.panel--peach { background: var(--peach); }
.panel--teal { background: var(--teal); }
.panel--blush { background: var(--blush); }

/* Welcome: HeroHeadline on the night ground, then a FeatureCard row --------------------- */
.hero { position: relative; background: var(--night); color: var(--paper); overflow: hidden; }
.hero :focus-visible { outline-color: var(--paper); }
.hero__inner { position: relative; z-index: 1; max-width: var(--max-full); margin: 0 auto; padding: var(--space-large) var(--gutter-r) 360px var(--gutter); display: grid; grid-template-columns: 1.15fr 1fr; gap: var(--space-medium); align-items: start; }
.hero__text { display: flex; flex-direction: column; gap: var(--space-regular); min-width: 0; }
.hero h1 { font-size: clamp(36px, 5.5vw, 72px); line-height: 1; letter-spacing: -0.04em; }
.hero { min-height: 960px; }
/* Parallax scene: five layers, moved by welcome.js at different speeds (proposal 01). */
.hero__scene { position: absolute; inset: 0; pointer-events: none; }
.hero__layer { position: absolute; left: 0; width: 100%; height: auto; will-change: transform; }
.hero__layer--l1, .hero__layer--l3 { top: 0; }
/* The moon sits in the free sky under the headline, just above the far hills; scrolling, the faster hills climb over it. */
.hero__layer--l2 { left: 30%; top: auto; bottom: 320px; width: clamp(100px, 11vw, 160px); }
.hero__layer--l4 { bottom: 150px; }
.hero__layer--l5 { bottom: -40px; }
.hero__inner { will-change: transform; }
/* Scene grounds. Light scenes switch the text to ink; dark scenes keep paper text (both pass 4.5:1). */
.hero--family { background: var(--blush); }
.hero--calming { background: var(--night); }
.hero--cheerful { background: var(--sunflower); }
.hero--adventure { background: var(--terracotta); }
.hero--light { color: var(--ink); }
.hero--light :focus-visible { outline-color: var(--terracotta); }
/* Mood picker, top right of the scene */
.hero__bar { position: relative; z-index: 2; max-width: var(--max-full); margin: 0 auto; padding: var(--space-small) var(--gutter-r) 0 var(--gutter); display: flex; justify-content: flex-end; align-items: center; gap: var(--space-tiny); font-weight: 500; font-size: 16px; }
.hero__select { width: auto; min-height: 48px; font-size: 17px; padding: 8px 40px 8px var(--space-small); border-radius: var(--radius-huge); }
/* Compact scene for "My stories": a shorter sky, the same layers lower down. */
.hero--compact { min-height: 0; }
.hero__inner--single { grid-template-columns: minmax(0, 1fr); padding-top: var(--space-medium); padding-bottom: 200px; }
.hero__inner--single .hero__text { max-width: 760px; }
.hero__inner--single .btn { align-self: flex-start; }
.hero--compact .hero__layer--l2 { left: auto; right: 12%; bottom: 190px; width: clamp(80px, 9vw, 130px); }
.hero--compact .hero__layer--l4 { bottom: -40px; }
.hero--compact .hero__layer--l5 { bottom: -190px; }

/* Closing band of proposal 01 */
.welcome-band { max-width: var(--max-full); margin: 0 auto; padding: var(--space-large) var(--gutter-r) 0 var(--gutter); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-regular); }
.welcome-band p { font-size: 22px; max-width: 48ch; }
.auth-card { background: var(--paper); color: var(--ink); border: var(--hairline) solid var(--ink); padding: var(--space-regular); }
.auth-card :focus-visible { outline-color: var(--terracotta); }
.auth-card__links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-tiny) var(--space-regular); }

.how__head { max-width: var(--max-full); margin: 0 auto; padding: var(--space-large) var(--gutter-r) var(--space-medium) var(--gutter); }
.how__row { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); border-block: var(--hairline) solid var(--ink); }
.how__step { padding: var(--space-medium) var(--space-regular) var(--space-large) var(--gutter); display: flex; flex-direction: column; gap: var(--space-small); border-right: var(--hairline) solid var(--ink); }
.how__step:last-child { border-right: 0; }
.how__step h3 { font-size: 26px; text-transform: uppercase; letter-spacing: -0.02em; }
.how__step img { width: 100%; max-width: 280px; align-self: center; margin-top: auto; padding-top: var(--space-regular); }

/* Stories list --------------------------------------------------------- */
.story-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--space-regular); }
.story-card { background: var(--paper); border: var(--hairline) solid var(--ink); color: var(--ink); text-decoration: none; display: flex; flex-direction: column; transition: background-color .2s; }
.story-card:hover { background: var(--cream); }
.story-card__art { aspect-ratio: 4 / 3; background: var(--cream); display: flex; align-items: center; justify-content: center; border-bottom: var(--hairline) solid var(--ink); }
.story-card__art img { width: 100%; height: 100%; object-fit: contain; }
.story-card__body { padding: var(--space-small) var(--space-small) var(--space-regular); display: flex; flex-direction: column; gap: var(--space-tiny); }
.story-card__body h2 { font-size: 22px; text-transform: uppercase; }
.empty { grid-column: 1 / -1; background: var(--sunflower); border: var(--hairline) solid var(--ink); padding: var(--space-regular); display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-small); }
.empty h2 { text-transform: uppercase; }
.empty img { width: 260px; }

/* Wizard -------------------------------------------------------------- */
.stepper { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); border: var(--hairline) solid var(--ink); }
.stepper li { display: flex; align-items: center; gap: var(--space-tiny); font-weight: 500; font-size: 16px; text-transform: uppercase; padding: var(--space-small); border-right: var(--hairline) solid var(--ink); min-width: 0; }
.stepper li:last-child { border-right: 0; }
.stepper li.is-current { background: var(--sunflower); }
.stepper li.is-done { background: var(--cream); }
.stepper__num { width: 32px; height: 32px; border-radius: var(--radius-full); border: var(--hairline) solid var(--ink); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--paper); }
.is-current .stepper__num { background: var(--ink); color: var(--paper); }
.is-done .stepper__num { background: var(--teal); }
.wizard__body h2 { outline: none; }
.wizard__nav { display: flex; justify-content: space-between; gap: var(--space-small); border-top: var(--hairline) solid var(--ink); padding-top: var(--space-regular); }
.wizard__nav .btn:last-child { margin-left: auto; }

.dropzone { border: 2px dashed var(--ink); background: var(--cream); padding: var(--space-medium) var(--space-small); display: flex; flex-direction: column; align-items: center; gap: var(--space-tiny); cursor: pointer; text-align: center; transition: background-color .2s; }
.dropzone:hover, .dropzone.is-over { background: var(--sunflower); }
.dropzone__title { font-size: 24px; font-weight: 500; }
.dropzone:focus-within { outline: 2px solid var(--terracotta); outline-offset: 4px; }
.photo-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border-top: var(--hairline) solid var(--ink); }
.photo-list:empty { display: none; }
.photo-item { display: grid; grid-template-columns: 120px 1fr auto; gap: var(--space-small); align-items: center; border-bottom: var(--hairline) solid var(--ink); padding: var(--space-small) 0; }
.photo-item img { width: 120px; height: 90px; object-fit: cover; border-radius: var(--radius-lg); }
.photo-item__tools { display: flex; gap: var(--space-tiny); }
.privacy-note { display: flex; gap: var(--space-small); align-items: flex-start; background: var(--blush); border: var(--hairline) solid var(--ink); padding: var(--space-small); font-size: 17px; }

.choice-row { display: flex; flex-wrap: wrap; gap: var(--space-tiny); }
.chip { cursor: pointer; }
.chip span { display: inline-flex; align-items: center; min-height: 52px; padding: var(--space-tiny) var(--space-regular); border: var(--hairline) solid var(--ink); border-radius: var(--radius-huge); background: var(--paper); font-weight: 500; transition: background-color .2s, color .2s; }
.chip:hover span { background: var(--cream); }
.chip input:checked + span { background: var(--ink); color: var(--paper); }
.chip input:focus-visible + span { outline: 2px solid var(--terracotta); outline-offset: 4px; }
.choice-group { display: flex; flex-direction: column; gap: var(--space-tiny); }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); border-top: var(--hairline) solid var(--ink); border-left: var(--hairline) solid var(--ink); }
.choice { cursor: pointer; display: flex; flex-direction: column; gap: 4px; padding: var(--space-small); border-right: var(--hairline) solid var(--ink); border-bottom: var(--hairline) solid var(--ink); background: var(--paper); position: relative; transition: background-color .2s; }
.choice:hover { background: var(--cream); }
.choice__title { font-weight: 500; font-size: 19px; padding-right: 30px; }
.choice__text { font-size: 16px; }
.choice:has(input:checked) { background: var(--sunflower); }
.choice:has(input:checked)::after { content: ""; position: absolute; top: var(--space-small); right: var(--space-small); width: 22px; height: 22px; border-radius: var(--radius-full); background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f9f7f5' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4L18 8'/%3E%3C/svg%3E") center / 16px no-repeat; }
.choice:has(input:focus-visible) { outline: 2px solid var(--terracotta); outline-offset: -6px; }

.summary { display: grid; grid-template-columns: max-content 1fr; margin: 0; border-top: var(--hairline) solid var(--ink); }
.summary dt, .summary dd { padding: 12px 0; border-bottom: var(--hairline) solid var(--soft-rule); margin: 0; }
.summary dt { font-weight: 500; padding-right: var(--space-regular); }
.summary dd { display: flex; justify-content: space-between; gap: var(--space-small); align-items: center; flex-wrap: wrap; }

/* Progress ------------------------------------------------------------ */
.progress__art { width: 260px; align-self: center; background: var(--teal); border: var(--hairline) solid var(--ink); padding: var(--space-tiny); }
.phases { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border-top: var(--hairline) solid var(--ink); }
.phases li { display: flex; align-items: center; gap: var(--space-small); font-size: 20px; padding: 12px 0; border-bottom: var(--hairline) solid var(--soft-rule); color: var(--muted); }
.phases li.is-current { color: var(--ink); font-weight: 500; }
.phases li.is-done { color: var(--ink); }
.phases__dot { width: 32px; height: 32px; border-radius: var(--radius-full); border: var(--hairline) solid currentColor; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.is-done .phases__dot { background: var(--teal); border-color: var(--ink); }
.is-current .phases__dot { background: var(--action-orange); border-color: var(--ink); animation: twinkle 2.4s ease-in-out infinite; }
@keyframes twinkle { 50% { transform: scale(1.12); } }

/* Reader -------------------------------------------------------------- */
.reader__title { font-size: clamp(32px, 5vw, 52px); }
.reader__tools { display: flex; flex-wrap: wrap; gap: var(--space-small) var(--space-regular); align-items: flex-end; padding: var(--space-small) 0; border-block: var(--hairline) solid var(--ink); }
.reader__tool { display: flex; flex-direction: column; gap: var(--space-tiny); }
.reader__tool > .muted { display: inline-flex; align-items: center; gap: 6px; min-height: 52px; }
.seg { display: inline-flex; border: var(--hairline) solid var(--ink); border-radius: var(--radius-huge); overflow: hidden; }
.seg__btn { font: 500 18px var(--font-sans); background: var(--paper); color: var(--ink); border: 0; border-right: var(--hairline) solid var(--ink); min-height: 52px; min-width: 60px; padding: 0 var(--space-small); cursor: pointer; transition: background-color .2s, color .2s; }
.seg__btn:last-child { border-right: 0; }
.seg__btn:hover { background: var(--cream); }
.seg__btn[aria-pressed=true] { background: var(--ink); color: var(--paper); }
.seg__btn:focus-visible { outline-offset: -6px; }
.listen { background: var(--peach); border: var(--hairline) solid var(--ink); padding: var(--space-regular); display: flex; flex-direction: column; gap: var(--space-small); }
.listen h2 { text-transform: uppercase; }
.listen:empty { display: none; }
.listen audio { width: 100%; height: 54px; }
.reader__text { font-size: 22px; line-height: 1.7; display: flex; flex-direction: column; gap: 1.1em; max-width: 64ch; }
.reader__text.size-large { font-size: 26px; }
.reader__text.size-larger { font-size: 31px; }
.seg__btn--size-0 { font-size: 18px; }
.seg__btn--size-1 { font-size: 22px; }
.seg__btn--size-2 { font-size: 26px; }
.reader__text p { transition: background-color .3s; }
.reader__text p.is-reading { background: var(--sunflower); outline: 8px solid var(--sunflower); }
.reader__pic { margin: .4em 0; background: var(--cream); border: var(--hairline) solid var(--ink); }
.reader__pic img { width: 100%; height: auto; }
.reader__end { text-align: center; font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; }
.confirm__box { background: var(--blush); border: var(--hairline) solid var(--ink); border-left: 6px solid var(--terracotta); padding: var(--space-small); display: flex; flex-direction: column; gap: 12px; }

/* Small screens: the system's Mobile type styles --------------------------------------- */
@media (max-width: 860px) {
  .hero__inner { grid-template-columns: 1fr; padding-bottom: 240px; }
  .hero { min-height: 0; }
  .hero__inner--single { padding-bottom: 170px; }
  .hero--compact .hero__layer--l2 { right: 6%; bottom: 60px; width: 64px; }
  .hero--compact .hero__layer--l5 { bottom: -50px; }
  .hero--compact .hero__layer--l4 { bottom: 10px; }
  .hero__layer--l4 { bottom: 70px; }
  .hero__layer--l2 { left: auto; right: 6%; bottom: 150px; width: 90px; }
  .hero__layer--l5 { bottom: -10px; }
  .how__row { grid-template-columns: 1fr; }
  .how__step { border-right: 0; border-bottom: var(--hairline) solid var(--ink); }
  .how__step:last-child { border-bottom: 0; }
}
@media (max-width: 768px) {
  /* Name and language on the first row, the three links sharing the second. */
  .site-header__inner { padding-left: var(--gutter); min-height: 0; }
  .site-header__right { display: contents; }
  .brand { flex: 1; order: 0; }
  .lang-switch { order: 1; min-height: 60px; padding: 0 var(--space-small); font-size: 15px; }
  .site-nav { order: 2; flex: 1 0 100%; margin-left: calc(-1 * var(--gutter)); border-top: var(--hairline) solid var(--ink); flex-wrap: nowrap; }
  /* Normal case and content-sized cells, so long German words fit; hyphenate only as a last resort. */
  .site-nav a { flex: 1 1 auto; min-width: 0; justify-content: center; text-align: center; min-height: 56px; padding: 0 var(--space-tiny); font-size: 15px; text-transform: none; letter-spacing: 0; hyphens: auto; }
  .site-nav a:first-child { border-left: 0; }
}
@media (max-width: 600px) {
  .stepper li { justify-content: center; }
  .stepper li > span:last-child { display: none; }
  .grid-2 { grid-template-columns: 1fr; }
  .photo-item { grid-template-columns: 88px 1fr; }
  .photo-item img { width: 88px; height: 66px; }
  .photo-item__tools { grid-column: 1 / -1; justify-content: flex-end; }
  .summary { grid-template-columns: 1fr; }
  .summary dt { padding-bottom: 0; border-bottom: 0; }
  .card, .listen, .auth-card { padding: var(--space-small); }
  .reader__text { font-size: 20px; }
  .reader__text.size-large { font-size: 24px; }
  .reader__text.size-larger { font-size: 28px; }
  .btn--large { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
