/* Chapter geometry uses the same visible height measured by chapter-scroll.js.
   Keep natural text flow as the last resort; never clip a chapter to fit. */
:root {
  --chapter-pad:clamp(14px,calc((var(--landing-page-height) - 500px) * .1 + 14px),48px);
  --chapter-gap:clamp(8px,calc((var(--landing-page-height) - 500px) * .055 + 8px),24px);
  --mobile-title:clamp(28px,calc(var(--landing-page-height) * .047),36px);
}
.screen { padding-block:var(--chapter-pad); }
.hero-stage { width:min(980px,100%,calc((var(--landing-page-height) - 145px - var(--chapter-pad) * 2) * 3300 / 2280)); }
.app-section .section-heading { margin-bottom:14px; }
.app-section .eyebrow { margin-bottom:10px; }
.app-section .section-heading>p:not(.eyebrow) { margin-top:10px; }
.app-section .scene-selector { margin-bottom:14px; }
.app-figure { width:min(800px,100%,max(260px,calc((var(--landing-page-height) - var(--chapter-pad) * 2 - 300px) * 1189 / 768))); }
.hardware-section .section-heading { margin-bottom:var(--chapter-gap); }
.hardware-photo { width:min(940px,100%,max(260px,calc((var(--landing-page-height) - var(--chapter-pad) * 2 - 360px) * 2))); }
.diy-section .section-heading { margin-bottom:12px; }
.diy-parts { width:min(1120px,100%,max(580px,calc((var(--landing-page-height) - var(--chapter-pad) * 2 - 340px) * 3.6 + 48px))); }
.diy-note { margin-top:calc(var(--chapter-gap) + 12px); }
.download-logo { margin-bottom:var(--chapter-gap); }
.download-section>p:not(.eyebrow) { margin-block:var(--chapter-gap); }
.download-section .download-note { margin:var(--chapter-gap) 0!important; }

