/*
  Homepage product demos. Tokens come from styles.css :root (see the header comment there).
  Breakpoints: 960px (medium) and 640px (narrow) only. Text never shrinks on small screens.
  Rhythm: section heading -> visual 48px (--space-7); visual -> status/footnote text 24px (--space-5).
  Card system: one surface (--surface), one hairline (--line), one radius (--radius-md), one padding (--space-6, 24px on phones).
  Motion (product-demos.js, tokens from motion.css): only transform, opacity and clip-path move. Every
  hidden starting state is scoped to html.motion plus a state attribute that only the script writes
  (data-intro, data-caption-anim, data-seg), so the markup alone is the complete static state.
*/

/* Hero: every line sits on the H1 axis. */
.product-hero { display: block; padding-block: var(--page-top) var(--section-y); }
.product-hero .hero-copy { text-align: center; max-width: 800px; margin-inline: auto; }

/* Shared demo pieces */
.demo-note { font-size: var(--fs-meta); line-height: 1.5; color: var(--muted); text-wrap: pretty; }
.media-tag { position: absolute; top: var(--space-2); left: var(--space-2); z-index: 2; padding: 2px 6px; border-radius: 4px; background: var(--scrim); color: var(--ink); font-size: var(--fs-badge); line-height: 1.4; font-weight: 500; letter-spacing: 0; pointer-events: none; }
.product-switch, .demo-options { --seg-pad: var(--space-1); --seg-gap: var(--space-1); position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: var(--seg-gap); padding: var(--seg-pad); border: 1px solid var(--line); border-radius: var(--radius-pill); background: var(--surface-tint); }
.product-switch button, .demo-options button { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-width: 0; min-height: var(--touch); padding: 0 var(--space-3); border: 1px solid transparent; border-radius: var(--radius-pill); background: transparent; color: var(--ink-2); font-size: var(--fs-ui); line-height: 1.2; font-weight: 500; text-align: center; transition: background-color var(--dur-ui) var(--ease-standard), border-color var(--dur-ui) var(--ease-standard), color var(--dur-ui) var(--ease-standard); }
.product-switch button:hover, .demo-options button:hover { color: var(--ink); }
.product-switch button[aria-pressed=true], .demo-options button[aria-pressed=true] { color: var(--ink); background: var(--surface-pressed); border-color: var(--line-strong); }
/* With JS the pressed pill is one shared indicator that slides under the active button
   (product-demos.js sets data-seg, --seg-n and --seg-i). Without JS each pressed button draws its own. */
.product-switch[data-seg]::before, .demo-options[data-seg]::before { content: ''; position: absolute; top: var(--seg-pad); bottom: var(--seg-pad); left: var(--seg-pad); width: calc((100% - 2 * var(--seg-pad) - (var(--seg-n) - 1) * var(--seg-gap)) / var(--seg-n)); border: 1px solid var(--line-strong); border-radius: var(--radius-pill); background: var(--surface-pressed); transform: translate3d(calc(var(--seg-i, 0) * (100% + var(--seg-gap))), 0, 0); transition: transform var(--dur-fade) var(--ease-standard); pointer-events: none; }
[data-seg] > button { position: relative; z-index: 1; }
[data-seg] > button[aria-pressed=true] { background: transparent; border-color: transparent; }
.product-switch button:focus-visible, .demo-options button:focus-visible { outline-offset: 2px; }
button:disabled, input:disabled { cursor: default; }

