/*
 * Chartlumo product page (/) – page-specific layout on top of tokens.css + shell.css.
 * Scene states are driven by /js/home.js via classes only (CSP: no style attributes in markup).
 * Breakpoints follow the shell: phone ≤ 700px, tablet ≤ 1024px.
 */

/* ---------- Shared bits ---------- */
.module-status { display: flex; flex-wrap: wrap; gap: 8px; }
.example {
  padding-left: 16px; border-left: 1px solid var(--gold-line);
  color: var(--text-2); max-width: var(--measure);
}
.example strong { color: var(--text-1); }
.flow-num {
  display: inline-grid; place-items: center; flex: none;
  width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid var(--gold-line); color: var(--gold);
  font-size: var(--fs-small); font-weight: 600; line-height: 1;
}
.anchor-alias { position: absolute; }

/* Reveal: content is visible by default; home.js only hides elements that are still below the fold. */
/* Not uniform: captures rise a little further, small cards and list items only lift and
   follow each other; long module texts are never hidden (no reveal class). */
.reveal.is-pending { opacity: .2; transform: translate3d(0, 12px, 0); }
.figure.reveal.is-pending { opacity: .35; transform: translate3d(0, 24px, 0) scale(.985); }
.reveal.is-shown {
  transition: opacity 280ms var(--ease-out), transform 460ms var(--ease-out);
}
.figure.reveal.is-shown { transition-duration: 320ms, 560ms; }
li.reveal.is-shown:nth-child(2) { transition-delay: 50ms; }
li.reveal.is-shown:nth-child(3) { transition-delay: 100ms; }
li.reveal.is-shown:nth-child(4) { transition-delay: 150ms; }

/* ---------- 1 Hero ---------- */
.hero { padding-top: clamp(32px, 1.5rem + 3vw, 72px); overflow: clip; }
.hero-copy { display: grid; justify-items: center; text-align: center; gap: var(--s-5); }
.hero-lead { max-width: 54ch; }
.hero-actions { justify-content: center; margin-top: var(--s-2); }
.hero-status { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 12px; }

.hero-stage {
  position: relative;
  display: flex; justify-content: center; align-items: flex-start;
  margin-top: clamp(40px, 1.5rem + 3vw, 72px);
  padding-inline: var(--gutter);
}
.hero-device { margin: 0; flex: none; width: var(--device-w); --device-w: 340px; }
.hero-device .device { width: 100%; }
.hero-device--center { position: relative; z-index: 2; }
.hero-device--left, .hero-device--right { position: relative; z-index: 1; margin-top: clamp(40px, 6vw, 96px); }
.hero-device--left { margin-right: -48px; }
.hero-device--right { margin-left: -48px; }
.hero-device--left, .hero-device--right { --device-w: 286px; }
/* Side phones sit slightly back; home.js moves .hero-shift outward with scroll (transform only). */
/* Promoted only while the stage is on screen and motion runs (class set by home.js). */
.hero-stage.is-live .hero-shift { will-change: transform; }
.hero-device--left .device, .hero-device--right .device { filter: brightness(.9); }
:root[data-theme="light"] .hero-device--left .device,
:root[data-theme="light"] .hero-device--right .device { filter: none; }
.hero-caption { margin-top: var(--s-6); text-align: center; max-width: 60ch; }

/* ---------- 2 Audience ---------- */
.audience-grid {
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: var(--s-7) clamp(40px, 2rem + 4vw, 112px); align-items: start;
}
.audience-head { position: sticky; top: calc(var(--header-h) + 48px); }
.audience-list { list-style: none; margin: 0; padding: 0; display: grid; }
.audience-list li { padding-block: var(--s-6); border-top: 1px solid var(--line); display: grid; gap: var(--s-2); }
.audience-list li:first-child { padding-top: 0; border-top: 0; }
.audience-note { grid-column: 2; }

