/* AMVix Learn · Design v3.0 (locked) — see DESIGN.md. Two modes: parent/public (calm) and student (visual). */
/* AMVix Learn · Design v3.0 prototype — two modes: parent/public (calm) and student (visual, energetic) */
:root{
  --navy:#16205B; --ink:#121A45; --muted:#56608A; --line:#E1E6F3; --paper:#F5F7FC; --card:#fff;
  --amber:#FFB21E; --amber-ink:#8A5200; --right:#0E9A6A; --right-soft:#E4F6EE; --coral:#E0584B; --coral-soft:#FDEDEB;
  --t-space:#2F6BEB; --t-space-soft:#EAF1FF; --t-space-ink:#1C4BB5;
  --t-numbers:#7B4DDB; --t-fractions:#F0645A; --t-money:#1E9E62; --t-measure:#F28A1E; --t-time:#12A5A5; --t-coord:#4B4FD9; --t-data:#E0529A;
  --topic:var(--t-space); --topic-soft:var(--t-space-soft); --topic-ink:var(--t-space-ink);
  --r-lg:24px; --r:18px; --r-sm:12px;
  --shadow:0 1px 0 rgba(18,26,69,.05),0 12px 28px -18px rgba(18,26,69,.28);
  --f-head:"Bricolage Grotesque","Trebuchet MS",system-ui,sans-serif;
  --f-body:"Lexend",system-ui,-apple-system,"Segoe UI",sans-serif;
}
*,*::before,*::after{box-sizing:border-box}
[hidden]{display:none!important}
html{-webkit-text-size-adjust:100%}
body{margin:0;font:400 17px/1.55 var(--f-body);color:var(--ink);background:var(--paper);
  background-image:linear-gradient(rgba(22,32,91,.035) 1px,transparent 1px),linear-gradient(90deg,rgba(22,32,91,.035) 1px,transparent 1px);background-size:26px 26px}
h1,h2,h3{margin:0 0 .4em;line-height:1.15}
p{margin:0 0 .6em}
button{font:inherit;color:inherit}
:focus-visible{outline:3px solid var(--amber);outline-offset:3px;border-radius:10px}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
.ic{display:inline-block;vertical-align:middle;flex:0 0 auto}

