:root { --navy:#142044; --navy2:#23325c; --ink:#142241; --muted:#5f6c80; --line:#dce4ef; --paper:#ffffff; --bg:#f5f8fc; --teal:#0b877f; --mint:#e9f9f6; --coral:#f16c59; --yellow:#ffd876; --lav:#eeeaff; --purple:#6852c9; --shadow:0 16px 44px rgba(18,34,65,.065); color-scheme:light; }
* { box-sizing:border-box; }
html { scroll-behavior:smooth; }
body { margin:0; background:var(--bg); color:var(--ink); font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; font-size:15px; line-height:1.55; }
button,input,textarea,select { font:inherit; }
button { cursor:pointer; }
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,summary:focus-visible { outline:3px solid #e89914; outline-offset:3px; }
a { color:var(--teal); }
h1,h2,h3,h4,p { margin-top:0; }
h1,h2,h3,h4 { line-height:1.17; letter-spacing:-.035em; }
h1 { font-size:clamp(2rem,4.6vw,3.6rem); }
h2 { font-size:clamp(1.8rem,3vw,2.45rem); }
h3 { font-size:1.25rem; }
p { color:var(--muted); }
.topbar { min-height:76px; background:var(--navy); color:#fff; display:flex; justify-content:space-between; align-items:center; padding:12px clamp(18px,4vw,46px); gap:14px; }
.brand { display:flex; gap:13px; align-items:center; letter-spacing:.09em; line-height:1.2; }
.brand strong { display:block; font-size:14px; letter-spacing:.17em; }
.brand small { color:#b6c5e2; display:block; font-size:11px; letter-spacing:.035em; margin-top:5px; }
.logo { display:grid; place-items:center; width:46px; height:46px; background:#ffd876; border-radius:15px; color:var(--navy); font-size:24px; font-weight:950; letter-spacing:-.12em; transform:rotate(-5deg); }
.logo span { color:var(--coral); font-size:18px; align-self:start; }
.top-actions { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.saved { color:#b6e5dc; font-size:12px; }
.top-button { border:1px solid #607296; background:#27365c; color:white; padding:10px 15px; border-radius:12px; font-weight:750; font-size:13px; }
.top-button.outlined { border-color:var(--yellow); color:var(--yellow); }
.app-layout { display:grid; grid-template-columns:286px minmax(0,1fr); min-height:calc(100vh - 124px); max-width:1500px; margin:auto; }
.sidebar { background:#fff; border-right:1px solid #e3eaf2; padding:29px 20px 30px 26px; }
.eyebrow { color:var(--teal); letter-spacing:.18em; font-size:11px; font-weight:900; }
.sidebar-head h2 { font-size:37px; margin:8px 0 6px; }
.dot { color:var(--coral); }
.sidebar-head p { font-size:13px; margin-bottom:30px; }
.nav-caption { font-size:11px; font-weight:850; letter-spacing:.14em; color:#77849a; margin:26px 0 12px 10px; }
.side-progress { border-radius:14px; background:#f6f9fc; border:1px solid var(--line); padding:14px; }
.progress-label { display:flex; justify-content:space-between; align-items:center; gap:8px; font-size:12px; margin-bottom:8px; }
.progress-label strong { color:var(--teal); }
.progress-track { height:9px; border-radius:99px; background:#dfe7ed; overflow:hidden; }
.progress-fill { height:100%; border-radius:99px; background:linear-gradient(90deg,#1ca38e,#58c6b0); transition:width .2s ease; width:0; }
#topicNav { display:grid; gap:6px; }
.topic-link { width:100%; border:1px solid transparent; background:transparent; border-radius:14px; text-align:left; padding:12px 10px; display:flex; align-items:center; gap:12px; color:var(--ink); }
.topic-link:hover { background:#f3f6fb; }
.topic-link.active { background:#e9f7f4; border-color:#bce2d9; }
.topic-index { width:43px; height:43px; background:#eff2f8; border-radius:11px; display:grid; place-items:center; font-weight:900; flex-shrink:0; font-size:13px; }
.topic-link.active .topic-index { background:var(--teal); color:white; }
.topic-link span.topic-label { font-size:13px; font-weight:800; line-height:1.35; flex:1; }
.topic-link .mini-done { font-size:11px; color:var(--teal); }
.sidebar-bottom { margin-top:40px; border-radius:18px; background:var(--lav); padding:19px; }
.sidebar-bottom strong { display:block; margin:6px 0; }
.sidebar-bottom p { font-size:12px; margin:0; color:#625d8b; }
.pause-icon { font-size:26px; color:var(--purple); }
.workspace { min-width:0; padding:23px clamp(18px,4vw,54px) 60px; }
.intro-strip { display:flex; justify-content:space-between; gap:12px; align-items:center; margin:0 0 19px; flex-wrap:wrap; font-size:12px; font-weight:700; color:var(--muted); }
.status-chip { display:inline-flex; border-radius:999px; background:#e9edf6; color:#41516e; padding:6px 12px; font-weight:900; font-size:10px; letter-spacing:.08em; }
.hero { border-radius:24px; padding:clamp(25px,4vw,48px); background:var(--navy); color:#fff; display:grid; grid-template-columns:minmax(0,1.3fr) minmax(200px,.7fr); gap:24px; position:relative; overflow:hidden; }
.hero:before { content:""; position:absolute; width:320px; height:320px; border:1px solid #41547b; border-radius:50%; right:-80px; top:-145px; box-shadow:0 0 0 42px #1e2b50,0 0 0 43px #425276; pointer-events:none; }
.hero .hero-visual { position:relative; z-index:1; align-self:center; justify-self:center; width:min(235px,100%); aspect-ratio:1; border-radius:32px; background:#fbd675; display:flex; align-items:center; justify-content:center; transform:rotate(7deg); box-shadow:14px 18px 0 rgba(247,251,255,.1); color:var(--navy); }
.hero-visual b { font-size:clamp(50px,7vw,90px); letter-spacing:-.16em; white-space:nowrap; }
.hero-visual sup { font-size:24px; top:-.5em; position:relative; }
.hero h1 { margin:13px 0; max-width:590px; }
.hero p { color:#d2def3; max-width:540px; font-size:15px; }
.hero .status-chip { background:#35476f; color:#dcf8f2; }
.hero .btn-primary { margin-top:11px; background:var(--yellow); color:var(--navy); }
.hero-light { background:linear-gradient(130deg,#f4fafc,#e9f7f5); color:var(--ink); border:1px solid #d3e9e4; }
.hero-light p { color:var(--muted); }
.hero-light .status-chip { background:white; color:var(--teal); }
.hero-light .hero-visual { background:#ddf3ed; }
.btn-primary,.btn-secondary,.btn-ghost,.btn-danger { border:0; border-radius:13px; padding:13px 18px; font-weight:850; display:inline-flex; gap:9px; align-items:center; justify-content:center; transition:transform .15s ease, background .15s ease; }
.btn-primary { background:var(--navy); color:#fff; }
.btn-primary:hover { background:#2a3c68; transform:translateY(-1px); }
.btn-secondary { background:#ddf5ef; color:#086c60; }
.btn-secondary:hover { background:#c9eee4; }
.btn-ghost { border:1px solid var(--line); background:#fff; color:var(--ink); }
.btn-ghost:hover { background:#f5f9fc; }
.btn-danger { background:#ffe9e6; color:#a23b34; }
.btn-small { padding:9px 13px; font-size:13px; border-radius:11px; }
.btn-row { display:flex; gap:10px; flex-wrap:wrap; margin-top:20px; }
.feature-row { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; margin-top:18px; }
.feature { background:white; border:1px solid var(--line); padding:20px; border-radius:17px; min-width:0; }
.feature strong { display:block; font-size:15px; margin:5px 0; }
.feature p { font-size:13px; margin:0; }
.feature .glyph { font-size:27px; }
.section-heading { display:flex; flex-wrap:wrap; gap:15px; justify-content:space-between; align-items:flex-start; margin:18px 0 22px; }
.section-heading h1 { margin:8px 0 11px; }
.section-heading p { font-size:15px; max-width:650px; margin:0; }
.section-nudge { padding:11px 15px; background:#fff5de; border-radius:13px; font-weight:750; color:#805119; font-size:12px; }
.tabs { display:flex; gap:7px; padding:6px; border:1px solid #dae5ed; background:#ecf1f7; border-radius:16px; flex-wrap:wrap; margin:20px 0; }
.tab { flex:1 1 140px; padding:11px 14px; border:0; background:transparent; border-radius:11px; color:#55637b; font-weight:800; }
.tab.active { background:#fff; color:var(--navy); box-shadow:0 3px 9px rgba(12,20,46,.08); }
.card { background:var(--paper); border-radius:20px; padding:clamp(20px,3vw,30px); border:1px solid var(--line); box-shadow:var(--shadow); margin:16px 0; }
.card h3 { margin-bottom:9px; }
.lesson-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.lesson-grid .card { margin:0; }
.lesson-headline { font-size:12px; font-weight:900; color:var(--teal); text-transform:uppercase; letter-spacing:.13em; margin-bottom:9px; }
.lesson-step { display:flex; align-items:flex-start; gap:13px; padding:12px 0; border-bottom:1px solid #edf0f4; }
.lesson-step:last-child { border:0; }
.num-bubble { width:29px; height:29px; border-radius:50%; flex:0 0 29px; display:grid; place-items:center; background:#ecf6f2; color:var(--teal); font-weight:900; font-size:13px; }
.lesson-step p { margin:2px 0 0; font-size:14px; }
.big-rule { background:#eaf8f6; border:1px solid #b9e5dc; padding:21px; border-radius:17px; margin:20px 0; }
.big-rule strong { color:#076a60; text-transform:uppercase; letter-spacing:.07em; font-size:12px; }
.equation { display:block; font-family:ui-monospace,SFMono-Regular,Consolas,"Liberation Mono",monospace; font-size:clamp(21px,3vw,31px); font-weight:850; letter-spacing:-.04em; color:var(--navy); margin:9px 0; overflow-wrap:anywhere; }
.equation sup { font-size:.57em; }
.math-marker { display:inline-block; border-radius:7px; padding:1px 6px; background:#fff0a8; color:#1b3057; }
.definition-list { display:grid; gap:10px; }
.definition { border-left:4px solid #9ddbd0; padding:7px 0 7px 14px; background:linear-gradient(90deg,#f7fcfb,transparent); }
.definition strong { display:block; color:var(--ink); }
.definition p { margin:0; font-size:14px; }
.worked { border:1px solid #cfe8e2; background:#f7fcfa; border-radius:17px; padding:17px 19px; margin:12px 0; }
.worked-tag { display:inline-block; color:#087565; background:#dcf2eb; font-size:11px; font-weight:850; padding:4px 8px; border-radius:7px; margin-bottom:10px; }
.worked h4 { margin:0 0 8px; font-size:17px; }
.worked p { color:#415c59; margin:7px 0; }
.worked ol,.card ol,.card ul { padding-left:22px; }
.worked li { margin:7px 0; }
.learning-note { background:#fff6e4; border:1px solid #f3e2af; padding:16px 18px; border-radius:15px; font-size:13px; color:#77541c; margin:14px 0; }
.learning-note strong { color:#654311; }
.explain-paths { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:17px 0; }
.explain-paths >div { border:1px solid var(--line); background:#fafbff; padding:15px; border-radius:14px; }
.explain-paths strong { font-size:14px; }
.explain-paths p { font-size:13px; margin:8px 0 0; }
.decimal-lab { background:#17284e; color:white; border:1px solid #44547b; padding:24px; border-radius:21px; margin:18px 0; overflow:hidden; }
.decimal-lab .lesson-headline { color:#91e3d0; }
.decimal-lab p { color:#d1ddef; }
.decimal-lab h3 { font-size:23px; }
.lab-controls { display:flex; flex-wrap:wrap; gap:10px; margin:12px 0 18px; align-items:center; }
.lab-controls label { color:#e1ebfa; font-size:13px; font-weight:700; }
.lab-controls input { width:156px; border-radius:10px; border:1px solid #7185ad; padding:10px 12px; color:#18213a; background:#fff; }
.decimal-number { min-height:140px; display:flex; align-items:center; justify-content:center; padding:22px 10px; font-size:clamp(18px,4.5vw,52px); font-family:ui-monospace,monospace; font-weight:950; background:#283c68; border:1px solid #536790; border-radius:15px; container-type:inline-size; touch-action:pan-y; user-select:none; -webkit-user-select:none; }
.decimal-track { position:relative; display:grid; grid-template-columns:repeat(var(--digit-count),minmax(0,1fr)); width:calc(var(--digit-count) * 1em); max-width:calc(100% - 44px); line-height:1.25; margin:12px 22px; }
@supports (font-size:1cqw) { .decimal-track { font-size:clamp(16px,calc((100cqw - 44px) / var(--digit-count)),58px); } }
.decimal-number .digit { text-align:center; }
.decimal-number .decimal-dot { position:absolute; left:var(--decimal-position); top:50%; transform:translate(-50%,-50%); display:flex; align-items:center; justify-content:center; width:44px; height:64px; min-height:1.25em; padding:0; color:#ffd876; background:transparent; border:0; border-radius:10px; font:inherit; cursor:grab; touch-action:none; -webkit-tap-highlight-color:transparent; }
.decimal-dot::before { content:""; position:absolute; top:0; bottom:0; left:50%; transform:translateX(-50%); width:.48em; min-width:10px; border-radius:8px; background:rgba(255,216,118,.18); pointer-events:none; }
.decimal-dot::after { content:"↔"; position:absolute; top:calc(100% - 3px); left:50%; transform:translateX(-50%); font:800 17px/1 Arial,sans-serif; color:#ffd876; pointer-events:none; }
.decimal-dot:focus-visible { outline:3px solid #91e3d0; outline-offset:4px; }
.decimal-number.is-dragging,.decimal-number.is-dragging .decimal-dot { cursor:grabbing; }
.decimal-number.is-dragging .decimal-dot::before { background:rgba(255,216,118,.35); }
.decimal-lab .lab-drag-hint { font-size:13px; margin:12px 0; color:#d1ddef; }
.decimal-lab button:disabled { opacity:.5; cursor:default; }
.lab-count { display:flex; justify-content:space-between; flex-wrap:wrap; gap:11px; margin:16px 0; font-size:13px; font-weight:750; }
.lab-count strong { background:var(--yellow); color:var(--ink); padding:5px 9px; border-radius:9px; }
.lab-meter { display:flex; flex-wrap:wrap; gap:5px; min-height:12px; }
.lab-meter span { width:21px; height:10px; border-radius:99px; background:#61759f; }
.lab-meter span.on { background:#ffc969; }
.decimal-lab .btn-ghost { background:#24365e; border-color:#7084af; color:white; }
.decimal-lab .btn-secondary { background:#fff2ca; color:#654910; }
.lab-complete { background:#1e4c53; padding:12px 15px; border-radius:11px; color:#e3fff9; font-weight:750; font-size:13px; margin-top:12px; }
.quiz-meta { display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; font-size:12px; font-weight:800; color:var(--muted); }
.quiz-title { font-size:clamp(22px,3vw,31px); margin:18px 0 8px; }
.quiz-options { display:grid; gap:11px; margin:21px 0; }
.quiz-option { padding:15px; text-align:left; background:#f8fafc; border:2px solid #e1e8f0; border-radius:14px; color:var(--ink); font-size:16px; font-weight:650; display:flex; align-items:center; gap:13px; }
.quiz-option .letter { width:28px; height:28px; display:grid; place-items:center; border-radius:8px; background:#e9eef5; flex-shrink:0; font-size:12px; font-weight:900; }
.quiz-option.selected { border-color:#23a28b; background:#ecfbf7; }
.quiz-option.correct { border-color:#11957f; background:#dff9ef; }
.quiz-option.incorrect { border-color:#ef907d; background:#fff0eb; }
.quiz-option:disabled { cursor:default; }
.hint-panel { margin:15px 0; background:#fff6df; color:#65471b; padding:16px; border-radius:13px; border:1px solid #f3dea3; }
.feedback { border-radius:15px; padding:18px; margin:18px 0; border:1px solid #b3e4d3; background:#e9f9f4; }
.feedback.needs-work { background:#fff5e8; border-color:#f0dcaa; }
.feedback h3 { margin:0 0 7px; }
.feedback p { margin:0; color:#40545e; }
.spark { display:inline-block; background:#ffdb7a; color:#684400; border-radius:50%; padding:1px 8px; margin-right:5px; }
.task-progress { border:1px solid var(--line); border-radius:16px; background:#fff; padding:18px; margin:16px 0; }
.task-progress .progress-track { margin-top:11px; }
.builder-group { border:1px solid var(--line); border-radius:18px; background:#fff; margin:14px 0; overflow:hidden; }
.builder-group summary { cursor:pointer; list-style:none; display:flex; gap:13px; padding:20px 21px; align-items:center; }
.builder-group summary::-webkit-details-marker { display:none; }
.builder-group summary:after { content:"+"; font-size:25px; color:var(--teal); margin-left:auto; line-height:1; }
.builder-group[open] summary:after { content:"−"; }
.builder-count { background:#eff7f5; color:#0a7468; padding:7px 9px; border-radius:10px; font-size:11px; font-weight:900; flex-shrink:0; }
.builder-group summary strong { display:block; }
.builder-group summary small { display:block; font-size:12px; color:var(--muted); margin-top:3px; }
.builder-body { padding:0 21px 22px; }
.builder-row { background:#f9fbfd; border:1px solid #e7edf3; border-radius:15px; padding:18px; margin:15px 0; }
.builder-row h4 { margin:0 0 4px; font-size:15px; }
.builder-row >p { font-size:13px; margin:0 0 15px; }
.entry-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.entry-grid .span2 { grid-column:1/-1; }
.entry { display:block; }
.entry >span { display:block; font-size:12px; font-weight:850; margin-bottom:5px; color:#31415c; }
.entry input,.entry textarea { width:100%; min-width:0; border:1px solid #cbd5e1; border-radius:11px; padding:12px; background:white; outline:none; color:var(--ink); }
.entry textarea { min-height:94px; resize:vertical; }
.entry input:focus,.entry textarea:focus { border-color:var(--teal); box-shadow:0 0 0 3px #d3efe9; }
.entry input::placeholder,.entry textarea::placeholder { color:#9aa6b5; }
.example-toggle { border:0; background:transparent; padding:9px 0 0; color:var(--teal); font-size:12px; font-weight:850; text-align:left; }
.example-reveal { background:#ecf8f5; border:1px solid #c9eae1; border-radius:12px; padding:12px 14px; margin-top:8px; color:#315f59; font-size:13px; }
.example-reveal strong { color:#0a7066; }
.note-sm { font-size:12px; color:#6a7788; }
.not-ready { background:#fff5e8; border-radius:12px; padding:13px 16px; color:#795222; border:1px solid #efddbc; margin:14px 0; font-size:13px; }
.print-tools { display:flex; gap:12px; flex-wrap:wrap; margin:20px 0; }
.preview-shell { padding:24px; background:#dde4ed; border-radius:19px; overflow:auto; margin-top:22px; }
.print-document { font-family:Arial,Helvetica,sans-serif; max-width:800px; margin:0 auto; padding:44px 45px; background:#fff; color:#14233a; line-height:1.45; font-size:13px; box-shadow:0 7px 25px #aab6c5; }
.print-document h1 { font-size:26px; margin:0 0 9px; }
.print-document h2 { margin:28px 0 10px; font-size:19px; padding-bottom:6px; border-bottom:2px solid #dfe7ed; }
.print-document h3 { font-size:14px; margin:18px 0 5px; }
.print-document p { color:#14233a; margin:5px 0; }
.print-document .print-label { font-weight:800; color:#2e476a; }
.print-document .print-answer { margin:5px 0 9px 12px; overflow-wrap:anywhere; }
.print-document .print-q { break-inside:avoid; border-left:3px solid #d8e5e2; padding:5px 0 5px 12px; margin:10px 0; }
.print-document .print-details { border-bottom:1px solid #e4ebef; margin-bottom:17px; padding-bottom:12px; }
.print-document .print-blank { color:#8b919a; font-style:italic; }
.print-document .print-cover { border-top:7px solid var(--navy); padding-top:18px; }
.print-document .print-foot { border-top:1px solid #dde5ed; margin-top:26px; padding-top:11px; font-size:11px; color:#6e7990; }
.muted { color:var(--muted); }
.toast { position:fixed; bottom:22px; left:50%; transform:translateX(-50%); background:#142044; border-radius:14px; color:white; padding:13px 21px; box-shadow:0 11px 29px #1a285555; z-index:10; opacity:0; pointer-events:none; transition:opacity .2s; font-size:14px; max-width:calc(100vw - 24px); }
.toast.show { opacity:1; }
.site-footer { border-top:1px solid var(--line); background:white; padding:15px 6vw; color:var(--muted); font-size:12px; display:flex; gap:20px; flex-wrap:wrap; justify-content:space-between; }
#printRoot { display:none; }
.calm * { animation:none!important; transition:none!important; scroll-behavior:auto!important; }
.calm .hero:before { display:none; }
@media (min-width:1250px) { .workspace { max-width:1160px; width:100%; justify-self:center; } }
@media (max-width:1000px) { .app-layout { grid-template-columns:215px minmax(0,1fr); } .sidebar { padding:26px 12px; } .workspace { padding:22px; } .feature-row { grid-template-columns:repeat(2,minmax(0,1fr)); } .explain-paths { grid-template-columns:1fr; } }
@media (max-width:710px) { .app-layout { grid-template-columns:1fr; } .sidebar { padding:15px 14px; border-right:0; border-bottom:1px solid var(--line); } .sidebar-head,.sidebar-bottom,.side-progress,.nav-caption { display:none; } #topicNav { display:flex; gap:6px; overflow-x:auto; padding-bottom:2px; scrollbar-width:thin; } .topic-link { min-width:142px; padding:7px; gap:7px; } .topic-index { width:34px; height:34px; font-size:11px; } .topic-link span.topic-label { font-size:11px; } .workspace { padding:18px 15px 45px; } .topbar { padding:12px 15px; } .saved { display:none; } .top-button { padding:8px; font-size:11px; } .hero { grid-template-columns:1fr; } .hero .hero-visual { display:none; } .lesson-grid,.entry-grid,.feature-row { grid-template-columns:1fr; } .entry-grid .span2 { grid-column:1; } .preview-shell { padding:10px; } .print-document { padding:24px 20px; } .intro-strip { margin-bottom:9px; } .decimal-lab { padding:17px; } .decimal-number { padding:17px 4px; } }
@media (prefers-reduced-motion:reduce) { *,*:before,*:after { animation:none!important; transition:none!important; scroll-behavior:auto!important; } }
@page { size:letter; margin:16mm; }
@media print { body { background:white!important; color:#000!important; } #learningApp,.toast { display:none!important; } #printRoot { display:block!important; } #printRoot .print-document { font-size:10pt; max-width:none; margin:0; padding:0; box-shadow:none; } #printRoot .print-document h1 { font-size:20pt; } #printRoot .print-document h2 { font-size:14pt; break-after:avoid; margin-top:16pt; } #printRoot .print-q { break-inside:avoid-page; } #printRoot .print-cover { border-top:5px solid #142044; } #printRoot .print-document h3 { break-after:avoid; } }
