/* realquickmath SAT Prep — design system v2 ("graph paper")
   Built from the logo: axis teal for actions, field green for correct, the orange wave used only for the signature curve, streak and XP.
   Cool off-white canvas, white surfaces, hairline borders instead of shadows. Manrope throughout, tabular figures for scores.
   Radius by size: 16 large panels, 12 cards, 10 controls, full for pills. */
@font-face{font-family:Manrope;font-style:normal;font-weight:200 800;font-display:swap;src:url(vendor/manrope/manrope-latin-wght-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:Manrope;font-style:normal;font-weight:200 800;font-display:swap;src:url(vendor/manrope/manrope-latin-ext-wght-normal.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
:root{color-scheme:light dark;
  --brand:light-dark(#1D5E57,#5CC4B4);--brand-strong:light-dark(#134640,#8AD9CC);--wave:#EE5B24;--field:#3E8E5B;
  --ink:light-dark(#173F3A,#5CC4B4);--green:#1F6B4F;--teal:#1D9A75;--logo-teal:#1D5E57;--cream:#EEEBCF;--paper:#F4F6F5;--sun:#E8A93B;
  --bg:light-dark(#F4F6F5,#0D1514);--surface:light-dark(#FFFFFF,#14201E);--surface2:light-dark(#F7F9F8,#1A2826);
  --text:light-dark(#14231F,#E6EEEB);--muted:light-dark(#5D6D68,#97ABA5);--line:light-dark(#DFE6E3,#263735);
  --accent:var(--brand);--accent-bg:light-dark(#E2F0EC,#17322E);
  --good:light-dark(#1D8A63,#4CC594);--ok:#7DB46A;--warn:#E8A93B;--bad:light-dark(#C8443B,#F07A6F);--mute-bg:light-dark(#EAF0EE,#1F2F2D);
  --right-bg:light-dark(#E1F4EC,#13342A);--wrong-bg:light-dark(#FBE7E4,#3A1F1D);
  --grid:light-dark(rgba(29,94,87,.075),rgba(92,196,180,.07));
  --r:12px;--rc:10px;--font:Manrope,system-ui,-apple-system,"Segoe UI",sans-serif;--shadow:0 1px 2px rgba(20,35,31,.05)}
:root[data-theme=light]{color-scheme:light!important}:root[data-theme=dark]{color-scheme:dark!important}
*{box-sizing:border-box;min-width:0}
html{-webkit-text-size-adjust:100%;scroll-padding:76px 0 150px}
body{margin:0;background:var(--bg);color:var(--text);font:500 16px/1.55 var(--font);overflow-x:clip;-webkit-font-smoothing:antialiased;font-feature-settings:'tnum' 0}
body.noscroll{overflow:hidden}
h1,h2,h3{margin:0;line-height:1.15;text-wrap:balance}
h1{font-size:clamp(26px,3.6vw,34px);font-weight:800;letter-spacing:-.025em}
h2{font-size:18px;font-weight:750;letter-spacing:-.012em}h3{font-size:16px;font-weight:700}
p{margin:.4em 0}a{color:var(--accent)}
.muted{color:var(--muted)}.small{font-size:13px}.num{font-variant-numeric:tabular-nums;white-space:nowrap}.r{text-align:right}
.row{display:flex;align-items:center}.gap{gap:10px}.wrap{flex-wrap:wrap}.between{justify-content:space-between}.grow{flex:1}
code{font-size:.9em;background:var(--mute-bg);padding:1px 5px;border-radius:5px}

/* controls */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:0 18px;border-radius:var(--rc);border:1px solid var(--line);background:var(--surface);color:var(--text);font:700 15px/1 var(--font);cursor:pointer;text-decoration:none;transition:background .15s,border-color .15s,transform .1s}
.btn:hover{border-color:var(--muted)}.btn:active{transform:scale(.98)}.btn:disabled{opacity:.45;cursor:default;transform:none}
.btn.primary{background:var(--brand);border-color:var(--brand);color:light-dark(#fff,#0D1514)}
.btn.primary:hover{background:var(--brand-strong);border-color:var(--brand-strong)}
.btn.danger{color:var(--bad);border-color:color-mix(in srgb,var(--bad) 40%,transparent)}
.btn.ghost{background:transparent;border-color:transparent;color:var(--muted)}.btn.ghost:hover{background:var(--mute-bg)}.btn.ghost.on{color:var(--accent)}
.btn.sm{min-height:38px;padding:0 12px;font-size:14px}.btn.big{min-height:52px;font-size:16px;padding:0 22px}.btn.block{width:100%}
.btn .ic{width:20px;height:20px}
.icon-btn{width:44px;height:44px;border:0;background:transparent;border-radius:12px;color:var(--text);cursor:pointer;display:grid;place-items:center}
.icon-btn:hover{background:var(--mute-bg)}.icon-btn svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
input,select,textarea{width:100%;min-height:46px;padding:10px 14px;border:1px solid var(--line);border-radius:var(--rc);background:var(--surface);color:var(--text);font:16px var(--font)}
textarea{resize:vertical}
input:focus,select:focus,textarea:focus,.btn:focus-visible,a:focus-visible,button:focus-visible,summary:focus-visible{outline:3px solid color-mix(in srgb,var(--brand) 55%,transparent);outline-offset:2px;border-color:var(--brand)}
.lbl{display:block;font-weight:600;font-size:14px;margin:14px 0 6px}
.err{color:var(--bad);font-size:14px;min-height:1.2em;margin:8px 0 0}
.hint{color:var(--muted);font-size:13px}
.switch{display:flex;gap:10px;align-items:flex-start;margin:16px 0 4px;font-size:15px;cursor:pointer}.switch input{width:20px;height:20px;min-height:0;margin-top:2px;accent-color:var(--brand)}
.seg{display:flex;gap:4px;padding:4px;background:var(--mute-bg);border-radius:var(--rc);overflow-x:auto;scrollbar-width:none}
.seg button{flex:1 0 auto;min-height:40px;padding:0 14px;border:0;border-radius:7px;background:transparent;color:var(--muted);font:700 14px var(--font);cursor:pointer;white-space:nowrap}
.seg button.on{background:var(--surface);color:var(--text);box-shadow:0 1px 2px rgba(20,35,31,.08),0 0 0 1px var(--line)}.seg.small button{min-height:36px;padding:0 10px}
.chip{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:99px;font-size:13px;font-weight:600;background:color-mix(in srgb,var(--c,var(--ink)) 13%,transparent);color:light-dark(color-mix(in srgb,var(--c,var(--ink)) 85%,#000),color-mix(in srgb,var(--c,#fff) 55%,#fff))}
.chip.plain{--c:var(--muted)}
.pill{display:inline-block;min-width:46px;text-align:center;padding:3px 8px;border-radius:99px;font-size:13px;font-weight:700;background:color-mix(in srgb,var(--c) 20%,transparent);color:light-dark(color-mix(in srgb,var(--c) 70%,#000),color-mix(in srgb,var(--c) 60%,#fff))}
.badge{display:inline-block;padding:3px 9px;border-radius:8px;font-size:13px;font-weight:600;background:var(--mute-bg);color:var(--muted);white-space:nowrap}
.badge.ok{background:var(--right-bg);color:var(--good)}.badge.no{background:var(--wrong-bg);color:var(--bad)}
.badge.r-admin{background:var(--accent-bg);color:var(--accent)}.badge.r-teacher{background:light-dark(#E5ECFA,#22305A);color:light-dark(#2F57B8,#9DB5F2)}
.bar{height:6px;border-radius:9px;background:var(--mute-bg);overflow:hidden;margin-top:6px}.bar i{display:block;height:100%;border-radius:9px;background:var(--brand)}
.sw{width:10px;height:10px;border-radius:3px;flex:none}

/* shell */
.shell{min-height:100dvh}
.brand{display:flex;align-items:center;gap:10px;font-size:18px}.brand b{font-weight:800;letter-spacing:-.01em}.brand span{color:var(--muted);font-weight:600}
.logo{width:36px;height:36px;flex:none;border-radius:50%;object-fit:cover}
.side{display:none}
.topbar{position:sticky;top:0;z-index:20;display:flex;justify-content:space-between;align-items:center;padding:10px 16px;padding-top:max(10px,env(safe-area-inset-top));background:color-mix(in srgb,var(--bg) 88%,transparent);backdrop-filter:blur(10px);border-bottom:1px solid var(--line)}
.avatar{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;background:var(--accent-bg);color:var(--brand);font-weight:800;font-size:14px;text-decoration:none;flex:none}
#main{padding:18px 16px calc(96px + env(safe-area-inset-bottom));max-width:1180px;margin:0 auto;outline:none}
.tabbar{position:fixed;inset:auto 0 0 0;z-index:30;display:flex;background:var(--surface);border-top:1px solid var(--line);padding-bottom:env(safe-area-inset-bottom)}
.tabbar a{flex:1;display:flex;flex-direction:column;align-items:center;gap:2px;padding:8px 2px 7px;min-height:58px;color:var(--muted);text-decoration:none;font-size:11.5px;font-weight:600}
.tabbar svg,.side nav svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.tabbar a.on{color:var(--brand)}.tabbar a.on svg{stroke-width:2.2}
@media(min-width:900px){
  .shell{display:grid;grid-template-columns:248px 1fr}
  .topbar,.tabbar{display:none}
  .shell{grid-template-columns:240px 1fr}
  .side{display:flex;flex-direction:column;gap:22px;position:sticky;top:0;height:100dvh;padding:20px 12px;background:var(--surface);color:var(--text);border-right:1px solid var(--line)}
  .side .brand{padding:2px 10px 0;font-size:17px}
  .side nav{display:flex;flex-direction:column;gap:2px}
  .side nav a{display:flex;align-items:center;gap:12px;padding:9px 12px;border-radius:var(--rc);color:var(--muted);text-decoration:none;font-weight:650;font-size:15px}
  .side nav svg{width:20px;height:20px}
  .side nav a:hover{background:var(--mute-bg);color:var(--text)}.side nav a.on{background:var(--accent-bg);color:var(--brand)}.side nav a.on svg{stroke-width:2.2}
  .side .me{margin-top:auto;display:flex;gap:10px;align-items:center;padding:12px 10px;border-radius:var(--rc);color:var(--text);text-decoration:none;border-top:1px solid var(--line);border-radius:0}
  .side .me:hover{background:var(--surface2)}.side .me small{display:block;color:var(--muted);text-transform:capitalize}.side .me b{display:block;font-size:14px}
  #main{padding:32px 44px 64px}
}

/* pages */
.page{display:flex;flex-direction:column;gap:18px}.page.narrow{max-width:640px}
.page-h p{margin-top:6px}
.back{color:var(--muted);text-decoration:none;font-weight:600;font-size:14px}
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:20px}
.card.flush{padding:0;overflow:hidden}.pad{padding:18px}
.card-h{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:10px}.card-h a{font-weight:600;font-size:14px;text-decoration:none}
.two{display:grid;gap:18px}@media(min-width:760px){.two{grid-template-columns:repeat(2,minmax(0,1fr))}}
.hello{display:flex;flex-direction:column;gap:18px;justify-content:center;align-items:flex-start;min-height:196px;background-color:var(--surface);background-image:linear-gradient(var(--grid) 1px,transparent 1px),linear-gradient(90deg,var(--grid) 1px,transparent 1px);background-size:24px 24px;background-position:-1px -1px;border:1px solid var(--line);border-radius:16px;padding:26px 28px;position:relative;overflow:hidden}
.hello::before{content:"";position:absolute;inset:0 0 0 auto;width:min(52%,600px);background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-10 0 670 176' preserveAspectRatio='none'%3E%3Cpath d='M0 96H640' stroke='%231D5E57' stroke-opacity='.28' stroke-width='1.5'/%3E%3Cpath d='M0 96C40 96 60 52 110 52S180 140 230 140S300 44 350 44S420 132 470 132S540 36 590 36S630 96 640 96' fill='none' stroke='%23EE5B24' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E") right center/100% 100% no-repeat;-webkit-mask-image:linear-gradient(90deg,transparent,#000 45%);mask-image:linear-gradient(90deg,transparent,#000 45%);pointer-events:none}
.hello>*{position:relative;z-index:1}.hello h1{font-size:clamp(28px,4vw,40px)}.hello .muted{color:var(--muted);max-width:46ch}
.hello .btn.primary{box-shadow:0 0 0 5px var(--surface)}
@media(max-width:700px){.hello{padding:22px 20px 76px}.hello::before{inset:auto 0 0 0;width:100%;height:64px;-webkit-mask-image:none;mask-image:none}}
.kpis{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0;background:var(--surface);border:1px solid var(--line);border-radius:var(--r);overflow:hidden}@media(min-width:700px){.kpis{grid-template-columns:repeat(4,minmax(0,1fr))}}
.kpi{padding:16px 20px;box-shadow:-1px -1px 0 var(--line)}
.kpi span{display:flex;align-items:center;gap:6px;color:var(--muted);font-size:13px;font-weight:650}.kpi b{display:block;font-size:clamp(24px,3.4vw,30px);font-weight:800;letter-spacing:-.02em;margin-top:4px;font-variant-numeric:tabular-nums}
.ic{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.kpi .ic{color:var(--muted)}.kpi:first-child .ic,.kpi:nth-child(2) .ic{color:var(--wave)}
.li{display:flex;align-items:center;gap:12px;padding:11px 0;border-top:1px solid var(--line);width:100%;text-align:left;background:none;border-left:0;border-right:0;border-bottom:0;color:inherit;font:inherit}
.li:first-of-type{border-top:0}.li .grow{display:flex;flex-direction:column;gap:1px}.li .grow .muted{font-size:13px}
.card.flush .li,.card#fl .li{padding:12px 16px}
button.li{cursor:pointer}button.li:hover{background:var(--surface2)}
.dom-row{display:flex;align-items:center;gap:12px;padding:8px 0}.dom-row .grow b{font-size:14px}
.w40{width:30%}
.empty{text-align:center;padding:36px 18px;display:flex;flex-direction:column;align-items:center;gap:8px}
.action-card{display:flex;flex-direction:column;gap:8px;align-items:flex-start;border-left:3px solid var(--brand)}
.hw-due{border-color:color-mix(in srgb,var(--brand) 45%,var(--line))}
.code-card{display:flex;align-items:center;gap:12px;background:var(--surface);border:1px dashed var(--brand);border-radius:var(--r);padding:8px 8px 8px 16px}.code-card b{font-size:22px;letter-spacing:.08em}
.facts{display:grid;grid-template-columns:auto 1fr;gap:8px 16px;margin:18px 0}.facts dt{color:var(--muted)}.facts dd{margin:0}
.loading{height:40vh;display:grid;place-items:center}.loading::after{content:"";width:34px;height:34px;border-radius:50%;border:3px solid var(--mute-bg);border-top-color:var(--brand);animation:spin .8s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}

/* tables */
table.data{width:100%;border-collapse:collapse;font-size:15px}
table.data th{text-align:left;font-size:13px;color:var(--muted);font-weight:600;padding:12px 16px;border-bottom:1px solid var(--line);background:var(--surface2)}
table.data td{padding:12px 16px;border-bottom:1px solid var(--line);vertical-align:middle}
table.data tr[data-id]{cursor:pointer}table.data tr[data-id]:hover td{background:var(--surface2)}
table.data th.r,table.data td.r{text-align:right}
@media(max-width:760px){
  table.data.stack thead{display:none}table.data.stack tr{display:grid;padding:14px 16px;border-bottom:1px solid var(--line)}
  table.data.stack td{display:flow-root;border:0;padding:4px 0 4px 7.5em;text-align:start!important}
  table.data.stack td::before{content:attr(data-l);float:left;width:7em;margin-left:-7.5em;color:var(--muted);font-size:13px;padding-top:2px}
  table.data.stack td:first-child{padding-left:0;padding-bottom:6px}table.data.stack td:first-child::before{display:none}table.data.stack td:empty{display:none}
}
/* builder + topic picker */
.builder{display:grid;gap:18px;align-items:start}
@media(min-width:980px){.builder{grid-template-columns:minmax(0,1fr) 320px}.opts{position:sticky;top:24px}}
.opts h2{margin-bottom:2px}.avail{margin:16px 0 12px;font-size:14px;color:var(--muted)}
.gobar{display:none}
@media(max-width:979px){.gobar{display:flex;position:fixed;left:0;right:0;bottom:calc(58px + env(safe-area-inset-bottom));z-index:25;gap:10px;align-items:center;padding:10px 16px;background:var(--surface);border-top:1px solid var(--line);box-shadow:0 -6px 18px rgba(0,0,0,.06)}
  .gobar span{flex:1;font-size:13px;color:var(--muted);line-height:1.3}.gobar .btn{flex:none}
  body:has(.gobar) #main{padding-bottom:calc(170px + env(safe-area-inset-bottom))}}
.pick .seg{margin-bottom:12px}
.topics{display:flex;flex-direction:column}
.topic{border-top:1px solid var(--line)}.topic:first-child{border-top:0}
.topic summary{display:flex;align-items:center;gap:12px;padding:12px 2px;cursor:pointer;list-style:none;min-height:56px}
.topic summary::-webkit-details-marker{display:none}
.topic summary .grow{display:flex;flex-direction:column}.topic summary .muted{font-size:13px}
.topic summary::after{content:"";width:9px;height:9px;border-right:2px solid var(--muted);border-bottom:2px solid var(--muted);transform:rotate(45deg);margin:0 6px 4px 0;transition:transform .2s}
.topic[open] summary::after{transform:rotate(225deg);margin-bottom:-4px}
.tick{display:grid;place-items:center;width:44px;height:44px}.tick input,.sub input{width:22px;height:22px;min-height:0;accent-color:var(--brand);flex:none}
.subs{padding:0 0 10px 22px;display:flex;flex-direction:column}
.sub{display:flex;align-items:center;gap:12px;min-height:46px;padding:4px 8px;border-radius:10px;cursor:pointer;font-size:15px}.sub:hover{background:var(--surface2)}
.checks{display:flex;flex-direction:column;max-height:280px;overflow:auto;border:1.5px solid var(--line);border-radius:12px;padding:4px}

/* progress map */
.legend{display:flex;flex-wrap:wrap;gap:6px 16px;font-size:13px;color:var(--muted);margin-bottom:6px}.legend span{display:flex;align-items:center;gap:6px}.legend i{width:12px;height:12px;border-radius:4px}
.dom-h{display:flex;align-items:center;gap:8px;margin:22px 0 10px}
.mastery{display:grid;gap:12px}@media(min-width:700px){.mastery{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(min-width:1200px){.mastery{grid-template-columns:repeat(3,minmax(0,1fr))}}
.m-topic{border:1px solid var(--line);border-radius:12px;padding:10px;background:var(--surface)}
.m-th{display:flex;justify-content:space-between;gap:8px;padding:2px 4px 6px;font-size:14px}
.m-sub{display:flex;align-items:center;gap:10px;width:100%;min-height:40px;padding:6px;border:0;background:none;border-radius:8px;color:inherit;font:14px var(--font);text-align:left;cursor:pointer}
div.m-sub{cursor:default}button.m-sub:hover{background:var(--surface2)}
.m-sub i{width:14px;height:14px;border-radius:4px;flex:none}

/* runner */
.runner{max-width:820px;margin:0 auto;display:flex;flex-direction:column;gap:12px}
body:has(.runner) .tabbar{display:none}body:has(.runner) #main{padding-bottom:calc(110px + env(safe-area-inset-bottom))}
.run-top{display:flex;align-items:center;gap:8px}.run-title{flex:1;display:flex;flex-direction:column;line-height:1.25}.run-title span{color:var(--muted);font-size:13px}
.clock{font:700 18px/1 var(--font);font-variant-numeric:tabular-nums;padding:9px 12px;border-radius:10px;background:var(--surface);border:1px solid var(--line)}
.clock.soft{background:none;border:0;color:var(--muted);font-weight:600;font-size:15px}.clock.low{color:#fff;background:var(--bad);border-color:var(--bad)}
.progress{height:6px;border-radius:9px;background:var(--mute-bg);overflow:hidden}.progress i{display:block;height:100%;background:var(--brand);transition:width .3s}
.dots{display:flex;gap:6px;overflow-x:auto;padding:2px 2px 6px;scrollbar-width:thin}
.dot{flex:none;width:36px;height:36px;border-radius:10px;border:1.5px solid var(--line);background:var(--surface);color:var(--muted);font:600 13px var(--font);cursor:pointer}
.dot.cur{border-color:var(--ink);color:var(--text);box-shadow:inset 0 0 0 1px var(--ink)}
:root:not([data-theme=light]) .dot.cur{border-color:light-dark(var(--ink),#fff)}
.dot.answered{background:var(--mute-bg);color:var(--text)}.dot.right{background:var(--right-bg);color:var(--good);border-color:var(--good)}.dot.wrong{background:var(--wrong-bg);color:var(--bad);border-color:var(--bad)}
.dot.marked{position:relative}.dot.marked::after{content:"";position:absolute;top:-3px;right:-3px;width:10px;height:10px;border-radius:50%;background:var(--sun)}
.qcard{background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:clamp(16px,3vw,28px)}
.qhead{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-bottom:12px}
.diff{font-size:13px;font-weight:600;color:var(--muted);letter-spacing:.02em}.diff.d3{color:var(--accent)}
.qbody{font-size:17px;line-height:1.65}.qbody p{margin:.5em 0}
.disp{overflow-x:auto;overflow-y:hidden;padding:6px 0;text-align:center}
.qfig{margin:12px 0;text-align:center}.qfig img{max-width:100%;height:auto;border-radius:8px;background:#fff;padding:4px}
.tbl-wrap{overflow-x:auto;margin:10px 0}
.qtable{border-collapse:collapse;margin:0 auto;font-size:15px}.qtable th,.qtable td{border:1px solid var(--line);padding:7px 12px;text-align:center}.qtable th{background:var(--surface2);font-weight:700}
.choices{display:grid;gap:10px;margin-top:16px}
.choice{display:flex;align-items:center;gap:14px;width:100%;min-height:56px;padding:10px 14px;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--text);font:500 16px var(--font);text-align:left;cursor:pointer;transition:border-color .15s,background .15s}
.choice:hover:not(:disabled){border-color:var(--brand);background:var(--surface2)}
.choice .L{flex:none;width:32px;height:32px;border-radius:50%;display:grid;place-items:center;border:1.5px solid var(--line);font-weight:800;font-size:14px}
.choice .c{flex:1;overflow-x:auto}
.choice.sel{border-color:var(--brand);background:var(--accent-bg);box-shadow:inset 0 0 0 1px var(--brand)}.choice.sel .L{background:var(--ink);color:#fff;border-color:var(--ink)}
.choice.right{border-color:var(--good);background:var(--right-bg)}.choice.right .L{background:var(--good);border-color:var(--good);color:#fff}
.choice.wrong{border-color:var(--bad);background:var(--wrong-bg)}.choice.wrong .L{background:var(--bad);border-color:var(--bad);color:#fff}
.choice.dim{opacity:.6}.choice:disabled{cursor:default}
.grid-in{margin-top:16px}.gi-row input{font-size:22px;font-weight:700;max-width:280px;min-height:56px}
.gi-row input.right{border-color:var(--good);background:var(--right-bg)}.gi-row input.wrong{border-color:var(--bad);background:var(--wrong-bg)}
.verdict{margin-top:18px;padding:12px 16px;border-radius:12px;font-weight:800;font-size:17px}.verdict.ok{background:var(--right-bg);color:var(--good)}.verdict.no{background:var(--wrong-bg);color:var(--bad)}
.solution{margin-top:12px;padding:16px;border-radius:14px;background:var(--surface2);border:1px solid var(--line);font-size:16px}
.solution p{margin:.45em 0}.sol-ans{font-size:15px;color:var(--muted);margin-bottom:6px}.sol-ans b{color:var(--text)}
.run-actions{position:fixed;inset:auto 0 0 0;z-index:30;background:var(--surface);border-top:1px solid var(--line);padding:10px 16px calc(10px + env(safe-area-inset-bottom));display:flex;flex-wrap:wrap;gap:8px;justify-content:space-between;align-items:center}
.run-actions .tools{display:flex;gap:2px;flex-wrap:wrap}.run-actions .nav{display:flex;gap:8px;margin-left:auto}
@media(max-width:560px){.run-actions .tools{width:100%;justify-content:space-between}.run-actions .nav{width:100%}.run-actions .nav .btn{flex:1}.run-actions .nav .btn[data-prev]{flex:0 0 auto}}
@media(min-width:900px){.run-actions{left:240px}}

/* results */
.results{max-width:820px;margin:0 auto;display:flex;flex-direction:column;gap:14px}
.res-hero{display:flex;flex-wrap:wrap;gap:24px;align-items:center;background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:24px}
.res-hero>div:last-child{flex:1 1 260px}
.ring{--p:0;width:120px;height:120px;border-radius:50%;flex:none;display:grid;place-items:center;background:conic-gradient(var(--brand) calc(var(--p)*1%),var(--mute-bg) 0)}
.ring b{width:96px;height:96px;border-radius:50%;background:var(--surface);display:grid;place-items:center;font-size:30px;font-weight:800}.ring small{font-size:16px;color:var(--muted)}
.results h2{margin-top:10px}.results .list{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:4px 16px}
.badge.ok,.badge.no{min-width:28px;text-align:center}

/* modal + toast */
.modal-wrap{position:fixed;inset:0;z-index:100;background:rgba(9,22,20,.45);backdrop-filter:blur(2px);display:flex;align-items:flex-end;justify-content:center;padding:0}
.modal{background:var(--surface);width:100%;max-width:560px;max-height:92dvh;overflow:auto;border-radius:16px 16px 0 0;padding:24px 22px calc(18px + env(safe-area-inset-bottom));box-shadow:0 24px 64px rgba(9,22,20,.28)}
.modal.wide{max-width:860px}
@media(min-width:700px){.modal-wrap{align-items:center;padding:24px}.modal{border-radius:16px}}
.modal h3{margin-bottom:6px;font-size:19px}.modal-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:18px;flex-wrap:wrap}
.modal-q .qhead{margin-top:10px}.qid{font:600 12px ui-monospace,Menlo,monospace;color:var(--muted)}
.edit-box{margin-top:18px;padding-top:14px;border-top:1px solid var(--line)}
.calc-head{display:flex;justify-content:space-between;align-items:center}
.calc-frame{height:min(70dvh,560px);border:1px solid var(--line);border-radius:12px;overflow:hidden;margin-top:10px;background:var(--surface2)}.calc-frame iframe{width:100%;height:100%;border:0}
.toast{position:fixed;left:50%;bottom:calc(84px + env(safe-area-inset-bottom));transform:translateX(-50%);z-index:200;background:light-dark(#14231F,#E6EEEB);color:light-dark(#fff,#14231F);padding:12px 18px;border-radius:12px;font-weight:600;box-shadow:0 8px 24px rgba(0,0,0,.25);max-width:calc(100vw - 32px);transition:opacity .3s}
.toast.bad{background:var(--bad)}.toast.out{opacity:0}

/* bank + filters */
.filters-card{display:flex;flex-direction:column;gap:10px}
.fgrid{display:grid;gap:10px;grid-template-columns:repeat(auto-fit,minmax(170px,1fr))}
.bq .qprev{display:block;font-size:15px;margin:2px 0;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.pager{display:flex;gap:12px;align-items:center;justify-content:center}

/* auth */
body.is-auth{background:#173F3A}
.auth{min-height:100dvh;display:grid}
.auth-art{display:none;color:#fff;padding:48px;flex-direction:column;justify-content:center;gap:14px;background-color:#173F3A;background-image:linear-gradient(rgba(238,235,207,.06) 1px,transparent 1px),linear-gradient(90deg,rgba(238,235,207,.06) 1px,transparent 1px);background-size:32px 32px}
.auth-art .art-logo{width:132px;height:132px;border-radius:50%;box-shadow:0 10px 30px rgba(0,0,0,.25)}
.auth-art .brand b{color:var(--cream)}.auth-art .brand span{color:rgba(238,235,207,.7)}
.auth-art h1 em{font-style:normal}.auth-art .handle{color:var(--cream);font-weight:700;opacity:.9}
.auth-art h1{font-size:clamp(44px,5.4vw,68px);line-height:.98;letter-spacing:-.035em;color:var(--cream)}.auth-art p{color:rgba(237,236,204,.82);max-width:420px;font-size:17px}
.auth-art .art{width:100%;max-width:460px;margin-top:10px}
.auth-form{background:var(--bg);padding:max(28px,env(safe-area-inset-top)) 20px 40px;display:flex;flex-direction:column;gap:16px;justify-content:center;max-width:520px;width:100%;margin:0 auto}
.brand.small{justify-content:center;margin-bottom:6px}
.demo-box{border:1px dashed var(--brand);border-radius:var(--r);padding:14px 16px;display:flex;flex-direction:column;gap:6px}
@media(min-width:900px){.auth{grid-template-columns:1.1fr 1fr}.auth-art{display:flex}.auth-form{max-width:none;padding:48px clamp(32px,6vw,96px);border-radius:0}.brand.small{display:none}}
.boot,.boot-err{min-height:100dvh;display:grid;place-items:center;padding:24px;text-align:center}
@media(prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
.katex{font-size:1.05em}.katex-display{margin:.4em 0}
button,input,select,textarea{font-family:var(--font)}
.katex-display{overflow-x:auto;overflow-y:hidden;padding:2px 0}
@media(max-width:560px){.solution .katex-display,.disp .katex-display{font-size:.92em}.qbody{font-size:16.5px}}
.ring b{display:flex;flex-wrap:wrap;align-items:baseline;align-content:center;justify-content:center;letter-spacing:-.02em}
body:has(.runner) .topbar{display:none}
@media(max-width:560px){.run-actions{padding-top:6px}.run-actions .tools{flex-wrap:nowrap;gap:0}.run-actions .tools .btn{padding:0 6px;font-size:13px;min-height:36px;white-space:nowrap}}
/* picture choices: each graph is its own answer card */
.choices.pics{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.choices.pics .choice{flex-direction:column;align-items:stretch;gap:8px;padding:10px;position:relative}
.choices.pics .choice .L{position:absolute;top:8px;left:8px;z-index:1;background:var(--surface)}
.choices.pics .choice .c{overflow:visible;display:block}
.choices.pics .choice img{display:block;width:100%;height:auto;border-radius:8px;background:#fff}
.choices.pics .choice.dim{opacity:.55}
@media(max-width:380px){.choices.pics{gap:8px}.choices.pics .choice{padding:6px}}
.choices.pics{max-width:640px;margin-inline:auto}
.choices.pics .choice.sel .L{background:var(--ink);color:#fff;border-color:var(--ink)}
.choices.pics .choice.right .L{background:var(--good);color:#fff;border-color:var(--good)}
.choices.pics .choice.wrong .L{background:var(--bad);color:#fff;border-color:var(--bad)}
.choices.pics .choice{gap:6px}
.choices.pics .choice .L{position:static;width:28px;height:28px;font-size:13px}

/* ── Bluebook-style split question view (wide screens) ── */
.qnum-bar{display:none}
.divider{display:none}
@media(min-width:1024px){
  body:has(.runner) .shell{grid-template-columns:1fr}
  body:has(.runner) .side{display:none}
  body:has(.runner) #main{max-width:none;width:100%;margin:0;padding:14px 22px 0}
  body:has(.runner) .run-actions{left:0}
  .runner{max-width:none;height:calc(100dvh - 14px - 68px);gap:10px}
  .runner .dots{flex:none}
  .qcard.split{flex:1;min-height:0;display:grid;grid-template-columns:minmax(0,var(--lw,60%)) 16px minmax(0,1fr);padding:0;overflow:hidden;border-radius:16px}
  .qcard.split .pane{overflow-y:auto;overscroll-behavior:contain;padding:26px 30px 40px;scrollbar-width:thin}
  .qcard.split .pane-l .qbody{font-size:17.5px}
  .qcard.split .pane-l .qfig img{max-width:min(100%,560px)}
  .divider{display:flex;align-items:center;justify-content:center;cursor:col-resize;background:var(--surface2);border-inline:1px solid var(--line);touch-action:none;outline:none}
  .divider span{width:6px;height:44px;border-radius:6px;background:var(--line);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--muted) 35%,transparent);transition:background .15s}
  .divider:hover span,.divider:focus-visible span,.qcard.dragging .divider span{background:var(--brand)}
  .qcard.dragging{user-select:none;cursor:col-resize}
  .qnum-bar{display:flex;align-items:center;gap:12px;margin:-4px 0 6px;padding-bottom:12px;border-bottom:2px dashed var(--line)}
  .qnum{display:grid;place-items:center;min-width:34px;height:34px;padding:0 8px;border-radius:8px;background:light-dark(#14231F,#E6EEEB);color:light-dark(#fff,#14231F);font-weight:800;font-size:16px}
  .qnum-note{color:var(--muted);font-weight:600;font-size:14px}
  .mark-btn{display:inline-flex;align-items:center;gap:6px;border:0;background:none;color:var(--text);font:600 14px var(--font);cursor:pointer;padding:6px 8px;border-radius:8px}
  .mark-btn svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linejoin:round}
  .mark-btn.on{color:var(--brand)}.mark-btn.on svg{fill:var(--brand);stroke:var(--brand)}.mark-btn:hover{background:var(--mute-bg)}
  .run-actions [data-mark]{display:none}
  .qcard.split .pane-r .choices{margin-top:14px}
  .qcard.split .pane-r>*{max-width:600px}
  .qcard.split .pane-l>*{max-width:820px;margin-inline:auto}
  .qcard.split .pane-l .qbody{font-size:18px}
  .qcard.split .pane-l .qfig img{max-width:min(100%,600px)}
  .qcard.split .pane-r .choices.pics{max-width:640px;margin-inline:0}
  .qcard.split #feedback .verdict{margin-top:16px}
}
.nb{white-space:nowrap}
@media(min-width:1024px){
  .qcard.split .pane-r .choices.pics{max-width:min(600px,calc((100dvh - 330px) * 1.05));gap:12px}
  .qcard.split .pane-r .choices.pics .choice{padding:8px}
  .qcard.split .pane-r .choices.pics img{max-height:calc((100dvh - 420px) / 2);width:auto;max-width:100%;margin-inline:auto;display:block}
}

/* Practice tests */
.pt-grid{display:grid;gap:16px;grid-template-columns:repeat(auto-fill,minmax(min(100%,420px),1fr))}
.pt-card{display:flex;flex-direction:column;gap:12px}
.pt-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.pt-head h2{margin:0 0 2px}
.pt-score{display:flex;flex-direction:column;align-items:flex-end;text-align:right;line-height:1.15}
.pt-score b{font-size:32px;font-weight:800;letter-spacing:-.02em;color:var(--text)}.pt-score span{font-size:12px;color:var(--muted);font-weight:600}.pt-score small{font-size:12px;color:var(--muted)}
.pt-score.empty b{color:var(--line)}
.pt-mod{display:flex;align-items:center;gap:12px;padding:10px 12px;border:1px solid var(--line);border-radius:12px}
.pt-mod .grow{display:flex;flex-direction:column}
.pt-step{display:grid;place-items:center;width:30px;height:30px;border-radius:8px;background:var(--accent-bg);color:var(--brand);font-weight:800}
.pt-mod.done{background:var(--right-bg);border-color:color-mix(in srgb,var(--good) 40%,transparent)}.pt-mod.done .pt-step{background:var(--good);color:#fff}
.pt-score{flex:none;max-width:140px}

/* Practice-test score card on the results screen */
.score-card{margin:14px 0 16px;padding:14px 18px;border:1.5px solid var(--line);border-radius:16px;background:var(--surface);display:grid;gap:8px;max-width:560px}
.score-card .lbl{display:block;font-size:13px;font-weight:650;color:var(--muted);margin:0}
.score-card b{font-size:22px}.score-card p{margin:0}
.score-card.big{border-color:var(--line);border-left:3px solid var(--wave)}
.score-card .sat{font-size:52px;line-height:1.05;color:var(--text);letter-spacing:-.03em;margin-right:6px}
.score-card small{color:var(--muted);font-size:14px}
.score-card .mods{display:flex;flex-wrap:wrap;gap:6px 18px;font-size:15px}.score-card .mods b{font-size:15px}

/* ── Built-in calculator window (graphing + scientific) ── */
.calcwin{position:fixed;z-index:60;display:flex;flex-direction:column;background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:16px;box-shadow:0 18px 50px rgba(20,25,45,.22),0 2px 8px rgba(20,25,45,.08);overflow:hidden;min-width:320px;min-height:320px}
.calcwin[hidden]{display:none}
.cw-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 8px 8px 10px;background:var(--ink);color:#fff;cursor:grab;user-select:none;touch-action:none;flex:none}
.cw-head:active{cursor:grabbing}
.cw-tabs{display:flex;gap:4px;background:rgba(255,255,255,.1);padding:3px;border-radius:10px}
.cw-tabs button{border:0;background:transparent;color:rgba(255,255,255,.75);font:600 13.5px var(--font);padding:7px 12px;border-radius:8px;cursor:pointer}
.cw-tabs button.on{background:#fff;color:var(--ink)}
.cw-tools{display:flex;gap:6px;align-items:center}
.cw-pill{border:1px solid rgba(255,255,255,.35);background:transparent;color:#fff;font:700 12px var(--font);letter-spacing:.04em;padding:6px 9px;border-radius:8px;cursor:pointer}
.cw-x{width:34px;height:34px;border:0;background:transparent;border-radius:8px;cursor:pointer;display:grid;place-items:center}
.cw-x:hover{background:rgba(255,255,255,.12)}.cw-x svg{width:18px;height:18px;stroke:#fff;stroke-width:2.2;fill:none}
.cw-graph{flex:1;display:flex;flex-direction:column;min-height:0}
.calcwin.wide .cw-graph{flex-direction:row}
.cw-list{display:flex;flex-direction:column;min-height:0;max-height:42%;border-bottom:1px solid var(--line);background:var(--surface)}
.calcwin.wide .cw-list{max-height:none;width:clamp(220px,40%,300px);border-bottom:0;border-right:1px solid var(--line)}
.cw-rows{overflow:auto;flex:1}
.cw-row{display:flex;align-items:flex-start;gap:6px;padding:6px 6px 6px 0;border-bottom:1px solid var(--line);position:relative}
.cw-row.edit{background:color-mix(in srgb,var(--brand) 5%,var(--surface))}
.cw-row.edit::before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:var(--brand)}
.cw-sw{flex:none;width:34px;height:36px;border:0;background:transparent;display:grid;place-items:center;cursor:pointer}
.cw-sw i{width:16px;height:16px;border-radius:50%;background:var(--c);box-shadow:0 0 0 2px var(--c) inset}
.cw-sw.off i{background:transparent}
.cw-sw.none i{background:transparent;box-shadow:none}
.cw-main{flex:1;min-width:0}
.cw-in{min-height:36px;padding:6px 8px;border-radius:8px;font:500 15px/1.3 var(--font);border:1.5px solid transparent;background:transparent}
.cw-in:focus{border-color:var(--brand);outline:none;background:var(--surface)}
.cw-view{display:none;min-height:36px;padding:6px 8px;cursor:text;overflow-x:auto;font-size:15.5px}
.cw-row.has-view:not(.edit) .cw-view{display:block}
.cw-row.has-view:not(.edit) .cw-in{position:absolute;opacity:0;pointer-events:none;width:1px}
.cw-out{display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding:0 8px;font-size:13.5px}
.cw-out:empty{display:none}.cw-out{padding-bottom:4px}
.cw-val{font-weight:600;font-size:15px}
.cw-err{color:var(--bad,#c0392b)}.cw-hint{color:var(--muted)}
.cw-addsl,.cw-frac{border:1px solid var(--line);background:var(--surface);color:var(--text);border-radius:7px;font:600 13px var(--font);padding:4px 9px;cursor:pointer}
.cw-addsl:hover,.cw-frac:hover{border-color:var(--brand)}
.cw-slider{display:flex;align-items:center;gap:8px;width:100%;color:var(--muted);font-size:12px}
.cw-slider input{flex:1;min-height:0;padding:0;border:0;accent-color:var(--brand)}
.cw-del{flex:none;width:30px;height:36px;border:0;background:transparent;cursor:pointer;opacity:.35;display:grid;place-items:center}
.cw-row:hover .cw-del,.cw-row.edit .cw-del{opacity:.8}.cw-del svg{width:16px;height:16px;stroke:var(--text);stroke-width:2;fill:none}
.cw-foot{display:flex;gap:6px;padding:6px;border-top:1px solid var(--line);flex:none;flex-wrap:wrap}
.cw-foot button{border:1px solid var(--line);background:var(--surface);color:var(--text);font:600 13px var(--font);padding:7px 10px;border-radius:8px;cursor:pointer}
.cw-foot button:first-child{flex:1}.cw-foot button.on{background:var(--ink);color:#fff;border-color:var(--ink)}
.cw-plot{position:relative;flex:1;min-height:160px;background:var(--surface);color:var(--text);touch-action:none}
.cw-plot canvas{position:absolute;inset:0;cursor:grab}
.cw-zoom{position:absolute;right:8px;top:8px;display:flex;flex-direction:column;gap:4px}
.cw-zoom button{width:34px;height:34px;border:1px solid rgba(31,41,69,.18);background:rgba(255,255,255,.94);color:#1F2945;border-radius:8px;font:600 18px/1 var(--font);cursor:pointer;display:grid;place-items:center}
.cw-zoom svg{width:17px;height:17px;stroke:#1F2945;stroke-width:2;fill:none}
.cw-tip{position:absolute;pointer-events:none;background:var(--ink);color:#fff;font:600 12px var(--font);padding:5px 8px;border-radius:7px;white-space:nowrap}
.cw-kp{flex:none;border-top:1px solid var(--line);background:color-mix(in srgb,var(--ink) 4%,var(--surface));padding:6px}
.cw-kp[hidden]{display:none}
.kp{display:grid;gap:5px}
.kp-g{grid-template-columns:repeat(10,1fr)}.kp-s{grid-template-columns:repeat(5,1fr);display:none}
.cw-kp.sci .kp-g{display:none}.cw-kp.sci .kp-s{display:grid}
.kp button{min-height:36px;border:1px solid var(--line);background:var(--surface);color:var(--text);border-radius:8px;font:600 14px var(--font);cursor:pointer;padding:0 2px}
.kp button.n{background:var(--surface);font-weight:700}
.kp button:not(.n){background:color-mix(in srgb,var(--ink) 6%,var(--surface))}
.kp button.eq{background:var(--brand);border-color:var(--brand);color:#fff}
.kp button:active{transform:scale(.96)}
.kp-s button{min-height:42px;font-size:15px}
.cw-sci{flex:1;display:flex;flex-direction:column;min-height:0}
.cw-sci[hidden],.cw-graph[hidden]{display:none}
.sci-hist{flex:1;overflow:auto;padding:10px 14px;display:flex;flex-direction:column;gap:10px}
.sci-empty{color:var(--muted);font-size:14px;margin:auto 0 0}
.sci-item{border-bottom:1px solid var(--line);padding-bottom:8px}
.sci-src,.sci-val{border:0;background:transparent;color:var(--text);cursor:pointer;padding:2px 0;font:inherit;text-align:left}
.sci-src{color:var(--muted);font-size:15px;max-width:100%;overflow-x:auto}
.sci-res{display:flex;justify-content:flex-end;align-items:center;gap:8px}
.sci-val{font-size:22px;font-weight:700;text-align:right}
.sci-line{padding:8px 10px;border-top:1px solid var(--line);flex:none}
.sci-in{font-size:18px;min-height:48px}
.sci-prev{min-height:20px;text-align:right;color:var(--muted);font-size:14px;padding:4px 4px 0}.sci-prev.bad{color:var(--bad,#c0392b)}
.cw-resize{position:absolute;right:0;bottom:0;width:18px;height:18px;cursor:nwse-resize;background:linear-gradient(135deg,transparent 50%,color-mix(in srgb,var(--muted) 60%,transparent) 50% 58%,transparent 58% 70%,color-mix(in srgb,var(--muted) 60%,transparent) 70% 78%,transparent 78%)}
/* phones: bottom sheet */
.calcwin.sheet{left:0;right:0;bottom:0;top:auto;width:auto;height:78dvh;border-radius:18px 18px 0 0;min-width:0}
.calcwin.sheet .cw-head{cursor:default}.calcwin.sheet .cw-resize{display:none}
.calcwin.sheet .kp-g{gap:4px}.calcwin.sheet .kp-g button{min-height:40px;font-size:13px}
.calcwin.sheet .kp-s button{min-height:44px}

/* Diagnostic test */
.dx-card{display:flex;align-items:center;gap:16px;flex-wrap:wrap;border:1px solid var(--line);border-left:3px solid var(--brand);background:var(--surface)}
.dx-card h2{margin:0 0 4px}.dx-card p{margin:0}
.dx-modal{text-align:left;max-width:460px}.dx-modal img{border-radius:12px;margin-bottom:8px}.dx-modal h2{margin:0 0 8px}
.dx-modal ul{padding-left:18px;margin:10px 0 16px;line-height:1.7}
.dx-report{max-width:720px}.dx-report h3{font-size:14px;margin:12px 0 6px;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}
.dx-cols{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:4px 24px}
.dx-row{display:grid;grid-template-columns:minmax(120px,1.2fr) 1fr auto;gap:10px;align-items:center;font-size:14px;margin:4px 0}
.dx-row .num{font-size:14px}.dx-focus .li{padding:6px 0}
.chip.nocalc{margin-left:8px;background:#FBEBC5;color:#7A5200;border:0}

/* Skill levels */
.lvl{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:700;color:var(--lc);white-space:nowrap}
.lvl i{font-style:normal;display:inline-grid;place-items:center;min-width:22px;height:22px;padding:0 4px;border-radius:7px;background:var(--lc);color:#fff;font-size:12px;font-weight:800;box-shadow:inset 0 -2px 0 rgba(0,0,0,.15)}
.lvl.lvl0{color:var(--muted);font-weight:600}
.lvl.lvl6 i{background:linear-gradient(135deg,#FFE08A,#E0A92A 45%,#9C6A0A);font-size:13px;box-shadow:0 0 0 2px #F6D77A55,0 0 10px #E0A92A88}
.lvl.lvl6{background:linear-gradient(90deg,#B8860B,#E0A92A,#B8860B);-webkit-background-clip:text;background-clip:text;color:transparent}
.lvl .rusty{font-style:normal;font-size:10px;font-weight:700;color:#8A6D55;background:#EFE4D8;border:1px dashed #B99C80;border-radius:6px;padding:1px 5px;-webkit-text-fill-color:#8A6D55}
.rank-card{display:flex;align-items:center;gap:16px;border-left:5px solid var(--lc)}
.rank-card h2{margin:4px 0}.rank-card h2 .lvl{font-size:22px}.rank-card h2 .lvl i{min-width:34px;height:34px;font-size:18px;border-radius:10px}
.kpi-lvl b{display:flex;flex-direction:column;gap:4px}.kpi-lvl b .lvl{font-size:15px}
.lvlup-box{display:flex;flex-direction:column;gap:6px;margin:10px 0}
.lvlup{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:8px 12px;border-radius:12px;background:color-mix(in srgb,#3E9F5E 8%,var(--surface));border:1px solid color-mix(in srgb,#3E9F5E 30%,var(--line));animation:lvlpop .5s ease}
.lvlup.gm{background:linear-gradient(90deg,#FFF6D8,#FFE9A8);border-color:#E0A92A}
.lvlup.down{background:var(--surface);border-style:dashed}.lvlup .arrow{color:var(--muted)}
@keyframes lvlpop{0%{transform:scale(.96);opacity:0}100%{transform:none;opacity:1}}
.lvl-legend{display:flex;flex-wrap:wrap;gap:8px 16px;margin-bottom:6px}
.m-sub .lvl{flex:none}.m-sub .grow{display:flex;flex-direction:column;gap:2px;min-width:0}
.m-lvl{font-size:11px;font-weight:700;letter-spacing:.02em}
.lvl-bar{display:block;height:4px;border-radius:4px;background:var(--mute-bg);overflow:hidden;max-width:160px}.lvl-bar i{display:block;height:100%;border-radius:4px}
.lvl-sum{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:10px}
.lvl-count{display:flex;flex-direction:column;align-items:flex-start;gap:6px;padding:10px 12px;border-radius:12px;background:color-mix(in srgb,var(--lc) 8%,var(--surface));border:1px solid color-mix(in srgb,var(--lc) 25%,var(--line))}
.lvl-count b{font-size:26px;line-height:1}
.kpi b small{font-size:14px;color:var(--muted);font-weight:600}

@media(min-width:1100px){.kpis.k5{grid-template-columns:repeat(5,minmax(0,1fr))}}
@media(min-width:700px) and (max-width:1099px){.kpis.k5 .kpi-lvl{grid-column:span 4}}
.lvlup.first{background:var(--surface);border-color:var(--line)}
@media(max-width:699px){.kpis.k5 .kpi-lvl{grid-column:span 2}}
@media(max-width:600px){.dx-card{flex-direction:column;align-items:stretch}.dx-card .btn{width:100%}}

/* light / dark toggle */
.theme-btn{display:inline-flex;align-items:center;gap:10px;height:40px;min-width:40px;justify-content:center;padding:0 10px;border:1px solid var(--line);border-radius:var(--rc);background:var(--surface);color:var(--muted);font:650 14px var(--font);cursor:pointer}
.theme-btn:hover{color:var(--text);background:var(--surface2)}
.theme-btn svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:none}
.theme-btn .i-sun,:root[data-theme=dark] .theme-btn .i-moon{display:none}:root[data-theme=dark] .theme-btn .i-sun{display:block}
@media(prefers-color-scheme:dark){:root:not([data-theme=light]) .theme-btn .i-moon{display:none}:root:not([data-theme=light]) .theme-btn .i-sun{display:block}}
.theme-btn.wide{width:100%;justify-content:flex-start;border-color:transparent;background:transparent;padding:0 12px;height:38px}.theme-btn.wide:hover{background:var(--mute-bg)}
.side-tools{margin-top:auto;display:flex;flex-direction:column}.side-tools+.me{margin-top:4px}
.topbar .theme-btn{border-color:transparent;background:transparent}
.auth-tools{display:flex;justify-content:flex-end}
@media(min-width:900px){.auth-form{position:relative}.auth-tools{position:absolute;top:24px;right:24px}}
.seg.appear{max-width:420px}
.seg.appear+.hint{margin:8px 0 18px}
.data-card{margin-top:16px}.data-card h2{margin-bottom:4px}
.data-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 0;border-top:1px solid var(--line)}.data-row:first-of-type{border-top:0}
.data-row p{margin:2px 0 0;font-size:14px}.data-row .btn{flex:none}
@media(max-width:600px){.data-row{flex-direction:column;align-items:stretch}}
.del-list{margin:6px 0 12px;padding-left:20px}.del-list li{margin:2px 0}

/* Hints (practice only) */
.hintbox{display:flex;flex-direction:column;gap:10px;margin-top:14px}
.hintcard{border:1px solid color-mix(in srgb,var(--sun) 45%,var(--line));background:color-mix(in srgb,var(--sun) 9%,var(--surface));border-radius:12px;padding:12px 14px;font-size:15px}
.hintcard>b{display:block;font-size:13px;color:color-mix(in srgb,var(--sun) 70%,var(--text));margin-bottom:4px}
.hintcard p{margin:4px 0 0}.hintcard .math-block{margin:6px 0}
.hint-btn{align-self:flex-start;display:inline-flex;align-items:center;gap:8px;flex-wrap:wrap;min-height:40px;height:auto;padding:8px 12px;border:1px dashed color-mix(in srgb,var(--sun) 60%,var(--line));color:var(--text)}
.hint-btn .ic{width:18px;height:18px;fill:none;stroke:var(--sun);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.hint-btn small{color:var(--muted);font-weight:600;font-size:12px}
.hint-tag{display:inline-flex;align-items:center;gap:3px;color:color-mix(in srgb,var(--sun) 70%,var(--text));font-weight:700}
.hint-tag .ic{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2}
.verdict small{font-weight:600;opacity:.8}

/* Busy buttons and the "check your email" panel */
.spin{width:16px;height:16px;border-radius:50%;border:2px solid currentColor;border-right-color:transparent;animation:spin .7s linear infinite;flex:none}
@keyframes spin{to{transform:rotate(360deg)}}
.btn[aria-busy=true]{opacity:.85;cursor:progress}
@media (prefers-reduced-motion:reduce){.spin{animation-duration:2s}}
.sent{text-align:center;padding:8px 0}
.sent svg{width:48px;height:48px;fill:none;stroke:var(--brand);stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;margin:4px auto 12px;display:block}
.sent h2{margin:0 0 8px;font-size:22px}
.sent p{color:var(--muted);margin:0 0 20px;line-height:1.5}

.linkbtn{background:none;border:0;padding:0;color:var(--brand);font:600 14px/1.4 var(--font);cursor:pointer;text-decoration:underline;text-underline-offset:3px}
.linkbtn:hover{color:var(--brand-strong)}
.forgot{display:block;margin:8px 0 0 auto}
.auth-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:10px}.auth-row .forgot{margin:0}
.keep{display:flex;align-items:center;gap:8px;font-size:14px;cursor:pointer}.keep input{width:18px;height:18px;margin:0;accent-color:var(--brand)}
.agree{margin:10px 0 0;line-height:1.5}.agree a{color:var(--brand)}
.auth-h{margin:0 0 6px;font-size:22px}
.auth-p{margin:0 0 16px;line-height:1.5}

/* ── Home page (signed-out visitors) ─────────────────────────────────────── */
.home{background:var(--bg);color:var(--text);min-height:100dvh}
.h-wrap{max-width:1140px;margin:0 auto;padding:0 clamp(18px,4vw,40px)}
.h-top{position:sticky;top:0;z-index:20;background:color-mix(in srgb,var(--bg) 88%,transparent);backdrop-filter:blur(10px);border-bottom:1px solid var(--line)}
.h-bar{display:flex;align-items:center;gap:20px;height:64px}
.h-brand{display:flex;align-items:center;gap:10px;color:var(--text);text-decoration:none;font-size:17px;letter-spacing:-.01em}
.h-brand img{border-radius:50%}
.h-nav{display:none;gap:22px;margin-left:12px}
.h-nav a{color:var(--muted);text-decoration:none;font-weight:600;font-size:14.5px}.h-nav a:hover{color:var(--text)}
.h-act{margin-left:auto;display:flex;align-items:center;gap:8px}
.h-act .btn{min-height:40px;padding:0 14px;font-size:14px}
.h-act .btn.ghost{border-color:transparent;background:transparent}
@media(max-width:560px){.h-act .btn.ghost{display:none}.h-brand b{display:none}}
@media(min-width:960px){.h-nav{display:flex}}

.h-hero{position:relative;overflow:hidden;color:var(--cream);background-color:#173F3A;
  background-image:linear-gradient(rgba(238,235,207,.06) 1px,transparent 1px),linear-gradient(90deg,rgba(238,235,207,.06) 1px,transparent 1px);background-size:32px 32px}
.h-hero-in{position:relative;z-index:1;display:grid;gap:36px;padding-top:clamp(40px,7vw,88px);padding-bottom:clamp(90px,10vw,130px);align-items:center}
@media(min-width:960px){.h-hero-in{grid-template-columns:1fr 1.02fr;gap:56px}}
.h-copy h1{font-size:clamp(46px,7vw,84px);line-height:.95;letter-spacing:-.04em;margin:0 0 22px;color:var(--cream)}
.h-lead{font-size:clamp(17px,1.6vw,19px);line-height:1.55;color:rgba(237,236,204,.86);max-width:30em;margin:0 0 28px}
.h-cta{display:flex;flex-wrap:wrap;gap:12px}
.btn.big{min-height:52px;padding:0 22px;font-size:16px}
.h-go{background:var(--wave);border-color:var(--wave);color:#fff}.h-go:hover{background:#D84D18;border-color:#D84D18}
.h-ghost{background:transparent;color:var(--cream);border-color:rgba(238,235,207,.35)}.h-ghost:hover{border-color:var(--cream)}
.h-note{margin:14px 0 0;font-size:14px;color:rgba(237,236,204,.65)}
.h-wave{position:absolute;left:0;right:0;bottom:18px;width:100%;height:90px;fill:none;stroke:var(--wave);stroke-width:5;stroke-linecap:round;opacity:.9;vector-effect:non-scaling-stroke}
.h-wave path{vector-effect:non-scaling-stroke}

/* sample question card */
.tq{background:var(--surface);color:var(--text);border-radius:16px;padding:18px 18px 16px;box-shadow:0 24px 60px rgba(0,0,0,.28)}
.tq-tabs{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;margin:-2px -2px 14px;padding:2px}
.tq-tabs button{flex:none;border:1px solid var(--line);background:var(--surface2);color:var(--muted);font:600 13px var(--font);padding:7px 11px;border-radius:999px;cursor:pointer}
.tq-tabs button.on{background:var(--brand);border-color:var(--brand);color:light-dark(#fff,#0D1514)}
.tq-body{font-size:16.5px;line-height:1.55}.tq-body p{margin:0 0 8px}
.tq-ch{display:grid;gap:8px;margin-top:12px}.tq-ch .choice{min-height:48px;padding:8px 12px}.tq-ch .choice .L{width:28px;height:28px;font-size:13px}
.tq-hint{margin-top:12px}
.tq-box{margin-top:12px;padding:12px 14px;border-radius:12px;font-size:15px;line-height:1.55;background:var(--surface2);border:1px solid var(--line)}
.tq-box p{margin:6px 0 0}.tq-box .disp{margin:6px 0 0;overflow-x:auto}
.tq-box.ok{border-color:color-mix(in srgb,var(--good) 45%,transparent);background:var(--right-bg)}
.tq-box.no{border-color:color-mix(in srgb,var(--bad) 40%,transparent);background:var(--wrong-bg)}
.tq-box.hint{border-color:color-mix(in srgb,var(--wave) 45%,transparent)}
.tq-more{margin:12px 0 0;font-size:13.5px;color:var(--muted)}.tq-more .linkbtn{font-size:13.5px}

/* sections */
.h-sec{padding:clamp(56px,8vw,96px) 0}
.h-sec.alt{background:var(--surface2);border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.h-sec h2,.h-end h2{font-size:clamp(28px,3.6vw,40px);line-height:1.1;letter-spacing:-.025em;margin:0 0 28px;max-width:20em}
.h-sec p{line-height:1.6;max-width:36em}
.h-steps{list-style:none;counter-reset:s;padding:0;margin:0;display:grid;gap:28px}
@media(min-width:860px){.h-steps{grid-template-columns:repeat(3,1fr);gap:40px}}
.h-steps li{counter-increment:s;position:relative;padding-top:56px}
.h-steps li::before{content:counter(s);position:absolute;top:0;left:0;width:40px;height:40px;border-radius:50%;display:grid;place-items:center;font-weight:800;color:var(--brand);border:2px solid var(--brand)}
.h-steps b{font-size:19px}.h-steps p{color:var(--muted);margin:8px 0 0}
.h-feats{list-style:none;padding:0;margin:0;display:grid;gap:26px 40px}
@media(min-width:760px){.h-feats{grid-template-columns:1fr 1fr}}
.h-feats li{display:flex;gap:16px;align-items:flex-start}
.h-feats svg{flex:none;width:26px;height:26px;fill:none;stroke:var(--brand);stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;margin-top:2px}
.h-feats b{font-size:16.5px}.h-feats p{color:var(--muted);margin:4px 0 0}

.h-levels,.h-teach{display:grid;gap:40px;align-items:center}
@media(min-width:900px){.h-levels,.h-teach{grid-template-columns:1fr 1fr;gap:64px}}
.h-levels p{color:var(--muted)}
.h-ladder{display:flex;align-items:flex-end;gap:10px;height:260px;padding-bottom:30px;border-bottom:2px solid var(--line);position:relative}
.rung{flex:1;height:var(--h);display:flex;flex-direction:column;justify-content:flex-end;position:relative}
.rung i{display:block;height:100%;border-radius:8px 8px 0 0;background:var(--c);opacity:.92}
.rung span{position:absolute;bottom:-28px;left:50%;transform:translateX(-50%);font-size:12px;font-weight:700;white-space:nowrap;color:var(--muted)}
.rung:last-child span{color:var(--c)}
@media(max-width:520px){.rung span{font-size:10px;writing-mode:vertical-rl;transform:translateX(-50%) rotate(180deg);bottom:auto;top:calc(100% + 6px)}.h-ladder{margin-bottom:64px}}

.h-ticks{list-style:none;padding:0;margin:18px 0;display:grid;gap:12px}
.h-ticks li{position:relative;padding-left:30px;line-height:1.5}
.h-ticks li::before{content:"";position:absolute;left:0;top:4px;width:18px;height:18px;border-radius:50%;background:var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center/12px no-repeat}
.h-teach a{color:var(--brand);font-weight:600}
.h-mock{background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:18px;box-shadow:0 12px 40px rgba(20,35,31,.08)}
.mk-h{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:10px}.mk-h span{color:var(--muted);font-size:13px}
.mk-row{display:grid;grid-template-columns:1fr auto 80px 40px;gap:12px;align-items:center;padding:11px 0;border-top:1px solid var(--line);font-size:14.5px}
.mk-row em{font-style:normal;font-size:12px;font-weight:700;color:var(--c);background:color-mix(in srgb,var(--c) 13%,transparent);padding:3px 8px;border-radius:999px}
.mk-bar{height:6px;border-radius:3px;background:var(--mute-bg)}.mk-bar i{display:block;height:100%;border-radius:3px;background:var(--brand)}
.mk-row b{text-align:right;font-size:13px}
.mk-foot{border-top:1px solid var(--line);padding-top:12px;font-size:13.5px;color:var(--muted)}.mk-foot b{color:var(--text)}

.h-launch{background:color-mix(in srgb,var(--wave) 10%,var(--surface));border:1px solid color-mix(in srgb,var(--wave) 35%,transparent);border-radius:12px;padding:14px 18px;margin:-8px 0 28px;max-width:none}
.h-plans{display:grid;gap:18px}
@media(min-width:860px){.h-plans{grid-template-columns:repeat(3,1fr);align-items:stretch}}
.plan{display:flex;flex-direction:column;background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:24px}
.plan.pro{border:2px solid var(--brand)}
.plan h3{margin:0;font-size:18px}
.price{font-size:40px;font-weight:800;letter-spacing:-.03em;margin:10px 0 0}.price small{font-size:15px;font-weight:600;color:var(--muted);letter-spacing:0}
.alt-price{margin:2px 0 0;color:var(--muted);font-size:14px}
.plan ul{list-style:none;padding:0;margin:18px 0 24px;display:grid;gap:10px;flex:1}
.plan li{padding-left:22px;position:relative;line-height:1.45}.plan li::before{content:"";position:absolute;left:2px;top:8px;width:8px;height:8px;border-radius:50%;background:var(--brand)}
.plan .btn{margin-top:auto}

.h-faq details{border-top:1px solid var(--line);padding:4px 0;max-width:760px}.h-faq details:last-child{border-bottom:1px solid var(--line)}
.h-faq summary{cursor:pointer;list-style:none;font-weight:700;font-size:17px;padding:16px 36px 16px 0;position:relative}
.h-faq summary::-webkit-details-marker{display:none}
.h-faq summary::after{content:"+";position:absolute;right:4px;top:12px;font-size:24px;font-weight:500;color:var(--brand)}
.h-faq details[open] summary::after{content:"−"}
.h-faq details p{margin:0 0 18px;color:var(--muted)}.h-faq a{color:var(--brand)}

.h-end{background:#173F3A;color:var(--cream);padding:clamp(56px,8vw,88px) 0;text-align:left}
.h-end h2{color:var(--cream);margin-bottom:10px}.h-end p{color:rgba(237,236,204,.8);margin:0 0 24px;font-size:17px}
.h-foot{padding:32px 0 calc(32px + env(safe-area-inset-bottom));border-top:1px solid var(--line)}
.h-foot .h-wrap{display:grid;gap:10px}
.h-foot p{margin:0;color:var(--muted);font-size:14px}.h-foot a{color:var(--brand)}
.h-foot .fine{font-size:12.5px;max-width:60em}
.home-link{font-size:14px;margin-right:6px;text-decoration:none}
.auth-tools{display:flex;align-items:center;justify-content:space-between}
@media(min-width:900px){.auth-tools{gap:14px}}

/* Legal pages */
.legal{max-width:760px;padding-top:clamp(36px,6vw,64px);padding-bottom:64px;line-height:1.65}
.legal h1{font-size:clamp(32px,4.4vw,46px);letter-spacing:-.03em;line-height:1.05;margin:0 0 8px}
.legal .updated{color:var(--muted);margin:0 0 28px;font-size:14px}
.legal h2{font-size:21px;margin:36px 0 10px;letter-spacing:-.01em}
.legal ul{padding-left:22px}.legal li{margin:6px 0}.legal a{color:var(--brand)}
.h-act a.btn{text-decoration:none}
