/* An extension of Bedline's existing landing tokens and components. */
.story-page { --story-muted: #465b76; }
.story-page .pill { background: var(--amber-deep); }
.story-page .pill:hover { background: #963f05; }
.story-page [hidden] { display: none !important; }
.story-width { width: min(calc(100% - 112px), 1280px); margin-inline: auto; }
.story-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 112px; position: sticky; top: 0; z-index: 20; background: var(--cream); }
.story-header .landing-brand { font-size: 34px; }
.story-header .landing-brand img { width: 46px; height: 46px; }
.story-header-note { margin-left: auto; color: var(--slate); font-size: 15px; }
.story-header-note:hover { color: var(--amber-deep); }
.story-header .header-download { font-size: 15px; }
.story-progress { padding-block: 12px 0; scroll-margin-top: 112px; }
.story-progress ol { list-style: none; display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 12px; padding: 0; margin: 0; }
.story-progress li { padding-top: 14px; border-top: 3px solid #ded5c8; color: var(--slate); font-size: 12px; }
.story-progress li[aria-current] { border-color: var(--amber); color: var(--amber-deep); font-weight: 800; }
.story-progress li.is-done { border-color: #89b8a6; }
.story-stage { display: grid; grid-template-columns: minmax(0,1.12fr) minmax(0,1fr); align-items: center; gap: clamp(40px,5vw,80px); min-height: 650px; padding-block: 58px 48px; }
.story-copy { min-width: 0; }
.story-eyebrow { color: var(--amber-deep); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; font-weight: 800; margin-bottom: 22px !important; }
.story-eyebrow span { opacity: .6; margin-left: 10px; }
.story-page :is(h1,h2) { font-size: clamp(40px,4.5vw,67px); line-height: 1.08; letter-spacing: -.045em; }
.story-page :is(h1,h2):focus { outline: none; }
.story-lead { max-width: 580px; font-size: clamp(17px,1.45vw,21px); color: var(--slate); line-height: 1.65; margin-top: 25px !important; }
.story-answers { display: grid; gap: 10px; margin-top: 28px; max-width: 540px; }
.answer-card { width: 100%; min-height: 76px; text-align: left; display: flex; align-items: center; gap: 16px; padding: 14px 20px; border: 1px solid #e3d8c8; border-radius: 20px; background: var(--paper); color: var(--navy); box-shadow: 0 4px 12px #1c100704; cursor: pointer; transition: border-color .2s, transform .2s, box-shadow .2s; }
.answer-card strong { display: block; font-size: 17px; font-weight: 800; line-height: 1.35; }
.answer-card small { display: block; color: var(--slate); font-size: 13px; margin-top: 3px; line-height: 1.4; }
.answer-card > span:not(.answer-icon) { flex: 1; }
.answer-icon { display: grid; place-items: center; width: 44px; height: 44px; flex: none; background: #f9ead7; border-radius: 14px; color: var(--amber-deep); }
.answer-card:last-child .answer-icon { background: var(--mint); color: var(--pine); }
.answer-card .answer-arrow { width: 19px; color: #9e8b75; flex: none; }
.answer-card:hover { border-color: var(--amber); transform: translateX(4px); box-shadow: 0 6px 22px #4d2b0d0a; }
.answer-card[aria-pressed="true"] { border-color: var(--amber); background: #fff7eb; }
.story-small { font-size: 12px; color: var(--slate); line-height: 1.6; }
.story-reassurance { margin-top: 18px !important; }
.story-art { position: relative; align-self: center; padding-bottom: 64px; }
.story-art > img { width: 100%; aspect-ratio: 1.12; object-fit: cover; border-radius: 36px; }
.story-note { position: absolute; bottom: 0; left: 7%; right: 7%; display: flex; align-items: center; gap: 16px; padding: 23px 22px; border-radius: 24px; border: 1px solid var(--rule); box-shadow: 0 14px 40px #51311c0c; background: var(--paper); transform: rotate(-2deg); }
.story-note strong, .story-note span span { display: block; }
.story-note strong { font-size: 18px; line-height: 1.4; }
.story-note span span { margin-top: 5px; font-size: 13px; color: var(--slate); }
.note-moon { width: 48px; height: 48px; background: var(--mint); border-radius: 16px; display: grid; place-items: center; color: var(--pine); flex: none; }
.story-question { margin-top: 26px !important; font-size: 19px; line-height: 1.5; letter-spacing: -.02em; }
.story-response { margin-top: 22px !important; font-size: 17px; line-height: 1.6; color: var(--pine); }
.insight-stage .story-response { margin: 0 0 20px !important; }
.story-source { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 13px; color: var(--amber-deep); text-decoration: underline !important; margin-top: 16px; }
.story-source .icon { width: 16px; height: 16px; }
.pause-card { padding: 54px 40px; border-radius: 36px; background: #141d34; color: #fcf5e8; text-align: center; box-shadow: 0 15px 30px #141d3410; }
.pause-card > .icon { width: 44px; height: 44px; color: #ffd57b; margin: 0 auto 30px; }
.pause-card > p { font-size: 17px; }
.pause-card strong { display: block; margin-block: 20px; font-size: 100px; line-height: 1; letter-spacing: -.06em; color: #ffd57b; }
.pause-card strong span { font-size: 24px; letter-spacing: -.02em; }
.pause-card > p:last-child { padding-top: 24px; border-top: 1px solid #3b4154; font-size: 14px; color: #c7d1df; }
.routine-scene { position: relative; padding-bottom: 96px; }
.routine-scene > img { aspect-ratio: 1.3; object-fit: cover; width: 100%; border-radius: 36px; }
.routine-card { position: absolute; bottom: 0; left: 6%; right: 6%; padding: 24px; background: var(--paper); border: 1px solid var(--rule); border-radius: 24px; box-shadow: 0 14px 40px #51311c0c; transform: rotate(2deg); }
.routine-card > span { font-size: 16px; font-weight: 800; }
.routine-card strong { display: flex; align-items: center; gap: 14px; font-size: clamp(24px,3vw,38px); line-height: 1.4; color: var(--amber-deep); letter-spacing: -.04em; margin-block: 10px; }
.routine-card p { display: flex; align-items: center; gap: 12px; padding-top: 14px; border-top: 1px solid var(--rule); font-size: 13px; color: var(--pine); }
.routine-card p .icon { width: 18px; }
.app-steps { display: grid; gap: 6px; margin-top: 26px; }
.app-step { display: flex; gap: 18px; text-align: left; border: 1px solid transparent; border-radius: 20px; padding: 16px; background: transparent; color: var(--slate); cursor: pointer; }
.app-step > span:first-child { font-size: 13px; color: var(--amber-deep); padding-top: 3px; }
.app-step strong { font-size: 18px; color: var(--navy); line-height: 1.4; display: block; }
.app-step small { font-size: 14px; display: block; margin-top: 5px; line-height: 1.5; }
.app-step[aria-pressed="true"] { background: var(--paper); border-color: #e3d8c8; box-shadow: 0 6px 18px #51311c05; }
.app-step:hover { background: #fefcf880; }
.story-app { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 20px; position: relative; }
.story-app::before { content: ""; position: absolute; z-index: -1; inset: 15% -1% 7%; background: var(--mint); border-radius: 48% 48% 42% 42%; }
.story-phone { width: min(240px,65%); border: 7px solid #252b35; border-radius: 36px; overflow: hidden; box-shadow: 8px 24px 34px #132b261c; transform: rotate(3deg); }
.story-phone img { width: 100%; aspect-ratio: 1000/2173; object-fit: cover; }
.story-app figcaption { font-size: 13px; color: var(--slate); max-width: 300px; }
.invitation-stage .store-button { margin-top: 30px; font-size: 17px; white-space: normal; text-align: center; }
.trial-terms { margin-top: 14px !important; max-width: 480px; }
.story-resources { padding-top: 26px; margin-top: 30px; border-top: 1px solid #ded5c8; display: flex; gap: 12px 24px; flex-wrap: wrap; font-size: 14px; }
.story-resources p { flex-basis: 100%; color: var(--slate); }
.story-resources a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
.story-resources .icon { width: 17px; }
.story-success { text-align: center; }
.story-success img { width: min(100%,470px); margin-inline: auto; }
.story-success figcaption { color: var(--pine); font-size: 15px; }
.story-controls { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 24px 0 30px; border-top: 1px solid #ded5c8; }
.story-back { background: transparent; border: 0; color: var(--slate); display: flex; align-items: center; gap: 12px; min-height: 48px; cursor: pointer; padding: 0 4px; }
.story-back .icon { width: 18px; }
.story-next { padding: 13px 26px; font-size: 15px; cursor: pointer; }
.story-next .icon { width: 18px; }
.story-footer { padding-bottom: 24px; }
.story-footer .footer-bottom { padding-right: 0; font-size: 12px; gap: 20px; }
.story-footer .footer-bottom nav { gap: 20px; flex-wrap: wrap; }
.story-footer .languages { padding-top: 12px; margin-top: 12px; font-size: 11px; }
.story-stage.is-entering { animation: story-arrive .4s ease-out both; }
@keyframes story-arrive { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
/* Before enhancement the whole story remains readable, with a working Store link. */
.story-page:not(.story-ready) .story-stage { border-bottom: 1px solid var(--rule); }
.story-page:not(.story-ready) .answer-card { cursor: default; }
@media (min-width: 1000px) and (min-height: 900px) { .story-stage { min-height: calc(100svh - 350px); } }
/* Scale the whole composition on large displays while keeping copy readable.
   Cap chapter height so a tall viewport cannot strand navigation far below it. */
@media (min-width: 1600px) {
  .story-page { min-height: 100svh; display: flex; flex-direction: column; }
  .story-width { width: min(calc(100% - 160px),var(--story-desktop-width,1440px)); }
  .story-header,.story-footer { flex-shrink: 0; }
  .story-page > main { margin-block: auto; }
  .story-stage { min-height: clamp(650px,calc(100svh - 420px),1040px); gap: 88px; }
  .story-header .landing-brand { font-size: 38px; }
  .story-header .landing-brand img { width: 52px; height: 52px; }
  .story-header-note,.story-header .header-download { font-size: 16px; }
  .story-progress li { font-size: 13px; }
  .story-eyebrow { font-size: 13px; }
  .story-page :is(h1,h2) { font-size: 72px; }
  .story-lead { max-width: 620px; font-size: 22px; }
  .story-answers { max-width: 600px; gap: 12px; }
  .answer-card { min-height: 84px; padding: 16px 22px; }
  .answer-card strong { font-size: 18px; }
  .answer-card small { font-size: 14px; }
  .story-question { font-size: 21px; }
  .story-response { font-size: 19px; }
  .story-source { font-size: 15px; }
  .story-small { font-size: 13px; }
  .story-note strong { font-size: 20px; }
  .story-note span span { font-size: 14px; }
  .story-phone { width: 280px; }
  .app-step { padding: 18px; }
  .app-step strong { font-size: 20px; }
  .app-step small,.story-app figcaption { font-size: 15px; }
  .story-success img { width: min(100%,520px); }
  .story-success figcaption { font-size: 17px; }
  .invitation-stage .store-button { font-size: 18px; }
  .story-resources { font-size: 16px; }
  .story-back,.story-next { font-size: 16px; }
  .story-footer .footer-bottom { font-size: 13px; }
  .story-footer .languages { font-size: 12px; }
}
@media (min-width: 2200px) {
  .story-width { --story-desktop-width: 1600px; }
  .story-stage { gap: 104px; }
  .story-page :is(h1,h2) { font-size: 80px; }
  .story-lead { font-size: 23px; }
  .story-small { font-size: 14px; }
  .story-answers { max-width: 640px; }
  .story-phone { width: 320px; }
  .story-success img { width: min(100%,560px); }
  .pause-card { padding: 64px 48px; }
  .pause-card strong { font-size: 120px; }
}
@media (min-width: 3000px) { .story-width { --story-desktop-width: 1760px; } }
@media (max-width: 1000px) { .story-width { width: calc(100% - 64px); } .story-stage { gap: 32px; } .story-note { left: 3%; right: 3%; padding: 20px 18px; } .story-header-note { display: none; } }
@media (max-width: 700px) {
  .story-width { width: calc(100% - 40px); }
  .story-header { min-height: 88px; gap: 16px; }
  .story-header .landing-brand { font-size: 28px; gap: 10px; }
  .story-header .landing-brand img { width: 36px; height: 36px; }
  .story-header .header-download { font-size: 12px; min-height: 44px; padding: 10px 16px; white-space: normal; text-align: center; }
  .story-progress { padding-top: 8px; }
  .story-progress { scroll-margin-top: 88px; }
  .story-progress ol { gap: 6px; }
  .story-progress li { font-size: 0; padding-top: 0; border-width: 3px; }
  .story-stage { grid-template-columns: minmax(0,1fr); gap: 38px; min-height: 0; padding-block: 36px 32px; }
  .story-eyebrow { font-size: 10px; margin-bottom: 16px !important; }
  .story-page :is(h1,h2) { font-size: clamp(36px,10.2vw,58px); }
  .story-lead { font-size: 16px; line-height: 1.6; margin-top: 20px !important; }
  .story-answers { margin-top: 22px; gap: 9px; max-width: none; }
  .answer-card { padding: 13px 15px; gap: 12px; border-radius: 18px; min-height: 74px; }
  .answer-card strong { font-size: 15px; }
  .answer-card small { font-size: 12px; }
  .answer-icon { width: 40px; height: 40px; border-radius: 12px; }
  .story-small { font-size: 11px; }
  .story-art { width: min(100%,440px); justify-self: center; padding-bottom: 45px; }
  .story-art > img { aspect-ratio: 1.8; border-radius: 24px; }
  .story-note { padding: 16px; border-radius: 20px; left: 5%; right: 5%; gap: 12px; }
  .story-note strong { font-size: 15px; }
  .story-note span span { font-size: 11px; }
  .note-moon { width: 40px; height: 40px; border-radius: 12px; }
  .story-response { font-size: 15px; }
  .pause-card { padding: 28px; border-radius: 26px; }
  .pause-card > .icon { margin-bottom: 16px; width: 32px; height: 32px; }
  .pause-card strong { font-size: 76px; }
  .pause-card > p { font-size: 15px; }
  .routine-scene > img { aspect-ratio: 1.9; border-radius: 26px; }
  .routine-card { padding: 20px; }
  .routine-card strong { font-size: 32px; }
  .app-step { padding: 13px 12px; gap: 14px; }
  .app-step strong { font-size: 16px; }
  .app-step small { font-size: 12px; }
  .story-phone { width: 210px; }
  .story-success img { max-width: 260px; }
  .story-controls { padding-block: 18px 24px; flex-wrap: wrap; }
  .story-controls [data-stage-count] { order: 3; flex-basis: 100%; text-align: center; }
  .story-footer .footer-bottom { display: block; }
  .story-footer .footer-bottom > p { margin-bottom: 8px; }
  .story-footer .footer-bottom nav { gap: 8px 20px; }
}
@media (prefers-reduced-motion: reduce) { .story-page *, .story-page *::before { animation: none !important; transition: none !important; } }
