/* Native scroll narrative. Static, fully readable stages are the base presentation. */
.scroll-story { padding-block: 76px; border-block: 1px solid var(--line-soft); }
.story-layout { display: grid; grid-template-columns: .82fr 1.18fr; align-items: center; gap: 64px; }
.story-narrative { min-width: 0; }
.story-kicker { margin-bottom: 20px; color: var(--body); font-size: 11px; font-weight: 550; letter-spacing: .09em; text-transform: uppercase; }
.story-narrative h2 { font-size: clamp(32px, 3.4vw, 48px); line-height: 1.1; font-weight: 520; letter-spacing: -.055em; }
.story-description { max-width: 330px; margin-top: 20px; color: var(--body); font-size: 14px; line-height: 1.7; }
.story-steps { display: grid; gap: 21px; margin: 32px 0 0; padding: 0; list-style: none; }
.story-steps li { display: flex; align-items: flex-start; gap: 15px; color: var(--muted); font-size: 14px; font-weight: 550; }
.story-step-number { padding-top: 3px; font: 11px/1.5 var(--mono); color: var(--muted); }
.story-step-detail { display: block; margin-top: 3px; color: var(--body); font-size: 11px; line-height: 1.5; font-weight: 400; }
.story-steps li[aria-current='step'], .story-steps li[aria-current='step'] .story-step-number { color: var(--text); }
.story-track { height: 2px; width: 100%; max-width: 330px; margin-top: 28px; overflow: hidden; background: var(--line); }
.story-track span { display: block; width: 100%; height: 100%; transform-origin: left center; background: #315be8; }
.story-scroll-cue { display: none; margin-top: 14px; color: var(--body); font-size: 11px; }
.story-scroll-cue span { margin-left: 8px; }
.story-canvas { min-width: 0; color: #f4f5f7; background: #0b0d10; border: 1px solid #343a44; border-radius: 10px; overflow: hidden; }
.story-canvas-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 17px 22px; border-bottom: 1px solid #292e36; font-size: 12px; }
.story-canvas-top > span:first-child { font-weight: 550; letter-spacing: -.025em; }
.story-canvas-top > span:last-child { color: #a8aeb9; font-size: 11px; }
.story-stage-area { display: grid; gap: 30px; padding: 27px 24px; }
.story-stage { min-width: 0; }
.story-stage + .story-stage { padding-top: 26px; border-top: 1px solid #343a44; }
.story-stage-label { color: #a8aeb9; font: 11px/1.5 var(--mono); }
.story-stage h3 { margin-top: 11px; font-size: 24px; line-height: 1.2; letter-spacing: -.045em; font-weight: 500; }
.story-document, .story-output, .story-calculation { margin-top: 23px; padding: 18px; border: 1px solid #343a44; border-radius: 7px; }
.story-document-header { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 9px; align-items: center; }
.story-document-header strong { font-size: 12px; font-weight: 500; }
.story-document-header > span { color: #a8aeb9; font: 10px/1.5 var(--mono); }
.story-customer { margin-top: 6px; color: #a8aeb9; font-size: 11px; }
.story-values { margin-top: 18px; }
.story-values > div { display: flex; justify-content: space-between; gap: 14px; padding-block: 10px; border-top: 1px solid #292e36; font-size: 12px; }
.story-values dt { min-width: 0; color: #a8aeb9; }
.story-values dd { text-align: right; font: 12px/1.5 var(--mono); font-variant-numeric: tabular-nums; }
.story-stage-note { margin-top: 17px; color: #a8aeb9; font-size: 11px; line-height: 1.6; }
.story-calculation > div { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.story-calculation span { color: #a8aeb9; font-size: 11px; }
.story-calculation strong { color: #f4f5f7; font-size: 21px; font-weight: 500; line-height: 1.15; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.story-calculation-rate { margin-block: 12px; padding-block: 9px; border-block: 1px solid #292e36; font: 18px/1.4 var(--mono); color: #c4c9d1; }
.story-calculation-rate span { display: block; margin-top: 5px; font: 11px/1.5 var(--sans); }
.story-calculation-result strong { font-size: 32px; }
.story-output-title { display: flex; align-items: center; gap: 9px; font-size: 12px; color: #c4c9d1; }
.story-grid-icon { color: #c4c9d1; font-size: 19px; }
.story-output-result { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 15px; padding-top: 16px; border-top: 1px solid #343a44; }
.story-output-result > span { color: #a8aeb9; font-size: 11px; line-height: 1.6; }
.story-output-result > strong { font-size: 30px; font-weight: 500; letter-spacing: -.04em; }
.story-disclosure { padding: 12px 22px; border-top: 1px solid #292e36; color: #a8aeb9; font-size: 11px; line-height: 1.6; }
/* Only a successfully initialised, usable viewport receives the pinned treatment. */
.scroll-story[data-story-enhanced='true'] { min-height: calc(100svh + 900px); padding-block: 0; }
[data-story-enhanced='true'] [data-story-sticky] { position: sticky; top: 80px; height: calc(100svh - 80px); padding-block: 32px; }
[data-story-enhanced='true'] .story-stage-area { display: block; position: relative; min-height: 360px; height: clamp(360px, 42svh, 420px); padding: 0; overflow: hidden; }
[data-story-enhanced='true'] .story-stage { position: absolute; inset: 23px 24px; padding: 0; border: 0; }
[data-story-enhanced='true'] .story-stage[aria-hidden='true'] { pointer-events: none; }
[data-story-enhanced='true'] .story-scroll-cue { display: block; }
.story-reference { margin-top: 16px; }
.story-reference > summary { padding-block: 18px; color: var(--body); cursor: pointer; font-size: 13px; }
.workflow .scroll-story { border: 0; padding-top: 0; }
.workflow .story-layout { width: 100%; max-width: none; gap: 50px; }
@media (max-width: 1024px) {
  .story-layout { gap: 35px; }
  .workflow .story-layout { gap: 35px; }
  .story-description { font-size: 13px; }
  .story-stage h3 { font-size: 22px; }
  .story-document, .story-output, .story-calculation { padding: 14px; }
}
@media (max-width: 767px) {
  .scroll-story { padding-block: 54px; }
  .story-layout, .workflow .story-layout { grid-template-columns: 1fr; gap: 27px; }
  .story-kicker { margin-bottom: 12px; font-size: 10px; }
  .story-narrative h2 { font-size: 31px; }
  .story-description { max-width: none; margin-top: 16px; }
  .story-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; margin-top: 22px; }
  .story-steps li { flex-direction: column; gap: 5px; font-size: 12px; }
  .story-step-number { font-size: 10px; }
  .story-step-detail { display: none; }
  .story-track { max-width: none; margin-top: 16px; }
  .story-scroll-cue { font-size: 10px; margin-top: 9px; }
  .story-canvas-top { padding: 13px 15px; font-size: 11px; }
  .story-stage-area { padding: 23px 15px; }
  .story-stage h3 { font-size: 22px; }
  .story-values > div, .story-values dd { font-size: 11px; }
  .story-disclosure { padding-inline: 15px; }
  [data-story-enhanced='true'] [data-story-sticky] { padding-block: 19px; gap: 19px; align-content: center; }
  [data-story-enhanced='true'] .story-description { display: none; }
  [data-story-enhanced='true'] .story-stage-area { height: 360px; min-height: 360px; }
  [data-story-enhanced='true'] .story-stage { inset: 18px 15px; }
  [data-story-enhanced='true'] .story-document, [data-story-enhanced='true'] .story-output, [data-story-enhanced='true'] .story-calculation { margin-top: 18px; padding: 12px; }
  [data-story-enhanced='true'] .story-scroll-cue { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  /* The JS mirrors this preference and cancels effects; CSS independently releases pinning. */
  .scroll-story[data-story-enhanced='true'] { min-height: 0; padding-block: 54px; }
  [data-story-enhanced='true'] [data-story-sticky] { position: static; height: auto; }
  [data-story-enhanced='true'] .story-stage-area { position: static; display: grid; height: auto; overflow: visible; padding: 23px 15px; }
  [data-story-enhanced='true'] .story-stage { position: static; }
  [data-story-enhanced='true'] .story-scroll-cue { display: none; }
}

.story-output-meta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; color: #a8aeb9; font: 11px/1.5 var(--mono); }

@media (max-width: 640px) { [data-story-enhanced='true'] [data-story-sticky] { top: 72px; height: calc(100svh - 72px); } }
