:root{color-scheme:dark;--bg:#081722;--panel:#0a1c28;--surface:#112633;--surface2:#172e3b;--line:rgba(180,218,227,.14);--muted:#9bb4c2;--ink:#edf5f4;--accent:#91e6d0;--ember:#e3a675;font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:14px;font-synthesis:none}*{box-sizing:border-box}html,body{padding:0;margin:0;min-height:100%;background:var(--bg);color:var(--ink)}button,input,select{font:inherit}button{cursor:pointer;color:inherit;background:transparent;border:0}button:focus-visible,input:focus-visible,select:focus-visible,canvas:focus-visible{outline:2px solid var(--accent);outline-offset:3px}button:disabled{cursor:not-allowed;opacity:.28}p{line-height:1.65}b,strong{font-weight:700}.app{height:100vh;height:100dvh;display:flex;flex-direction:column;overflow:hidden}.topbar{flex:0 0 72px;display:flex;align-items:center;justify-content:space-between;padding:0 28px;border-bottom:1px solid var(--line);background:#081823;z-index:6;gap:16px}.brand{display:flex;gap:12px;align-items:center;text-decoration:none;color:var(--ink);letter-spacing:.20em;font-size:11px;font-weight:800;white-space:nowrap}.brand b{font-weight:400;color:var(--accent)}.brand small{display:block;letter-spacing:.17em;font-size:8px;color:#87a1ad;margin-top:5px}.brand-mark{width:35px;height:35px;display:grid;place-items:center;border:1px solid var(--accent);border-radius:9px;color:var(--accent);font-size:23px}.edition{font-size:10px;letter-spacing:.18em;font-weight:700;color:#9bb9c5}.edition span{padding:0 12px;color:#37515c}.header-actions{display:flex;align-items:center;gap:16px}.badge{font-size:9px;letter-spacing:.14em;font-weight:700;color:var(--accent);padding:8px 10px;border:1px solid #315751;border-radius:100px;white-space:nowrap}.header-actions button{font-size:11px;font-weight:700;white-space:nowrap;border-left:1px solid var(--line);padding-left:16px}.header-actions button span{color:var(--accent);margin-left:5px}.work{min-height:0;display:grid;grid-template-columns:minmax(0,1fr) 340px;flex:1}.stage-shell{min-width:0;display:flex;flex-direction:column;position:relative;background:#081824}.stage-head{position:absolute;z-index:3;top:25px;left:30px;pointer-events:none;max-width:360px}.eyebrow{margin:0;color:var(--accent);font-size:9px;letter-spacing:.18em;font-weight:800}.dot{display:inline-block;width:5px;height:5px;background:var(--accent);vertical-align:2px;border-radius:50%;margin-right:9px;box-shadow:0 0 11px #9ee8d2}.stage-head h1{font-family:Georgia,"Times New Roman",serif;margin:12px 0 11px;font-size:clamp(39px,4.25vw,67px);letter-spacing:-.045em;line-height:.94;font-weight:400;color:#f6faf7;text-shadow:0 2px 12px #03172370}.stage-head h1 em{color:var(--accent);font-style:italic}.stage-deck{color:#b7cbd1;line-height:1.5;font-size:12px;max-width:290px;margin:0}.viewport{flex:1;min-height:0;position:relative;isolation:isolate;overflow:hidden;background:radial-gradient(ellipse at 57% 47%,#183a43,#081924 78%)}canvas#scene{display:block;width:100%;height:100%;touch-action:none;outline-offset:-5px}canvas#annotations{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.camera-dock{position:absolute;left:28px;top:50%;transform:translateY(-22%);display:flex;flex-direction:column;gap:2px;z-index:3;background:#081a25bb;border:1px solid #26424b;border-radius:12px;padding:5px;backdrop-filter:blur(12px)}.camera-dock button{font-weight:750;font-size:9px;letter-spacing:.06em;min-width:52px;padding:10px 7px;border-radius:8px;color:#aec9cf;transition:background .25s,color .25s}.camera-dock button:hover{background:#1f4049;color:var(--accent)}.scene-watermark{position:absolute;bottom:66px;right:25px;font-size:9px;letter-spacing:.16em;color:#9cb4bf95;pointer-events:none}.scene-watermark span{margin-left:9px;color:#c4b49b8f}.scene-tools{position:absolute;right:25px;top:24px;display:flex;gap:7px}.scene-tools button{border:1px solid #2b4d59;background:#081c2bc9;border-radius:8px;color:#bfd7da;font-size:11px;font-weight:650;padding:10px 12px;transition:background .24s,transform .24s}.scene-tools button:hover{background:#285062;transform:translateY(-1px)}.scene-tools button span{margin-left:5px}.help-inline{font-size:9px;letter-spacing:.13em;position:absolute;bottom:22px;left:50%;transform:translateX(-50%);color:#b8cad0aa;pointer-events:none;white-space:nowrap}.help-inline span{color:var(--accent);padding:0 7px}.mode-bar{flex:0 0 77px;display:grid;grid-template-columns:repeat(5,1fr);gap:5px;padding:11px 19px;background:#0b1e2a;border-top:1px solid #233e4d}.mode-bar button{padding:11px 8px;color:#7f9ba9;font-size:10px;font-weight:750;letter-spacing:.065em;border-radius:9px;border:1px solid transparent;transition:background .25s,border-color .25s,color .25s}.mode-bar button span{font-size:11px;color:#c7d5da;margin-left:7px}.mode-bar button[aria-pressed=true]{background:#1b3540;color:var(--accent);border-color:#4c7976}.mode-bar button[aria-pressed=true] span{color:#eaf8f2}.mode-bar button:hover{background:#18313d}.sidebar{border-left:1px solid #1c3b47;background:var(--panel);display:flex;flex-direction:column;min-width:0;min-height:0;position:relative;z-index:4}.side-tabs{display:flex;gap:0;flex:0 0 54px;padding:0 19px;border-bottom:1px solid var(--line);justify-content:space-between}.side-tabs button{font-size:10px;font-weight:800;letter-spacing:.105em;padding:0 8px;border-bottom:2px solid transparent;color:#7b99a7;transition:color .3s}.side-tabs button.active{border-color:var(--accent);color:var(--accent)}.sidebar-scroll{overflow-y:auto;overflow-x:hidden;min-height:0;flex:1;scrollbar-width:thin;scrollbar-color:#456471 transparent}.tab-panel{padding:26px 24px 34px}.tab-panel[hidden]{display:none}.side-title h2{font-size:26px;line-height:1.15;font-family:Georgia,serif;letter-spacing:-.03em;font-weight:400;margin:8px 0 10px}.side-title p:last-child{font-size:12px;color:#a8bfca;margin:0 0 21px}.status-row{display:flex;align-items:center;gap:13px;padding:16px;background:#152e3c;border:1px solid #2d5059;border-radius:11px}.status-icon{display:grid;place-items:center;color:var(--accent);font-size:25px;width:38px;height:38px;background:#234b52;border-radius:50%}.status-row b{font-size:12px;display:block}.status-row small{color:#a3bcc6;display:block;line-height:1.4;margin-top:5px;font-size:10px}.section-title{display:flex;justify-content:space-between;align-items:center;font-size:10px;letter-spacing:.14em;font-weight:800;color:#b8cbd0;margin:28px 0 16px}.section-title:after{content:'';height:1px;background:var(--line);flex:1;margin:0 10px}.section-title span:last-child{color:var(--accent);font-size:9px}.field-label{display:block;font-size:11px;color:#b3c9cf;margin-bottom:8px}.range-limits{display:flex;justify-content:space-between;font-size:9px;letter-spacing:.13em;color:#688995;margin-top:5px}input[type=range]{appearance:none;background:#31525d;height:3px;border-radius:3px;outline-offset:7px;width:100%;margin:10px 0 12px;accent-color:var(--accent)}input[type=range]::-webkit-slider-thumb{appearance:none;width:14px;height:14px;background:var(--accent);border-radius:50%;border:3px solid #143340;box-shadow:0 0 0 1px #68b6a6}select{width:100%;border:1px solid #36545f;background:#122b39;color:#e6f3f1;border-radius:8px;padding:12px;font-size:12px;min-height:44px}.part-card{padding:17px;border:1px solid #26434e;border-radius:11px;background:linear-gradient(135deg,#15313c,#0d2331)}.part-kicker{font-size:9px;letter-spacing:.14em;color:var(--accent);font-weight:800}.part-card h3{font-size:15px;line-height:1.3;margin:9px 0 6px}.part-card p,.muted{font-size:11px;line-height:1.65;color:#9cb5bf;margin:4px 0}.assembly-row{display:flex;gap:8px;margin-top:14px}.assembly-row button,.quality-row button{border-radius:7px;border:1px solid #3c5a65;background:#203945;padding:10px 12px;font-size:11px;font-weight:700}.assembly-row button:hover:not(:disabled),.quality-row button:hover{background:#2e5260}.assembly-row button:first-child{background:var(--accent);color:#103037;border-color:var(--accent)}.assembly-hint{font-size:11px;color:#9fb8c3;line-height:1.5;min-height:30px}.quality-row{display:flex;gap:8px}.quality-row button{flex:1}.quality-row button[aria-pressed=true]{background:#254c50;color:var(--accent);border-color:var(--accent)}.formula-card{font-family:Georgia,serif;color:#ddf5eb;font-size:26px;padding:18px;background:#17353a;border:1px solid #416964;border-radius:11px;margin-bottom:24px}.formula-card small{display:block;font-family:inherit;font-size:15px;color:#8cbab4;margin-top:4px}.input-group{margin:20px 0 22px}.input-group label{display:flex;justify-content:space-between;gap:8px;font-size:12px;color:#bdcfd1;font-weight:600}.input-group output{color:var(--accent);font-weight:800;font-variant-numeric:tabular-nums}.metrics{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:18px 0}.metrics>div{background:#172e3c;border:1px solid #254958;border-radius:9px;padding:13px 10px}.metrics small{font-size:9px;letter-spacing:.105em;color:#96b3c2;font-weight:750;display:block}.metrics strong{display:block;color:#eaf8ee;font-size:18px;margin-top:8px;font-variant-numeric:tabular-nums}.metrics em{display:block;color:#8ca5b2;font-size:10px;font-style:normal;margin-top:5px}.negative{color:#ffa886!important}.check-card{border:1px solid #47746e;border-radius:9px;background:#133334;padding:14px}.check-card small{font-weight:800;font-size:9px;color:var(--accent);letter-spacing:.12em}.check-card p{font-size:12px;margin:8px 0;color:#b4cbd1}.check-card b{color:#e8fff5}.check-good{color:var(--accent)!important;font-weight:800}.note{margin-top:15px!important}.context-card{padding:16px 0;border-top:1px solid var(--line)}.context-card>span{font-size:9px;letter-spacing:.15em;color:var(--accent);font-weight:800}.context-card h3{font-family:Georgia,serif;font-weight:400;font-size:19px;margin:7px 0 8px}.context-card p{font-size:11px;color:#a8c1c8;line-height:1.65;margin:0}.quiz fieldset{padding:16px 0;margin:0;border:0;border-top:1px solid var(--line)}.quiz legend{font-size:12px;line-height:1.5;font-weight:700;color:#e0eeef;float:left;width:100%;margin:8px 0}.quiz legend span{color:var(--accent);margin-right:8px}.quiz-answer{clear:both;display:flex;align-items:center;gap:9px;padding:9px;border:1px solid #284655;border-radius:7px;margin:7px 0;font-size:11px;color:#bdd1d5;cursor:pointer}.quiz-answer:has(input:checked){border-color:var(--accent);color:white;background:#19373c}.quiz-answer input{accent-color:var(--accent)}.check-btn{padding:13px;background:var(--accent);border-radius:8px;color:#133337;font-weight:800;width:100%;font-size:12px}.check-btn:hover{filter:brightness(1.09)}#quiz-result{font-size:12px;color:#b9d0d3;line-height:1.5}#quiz-result>strong{font-size:16px;color:var(--accent)}#quiz-result p{border-top:1px solid var(--line);padding-top:7px}.drawer-toggle{display:none}dialog{border:1px solid #41616c;border-radius:18px;color:#d6e9ea;background:#0f2532;max-width:min(620px,92vw);padding:25px 30px;box-shadow:0 16px 60px #0009;max-height:85vh;overflow:auto}dialog::backdrop{background:#03111ed9;backdrop-filter:blur(6px)}dialog h2{font-family:Georgia,serif;font-weight:400;font-size:32px;margin:12px 0}dialog p{font-size:13px;line-height:1.7;color:#b9ccd4}dialog code{background:#1e3b44;color:#d3f9e8;padding:3px 6px;border-radius:4px}dialog strong{color:#eff9f4}.dialog-head{display:flex;justify-content:space-between;align-items:center}.dialog-head button{font-size:27px;line-height:1}.caution{padding-top:14px;border-top:1px solid #3f6765;color:var(--accent)!important}body.embed-mode{height:100vh;height:100dvh;overflow:hidden}body.embed-mode .topbar{display:none}body.embed-mode .app{height:100vh;height:100dvh}
@media(max-width:1100px){.work{grid-template-columns:minmax(0,1fr) 308px}.stage-head{left:22px;top:22px}.stage-head h1{font-size:48px}.scene-tools button span{display:none}.camera-dock{left:14px}.tab-panel{padding:23px 19px}.mode-bar button span{margin-left:4px}}
@media(max-width:700px){.topbar{flex:0 0 54px;padding:0 13px}.brand{font-size:10px}.brand small{font-size:7px}.brand-mark{width:30px;height:30px}.edition,.badge{display:none}.header-actions{gap:0}.header-actions button{font-size:11px}.work{display:flex;flex-direction:column;position:relative}.stage-shell{flex:1;min-height:0}.stage-head{top:16px;left:17px;max-width:245px}.stage-head h1{font-size:41px;margin:9px 0}.stage-head .eyebrow{font-size:8px}.stage-deck{font-size:11px;max-width:212px}.viewport{min-height:0}.scene-tools{top:18px;right:12px;flex-direction:column;gap:5px}.scene-tools button{font-size:10px;padding:8px 9px}.camera-dock{top:auto;left:12px;bottom:66px;transform:none;flex-direction:row;gap:0;padding:3px}.camera-dock button{padding:8px 5px;min-width:41px;font-size:8px}.scene-watermark{bottom:113px;right:9px;font-size:8px}.scene-watermark span{display:none}.help-inline{bottom:22px;font-size:8px;letter-spacing:.04em}.mode-bar{flex:0 0 65px;padding:6px 7px;gap:4px}.mode-bar button{font-size:9px;padding:9px 2px;display:flex;flex-direction:column;gap:5px;align-items:center}.mode-bar button span{font-size:9px;margin:0;white-space:nowrap}.sidebar{position:absolute;bottom:0;left:0;right:0;height:min(76dvh,690px);transform:translateY(calc(100% - 0px));transition:transform .3s ease;box-shadow:0 -8px 40px #0007;border-radius:18px 18px 0 0;z-index:7}.sidebar.expanded{transform:translateY(0)}.sidebar .side-tabs{margin-top:17px}.drawer-toggle{position:absolute;bottom:77px;right:12px;z-index:8;display:block;border:1px solid #41646b;background:#17343ecc;border-radius:100px;padding:10px 14px;font-size:11px;font-weight:800;color:var(--accent);box-shadow:0 4px 18px #06121ab0;backdrop-filter:blur(8px)}.drawer-toggle span{margin-left:7px}.sidebar.expanded~.drawer-toggle{bottom:calc(min(76dvh,690px) - 1px);border-radius:10px 10px 0 0}.tab-panel{padding:22px}.metrics strong{font-size:17px}}
@media(max-width:370px){.stage-head h1{font-size:36px}.mode-bar button span{font-size:8px}.help-inline{font-size:7px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important}}

/* Semantic grouping: keep count at the right edge rather than adjoining the heading. */
.section-title:after{display:none}.section-title span:last-child{margin-left:auto;text-align:right}.section-title{border-bottom:1px solid var(--line);padding-bottom:8px;gap:14px}.camera-dock button{font-size:10px}.scene-tools button,.field-label,.assembly-row button,.quality-row button{font-size:12px}.side-tabs button{font-size:11px}.mode-bar button span{font-size:12px}.input-group label,.status-row b,.part-card p,.part-card h3{font-size:12px}
@media(max-width:700px){.mode-bar button span{font-size:10px}.camera-dock button{font-size:9px}}
