.line-window { display: block; overflow: hidden; padding-bottom: .12em; margin-bottom: -.12em; }
.line-rise { display: inline-block; }
.portrait-window { overflow: hidden; border-radius: 3px; }
.motion-enabled .portrait-window img { transform: translate3d(0, var(--parallax-y, 0px), 0) scale(1.08); }
.motion-enabled .preview-content { transform: translate3d(0, var(--parallax-y, 0px), 0); }

.story-runway { position: relative; border-top: 1px solid var(--section-rule); }
.story-pinned { display: grid; grid-template-columns: 1fr 1fr; gap: 9%; align-items: start; padding-top: 60px; }
.story-anchor { position: absolute; left: 0; width: 1px; height: 1px; scroll-margin-top: 12svh; }
#find-step { top: 0; } #fix-step { top: 35%; } #review-step { top: 70%; }
.story-steps { list-style: none; padding: 0 0 0 24px; margin: 38px 0 0; position: relative; }
.story-steps::before, .story-steps::after { content: ""; position: absolute; left: 0; top: 8px; bottom: 15px; width: 1px; background: var(--section-rule); }
.story-steps::after { background: var(--section-accent); transform: scaleY(var(--story-progress, 0)); transform-origin: top; }
.story-steps li { position: relative; margin-bottom: 24px; }
.story-steps li:last-child { margin-bottom: 0; }
.story-steps li::before { content: ""; position: absolute; left: -27px; top: 8px; width: 5px; height: 5px; border-radius: 50%; background: var(--page-surface); border: 1px solid var(--section-rule); z-index: 1; }
.story-steps li.is-active::before { background: var(--section-accent); border-color: var(--section-accent); }
.story-steps a { display: block; text-decoration: none; color: var(--section-ink); border-radius: 2px; }
.story-steps a:focus-visible { outline: 2px solid var(--section-accent); outline-offset: 7px; }
.story-steps a > span { font-family: Roobert, system-ui, sans-serif; font-size: 23px; letter-spacing: -.03em; }
.story-steps li.is-active a > span { color: var(--section-accent); }
.story-steps p { color: var(--section-muted); font-size: 13px; line-height: 1.7; margin: 6px 0 0; max-width: 40ch; }
.story-stage { margin: 0; min-width: 0; }
.story-visual { display: grid; gap: 20px; }
.story-stage figcaption { margin-top: 15px; color: var(--section-muted); font-size: 10px; line-height: 1.5; }
.story-panel { box-sizing: border-box; min-height: 355px; padding: 24px; background: #203758; border: 1px solid var(--section-rule); border-radius: 6px; color: var(--section-ink); }
html[data-theme="day"] .story-panel { background: #f7fafe; }
.diagram-top { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding-bottom: 18px; border-bottom: 1px solid var(--section-rule); }
.diagram-top > span:first-child { font-family: Roobert, system-ui, sans-serif; font-size: 18px; }
.diagram-top > span:last-child { color: var(--section-muted); font-size: 10px; text-align: right; }
.site-map { margin: 27px auto 24px; max-width: 290px; text-align: center; font-size: 11px; }
.map-root { display: inline-block; border: 1px solid var(--section-rule); padding: 10px 22px; border-radius: 3px; }
.map-stem { display: block; margin: auto; height: 20px; width: 1px; background: var(--section-rule); }
.map-branches { position: relative; display: flex; gap: 14px; padding-top: 17px; }
.map-branches::before { content: ""; position: absolute; top: 0; left: 16%; right: 16%; border-top: 1px solid var(--section-rule); }
.map-branches > span { position: relative; flex: 1; border: 1px solid var(--section-rule); padding: 10px 5px; border-radius: 3px; }
.map-branches > span::before { content: ""; position: absolute; width: 1px; height: 17px; background: var(--section-rule); left: 50%; top: -18px; }
.map-branches .map-question { color: var(--section-accent); border-style: dashed; border-color: var(--section-accent); }
.scan-list { display: grid; gap: 10px; padding-top: 14px; border-top: 1px solid var(--section-rule); }
.scan-list > span { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: var(--section-muted); }
.scan-list i { width: 5px; height: 5px; border-radius: 50%; background: var(--section-muted); }
.scan-list .scan-attention { color: var(--section-accent); }
.scan-attention i { background: var(--section-accent); }
.document-study { padding: 22px 16px 0; }
.document-label { font-size: 9px; color: var(--section-muted); }
.doc-title { font-family: Roobert, system-ui, sans-serif; font-size: clamp(24px, 2.3vw, 33px); letter-spacing: -.04em; margin: 10px 0 17px; }
.doc-line { width: 84%; height: 4px; border-radius: 3px; background: var(--section-rule); margin: 7px 0; }
.doc-line.short { width: 57%; }
.doc-section { display: flex; gap: 13px; margin-top: 20px; font-size: 11px; }
.doc-section > span { color: var(--section-accent); font-size: 9px; }
.doc-section > div { flex: 1; }
.doc-section i { display: block; height: 4px; width: 75%; background: var(--section-rule); margin-top: 9px; }
.doc-added { display: block; padding-top: 20px; font-size: 10px; color: var(--section-accent); }
.review-loop { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 28px 0; font-size: 10px; }
.review-loop > span { padding: 8px; border: 1px solid var(--section-rule); border-radius: 3px; }
.review-loop i { color: var(--section-accent); font-style: normal; }
.review-sheets { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.review-sheets > div { padding: 15px; border: 1px solid var(--section-rule); border-radius: 3px; }
.review-sheets small { display: block; font-size: 10px; margin-bottom: 17px; color: var(--section-muted); }
.review-sheets i { display: block; width: 85%; height: 4px; margin-top: 9px; background: var(--section-rule); }
.review-sheets i:last-child { width: 55%; }
.review-question { font-size: 14px; line-height: 1.7; margin: 25px 0 0; }
.review-question > span { color: var(--section-muted); font-size: 12px; }

/* Enhanced only when there is room to pin the complete composition. */
.story-enhanced .story-runway { height: calc(75svh + 420px); min-height: 0; }
.story-enhanced .story-pinned { position: sticky; top: clamp(24px, 8svh, 90px); align-items: center; min-height: 75svh; box-sizing: border-box; padding: 24px 0; }
.story-enhanced .story-visual { display: block; position: relative; height: 390px; overflow: hidden; }
.story-enhanced .story-panel { position: absolute; inset: 0; min-height: 0; opacity: 0; transform: translateY(24px) scale(.98); transition: opacity .45s ease, transform .65s cubic-bezier(.2,.65,.3,1); pointer-events: none; }
.story-enhanced .story-panel.is-active { opacity: 1; transform: translateY(0) scale(1); }
.story-enhanced .scan-list > span { transform: translateX(8px); opacity: 0; transition: transform .5s ease, opacity .5s ease; }
.story-enhanced .is-active .scan-list > span { transform: none; opacity: 1; }
.story-enhanced .is-active .scan-list > span:nth-child(2) { transition-delay: .08s; }
.story-enhanced .is-active .scan-list > span:nth-child(3) { transition-delay: .16s; }
@media (max-width: 899px), (max-height: 649px) {
  .story-pinned { gap: 6%; }
  .story-visual { gap: 16px; }
  .story-panel { padding: 20px; min-height: 340px; }
}
@media (max-width: 650px) {
  .story-pinned { grid-template-columns: 1fr; gap: 32px; padding-top: 36px; }
  .story-steps { margin-top: 28px; }
  .story-steps p { max-width: 46ch; }
  .story-panel { min-height: 320px; }
  .story-visual { gap: 20px; }
  .doc-title { font-size: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .motion-enabled [data-parallax] { transform: none; }
  .story-panel, .scan-list > span { transition: none !important; }
}
@media print {
  .story-enhanced .story-runway { height: auto; min-height: 0; }
  .story-enhanced .story-pinned { position: static; }
  .story-enhanced .story-visual { height: auto; display: grid; overflow: visible; }
  .story-enhanced .story-panel { position: static; opacity: 1; transform: none; }
  .story-enhanced .scan-list > span { opacity: 1; transform: none; }
}
