:root {
  --studio-black:#141615;
  --studio-cream:#f2f0e7;
  --studio-orange:#ff7348;
  --studio-silver:#b9c3bb;
}
body[data-view=overview] #main {width:100%;max-width:none;margin:0}
body[data-view=overview] .topbar {background:var(--studio-black);color:var(--studio-cream);border-color:#383a36}
body[data-view=overview] .top-inner nav a {color:#b8beb5}
body[data-view=overview] .top-inner nav a[aria-current=page],body[data-view=overview] .top-help {color:var(--studio-cream)}
body[data-view=overview] #nav-count {background:#393d36;color:#dedfd4}
body[data-view=overview] .top-help span {border-color:#a8b1a4}
body[data-view=overview] .top-help:hover {background:#2c302b}
.reading-progress {position:fixed;top:0;left:0;right:0;height:3px;background:var(--studio-orange);transform:scaleX(0);transform-origin:left;z-index:15;pointer-events:none}
.entry-shutter {display:none;position:fixed;z-index:14;inset:0;pointer-events:none;overflow:hidden}
.studio-enter:not(.motion-off) .entry-shutter {display:flex;animation:end-shutter .82s both}
.entry-shutter span {height:100%;flex:1;background:#202422;transform-origin:top;animation:shutter .68s cubic-bezier(.72,0,.24,1) both}
.entry-shutter span:nth-child(2){background:#343a35;animation-delay:.045s}
.entry-shutter span:nth-child(3){background:#ad5238;animation-delay:.09s}
@keyframes shutter{from{transform:scaleY(1)}to{transform:scaleY(0)}}
@keyframes end-shutter{99%{visibility:visible}100%{visibility:hidden}}
.opening {position:relative;isolation:isolate;overflow:hidden;color:var(--studio-cream);background:var(--studio-black)}
.opening-inner {min-height:clamp(460px,39.8vw,685px);display:flex;align-items:center;position:relative}
.opening-copy {position:relative;z-index:2;width:58%;padding:clamp(42px,5.5vw,95px) 0 38px}
.section-label {display:inline-flex;align-items:center;gap:10px;font:600 12px/1.5 var(--mono);letter-spacing:.09em;text-transform:uppercase}
.section-label i {width:12px;height:7px;background:currentColor;display:inline-block;transform:skewX(-18deg);box-shadow:5px -4px 0 -1px currentColor;margin-right:3px}
.opening .section-label {color:#ff936f}
.opening h1 {font-size:clamp(68px,7.4vw,122px);letter-spacing:-.077em;line-height:.99;margin:25px 0 20px;font-weight:520}
.title-mask {display:block;overflow:hidden;padding:0 .1em .05em 0}
.title-mask+.title-mask {margin-top:-.07em}
.title-mask>span,.title-mask>em {display:block}
.opening h1 em,.chapter h2 em,.risk-heading h2 em,.field-guide h2 em,.closing h2 em {font:italic 1.09em/.98 "Instrument Serif",Georgia,serif;letter-spacing:-.043em}
.opening h1 em {color:#ff8b62}
.opening-copy p {max-width:430px;font-size:clamp(16px,1.25vw,19px);line-height:1.55;color:#c7cdc3}
.opening-actions {display:flex;align-items:center;gap:24px;margin-top:27px}
.opening-actions .btn,.closing-btn {min-height:48px;padding-inline:22px}
.quiet-link {font-weight:620;font-size:15px;color:#eceee6;text-decoration:underline;text-underline-offset:6px;text-decoration-color:#888e83}
.quiet-link:hover {text-decoration-color:var(--studio-orange)}
.opening-art {position:absolute;z-index:-1;inset:0 0 0 36%;pointer-events:none;overflow:hidden}
.opening-art canvas,.opening-art picture,.opening-art img {display:block;width:100%;height:100%}
.opening-art canvas {position:absolute;inset:0;opacity:0;z-index:1}
.opening-art .ribbon-mesh {z-index:2}
.opening-art .ribbon-frames {object-fit:cover}
.opening-art canvas[data-ready=true] {opacity:1}
.opening-art canvas[data-ready=true] ~ picture {visibility:hidden}
.opening-art .ribbon-mesh[data-ready=true] + .ribbon-frames {visibility:hidden}
.opening-art img {object-fit:cover;object-position:56% 48%}
.opening-art {mask-image:linear-gradient(90deg,transparent,#000 25%,#000 99%);-webkit-mask-image:linear-gradient(90deg,transparent,#000 25%,#000 99%)}
.opening-art:after {content:"";position:absolute;z-index:3;inset:0;background:linear-gradient(0deg,var(--studio-black),transparent 17%,transparent 89%,#14161555)}
.studio-enter:not(.motion-off) .title-mask>* {animation:title-rise .78s cubic-bezier(.2,.82,.2,1) .19s backwards}
.studio-enter:not(.motion-off) .title-mask:nth-child(2)>* {animation-delay:.31s}
@keyframes title-rise {from{transform:translateY(91%);opacity:.1}to{transform:translateY(0);opacity:1}}
.hero-foot {position:relative;z-index:1;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0 15px;border-top:1px solid #555a504f;color:#aeb7ad;font:12px var(--mono)}
.hero-foot>span {display:inline-flex;gap:8px;align-items:center}
.scroll-mark {display:grid;justify-items:center;width:10px;height:15px;border:1px solid currentColor;border-radius:6px;color:#ff996f}
.scroll-mark:before {content:"";margin-top:3px;width:2px;height:4px;border-radius:2px;background:currentColor}
.motion-off .scroll-mark {width:6px;height:6px;background:#94c7a6;border:0}
.motion-off .scroll-mark:before {display:none}
.data-tape {background:#232824;color:#edf0e6;display:flex;align-items:stretch;min-height:52px;border-block:1px solid #3a423b;overflow:hidden}
.tape-title {flex:none;display:grid;place-items:center;padding:0 clamp(16px,3vw,46px);background:#30362f;font:600 12px var(--mono);text-transform:uppercase;letter-spacing:.08em}
.tape-window {overflow:hidden;flex:1;position:relative;display:flex;align-items:center;mask-image:linear-gradient(90deg,transparent,#000 15px,#000 calc(100% - 15px),transparent)}
.tape-track,.tape-set,.tape-item {display:flex;align-items:center;flex:none}
.tape-track {width:max-content;animation:tape-run 37s linear infinite}
.tape-item {gap:12px;padding:0 clamp(16px,2.1vw,32px);border-right:1px solid #56605480;font:14px/1.4 var(--mono)}
.tape-item b {font-weight:500}.tape-item em {font-style:normal;color:#b1d9b8}.tape-item em.negative {color:#ffad90}
.data-tape:hover .tape-track {animation-play-state:paused}
@keyframes tape-run {to{transform:translateX(-33.333333%)}}
.chapter,.field-guide {background:var(--studio-cream);color:#20251f}
.chapter,.field-guide,.risk-chapter {padding:clamp(64px,7.5vw,122px) 0}
.chapter:focus,.risk-chapter:focus {outline:none}
.chapter .section-label,.field-guide .section-label {color:#5c6558}
.replay-layout,.guide-layout {display:grid;grid-template-columns:minmax(0,.74fr) minmax(0,1.26fr);gap:clamp(35px,6vw,104px);align-items:center}
.chapter-copy h2,.directory-head h2,.risk-heading h2,.field-guide h2,.closing h2 {font-size:clamp(46px,5.6vw,89px);letter-spacing:-.075em;line-height:1.02;font-weight:515;margin:17px 0}
.chapter-copy p,.directory-head>p,.risk-heading p {font-size:clamp(16px,1.2vw,19px);color:#596255;max-width:410px;line-height:1.58}
.balance-note {margin-top:30px;padding-top:14px;border-top:1px solid #b9bcae;display:flex;align-items:center;justify-content:space-between;gap:15px;max-width:360px}
.balance-note span {font:12px var(--mono);color:#586153}.balance-note strong {font-size:27px;line-height:1;letter-spacing:-.05em;font-weight:560}
.replay-instrument {background:#1e2724;border-radius:16px;box-shadow:0 6px 0 #d9dbcd,0 20px 44px #2c3a2410;min-width:0}
.replay-instrument .chart-card {border-radius:inherit;box-shadow:none}
.replay-instrument .plot-wrap {height:clamp(155px,15.5vw,245px)}
.risk-chapter {color:#f3f1e8;background:radial-gradient(ellipse at 10% 0%,#343d35,transparent 58%),#1a201c}
.risk-chapter .section-label{color:#bdc9bb}.risk-heading {margin-bottom:40px}
.risk-heading h2 em {color:#bbd3bf}.risk-heading p {color:#bdc9bd;max-width:560px}
.risk-layout {display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,.75fr);gap:clamp(40px,7vw,125px);align-items:start}
.risk-panel {position:sticky;top:clamp(24px,15vh,155px);background:#242d26;border:1px solid #576052;border-radius:15px;padding:clamp(16px,2.2vw,34px);box-shadow:0 6px 0 #10181142}
.risk-panel-top {display:flex;align-items:center;flex-wrap:wrap;justify-content:space-between;gap:10px;padding-bottom:16px;border-bottom:1px solid #4b5549}
.risk-panel-top .section-label {font-size:11px}
.risk-choices,.phase-controls {display:flex;gap:6px;flex-wrap:wrap}
.risk-choices button,.phase-controls button {border:1px solid #586352;border-radius:20px;padding:5px 10px;font-size:13px;color:#c5cec2}
.risk-choices button[aria-pressed=true] {background:#d1deca;color:#253022;border-color:#d1deca}
.phase-controls {padding-top:10px;gap:8px}.phase-controls button {border-radius:5px;font:12px var(--mono);min-width:62px;padding:7px}
.phase-controls button[aria-pressed=true] {color:#ffb18c;border-color:#b97150;background:#342d23}
.risk-readout {display:flex;justify-content:space-between;align-items:baseline;gap:10px;padding:18px 0}
.risk-value {font-size:clamp(37px,4vw,65px);font-weight:510;line-height:1;letter-spacing:-.065em;font-variant-numeric:tabular-nums}
.risk-when {font:12px/1.4 var(--mono);color:#b7c6b5;text-align:right}
.risk-plot {display:block;width:100%;overflow:visible;background:linear-gradient(0deg,#253028,transparent);border-radius:4px}
.risk-steps article {padding:26px 0 28px;min-height:clamp(168px,23vh,245px);border-bottom:1px solid #525d4c;position:relative}
.risk-steps article:first-child {padding-top:5px}.risk-steps article:last-child {border:0}
.risk-steps h3 {font-size:clamp(26px,2.7vw,43px);letter-spacing:-.06em;font-weight:510}
.risk-steps p {color:#bdc7ba;margin:10px 0;max-width:440px}.risk-steps strong {font:13px/1.5 var(--mono);color:#f4b18f}
.step-rule {display:block;width:20px;height:3px;background:#6a7667;margin-bottom:13px;transition:width .4s ease,background .4s}
.risk-steps .active .step-rule {width:56px;background:#ff8b64}
.directory-head {display:flex;align-items:flex-end;justify-content:space-between;gap:28px;margin-bottom:32px}.directory-head h2 {margin-bottom:0}
.lab-directory .wallet-card {background:#f8f7ef;border-color:#c9cbbb;border-radius:13px;transition:transform .3s,box-shadow .3s}
.lab-directory .wallet-card:hover {transform:translateY(-5px);box-shadow:0 8px 20px #424e3520}
.lab-directory .spark {height:58px}.lab-directory .wallet-card h3 {margin-top:18px}
.field-guide {padding-top:0}.guide-layout {border-top:1px solid #c6c9ba;padding-top:clamp(42px,5.5vw,88px);align-items:start}
.field-guide h2 {margin-bottom:0}.qa-list details {border-bottom:1px solid #c2c6b7}
.qa-list summary {list-style:none;display:flex;justify-content:space-between;gap:15px;align-items:center;padding:19px 0;font-size:clamp(17px,1.45vw,23px);font-weight:550;letter-spacing:-.03em;cursor:pointer;min-height:60px}
.qa-list summary::-webkit-details-marker{display:none}.qa-list summary span {width:14px;height:14px;flex:none;position:relative}
.qa-list summary span:before,.qa-list summary span:after {content:"";background:#5d685a;position:absolute;top:6px;left:0;width:14px;height:2px}
.qa-list summary span:after{transform:rotate(90deg);transition:transform .25s}
.qa-list details[open] summary span:after {transform:rotate(0)}
.qa-list details[open] p {animation:answer-in .22s ease-out}
.qa-list p {margin:0 28px 19px 0;color:#545e51;max-width:620px}
@keyframes answer-in {from{opacity:.25;transform:translateY(-4px)}}
.closing {background:#ee744c;overflow:hidden;position:relative;isolation:isolate}
.closing-inner {display:flex;justify-content:space-between;gap:30px;align-items:center;padding:clamp(46px,5.9vw,94px) 0}
.closing .section-label {color:#422c20}.closing h2 {margin-bottom:0;color:#201e18}.closing-btn {background:#1c241d;color:#f3f1e7;white-space:nowrap}.closing-btn:hover{background:#354035}
.closing-stripes {position:absolute;z-index:-1;right:8%;top:-135%;height:400%;width:18%;transform:rotate(27deg);background:repeating-linear-gradient(90deg,transparent 0 6px,#a54c2b26 6px 8px)}
body[data-view=overview] footer {background:#171d18;color:#dbe3d9;border-color:#384033}
body[data-view=overview] .foot,body[data-view=overview] .foot .brand {color:#dee3d8}
body[data-view=overview] footer .text-btn:hover{background:#30392f}
.reveal.waiting:not(.seen) {opacity:0;transform:translateY(24px)}
.reveal.waiting {transition:opacity .6s ease-out,transform .7s cubic-bezier(.2,.75,.2,1)}
:root.motion-off {scroll-behavior:auto}
.motion-off .reveal,.motion-off .opening-art {transform:none!important;opacity:1!important}
.motion-off .tape-track {animation-play-state:paused}
.motion-off .entry-shutter{display:none}
.motion-off .waiting,.motion-off .step-rule,.motion-off .wallet-card,.motion-off .opening-art,.motion-off .qa-list * {transition:none!important;animation:none!important}
@media(max-width:1000px) {
  .opening h1 {font-size:clamp(65px,8vw,82px)}.opening-art{inset:0 -5% 0 31%}.replay-layout,.guide-layout{gap:30px}
  .risk-layout{gap:35px}
}
@media(max-width:819px) {
  .risk-layout{grid-template-columns:1fr}.risk-panel{position:static}.risk-steps {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.risk-steps article,.risk-steps article:first-child{padding:0;min-height:0;border:0}.risk-steps p{font-size:15px}
  .replay-layout {grid-template-columns:1fr}.chapter-copy{max-width:600px}.chapter-copy p{max-width:540px}.balance-note{display:none}
  .replay-instrument .plot-wrap{height:210px}.directory-head{align-items:start;flex-direction:column;gap:12px}.directory-head>p{max-width:550px}
}
@media(max-width:650px) {
  .opening-inner{min-height:0;display:block;padding-top:26px;padding-bottom:clamp(210px,55vw,320px)}
  .opening-copy{width:100%;padding:0}.opening .section-label{font-size:11px}
  .opening h1 {font-size:clamp(52px,12.6vw,80px);margin:17px 0 12px}
  .opening-copy p{max-width:460px;font-size:16px}.opening-actions{margin-top:17px;gap:19px}
  .opening-actions .btn {min-height:44px;padding:10px 16px}
  .opening-art{inset:auto -3% -2% -3%;height:clamp(270px,66vw,410px);mask-image:linear-gradient(0deg,#000 70%,transparent 99%);-webkit-mask-image:linear-gradient(0deg,#000 70%,transparent 99%)}
  .opening-art img{object-position:center 50%}
  .hero-foot{padding:9px 0;line-height:1.3}.tape-title,.tape-item{font-size:11px}.data-tape{min-height:41px}
  .chapter,.risk-chapter{padding:55px 0}.chapter-copy h2,.risk-heading h2,.directory-head h2,.field-guide h2,.closing h2{font-size:clamp(45px,10.4vw,63px)}
  .risk-heading{margin-bottom:26px}.risk-layout{gap:24px}.risk-steps{display:block}.risk-steps article,.risk-steps article:first-child{padding:15px 0;border-bottom:1px solid #424f40}.risk-steps h3{font-size:26px}.step-rule{margin-bottom:8px}
  .risk-steps p{margin:7px 0}.risk-panel-top{padding-bottom:11px}.risk-panel-top .section-label{width:100%}
  .risk-readout{align-items:center}.risk-when{font-size:11px}
  .guide-layout{grid-template-columns:1fr;gap:13px}.field-guide{padding-bottom:48px}
  .closing-inner{align-items:flex-start;flex-direction:column;gap:22px}.closing-stripes{right:-8%;width:36%}
  .replay-instrument .plot-wrap{height:160px}
  .lab-directory .spark{height:40px}
}
@media(prefers-reduced-motion:reduce) {
  .entry-shutter{display:none!important}.opening-art,.tape-track,.title-mask>*,.reveal,.qa-list *{animation:none!important;transition:none!important;transform:none!important;opacity:1!important}
}
.closing-stripes {transform:translateX(var(--stripe-shift,0px)) rotate(27deg)}
.motion-off .closing-stripes {transform:rotate(27deg)}
@media(max-width:819px){
  .risk-layout{display:block}
  .risk-panel{position:sticky;top:8px;z-index:1;background:#242d26}
  .risk-steps{display:block;margin:18px 0 0}
  .risk-steps article,.risk-steps article:first-child{min-height:clamp(160px,28vh,260px);padding:24px 0;border-bottom:1px solid #424f40}
  .risk-steps article:last-child{border:0}
}
@media(max-height:540px),(prefers-reduced-motion:reduce){.risk-panel{position:static}}
@media(min-width:1001px){
  .opening-art{left:39%;mask-image:linear-gradient(90deg,transparent,#000 32%);-webkit-mask-image:linear-gradient(90deg,transparent,#000 32%)}
}