/* ---------- 3 Flow (learn → chart → test → ask) ---------- */
.flow-grid { display: grid; grid-template-columns: minmax(0, 1fr); }
.flow-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-9); }
.flow-step { display: grid; gap: var(--s-6); }
.flow-text { display: grid; gap: var(--s-4); max-width: 52ch; }
.flow-text .t-h3 { display: flex; align-items: center; gap: 12px; font-size: clamp(1.375rem, 1.2rem + .8vw, 1.875rem); }
.flow-figure { margin: 0; display: flex; justify-content: center; }
.flow-figure .device { --device-w: 300px; }
.flow-figure { flex-direction: column; align-items: center; }
/* Phones and short landscape screens get a compact crop instead of the full screen
   (the module further down shows the full screen, so the motif is not repeated at full size). */
.flow-detail { display: none; width: 100%; }
.flow-tag { margin-top: calc(-1 * var(--s-2)); }
@media (max-width: 700px), (max-height: 500px) and (orientation: landscape) {
  .flow-figure .device { display: none; }
  .flow-detail { display: block; }
  .flow-detail .shot-detail { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: top; }
  /* Step 2: the landscape chart keeps its own proportions (nothing cropped). */
  #schritt-chart .flow-detail .shot-detail { aspect-ratio: 1200 / 465; object-fit: fill; }
}
.flow-stage { display: none; }
.flow-legend { margin-top: var(--s-6); }

/* Short landscape (phone on its side): static rows, text beside its crop; no sticky phone. */
@media (min-width: 701px) and (max-height: 500px) and (orientation: landscape) {
  .flow-steps { gap: var(--s-7); }
  .flow-step { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: var(--s-6); align-items: center; }
  .flow-detail .shot-detail { max-height: 80svh; }
}

/* Sticky scene: only when home.js runs (html.home-scenes), on wider screens with enough height
   for a legible phone. The scroll distance is the step texts themselves; no empty pin. */
@media (min-width: 701px) and (min-height: 501px) {
  /* Static view (no JS / motion paused): each step is a row of text + its own screenshot. */
  .flow-steps { gap: var(--s-9); }
  .flow-step { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 2rem + 3vw, 96px); align-items: center; }

  :root.home-scenes .flow-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 2rem + 3vw, 96px); }
  :root.home-scenes .flow-step { grid-template-columns: minmax(0, 1fr); }

  :root.home-scenes .flow-figure { display: none; }
  :root.home-scenes .flow-steps { gap: 0; }
  /* Steps follow each other closely (≈ 30 vh between texts): every scroll metre moves text, and the
     middle line of the viewport always lies inside exactly one step, so the screen change stays clear. */
  :root.home-scenes .flow-step { min-height: 0; align-content: center; padding-block: 15svh; }
  :root.home-scenes .flow-step:first-child { padding-top: 0; }
  /* The scene ends when the last text sits in the middle beside the phone: the bottom padding is half
     the phone's height minus half a text block, so the phone is released only after step 4 was read. */
  :root.home-scenes .flow-step:last-child {
    padding-bottom: max(0px, calc(min(300px, (100svh - var(--header-h) - 150px) * .44) * 1.14 - 120px));
  }
  :root.home-scenes .flow-text { opacity: .38; transition: opacity 400ms var(--ease-out); }
  :root.home-scenes .flow-step.is-active .flow-text { opacity: 1; }
  :root.home-scenes .flow-stage { display: block; }

  .flow-sticky {
    --device-w: min(300px, calc((100svh - var(--header-h) - 150px) * .44));
    /* Vertically centred in the visible area below the header (device ≈ 2.28 × its width tall). */
    position: sticky;
    top: max(calc(var(--header-h) + 24px), calc(50svh + var(--header-h) / 2 - var(--device-w) * 1.14));
    display: grid; justify-items: center;
  }
  /* Screens stacked inside one frame; the active one cross-fades in. */
  .flow-sticky > * { grid-area: 1 / 1; align-self: center; }
  .flow-device { display: grid; transition: opacity 500ms var(--ease-out); }
  .flow-device > .flow-screen { grid-area: 1 / 1; opacity: 0; transition: opacity 500ms var(--ease-out); }
  .flow-device > .flow-screen.is-active { opacity: 1; }
  .flow-device .device-screen { grid-area: auto; }
}
/* No motion: all steps fully readable and opaque. */
:root[data-motion="off"].home-scenes .flow-text { opacity: 1; }