/* (prototype chrome removed) */
.toast{position:fixed;left:50%;top:70px;transform:translateX(-50%);background:var(--ink);color:#fff;padding:10px 18px;border-radius:14px;font-weight:600;font-size:.9rem;z-index:90;box-shadow:0 10px 24px -10px rgba(0,0,0,.5)}

/* Buttons */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:52px;padding:12px 24px;border:0;border-radius:16px;font:700 1.02rem var(--f-body);text-decoration:none;cursor:pointer;text-align:center;background:var(--amber);color:var(--ink);box-shadow:0 4px 0 var(--amber-ink);transition:transform .08s,box-shadow .08s}
.btn:active{transform:translateY(3px);box-shadow:0 1px 0 var(--amber-ink)}
.btn:disabled{background:#DCE1EF;color:#8790B3;box-shadow:0 4px 0 #C3CADF;cursor:not-allowed}
.btn.topic{background:var(--topic);color:#fff;box-shadow:0 4px 0 var(--topic-ink)}
.btn.ok{background:var(--right);color:#fff;box-shadow:0 4px 0 #086246}
.btn.ghost{background:#fff;color:var(--ink);box-shadow:inset 0 0 0 2px var(--line),0 3px 0 var(--line)}
.btn.navy{background:var(--navy);color:#fff;box-shadow:0 4px 0 #0A1040}
.btn.wide{width:100%}
.link{color:var(--ink);font-weight:600;text-underline-offset:4px}

/* ========== PARENT / PUBLIC MODE ========== */
.pub-top{display:flex;align-items:center;justify-content:space-between;padding:14px clamp(16px,4vw,48px);background:#fff;border-bottom:1px solid var(--line)}
.brand{display:flex;align-items:center;gap:10px;text-decoration:none;color:var(--ink)}
.brand-mark{width:34px;height:34px;border-radius:10px;background:var(--navy);display:grid;place-items:center}
.brand b{font:800 1.05rem var(--f-head)} .brand small{display:block;font-size:.72rem;color:var(--muted)}
.pub-top nav{display:flex;gap:16px;align-items:center}
.pub-top nav a{color:var(--ink);text-decoration:none;font-weight:600;font-size:.95rem}
.lang{display:inline-flex;border-radius:999px;background:var(--paper);padding:3px;box-shadow:inset 0 0 0 1px var(--line)}
.lang button{border:0;background:none;padding:5px 12px;border-radius:999px;font-size:.8rem;font-weight:600;cursor:pointer;color:var(--muted)}
.lang button[aria-pressed="true"]{background:var(--navy);color:#fff}
.pub{max-width:1120px;margin:0 auto;padding:0 clamp(16px,4vw,40px)}
.pub section{padding:clamp(24px,3.5vw,40px) 0}
.pub section.hero{padding-top:clamp(32px,5vw,56px)}
.stages,.topic-strip{margin-top:20px}
.pub h2{font:800 clamp(1.6rem,3.2vw,2.2rem)/1.1 var(--f-head);letter-spacing:-.015em;max-width:24ch}
.lede{color:var(--muted);font-size:1.08rem;max-width:60ch}
.hero{display:grid;grid-template-columns:1.05fr .95fr;gap:clamp(24px,5vw,64px);align-items:center}
.hero h1{font:800 clamp(2.4rem,5.4vw,4rem)/1.02 var(--f-head);letter-spacing:-.03em;max-width:14ch;margin-bottom:18px}
.hero .lede{font-size:1.15rem}
.hero-cta{display:flex;gap:18px;align-items:center;flex-wrap:wrap;margin:26px 0 10px}
.fine{font-size:.88rem;color:var(--muted)}
.hero-card{background:#fff;border-radius:28px;padding:22px;box-shadow:var(--shadow),0 0 0 1px var(--line);position:relative}
.hero-card .mini-q{font:700 1.05rem var(--f-body);margin:0 0 8px}
.hero-card .dg-box{height:220px}
.hc-bubble{display:flex;gap:10px;align-items:flex-start;margin-top:12px;background:var(--coral-soft);border-radius:16px;padding:12px 14px}
.hc-bubble p{margin:0;font-size:.95rem}
.hc-steps{display:flex;gap:8px;margin-top:10px;flex-wrap:wrap}
.hc-steps span{font-size:.82rem;font-weight:600;padding:6px 10px;border-radius:10px;background:var(--paper);box-shadow:inset 0 0 0 1px var(--line)}
.hc-steps span.done{background:var(--right-soft);color:#075B3F;box-shadow:none}
.stages{list-style:none;padding:0;margin:32px 0 0;display:grid;grid-template-columns:repeat(5,1fr);gap:14px}
.stages li{background:#fff;border-radius:var(--r);padding:18px;box-shadow:0 0 0 1px var(--line)}
.stages .s-ic{width:46px;height:46px;border-radius:14px;display:grid;place-items:center;margin-bottom:10px;background:var(--topic-soft);color:var(--topic-ink)}
.stages li:nth-child(3) .s-ic{background:var(--coral-soft);color:var(--coral)}
.stages li:nth-child(4) .s-ic{background:#FFF3D6;color:var(--amber-ink)}
.stages li:nth-child(5) .s-ic{background:var(--right-soft);color:var(--right)}
.stages b{font:800 1.12rem var(--f-head);display:block} .stages p{color:var(--muted);font-size:.9rem;margin:6px 0 0}
.split{display:grid;grid-template-columns:1fr 1fr;gap:clamp(24px,5vw,56px);align-items:center}
.ticks{list-style:none;padding:0;margin:18px 0 0;display:grid;gap:10px}
.ticks li{padding-left:32px;position:relative}
.ticks li::before{content:"";position:absolute;left:0;top:3px;width:22px;height:22px;border-radius:7px;background:var(--right) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12l4 4 8-8' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") center/16px no-repeat}
.topic-strip{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-top:26px}
.topic-strip div{background:#fff;border-radius:16px;padding:14px;box-shadow:0 0 0 1px var(--line);border-top:5px solid var(--c);font-weight:600;font-size:.95rem}
.topic-strip small{display:block;color:var(--muted);font-weight:500;font-size:.8rem;margin-top:2px}
.topic-strip .live{box-shadow:0 0 0 2px var(--c)} .topic-strip .live small{color:var(--c);font-weight:700}
.faq details{background:#fff;border-radius:16px;margin-top:10px;box-shadow:0 0 0 1px var(--line)}
.faq summary{cursor:pointer;font-weight:700;padding:16px 20px;list-style:none;display:flex;justify-content:space-between}
.faq summary::-webkit-details-marker{display:none}
.faq summary::after{content:"+";font:800 1.3rem var(--f-head);color:var(--amber-ink)}
.faq details[open] summary::after{content:"−"}
.faq details p{padding:0 20px 18px;margin:0;color:var(--muted)}
.final{background:var(--navy);color:#fff;border-radius:32px;padding:clamp(30px,5vw,60px);text-align:center;margin-bottom:60px}
.final h2{margin:0 auto 10px;color:#fff} .final p{color:#C9D0EE;max-width:52ch;margin:0 auto 22px}
.pub-foot{text-align:center;color:var(--muted);font-size:.82rem;padding:20px 16px 40px}

/* ========== STUDENT MODE ========== */
.stu{max-width:760px;margin:0 auto;padding:16px clamp(14px,3vw,24px) 40px}
.stu-top{display:flex;align-items:center;gap:12px;padding:10px 0 16px}
.stu-top .mark{width:36px;height:36px;border-radius:11px;background:var(--navy);display:grid;place-items:center;flex:0 0 auto}
.chips{display:flex;gap:8px;margin-left:auto;flex-wrap:wrap;justify-content:flex-end}
.chip{display:inline-flex;align-items:center;gap:6px;background:#fff;border-radius:999px;padding:6px 12px;font-weight:700;font-size:.88rem;box-shadow:0 0 0 1px var(--line)}
.stu-hello{display:flex;align-items:center;gap:14px;margin:6px 0 18px}
.stu-hello h1{font:700 1.7rem/1.1 var(--f-body);letter-spacing:-.01em;margin:0}
.stu-hello p{margin:2px 0 0;color:var(--muted)}
.avatar{width:58px;height:58px;border-radius:18px;flex:0 0 auto}
.level{background:#fff;border-radius:var(--r);padding:12px 16px;box-shadow:0 0 0 1px var(--line);margin-bottom:16px}
.level-top{display:flex;justify-content:space-between;font-size:.9rem;font-weight:600} .level-top small{color:var(--muted);font-weight:500}
.xpbar{height:10px;border-radius:999px;background:#E7EBF6;margin-top:8px;overflow:hidden}
.xpbar span{display:block;height:100%;border-radius:999px;background:var(--amber)}
.continue{display:grid;grid-template-columns:130px 1fr;gap:18px;align-items:center;background:var(--topic);color:#fff;border-radius:var(--r-lg);padding:18px;box-shadow:0 6px 0 var(--topic-ink);text-decoration:none}
.continue .pic{background:rgba(255,255,255,.95);border-radius:18px;height:120px;display:grid;place-items:center}
.continue small{font-weight:600;opacity:.85} .continue h2{font:700 1.35rem/1.2 var(--f-body);margin:4px 0 10px;color:#fff}
.pbar{height:12px;border-radius:999px;background:rgba(255,255,255,.28);overflow:hidden}
.pbar span{display:block;height:100%;background:#fff;border-radius:999px}
.continue .row{display:flex;align-items:center;gap:12px;margin-top:12px}
.continue .row b{font-size:.9rem}
.continue .go{margin-left:auto;background:#fff;color:var(--topic-ink);border-radius:14px;padding:10px 18px;font-weight:700;box-shadow:0 3px 0 rgba(0,0,0,.18)}
.block{background:#fff;border-radius:var(--r-lg);padding:18px;box-shadow:0 0 0 1px var(--line);margin-top:16px}
.block h3{font:700 1.08rem var(--f-body);margin:0 0 10px;display:flex;justify-content:space-between;align-items:baseline}
.block h3 small{color:var(--muted);font-weight:500;font-size:.85rem}
.mission{display:flex;align-items:center;gap:12px;padding:10px 0;border-top:1px solid var(--line)}
.mission:first-of-type{border-top:0}
.m-ic{width:40px;height:40px;border-radius:12px;display:grid;place-items:center;flex:0 0 auto}
.mission b{font-weight:600;display:block} .mission small{color:var(--muted)}
.mission .tick{margin-left:auto;width:26px;height:26px;border-radius:8px;box-shadow:inset 0 0 0 2px var(--line);flex:0 0 auto}
.mission.done .tick{background:var(--right) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12l4 4 8-8' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") center/18px no-repeat;box-shadow:none}
.mission.done b{color:var(--muted);text-decoration:line-through}
.topics{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}
.topic{border-radius:18px;padding:12px;background:#fff;box-shadow:inset 0 0 0 2px var(--line);font-weight:600;font-size:.9rem;display:flex;flex-direction:column;gap:8px;min-height:110px}
.topic .t-dot{width:34px;height:34px;border-radius:11px;background:var(--c);display:grid;place-items:center}
.topic small{color:var(--muted);font-weight:500;font-size:.78rem;margin-top:auto}
.topic.live{box-shadow:inset 0 0 0 3px var(--c)} .topic.live small{color:var(--c);font-weight:700}
.topic.soon{opacity:.55}
.two{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.two .block{margin-top:16px}
.big-num{font:800 2rem var(--f-head);display:block}

/* Lesson */
.lesson-bar{display:flex;align-items:center;gap:10px;padding:8px 0 12px}
.x-btn{width:44px;height:44px;border-radius:14px;border:0;background:#fff;box-shadow:inset 0 0 0 2px var(--line);display:grid;place-items:center;cursor:pointer;flex:0 0 auto}
.track{flex:1;display:flex;align-items:center;gap:0}
.tr-step{display:flex;align-items:center;gap:6px;font-size:.8rem;font-weight:700;color:#98A0C2;white-space:nowrap}
.tr-dot{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:#fff;box-shadow:inset 0 0 0 2px var(--line);color:#98A0C2}
.tr-line{flex:1;height:3px;background:var(--line);margin:0 6px;min-width:10px;border-radius:3px}
.tr-step.now{color:var(--topic-ink)} .tr-step.now .tr-dot{background:var(--topic);color:#fff;box-shadow:0 0 0 5px var(--topic-soft)}
.tr-step.fix.now .tr-dot{background:var(--coral);box-shadow:0 0 0 5px var(--coral-soft)} .tr-step.fix.now{color:var(--coral)}
.tr-step.done{color:var(--right)} .tr-step.done .tr-dot{background:var(--right-soft);color:var(--right);box-shadow:none}
.tr-line.done{background:var(--right)}
.tr-label{display:inline}
.lcard{background:#fff;border-radius:var(--r-lg);box-shadow:var(--shadow),0 0 0 1px var(--line);overflow:hidden}
.l-instr{padding:16px 20px 6px;min-height:84px}
.l-kicker{display:flex;align-items:center;gap:8px;font-size:.82rem;font-weight:700;color:var(--topic-ink);margin-bottom:4px}
.l-kicker .pips{display:flex;gap:4px;margin-left:auto}
.pip{width:22px;height:6px;border-radius:6px;background:var(--line)} .pip.on{background:var(--topic)} .pip.now{background:var(--amber)}
.l-instr h2{font:700 1.3rem/1.25 var(--f-body);margin:0}
.l-instr .bm{color:var(--muted);font-style:italic;font-size:.88rem;margin:2px 0 0}
.l-visual{margin:0 14px;background:var(--topic-soft);border-radius:20px;min-height:min(46vh,380px);display:grid;place-items:center;padding:12px;position:relative}
.l-visual svg.dg{width:100%;height:min(42vh,340px);max-height:none}
.l-visual .dg-pair{width:100%}
.l-visual .dg-pair-item svg.dg{height:min(30vh,240px)}
.l-answer{padding:14px 20px 20px}
.l-note{font-size:.98rem;margin:0 0 12px}
.opts{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:12px}
.opts.two-col{grid-template-columns:1fr 1fr}
.opt{min-height:58px;border:0;border-radius:16px;background:#fff;cursor:pointer;font:700 1.15rem var(--f-body);box-shadow:inset 0 0 0 2px var(--line),0 4px 0 var(--line);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:8px}
.opt.pic svg.dg{width:100%;height:90px}
.opt[aria-pressed="true"]{background:var(--topic-soft);box-shadow:inset 0 0 0 3px var(--topic),0 4px 0 var(--topic)}
.opt.good{background:var(--right-soft);box-shadow:inset 0 0 0 3px var(--right),0 4px 0 var(--right)}
.opt.bad{animation:shake .35s}
.opt:disabled{cursor:default}
.fb{border-radius:18px;padding:14px 16px;margin-top:4px;animation:rise .22s ease-out}
.fb.ok{background:var(--right-soft)} .fb.no{background:var(--coral-soft)}
.fb b{display:block;font-weight:700;font-size:1.05rem} .fb.ok b{color:#075B3F} .fb.no b{color:#A33126}
.fb p{margin:4px 0 0;font-size:.95rem}
.xp{display:inline-block;background:var(--amber);color:var(--ink);font-weight:800;font-size:.8rem;padding:3px 9px;border-radius:999px;margin-left:6px;vertical-align:middle}
.row-btns{display:flex;gap:10px;margin-top:12px}
.row-btns .btn{flex:1}
.streak{display:flex;align-items:center;gap:6px;margin-left:auto}
.sd{width:14px;height:14px;border-radius:50%;box-shadow:inset 0 0 0 2px var(--line)} .sd.on{background:var(--right);box-shadow:none}
.readout{position:absolute;top:14px;right:16px;background:#fff;border-radius:14px;padding:6px 14px;font:800 1.6rem var(--f-head);color:var(--topic-ink);box-shadow:0 0 0 1px var(--line)}
.readout.hit{background:var(--right);color:#fff}
.drag-hint{position:absolute;bottom:12px;left:0;right:0;text-align:center;font-size:.85rem;font-weight:600;color:var(--topic-ink)}
.drag-svg{width:100%;height:min(42vh,340px);touch-action:none;cursor:grab}
.drag-svg .handle{cursor:grab}
.range-fallback{width:100%;accent-color:var(--topic);margin-top:6px}

/* Vix */
.vix{display:flex;gap:10px;align-items:flex-end;margin:10px 0 0}
.vix-body{width:52px;height:52px;flex:0 0 auto}
.vix-say{background:#fff;border-radius:16px 16px 16px 4px;padding:10px 14px;font-size:.95rem;font-weight:500;box-shadow:0 0 0 1px var(--line);position:relative}
.vix.warm .vix-say{background:#FFF6DE;box-shadow:none}

/* Diagnosis (signature) */
.diag-head{display:flex;align-items:center;gap:12px;padding:16px 20px 4px}
.diag-lens{width:46px;height:46px;border-radius:14px;background:var(--coral-soft);display:grid;place-items:center;color:var(--coral);flex:0 0 auto}
.diag-head h2{font:700 1.3rem/1.2 var(--f-body);margin:0}
.diag-head p{margin:2px 0 0;color:var(--muted);font-size:.92rem}
.diag-steps{padding:6px 20px 20px;display:grid;gap:12px}
.dstep{border-radius:18px;padding:14px;box-shadow:inset 0 0 0 2px var(--line);animation:rise .22s ease-out}
.dstep.ok{box-shadow:inset 0 0 0 2px var(--right);background:#FAFEFC}
.dstep-q{display:flex;gap:10px;align-items:center;font-weight:700;margin-bottom:10px}
.dstep-n{width:28px;height:28px;border-radius:9px;background:var(--navy);color:#fff;display:grid;place-items:center;font-size:.85rem;flex:0 0 auto}
.dstep.ok .dstep-n{background:var(--right)}
.tiles{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.tile{border:0;border-radius:16px;background:#fff;padding:10px 8px;cursor:pointer;box-shadow:inset 0 0 0 2px var(--line),0 3px 0 var(--line);display:flex;flex-direction:column;align-items:center;gap:6px;font-weight:600;font-size:.9rem}
.tile svg.dg{width:100%;height:70px}
.tile .sw{width:100%;height:8px;border-radius:6px;background:var(--c)}
.tile.good{background:var(--right-soft);box-shadow:inset 0 0 0 3px var(--right)}
.tile.bad{animation:shake .35s;box-shadow:inset 0 0 0 2px var(--coral)}
.tile:disabled:not(.good){opacity:.45;cursor:default}
.dstep-ok{display:flex;gap:8px;align-items:center;margin-top:10px;color:#075B3F;font-weight:600}
.dstep-try{margin-top:10px;color:#A33126;font-weight:600}
.compare{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:10px}
.compare figure{margin:0;background:var(--paper);border-radius:14px;padding:6px;text-align:center;font-size:.85rem;font-weight:700}
.compare svg.dg{width:100%;height:90px}
.countup{display:grid;gap:8px;margin-top:6px}
.jump{display:flex;align-items:center;gap:10px;font-weight:600}
.jump .j{min-width:120px;background:var(--paper);border-radius:10px;padding:6px 10px;font-size:.92rem}
.jump .jopts{display:flex;gap:6px}
.jump .jopts button{min-width:52px;min-height:44px;border:0;border-radius:12px;background:#fff;box-shadow:inset 0 0 0 2px var(--line);font-weight:700;cursor:pointer}
.jump .jopts button.good{background:var(--right);color:#fff;box-shadow:none}
.jump .jopts button.bad{animation:shake .35s;box-shadow:inset 0 0 0 2px var(--coral)}

/* Mastery */
.master{text-align:center;padding:28px 20px 24px}
.medal{width:120px;height:120px;margin:0 auto 10px}
.master h1{font:800 2rem var(--f-head);margin:0 0 4px}
.master .sub{color:var(--muted)}
.stars{display:inline-flex;gap:8px;margin:10px 0}
.stars svg{animation:pop .45s both} .stars svg:nth-child(2){animation-delay:.12s} .stars svg:nth-child(3){animation-delay:.24s}
.earn{display:grid;gap:8px;margin:14px auto 0;max-width:420px;text-align:left}
.earn div{display:flex;align-items:center;gap:10px;background:var(--paper);border-radius:14px;padding:10px 14px;font-weight:600}
.earn div b{margin-left:auto;color:var(--amber-ink)}
.earn .fixed{background:#FFF6DE}
.next-card{display:flex;align-items:center;gap:14px;text-align:left;background:var(--topic-soft);border-radius:18px;padding:14px;margin:18px auto 0;max-width:420px}
.next-card small{color:var(--topic-ink);font-weight:700} .next-card b{display:block}
.memo{font-size:.9rem;color:var(--muted);margin-top:14px;display:flex;gap:8px;align-items:center;justify-content:center}

/* Parent dashboard */
.par{max-width:1040px;margin:0 auto;padding:22px clamp(16px,4vw,40px) 60px}
.par-head{display:flex;align-items:center;gap:16px;margin-bottom:20px;flex-wrap:wrap}
.par-head h1{font:800 1.9rem var(--f-head);margin:0}
.par-head p{margin:0;color:var(--muted)}
.kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}
.kpi{background:#fff;border-radius:var(--r);padding:16px;box-shadow:0 0 0 1px var(--line)}
.kpi small{color:var(--muted);font-weight:600;font-size:.82rem} .kpi b{display:block;font:800 1.7rem var(--f-head);margin-top:2px}
.kpi span{font-size:.82rem;color:var(--muted)}
.focus{display:grid;grid-template-columns:1.35fr 1fr;gap:16px;margin-top:16px}
.panel{background:#fff;border-radius:var(--r-lg);padding:20px;box-shadow:0 0 0 1px var(--line)}
.panel h2{font:800 1.2rem var(--f-head);margin:0 0 12px}
.insight{border-radius:18px;padding:16px;background:var(--paper)}
.insight-top{display:flex;align-items:center;gap:10px;margin-bottom:12px;flex-wrap:wrap}
.code{display:inline-grid;place-items:center;min-width:44px;padding:3px 9px;border-radius:9px;background:var(--navy);color:#fff;font-weight:700;font-size:.8rem}
.stage-pill{font-size:.8rem;font-weight:700;padding:3px 10px;border-radius:999px;background:#FFF1D6;color:#7A4B00}
.stage-pill.m{background:var(--right-soft);color:#075B3F}
.ins-row{display:grid;grid-template-columns:28px 1fr;gap:10px;padding:10px 0;border-top:1px solid var(--line)}
.ins-row:first-of-type{border-top:0}
.ins-row small{display:block;color:var(--muted);font-weight:600;font-size:.8rem}
.ins-row p{margin:2px 0 0}
.ins-ic{width:28px;height:28px;border-radius:9px;display:grid;place-items:center}
.skill-list{display:grid;gap:8px}
.skill-row{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:14px;box-shadow:inset 0 0 0 1px var(--line);font-size:.93rem}
.skill-row .stage-pill{margin-left:auto}
.memory{display:flex;align-items:center;gap:10px;padding:10px 0;border-top:1px solid var(--line);font-size:.93rem}
.memory:first-of-type{border-top:0} .memory small{margin-left:auto;color:var(--muted)}
.ring{flex:0 0 auto}

/* Diagrams inherit topic colour */
svg.dg{overflow:visible;font-family:var(--f-body)}
.dg-arm{stroke:var(--topic);stroke-width:5;stroke-linecap:round} .dg-arm.moving{stroke:var(--navy)} .dg-arm.hl{stroke:var(--amber);stroke-width:7}
.dg-vertex{fill:var(--navy)} .dg-vertex.hl{fill:var(--amber);stroke:var(--navy);stroke-width:3}
.dg-arc{fill:rgba(255,178,30,.38);stroke:var(--amber);stroke-width:2.5}
.dg-arc.b{fill:rgba(47,107,235,.18);stroke:var(--topic)} .dg-arc.c{fill:rgba(14,154,106,.2);stroke:var(--right)} .dg-arc.x{fill:rgba(224,88,75,.22);stroke:var(--coral)}
.dg-square{stroke:var(--navy);stroke-width:2.5}
.dg-label,.dg-angle-label{font-size:17px;font-weight:700;fill:var(--ink);paint-order:stroke;stroke:#fff;stroke-width:5px;stroke-linejoin:round}
.dg-angle-label.x{fill:var(--coral)}
.dg-readout{font:800 22px var(--f-head);fill:var(--navy)}
.dg-ghost{fill:none;stroke:#C9D6F5;stroke-width:2;stroke-dasharray:4 6}
.dg-face{fill:#fff;stroke:var(--navy);stroke-width:4} .dg-tick{stroke:var(--navy);stroke-width:2.5;stroke-linecap:round}
.dg-clock-num{font:700 17px var(--f-body);fill:var(--navy)}
.dg-hand{stroke:var(--navy);stroke-width:6;stroke-linecap:round} .dg-hand.start{stroke:#A8B1D1;stroke-dasharray:3 8;stroke-width:5}
.dg-arrowhead{fill:none;stroke:var(--amber-ink);stroke-width:3.5;stroke-linecap:round;stroke-linejoin:round}
.dg-bar{fill:#fff;stroke:var(--navy);stroke-width:2.5} .dg-bar-part{fill:var(--topic-soft);stroke:var(--topic);stroke-width:2.5}
.dg-bar-gap{fill:rgba(255,178,30,.18);stroke:var(--amber-ink);stroke-width:2.5;stroke-dasharray:6 5}
.dg-bar-text{font:800 18px var(--f-head);fill:var(--navy)} .dg-bar-text.x{fill:var(--amber-ink)}
.dg-brace{fill:none;stroke:var(--navy);stroke-width:2}
.dg-pair{display:grid;grid-template-columns:1fr 1fr;gap:10px} .dg-pair-item{margin:0;text-align:center} .dg-pair-item figcaption{font-weight:700;font-size:.9rem}
.replay{margin-top:6px;border:0;background:#fff;border-radius:12px;padding:8px 14px;font-weight:700;box-shadow:inset 0 0 0 2px var(--line);cursor:pointer}

@keyframes rise{from{transform:translateY(8px);opacity:0}to{transform:none;opacity:1}}
@keyframes shake{20%,60%{transform:translateX(-5px)}40%,80%{transform:translateX(5px)}}
@keyframes pop{from{transform:scale(0)}70%{transform:scale(1.25)}to{transform:scale(1)}}

@media (max-width:860px){
  .hero,.split,.focus{grid-template-columns:1fr}
  .stages{grid-template-columns:1fr 1fr} .stages li:last-child{grid-column:span 2}
  .topic-strip,.kpis{grid-template-columns:1fr 1fr}
  .pub-top nav a.hide-sm{display:none}
}
@media (max-width:560px){
  .topics{grid-template-columns:1fr 1fr} .two{grid-template-columns:1fr}
  .continue{grid-template-columns:1fr} .continue .pic{height:110px}
  .tr-label{display:none} .tr-step.now .tr-label{display:inline}
  .opts{gap:8px} .tiles{grid-template-columns:1fr}
  .tile{flex-direction:row;justify-content:flex-start;text-align:left} .tile svg.dg{width:90px;height:56px}
  .l-visual{min-height:40vh}
}
@media (prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}
.continue .pic svg.dg{width:100%;height:100%;max-height:104px}
.hero-card .dg-box svg.dg{width:100%;height:100%}
.next-card svg.dg{width:100%;height:56px}
.topic-strip,.topics{align-items:stretch}
/* Stuck / auto path */
.scen{background:#0B1033;color:#fff;border-radius:18px;padding:12px 14px;margin-bottom:14px}
.scen b{font-size:.82rem;opacity:.8;font-weight:600}
.scen-btns{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.scen-btns button{border:0;border-radius:999px;padding:7px 12px;font-size:.82rem;font-weight:600;cursor:pointer;background:rgba(255,255,255,.12);color:#fff}
.scen-btns button[aria-pressed="true"]{background:var(--amber);color:var(--ink)}
.rounds{display:flex;gap:8px;padding:0 20px 8px}
.round{flex:1;border-radius:14px;padding:10px;background:var(--coral-soft);font-size:.85rem}
.round b{display:block;color:#A33126;font-size:.8rem}
.path-card{margin:6px 20px 20px;border-radius:22px;padding:18px;background:var(--topic-soft);box-shadow:inset 0 0 0 2px var(--topic)}
.path-card h3{font:700 1.25rem var(--f-body);margin:6px 0 4px}
.path-kind{display:inline-flex;align-items:center;gap:6px;font-size:.8rem;font-weight:700;padding:4px 10px;border-radius:999px;background:#fff;color:var(--topic-ink)}
.path-card .pic{height:150px;margin:10px 0;background:#fff;border-radius:16px;display:grid;place-items:center;padding:6px}
.path-card .pic svg.dg{width:100%;height:140px}
.why-box{margin-top:10px;font-size:.88rem;color:var(--muted);background:#fff;border-radius:14px;padding:10px 12px}
.why-box b{color:var(--ink)}
.brk{display:block;text-align:center;margin-top:12px;font-weight:600;color:var(--muted);background:none;border:0;cursor:pointer;text-decoration:underline;text-underline-offset:4px;width:100%}
.log-note{margin:0 20px 18px;font-size:.85rem;color:var(--muted);display:flex;gap:8px;align-items:flex-start}

/* Redo */
.topic-head{display:flex;align-items:center;gap:14px;background:#fff;border-radius:var(--r-lg);padding:16px 18px;box-shadow:0 0 0 1px var(--line);border-left:6px solid var(--topic)}
.topic-head small{color:var(--topic-ink);font-weight:700} .topic-head h1{font:700 1.5rem var(--f-body);margin:0} .topic-head p{margin:0;color:var(--muted);font-size:.9rem}
.topic-head .btn{margin-left:auto}
.redo-list{display:grid;gap:8px;margin-top:14px}
.skill-btn{display:flex;align-items:center;gap:12px;width:100%;border:0;background:#fff;border-radius:18px;padding:12px 14px;box-shadow:inset 0 0 0 2px var(--line),0 3px 0 var(--line);cursor:pointer;text-align:left}
.skill-btn .sk-code{width:46px;height:46px;border-radius:50%;display:grid;place-items:center;font-weight:800;font-size:.85rem;background:var(--right);color:#fff;flex:0 0 auto}
.skill-btn.cur .sk-code{background:var(--amber);color:var(--ink)}
.skill-btn.locked{opacity:.5;cursor:default} .skill-btn.locked .sk-code{background:#E3E8F4;color:#8790B3}
.skill-btn b{display:block;font-weight:600} .skill-btn small{color:var(--muted)}
.skill-btn .mini-stars{margin-left:auto;display:flex;gap:2px}
.sheet-back{position:fixed;inset:0;background:rgba(11,16,51,.45);z-index:60}
.sheet{position:fixed;left:50%;bottom:0;transform:translateX(-50%);width:min(560px,100%);background:#fff;border-radius:26px 26px 0 0;padding:10px 18px 22px;z-index:61;max-height:88vh;overflow:auto;animation:sheetup .22s ease-out}
@keyframes sheetup{from{transform:translate(-50%,30px);opacity:0}to{transform:translate(-50%,0);opacity:1}}
.grab{width:44px;height:5px;border-radius:5px;background:var(--line);margin:0 auto 12px}
.sheet h2{font:700 1.2rem var(--f-body);margin:0} .sheet .sub{color:var(--muted);font-size:.9rem;margin:2px 0 12px}
.ropt{display:flex;gap:12px;align-items:flex-start;width:100%;border:0;background:#fff;border-radius:16px;padding:12px;box-shadow:inset 0 0 0 2px var(--line);cursor:pointer;text-align:left;margin-top:8px}
.ropt:hover,.ropt:focus-visible{box-shadow:inset 0 0 0 2px var(--topic)}
.ropt .r-ic{width:40px;height:40px;border-radius:12px;display:grid;place-items:center;flex:0 0 auto}
.ropt b{display:block;font-weight:700} .ropt span.d{display:block;color:var(--muted);font-size:.88rem}
.ropt .eff{display:inline-block;margin-top:4px;font-size:.76rem;font-weight:700;padding:2px 8px;border-radius:999px;background:var(--right-soft);color:#075B3F}
.ropt .eff.warn{background:#FFF1D6;color:#7A4B00}
.sheet-close{margin-top:14px}
.preview{margin-top:12px;border-radius:18px;background:var(--paper);padding:14px}
.preview b{display:block;margin-bottom:6px}

:root{--night:#16205B;--blue:#1F5FD0;--blue-soft:#E6EEFF;--right-2:#14B37D;--coral-2:#FF6B5E;--r:18px;--accent:var(--amber);--accent-ink:var(--amber-ink)}
/* ---- v2 components still used (forms, map, tests, reviews, me, parent lists) ---- */
/* Top bar */
.topbar-v2 { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px clamp(12px, 3vw, 28px); background: var(--night); color: #fff; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.brand-mark { width: 34px; height: 34px; stroke: var(--accent); stroke-width: 3.2; fill: none; stroke-linecap: round; }
.brand-mark .arc { stroke: #fff; stroke-width: 2.4; }
.brand-text b { display: block; font-family: var(--f-head); font-size: 1.05rem; } .brand-text small { opacity: .75; font-size: .75rem; }
.topnav { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
.topnav a { color: #fff; text-decoration: none; font-weight: 500; font-size: .95rem; opacity: .85; }
.topnav a[aria-current="page"] { opacity: 1; box-shadow: inset 0 -3px 0 var(--accent); }
.chip-link { background: rgba(255,255,255,.12); padding: 6px 12px; border-radius: 999px; opacity: 1 !important; }
.who { color: #fff; font-size: .9rem; } .plan-tag { font-style: normal; background: var(--accent); color: var(--ink); padding: 2px 8px; border-radius: 999px; font-size: .75rem; font-weight: 700; margin-left: 4px; }
@media (max-width: 700px) { .hide-sm { display: none; } }

/* Bottom tab bar (child) */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(4, 1fr); background: var(--card); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .75rem; font-weight: 600; color: var(--muted); text-decoration: none; padding: 4px 0; }
.tab-ic { display: grid; place-items: center; width: 52px; height: 30px; border-radius: 999px; }
.tabbar a[aria-current="page"] { color: var(--ink); } .tabbar a[aria-current="page"] .tab-ic { background: var(--accent); }
@media (min-width: 900px) { .tabbar { display: none; } body { padding-bottom: 0; } }

.main { max-width: 980px; margin: 0 auto; padding: clamp(14px, 3vw, 28px); }
.bare .main { max-width: 760px; }
.foot { text-align: center; color: var(--muted); font-size: .8rem; padding: 18px 16px 28px; }
.flash { padding: 12px 16px; border-radius: var(--r-sm); margin: 0 0 14px; font-weight: 500; }
.flash-ok { background: var(--right-soft); color: #075B3F; } .flash-warn { background: var(--coral-soft); color: #8C241B; } .flash-info { background: var(--blue-soft); }

/* Buttons: chunky and pressable */
.btn, .btn-ghost, .btn-wide-ghost { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 700 1rem var(--f-body); text-decoration: none; cursor: pointer; border-radius: 14px; padding: 12px 20px; min-height: 48px; border: 0; text-align: center; transition: transform .08s, box-shadow .08s; }
.btn { background: var(--accent); color: var(--ink); box-shadow: 0 4px 0 var(--accent-ink); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--accent-ink); }
.btn:disabled { background: #D6DCEF; color: #7C86AD; box-shadow: 0 4px 0 #B9C1DC; cursor: not-allowed; }
.btn.ok { background: var(--right); color: #fff; box-shadow: 0 4px 0 #086246; }
.btn.no { background: var(--coral); color: #fff; box-shadow: 0 4px 0 #962A21; }
.btn-ghost, .btn-wide-ghost { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 2px var(--line), 0 3px 0 var(--line); }
.btn.big, .btn-ghost.big { min-height: 56px; font-size: 1.08rem; }
.small { min-height: 38px !important; padding: 7px 14px !important; font-size: .88rem !important; }
.wide, .btn.wide, .btn-wide-ghost { width: 100%; }
.cta-row, .pager { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 18px; }
.pager.col { flex-direction: column; align-items: stretch; }
.icon-btn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }

/* Cards and panels */
.form-card, .qcard, .kid, .empty { background: var(--card); border-radius: var(--r); padding: clamp(16px, 3vw, 24px); box-shadow: var(--shadow); margin-bottom: 16px; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; }
.panel h2 { font-size: 1.15rem; }
.hello { margin: 6px 0 18px; } .lede { font-size: 1.05rem; color: var(--muted); }
.code-chip { display: inline-grid; place-items: center; min-width: 44px; padding: 3px 9px; border-radius: 10px; background: var(--night); color: #fff; font: 700 .8rem var(--f-body); letter-spacing: .02em; }
.tag { display: inline-block; font-size: .75rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--blue-soft); color: var(--night); font-style: normal; }
.tag-ok { background: var(--right-soft); color: #075B3F; }
.tag-concept, .tag-rule, .tag-operation { background: #FFF1D6; color: #7A4B00; }
.tag-calculation, .tag-careless { background: var(--coral-soft); color: #8C241B; }
.tag-unit, .tag-reading, .tag-blank { background: #EEE8FF; color: #4C2FA6; }

/* Child home */
.hero-child-v2 { background: var(--night); color: #fff; margin: calc(-1 * clamp(14px, 3vw, 28px)) calc(-1 * clamp(14px, 3vw, 28px)) 18px; padding: 18px clamp(16px, 3vw, 28px) 22px; border-radius: 0 0 26px 26px; }
.hc-row { display: flex; align-items: center; gap: 12px; }
.hc-avatar { display: block; border-radius: 18px; box-shadow: 0 0 0 3px rgba(255,255,255,.25); }
.hc-name { flex: 1; } .hc-name small { display: block; opacity: .7; font-size: .8rem; } .hc-name b { font-family: var(--f-head); font-size: 1.45rem; }
.streak-chip { display: inline-flex; align-items: center; gap: 4px; background: rgba(255,255,255,.12); padding: 6px 12px; border-radius: 999px; font-weight: 700; font-size: .9rem; }
.level { margin-top: 16px; } .level-top { display: flex; justify-content: space-between; font-size: .9rem; } .level-top small { opacity: .75; }
.xpbar { height: 12px; border-radius: 999px; background: rgba(255,255,255,.14); margin-top: 6px; overflow: hidden; }
.xpbar span { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .6s; }
.home-body { display: grid; gap: 14px; }
.card-cta { display: flex; align-items: center; gap: 14px; background: var(--card); border-radius: var(--r); padding: 14px; text-decoration: none; color: var(--ink); box-shadow: 0 5px 0 var(--line), var(--shadow); transition: transform .08s; }
.card-cta:active { transform: translateY(3px); }
.card-cta.cta-main { background: var(--accent); box-shadow: 0 5px 0 var(--accent-ink); }
.card-cta.review { box-shadow: inset 0 0 0 2px var(--topic), 0 5px 0 var(--topic); }
.cta-pic { flex: 0 0 96px; height: 96px; background: rgba(255,255,255,.7); border-radius: 14px; display: grid; place-items: center; padding: 4px; }
.cta-pic .replay { display: none; }
.cta-pic svg { width: 100%; height: 88px; }
.cta-text { display: flex; flex-direction: column; } .cta-text small { font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; opacity: .75; }
.cta-text b { font-family: var(--f-head); font-size: 1.3rem; line-height: 1.15; margin: 2px 0; } .cta-text span { font-size: .92rem; }
.mission .m-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.m-tick { width: 24px; height: 24px; border-radius: 8px; box-shadow: inset 0 0 0 2px var(--line); flex: 0 0 auto; }
.m-row.done .m-tick { background: var(--right) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12l4 4 8-8' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") center/18px no-repeat; box-shadow: none; }
.m-label { flex: 1; font-weight: 500; } .m-row.done .m-label { text-decoration: line-through; color: var(--muted); } .m-row small { color: var(--muted); font-weight: 600; }
.tiles-v2 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tile-v2 { background: var(--card); border-radius: var(--r); padding: 12px 8px; text-align: center; box-shadow: var(--shadow); text-decoration: none; color: var(--ink); display: flex; flex-direction: column; align-items: center; gap: 2px; }
.tile b { font-family: var(--f-head); font-size: 1.5rem; } .tile small { color: var(--muted); font-size: .78rem; }

/* Map */
.map-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.map-head p { color: var(--muted); margin: 0; }
.stars-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--card); padding: 8px 14px; border-radius: 999px; font-weight: 700; box-shadow: var(--shadow); white-space: nowrap; }
.map { position: relative; max-width: 460px; margin: 0 auto; }
.map-path { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-path path { fill: none; stroke: #C9D2EC; stroke-width: 10; stroke-linecap: round; stroke-dasharray: 2 16; }
.map-tier { position: absolute; left: 0; right: 0; display: flex; align-items: center; gap: 8px; background: var(--card); border-radius: 14px; padding: 8px 14px; box-shadow: var(--shadow); z-index: 2; }
.map-tier small { color: var(--muted); font-size: .8rem; margin-left: auto; text-align: right; }
.tier-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--topic); } .tier-b .tier-dot { background: var(--accent); } .tier-c .tier-dot { background: #8A63FF; }
.node { --h: 32px; position: absolute; transform: translate(calc(-1 * var(--h)), -50%); display: flex; align-items: center; gap: 10px; z-index: 3; width: max-content; max-width: 62vw; }
.node.label-left { flex-direction: row-reverse; text-align: right; transform: translate(calc(-100% + var(--h)), -50%); }
.node-current { --h: 38px; }
.node-dot { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; font: 800 1rem var(--f-head); text-decoration: none; background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 4px var(--accent), 0 5px 0 var(--line); transition: transform .08s; flex: 0 0 auto; }
.node-dot:active { transform: translateY(3px); }
.node-done .node-dot { background: var(--right); color: #fff; box-shadow: 0 5px 0 #086246; }
.node-current .node-dot { background: var(--accent); width: 76px; height: 76px; box-shadow: 0 6px 0 var(--accent-ink), 0 0 0 8px rgba(255,178,30,.3); animation: pulse 1.8s infinite; }
.node-help .node-dot { box-shadow: inset 0 0 0 4px var(--coral), 0 5px 0 var(--line); }
.node-locked .node-dot { background: #E7EBF6; color: #8A93B8; box-shadow: inset 0 0 0 3px #CBD2E8; border: 0; }
.node-label { display: flex; flex-direction: column; background: rgba(255,255,255,.92); padding: 6px 10px; border-radius: 12px; font-size: .9rem; line-height: 1.25; max-width: 150px; }
.node-label b { font-weight: 600; } .node-label small { font-size: .74rem; font-weight: 700; }
.here { color: var(--accent-ink); text-transform: uppercase; letter-spacing: .05em; } .due { color: var(--topic); } .why { color: var(--muted); }
.node-locked .node-label { opacity: .75; } .node-stars { display: flex; gap: 1px; margin-top: 2px; }
.label-left .node-stars { justify-content: flex-end; }
@keyframes pulse { 0%, 100% { box-shadow: 0 6px 0 var(--accent-ink), 0 0 0 8px rgba(255,178,30,.3); } 50% { box-shadow: 0 6px 0 var(--accent-ink), 0 0 0 14px rgba(255,178,30,.12); } }
.helpers { margin-top: 20px; }
.topic-row { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; text-decoration: none; color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); margin-top: 8px; }
.topic-row span:last-child { display: flex; flex-direction: column; } .topic-row small { color: var(--muted); }
.hs-pic { flex: 0 0 90px; height: 56px; display: grid; place-items: center; } .hs-pic svg { height: 56px; width: 90px; }

/* Test mode */
.tnav { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.tdot { width: 40px; height: 40px; border-radius: 12px; border: 0; background: var(--card); font: 700 .95rem var(--f-body); color: var(--ink); cursor: pointer; box-shadow: inset 0 0 0 2px var(--line); }
.tdot.done { background: var(--blue-soft); box-shadow: inset 0 0 0 2px var(--blue); } .tdot.flag { box-shadow: inset 0 0 0 3px var(--accent); }
.tdot.cur { background: var(--night); color: #fff; box-shadow: none; }
.tq { border: 0; margin: 0 0 12px; } .flag { margin-top: 4px; }
.flag[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--accent), 0 3px 0 var(--accent) !important; }

/* Results and reviews */
.result-hero { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; background: var(--card); border-radius: 22px; padding: 20px; box-shadow: var(--shadow); margin-bottom: 18px; }
.result-hero > div { flex: 1; min-width: 240px; }
.dial { margin: 0; width: var(--size); position: relative; }
.dial svg { width: 100%; } .dial-track { fill: none; stroke: #E3E8F6; stroke-width: 18; } .dial-arc { fill: none; stroke: var(--right-2); stroke-width: 18; stroke-linecap: round; }
.dial-ray { stroke: var(--night); stroke-width: 4; stroke-linecap: round; } .dial-vertex { fill: var(--night); }
.dial figcaption { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.dial figcaption b { font: 800 1.6rem var(--f-head); } .dial figcaption small { font-size: .7rem; color: var(--muted); max-width: 70%; text-align: center; }
.review { display: grid; gap: 12px; }
.rev { background: var(--card); border-radius: var(--r); padding: 14px; box-shadow: var(--shadow); border-left: 6px solid var(--line); }
.rev-ok { border-left-color: var(--right); } .rev-no { border-left-color: var(--coral); }
.rev-num { font-weight: 700; font-size: .9rem; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.rev-grid { display: grid; grid-template-columns: minmax(120px, 200px) 1fr; gap: 14px; align-items: start; }
.rev-grid .diagram { margin: 0; } .rev-stem { font-weight: 600; } .fix { background: #F6F8FE; padding: 8px 12px; border-radius: 10px; font-size: .95rem; }
@media (max-width: 560px) { .rev-grid { grid-template-columns: 1fr; } }

/* Me */
.avatars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.av { border: 0; background: var(--card); border-radius: 18px; padding: 8px; cursor: pointer; box-shadow: inset 0 0 0 2px var(--line); }
.av[aria-pressed="true"] { box-shadow: inset 0 0 0 4px var(--accent), 0 4px 0 var(--accent-ink); }
.switch { display: flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
.switch input { width: 22px; height: 22px; accent-color: var(--right); }
.badges { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.badges li { display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; }
.badges small { grid-column: 2; color: var(--muted); }
.badge-icon { grid-row: span 2; width: 40px; height: 40px; border-radius: 12px; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3l2.6 5.6 6 .7-4.5 4.1 1.3 6L12 16.4 6.6 19.4l1.3-6L3.4 9.3l6-.7z' fill='%23121A45'/%3E%3C/svg%3E") center/24px no-repeat; }

/* Parent */
.kids { display: grid; gap: 16px; }
.kid-head { display: flex; gap: 16px; align-items: center; } .meta { color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; }
.stats div { background: #F6F8FE; border-radius: 12px; padding: 8px 10px; } .stats dt { font-size: .75rem; color: var(--muted); } .stats dd { margin: 0; font: 800 1.3rem var(--f-head); }
.revise { background: #FFF6DE; border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; } .revise h3 { margin-bottom: 6px; }
.kid-actions, .pin-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.pin-form input { width: 140px; }
input[type="text"], input[type="email"], input[type="password"], input:not([type]), input[inputmode], select { font: 500 1rem var(--f-body); padding: 11px 13px; border-radius: 12px; border: 0; box-shadow: inset 0 0 0 2px var(--line); background: #fff; color: var(--ink); }
.form-card { max-width: 520px; margin: 0 auto 16px; } .form-card.inline { max-width: none; }
.form-card form { display: grid; gap: 12px; } .form-card label { display: grid; gap: 4px; font-weight: 600; } .form-card label small { font-weight: 400; color: var(--muted); }
.check { display: flex !important; grid-template-columns: none; gap: 10px !important; align-items: flex-start; font-weight: 400 !important; }
.pdpa { font-size: .85rem; color: var(--muted); background: #F6F8FE; padding: 10px 12px; border-radius: 12px; }
.table-wrap { overflow-x: auto; }
.skills-table, .tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
.skills-table th, .skills-table td, .tbl th, .tbl td { padding: 9px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.skills-table th, .tbl th { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.skills-table td:first-child { min-width: 200px; }
.status { font-weight: 700; font-size: .8rem; padding: 3px 9px; border-radius: 999px; white-space: nowrap; background: #EEF1FA; }
.s-mastered { background: var(--right-soft); color: #075B3F; } .s-needs_help { background: var(--coral-soft); color: #8C241B; } .s-practising, .s-learning { background: #FFF1D6; color: #7A4B00; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.err-row { display: grid; grid-template-columns: 110px 1fr 30px; gap: 10px; align-items: center; margin-top: 10px; }
.bar { display: block; height: 10px; border-radius: 999px; background: #E3E8F6; overflow: hidden; } .bar span { display: block; height: 100%; background: var(--accent); }

/* Landing and subjects */
.hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; align-items: center; margin: 10px 0 28px; }
.hero-visual { background: var(--card); border-radius: 26px; padding: 16px; box-shadow: var(--shadow); }
.hero-visual svg.dg { width: 100%; max-height: 320px; }
@media (max-width: 760px) { .hero { grid-template-columns: 1fr; } }
.how { background: var(--card); border-radius: 22px; padding: 22px; box-shadow: var(--shadow); }
.steps-list { padding-left: 1.2em; display: grid; gap: 8px; margin: 0; }
.subjects { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.subject { display: flex; flex-direction: column; gap: 4px; padding: 20px; border-radius: 20px; background: var(--card); text-decoration: none; color: var(--ink); box-shadow: 0 5px 0 var(--line), var(--shadow); }
.subject-live { background: var(--accent); box-shadow: 0 5px 0 var(--accent-ink); }
.subject-soon { opacity: .6; } .subject-name { font: 800 1.4rem var(--f-head); } .subject-go { margin-top: 8px; font-weight: 700; }

/* Diagrams */
svg.dg { overflow: visible; font-family: var(--f-body); }
.dg-arm { stroke: var(--topic); stroke-width: 5; stroke-linecap: round; }
.dg-arm.moving { stroke: var(--night); }
.dg-arm.hl { stroke: var(--accent); stroke-width: 7; }
.dg-vertex { fill: var(--night); } .dg-vertex.hl { fill: var(--accent); stroke: var(--night); stroke-width: 3; }
.dg-arc { fill: rgba(255,178,30,.35); stroke: var(--accent); stroke-width: 2.5; }
.dg-arc.b { fill: rgba(31,95,208,.18); stroke: var(--blue); } .dg-arc.c { fill: rgba(14,154,106,.2); stroke: var(--right); }
.dg-arc.x { fill: rgba(217,71,59,.2); stroke: var(--coral); }
.dg-square { stroke: var(--night); stroke-width: 2.5; } .dg-square.small { stroke-width: 2; }
.dg-label, .dg-angle-label { font-size: 17px; font-weight: 700; fill: var(--ink); paint-order: stroke; stroke: #fff; stroke-width: 5px; stroke-linejoin: round; }
.dg-angle-label.x { fill: var(--coral); }
.dg-point { font: 800 18px var(--f-head); fill: var(--night); paint-order: stroke; stroke: #fff; stroke-width: 5px; }
.dg-readout { font: 800 22px var(--f-head); fill: var(--night); }
.dg-ghost { fill: none; stroke: #DDE3F3; stroke-width: 2; stroke-dasharray: 4 6; }
.dg-face { fill: #fff; stroke: var(--night); stroke-width: 4; } .dg-tick { stroke: var(--night); stroke-width: 2.5; stroke-linecap: round; }
.dg-clock-num { font: 700 17px var(--f-body); fill: var(--night); }
.dg-hand { stroke: var(--night); stroke-width: 6; stroke-linecap: round; } .dg-hand.start { stroke: #A8B1D1; stroke-dasharray: 3 8; stroke-width: 5; }
.dg-arrowhead { fill: none; stroke: var(--accent-ink); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; } .dg-arrowhead.solid { stroke: var(--night); }
.dg-compass { font: 800 20px var(--f-head); fill: var(--night); }
.dg-prot { fill: rgba(31,95,208,.08); stroke: var(--blue); stroke-width: 2.5; }
.dg-prot-tick { stroke: var(--blue); stroke-width: 1.4; }
.dg-scale { font: 600 9.5px var(--f-body); fill: var(--night); } .dg-scale.inner { fill: #5B6690; font-size: 8.5px; }
.dg-scale.on { fill: var(--accent-ink); font-weight: 800; font-size: 11px; } .dg-scale.off { opacity: .35; }
.dg-prot-base { stroke: var(--blue); stroke-width: 2; } .dg-prot-base.on { stroke: var(--accent); stroke-width: 6; }
.dg-prot-centre { fill: var(--blue); } .dg-prot-centre.on { fill: var(--accent); stroke: var(--night); stroke-width: 2.5; }
.dg-prot-band { fill: none; stroke: rgba(255,178,30,.5); stroke-width: 16; }
.dg-dot { fill: var(--coral); stroke: #fff; stroke-width: 2; }
.dg-shape { fill: var(--blue-soft); stroke: var(--night); stroke-width: 3.5; stroke-linejoin: round; } .dg-shape.b { fill: #FFF1D6; }
.dg-ext { stroke: #8A93B8; stroke-width: 2.5; stroke-dasharray: 5 5; } .dg-none { fill: none; stroke: none; }
.dg-blade { stroke: #7C86AD; stroke-width: 9; stroke-linecap: round; fill: none; } .dg-handle { fill: none; stroke: var(--coral); stroke-width: 6; }
.dg-wall { stroke: #8A93B8; stroke-width: 8; stroke-linecap: round; } .dg-door { stroke: #B26B2E; stroke-width: 9; stroke-linecap: round; }
.dg-laptop { fill: #A8B1D1; } .dg-screen { stroke: var(--night); stroke-width: 9; stroke-linecap: round; }
.dg-pizza { fill: #FFE3A6; stroke: #D9973B; stroke-width: 5; } .dg-slice { fill: #FFB21E; } .dg-cut { stroke: #B0782A; stroke-width: 2.5; }
.dg-small { font-size: 12px; fill: var(--muted); }
.dg-bar { fill: #fff; stroke: var(--night); stroke-width: 2.5; } .dg-bar-part { fill: var(--blue-soft); stroke: var(--blue); stroke-width: 2.5; }
.dg-bar-gap { fill: rgba(255,178,30,.18); stroke: var(--accent-ink); stroke-width: 2.5; stroke-dasharray: 6 5; }
.dg-bar-text { font: 800 18px var(--f-head); fill: var(--night); } .dg-bar-text.x { fill: var(--accent-ink); }
.dg-brace { fill: none; stroke: var(--night); stroke-width: 2; }
.dg-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dg-pair-item { margin: 0; } .dg-pair-item svg.dg { max-height: 170px; } .dg-pair-item figcaption { font-weight: 700; font-size: .9rem; }
.dg-dial { display: grid; gap: 8px; } .dg-dial-label { display: grid; gap: 4px; font-weight: 600; } .dg-dial input { width: 100%; accent-color: var(--accent-ink); }
.replay { margin-top: 6px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }


/* ---- v3 app glue ---- */
.main{max-width:980px;margin:0 auto;padding:clamp(14px,3vw,24px)}
.mode-public .main{max-width:none;padding:0}
.mode-child{padding-bottom:84px}
.bare .main{max-width:760px}
.stu-bar{position:sticky;top:0;z-index:30;display:flex;align-items:center;gap:14px;padding:10px clamp(14px,3vw,28px);background:rgba(255,255,255,.94);backdrop-filter:blur(8px);border-bottom:1px solid var(--line)}
.stu-bar .brand{flex:0 0 auto}
.stu-links{display:flex;gap:16px}
.stu-links a{color:var(--muted);text-decoration:none;font-weight:600;font-size:.95rem}
.stu-links a[aria-current="page"]{color:var(--ink);box-shadow:inset 0 -3px 0 var(--topic)}
.chip-link{text-decoration:none;color:var(--ink)}
.pub-top nav a[aria-current="page"]{box-shadow:inset 0 -3px 0 var(--amber)}
.pub-top .btn.small{min-height:40px;padding:8px 16px;font-size:.92rem}
.btn-ghost,.btn.ghost{background:#fff;color:var(--ink);box-shadow:inset 0 0 0 2px var(--line),0 3px 0 var(--line)}
.btn-ghost{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:48px;padding:10px 18px;border:0;border-radius:16px;font:700 1rem var(--f-body);text-decoration:none;cursor:pointer;text-align:center}
.btn.big{min-height:56px;font-size:1.06rem} .btn.no{background:var(--coral);color:#fff;box-shadow:0 4px 0 #962A21}
.small{min-height:38px!important;padding:7px 14px!important;font-size:.88rem!important}
.wide,.btn.wide{width:100%}
.panel h2{font:800 1.2rem var(--f-head)}
.lede{color:var(--muted)}
.flash{padding:12px 16px;border-radius:14px;margin:0 0 14px;font-weight:500}
.flash-ok{background:var(--right-soft);color:#075B3F}.flash-warn{background:var(--coral-soft);color:#8C241B}.flash-info{background:var(--t-space-soft)}
.foot{text-align:center;color:var(--muted);font-size:.8rem;padding:18px 16px 28px}
.skip{position:absolute;left:-999px;top:8px;background:#fff;padding:8px 14px;border-radius:10px;z-index:99}.skip:focus{left:8px}
.muted{color:var(--muted)}
.tabbar a[aria-current="page"] .tab-ic{background:var(--topic)!important;color:#fff}
.map-path path{stroke:#C9D6F5}
.node-dot{box-shadow:inset 0 0 0 4px var(--topic),0 5px 0 var(--line)}
.node-current .node-dot{background:var(--amber)}
.tier-dot{background:var(--topic)}
.lesson.v3{max-width:760px;margin:0 auto}
.vix-body{flex:0 0 auto}
.loading{color:var(--muted);padding:20px}
.lcard .rich p{margin:0 0 .5em} .lcard .rich{font-size:1rem}
.lcard .rich .bm-line{color:var(--muted);font-style:italic;font-size:.9rem}
.opt.radio{position:relative} .opt.radio input{position:absolute;opacity:0;pointer-events:none}
.opt.radio:has(input:checked){background:var(--topic-soft);box-shadow:inset 0 0 0 3px var(--topic),0 4px 0 var(--topic)}
.opt.radio:focus-within{outline:3px solid var(--amber);outline-offset:2px}
.opts.with-pics{grid-template-columns:repeat(auto-fit,minmax(140px,1fr))}
.opt-pic{margin:0;padding:4px;width:100%;background:transparent;box-shadow:none}.opt-pic svg.dg{width:100%;height:100px}
.num{display:flex;align-items:center;gap:10px;margin:4px 0 12px}
.num input{flex:1;min-width:0;font:700 1.6rem var(--f-head);padding:12px 16px;border-radius:16px;border:0;box-shadow:inset 0 0 0 3px var(--line);color:var(--ink);background:#fff}
.num input:focus{outline:none;box-shadow:inset 0 0 0 3px var(--topic)}
.num b{font:800 1.6rem var(--f-head)}
.hint{background:#FFF6DE;padding:10px 14px;border-radius:12px;font-weight:500;margin:0 0 10px}
.q-tools{display:flex;gap:8px;margin:0 0 10px}
.burst{position:fixed;left:50%;top:40%;width:0;height:0;pointer-events:none;z-index:60}
.bit{position:absolute;width:12px;height:12px;background:var(--amber);animation:fly 1.1s ease-out forwards}
.bit.s1{background:var(--right);border-radius:50%}.bit.s2{background:var(--topic);clip-path:polygon(50% 0,100% 100%,0 100%)}.bit.s3{background:var(--coral)}
@keyframes fly{from{transform:rotate(var(--a)) translateY(0) scale(1);opacity:1}to{transform:rotate(var(--a)) translateY(calc(-1 * var(--d) - 60px)) scale(.4);opacity:0}}
.dg-arm{stroke:var(--topic)} .dg-arc.b{stroke:var(--topic)}
.dg-prot{fill:rgba(47,107,235,.08);stroke:var(--topic)} .dg-prot-tick,.dg-prot-base{stroke:var(--topic)} .dg-prot-centre{fill:var(--topic)}
.dg-shape{fill:var(--topic-soft)}
.l-visual .dg-dial{width:100%}
.guide{margin:0 0 12px}
.mode-chip{display:inline-flex;align-items:center;gap:6px;font-size:.78rem;font-weight:700;padding:3px 10px;border-radius:999px;background:#FFF3D6;color:var(--amber-ink);margin-left:8px}
.pub .lp-lang{display:inline-flex;border-radius:999px;background:var(--paper);padding:3px;box-shadow:inset 0 0 0 1px var(--line)}
.pub-top .lang a{color:var(--muted);text-decoration:none;padding:5px 12px;border-radius:999px;font-size:.8rem;font-weight:600}
.pub-top .lang a[aria-current="true"]{background:var(--navy);color:#fff}
.stu-home{max-width:760px;margin:0 auto}
.parent-v3{max-width:1040px;margin:0 auto}
.kid-card{background:#fff;border-radius:var(--r-lg);padding:18px;box-shadow:0 0 0 1px var(--line);margin-bottom:16px}
.kid-card .kid-top{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.kid-card h2{font:800 1.4rem var(--f-head);margin:0}
@media (max-width:700px){.hide-sm{display:none!important}.stu-bar{gap:8px}.chips .chip{padding:5px 9px;font-size:.82rem}}
@media (min-width:900px){.tabbar{display:none}.mode-child{padding-bottom:0}}
.xpbar{background:#E7EBF6}.level{background:#fff;border-radius:18px;padding:12px 16px;box-shadow:0 0 0 1px var(--line)}
/* v3 lesson extras */
.mini{margin:6px 0 12px;padding:12px;border-radius:18px;background:var(--paper)}
.mini-q{font-weight:700;margin:0 0 6px}
.mini-pic{display:none}
.mini .opts{margin-bottom:0}
.mini .fb,.mini .vix{margin-top:10px}
.small-note{font-size:.88rem;color:var(--muted);margin-top:8px}
.vocab-row{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0 14px}
.vword{background:var(--topic-soft);border-radius:12px;padding:6px 12px;font-size:.9rem}
.vword b{margin-right:6px} .vword span{color:var(--muted);font-style:italic}
.drag-base{stroke:var(--topic)} .drag-knob{fill:var(--topic);cursor:grab}
.diag-pic{min-height:180px!important;margin:0!important} .diag-pic svg.dg{height:170px!important}
a.next-card{text-decoration:none;color:var(--ink)}
.brk{display:block;text-align:center;margin-top:12px;font-weight:600;color:var(--muted);background:none;border:0;cursor:pointer;text-decoration:underline;text-underline-offset:4px;width:100%}
.l-answer .fb{margin-bottom:12px}
.l-visual .readout{z-index:2}
a.ropt{text-decoration:none;color:var(--ink)}
.stu-home .continue{margin-top:4px}
.lp-insight{background:#fff;box-shadow:var(--shadow),0 0 0 1px var(--line)}
.cta-row-link{display:block;text-decoration:none;color:inherit}
.map-actions{display:flex;flex-direction:column;align-items:flex-end;gap:8px}
.inline-form{margin:0} .skill-row .inline-form{margin-left:6px} .memory .code{margin-right:4px}
.pub-top nav a{white-space:nowrap}
@media (max-width:560px){.pub-top{padding:10px 14px}.pub-top nav{gap:10px}.pub-top .brand > span:last-child{display:none}.pub-top .btn.small{padding:8px 12px}}
.pub-top .brand,.stu-bar .brand{color:var(--ink)} .pub-top .brand small{color:var(--muted)}
/* Phase 1 diagrams */
.dg-outline{fill:none;stroke:var(--navy);stroke-width:3;stroke-linejoin:round}
.dg-outline.filled{fill:var(--topic-soft)} .dg-outline.filled.b{fill:#FFF1D6}
.dg-part.a{fill:var(--topic-soft)} .dg-part.b{fill:#FFF1D6} .dg-part.c{fill:#E4F6EE}
.dg-shared{stroke:var(--navy);stroke-width:2;stroke-dasharray:6 5}
.dg-cell{fill:none;stroke:rgba(22,32,91,.25);stroke-width:1} .dg-cell.on{fill:rgba(47,107,235,.22)}
.dg-len{font:700 14px var(--f-body);fill:var(--ink);paint-order:stroke;stroke:#fff;stroke-width:4px;stroke-linejoin:round}
.dg-len.x{fill:var(--coral)}
.dg-tick2{stroke:var(--navy);stroke-width:2}
.dg-height{stroke:var(--coral);stroke-width:2.5;stroke-dasharray:6 5}
.dg-diag{stroke:var(--amber-ink);stroke-width:2.5}
.dg-axis{stroke:var(--coral);stroke-width:2;stroke-dasharray:8 6}
.dg-vtx{fill:var(--amber);stroke:var(--navy);stroke-width:2}
.dg-face{stroke:var(--navy);stroke-width:2.2;stroke-linejoin:round}
.dg-face.top.a{fill:#D9E6FF} .dg-face.front.a{fill:#B9CFFB} .dg-face.side.a{fill:#95B5F5}
.dg-face.top.b{fill:#FFE9B8} .dg-face.front.b{fill:#FFD88A} .dg-face.side.b{fill:#F5C15E}
.dg-cube{stroke:rgba(22,32,91,.45);stroke-width:1.2}
.unit-jump{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
.unit-jump a{font-size:.82rem;font-weight:600;padding:5px 12px;border-radius:999px;background:#fff;box-shadow:inset 0 0 0 1px var(--line);color:var(--topic-ink);text-decoration:none}
.map-tier{scroll-margin-top:80px}

/* =====================================================================
   DESIGN v4.0 (LOCKED) — student mode: Violet main colour + Cool tones topics.
   Navy anchors the top bar and headings. Parent/public stay calm.
   ===================================================================== */
.mode-child{
  --primary:#7C5CFF; --primary-d:#5A3BE0; --on-primary:#FFFFFF;
  --fix:#0D9488; --fix-d:#0A7068; --fix-soft:#DDF4F1;
  --navy:#1B2559; --ink:#2B3150; --muted:#667085; --line:#E4EAF3; --line2:#DCE3EE; --inactive:#E8ECF2;
  --bg4:#F6F9FC; --ok:#16A34A; --ok-soft:#E3F6EA; --peach:#FFEDEA; --coral:#F06A5B; --gold:#FFC233;
  --amber:var(--primary); --amber-ink:var(--primary-d);
  --f4:"Nunito",ui-rounded,system-ui,-apple-system,"Segoe UI",sans-serif;
  font-family:var(--f4); font-weight:500; background-color:var(--bg4)!important; color:var(--ink);
  background-image:linear-gradient(rgba(59,130,246,.05) 1px,transparent 1px),linear-gradient(90deg,rgba(59,130,246,.05) 1px,transparent 1px)!important;background-size:28px 28px!important;
}
.mode-child h1,.mode-child h2,.mode-child h3{font-family:var(--f4);color:var(--navy)}
.mode-child button,.mode-child input{font-family:var(--f4)}
/* navy top bar */
.mode-child .stu-bar{background:linear-gradient(120deg,#1B2559,#23357A);border-bottom:0;color:#fff}
.mode-child .stu-bar .brand-mark{background:var(--primary)}
.mode-child .stu-links a{color:#C9D2EE} .mode-child .stu-links a[aria-current="page"]{color:#fff;box-shadow:inset 0 -3px 0 var(--primary)}
.mode-child .stu-bar .chip{background:rgba(255,255,255,.12);box-shadow:none;color:#fff}
.mode-child .stu-bar .chip-link{color:#fff}
.mode-child .tabbar a[aria-current="page"] .tab-ic{background:var(--primary)!important;color:#fff}
.mode-child .tabbar a[aria-current="page"]{color:var(--navy)}
/* buttons: violet primary, white/navy secondary, teal for fixing */
.mode-child .btn,.mode-child .btn.topic,.mode-child .btn.ok{background:var(--primary);color:var(--on-primary);box-shadow:0 4px 0 var(--primary-d);font-family:var(--f4);font-weight:800;border-radius:16px}
.mode-child .btn:active{box-shadow:0 1px 0 var(--primary-d)}
.mode-child .btn:disabled{background:var(--inactive);color:#98A2B3;box-shadow:0 4px 0 #D5DCE6}
.mode-child .btn.teal{background:var(--fix);box-shadow:0 4px 0 var(--fix-d)}
.mode-child .btn.ghost,.mode-child .btn.sec,.mode-child .btn-ghost{background:#fff;color:var(--navy);box-shadow:inset 0 0 0 2px var(--navy),0 3px 0 rgba(27,37,89,.2)}
.mode-child .xp{background:var(--primary);color:#fff}
.mode-child .xpbar span,.mode-child .pbar span{background:var(--primary)}
/* cards */
.mode-child .lcard,.mode-child .block,.mode-child .level,.mode-child .panel,.mode-child .qcard{background:#fff;border-radius:24px;box-shadow:0 1px 2px rgba(30,50,110,.06),0 14px 30px -20px rgba(30,60,140,.35);border:0}
.mode-child .lcard{border-top:5px solid var(--topic)}
/* lesson header + stage pills */
.lhead{display:flex;align-items:center;gap:12px;margin-bottom:12px}
.lhead .who{display:flex;align-items:center;gap:10px;min-width:0}
.lhead .tdot{width:38px;height:38px;border-radius:12px;background:var(--topic-soft);color:var(--topic);display:grid;place-items:center;flex:0 0 auto}
.lhead .who small{display:block;color:var(--muted);font-weight:700;font-size:.78rem}
.lhead .who b{color:var(--navy);font-weight:800;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mode-child .track{display:flex;gap:6px;margin:0 0 14px}
.stg{flex:1;display:flex;align-items:center;justify-content:center;gap:6px;padding:8px 4px;border-radius:999px;font-size:.84rem;font-weight:800;color:#98A2B3;box-shadow:inset 0 0 0 1.5px var(--line2);white-space:nowrap;background:rgba(255,255,255,.6)}
.stg.done{background:var(--ok-soft);color:var(--ok);box-shadow:none}
.stg.now{flex:1.6;background:var(--topic);color:#fff;box-shadow:0 3px 0 var(--topic-ink)}
.stg.now.fix{background:var(--fix);box-shadow:0 3px 0 var(--fix-d)}
@media (max-width:640px){.stg{flex:0 0 40px;padding:8px 0}.stg .l{display:none}.stg.now{flex:1}.stg.now .l{display:inline}}
/* lesson content */
.mode-child .l-instr h2{font-weight:900;font-size:1.35rem}
.mode-child .l-kicker{color:var(--topic-ink);font-weight:800}
.mode-child .l-visual{background:linear-gradient(180deg,#FFFFFF,#F1F6FF);box-shadow:inset 0 0 0 1.5px #E3ECFA;border-radius:22px}
.mode-child .pip.on{background:var(--topic)} .mode-child .pip.now{background:var(--primary)}
.mode-child .opt{font-family:var(--f4);font-weight:800;color:var(--navy);box-shadow:inset 0 0 0 2px var(--line2),0 3px 0 var(--line2)}
.mode-child .opt[aria-pressed="true"]{background:var(--topic-soft);box-shadow:inset 0 0 0 2.5px var(--topic),0 3px 0 var(--topic)}
.mode-child .opt.good{background:var(--ok-soft);box-shadow:inset 0 0 0 2.5px var(--ok)}
.mode-child .num input{font-family:var(--f4);font-weight:800;color:var(--navy)}
.mode-child .num input:focus{box-shadow:inset 0 0 0 3px var(--topic)}
.mode-child .fb.ok{background:var(--ok-soft)} .mode-child .fb.ok b{color:#15803D}
.mode-child .fb.no{background:var(--peach)} .mode-child .fb.no b{color:#C9473A}
.mode-child .mini{background:var(--bg4)}
.mode-child .hint{background:#F3EFFF}
/* intro */
.intro{padding:20px}
.intro .eyebrow{font-size:.9rem;font-weight:800;color:var(--topic-ink);margin-bottom:4px}
.title-xl{font-size:clamp(1.8rem,5vw,2.4rem);font-weight:900;color:var(--navy);margin:0;line-height:1.15}
.title-xl::after{content:"";display:block;height:6px;width:60px;border-radius:6px;background:var(--topic);margin-top:10px}
.intro .bm{margin:6px 0 0}
.intro-text .meaning{font-size:1.12rem;margin:12px 0 0;color:var(--ink)}
.intro .l-visual{margin:14px 0}
.can-box{background:var(--topic-soft);border-radius:20px;padding:14px 16px;margin:0 0 14px}
.can-box b{display:block;color:var(--topic-ink);font-weight:800;margin-bottom:6px}
.can-box ul{list-style:none;padding:0;margin:0;display:grid;gap:6px}
.can-box li{display:flex;gap:10px;align-items:center;font-weight:700}
.can-box li::before{content:"";width:22px;height:22px;border-radius:8px;background:var(--topic) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12l4 4 8-8' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") center/15px no-repeat;flex:0 0 auto}
.mode-child .vword{background:#fff;box-shadow:inset 0 0 0 1.5px var(--line)}
/* fix it (teal) */
.mode-child .diag-lens{background:var(--fix-soft);color:var(--fix)}
.mode-child .dstep{background:var(--bg4);box-shadow:none;border-radius:20px}
.mode-child .dstep.ok{background:var(--fix-soft);box-shadow:none}
.mode-child .dstep-n{background:var(--fix)}
.mode-child .dstep.ok .dstep-n{background:var(--fix-d)}
.mode-child .tile{box-shadow:inset 0 0 0 2px var(--line2),0 3px 0 var(--line2);font-weight:700}
.mode-child .tile.good{background:#fff;box-shadow:inset 0 0 0 2.5px var(--fix)}
.mode-child .dstep-ok{color:var(--fix-d)}
.mode-child .path-card{background:var(--fix-soft);box-shadow:none}
.mode-child .path-kind{color:var(--fix-d)}
.mode-child .vix-say{box-shadow:inset 0 0 0 1.5px var(--line)}
/* mastery */
.mode-child .earn div b{color:var(--primary-d)} .mode-child .earn .fixed{background:#F3EFFF}
.mode-child .next-card{background:var(--topic-soft)}
/* map v4 */
.v4-map .map-hero{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:16px;flex-wrap:wrap}
.v4-map .map-hero h1{font-size:2rem;font-weight:900}
.v4-map .map-hero p{color:var(--muted);margin:4px 0 0}
.v4-map .overall{background:#fff;border-radius:18px;padding:12px 16px;box-shadow:0 14px 30px -20px rgba(30,60,140,.35);min-width:220px}
.v4-map .overall small{color:var(--muted);font-weight:700}
.v4-map .overall .bar{height:10px;border-radius:99px;background:var(--inactive);margin-top:8px;overflow:hidden}
.v4-map .overall .bar span{display:block;height:100%;background:var(--primary);border-radius:99px}
.units-nav{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 22px}
.units-nav a{display:inline-flex;align-items:center;gap:8px;padding:8px 14px;border-radius:999px;background:#fff;box-shadow:inset 0 0 0 1.5px var(--line2);text-decoration:none;color:var(--ink);font-weight:700;font-size:.92rem}
.units-nav a i{width:10px;height:10px;border-radius:50%;background:var(--c)}
.v4-map .unit{margin:0 0 30px;scroll-margin-top:80px}
.unit-head{display:flex;align-items:center;gap:14px;margin-bottom:12px}
.unit-ic{width:48px;height:48px;border-radius:15px;background:var(--cs);color:var(--c);display:grid;place-items:center;flex:0 0 auto}
.unit-head h2{font-size:1.4rem;font-weight:800;margin:0}
.unit-head p{margin:0;color:var(--muted);font-size:.92rem}
.unit-head .count{margin-left:auto;font-weight:800;color:var(--navy);white-space:nowrap}
.unit-head .count small{display:block;color:var(--muted);font-weight:600;font-size:.78rem;text-align:right}
.cards{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}
.lcard-m{position:relative;display:grid;grid-template-columns:52px 1fr;gap:2px 14px;align-items:start;background:#fff;border-radius:22px;padding:16px 16px 14px;box-shadow:0 1px 2px rgba(30,50,110,.06),0 14px 30px -20px rgba(30,60,140,.35);border:1.5px solid transparent;text-decoration:none;color:var(--ink)}
.lcard-m.now{border-color:var(--c);box-shadow:0 0 0 3px color-mix(in srgb,var(--c) 18%,transparent),0 14px 30px -18px var(--c)}
.lcard-m .ic-box{grid-row:span 4;width:52px;height:52px;border-radius:16px;background:var(--cs);color:var(--c);display:grid;place-items:center}
.lcard-m .lc-code{font-size:.78rem;font-weight:800;color:var(--muted)}
.lcard-m h3{font-size:1.08rem;font-weight:800;line-height:1.25;margin:0}
.lcard-m .lc-status{display:flex;align-items:center;gap:6px;font-size:.88rem;font-weight:700;margin-top:4px;color:var(--muted);flex-wrap:wrap}
.lcard-m .lc-status.done{color:var(--ok)} .lcard-m .lc-status.help{color:#E0584B} .lcard-m .lc-status.go{color:var(--cd)}
.lcard-m .stars{display:inline-flex;gap:1px}
.lcard-m .prog{grid-column:2;height:8px;border-radius:99px;background:var(--inactive);overflow:hidden;margin-top:6px}
.lcard-m .prog span{display:block;height:100%;background:var(--c);border-radius:99px}
.lcard-m .act{grid-column:2;margin-top:10px;justify-self:start;min-height:40px!important;padding:8px 16px!important;font-size:.92rem!important}
.lcard-m.locked{background:rgba(255,255,255,.55);box-shadow:none;border:1.5px dashed var(--line2);cursor:default}
.lcard-m.locked .ic-box{background:var(--inactive);color:#98A2B3}
.lcard-m.locked h3{color:#8A94A6}
@media (max-width:640px){.cards{grid-template-columns:1fr}}
/* home */
.mode-child .continue{background:linear-gradient(120deg,var(--primary),#9B7BFF);box-shadow:0 6px 0 var(--primary-d)}
.mode-child .continue .go{color:var(--primary-d)}
.mode-child .stu-hello h1{font-weight:900}
.mode-child .mission .tick{box-shadow:inset 0 0 0 2px var(--line2)}
.mode-child .topic.live{box-shadow:inset 0 0 0 3px var(--c)}
/* diagrams: navy structure, topic highlights */
.mode-child .dg-arm{stroke:var(--navy)} .mode-child .dg-arm.moving{stroke:var(--topic)}
.mode-child .dg-shape{fill:#fff;stroke:var(--navy)} .mode-child .dg-shape.b{fill:#FFF4E5}
.mode-child .dg-outline.filled{fill:#fff}
.mode-child .dg-part.a{fill:#fff} .mode-child .dg-part.b{fill:var(--topic-soft)}
.mode-child .dg-diag,.mode-child .dg-axis{stroke:var(--topic)}
.mode-child .dg-shared{stroke:#F06A5B}
.mode-child .dg-cell.on{fill:var(--topic-soft)}
.mode-child .dg-arc{fill:#FFF1CC;stroke:#F5B82E}
.mode-child .dg-vtx{fill:#FFC233}
.mode-child .dg-len,.mode-child .dg-label,.mode-child .dg-angle-label,.mode-child .dg-clock-num,.mode-child .dg-readout,.mode-child .dg-bar-text{font-family:var(--f4)}
.mode-child .dg-face.top.a{fill:#DCE9FE}.mode-child .dg-face.front.a{fill:#BCD5FC}.mode-child .dg-face.side.a{fill:#9CBFF8}
/* stars stay gold */
/* parent mode: calm warm grey */
.mode-parent{background-color:#F7F6F3}
/* Logo (AMVix Learn · Primary Learning Hub) */
.brand img{display:block;height:auto}
.pub-top .logo-full{width:200px;max-width:52vw}
.stu-bar .logo-full{width:170px}
.stu-bar .logo-mark{width:40px;height:40px}
.brand-tag{margin-left:10px;font-size:.78rem;font-weight:700;color:var(--muted);background:var(--paper,#F5F7FC);border-radius:999px;padding:3px 10px;align-self:center}
.pub-top .brand{display:flex;align-items:center}
.show-sm{display:none}
@media (max-width:700px){.show-sm{display:block}.pub-top .logo-full{width:150px}}
.brand img.show-sm{display:none}
@media (max-width:700px){.brand img.show-sm{display:block}.brand img.hide-sm{display:none}}
@media (max-width:560px){.pub-top .logo-full{width:124px}.pub-top nav .btn.small{display:none}.pub-top nav{gap:8px}}
/* ===== v4.3 Space Adventure map ===== */
.av-page{max-width:560px;margin:0 auto}
.av-head h1{margin:0;font-size:1.9rem;font-weight:900;color:var(--navy)}
.av-head p{margin:2px 0 10px;color:var(--muted)}
.av-overall{display:flex;align-items:center;gap:10px;background:#fff;border-radius:16px;padding:10px 14px;box-shadow:0 10px 24px -16px rgba(30,60,140,.4);flex-wrap:wrap}
.av-overall b{color:var(--navy);white-space:nowrap}
.av-bar{flex:1;min-width:80px;height:10px;border-radius:99px;background:#E8ECF2;overflow:hidden}.av-bar span{display:block;height:100%;background:var(--primary,#7C5CFF);border-radius:99px}
.av-overall .btn{min-height:38px!important;padding:6px 14px!important;font-size:.88rem!important;width:auto}
.av-jump{display:flex;gap:6px;overflow-x:auto;padding:10px 0 4px;scrollbar-width:none}
.av-jump a{flex:0 0 auto;display:inline-flex;align-items:center;gap:6px;background:#fff;border-radius:999px;padding:6px 12px;text-decoration:none;color:var(--navy);font-weight:800;font-size:.85rem;box-shadow:inset 0 0 0 1.5px var(--line2,#DCE3EE)}
.av-jump a i{width:10px;height:10px;border-radius:50%;background:var(--c)}
.av-map{margin:8px 0 24px;border-radius:28px;overflow:hidden;box-shadow:0 20px 40px -24px rgba(30,60,140,.45)}
.av-svg{display:block;width:100%;height:auto;font-family:var(--f4,Nunito,system-ui,sans-serif)}
.av-trail{fill:none;stroke:#fff;stroke-width:22;stroke-linecap:round;opacity:.85}
.av-dash{fill:none;stroke:#C5D0E2;stroke-width:4;stroke-dasharray:2 12;stroke-linecap:round}
.av-lit{fill:none;stroke-width:8;stroke-linecap:round;opacity:.55}
.av-node{cursor:pointer;outline:none}.av-node.s-locked{cursor:default}
.av-node:focus-visible .av-disc,.av-chest:focus-visible .av-box{stroke:#FFC233;stroke-width:5}
.av-num{font:900 20px var(--f4,Nunito,sans-serif);fill:#fff}
.av-code{font:900 12px var(--f4,Nunito,sans-serif);fill:#667085}
.av-title{font:800 14px var(--f4,Nunito,sans-serif);fill:#1B2559;paint-order:stroke;stroke:rgba(255,255,255,.85);stroke-width:4px;stroke-linejoin:round}
.av-title.dim{fill:#8A94A6}
.av-help{font:800 12px var(--f4,Nunito,sans-serif);fill:#E0584B}
.av-due{font:900 13px var(--f4,Nunito,sans-serif);fill:#1B2559}
.av-bw{font:800 12px var(--f4,Nunito,sans-serif);fill:#B9C3E6;letter-spacing:.04em}
.av-bn{font:900 19px var(--f4,Nunito,sans-serif);fill:#fff}.av-bn.dark{fill:#1B2559}
.av-bc{font:900 18px var(--f4,Nunito,sans-serif);fill:#FFC233}
.av-chest{cursor:pointer;outline:none}.av-ct{font:800 12px var(--f4,Nunito,sans-serif);fill:#667085}
.av-chest.open .av-box{filter:drop-shadow(0 0 8px #FFC233)}
.av-ft{font:900 15px var(--f4,Nunito,sans-serif);fill:#1B2559}.av-fs{font:700 11.5px var(--f4,Nunito,sans-serif);fill:#667085}
.av-sc{font:900 10px var(--f4,Nunito,sans-serif);fill:#fff}.av-st{font:800 13px var(--f4,Nunito,sans-serif);fill:#1B2559}
.av-go{font:800 12px var(--f4,Nunito,sans-serif);fill:#fff}
.av-pulse{transform-box:fill-box;transform-origin:center;animation:avpulse 1.8s ease-in-out infinite}
@keyframes avpulse{0%,100%{transform:scale(.9);opacity:.28}50%{transform:scale(1.12);opacity:.1}}
.av-bob{animation:avbob 1.6s ease-in-out infinite}
@keyframes avbob{0%,100%{transform:translateY(0)}50%{transform:translateY(-6px)}}
.av-back{position:fixed;inset:0;background:rgba(16,22,61,.45);z-index:70}
.av-sheet{position:fixed;left:50%;bottom:0;transform:translateX(-50%);width:min(520px,100%);background:#fff;border-radius:26px 26px 0 0;padding:10px 18px calc(22px + env(safe-area-inset-bottom));z-index:71;animation:avup .22s ease-out;max-height:88vh;overflow:auto}
@keyframes avup{from{transform:translate(-50%,30px);opacity:0}to{transform:translate(-50%,0);opacity:1}}
.av-grab{width:44px;height:5px;border-radius:5px;background:#DCE3EE;margin:0 auto 12px}
.av-sh-top{display:flex;gap:12px;align-items:center}
.av-badge{width:56px;height:56px;border-radius:50%;background:var(--c);color:#fff;display:grid;place-items:center;font-weight:900;flex:0 0 auto;box-shadow:0 4px 0 rgba(0,0,0,.15)}
.av-sh-top small{color:#667085;font-weight:800}.av-sh-top h2{margin:0;color:#1B2559;font-size:1.3rem;font-weight:900}
.av-state{background:var(--cs);border-radius:14px;padding:10px 12px;margin:12px 0;font-weight:700}
.av-state.done{color:#15803D;background:#E3F6EA}
.av-opt{display:block;text-decoration:none;border-radius:14px;padding:10px 14px;margin-top:8px;box-shadow:inset 0 0 0 2px #DCE3EE;color:inherit}
.av-opt b{display:block;color:#1B2559;font-weight:900}.av-opt span{color:#667085;font-size:.9rem}
.av-opt.main{box-shadow:inset 0 0 0 2.5px #7C5CFF}
.av-close{margin-top:10px}
.av-toast{position:fixed;left:50%;top:80px;transform:translateX(-50%);background:#1B2559;color:#fff;padding:10px 16px;border-radius:14px;font-weight:800;z-index:90;max-width:90vw;text-align:center}
@media (prefers-reduced-motion:reduce){.av-pulse,.av-bob{animation:none}}
.av-num.dark{fill:#1B2559}
.check.remember{display:flex!important;align-items:center;gap:10px!important;font-weight:600!important}.check.remember input{width:20px;height:20px;accent-color:#7C5CFF}
/* coordinate_grid */
.cg-box{width:100%}
.cg-line{stroke:#DCE3EE;stroke-width:1.2}
.cg-axis{stroke:#1B2559;stroke-width:3} .cg-arrow{fill:#1B2559}
.cg-axis.hx,.cg-arrow.hx{stroke:#3B82F6;fill:#3B82F6} .cg-axis.hx{stroke-width:5}
.cg-axis.hy,.cg-arrow.hy{stroke:#7C5CFF;fill:#7C5CFF} .cg-axis.hy{stroke-width:5}
.cg-alabel{font:900 16px var(--f4,Nunito,sans-serif);fill:#1B2559} .cg-alabel.hx{fill:#3B82F6} .cg-alabel.hy{fill:#7C5CFF}
.cg-num{font:700 12px var(--f4,Nunito,sans-serif);fill:#667085} .cg-num.strong{font-weight:900;fill:#1B2559;font-size:14px}
.cg-origin{fill:#1B2559} .cg-origin.on{fill:#FFC233;stroke:#1B2559;stroke-width:2}
.cg-guide{stroke-width:2.5;stroke-dasharray:6 5} .cg-guide.gx{stroke:#3B82F6} .cg-guide.gy{stroke:#7C5CFF}
.cg-trail{stroke-width:5;stroke-linecap:round} .cg-trail.gx{stroke:#3B82F6} .cg-trail.gy{stroke:#7C5CFF}
.cg-walker{fill:#FFC233;stroke:#1B2559;stroke-width:2.5}
.cg-pt{fill:#1B2559;stroke:#fff;stroke-width:2} .cg-pt.accent{fill:var(--topic,#3B82F6)} .cg-pt.dim{opacity:.35} .cg-pt.star{fill:#FFC233;stroke:#1B2559;stroke-width:1.5} .cg-pt.star.accent{fill:#FF7A45}
.cg-plabel{font:900 15px var(--f4,Nunito,sans-serif);fill:#1B2559;paint-order:stroke;stroke:#fff;stroke-width:4px}
.cg-coord{font:700 12px var(--f4,Nunito,sans-serif);fill:#667085}
.cg-hit{cursor:crosshair}
.cg-mark-ring{fill:rgba(124,92,255,.18);stroke:#7C5CFF;stroke-width:3} .cg-mark-dot{fill:#7C5CFF}
svg.dg[tabindex]:focus-visible{outline:3px solid #FFC233;outline-offset:3px;border-radius:12px}
/* coordinate-pair answer */
.coord-in{display:flex;align-items:center;justify-content:center;gap:6px;margin:6px 0 12px;font:900 2rem var(--f4,Nunito,sans-serif);color:#1B2559}
.coord-in input{width:84px;text-align:center;font:900 1.6rem var(--f4,Nunito,sans-serif);padding:10px 6px;border:0;border-radius:14px;box-shadow:inset 0 0 0 2.5px #DCE3EE;color:#1B2559;background:#fff}
.coord-in input:focus{outline:none;box-shadow:inset 0 0 0 3px var(--topic,#3B82F6)}
.coord-in label{display:flex;flex-direction:column;align-items:center;font:800 .75rem var(--f4,Nunito,sans-serif);color:#667085;gap:2px}
.tap-note{font-weight:700;color:#667085;text-align:center;margin:4px 0 10px}
.tap-note.on{color:#5A3BE0}
/* coordinate_grid v2: distances, candidates, touch targets */
.cg-dist{stroke-width:6;stroke-linecap:round;opacity:.85} .cg-dist.dx{stroke:#3B82F6} .cg-dist.dy{stroke:#7C5CFF}
.cg-dtick{stroke-width:2.5} .cg-dtick.dx{stroke:#1D5FD1} .cg-dtick.dy{stroke:#5A3BE0}
.cg-dlabel{font:900 14px var(--f4,Nunito,sans-serif);paint-order:stroke;stroke:#fff;stroke-width:5px} .cg-dlabel.dx{fill:#1D5FD1} .cg-dlabel.dy{fill:#5A3BE0}
.cg-pt.cand{fill:#fff;stroke:#1B2559;stroke-width:2.5}
.cg-tgt{fill:rgba(0,0,0,0);pointer-events:all;cursor:pointer}
.cg-hover{fill:rgba(124,92,255,.12);stroke:#7C5CFF;stroke-width:2;stroke-dasharray:4 3;pointer-events:none}
.cg-mark{pointer-events:none}
.cg-btn{margin:8px auto 0;display:flex}
/* map style + illustrations (Coordinates) */
.cg-map{fill:#EEF7E6;stroke:#CFE3C0;stroke-width:2}
.cg-line.faint{stroke:rgba(27,37,89,.16)}
.cg-river{fill:none;stroke:#8CC8EE;stroke-width:9;stroke-linecap:round;opacity:.8}
.cg-tree{fill:#7CC08A}
.cg-mappath{fill:none;stroke:#E8D9B5;stroke-width:8;stroke-linecap:round;stroke-linejoin:round}
.cg-pt.pin{fill:#EC4899;stroke:#fff;stroke-width:1.5} .cg-pt.pin.accent{fill:#7C5CFF}
.cg-chest{fill:#F5B82E;stroke:#8A5200;stroke-width:1.5} .cg-chest.lid{fill:#FFD466}
.cg-house{fill:#FF7A45;stroke:#1B2559;stroke-width:2}
.cg-empty{fill:#fff;stroke:#1B2559;stroke-width:2.5;stroke-dasharray:5 4}
.il-stage{fill:#E8ECF2} .il-small{font:800 11px var(--f4,Nunito,sans-serif);fill:#667085}
.il-seat{fill:#fff;stroke:#1B2559;stroke-width:2} .il-seat.shade{fill:#E6E0FF} .il-seat.on{fill:#FFC233;stroke:#1B2559;stroke-width:3}
.il-area{fill:rgba(124,92,255,.14);stroke:#7C5CFF;stroke-width:2;stroke-dasharray:7 6}
.il-label{font:800 14px var(--f4,Nunito,sans-serif);fill:#1B2559} .il-label.x{fill:#1D5FD1} .il-label.strong{font-size:22px;font-weight:900}
.il-floor{fill:#E8DCC4} .il-head{fill:#FFD9B8;stroke:#1B2559;stroke-width:2} .il-body{stroke:#1B2559;stroke-width:4;stroke-linecap:round;fill:none}
.il-arrow{fill:none;stroke-width:4;stroke-linecap:round} .il-arrow.x{stroke:#3B82F6} .il-arrow.y{stroke:#7C5CFF} .il-head-x{fill:#3B82F6} .il-head-y{fill:#7C5CFF}
.il-building{fill:#F3F4F8;stroke:#1B2559;stroke-width:2} .il-floorline{stroke:#DCE3EE;stroke-width:1.5} .il-shaft{fill:#E6E0FF;stroke:#7C5CFF;stroke-width:1.5} .il-car{fill:#7C5CFF;stroke:#1B2559;stroke-width:1.5}
.opts.col1{grid-template-columns:1fr!important}.opts.col1 .opt{text-align:left;padding:12px 16px;font-size:1rem}
/* Fractions (World 7) */
.frv{width:100%}
.fr-cell{fill:#fff;stroke:#1B2559;stroke-width:1.5} .fr-cell.sh{fill:#F0645A} .fr-cell.piece{fill:#F59C95}
.fr-cell.rowsh{fill:rgba(240,100,90,.35)} .fr-cell.colsh{fill:rgba(124,92,255,.3)} .fr-cell.both{fill:#9B4FB4}
.fr-outline{fill:none;stroke:#1B2559;stroke-width:3}
.fr-axis{stroke:#1B2559;stroke-width:3} .fr-tick{stroke:#1B2559;stroke-width:2} .fr-tick.w{stroke-width:3}
.fr-num{font:800 13px var(--f4,Nunito,sans-serif);fill:#1B2559} .fr-num.strong{font-size:15px;fill:#B83A31}
.fr-mark{fill:#F0645A;stroke:#fff;stroke-width:3}
.fr-brace{fill:none;stroke-width:5;stroke-linecap:round} .fr-brace.r{stroke:#F0645A} .fr-brace.c{stroke:#7C5CFF}
.fr-rect{fill:#FDEDEB;stroke:#1B2559;stroke-width:3}
.fr-cap{text-align:center;font:800 1.05rem var(--f4,Nunito,sans-serif);color:#1B2559;margin:8px 0 0}
.fr-hidden{display:inline-flex;align-items:center;justify-content:center;min-width:34px;height:30px;padding:0 8px;border-radius:9px;background:#FFF3C4;color:#8A5200;font-weight:900;border:2px dashed #E0A800;margin:0 4px}
.fr-legend{display:grid;grid-template-columns:auto 1fr auto 1fr auto 1fr;gap:4px 6px;align-items:center;justify-content:center;font:700 .85rem var(--f4,Nunito,sans-serif);color:#1B2559;margin-top:8px}
.fr-legend .k{width:14px;height:14px;border-radius:4px;display:inline-block} .fr-legend .k.r{background:rgba(240,100,90,.5)} .fr-legend .k.c{background:rgba(124,92,255,.45)} .fr-legend .k.b{background:#9B4FB4}
.fr-barlabels{display:flex;flex-direction:column;align-items:center;gap:4px;font:800 .95rem var(--f4,Nunito,sans-serif);color:#1B2559;margin-top:6px}
.nt-card{background:#fff;border-radius:16px;padding:14px 16px;box-shadow:inset 0 0 0 2px #FDEDEB;display:flex;flex-direction:column;gap:10px;align-items:center}
.nt-line{margin:0;display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:6px;font:800 1.35rem var(--f4,Nunito,sans-serif);color:#1B2559}
.nt-op{color:#B83A31} .nt-word{font-size:.95rem;font-weight:700;color:#667085}
.it-grid{display:flex;flex-wrap:wrap;gap:10px;justify-content:center}
.it-card{display:flex;flex-direction:column;align-items:center;gap:4px;background:#fff;border-radius:14px;padding:10px 12px;box-shadow:inset 0 0 0 2px #FDEDEB;font:800 .95rem var(--f4,Nunito,sans-serif);color:#1B2559}
.it-card svg{width:40px;height:40px;fill:#FDEDEB;stroke:#B83A31;stroke-width:1.6;stroke-linejoin:round}
/* typeset fractions in text */
.mfr{display:inline-flex;align-items:center;gap:3px;vertical-align:middle;margin:0 1px}
.mfr-w{font-weight:inherit}
.mfr-s{display:inline-flex;flex-direction:column;align-items:center;line-height:1;font-size:.82em}
.mfr-n{padding:0 3px 2px;border-bottom:2px solid currentColor} .mfr-d{padding:2px 3px 0}
/* fraction answer boxes */
.fr-in{display:flex;align-items:center;justify-content:center;gap:10px;margin:6px 0 12px}
.fr-stack{display:inline-flex;flex-direction:column;align-items:center;gap:4px}
.fr-stack i{display:block;width:92px;height:4px;border-radius:2px;background:#1B2559}
.fr-in input{width:84px;text-align:center;font:900 1.5rem var(--f4,Nunito,sans-serif);padding:8px 4px;border:0;border-radius:14px;box-shadow:inset 0 0 0 2.5px #DCE3EE;color:#1B2559;background:#fff}
.fr-in input:focus{outline:none;box-shadow:inset 0 0 0 3px var(--topic,#F0645A)}
.fr-in .fr-w input,.fr-in input.fr-w{width:74px;height:74px;font-size:1.8rem}
.fr-box{display:flex;flex-direction:column;align-items:center;gap:2px;font:800 .72rem var(--f4,Nunito,sans-serif);color:#667085}
.opt .mfr-s{font-size:.9em}
/* Measurement (World 8) */
.msv{display:flex;flex-direction:column;align-items:center;gap:10px;width:100%}
.ms-ladder{display:flex;flex-direction:column;align-items:center;gap:0;padding:4px 0}
.ms-rung{min-width:92px;text-align:center;padding:8px 14px;border-radius:12px;background:#fff;border:2px solid #E6DAC8;font:900 1.15rem/1 var(--f4,Nunito,sans-serif);color:#1B2559}
.ms-rung.on{background:#FEF0E0;border-color:#F28A1E;color:#A65A0A;box-shadow:0 2px 0 #F28A1E}
.ms-step{display:flex;gap:14px;font:800 .82rem/1 var(--f4,Nunito,sans-serif);padding:6px 0}
.ms-step .dn{color:#A65A0A}.ms-step .up{color:#1D5FD1}
.ms-work{width:100%;max-width:340px}
.ms-res{color:#0A7F58;font-weight:900}
.ms-calc{width:100%;max-width:360px;border:2px solid #F7C99A;border-radius:14px;overflow:hidden;background:#fff}
.ms-row{display:grid;grid-template-columns:108px 1fr;border-top:1px solid #F7E2CB}
.ms-row:first-child{border-top:0}
.ms-row .k{background:#FEF0E0;color:#A65A0A;font:800 .78rem/1.2 var(--f4,Nunito,sans-serif);padding:10px;text-transform:uppercase;letter-spacing:.02em}
.ms-row .v{padding:9px 12px;font:800 1.02rem/1.35 var(--f4,Nunito,sans-serif);color:#1B2559}
.ms-steps{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:6px;padding:6px 0}
.ms-steps .st{background:#FEF0E0;border:2px solid #F28A1E;color:#A65A0A;border-radius:999px;padding:7px 12px;font:800 .88rem/1.2 var(--f4,Nunito,sans-serif)}
.ms-steps .st.dim{background:#F3F4F8;border-color:#D0D5DD;color:#98A2B3;border-style:dashed}
.ms-steps .arr{color:#A65A0A;font-weight:900}
.ms-ruler{fill:#FFF6D6;stroke:#1B2559;stroke-width:2}.ms-tick{stroke:#1B2559;stroke-width:2}
.ms-span{stroke:#F28A1E;stroke-width:4;stroke-linecap:round;fill:none}
.ms-lab{font:900 15px var(--f4,Nunito,sans-serif);fill:#1B2559}.ms-small{font:800 12px var(--f4,Nunito,sans-serif);fill:#667085}
.ms-post{stroke:#667085;stroke-width:6;stroke-linecap:round;fill:none}.ms-beam{stroke:#1B2559;stroke-width:6;stroke-linecap:round}
.ms-pivot{fill:#F28A1E}.ms-string{stroke:#98A2B3;stroke-width:2;fill:none}.ms-pan{fill:#E8ECF2;stroke:#1B2559;stroke-width:2}
.ms-weight{fill:#F28A1E;stroke:#1B2559;stroke-width:2}.ms-weight.b{fill:#FFC233}.ms-block{fill:#FFC233;stroke:#1B2559;stroke-width:1.5}
.fr-cell.sh.ms{fill:#F7B267}
.ms-total{font-weight:900;color:#A65A0A}.ms-barlabs{display:flex;flex-direction:column;gap:2px;align-items:center}
.ms-water{fill:#8CC8EE;opacity:.85}.ms-jug{fill:none;stroke:#1B2559;stroke-width:3;stroke-linejoin:round}
.ms-bottle{fill:#fff;stroke:#1B2559;stroke-width:2}.ms-bottle.full{fill:#BFE3F6}.ms-arrow{stroke:#F28A1E;stroke-width:4;stroke-linecap:round;marker-end:none}
.ms-scene{display:flex;flex-direction:column;align-items:center;gap:10px;width:100%;max-width:360px;background:#FFFBF5;border:2px solid #F7E2CB;border-radius:16px;padding:14px}
.ms-icons{display:flex;gap:12px;justify-content:center}
.ms-ico{width:56px;height:56px;fill:none;stroke:#A65A0A;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;background:#FEF0E0;border-radius:14px;padding:8px}
.ms-stext p{margin:0;text-align:center;font:800 1.02rem/1.4 var(--f4,Nunito,sans-serif);color:#1B2559}
.ms-cards{display:flex;gap:8px;flex-wrap:wrap;justify-content:center}
.ms-cards span{border:2px dashed #F28A1E;border-radius:10px;padding:6px 14px;font:900 1rem/1 var(--f4,Nunito,sans-serif);color:#A65A0A;background:#fff}
.res-hidden{display:inline-block;min-width:1.6em;text-align:center;background:#FEF0E0;border:2px dashed #F28A1E;border-radius:8px;color:#A65A0A;font-weight:900;padding:0 4px}
.ms-row .v{overflow-wrap:anywhere}.ms-work .nt-line{overflow-wrap:anywhere}
/* Install app card (v5.0) */
.install-card{display:grid;grid-template-columns:56px 1fr auto;gap:12px 14px;align-items:center;max-width:520px;margin:18px auto;padding:14px 16px;background:#fff;border-radius:18px;box-shadow:0 2px 0 rgba(27,37,89,.08),inset 0 0 0 2px #E6EAF5}
.install-card[hidden]{display:none}
.install-card img{width:56px;height:56px;border-radius:14px}
.inst-body{display:flex;flex-direction:column;gap:2px;min-width:0}
.inst-body b{font:800 1.02rem/1.25 var(--f4,Nunito,sans-serif);color:#1B2559}
.inst-body span{font-size:.9rem;line-height:1.35;color:#5B6478}
.inst-help{grid-column:1/-1;background:#F5F7FC;border-radius:12px;padding:10px 14px}
.inst-help[hidden]{display:none}
.inst-help ol{margin:0;padding-left:20px;line-height:1.6;color:#1B2559}
.inst-help ol[hidden]{display:none}
.inst-ic{display:inline-block;min-width:20px;text-align:center;font-weight:900;border:1.5px solid #1B2559;border-radius:5px;line-height:18px;font-size:.8rem}
@media (max-width:420px){.install-card{grid-template-columns:48px 1fr}.install-card img{width:48px;height:48px}.install-card [data-install-btn]{grid-column:1/-1;width:100%}}
@media (display-mode:standalone){.foot{padding-bottom:calc(16px + env(safe-area-inset-bottom))}}
.mini-pic.show{display:block;margin:6px 0 10px}.mini-pic.show svg.dg{max-height:220px}
/* Install prompt on arrival (v5.4) */
.ins-back{position:fixed;inset:0;background:rgba(15,22,60,.45);opacity:0;transition:opacity .25s;z-index:90}
.ins-back.on{opacity:1}
.ins-sheet{position:fixed;left:50%;bottom:0;transform:translate(-50%,105%);width:min(520px,100%);box-sizing:border-box;background:#fff;border-radius:24px 24px 0 0;padding:22px 22px calc(22px + env(safe-area-inset-bottom));text-align:center;z-index:91;transition:transform .3s ease;box-shadow:0 -10px 40px rgba(15,22,60,.25)}
.ins-sheet.on{transform:translate(-50%,0)}
.ins-sheet img{width:72px;height:72px;border-radius:18px;box-shadow:0 6px 16px rgba(22,32,91,.25)}
.ins-sheet h2{margin:12px 0 6px;font-size:1.3rem;color:#1B2559}
.ins-sheet p{margin:0 auto 14px;max-width:380px;color:#5B6478;line-height:1.45}
.ins-steps{text-align:left;margin:0 auto 14px;max-width:360px;background:#F5F7FC;border-radius:12px;padding:10px 14px 10px 32px;line-height:1.7;color:#1B2559}
.ins-steps[hidden]{display:none}
.ins-row{display:grid;grid-template-columns:1fr 1.4fr;gap:10px}
@media (prefers-reduced-motion:reduce){.ins-sheet,.ins-back{transition:none}}
/* v5.6 plotting in steps */
.cg-step-across{stroke:#3B82F6;stroke-width:5;stroke-linecap:round}
.cg-step-up{stroke:#7C5CFF;stroke-width:3;stroke-dasharray:6 6;opacity:.8}
.cg-step-dot{fill:#3B82F6;stroke:#fff;stroke-width:2}
/* Numbers (World 9), v5.8 */
.nl-axis{stroke:#1B2559;stroke-width:3}.nl-tick{stroke:#1B2559;stroke-width:2}.nl-lab{font:800 17px var(--f4,Nunito,sans-serif);fill:#1B2559}
.nl-small{font:800 15px var(--f4,Nunito,sans-serif);fill:#667085}.nl-half{stroke:#F28A1E;stroke-width:2;stroke-dasharray:4 4}
.nl-pt{fill:#7C5CFF;stroke:#fff;stroke-width:2}.nl-ptlab{font:900 18px var(--f4,Nunito,sans-serif);fill:#5B3FD9}.nl-span{fill:#DCD3FF;opacity:.8}
.nl-arrow{fill:none;stroke:#7C5CFF;stroke-width:2.5;stroke-dasharray:5 4}
.rs-jar{fill:#F5F8FF;stroke:#1B2559;stroke-width:3}.rs-dot{fill:#3B82F6}.rs-dot.ref{fill:#F28A1E}
.col-work,.ld-work{display:inline-flex;flex-direction:column;align-items:flex-end;font:900 1.6rem/1.35 ui-monospace,'SF Mono',Menlo,Consolas,monospace;color:#1B2559;background:#fff;border-radius:14px;padding:12px 18px;box-shadow:inset 0 0 0 2px #E6EAF5;margin:0 auto}
.col-row{display:flex}.col-sign{width:1.3em;text-align:left;color:#7C5CFF}.col-d{width:.72em;text-align:center}.col-d.q{color:#A65A0A;background:#FEF0E0;border-radius:4px}
.col-carry{font-size:.9rem;color:#F28A1E;line-height:1}.col-bar{align-self:stretch;border-top:3px solid #1B2559;margin:4px 0}
.ld-q{align-self:flex-end;border-bottom:3px solid #1B2559;min-width:4ch;text-align:right}.ld-row{display:flex}.ld-div{padding-right:.4em}
.ld-dd{border-left:3px solid #1B2559;padding-left:.35em;white-space:nowrap}.ld-q,.col-row{white-space:nowrap}.ld-step,.ld-rem{font-size:1.1rem;color:#5B6478}
.order-in{display:flex;flex-direction:column;gap:10px}.order-pool{display:flex;flex-wrap:wrap;gap:8px}
.chip-btn{font:800 1.05rem var(--f4,Nunito,sans-serif);padding:10px 14px;border-radius:12px;border:2px solid #C9D2EA;background:#fff;color:#1B2559;min-height:44px;cursor:pointer}
.chip-btn:disabled{opacity:.35}.order-line{min-height:44px;margin:0;padding:8px 8px 8px 30px;background:#F5F7FC;border-radius:12px;font-weight:800;color:#1B2559}
.num.words input{width:100%;font-size:1.05rem}
/* v5.9 place-value chart, bar model, quotient/remainder */
.pv-wrap{display:flex;flex-direction:column;align-items:center;width:100%;overflow-x:auto}
.pv-chart{border-collapse:separate;border-spacing:4px;margin:0 auto}
.pv-chart th{background:#EEF2FF;border-radius:10px;padding:6px 6px 4px;min-width:48px;color:#1B2559;font:900 1rem/1.1 var(--f4,Nunito,sans-serif)}
.pv-chart th small{display:block;font:700 .62rem/1.15 var(--f4,Nunito,sans-serif);color:#5B6478;margin-top:2px}
.pv-chart th.on{background:#7C5CFF;color:#fff}.pv-chart th.on small{color:#EDE7FF}
.pv-d{background:#fff;border:2px solid #D6DCF0;border-radius:10px;text-align:center;font:900 1.7rem/1.6 var(--f4,Nunito,sans-serif);color:#1B2559}
.pv-d.on{border-color:#7C5CFF;background:#F4F0FF}.pv-d.zero{color:#F28A1E;border-style:dashed;border-color:#F28A1E}
.pv-v{text-align:center;font:800 .8rem var(--f4,Nunito,sans-serif);color:#5B6478}.pv-v.on{color:#5B3FD9;font-weight:900}
.pv-note{font-size:.9rem;color:#A65A0A}
.bm-wrap{display:flex;flex-direction:column;gap:14px;width:100%;max-width:420px;margin:0 auto}
.bm-row{display:grid;grid-template-columns:auto 1fr;gap:10px;align-items:center}
.bm-label{font:800 .95rem var(--f4,Nunito,sans-serif);color:#1B2559;min-width:3.5em}
.bm-hold{display:flex;flex-direction:column;align-items:stretch}
.bm-bar{display:flex;height:48px;border:3px solid #1B2559;border-radius:8px;overflow:hidden;background:#fff}
.bm-part{display:flex;align-items:center;justify-content:center;border-right:2px solid #1B2559;font:900 1.1rem var(--f4,Nunito,sans-serif);color:#1B2559;min-width:0}
.bm-part:last-child{border-right:0}.bm-part.sh{background:#DCE9FF}.bm-part.unk{background:#FFF3C4;color:#8A5200}
.bm-total{text-align:center;font:900 1rem var(--f4,Nunito,sans-serif);color:#5B3FD9;border-top:2px solid #7C5CFF;margin-top:6px;padding-top:2px}
.qr-in{display:flex;gap:12px;flex-wrap:wrap}.qr-in label{display:flex;flex-direction:column;gap:4px;font:800 .9rem var(--f4,Nunito,sans-serif);color:#5B6478}
.qr-in input{width:9em;font:900 1.3rem var(--f4,Nunito,sans-serif);padding:10px 12px;border:2px solid #C9D2EA;border-radius:12px}
.pv-chart{width:100%;max-width:470px;table-layout:fixed;border-spacing:3px}
.pv-chart th{min-width:0;padding:5px 2px 4px;font-size:.95rem}.pv-chart th small{font-size:.52rem;overflow-wrap:normal;word-break:keep-all}
.pv-d{font-size:1.5rem}
@media (min-width:480px){.pv-chart th small{font-size:.66rem}.pv-d{font-size:1.8rem}}
/* v5.10 decimals & percentages */
.pv-pt{background:transparent!important;border:0!important;font:900 1.8rem var(--f4,Nunito,sans-serif);color:#0E9F9A;width:14px;padding:0!important}
.pv-dec th{background:#E2F6F5}.pv-dec th.on{background:#0E9F9A}
.hs-wrap{display:flex;flex-direction:column;align-items:center;width:100%}
.hs-cell{fill:#fff;stroke:#C9D2EA;stroke-width:.6}.hs-cell.on{fill:#34C3BD}.hs-out{fill:none;stroke:#1B2559;stroke-width:2}
/* v5.11 UASA assessment */
.ua-intro,.ua-result,.ua-revise,.ua-list{max-width:640px;margin:14px auto;background:#fff;border-radius:18px;padding:18px;box-shadow:0 2px 0 rgba(27,37,89,.06),inset 0 0 0 2px #E6EAF5}
.ua-rules{margin:10px 0 16px;padding-left:20px;line-height:1.7;color:#1B2559}
.ua-result{text-align:center}.ua-result.pass{box-shadow:inset 0 0 0 3px #22A06B}.ua-result.notyet{box-shadow:inset 0 0 0 3px #F28A1E}
.ua-score{font:900 2.4rem/1.1 var(--f4,Nunito,sans-serif);color:#1B2559;margin:4px 0}.ua-score span{display:block;font-size:1.2rem;color:#5B6478}
.ua-result.pass h1{color:#157A50}.ua-result.notyet h1{color:#A65A0A}
.ua-stats{list-style:none;padding:0;margin:14px 0 0;display:grid;grid-template-columns:repeat(2,1fr);gap:8px}
.ua-stats li{background:#F5F7FC;border-radius:12px;padding:8px}.ua-stats b{display:block;font-size:.8rem;color:#5B6478}.ua-stats span{font:900 1.15rem var(--f4,Nunito,sans-serif);color:#1B2559}
.ua-rev{display:grid;grid-template-columns:auto 1fr;gap:2px 10px;align-items:center;padding:10px;border-radius:12px;background:#FFF6EC;margin-top:8px;text-decoration:none;color:#1B2559}
.ua-rev small{grid-column:2;color:#A65A0A;font-weight:700}
.ua-q{border-left:5px solid #22A06B;padding:6px 10px;margin:8px 0;background:#F6FBF8;border-radius:8px}.ua-q.no{border-color:#E5484D;background:#FFF5F5}
.ua-actions{max-width:640px;margin:14px auto;display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.ua-saved{text-align:center;color:#5B6478;font-size:.9rem;min-height:1.2em}
/* v5.12 Money (World 11) */
.num.money{display:flex;align-items:center;gap:6px}.num.money .rm{font:900 1.3rem var(--f4,Nunito,sans-serif);color:#1E9E62}
.pv-money th{background:#E4F6EE}.pv-money th.on{background:#1E9E62}
.mn-tags{display:flex;flex-wrap:wrap;gap:12px;justify-content:center}
.mn-tag{position:relative;display:flex;flex-direction:column;align-items:center;min-width:110px;padding:12px 14px 10px 22px;background:#FFF9E6;border:2px solid #E0B43A;border-radius:6px 14px 14px 6px;clip-path:polygon(14px 0,100% 0,100% 100%,14px 100%,0 50%)}
.mn-tag::before{content:"";position:absolute;left:9px;top:50%;width:7px;height:7px;margin-top:-3.5px;border-radius:50%;background:#fff;border:2px solid #E0B43A}
.mn-tag-name{font:700 .9rem var(--f4,Nunito,sans-serif);color:#5B6478}.mn-tag-price{font:900 1.25rem var(--f4,Nunito,sans-serif);color:#1B2559}
.mn-receipt{width:100%;max-width:300px;margin:0 auto;background:#fff;padding:14px 16px;font:600 .95rem/1.55 ui-monospace,Menlo,Consolas,monospace;color:#1B2559;box-shadow:0 2px 10px rgba(27,37,89,.12);border-top:3px dashed #D6DCF0;border-bottom:3px dashed #D6DCF0}
.mn-shop{text-align:center;font:900 1rem var(--f4,Nunito,sans-serif);color:#1B2559;margin:0 0 8px}
.mn-line{display:flex;justify-content:space-between;gap:10px}.mn-cut{border-top:2px dashed #98A2B3;margin:6px 0}.mn-total b{font-weight:900}
.mn-cash{display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:center}
.mn-note{width:92px;height:48px;border-radius:6px;display:flex;align-items:center;justify-content:center;font:900 1rem var(--f4,Nunito,sans-serif);color:#1B2559;border:2px solid rgba(27,37,89,.35);background:linear-gradient(135deg,#E8F5E9,#C8E6C9)}
.mn-note.n1{background:linear-gradient(135deg,#E3F2FD,#BBDEFB)}.mn-note.n5{background:linear-gradient(135deg,#E8F5E9,#A5D6A7)}.mn-note.n10{background:linear-gradient(135deg,#FFEBEE,#FFCDD2)}
.mn-note.n20{background:linear-gradient(135deg,#FFF3E0,#FFE0B2)}.mn-note.n50{background:linear-gradient(135deg,#E0F7FA,#B2EBF2)}.mn-note.n100{background:linear-gradient(135deg,#F3E5F5,#E1BEE7)}
.mn-coin{width:54px;height:54px;border-radius:50%;display:flex;align-items:center;justify-content:center;text-align:center;font:900 .72rem/1 var(--f4,Nunito,sans-serif);color:#5B4A00;background:radial-gradient(circle at 35% 30%,#FFF4C2,#E6C35C);border:2px solid #B8962E}
.mn-jar-wrap{display:flex;flex-direction:column;align-items:center}.mn-jar-label{font:900 1rem var(--f4,Nunito,sans-serif);color:#1B2559;margin:0 0 6px}
.mn-jar{width:150px;height:170px;display:flex;flex-direction:column-reverse;border:4px solid #1B2559;border-top-width:10px;border-radius:14px 14px 26px 26px;overflow:hidden;background:#F5FBFF}
.mn-jar-band{display:flex;align-items:center;justify-content:center;font:800 .82rem var(--f4,Nunito,sans-serif);color:#5B4A00;background:#F7DC6F;border-top:2px solid #E6C35C}
.mn-bank-wrap{width:100%;overflow-x:auto}.mn-bank{border-collapse:collapse;margin:0 auto;font:700 .9rem var(--f4,Nunito,sans-serif);color:#1B2559;min-width:260px}
.mn-bank th{background:#E4F6EE;padding:6px 8px;text-align:left}.mn-bank td{padding:6px 8px;border-bottom:1px solid #E6EAF5;white-space:nowrap}
.mn-inc{color:#1E9E62;font-weight:800}
.mn-grow{display:flex;flex-direction:column;gap:12px;align-items:center;width:100%}
.mn-bars{display:flex;gap:14px;align-items:flex-end;height:120px;padding:0 6px;border-bottom:2px solid #1B2559}
.mn-bar-g{display:flex;gap:3px;align-items:flex-end;height:100%;position:relative;padding-bottom:16px}.mn-bar-g small{position:absolute;bottom:-2px;left:0;right:0;text-align:center;font-weight:800;color:#5B6478}
.mn-bar{width:16px;border-radius:4px 4px 0 0}.mn-bar.s{background:#7CB8F5}.mn-bar.c{background:#1E9E62}
.mn-inv{display:flex;align-items:center;gap:12px;justify-content:center;flex-wrap:wrap;font:900 1.3rem var(--f4,Nunito,sans-serif);color:#1B2559}
.mn-inv.up .mn-inv-arrow{color:#1E9E62}.mn-inv.down .mn-inv-arrow{color:#E5484D}.mn-inv-label{width:100%;text-align:center;font-size:.95rem;color:#5B6478;margin:0}
.mn-cards{display:grid;grid-template-columns:1fr 1fr;gap:10px;width:100%;max-width:420px;margin:0 auto}
.mn-card{border-radius:14px;padding:12px;background:#fff;box-shadow:inset 0 0 0 2px #D6DCF0;text-align:center}.mn-card.cash{box-shadow:inset 0 0 0 3px #1E9E62}.mn-card.credit{box-shadow:inset 0 0 0 3px #F28A1E}
.mn-card-t{font:900 .95rem var(--f4,Nunito,sans-serif);color:#5B6478;margin:0 0 6px}.mn-card-l{font:900 1.15rem var(--f4,Nunito,sans-serif);color:#1B2559;margin:2px 0}.mn-card-total{font:900 1rem var(--f4,Nunito,sans-serif);color:#A65A0A;margin:8px 0 0}
.mn-flow{display:flex;flex-direction:column;align-items:center;gap:4px}.mn-flow-step{padding:10px 16px;border-radius:12px;background:#F5F7FC;font:800 1rem var(--f4,Nunito,sans-serif);color:#1B2559;box-shadow:inset 0 0 0 2px #D6DCF0}
.mn-flow-step.last{background:#FFF1F1;box-shadow:inset 0 0 0 2px #E5484D;color:#B42318}.mn-flow-arrow{font:900 1.2rem sans-serif;color:#98A2B3}
.cls-in{display:flex;flex-direction:column;gap:10px}.cls-row{display:flex;flex-direction:column;gap:6px;padding:10px;border-radius:12px;background:#F5F7FC}
.cls-item{font:800 1rem var(--f4,Nunito,sans-serif);color:#1B2559;margin:0}.cls-cats{display:flex;flex-wrap:wrap;gap:6px}.cls-cats .chip-btn[aria-pressed=true]{background:#7C5CFF;color:#fff;border-color:#7C5CFF}
.cls-row select{font:700 1rem var(--f4,Nunito,sans-serif);padding:8px;border-radius:10px;border:2px solid #C9D2EA}
.mn-grow{max-width:100%;overflow-x:auto}.mn-grow .mn-bank{min-width:0;font-size:.85rem}.mn-grow .mn-bank td,.mn-grow .mn-bank th{white-space:normal;padding:5px 6px}.mn-grow .mn-inc{display:block;font-size:.75rem}
/* v5.14 Time (World 12) */
.tm-in input{width:6.5em}
.tm-face{fill:#fff;stroke:#1B2559;stroke-width:4}.tm-tick{stroke:#98A2B3;stroke-width:1.5}.tm-tick.big{stroke:#1B2559;stroke-width:3}
.tm-num{font:900 15px var(--f4,Nunito,sans-serif);fill:#1B2559}.tm-hour{stroke:#1B2559;stroke-width:7;stroke-linecap:round}.tm-min{stroke:#E5484D;stroke-width:4;stroke-linecap:round}
.tm-pin{fill:#1B2559}.tm-shade{fill:#FFD9A8;opacity:.9}
.tm-cal{width:100%;max-width:340px;margin:0 auto;background:#fff;border-radius:14px;padding:10px;box-shadow:inset 0 0 0 2px #E6EAF5}
.tm-cal-h{text-align:center;font:900 1.05rem var(--f4,Nunito,sans-serif);color:#1B2559;margin:0 0 6px}
.tm-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:3px}.tm-dow{font:800 .7rem var(--f4,Nunito,sans-serif);color:#5B6478;text-align:center}
.tm-day{text-align:center;font:800 .9rem/2 var(--f4,Nunito,sans-serif);color:#1B2559;border-radius:8px;background:#F5F7FC}
.tm-day.rg{background:#DDF3E6}.tm-day.mk{background:#7C5CFF;color:#fff}.tm-day.last{box-shadow:inset 0 0 0 2px #F28A1E}
.fr-cell.sh.tm{fill:#FFC98A}
.tm-col-wrap{display:flex;flex-direction:column;align-items:center}.tm-col{border-collapse:collapse;font:900 1.35rem ui-monospace,Menlo,Consolas,monospace;color:#1B2559;background:#fff;border-radius:12px}
.tm-col th{font:800 .85rem var(--f4,Nunito,sans-serif);color:#5B6478;padding:4px 14px}.tm-col td{text-align:right;padding:2px 14px}.tm-col tr.tm-ans td{border-top:3px solid #1B2559}
.tm-regroup{color:#A65A0A}
/* v5.15 calendar duration, leap year */
.tm-dur{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:6px}
.tm-dur-date{padding:8px 10px;border-radius:12px;background:#F5F7FC;box-shadow:inset 0 0 0 2px #D6DCF0;font:800 .95rem var(--f4,Nunito,sans-serif);color:#1B2559;white-space:nowrap}
.tm-dur-date.start{box-shadow:inset 0 0 0 2px #12A5A5}.tm-dur-date.end{box-shadow:inset 0 0 0 2px #7C5CFF}
.tm-dur-step{display:flex;flex-direction:column;align-items:center;font:900 .85rem var(--f4,Nunito,sans-serif);color:#0B7474}.tm-dur-arrow{font-size:1.2rem;color:#98A2B3}
.tm-leap{display:flex;flex-wrap:wrap;gap:10px;justify-content:center}.tm-leap-m{flex:1 1 150px;max-width:220px}.tm-leap-m .tm-cal{padding:6px}.tm-leap-m .tm-day{font-size:.75rem;line-height:1.6}
.tm-years{display:flex;gap:8px;flex-wrap:wrap;justify-content:center;width:100%}.tm-year{padding:6px 12px;border-radius:999px;background:#F5F7FC;font:800 .9rem var(--f4,Nunito,sans-serif);color:#1B2559}
.tm-year.leap{background:#DDF3E6;color:#157A50}.tm-year.hl{box-shadow:inset 0 0 0 2px #7C5CFF}
.rule-box{margin-top:10px;padding:10px 12px;border-radius:12px;background:#FFF6EC;box-shadow:inset 0 0 0 2px #F7C99A;color:#1B2559}.rule-box ul{margin:4px 0 0;padding-left:18px}
