/* Rekallo — rekallo.ch. World: an unfolded audiobook J-card. */

@font-face { font-family: "Archivo"; src: url("fonts/archivo.woff") format("woff"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible Next"; src: url("fonts/atkinson.woff") format("woff"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Lexend"; src: url("fonts/lexend.woff") format("woff"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Literata"; src: url("fonts/literata.woff") format("woff"); font-weight: 200 900; font-display: swap; }
@font-face { font-family: "Andika"; src: url("fonts/andika.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Andika"; src: url("fonts/andika-bold.woff") format("woff"); font-weight: 700; font-display: swap; }

:root {
  --cobalt: #2340c8;
  --cobalt-deep: #1a2f9a;
  --stock: #f7f6f2;
  --stock-shade: #e9e7df;
  --ink: #111216;
  --ink-soft: #45464e;
  --on-cobalt: #ffffff;
  --on-cobalt-soft: #dfe4ff;
  --on-cobalt-quiet: #c9d2ff;
  --on-ink: #e9e8e3;
  --on-ink-soft: #c8c7c2;
  --live: #e9ff3b;
  --edge: #ff5b1f;
  --error: #b3261e;

  --f-display: "Archivo", "Arial Narrow", sans-serif;
  --f-text: "Atkinson Hyperlegible Next", Verdana, sans-serif;
  --f-atkinson: var(--f-text);
  --f-lexend: "Lexend", Verdana, sans-serif;
  --f-andika: "Andika", Verdana, sans-serif;
  --f-literata: "Literata", Georgia, serif;

  --spine-w: 9.5rem;
  --gutter: clamp(1.25rem, 5vw, 6.5rem);
  --fold: 2px dashed rgb(17 18 22 / 0.55);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 1rem; scrollbar-color: var(--ink) var(--stock-shade); }
body {
  margin: 0;
  background: var(--ink);
  color: var(--ink);
  font-family: var(--f-text);
  font-size: 1.1875rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--live); color: var(--ink); }
h1, h2, h3 { margin: 0; text-wrap: balance; overflow-wrap: anywhere; }
/* Enlarged text and long German compounds: a word that can't fit breaks instead of pushing the page wider. */
main, .spine { overflow-wrap: anywhere; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 2px; }
button, input, textarea { font: inherit; color: inherit; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
svg { width: 1.25em; height: 1.25em; flex: none; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; box-shadow: 0 0 0 7px var(--live); border-radius: 4px; }
.front :focus-visible, .panel-comfort :focus-visible, .panel-pilot .pilot-facts :focus-visible, .panel-notes :focus-visible, .foot :focus-visible {
  outline-color: var(--live); box-shadow: none;
}

/* Moved by its own height, so it stays fully off screen however large the text is set. */
.skip { position: absolute; left: 1rem; top: 0; z-index: 10; transform: translateY(calc(-100% - 0.5rem)); background: var(--live); color: var(--ink); padding: 0.75rem 1rem; font-weight: 700; }
.skip:focus { transform: translateY(1rem); }

/* ---------- The case: spine + unfolding card ---------- */

.case { display: grid; grid-template-columns: var(--spine-w) minmax(0, 1fr); min-height: 100vh; }

.spine {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  display: flex; flex-direction: column; align-items: stretch; justify-content: space-between;
  gap: 2rem; padding: 2rem 1.125rem 1.75rem;
  background: var(--stock);
  border-right: var(--fold);
  z-index: 5;
  /* Short windows with enlarged text: the spine scrolls on its own rather than hiding the language keys. */
  overflow-y: auto; overscroll-behavior: contain;
}
/* The Rekallo mark, shared with the learner app: an orange dot with a smaller cobalt dot up and to the right, then the lowercase name. */
.spine-mark, .foot-mark {
  display: flex; align-items: center; min-height: 44px;
  font-family: var(--f-text); font-weight: 700; font-size: 1.375rem; line-height: 1; letter-spacing: -0.02em;
  text-decoration: none;
}
.mark-dot {
  flex: none; width: 14px; height: 14px; margin: 0 18px 0 2px; border-radius: 50%;
  background: var(--edge); box-shadow: 10px -6px 0 -3px var(--cobalt);
}
.foot-mark .mark-dot { box-shadow: 10px -6px 0 -3px var(--on-cobalt-quiet); }
/* On the desktop spine the mark runs up the side, like the label on a cassette's spine; the dots turn with it. */
@media (min-width: 761px) and (min-height: 521px) {
  .spine-mark {
    writing-mode: vertical-rl; transform: rotate(180deg); align-self: center;
    font-size: clamp(2.5rem, 6.5vh, 3.75rem); letter-spacing: -0.03em;
  }
  .spine-mark .mark-dot {
    width: 0.6em; height: 0.6em; margin: 0 0 0.45em;
    box-shadow: 0.27em 0.45em 0 -0.13em var(--cobalt);
  }
}
.spine-nav { display: flex; flex-direction: column; gap: 0.25rem; }
.spine-nav a {
  font-family: var(--f-display); font-stretch: 80%; font-weight: 700; font-size: 1rem; line-height: 1.2;
  text-decoration: none; padding: 0.6rem 0.25rem; border-top: 2px solid var(--ink);
}
.spine-nav a:hover { text-decoration: underline; }
.spine-nav .spine-cta { background: var(--edge); padding-inline: 0.5rem; border-top-color: var(--edge); }
/* Two by two, so every key is a full 44px touch target; each name starts with the visible label (WCAG 2.5.3). */
.lang { display: grid; grid-template-columns: 1fr 1fr; border: 2px solid var(--ink); border-radius: 6px; overflow: hidden; }
.lang button {
  min-height: 44px; border: 0; background: transparent; padding: 0.5rem 0; cursor: pointer;
  font-family: var(--f-display); font-stretch: 80%; font-weight: 800; font-size: 0.95rem;
}
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--stock); }
.lang button:nth-child(even) { border-left: 2px solid var(--ink); }
.lang button:nth-child(n + 3) { border-top: 2px solid var(--ink); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.lang-select {
  display: none; min-height: 44px; padding: 0 2rem 0 0.7rem; cursor: pointer;
  border: 2px solid var(--ink); border-radius: 6px; color: var(--ink);
  font-family: var(--f-display); font-stretch: 80%; font-weight: 800; font-size: 1rem;
  appearance: none; -webkit-appearance: none;
  background: var(--stock) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%23111216' stroke-width='3'/%3E%3C/svg%3E") no-repeat right 0.55rem center / 0.9rem;
}

/* ---------- Face A: the J-card ---------- */

.card {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(22rem, 34%);
  min-height: 100vh; min-height: 100svh;
}

.front {
  background: var(--cobalt); color: var(--on-cobalt);
  padding: clamp(2.5rem, 8vh, 6rem) var(--gutter) clamp(2rem, 6vh, 4rem);
  display: flex; flex-direction: column; justify-content: center; gap: clamp(1.25rem, 3vh, 2rem);
}
.front h1 {
  font-family: var(--f-display); font-stretch: 112%; font-weight: 820;
  font-size: clamp(3.1rem, 6.4vw, 6rem); line-height: 0.96; letter-spacing: -0.02em;
  max-width: 11ch;
}
.lede { font-size: clamp(1.25rem, 1.6vw, 1.5rem); line-height: 1.5; max-width: 34ch; color: var(--on-cobalt-soft); }
.front .is-live .hl {
  background: var(--live); color: var(--ink); padding: 0 0.1em; margin: 0 -0.1em;
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
}

.transport { display: flex; flex-wrap: wrap; align-items: stretch; gap: 0.75rem; margin-top: 0.5rem; }

.key {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  min-height: 3.5rem; padding: 0 1.4rem;
  border: 0; border-radius: 6px; cursor: pointer;
  background: var(--stock); color: var(--ink);
  font-family: var(--f-display); font-stretch: 90%; font-weight: 800; font-size: 1.125rem; letter-spacing: 0.005em;
  box-shadow: inset 0 -4px 0 rgb(17 18 22 / 0.22), 0 6px 14px -6px rgb(0 0 0 / 0.55);
  transition: transform 160ms var(--ease), box-shadow 160ms var(--ease), background-color 160ms var(--ease);
}
.key:hover { background: #ffffff; }
.key:active { transform: translateY(2px); box-shadow: inset 0 -1px 0 rgb(17 18 22 / 0.22), 0 2px 6px -3px rgb(0 0 0 / 0.5); }
.key-icon { width: 3.5rem; padding: 0; }
.key-play.is-on, .key-icon[aria-pressed="true"] { background: var(--live); }
.key-apply { background: var(--edge); color: var(--ink); text-decoration: none; }
.key-apply:hover { background: #ff7444; }
.key-wide { width: 100%; min-height: 4rem; font-size: 1.25rem; }

.counter {
  display: inline-flex; align-items: center; gap: 0.1em;
  min-width: 7.5rem; padding: 0.55rem 1rem; border-radius: 6px;
  background: var(--ink); color: var(--stock);
  font-family: var(--f-display); font-stretch: 70%; font-weight: 700; font-size: 2rem; line-height: 1.2;
  font-variant-numeric: tabular-nums;
  box-shadow: inset 0 3px 8px rgb(0 0 0 / 0.6);
  overflow: hidden;
}
.counter-p { font-size: 0.6em; opacity: 0.75; }
.counter-n { display: inline-block; }
.counter-n.roll { animation: roll 320ms var(--ease); }
@keyframes roll { from { transform: translateY(70%); opacity: 0; } to { transform: none; opacity: 1; } }

.voice-note { font-size: 1rem; line-height: 1.5; min-height: 3em; margin-top: -0.5rem; color: var(--on-cobalt-soft); max-width: 46ch; }
.voice-note[hidden] { display: block; visibility: hidden; }

.quick { display: grid; gap: 0.6rem; margin-top: clamp(0.5rem, 2vh, 1.5rem); padding-top: clamp(1rem, 3vh, 1.75rem); border-top: 2px dashed rgb(255 255 255 / 0.45); max-width: 40rem; justify-items: start; }
.quick-facts { font-size: 1.0625rem; color: var(--on-cobalt-soft); }

input:not([type="radio"]):not([type="checkbox"]):not([type="range"]), textarea {
  width: 100%; min-height: 3.5rem; padding: 0.75rem 1rem;
  background: var(--stock); color: var(--ink);
  border: 2px solid var(--ink); border-radius: 6px;
  font-size: 1.125rem;
}
textarea { min-height: 7rem; resize: vertical; line-height: 1.5; }
::placeholder { color: #5a5c66; opacity: 1; }
[aria-invalid="true"] { border-color: var(--error) !important; box-shadow: inset 0 0 0 1px var(--error); }

/* Track-list flap */
.flap {
  position: relative; background: var(--stock);
  border-left: var(--fold);
  padding: clamp(2.5rem, 8vh, 6rem) clamp(1.5rem, 3vw, 3rem) 2rem;
  display: flex; flex-direction: column; justify-content: flex-start; gap: 1.5rem;
}
.flap::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 14px; background: var(--edge); }
.flap-title, .liner-tracks h3 { font-family: var(--f-display); }
.flap-title { font-stretch: 75%; font-weight: 800; font-size: 1.375rem; letter-spacing: 0.04em; text-transform: uppercase; line-height: 1.2; }
.tracks { list-style: none; margin: 0; padding: 0; }
.track {
  display: grid; grid-template-columns: 2.5rem minmax(0, 1fr) auto; gap: 0.75rem; align-items: baseline;
  padding: 1rem 0.75rem; margin-inline: -0.75rem; border-top: 2px solid var(--ink);
  transition: background-color 220ms var(--ease);
}
.track:last-child { border-bottom: 2px solid var(--ink); }
.track-n { font-family: var(--f-display); font-stretch: 70%; font-weight: 850; font-size: 1.75rem; line-height: 1; }
.track-t { font-size: 1.1875rem; line-height: 1.35; font-weight: 700; }
.track-t small { display: block; font-size: 1rem; font-weight: 400; color: var(--ink-soft); margin-top: 0.2rem; }
.track-d { font-family: var(--f-display); font-stretch: 80%; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.track.is-live, .liner-track.is-live { background: var(--live); }
.track.is-live small, .liner-track.is-live .ticket { color: var(--ink); }
.flap-foot { font-size: 1rem; color: var(--ink-soft); }

/* ---------- Liner insert: panels that unfold below ---------- */

.panel { padding: clamp(4rem, 10vw, 8rem) var(--gutter); border-top: var(--fold); }
.panel h2 {
  font-family: var(--f-display); font-stretch: 105%; font-weight: 800;
  font-size: clamp(2.25rem, 4.2vw, 3.75rem); line-height: 1.02; letter-spacing: -0.015em; max-width: 20ch;
}
.panel-head { display: grid; gap: 1.5rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.panel-head p { font-size: 1.3125rem; max-width: 58ch; }
.panel-foot { margin-top: 2rem; font-size: 1rem; color: var(--ink-soft); max-width: 70ch; }

.panel-lesson, .panel-resume, .panel-author { background: var(--stock); }

.liner-tracks { list-style: none; margin: 0; padding: 0; max-width: 72rem; }
.liner-track {
  display: grid; grid-template-columns: 6.5rem minmax(0, 1fr) 3.5rem; gap: clamp(1rem, 3vw, 2.5rem);
  padding: clamp(1.5rem, 3vw, 2.25rem) 1rem; margin-inline: -1rem;
  border-top: 2px solid var(--ink);
  transition: background-color 220ms var(--ease);
}
.liner-track:last-child { border-bottom: 2px solid var(--ink); }
.lt-side { display: flex; flex-direction: column; gap: 0.5rem; }
.lt-side .track-n { font-size: clamp(2.5rem, 5vw, 3.75rem); }
.lt-body { display: grid; gap: 0.9rem; max-width: 62ch; }
.liner-tracks h3 { font-stretch: 100%; font-weight: 780; font-size: clamp(1.5rem, 2.4vw, 2rem); line-height: 1.15; }
.lt-body p { font-size: 1.1875rem; }
.ticket {
  justify-self: start; font-size: 1rem !important; line-height: 1.45; color: var(--ink-soft);
  padding: 0.5rem 0.85rem; border: 2px solid var(--ink); border-radius: 4px; background: #fff;
}
.ticket q { quotes: "« " " »"; }
:lang(en) .ticket q { quotes: "“" "”"; }
:lang(de) .ticket q { quotes: "«" "»"; }
.lt-body .lt-note { font-size: 1rem; line-height: 1.45; color: var(--ink-soft); padding-left: 0.75rem; border-left: 4px solid var(--edge); }
.answer {
  margin: 0; padding: 1rem 1.25rem; background: #fff; border: 2px solid var(--ink); border-radius: 4px;
  font-size: 1.3125rem; line-height: 1.5; font-weight: 700;
}
.lt-play { align-self: start; }

/* Face B: Reading comfort */
.panel-comfort { background: var(--cobalt); color: var(--on-cobalt); border-top-color: rgb(255 255 255 / 0.5); }
.panel-comfort .panel-head p { color: var(--on-cobalt-soft); }
.panel-comfort .panel-foot { color: var(--on-cobalt-soft); }
.comfort { display: grid; grid-template-columns: minmax(16rem, 22rem) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.controls { display: grid; gap: 1.75rem; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend, .range label {
  font-family: var(--f-display); font-stretch: 85%; font-weight: 700; font-size: 1.0625rem; letter-spacing: 0.04em; text-transform: uppercase;
  margin-bottom: 0.6rem; padding: 0;
}
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 1rem;
  background: var(--stock); color: var(--ink); border: 2px solid var(--ink); border-radius: 999px;
  font-size: 1.0625rem; font-weight: 700;
}
.chip input:checked + span { background: var(--live); }
.chip input:focus-visible + span { outline: 3px solid var(--live); outline-offset: 3px; }
.panel-pilot .chip input:focus-visible + span { outline-color: var(--ink); box-shadow: 0 0 0 7px var(--live); }
.range { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 1rem; }
.range label { grid-column: 1 / -1; }
.range input { width: 100%; accent-color: var(--live); height: 2.75rem; cursor: pointer; }
.range output { font-family: var(--f-display); font-stretch: 80%; font-weight: 800; font-variant-numeric: tabular-nums; min-width: 4.5ch; text-align: right; }
/* Six to a row; with enlarged text the swatches shrink to fit rather than widening the page. */
.swatches { display: grid; grid-template-columns: repeat(6, minmax(0, 2.75rem)); gap: 0.6rem; }
.swatch { position: relative; aspect-ratio: 1; }
.swatch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.swatch span {
  display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%;
  border: 2px solid var(--stock); font-family: var(--f-display); font-weight: 800; font-size: 0.95rem;
}
.swatch input:checked + span { box-shadow: 0 0 0 3px var(--cobalt), 0 0 0 6px var(--live); }
.swatch input:focus-visible + span { outline: 3px solid var(--live); outline-offset: 5px; }

.sample {
  --s-bg: #f3ede2; --s-fg: #231e1a; --s-font: var(--f-atkinson); --s-size: 20px; --s-line: 1.6; --s-w: 64ch;
  background: var(--s-bg); color: var(--s-fg); border-radius: 6px;
  padding: clamp(1.5rem, 4vw, 3.5rem);
  font-family: var(--s-font); font-size: var(--s-size); line-height: var(--s-line);
  transition: background-color 240ms var(--ease), color 240ms var(--ease);
}
.sample > * { max-width: var(--s-w); }
.sample h3 { font-family: var(--s-font); font-size: 1.35em; line-height: 1.25; margin-bottom: 0.8em; }
.sample p + p { margin-top: 1.1em; }

/* Resume */
.panel-resume { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.resume-counter {
  font-family: var(--f-display); font-stretch: 70%; font-weight: 750; font-size: clamp(4rem, 9vw, 6rem); line-height: 1;
  font-variant-numeric: tabular-nums; background: var(--ink); color: var(--stock);
  padding: 0.25em 0.4em; border-radius: 8px; box-shadow: inset 0 4px 12px rgb(0 0 0 / 0.6);
}
.resume-counter .counter-p { font-size: 0.5em; }
.resume-body { display: grid; gap: 2rem; }
.resume-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; max-width: 62ch; }
.resume-list li { padding: 1.1rem 0; border-top: 2px solid var(--ink); font-size: 1.1875rem; }
.resume-list li:last-child { border-bottom: 2px solid var(--ink); }
.resume-list strong { font-family: var(--f-display); font-stretch: 95%; font-weight: 800; font-size: 1.3125rem; display: block; }

.panel.is-folded { clip-path: inset(0 0 100% 0); }
.panel.is-unfolded { clip-path: inset(0 0 0 0); transition: clip-path 900ms var(--ease); }

/* Liner notes */
.panel-notes { background: var(--ink); color: var(--on-ink); border-top: 2px dashed rgb(233 232 227 / 0.4); }
.panel-notes h2 { margin-bottom: clamp(2rem, 4vw, 3rem); }
.notes { columns: 2 24rem; column-gap: clamp(2rem, 5vw, 4.5rem); max-width: 76rem; }
.notes p { break-inside: avoid; margin-bottom: 1.6rem; color: var(--on-ink-soft); font-size: 1.1875rem; }
.notes strong { display: block; color: var(--on-ink); font-family: var(--f-display); font-stretch: 95%; font-weight: 800; font-size: 1.3125rem; margin-bottom: 0.2rem; }

/* Author */
.panel-author h2 { margin-bottom: 1.75rem; }
.author-text { max-width: 62ch; display: grid; gap: 1rem; font-size: 1.3125rem; }
.author-sign { font-family: var(--f-display); font-weight: 800; color: var(--ink); }

/* Pilot */
.panel-pilot {
  background: var(--cobalt); color: var(--on-cobalt); border-top-color: rgb(255 255 255 / 0.5);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(2rem, 5vw, 5rem); align-items: start;
}
.pilot-facts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; position: sticky; top: 2rem; }
.facts { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 7rem), 1fr)); gap: 0; border-top: 2px solid rgb(255 255 255 / 0.55); }
.facts div { padding: 1rem 1rem 1rem 0; border-bottom: 2px solid rgb(255 255 255 / 0.55); }
.facts div:last-child { grid-column: 1 / -1; }
.facts dt { font-family: var(--f-display); font-stretch: 85%; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; font-size: 1rem; color: var(--on-cobalt-quiet); }
.facts dd { margin: 0.2rem 0 0; font-family: var(--f-display); font-stretch: 100%; font-weight: 800; font-size: 1.5rem; line-height: 1.2; }
.pilot-limit, .pilot-next { color: var(--on-cobalt-soft); max-width: 46ch; }

.apply {
  position: relative; background: var(--stock); color: var(--ink);
  padding: clamp(1.5rem, 4vw, 3rem); padding-top: calc(clamp(1.5rem, 4vw, 3rem) + 12px);
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem;
  outline: 2px dashed rgb(255 255 255 / 0.55); outline-offset: 0;
}
.apply::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 12px; background: var(--edge); }
.field { display: grid; gap: 0.45rem; }
.field > label, .field > legend { font-weight: 700; font-size: 1.125rem; }
.field > legend { font-family: var(--f-text); text-transform: none; letter-spacing: 0; margin-bottom: 0.45rem; }
.opt { font-weight: 400; color: var(--ink-soft); }
.checks { display: grid; gap: 0.85rem; }
.check { display: grid; grid-template-columns: 1.75rem minmax(0, 1fr); gap: 0.75rem; align-items: start; min-height: 2.75rem; padding-block: 0.35rem; cursor: pointer; font-size: 1.0625rem; }
.check input { width: 1.5rem; height: 1.5rem; margin: 0.15rem 0 0; accent-color: var(--ink); cursor: pointer; }
.err { color: var(--error); font-weight: 700; font-size: 1rem; }
.privacy-link { font-size: 1rem; }
.apply-status:empty { display: none; }
.apply-status { padding: 1rem 1.25rem; border: 2px solid var(--ink); border-radius: 6px; font-weight: 700; }
.apply-status.ok { background: var(--live); }
.apply-status.bad { border-color: var(--error); color: var(--error); background: #fff; }
.key[disabled] { opacity: 0.6; cursor: progress; }

/* Footer */
.foot { background: var(--ink); color: var(--on-ink-soft); padding: 3rem var(--gutter) 3.5rem; border-top: 2px dashed rgb(233 232 227 / 0.4); display: grid; gap: 1rem; font-size: 1rem; }
.foot p { max-width: 70ch; }
.foot-mark { font-size: 1.75rem; color: var(--on-ink); }

/* ---------- Refold for narrower screens ---------- */

@media (max-width: 1080px) {
  .card { grid-template-columns: minmax(0, 1fr); }
  .flap { border-left: 0; border-top: var(--fold); padding-top: 3.5rem; }
  .panel-pilot { grid-template-columns: minmax(0, 1fr); }
  .pilot-facts { position: static; }
  .comfort { grid-template-columns: minmax(0, 1fr); }
  /* One column: the sample comes first, so a change shows before the next control. */
  .comfort .sample { order: -1; }
}

/* Phones, and any short landscape screen: the spine becomes a top bar. */
@media (max-width: 760px), (max-height: 520px) and (orientation: landscape) {
  :root { --gutter: 1.25rem; --bar: 4.1rem; }
  .case { grid-template-columns: minmax(0, 1fr); }
  .spine {
    position: sticky; top: 0; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0.5rem;
    padding: 0.6rem var(--gutter); border-right: 0; border-bottom: var(--fold);
    overflow: visible; /* the slim top bar must not clip focus halos */
  }
  .spine-mark { margin-right: auto; }
  .spine-nav a:not(.spine-cta) { display: none; }
  .spine-nav .spine-cta { display: inline-flex; align-items: center; min-height: 44px; border-top: 0; border-radius: 6px; padding: 0 0.8rem; }
  .lang { display: none; }
  .lang-select { display: block; }
  html { scroll-padding-top: calc(var(--bar) + 0.5rem); }
  /* With enlarged text the bar can grow tall; it then scrolls away instead of covering the page. */
  .spine.is-tall { position: relative; }
  .spine.is-tall ~ main .comfort .sample { top: 0.5rem; }
  .card { min-height: 0; }
  .front { padding-top: 2.5rem; }
  /* Width-led so the headline always fits, even with enlarged text. */
  .front h1 { font-size: min(3.6rem, 12.5vw); font-stretch: 100%; }
  /* Stays on one row at normal size; wraps rather than overflowing when text is enlarged. */
  .transport { gap: 0.5rem; }
  .transport .key-icon { width: 3.25rem; }
  .key-play { flex: 1 1 8rem; min-width: 0; padding: 0 0.85rem; font-size: 1.0625rem; line-height: 1.15; }
  .counter { min-width: 0; padding: 0.4rem 0.6rem; font-size: 1.5rem; }
  .quick .key-apply { width: 100%; }
  .liner-track { grid-template-columns: minmax(0, 1fr) 3.5rem; }
  .lt-side { grid-column: 1; grid-row: 1; flex-direction: row; align-items: center; gap: 1rem; }
  .lt-body { grid-column: 1 / -1; grid-row: 2; }
  .lt-play { grid-column: 2; grid-row: 1; justify-self: end; align-self: center; }
  .panel-resume { grid-template-columns: 1fr; }
  .resume-counter { justify-self: start; }
  .facts dd { font-size: 1.25rem; }
  .key { text-align: center; }
  /* The sample stays in view under the bar while the controls scroll past it. */
  .comfort .sample {
    position: sticky; top: calc(var(--bar) + 0.5rem); z-index: 1;
    max-height: 40svh; overflow: hidden; padding: 1.25rem 1.25rem 2rem;
    /* The cobalt collar hides controls sliding up between the bar and the sample. */
    box-shadow: 0 -0.75rem 0 0.25rem var(--cobalt), 0 14px 24px -14px rgb(0 0 0 / 0.7);
  }
  .comfort .sample::after {
    content: ""; position: absolute; inset: auto 0 0; height: 2.25rem;
    background: linear-gradient(transparent, var(--s-bg)); border-radius: 0 0 6px 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
