*{box-sizing:border-box}:root{--ink:#222942;--muted:#737c91;--line:#e2e6ef;--panel:#fff;--indigo:#5f61e8;--indigo-dark:#4648ba;--coral:#ff705e;--teal:#16b89a;--gold:#f2aa3c;--shadow:0 18px 54px rgba(39,49,81,.13)}html,body{width:100%;height:100%;margin:0;overflow:hidden}body{font-family:"DM Sans",system-ui,sans-serif;color:var(--ink);background:#eef2f8}button,input{font:inherit;color:inherit}.app-shell{width:100vw;height:100vh;display:grid;grid-template-rows:66px minmax(0,1fr);background:linear-gradient(135deg,#fbfcff,#edf1f7)}.topbar{display:flex;align-items:center;justify-content:space-between;padding:0 24px;background:rgba(255,255,255,.94);border-bottom:1px solid rgba(69,82,117,.12);backdrop-filter:blur(14px);z-index:5}.brand{display:flex;align-items:center;gap:11px}.brand-mark{width:39px;height:39px;border-radius:13px;display:grid;place-items:center;background:linear-gradient(145deg,var(--indigo),#9b9cf7);color:#fff;font:800 23px/1 Manrope,sans-serif;box-shadow:0 8px 20px rgba(89,98,230,.28);transform:rotate(-4deg)}.brand p,.kicker,.section-heading p{margin:0;text-transform:uppercase;letter-spacing:.13em;font-size:9px;font-weight:800;color:var(--indigo)}h1,h2,h3,p{margin-top:0}h1{font:800 20px/1.05 Manrope,sans-serif;margin:3px 0 0}.top-actions{display:flex;gap:8px}.button{border:0;border-radius:10px;padding:10px 14px;font-weight:700;cursor:pointer;transition:.2s transform,.2s box-shadow}.button:hover{transform:translateY(-1px)}.button:focus-visible,.preset-grid button:focus-visible,.factor-pairs button:focus-visible,.text-button:focus-visible,.close-button:focus-visible,.challenge-options button:focus-visible,input:focus-visible{outline:3px solid rgba(89,98,230,.34);outline-offset:2px}.ghost{background:#eeeefe;color:var(--indigo-dark)}.ghost[aria-pressed=true]{background:var(--indigo);color:#fff}.quiet{background:#f0f2f6;color:#5e687d}.workspace{min-height:0;display:grid;grid-template-columns:minmax(0,1fr) 378px;gap:14px;padding:14px}.stage,.controls{min-height:0;border-radius:22px;background:var(--panel);border:1px solid rgba(92,104,137,.12);box-shadow:var(--shadow)}.stage{position:relative;overflow:hidden;display:grid;grid-template-rows:auto minmax(0,1fr) auto;background:linear-gradient(145deg,#fff,#fafaff)}.stage-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;padding:20px 24px 5px}.stage-heading h2{font:800 clamp(18px,2vw,27px)/1.2 Manrope,sans-serif;margin:4px 0 0}.number-badge{min-width:92px;padding:8px 12px;border-radius:12px;background:#eff0ff;text-align:center;color:var(--indigo-dark)}.number-badge small{display:block;font-size:8px;text-transform:uppercase;letter-spacing:.08em;font-weight:800}.number-badge strong{font:800 22px Manrope,sans-serif}.tree-scene{min-height:0;position:relative;margin:0 18px 8px;border:1px solid #e7eaf2;border-radius:20px;background:radial-gradient(circle at 78% 16%,rgba(95,97,232,.13),transparent 35%),radial-gradient(circle at 15% 85%,rgba(22,184,154,.09),transparent 28%),linear-gradient(180deg,#fcfcff,#f2f4fa);overflow:hidden;display:grid;grid-template-rows:minmax(0,1fr) auto}.tree-scene svg{display:block;width:100%;height:100%;min-height:0}.tree-line{stroke:#bcc3d4;stroke-width:4;stroke-linecap:round}.node circle{filter:url(#nodeShadow);stroke-width:4}.node text{font:800 18px Manrope,sans-serif;text-anchor:middle;dominant-baseline:middle}.node.composite circle{fill:#fff;stroke:var(--indigo)}.node.composite text{fill:var(--indigo-dark)}.node.prime circle{fill:var(--teal);stroke:#fff}.node.prime text{fill:#fff}.node-label{font:800 10px "DM Sans",sans-serif!important;letter-spacing:.08em;text-transform:uppercase;dominant-baseline:auto!important}.node.prime .node-label{fill:#118b76}.node.composite .node-label{fill:#7d86a0}.tree-legend{display:flex;justify-content:center;gap:24px;padding:6px 12px 11px;color:var(--muted);font-size:10px;font-weight:700}.tree-legend span{display:flex;align-items:center;gap:6px}.tree-legend i{width:11px;height:11px;border-radius:50%}.composite-key{background:#fff;border:2px solid var(--indigo)}.prime-key{background:var(--teal)}.factor-strip{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:14px;margin:0 18px 18px;padding:11px 16px;border-radius:15px;background:#293253;color:#fff}.factor-strip span{display:block;color:#c2c7e3;font-size:8px;text-transform:uppercase;letter-spacing:.09em;font-weight:800}.factor-strip strong{display:block;margin-top:3px;font:700 clamp(11px,1.3vw,15px) Manrope,sans-serif;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.factor-strip>i{color:#8993be;font-style:normal}.controls{display:flex;flex-direction:column;overflow:hidden}.control-section{padding:15px 18px;border-bottom:1px solid #eceef4}.section-heading{display:flex;align-items:center;gap:9px;margin-bottom:11px}.section-heading>span{width:23px;height:23px;border-radius:7px;display:grid;place-items:center;background:#eef0ff;color:var(--indigo);font-size:10px;font-weight:800}.section-heading h2{font:800 13px Manrope,sans-serif;margin:2px 0 0}.slider-label{display:flex;justify-content:space-between;font-size:11px;font-weight:700}.slider-label output{min-width:58px;padding:3px 8px;border-radius:8px;background:#eff0ff;color:var(--indigo-dark);text-align:center;font-weight:800}input[type=range]{width:100%;accent-color:var(--indigo);margin:12px 0 9px;cursor:pointer}.preset-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:5px}.preset-grid button,.factor-pairs button{border:1px solid #e0e3ec;border-radius:9px;padding:7px 3px;background:#f7f8fb;color:#626b80;font-size:9px;font-weight:800;cursor:pointer}.preset-grid button.active,.factor-pairs button.active{background:var(--indigo);border-color:var(--indigo);color:#fff}.factor-pairs{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}.factor-pairs button{padding:10px 4px;font-size:11px}.factor-pairs .prime-message{grid-column:1/-1;padding:12px;border-radius:12px;background:#ecfbf7;color:#118b76;font-size:10px;font-weight:800;text-align:center}.pair-insight{margin:9px 0 0;color:var(--muted);font-size:9px;line-height:1.4}.prime-chips{display:flex;flex-wrap:wrap;gap:7px;min-height:39px}.prime-chip{display:grid;place-items:center;min-width:37px;height:37px;padding:0 9px;border-radius:11px;background:linear-gradient(145deg,#16b89a,#0e9b82);color:#fff;font:800 15px Manrope,sans-serif;box-shadow:0 7px 16px rgba(22,184,154,.2)}.uniqueness-card{margin-top:10px;padding:10px 12px;border-radius:13px;background:#fff8e9;border:1px solid #f1e2c2}.uniqueness-card span,.prompt-card>span{font-size:8px;text-transform:uppercase;letter-spacing:.1em;color:#a36b16;font-weight:800}.uniqueness-card p{margin:4px 0 0;color:#6d614f;font-size:9px;line-height:1.4}.prompt-card{margin:10px 18px 15px;padding:12px 14px;border-radius:14px;background:linear-gradient(135deg,#293152,#454d7c);color:#fff}.prompt-card>span{color:#c3c8ef}.prompt-card p{font-size:10px;line-height:1.4;margin:4px 0 7px}.text-button{border:0;background:transparent;padding:0;color:var(--indigo);font-size:10px;font-weight:800;cursor:pointer}.prompt-card .text-button{color:#c8cbff}.prompt-card #revealText{color:#d8dbef;font-size:8px}.challenge-card{position:absolute;inset:82px 34px 34px;z-index:4;display:grid;align-content:center;justify-items:center;text-align:center;padding:28px;border:1px solid rgba(89,98,230,.16);border-radius:20px;background:rgba(255,255,255,.98);box-shadow:0 20px 70px rgba(37,48,82,.2);backdrop-filter:blur(16px)}.challenge-card h3{font:800 clamp(23px,2.5vw,34px)/1.2 Manrope,sans-serif;margin:7px 0}.challenge-card>p:nth-of-type(2){color:var(--muted);font-size:14px}.close-button{position:absolute;right:15px;top:12px;border:0;background:#f0f2f6;width:32px;height:32px;border-radius:10px;color:#697286;font-size:20px;cursor:pointer}.challenge-options{width:min(560px,100%);display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:8px 0}.challenge-options button{border:2px solid #e2e5ee;border-radius:13px;background:#f8f9fc;padding:12px 9px;font-weight:800;cursor:pointer}.challenge-options button.correct{border-color:var(--teal);background:#ecfbf7}.challenge-options button.incorrect{border-color:var(--coral);background:#fff1ef}.feedback{min-height:22px;margin:8px 0;font-size:11px;font-weight:700}.feedback.correct{color:#10856d}.feedback.try{color:#c05245}
@media(max-width:900px){.workspace{grid-template-columns:minmax(0,1fr) 340px}.stage-heading{padding-left:18px}.tree-scene{margin-left:10px;margin-right:10px}}
@media(max-width:700px){.app-shell{grid-template-rows:56px minmax(0,1fr)}.topbar{padding:0 11px}.brand-mark{width:32px;height:32px;font-size:18px}.brand p{display:none}h1{font-size:16px}.button{padding:8px 10px;font-size:10px}.workspace{grid-template-columns:1fr;grid-template-rows:minmax(0,59%) minmax(0,41%);padding:7px;gap:7px}.stage,.controls{border-radius:16px}.stage-heading{padding:9px 12px 3px}.stage-heading h2{font-size:12px}.number-badge{min-width:64px;padding:5px 7px}.number-badge strong{font-size:15px}.number-badge small{font-size:6px}.tree-scene{margin:0 7px 5px;border-radius:13px}.tree-legend{gap:12px;padding:2px 5px 5px;font-size:7px}.tree-legend i{width:8px;height:8px}.factor-strip{margin:0 7px 7px;padding:7px 9px;gap:5px;border-radius:10px}.factor-strip span{font-size:5px}.factor-strip strong{font-size:8px}.controls{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:minmax(0,1fr);align-items:stretch}.control-section{padding:7px 8px;border-bottom:0}.choose-section{border-right:1px solid #eceef4}.split-section{border-right:1px solid #eceef4}.readout-section{display:none}.section-heading{margin-bottom:5px}.section-heading>span{width:18px;height:18px;font-size:7px}.section-heading h2{font-size:9px}.section-heading p{font-size:6px}.slider-label{font-size:7px}.slider-label output{min-width:43px;font-size:8px;padding:2px 5px}input[type=range]{margin:6px 0 5px}.preset-grid{grid-template-columns:repeat(3,1fr);gap:3px}.preset-grid button{padding:4px 1px;font-size:7px;border-radius:6px}.factor-pairs{gap:3px}.factor-pairs button{padding:5px 1px;font-size:7px;border-radius:6px}.pair-insight{font-size:6px;margin-top:4px}.prompt-card{display:none}.challenge-card{inset:47px 12px 12px;padding:14px}.challenge-card h3{font-size:19px}.challenge-card>p:nth-of-type(2){font-size:10px}.challenge-options{gap:5px}.challenge-options button{padding:8px 4px;font-size:9px}.feedback{font-size:8px;min-height:15px}.node text{font-size:16px}.node-label{font-size:8px!important}}
@media(max-width:420px){.top-actions .ghost span{display:none}.stage-heading h2{font-size:10px}.control-section{padding:6px}.factor-pairs button{font-size:6px}}
@media(min-width:701px) and (max-height:700px){.app-shell{grid-template-rows:56px minmax(0,1fr)}.topbar{padding:0 18px}.brand-mark{width:34px;height:34px}.brand h1{font-size:17px}.workspace{padding:9px;gap:9px}.stage-heading{padding:10px 18px 3px}.tree-scene{margin-bottom:5px}.tree-legend{padding:3px 8px 6px}.factor-strip{margin-bottom:10px;padding:7px 12px}.control-section{padding:9px 13px}.section-heading{margin-bottom:6px}input[type=range]{margin:6px 0 5px}.preset-grid button,.factor-pairs button{padding:5px 2px}.prime-chip{height:29px;min-width:29px;font-size:12px}.uniqueness-card{margin-top:6px;padding:7px 9px}.prompt-card{margin:6px 13px 8px;padding:7px 10px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important}}