*{box-sizing:border-box}:root{--ink:#202942;--muted:#707a91;--line:#e3e6ef;--panel:#fff;--canvas:#f6f8fc;--indigo:#6267e8;--indigo-dark:#454ac6;--mint:#15b98d;--coral:#ff7163;--amber:#eda63c;--shadow:0 20px 55px rgba(35,44,75,.12)}html,body{width:100%;height:100%;margin:0;overflow:hidden}body{font-family:"DM Sans",sans-serif;color:var(--ink);background:#edf0f7}button,input{font:inherit;color:inherit}.app-shell{width:100vw;height:100vh;display:grid;grid-template-rows:68px minmax(0,1fr);background:linear-gradient(135deg,#f8f9fd,#eceff7)}.topbar{display:flex;align-items:center;justify-content:space-between;padding:0 24px;border-bottom:1px solid rgba(78,92,123,.12);background:rgba(255,255,255,.91);backdrop-filter:blur(14px);z-index:5}.brand-block{display:flex;align-items:center;gap:12px}.brand-mark{width:39px;height:39px;border-radius:13px;background:linear-gradient(145deg,var(--indigo),#9b7ef0);display:grid;place-items:center;color:#fff;box-shadow:0 8px 20px rgba(96,101,231,.28);transform:rotate(-4deg)}.brand-mark span{font:800 25px Georgia,serif;transform:rotate(4deg)}.eyebrow,.kicker,.section-label{margin:0;text-transform:uppercase;letter-spacing:.13em;font-size:10px;font-weight:800;color:var(--indigo)}h1,h2,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 15px;font-weight:700;cursor:pointer;transition:.2s transform,.2s box-shadow,.2s background}.button:hover{transform:translateY(-1px)}.button:focus-visible,.choice:focus-visible,.segmented button:focus-visible,.text-button:focus-visible,.challenge-choices button:focus-visible,input:focus-visible{outline:3px solid rgba(96,101,231,.32);outline-offset:2px}.button-ghost{background:#eeefff;color:var(--indigo-dark)}.button-ghost[aria-pressed=true]{background:var(--indigo);color:#fff}.button-quiet{background:#f0f2f6;color:#59637a}.button-primary{background:var(--indigo);color:#fff;box-shadow:0 8px 18px rgba(96,101,231,.26)}.workspace{min-height:0;display:grid;grid-template-columns:minmax(0,1fr) 370px;gap:14px;padding:14px}.stage-panel,.control-panel{min-height:0;border-radius:22px;background:var(--panel);border:1px solid rgba(99,111,144,.12);box-shadow:var(--shadow)}.stage-panel{position:relative;overflow:hidden;display:grid;grid-template-rows:auto minmax(0,1fr);background:linear-gradient(145deg,#fff,#f9faff)}.stage-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding:19px 23px 8px}.stage-heading h2{font:800 clamp(17px,1.8vw,25px)/1.2 Manrope,sans-serif;margin:4px 0 0}.legend{display:flex;gap:14px;font-size:12px;color:var(--muted);white-space:nowrap}.legend span{display:flex;align-items:center;gap:6px}.legend i{display:inline-block;width:15px;height:8px;border-radius:3px}.area-key{background:rgba(98,103,232,.25);border:2px solid var(--indigo)}.sum-key{background:rgba(21,185,141,.42);border:1px solid var(--mint)}.graph-wrap{position:relative;min-height:0;margin:0 18px 18px;border:1px solid #e8ebf2;border-radius:19px;background:linear-gradient(180deg,#fbfcfe,#f2f5fa);overflow:hidden}.graph-wrap svg{display:block;width:100%;height:100%;touch-action:none}.graph-hint{position:absolute;left:13px;top:12px;padding:7px 10px;border:1px solid var(--line);border-radius:9px;background:rgba(255,255,255,.94);color:var(--muted);font-size:11px;font-weight:700;pointer-events:none}.graph-hint span{color:var(--mint);font-size:15px}.challenge-card{position:absolute;left:24px;right:24px;bottom:20px;display:grid;grid-template-columns:minmax(170px,1fr) auto auto;align-items:center;gap:11px;padding:13px 14px;border:1px solid rgba(96,101,231,.18);border-radius:16px;background:rgba(255,255,255,.97);box-shadow:0 16px 40px rgba(41,50,83,.17);backdrop-filter:blur(12px);z-index:4}.challenge-copy span,.question-label{display:block;font-size:9px;letter-spacing:.1em;text-transform:uppercase;color:var(--indigo);font-weight:800}.challenge-copy strong{display:block;font-size:12px;margin-top:4px}.challenge-choices{display:flex;padding:3px;background:#eff1f6;border-radius:10px}.challenge-choices button{border:0;background:transparent;padding:7px 8px;border-radius:7px;font-size:10px;font-weight:800;cursor:pointer}.challenge-choices button.selected{background:#fff;color:var(--indigo-dark);box-shadow:0 2px 8px rgba(35,44,75,.12)}.challenge-actions{display:flex;gap:6px}.challenge-card .button{font-size:10px;padding:8px 9px}.feedback{grid-column:1/-1;min-height:14px;margin:0;font-size:10px;color:var(--muted)}.feedback.correct{color:#128461}.feedback.try{color:#c05245}.control-panel{overflow:hidden;display:flex;flex-direction:column}.control-section{padding:14px 17px;border-bottom:1px solid #eceef4}.section-heading{display:flex;align-items:center;gap:9px;margin-bottom:10px}.section-heading.compact{margin-bottom:8px}.section-heading h2{font:800 13px Manrope,sans-serif;margin:2px 0 0}.step-number{width:22px;height:22px;flex:0 0 auto;border-radius:7px;display:grid;place-items:center;background:#eff0ff;color:var(--indigo);font-size:10px;font-weight:800}.choice-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px}.choice{min-width:0;text-align:left;border:1px solid #e6e8f0;background:#f8f9fc;border-radius:11px;padding:8px 9px;cursor:pointer;transition:.18s border-color,.18s background}.choice.active{border-color:var(--indigo);background:#f0f1ff}.choice span{display:block;color:var(--muted);font-size:8px;text-transform:uppercase;letter-spacing:.06em;font-weight:800}.choice strong{display:block;margin-top:3px;font-size:10px;white-space:nowrap}.segmented{display:grid;grid-template-columns:repeat(3,1fr);padding:4px;background:#eef0f5;border-radius:11px}.segmented button{border:0;background:transparent;border-radius:8px;padding:8px 5px;font-size:10px;font-weight:800;cursor:pointer}.segmented button.active{background:#fff;color:var(--indigo-dark);box-shadow:0 3px 10px rgba(35,44,75,.1)}.slider-heading{display:flex;align-items:center;justify-content:space-between}.slider-heading output{min-width:45px;padding:6px 10px;border-radius:10px;background:#eff0ff;color:var(--indigo-dark);text-align:center;font:800 17px Manrope,sans-serif}.rectangles-section input{width:100%;height:5px;appearance:none;border-radius:99px;background:linear-gradient(90deg,var(--indigo) var(--fill,18%),#dfe3ec var(--fill,18%));cursor:pointer}.rectangles-section input::-webkit-slider-thumb{appearance:none;width:19px;height:19px;border-radius:50%;background:#fff;border:5px solid var(--indigo);box-shadow:0 3px 10px rgba(45,50,110,.2)}.rectangles-section input::-moz-range-thumb{width:11px;height:11px;border-radius:50%;background:#fff;border:5px solid var(--indigo);box-shadow:0 3px 10px rgba(45,50,110,.2)}.slider-scale{display:flex;justify-content:space-between;margin-top:5px;font-size:8px;color:#9098a9}.results-section{display:grid;grid-template-columns:1fr 1fr;gap:7px;padding:13px 17px}.result-card{position:relative;overflow:hidden;padding:10px 11px;border:1px solid #e8eaf1;border-radius:13px;background:#f8f9fc}.result-card:before{content:"";position:absolute;inset:0 auto 0 0;width:3px;background:var(--accent)}.result-card.estimate{--accent:var(--mint)}.result-card.exact{--accent:var(--indigo)}.result-card.error{--accent:var(--coral)}.result-card.width{--accent:var(--amber)}.result-card span{display:block;font-size:8px;font-weight:800;color:var(--muted);text-transform:uppercase;letter-spacing:.07em}.result-card strong{display:block;font:800 19px Manrope,sans-serif;margin:2px 0;color:var(--ink)}.result-card small{display:block;font-size:8px;color:#8a93a5;white-space:nowrap}.insight-card{margin:auto 17px 15px;padding:12px 13px;border-radius:14px;background:linear-gradient(135deg,#293052,#444b7a);color:#fff}.question-label{color:#bfc5ec}.insight-card p{font-size:10px;line-height:1.4;margin:5px 0 7px}.text-button{border:0;background:transparent;padding:0;color:#bfc4ff;font-size:9px;font-weight:800;cursor:pointer}.grid-line{stroke:#e0e4ed;stroke-width:1}.grid-line.major{stroke:#c8cedb;stroke-width:1.5}.axis-line{stroke:#677187;stroke-width:2}.axis-label{font:700 14px "DM Sans",sans-serif;fill:#7d8699;text-anchor:middle}.y-label{text-anchor:end}.axis-name{font:800 12px "DM Sans",sans-serif;fill:#9aa2b2}.exact-area{fill:url(#areaGradient)}.curve-line{fill:none;stroke:var(--indigo);stroke-width:5;stroke-linecap:round;filter:url(#softShadow)}.sum-rect{fill:url(#rectGradient);stroke:#0f9e7c;stroke-width:1.5}.sample-stem{stroke:#0f9e7c;stroke-width:2;stroke-dasharray:4 4}.sample-dot{fill:#fff;stroke:#0f9e7c;stroke-width:4}.sample-label{font:800 10px "DM Sans",sans-serif;fill:#08775f;text-anchor:middle}.interval-brace{stroke:var(--coral);stroke-width:4;stroke-linecap:round}.interval-label{font:800 12px "DM Sans",sans-serif;fill:#d75c50;text-anchor:middle}
@media(max-width:900px){.workspace{grid-template-columns:minmax(0,1fr) 330px}.control-section{padding-left:13px;padding-right:13px}.results-section{padding-left:13px;padding-right:13px}.insight-card{margin-left:13px;margin-right:13px}.challenge-card{grid-template-columns:1fr auto}.challenge-actions{grid-column:1/-1}.feedback{grid-column:1/-1}}
@media(max-width:700px){.app-shell{grid-template-rows:56px minmax(0,1fr)}.topbar{padding:0 12px}.brand-mark{width:32px;height:32px}.brand-mark span{font-size:21px}.eyebrow{display:none}h1{font-size:16px}.button{padding:8px 10px;font-size:11px}.workspace{grid-template-columns:1fr;grid-template-rows:minmax(0,54%) minmax(0,46%);padding:7px;gap:7px}.stage-panel,.control-panel{border-radius:16px}.stage-heading{padding:9px 12px 3px}.stage-heading h2{font-size:13px}.kicker{font-size:8px}.legend{font-size:8px;gap:7px}.graph-wrap{margin:0 8px 8px;border-radius:12px}.graph-hint{font-size:8px;padding:4px 6px;left:6px;top:6px}.control-panel{display:grid;grid-template-columns:1.15fr .85fr;grid-template-rows:auto auto;align-content:start}.function-section{grid-row:1/3;padding:9px 10px}.method-section,.rectangles-section{padding:8px 10px}.section-heading{margin-bottom:6px}.section-heading h2{font-size:10px}.section-label{font-size:7px}.step-number{width:17px;height:17px;font-size:8px}.choice-grid{gap:4px}.choice{padding:6px}.choice span{font-size:6px}.choice strong{font-size:8px}.segmented button{padding:6px 2px;font-size:8px}.slider-heading output{min-width:32px;padding:4px;font-size:12px}.results-section{grid-column:1/-1;display:grid;grid-template-columns:repeat(4,1fr);padding:7px 10px;gap:4px}.result-card{padding:6px}.result-card strong{font-size:14px}.result-card small{display:none}.result-card span{font-size:6px}.insight-card{display:none}.challenge-card{left:12px;right:12px;bottom:10px;padding:8px;gap:6px}.challenge-copy strong{font-size:9px}.challenge-choices button{font-size:8px;padding:5px}.challenge-actions{grid-column:auto}.challenge-card .button{font-size:8px;padding:5px}.feedback{font-size:8px}.axis-label{font-size:11px}}
@media(max-width:430px){.top-actions .button{padding:7px 8px}.button-ghost span{display:none}.legend{display:none}.workspace{grid-template-rows:minmax(0,52%) minmax(0,48%)}.stage-heading h2{font-size:12px}.graph-hint{display:none}.control-panel{grid-template-columns:1fr 1fr}.choice strong{font-size:7px}.challenge-card{grid-template-columns:1fr}.challenge-copy{display:none}.challenge-choices{justify-content:center}.challenge-actions{display:grid;grid-template-columns:1fr 1fr}.feedback{grid-column:1}}
@media(min-width:701px) and (max-height:700px){.workspace{padding:9px;gap:9px}.stage-heading{padding:12px 18px 5px}.graph-wrap{margin:0 12px 12px}.control-section{padding-top:9px;padding-bottom:9px}.results-section{padding-top:8px;padding-bottom:8px}.result-card{padding:7px}.result-card strong{font-size:16px}.insight-card{margin-bottom:8px;padding:8px}.challenge-card{bottom:12px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}