/* ---------- 4 Modules ---------- */
.module-copy { --stack: var(--s-5); }
.facts {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-5) var(--s-6); margin: var(--s-2) 0;
  padding-block: var(--s-5); border-block: 1px solid var(--line);
}
.facts div { display: grid; gap: 4px; align-content: start; }
.facts dt { font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.5rem); line-height: 1; letter-spacing: -.02em; color: var(--gold); font-weight: 400; }
.facts dd { margin: 0; font-size: var(--fs-small); line-height: 1.5; color: var(--text-2); }

/* Charts: two-column head, one landscape capture, then the toolkit band */
.charts-head {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--s-6) clamp(40px, 2rem + 4vw, 112px); align-items: end;
}
.landscape-figure { margin: clamp(40px, 2rem + 2vw, 64px) 0 0; display: grid; gap: var(--s-4); }
.landscape-frame {
  border-radius: var(--r-lg); overflow: hidden;          /* rounds the image corners only */
  border: 1px solid var(--line-strong); background: #0d0d0c; box-shadow: var(--shadow-2);
}
/* Phones swap in a detail capture via <picture>; the wrapper must not change the layout. */
.landscape-frame picture { display: contents; }
/* The left 96 px of the capture hold only the simulator's camera cut-out: cropped, app UI untouched. */
.landscape-shot { width: 100%; height: auto; aspect-ratio: 1304 / 644; object-fit: cover; object-position: 100% 50%; }
/* Animated drawing tools (desktop only, see "Large desktop windows"); phones and tablets keep the capture. */
.module-charts .dt { display: none; }
.toolkit {
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: var(--s-7) clamp(40px, 2rem + 4vw, 96px);
  margin-top: clamp(48px, 2.5rem + 2vw, 80px); padding-top: var(--s-7); border-top: 1px solid var(--line);
}
.toolkit-col { display: grid; gap: var(--s-5); align-content: start; }
.glossary { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5) var(--s-6); }
.glossary div { display: grid; gap: 4px; align-content: start; }
.glossary dt { font-weight: 600; color: var(--text-1); font-variant-numeric: tabular-nums; }
.glossary dd { margin: 0; font-size: var(--fs-small); line-height: 1.55; color: var(--text-2); }
.tool-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px var(--s-5);
}
.tool-list li { display: flex; gap: 10px; align-items: baseline; color: var(--text-1); }
.tool-list li::before {
  content: ""; flex: none; width: 10px; height: 1.5px; background: var(--gold); transform: translateY(-4px);
}
.toolkit-extra { color: var(--text-2); }

/* Backtesting */
.points { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-4); max-width: var(--measure); }
.points li { position: relative; padding-left: 22px; color: var(--text-2); }
.points li::before {
  content: ""; position: absolute; left: 0; top: .72em; width: 10px; height: 1.5px; background: var(--gold);
}
.points strong { color: var(--text-1); }


/* Backtesting: copy beside the illustrative sequence, then the app capture beside the details */
.bt-layout {
  display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: var(--s-7) clamp(40px, 2rem + 3vw, 88px); align-items: center;
}
.bt-slot { min-width: 0; }
.bt-details {
  display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: var(--s-7) clamp(40px, 2rem + 3vw, 88px); align-items: center;
  margin-top: clamp(48px, 2.5rem + 2vw, 80px); padding-top: var(--s-7); border-top: 1px solid var(--line);
}
.bt-figure .device { --device-w: 260px; }

/* Lumo: copy beside the start screen */
.lumo-layout {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: var(--s-7) clamp(40px, 2rem + 4vw, 112px); align-items: center;
}
.status-note { color: var(--text-2); }