/* Hero app gallery */
.app-gallery { margin: var(--space-7) 0 0; }
.product-switch { max-width: 560px; margin-inline: auto; }
.switch-index { font-size: var(--fs-badge); color: var(--muted); font-variant-numeric: tabular-nums; }
/* --muted on the pressed fill is 4.3:1; --ink-2 keeps the index above 4.5:1. */
.product-switch button[aria-pressed=true] .switch-index { color: var(--ink-2); }
.app-gallery-caption { margin-top: var(--space-3); text-align: center; font-size: var(--fs-ui); line-height: 1.5; color: var(--ink-2); text-wrap: balance; }
.app-gallery-window { margin-top: var(--space-5); overflow: hidden; border: 1px solid var(--line-strong); border-radius: var(--radius-md); background: var(--surface-2); box-shadow: 0 26px 64px -35px #000; aspect-ratio: 1280 / 800; }
.app-gallery-window { position: relative; }
/* Panels share one frame, so the incoming capture can crossfade over the outgoing one. */
.app-gallery-window > div { position: absolute; inset: 0; }
.app-gallery-window > [data-entering] { z-index: 1; }
.app-gallery-window img { width: 100%; height: 100%; object-fit: cover; }
.app-gallery > .demo-note { margin-top: var(--space-5); text-align: center; }

/* Section headings above the visuals */
.visual-heading { margin-bottom: var(--space-7); }
.visual-heading h2 { max-width: 790px; }
.visual-heading > p { max-width: 640px; margin-top: var(--heading-gap); font-size: var(--fs-lead); line-height: 1.6; }

/*
  9:16 sample frames cut from editor-demo-source.jpg (1672 x 941; facecam = x 0-548, y 567-941).
  Each layer scales the image uniformly: background-size is "<width>% auto", never two percentages.
  For a crop (x, y, w, h) in source pixels: size = 1672 / w, position = x / (1672 - w), y / (941 - h).
  The layer boxes have the same aspect ratio as their crops, so nothing is stretched.
*/
.sample-portrait { position: relative; display: block; aspect-ratio: var(--ar-portrait); overflow: hidden; border-radius: var(--radius-sm); background: var(--surface-2); }
/* No transitions here: height and background-size are layout/paint properties. The layout card
   crossfades the result instead (product-demos.js). */
.sample-game, .sample-face { position: absolute; inset-inline: 0; background: url('/assets/editor-demo-source.jpg') no-repeat; }
/* split: gameplay 548 x 600 at x 556 (0.913 = 61.6% of the frame height), facecam 548 x 374 (1.465 = 38.4%) */
.sample-game { top: 0; height: 61.6%; background-size: 305.11% auto; background-position: 49.47% 0; }
.sample-face { bottom: 0; z-index: 1; height: 38.4%; background-size: 305.11% auto; background-position: 0 100%; box-shadow: 0 -2px 0 var(--surface-2); }
/* single: full-height 9:16 gameplay crop, 529 x 941 at x 566 */
[data-crop=single] .sample-game, [data-sample-layout=single] [data-crop=layout] .sample-game { height: 100%; background-size: 315.88% auto; background-position: 49.5% 0; }
/* face: facecam close-up, 200 x 355.6 at x 125, y 567 (same crop as the hero story's clip 02) */
[data-crop=face] .sample-face { height: 100%; background-size: 836% auto; background-position: 8.49% 96.85%; box-shadow: none; }
/* Sunset over the lake (x 170, y 0, 319 px wide in the 1672 px source; same crop as the hero story). */
[data-crop=view] .sample-game { height: 100%; background-size: 524.14% auto; background-position: 12.56% 0; }
[data-crop=single] .sample-face, [data-crop=view] .sample-face, [data-crop=face] .sample-game, [data-sample-layout=single] [data-crop=layout] .sample-face { opacity: 0; }

/*
  Review of the AI suggestions (#studio), modelled on the app's review list: drafts on the left
  (button group, one selected), the selected draft on the right (9:16 framing preview without
  captions, as in the app's editor preview; title, time range, description, transcript lines).
  All three details share one grid cell, so switching never changes the height; inactive ones are
  visibility: hidden (also for assistive technology). Each detail ends with the draft's position
  in the original video, true to scale, and a zoomed trim view (handles at start and end, with
  their times), as in the app's "Watch & trim" timeline; never loudness, never scores.
  Actions: Watch & trim (a playhead runs through the range) and Approve & render (one way, as in
  the app; the demo has its own reset). product-demos.js enables the controls.
*/
.review-demo { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); align-items: stretch; gap: var(--space-5); }
.review-list, .review-detail { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
/* The list is a column: drafts on top, the approval count at the foot, so the card has no empty band. */
.review-list { display: flex; flex-direction: column; padding: var(--space-3); }
.review-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 var(--space-3); margin-top: auto; padding: var(--space-1) var(--space-2) 0; border-top: 1px solid var(--line); }
/* Count and reset share one touch-height row, so showing the reset never changes the card's height. */
.review-foot > * { min-height: var(--touch); }
.review-count { display: flex; align-items: center; }
.review-reset { min-height: var(--touch); padding: 0; border: 0; background: none; color: var(--ink-2); font-size: var(--fs-meta); line-height: 1.5; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
.review-reset:hover { color: var(--ink); }
.review-reset[hidden] { display: none; }
.review-head { display: flex; justify-content: space-between; gap: var(--space-3); padding: var(--space-1) var(--space-2) var(--space-3); font-size: var(--fs-meta); line-height: 1.5; }
.review-head span:first-child { color: var(--ink); font-weight: 500; }
.review-items { display: grid; gap: var(--space-1); margin-bottom: var(--space-3); }
.review-item { display: grid; grid-template-columns: 56px minmax(0, 1fr); align-items: start; gap: var(--space-3); min-width: 0; padding: var(--space-2); border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent; color: var(--ink-2); text-align: left; transition: background-color var(--dur-ui) var(--ease-standard), border-color var(--dur-ui) var(--ease-standard), color var(--dur-ui) var(--ease-standard); }
.review-item:hover { background: var(--surface-hover); }
.review-item[aria-pressed=true] { border-color: var(--line-strong); background: var(--surface-pressed); color: var(--ink); }
.review-item:focus-visible, .review-approve:focus-visible { outline-offset: 2px; }
.review-item .sample-portrait { width: 56px; border-radius: 4px; }
.review-item-text { display: grid; gap: 2px; min-width: 0; }
.review-item-meta { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.review-index { font-size: var(--fs-badge); line-height: 1.4; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.review-state { padding: 0 6px; border: 1px solid var(--line-strong); border-radius: var(--radius-pill); font-size: var(--fs-badge); line-height: 1.5; color: var(--ink-2); white-space: nowrap; transition: background-color var(--dur-ui) var(--ease-standard), border-color var(--dur-ui) var(--ease-standard), color var(--dur-ui) var(--ease-standard); }
.review-item[data-approved] .review-state { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.review-item-title { font-size: var(--fs-ui); line-height: 1.35; font-weight: 500; overflow-wrap: break-word; hyphens: auto; }
.review-time { font-size: var(--fs-meta); line-height: 1.5; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.review-item[aria-pressed=true] .review-time { color: var(--ink-2); }
/* The spoken line of the moment, in the hero story's quote look. */
.review-quote { justify-self: start; max-width: 100%; margin-top: var(--space-1); padding: 2px 6px; border: 1px solid var(--line); border-radius: 6px; font-size: var(--fs-meta); line-height: 1.35; color: var(--ink-2); overflow-wrap: break-word; }
.review-item[aria-pressed=true] .review-quote { border-color: var(--line-strong); background: var(--surface); color: var(--ink); }

.review-detail { display: grid; gap: var(--space-5); padding: var(--space-5); }
.review-panels { display: grid; }
.review-panel { grid-area: 1 / 1; display: grid; grid-template-columns: 180px minmax(0, 1fr); grid-template-areas: 'preview info' 'preview transcript' 'preview position'; grid-template-rows: auto auto 1fr; gap: var(--space-4) var(--space-5); align-content: start; }
.review-panel[data-inactive] { visibility: hidden; }
.review-preview { grid-area: preview; position: relative; }
.review-preview .sample-portrait { width: 100%; }
.review-duration { top: auto; bottom: var(--space-2); }
.review-info { grid-area: info; display: grid; align-content: start; gap: var(--space-2); min-width: 0; }
.review-info h3 { font-size: var(--fs-title); }
.review-source { display: flex; flex-wrap: wrap; gap: 0 var(--space-2); font-size: var(--fs-meta); line-height: 1.5; color: var(--muted); }
.review-source .review-time { color: var(--ink-2); }
.review-description { font-size: var(--fs-ui); line-height: 1.55; text-wrap: pretty; }
.review-transcript { grid-area: transcript; min-width: 0; padding-top: var(--space-4); border-top: 1px solid var(--line); }
.review-label { margin-bottom: var(--space-2); font-size: var(--fs-meta); line-height: 1.5; color: var(--muted); }
.review-transcript ol { display: grid; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.review-transcript li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: var(--space-3); font-size: var(--fs-ui); line-height: 1.5; color: var(--ink); }
.review-transcript li .review-time { line-height: 21px; }

/* Position and trim. Overview: the whole video 0:00–42:18 with the three drafts true to scale
   (at least 3px), the selected one in ink. A faint wedge zooms from its mark into the trim view:
   transcript sentence blocks, the clip (20–80% of the view) with a handle at each edge, the times
   under the handles, and a playhead that Watch & trim runs from start to end. */
.review-position { grid-area: position; align-self: end; min-width: 0; padding-top: var(--space-4); border-top: 1px solid var(--line); }
.review-position-head { display: flex; justify-content: space-between; gap: var(--space-3); }
.review-bar { position: relative; display: block; height: 8px; border-radius: 4px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.review-mark { position: absolute; top: 0; bottom: 0; left: var(--l); width: max(3px, var(--w)); border-radius: 1px; background: var(--ink-2); opacity: .45; }
.review-mark[data-on] { background: var(--ink); opacity: 1; }
.review-zoomlink { display: block; height: 14px; background: #ffffff12; clip-path: polygon(var(--a) 0, max(calc(var(--a) + 3px), var(--b)) 0, 100% 100%, 0 100%); }
.review-zoom { position: relative; height: 34px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.review-sent { position: absolute; top: 14px; left: var(--l); width: var(--w); height: 4px; border-radius: 2px; background: #ffffff2e; }
.review-sent[data-hot] { background: var(--ink-2); }
.review-clip { position: absolute; top: 3px; bottom: 3px; left: 20%; width: 60%; border: 1.5px solid var(--ink); border-radius: 4px; background: #ffffff12; }
.review-handle { position: absolute; top: -1.5px; bottom: -1.5px; width: 8px; border-radius: 3px; background: var(--ink); }
.review-handle:first-child { left: -4.5px; }
.review-handle:last-child { right: -4.5px; }
.review-handle::before { content: ''; position: absolute; top: 50%; left: 3px; width: 2px; height: 10px; margin-top: -5px; border-radius: 1px; background: var(--surface); }
.review-playhead { position: absolute; top: 0; bottom: 0; left: 20%; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px #00000080; opacity: 0; pointer-events: none; }
.review-handle-times { position: relative; height: 18px; margin-top: var(--space-1); font-size: var(--fs-badge); line-height: 18px; color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.review-handle-times span { position: absolute; top: 0; left: 20%; transform: translateX(-50%); }
.review-handle-times span:last-child { left: 80%; }

.review-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.review-watch, .review-approve { display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--touch); padding: 0 var(--space-5) 0 var(--space-4); border: 1px solid var(--line-strong); border-radius: var(--radius-pill); background: transparent; color: var(--ink); font-size: var(--fs-ui); line-height: 1.2; font-weight: 500; transition: background-color var(--dur-ui) var(--ease-standard), border-color var(--dur-ui) var(--ease-standard), color var(--dur-ui) var(--ease-standard); }
.review-watch:not(:disabled):hover, .review-approve:not(:disabled):not([aria-pressed=true]):hover { border-color: var(--ink-2); }
.review-watch svg { width: 14px; height: 14px; }
.review-approve svg { width: 16px; height: 16px; opacity: .5; transition: opacity var(--dur-ui) var(--ease-standard), transform var(--dur-fade) var(--ease-out-soft); }
.review-approve[aria-pressed=true] { cursor: default; }
.review-approve[aria-pressed=true] { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.review-approve[aria-pressed=true] svg { opacity: 1; }
.motion .review-approve[aria-pressed=true] svg { animation: review-check var(--dur-fade) var(--ease-out-soft); }
@keyframes review-check { from { transform: scale(.6); } to { transform: none; } }
.review-hint { margin-top: calc(var(--space-3) - var(--space-5)); font-size: var(--fs-meta); line-height: 1.5; color: var(--muted); }
.review-count { font-size: var(--fs-meta); line-height: 1.5; color: var(--ink-2); }
.review-note { grid-column: 1 / -1; }
.review-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/*
  First-view sequence (P6), played once when the demo is 35% visible and only if it started below
  the fold. data-intro is written by product-demos.js only (armed -> play -> removed): the drafts
  rise one after another, then the selected draft fades in.
*/
@media screen { /* printing shows the finished demo */
  .motion [data-intro=armed] .review-item { opacity: 0; transform: translate3d(0, var(--reveal-y), 0); }
  .motion [data-intro=armed] .review-panels { opacity: 0; }
}
.motion [data-intro=play] .review-item { --rise-delay: calc(var(--k, 0) * var(--stagger)); transition: transform var(--dur-reveal) var(--ease-standard) var(--rise-delay), opacity var(--dur-reveal-fade) var(--ease-standard) var(--rise-delay), background-color var(--dur-ui) var(--ease-standard), border-color var(--dur-ui) var(--ease-standard), color var(--dur-ui) var(--ease-standard); }
.motion [data-intro=play] .review-panels { transition: opacity var(--dur-reveal-fade) var(--ease-standard) calc(2 * var(--stagger) + 120ms); }
.review-item:nth-child(2) { --k: 1; }
.review-item:nth-child(3) { --k: 2; }

/* Layout and caption cards: same geometry, options pinned to the bottom. */
/* The layout card gets the wider column so its 16:9 source stays readable beside the 9:16 result (>= 279px wide at 961px). */
.editing-demos { --demo-h: 280px; display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: var(--space-5) var(--space-6); }
.feature-demo { display: flex; flex-direction: column; gap: var(--space-5); min-width: 0; padding: var(--space-6); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); }
.demo-stage .sample-portrait { height: var(--demo-h); width: auto; flex-shrink: 0; }
.demo-options { margin-top: auto; }
.visual-feedback { margin-top: calc(var(--space-3) - var(--space-5)); font-size: var(--fs-meta); line-height: 1.5; color: var(--ink-2); }
.editing-note { grid-column: 1 / -1; }
.layout-playground { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 24px auto; align-items: center; gap: var(--space-3); }
.layout-original { position: relative; overflow: hidden; border-radius: var(--radius-sm); }
.layout-original img { width: 100%; aspect-ratio: var(--ar-video); object-fit: cover; }
.layout-arrow { display: grid; place-items: center; color: var(--muted); }
.layout-arrow svg { width: 24px; height: 24px; }
/* Crop frames on the source match the frame layers exactly (same pixel rectangles as above). */
/* Geometry switches instantly; product-demos.js animates the change with a transform (FLIP). */
.crop-box { position: absolute; z-index: 1; border: 1.5px solid var(--ink); box-shadow: 0 0 0 1px var(--scrim); transform-origin: 0 0; transition: opacity var(--dur-fade) var(--ease-standard); }
.game-crop { left: 33.25%; top: 0; width: 32.78%; height: 63.76%; }
.face-crop { left: 0; top: 60.26%; width: 32.78%; height: 39.74%; border-style: dashed; }
[data-sample-layout=single] .game-crop { left: 33.83%; width: 31.66%; height: 100%; }
[data-sample-layout=single] .face-crop { opacity: 0; }
[data-crop=layout] .sample-game:after, [data-crop=layout] .sample-face:after { content: ''; position: absolute; inset: 0; border: 1.5px solid var(--ink); border-radius: inherit; }
[data-crop=layout] .sample-face:after { border-style: dashed; }
/* A crop frame travelling from the source into the 9:16 result (created and removed by product-demos.js). */
.crop-ghost { position: absolute; z-index: 4; top: 0; left: 0; border: 1.5px solid var(--ink); border-radius: 2px; background: #ffffff1f; transform-origin: 0 0; pointer-events: none; will-change: transform, opacity; }
.crop-ghost.is-face { border-style: dashed; }
.layout-legend { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); font-size: var(--fs-meta); line-height: 1.5; color: var(--ink-2); }
.layout-legend span { display: inline-flex; align-items: center; gap: var(--space-2); transition: color var(--dur-fade) var(--ease-standard); }
.layout-legend span:before { content: ''; width: 18px; border-top: 1.5px solid var(--ink); }
.layout-legend .legend-face:before { border-top-style: dashed; }
[data-sample-layout=single] .legend-face { color: var(--muted); }
.caption-playground { display: flex; justify-content: center; }
.caption-video { position: relative; }
.caption-sample { position: absolute; left: var(--space-2); right: var(--space-2); bottom: 16%; z-index: 3; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; color: #fff; text-align: center; font-size: var(--fs-lead); font-weight: 900; line-height: 1.3; text-transform: uppercase; text-shadow: -1px -1px 0 #000, 1px 1px 0 #000, 0 3px 5px #000; overflow-wrap: break-word; }
.caption-sample strong { color: #ffe234; }
/* With JS the caption is split into words (.cw) so each preset can animate the way it renders in
   the app; the spotlight pill (.caption-spot) moves between them. Static/no-JS: the markup above. */
.caption-sample .cw { position: relative; z-index: 1; display: inline-block; max-width: 100%; transform-origin: 50% 70%; }
.caption-spot { position: absolute; z-index: 0; top: 0; left: 0; width: 100px; height: 20px; border-radius: 4px; background: #7c5cff; transform-origin: 0 0; opacity: 0; pointer-events: none; transition: transform var(--dur-ui) var(--ease-standard), opacity var(--dur-ui) var(--ease-standard); }
.motion [data-caption-anim=spotlight] .caption-sample strong { background: transparent; }
.motion [data-caption-anim=spotlight] .caption-spot[data-on] { opacity: 1; }
[data-caption-style=spotlight] .caption-sample strong { color: white; padding: 1px 4px; border-radius: 4px; background: #7c5cff; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
[data-caption-style=subtle] .caption-sample { font-size: var(--fs-body); font-weight: 600; text-transform: none; text-shadow: 0 1px 5px #000, 0 0 3px #000; }
[data-caption-style=subtle] .caption-sample strong { color: #c4f1ff; }
.caption-edit { display: flex; align-items: center; gap: var(--space-3); font-size: var(--fs-ui); color: var(--ink-2); }
.caption-edit input { flex: 1; width: 0; min-width: 0; min-height: var(--touch); padding: 0 var(--space-3); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--bg); color: var(--ink); font: inherit; font-size: var(--fs-body); }
.caption-edit input:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Own pricing teaser under the data-flow figure: copy left, action right; stacked on phones. */
.price-teaser { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--space-3) var(--space-6); padding-top: var(--space-6); border-top: 1px solid var(--line); }
.price-teaser > p { grid-column: 1; max-width: var(--measure); font-size: var(--fs-ui); line-height: var(--lh-ui); }
.price-teaser > .button { grid-column: 2; grid-row: 1 / span 2; }

@media (max-width: 960px) {
  /* Drafts as three columns above the detail. */
  .review-demo { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
  .review-items { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .editing-demos { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .switch-index { display: none; }
  /* Three labels must fit on one line at 320px: 2px insets leave 84px per tab ("KI-Assistent" is 80px). */
  .product-switch { --seg-pad: 2px; --seg-gap: 2px; }
  .product-switch button { padding-inline: 2px; white-space: nowrap; }
  /* 6:5 stage on phones: 960 of the 1280 capture pixels stay visible, so each tab shows its whole panel plus the 9:16 preview. */
  .app-gallery-window { aspect-ratio: 6 / 5; }
  [data-app-panel=layers] img { object-position: 100% 50%; }
  [data-app-panel=transcript] img, [data-app-panel=review] img { object-position: 0 50%; }
  /* Phones: drafts stacked; the transcript runs full width under preview and title. */
  .review-items { grid-template-columns: minmax(0, 1fr); }
  .review-item { grid-template-columns: 40px minmax(0, 1fr); }
  .review-item .sample-portrait { width: 40px; }
  .review-detail { padding: var(--space-4); }
  .review-panel { grid-template-columns: 112px minmax(0, 1fr); grid-template-areas: 'preview info' 'transcript transcript' 'position position'; grid-template-rows: auto auto auto; gap: var(--space-4); }
  .review-info h3 { font-size: var(--fs-body); }
  .review-transcript li { grid-template-columns: 40px minmax(0, 1fr); }
  .editing-demos { --demo-h: 256px; }
  .feature-demo { padding: var(--space-5); }
  .layout-playground { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .layout-original { width: 100%; }
  .layout-arrow svg { transform: rotate(90deg); }
  .caption-edit { flex-direction: column; align-items: stretch; gap: var(--space-2); }
  .caption-edit input { width: 100%; }
  .price-teaser { grid-template-columns: minmax(0, 1fr); }
  .price-teaser > .button { grid-column: 1; grid-row: auto; justify-self: start; margin-top: var(--space-3); }
}
