@font-face {
  font-family: Inter;
  src: url('../../fonts/Inter-roman-latin.woff2') format('woff2');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
:root {
  color-scheme: light;
  --navy: #101738;
  --indigo: #5955e8;
  --ink: #1a2238;
  --muted: #535f75;
  --line: #d9deea;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-synthesis: none;
  color: var(--ink);
  background: transparent;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; min-width: 320px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button, a, input { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .4; }
:focus-visible { outline: 3px solid var(--indigo); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.app { height: 100vh; height: 100dvh; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.presentation { min-width: 0; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 24px 32px; scrollbar-gutter: stable; }
.presentation:focus-visible { outline-offset: -3px; }
.slide { max-width: 1436px; margin: 0 auto; padding: clamp(24px, 3vw, 44px); border: 1px solid var(--muted); border-radius: 0; background: transparent; color: var(--ink); }
.slide-heading, .stage { max-width: 1160px; margin-inline: auto; }
.eyebrow { color: var(--ink); font-size: 14px; letter-spacing: .1em; font-weight: 650; margin: 0 0 10px; }
h1 { font-size: clamp(29px, 3.3vw, 46px); line-height: 1.13; letter-spacing: -.035em; margin: 0 0 14px; overflow-wrap: normal; }
.summary { max-width: 1000px; font-size: clamp(17px, 1.6vw, 21px); color: var(--ink); line-height: 1.5; margin: 0 0 28px; }
.stage { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(250px, 1fr); gap: 28px; align-items: start; min-width: 0; }
.diagram { margin: 0; min-width: 0; }
.scene-meta { display: flex; gap: 10px; align-items: baseline; color: var(--ink); font-size: 14px; font-weight: 600; margin-bottom: 14px; }
#scene-count { color: var(--ink); font-variant-numeric: tabular-nums; }
.scene-step-picker { display: none; min-width: 0; width: 100%; }
.scene-step-picker select { width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--muted); border-radius: 0; color: var(--ink); background: transparent; color-scheme: dark; font-size: 14px; font-weight: 600; }
#scene { min-width: 0; }
figcaption { color: var(--ink); font-size: 14px; line-height: 1.5; margin-top: 18px; }
.steps { min-width: 0; }
.step-list { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--muted); display: grid; gap: 3px; }
.step { min-width: 0; }
.step-button { display: grid; gap: 3px; width: calc(100% + 1px); min-height: 44px; margin-left: -1px; padding: 8px 12px 8px 15px; border: 0; border-left: 2px solid transparent; border-radius: 0 0 0 0; text-align: left; background: transparent; color: var(--ink); font-weight: 450; line-height: 1.35; transition: background-color .2s, border-color .2s, opacity .2s; }
.step-button:hover { background: transparent; }
.step-category { font-size: 14px; font-weight: 600; color: var(--ink); }
.step-title { font-size: 15px; font-weight: 600; }
.step-detail { font-size: 14px; line-height: 1.5; color: var(--ink); }
.step:not(.is-current) .step-category, .step:not(.is-current) .step-detail { display: none; }
.step.is-future .step-title { color: var(--ink); }
.step.is-current .step-button { border-left-color: var(--muted); background: transparent; }
.step-list.is-all .step-category, .step-list.is-all .step-detail { display: block; }
.completion { max-width: 1160px; margin: 22px auto 0; color: var(--ink); font-size: 15px; }
audio { display: none; }
@media (max-width: 959px) {
  .stage { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .scene-step-static { display: none; }
  .scene-step-picker { display: block; }
  .step-list { grid-template-columns: minmax(0, 1fr); gap: 3px; border-left: 0; }
  .step-list:not(.is-all) .step:not(.is-current) { display: none; }
  .step-button { width: 100%; margin: 0; min-height: 40px; padding: 8px 12px; }
  .step-title { font-size: 16px; }
  .summary { margin-bottom: 22px; }
}
@media (min-width: 960px) and (max-height: 1000px) {
  .presentation { padding-block: 10px; }
  .slide { padding: 18px 26px; }
  .eyebrow { margin-bottom: 6px; }
  h1 { font-size: clamp(26px, 2.6vw, 34px); margin-bottom: 8px; }
  .summary { font-size: 16px; margin-bottom: 14px; }
  .scene-meta { margin-bottom: 10px; }
  .stage { grid-template-columns: minmax(0, 2.2fr) minmax(220px, 1fr); gap: 20px; }
  /* One footer band: narration controls and status, timeline, then chapter navigation. */
  /* Previous/next keep their accessible names; only the visible text yields its width to the timeline. */
  .step-button { min-height: 36px; padding-block: 6px; }
}
@media (min-width: 960px) and (max-height: 720px) {
  /* Very short landscape frames (e.g. a 1024 × 768 iPad inside the product-page dialog): the title carries the chapter, the eyebrow yields its line. */
  .eyebrow { display: none; }
  .presentation { padding-block: 8px; }
  .slide { padding-block: 14px; }
  h1 { font-size: 26px; margin-bottom: 4px; }
  .summary { margin-bottom: 10px; }
  .scene-meta { margin-bottom: 6px; }
  .step-list { gap: 1px; }
  .step-button { min-height: 30px; padding-block: 3px; }
}
@media (max-width: 600px) {
  .presentation { padding: 14px 12px; }
  .slide { padding: 22px 18px; border-radius: 0; }
  .eyebrow { font-size: 14px; letter-spacing: .06em; }
  .summary { margin-bottom: 20px; }
  .stage { gap: 12px; }
  .step-list { grid-template-columns: minmax(0, 1fr); }
  .scene-meta { margin-bottom: 12px; }
  figcaption { margin-top: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