/* Main capture with a second, smaller phone overlapping (no extra page height) */
/* Two phones side by side, the second one smaller and set lower; they never overlap, so no
   screen content is covered. The pair shares its column width; the caption sits below it. */
.device-pair {
  display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: clamp(14px, 1.6vw, 24px); align-items: end;
  width: min(100%, 540px);
}
.device-pair > .device { width: 100%; }
.fig-overlay { margin-bottom: 9%; }
.shot-detail { width: 100%; height: auto; border-radius: var(--r-md); border: 1px solid var(--line-strong); box-shadow: var(--shadow-1); }

/* SEC */
.sec-figure { order: 0; }

/* Markets */
.markets-layout {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: var(--s-7) clamp(40px, 2rem + 4vw, 112px); align-items: start;
}
.markets-figure { grid-column: 2; grid-row: 1 / span 2; }
.market-table { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-6); }
.market-group { display: grid; gap: var(--s-3); align-content: start; }
.market-group ul { list-style: none; margin: 0; padding: 0; display: grid; }
.market-group li {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding-block: 12px; border-top: 1px solid var(--line);
}
.market-group b { color: var(--text-1); font-weight: 600; }
.market-group li span { color: var(--text-2); font-size: var(--fs-small); text-align: right; }
.market-caption { grid-column: 1 / -1; }

/* ---------- 6 Status ---------- */
.status-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-6); }
.status-col {
  display: grid; gap: var(--s-5); align-content: start;
  padding: var(--s-6); border-radius: var(--r-lg); background: var(--surface-1); border: 1px solid var(--line);
}
.status-col:last-child { background: transparent; border: 1px dashed var(--line-ui); }
.status-title { margin: 0; }
.status-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.status-list li { font-size: var(--fs-small); line-height: 1.55; color: var(--text-2); padding-left: 18px; position: relative; }
.status-list li::before { content: ""; position: absolute; left: 0; top: .72em; width: 8px; height: 1.5px; background: var(--text-3); }

/* ---------- 7 Investor teaser ---------- */
.investors-teaser { position: relative; }
.teaser {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-6) var(--s-8); align-items: end;
  padding-top: var(--s-7); border-top: 1px solid var(--gold-line);
}
.teaser .t-lead { max-width: 52ch; }