/* The process stays on the page; setup conditions and source live behind one link. */
.voice-section .section-heading { margin-bottom:0; }
.voice-section .eyebrow { margin-bottom:var(--chapter-gap); }
.voice-section .section-heading>p:not(.eyebrow) { margin-top:var(--chapter-gap); }
.voice-tour-controls { margin:var(--chapter-gap) auto calc(var(--chapter-gap) + 4px); }
.voice-demo-layout { gap:clamp(28px,4vw,64px); }
.voice-target-bar { padding:calc(var(--chapter-gap) * .65) 20px; flex-direction:row; align-items:center; }
.voice-target { padding:10px 22px 4px; min-height:0; height:clamp(66px,calc(var(--landing-page-height) * .13),104px); }
.voice-target-text { min-height:0; line-height:1.45; }
.voice-overlay-space { min-height:0; padding-block:clamp(4px,calc((var(--landing-page-height) - 500px) * .035 + 4px),22px); }
.voice-demo-result { padding:calc(var(--chapter-gap) * .6) 20px; }
.voice-utterance { font-size:13px; margin-top:12px; min-height:3.2em; }
.voice-spoken { display:inline; min-height:0; margin:0; }
.voice-demo-description { margin-top:var(--chapter-gap); }
.voice-demo-detail { margin-top:var(--chapter-gap); }
.voice-demo-copy .text-link { margin-top:var(--chapter-gap); }
.voice-mobile-description,.voice-mobile-guide { display:none; }
.voice-source-note { gap:16px; margin-top:var(--chapter-gap); align-items:center; font-size:12px; }
.voice-source-note button { background:transparent; padding:4px 0; font-size:inherit; text-decoration:underline; text-underline-offset:4px; }
.info-open { overflow:hidden; }
.info-dialog { width:min(540px,calc(100vw - 32px)); max-height:calc(100dvh - 32px); padding:28px; border:0; border-radius:22px; background:#fafafa; color:var(--ink); }
.info-dialog::backdrop { background:#1d1d1f66; backdrop-filter:blur(6px); }
.info-dialog-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:24px; }
.info-dialog h2 { font-size:24px; }
.close-notes { padding:8px 10px; border-radius:20px; background:#eaeaed; font-size:13px; white-space:nowrap; }
.info-dialog p { font-size:15px; color:var(--muted); margin-top:14px; }
.info-links { display:flex; gap:16px; flex-wrap:wrap; margin-top:24px; font-size:14px; color:var(--accent); }
.info-links a { text-decoration:underline; text-underline-offset:4px; }

@media(min-width:821px) and (max-height:740px) {
  .section-heading h2,.app-section .section-heading h2 { font-size:34px; }
  .section-heading .eyebrow { margin-bottom:8px; }
  .section-heading>p:not(.eyebrow) { margin-top:10px; }
  .voice-demo-copy h3 { font-size:28px; }
  .voice-target-text { font-size:18px; }
  .voice-selector button { padding-block:9px 15px; }
  .hardware-caption { margin-top:4px; }
  .hardware-caption>.text-link { margin-top:10px; }
  .hardware-caption .hardware-note { margin-top:8px; }
  .hardware-tabs { margin-bottom:8px; }
  .diy-part h3 { font-size:20px; }
  .diy-part p { font-size:15px; margin-top:8px; }
}

@media(max-width:820px) {
  .voice-demo-layout { grid-template-columns:1fr; gap:12px; max-width:540px; }
  .voice-section .section-heading>p:not(.eyebrow) { display:none; }
  .voice-tour-controls { margin:16px auto; }
  .voice-demo-copy h3 { font-size:22px; line-height:1.25; }
  .voice-demo-description,.voice-demo-detail,.voice-demo-copy .text-link { display:none; }
  .voice-mobile-description { display:block; font-size:15px; line-height:1.5; margin-top:10px; color:#62656b; }
  .voice-mobile-guide { display:inline; }
  .voice-source-note { justify-content:center; margin-top:16px; gap:16px; }
  .voice-target-bar { padding-inline:16px; font-size:12px; }
  .voice-target { padding-inline:16px; }
  .voice-target-text,.voice-target-text.is-placeholder { font-size:17px; }
  .voice-demo-result { padding-inline:16px; font-size:12px; }
  .voice-utterance { font-size:12px; line-height:1.5; min-height:3em; margin-top:8px; }
}
@media(max-width:760px) {
  .screen { padding-inline:20px; }
  .section-heading h2,.hardware-section h2,.app-section .section-heading h2,.download-section h2,.community-copy h2 { font-size:var(--mobile-title); }
  .section-heading .eyebrow { margin-bottom:8px; }
  .section-heading>p:not(.eyebrow) { margin-top:10px; }
  .hero-stage { width:min(100%,max(250px,calc((var(--landing-page-height) - 350px) * 3300 / 2280))); }
  .hero-product figcaption { margin-bottom:14px; }
  .hero-actions { margin-top:14px; }
  .hardware-tabs { margin-bottom:8px; }
  .hardware-photo { width:min(560px,100%,max(240px,calc((var(--landing-page-height) - var(--chapter-pad) * 2 - 335px) * 2))); }
  .hardware-caption { margin-top:6px; }
  .hardware-caption h3 { font-size:21px; }
  .hardware-caption>p:not(.hardware-note) { font-size:14px; line-height:1.5; margin-top:8px; }
  .hardware-caption>.text-link { margin-top:10px; }
  .hardware-caption .hardware-note { margin-top:8px; }
  .app-section .scene-selector { margin-bottom:12px; }
  .app-figure figcaption { margin-top:10px; }
  .diy-section .section-heading { margin-bottom:12px; }
  .diy-parts { width:min(440px,100%); gap:8px; }
  .diy-part { grid-template-columns:clamp(86px,calc(var(--landing-page-height) * .17),150px) minmax(0,1fr); }
  .diy-note { margin-top:16px; }
  .community-section { gap:var(--chapter-gap); }
  .community-word { flex-direction:row; flex-wrap:wrap; align-items:center; column-gap:12px; font-size:clamp(23px,5.8vw,36px); letter-spacing:-.04em; }
  .community-word .multiply { font-size:24px; margin:0; }
  .community-copy .eyebrow { margin-bottom:10px; }
  .community-copy h2 br { display:block; }
  .community-copy>p:not(.eyebrow) { margin-top:14px; font-size:14px; }
  .community-copy .button { margin-top:18px; }
  .community-copy .community-note { margin-top:18px!important; }
  .download-section .actions { gap:10px; }
  .download-section .button { padding:12px 18px; }
}
@media(max-width:820px) and (max-height:740px) {
  .voice-section .eyebrow,.voice-demo-copy h3 { display:none; }
  .voice-section h2 { font-size:28px; }
  .voice-tour-controls { margin:12px auto; }
  .voice-selector button { padding-block:9px 15px; }
  .voice-mobile-description { font-size:14px; margin-top:0; }
  .voice-source-note { margin-top:10px; }
  .voice-target-text,.voice-target-text.is-placeholder { font-size:16px; }
  .voice-demo-layout { gap:8px; }
}
/* Short landscape windows use readable natural flow, including a full hero image. */
@media(max-height:550px) {
  .hero-stage { display:flex; flex-direction:column; width:min(560px,100%); }
  .hero-image { top:0; }
  .hero-product figcaption { margin:0 0 14px; }
}