/* ---------- 8 FAQ ---------- */
.faq { padding-top: 0; padding-bottom: clamp(64px, 3rem + 3vw, 104px); }
.site-footer { margin-top: 0; }  /* the FAQ padding is the only gap above the footer */
.faq-list { margin-top: var(--s-6); border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 60px; padding-block: 14px; cursor: pointer; list-style: none;
  font-size: 1.0625rem; font-weight: 500; color: var(--text-1);
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {        /* drawn plus/minus */
  content: ""; flex: none; width: 14px; height: 14px;
  background: linear-gradient(var(--gold), var(--gold)) center / 14px 1.6px no-repeat,
              linear-gradient(var(--gold), var(--gold)) center / 1.6px 14px no-repeat;
  transition: transform var(--dur-2) var(--ease-out);
}
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list details p { padding: 0 0 20px; color: var(--text-2); max-width: var(--measure); }
@media (hover: hover) and (pointer: fine) { .faq-list summary:hover { color: var(--gold); } }

/* ---------- Tablet ---------- */
@media (max-width: 1024px) {
  .hero-device--left, .hero-device--right { --device-w: 230px; }
  .hero-device--center { --device-w: 300px; }
  .glossary { grid-template-columns: minmax(0, 1fr); }
  .toolkit { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

  .status-grid { grid-template-columns: minmax(0, 1fr); }
  .status-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); }
  .status-col { padding: var(--s-5); }
}
@media (max-width: 900px) {
  .status-grid { grid-template-columns: minmax(0, 1fr); }
  .audience-grid { grid-template-columns: minmax(0, 1fr); }
  .audience-head { position: static; }
  .audience-note { grid-column: 1; }
  .split, .split--text-wide { grid-template-columns: minmax(0, 1fr); }
  .charts-head, .lumo-layout, .markets-layout, .bt-layout, .bt-details { grid-template-columns: minmax(0, 1fr); }
  .markets-figure { grid-column: auto; grid-row: auto; }
  .toolkit { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Phone ---------- */
@media (max-width: 700px) {
  .hero-copy { justify-items: start; text-align: left; }
  .hero-actions { justify-content: stretch; width: 100%; }
  .hero-status { justify-content: flex-start; }
  .hero-caption { text-align: left; }
  /* One large phone, two cut-off phones at the edges. */
  .hero-stage { padding-inline: 0; }
  .hero-device--center { --device-w: min(72vw, 320px); }
  .hero-device--left, .hero-device--right { --device-w: min(56vw, 250px); }
  .hero-device--left { margin-right: -22vw; }
  .hero-device--right { margin-left: -22vw; }

  .flow-figure .device, .figure .device-lg { --device-w: min(80vw, 340px); }

  /* Horizontal rows (native scroll + snap, next card visibly cut off, vertical scrolling untouched). */
  [data-swipe] {
    display: grid; grid-auto-flow: column; grid-template-columns: none;
    gap: 12px; overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
    margin-inline: calc(-1 * var(--gutter)); padding: 2px var(--gutter) 12px;
    scrollbar-width: none;
  }
  [data-swipe]::-webkit-scrollbar { display: none; }
  [data-swipe] > * {
    scroll-snap-align: start;
    padding: var(--s-5); border-radius: var(--r-lg);
    background: var(--surface-1); border: 1px solid var(--line);
  }
  /* Flow: four equally tall step cards (84vw, next card peeking). Text on top, then one image
     area of fixed 5:4 proportions at the card's foot; each motif keeps its key part in view. */
  .flow-steps { grid-auto-columns: 84vw; gap: 12px; align-items: stretch; }
  .flow-step { grid-template-rows: auto 1fr; gap: var(--s-5); padding: var(--s-5); }
  .flow-text { gap: var(--s-3); }
  .flow-figure { align-self: end; }
  .flow-detail { width: 100%; }
  .flow-detail .shot-detail, #schritt-chart .flow-detail .shot-detail {
    width: 100%; height: auto; aspect-ratio: 5 / 4; object-fit: cover;
    border-radius: var(--r-md); border: 1px solid var(--line-strong); box-shadow: none;
  }
  #schritt-lernen .flow-detail .shot-detail { object-position: 50% 100%; }   /* whole chart + caption */
  #schritt-chart .flow-detail .shot-detail { object-position: 100% 50%; }    /* position, labels, price axis */
  #schritt-pruefen .flow-detail .shot-detail { object-position: 50% 17%; }   /* replay chart with the setup */
  #schritt-fragen .flow-detail .shot-detail { object-position: 50% 0; }      /* title and the three example questions */
  .flow-text .t-h3 { font-size: 1.25rem; }
  /* Indicators: compact cards. */
  .glossary { grid-auto-columns: min(72%, 280px); }
  /* Markets: two columns, symbol above its name. */
  .market-table { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5); }
  .market-group li { display: grid; gap: 2px; padding-block: 10px; }
  .market-group li span { text-align: left; }
  /* Tighter rhythm for long module texts. */
  .module-copy { --stack: var(--s-4); }
  .facts { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-4); }
  /* Phones: both screens at the same readable size in a native swipe row (second one peeking),
     so the caption still describes what is shown. */
  .device-pair {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: min(66vw, 280px);
    gap: 14px; align-items: start; justify-self: stretch;
    width: calc(100% + 2 * var(--gutter)); max-width: none; margin-inline: calc(-1 * var(--gutter));
    padding: 4px var(--gutter) 18px; overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); scrollbar-width: none;
  }
  .device-pair::-webkit-scrollbar { display: none; }
  .device-pair > .device { scroll-snap-align: start; }
  .fig-overlay { margin-bottom: 0; }
  .overlay-figure .device-caption { margin-top: var(--s-2); }
  /* Text before image, as in every other module. */
  .module-sec .split > .module-copy { order: -1; }
  .module .figure .device-lg { --device-w: min(72vw, 320px); }
  .teaser { grid-template-columns: minmax(0, 1fr); }
  .tool-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px var(--s-4); }
  /* Landscape chart: uncropped, edge to edge, so every label stays whole and as large as possible. */
  /* Landscape chart: inside the page margin, rounded like on desktop; the phone gets the sharper
     detail capture (<picture> source) cropped to 4:3 around position, labels and price axis. */
  .landscape-shot { aspect-ratio: 4 / 3; object-fit: cover; object-position: 100% 50%; }
  .landscape-figure { margin-top: var(--s-6); gap: var(--s-3); }
  .bt-figure .device { --device-w: min(62vw, 250px); }
  .bt-details { margin-top: var(--s-7); padding-top: var(--s-6); gap: var(--s-6); }
  .bt-layout { gap: var(--s-6); }
  .lumo-layout { gap: var(--s-6); }
  /* Denser setting of the long texts on phones (same words, slightly tighter leading). */
  main .t-body, main .points li { line-height: 1.55; }
  main .t-lead { line-height: 1.45; }
  /* Compact status columns, captions and section heads. */
  .status-col { padding: var(--s-5) var(--s-4); gap: var(--s-4); }
  .status-list { gap: 8px; }
  .device-caption, .figure-caption { margin-top: var(--s-3); }
  .section-head { margin-bottom: var(--s-6); }
  .section { padding-block: 52px; }
  .facts { padding-block: var(--s-4); }
  .toolkit { margin-top: var(--s-6); padding-top: var(--s-5); }
  .flow-legend { margin-top: var(--s-5); }
  .hero-caption { margin-top: var(--s-5); }
  .audience-list li { padding-block: var(--s-4); }
  .faq-list { margin-top: var(--s-5); }
  .faq { padding-top: 0; }
  .faq-list summary { min-height: 48px; padding-block: 11px; }
  .hero-copy { gap: var(--s-4); }
  .hero-stage { margin-top: 28px; }
  .section-head { gap: var(--s-3); }
  .status-grid { gap: var(--s-3); }
  .teaser { padding-top: var(--s-6); }
  /* Captions may use the full column (one line instead of two); notes a little tighter. */
  .device-caption, .figure-caption { max-width: none; }
  .note { padding: 12px 14px; gap: 10px; }
  .facts { margin: 0; }
}

/* ---------- Short landscape (phone on its side) ---------- */
@media (orientation: landscape) and (max-height: 500px) {
  /* A device frame is about 2.11 × its width tall: cap it at ~85% of the visible height. */
  .device { max-width: calc(85svh / 2.11); }
  .hero-device { max-width: calc(85svh / 2.11); }
  .device-pair { width: min(100%, calc(85svh / 2.11 * 1.62 + 24px)); }
  .section { padding-block: 48px; }
  .hero-stage { margin-top: 32px; }
}

/* ---------- Motion off: static, complete reading view ---------- */
:root[data-motion="off"] .reveal.is-pending { opacity: 1; transform: none; }
:root[data-motion="off"] .hero-shift { transform: none !important; }

/* ---------- Phone on its side only (not desktop or tablet windows) ---------- */
/* The step crops use the same 5:4 framing as in portrait, so chart, caption and setup stay whole. */
@media (orientation: landscape) and (max-height: 500px) and (max-width: 950px) {
  .flow-detail .shot-detail, #schritt-chart .flow-detail .shot-detail {
    aspect-ratio: 5 / 4; object-fit: cover; max-height: none;
  }
  #schritt-lernen .flow-detail .shot-detail { object-position: 50% 100%; }
  #schritt-chart .flow-detail .shot-detail { object-position: 100% 50%; }
  #schritt-pruefen .flow-detail .shot-detail { object-position: 50% 17%; }
  #schritt-fragen .flow-detail .shot-detail { object-position: 50% 0; }
}

/* ---------- Large desktop windows ---------- */
/* Above 1280 px the page grows with the window instead of staying a fixed 1180 px strip: every value
   equals the tablet/laptop value at 1280 px and grows linearly to its cap at 1920 px. Body text keeps
   its reading measure (section heads 760 px, copy 66ch); the extra width goes to screenshots, the
   landscape chart and the margins between columns. Phones are also capped by the window height, so they
   always fit below the header, and never get smaller than before. Short windows (≤ 500 px) keep the
   landscape rules above. Nothing here applies at 1024 px or below. */
@media (min-width: 1025px) and (min-height: 501px) {
  :root {
    /* 1280 → 1180, 1440 → 1275, 1920 → 1560, ≥ 2189 → 1720 */
    --home-w: clamp(1180px, 1180px + (100vw - 1280px) * .59375, 1720px);
    /* Tallest phone that fits below the header (frame ≈ 2.113 × its width). */
    --dev-cap: calc((100svh - var(--header-h) - 96px) / 2.12);
    /* Sticky flow phone: grows with the window, still limited by the visible height as before. */
    --flow-device-w: min(clamp(300px, 300px + (100vw - 1280px) * .125, 380px), calc((100svh - var(--header-h) - 150px) * .44));
  }
  :root .wrap { width: min(var(--home-w), 100% - 2 * var(--gutter)); }
  /* Header bar shares the content edges (same width as the sections below). */
  :root .site-bar { width: min(var(--home-w), 100%); }

  /* Hero trio */
  .hero-device--center { --device-w: clamp(340px, 340px + (100vw - 1280px) * .125, 420px); }
  .hero-device--left, .hero-device--right { --device-w: clamp(286px, 286px + (100vw - 1280px) * .1, 350px); }
  .hero-device--left { margin-right: calc(-48px - (var(--device-w) - 286px) * .168); }
  .hero-device--right { margin-left: calc(-48px - (var(--device-w) - 286px) * .168); }

  /* Module screenshots */
  .module .figure .device-lg { --device-w: max(340px, min(clamp(340px, 340px + (100vw - 1280px) * .125, 420px), var(--dev-cap))); }
  .bt-figure .device { --device-w: max(260px, min(clamp(260px, 260px + (100vw - 1280px) * .109375, 330px), var(--dev-cap))); }
  .device-pair { width: min(100%, max(540px, min(clamp(540px, 540px + (100vw - 1280px) * .21875, 680px), var(--dev-cap) * 1.625 + 24px))); }

  /* Flow: static rows (motion off) and the sticky scene */
  .flow-figure .device { --device-w: max(300px, min(clamp(300px, 300px + (100vw - 1280px) * .125, 380px), var(--dev-cap))); }
  .flow-sticky { --device-w: var(--flow-device-w); }
  :root.home-scenes .flow-step:last-child {
    padding-bottom: max(0px, calc(var(--flow-device-w) * 1.14 - 120px));
  }

  /* Landscape chart: as wide as the content, but never taller than the window allows. */
  .landscape-figure { width: min(100%, max(1180px, (100svh - var(--header-h) - 160px) * 2.02)); margin-inline: auto; }

  /* Charts: the animated drawing tools replace the landscape capture. The phone fills the content width
     up to 1400 px and stays short enough that status bar, phone and caption fit below the header. */
  .module-charts .landscape-figure { display: none; }
  .module-charts .dt {
    display: grid;
    width: min(100%, 1400px, max(1000px, (100svh - var(--header-h) - 190px) * 2.096));
    margin: clamp(40px, 2rem + 2vw, 64px) auto 0;
  }
}
@media (min-width: 1440px) and (min-height: 501px) {
  /* Copy columns already sit at their reading measure: the extra width goes to the screenshots. */
  .module-learn .split--text-wide,
  .lumo-layout, .markets-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  /* FAQ aligns with the left content edge like every other section, keeping its 720 px measure. */
  .faq .wrap-text { width: min(var(--home-w), 100% - 2 * var(--gutter)); }
  .faq-list { max-width: 720px; }
}
