/* ===== Setup / stats / solution-review screens ===== */
*{box-sizing:border-box}
html,body{margin:0;padding:0;height:100%}
body{font-family:Lato,"Helvetica Neue",Arial,sans-serif;color:#212529;background:#fff;-webkit-font-smoothing:antialiased}
button{font-family:inherit}
.hidden{display:none!important}

/* top strip */
.topbar{height:30px;background:#f7f8fa;border-bottom:1px solid #eceef1;display:flex;align-items:center;justify-content:space-between;padding:0 24px;font-size:14px}
.topbar .brand{font-weight:900;color:#0a7ea4;letter-spacing:.2px;cursor:pointer}
.topbar nav a{margin-left:20px;color:#6b7280;text-decoration:none;cursor:pointer}
.topbar nav a.on,.topbar nav a:hover{color:#0aa3c2}

.page{max-width:1120px;margin:0 auto;padding:36px 32px 70px}
.page h1{font-size:30px;font-weight:700;text-align:center;margin:0 0 14px;color:#212529;letter-spacing:-.2px}
.page .sub{font-size:15px;color:#6b7280;text-align:center;margin:0 0 40px}

/* cards grid */
.cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px 16px}
.cards.three{grid-template-columns:repeat(3,minmax(0,1fr))}
.card{border:2px solid #e9ebee;border-radius:12px;padding:24px 26px 22px;min-height:104px;cursor:pointer;background:#fff;transition:border-color .12s,background .12s,box-shadow .12s;position:relative}
.card:hover{border-color:#cfd8de}
.card h3{margin:0 0 14px;font-size:17px;font-weight:700;color:#212529;line-height:1.3}
.card .cnt{font-size:13.5px;color:#6b7280}
.card .cnt b{font-weight:700}
.card .cnt .g{color:#28a745}
.card .cnt .tot{color:#212529}
.card .cnt .sl{margin:0 7px;color:#6b7280}
.card .cnt .lb{margin-left:9px}
.card.sel{border:2px dashed #0aa3c2;background:#f0f8fb;box-shadow:0 4px 14px rgba(10,163,194,.18)}
.card .desc{font-size:14px;color:#6b7280;line-height:1.45;margin:-4px 0 10px}
.card .badge{position:absolute;top:12px;right:14px;font-size:11px;font-weight:700;color:#0aa3c2;background:#e6f6fa;border-radius:20px;padding:3px 10px}

/* duration */
.dur{max-width:500px;margin:0 auto;text-align:center;padding-top:10px}
.dur .big{font-size:58px;font-weight:900;line-height:1;margin:26px 0 14px;color:#212529}
.dur .unit{font-size:20px;color:#6b7280}
.dur .meta{font-size:13px;color:#6b7280;margin-top:8px}
input[type=range].sl{-webkit-appearance:none;appearance:none;width:100%;height:8px;border-radius:6px;background:#e9ecef;margin:34px 0 30px;outline:none}
input[type=range].sl::-webkit-slider-thumb{-webkit-appearance:none;width:24px;height:24px;border-radius:50%;background:#0aa3c2;cursor:pointer;border:0}
input[type=range].sl::-moz-range-thumb{width:24px;height:24px;border-radius:50%;background:#0aa3c2;cursor:pointer;border:0}
.chk{display:flex;align-items:center;gap:16px;background:#f7f8fa;border-radius:8px;padding:14px 12px;margin-bottom:16px;font-size:15px;color:#3f4650;cursor:pointer;text-align:left}
.chk input{width:20px;height:20px;margin:0;accent-color:#0aa3c2;cursor:pointer}
.btns{display:flex;justify-content:center;gap:16px;margin-top:32px}
.btn{font-size:16px;font-weight:700;border-radius:8px;height:48px;padding:0 32px;min-width:120px;cursor:pointer}
.btn.o{background:#fff;color:#6b7280;border:2px solid #6b7280}
.btn.p{background:#0aa3c2;color:#fff;border:0;padding:0 32px;min-width:96px}
.btn.p:disabled{opacity:.45;cursor:not-allowed}
.seg{display:inline-flex;border:2px solid #e9ebee;border-radius:10px;overflow:hidden;margin-top:6px}
.seg button{border:0;background:#fff;padding:12px 22px;font-size:16px;color:#6b7280;cursor:pointer}
.seg button.on{background:#0aa3c2;color:#fff;font-weight:700}
.note{font-size:15px;color:#6b7280;text-align:center;margin-top:18px}

/* stats */
.stat-row{display:grid;grid-template-columns:repeat(4,1fr);gap:20px;margin-bottom:36px}
.tile{border:2px solid #e9ebee;border-radius:14px;padding:22px 24px}
.tile .k{font-size:14px;color:#6b7280;text-transform:uppercase;letter-spacing:.8px;font-weight:700}
.tile .v{font-size:34px;font-weight:900;margin-top:6px}
.tile .v small{font-size:15px;color:#6b7280;font-weight:400;white-space:nowrap}
h2.sec{font-size:24px;margin:36px 0 16px}
table.t{width:100%;border-collapse:collapse;font-size:15px}
table.t th{text-align:left;font-size:12px;text-transform:uppercase;letter-spacing:1px;color:#6b7280;padding:10px 12px;border-bottom:2px solid #e9ebee}
table.t td{padding:11px 12px;border-bottom:1px solid #eef0f2;vertical-align:middle}
table.t tr.click{cursor:pointer}
table.t tr.click:hover td{background:#f7fbfd}
.bar{height:10px;background:#eef0f2;border-radius:6px;overflow:hidden;min-width:120px}
.bar i{display:block;height:100%;background:#28a745;border-radius:6px}
.bar.time i{background:#0aa3c2}
.ok{color:#1E6500;font-weight:700}.bad{color:#C21D00;font-weight:700}.mut{color:#9aa1a9}
.chipl{display:inline-block;font-size:12px;font-weight:700;padding:3px 9px;border-radius:12px;background:#eef0f2;color:#4b5563}
.empty{text-align:center;color:#6b7280;padding:60px 0;font-size:18px}
.link{color:#0aa3c2;cursor:pointer;font-weight:700;background:none;border:0;font-size:15px;padding:0}
.toolbar-row{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px;gap:12px;flex-wrap:wrap}
.sm-btn{border:2px solid #e9ebee;background:#fff;border-radius:8px;padding:8px 14px;font-weight:700;color:#3f4650;cursor:pointer;font-size:14px}
.sm-btn.p{background:#0aa3c2;border-color:#0aa3c2;color:#fff}

/* ===== solution review (post-test) ===== */
.sol{position:fixed;inset:0;background:#fff;font-family:Lato,Arial,sans-serif;display:flex;flex-direction:column}
.sol-top{background:#006DAA;color:#fff;height:58px;display:flex;align-items:center;justify-content:space-between;padding:0 14px 0 16px}
.sol-top .nm{display:flex;align-items:center;gap:12px;font-size:21px}
.sol-top .nm .lg{width:34px;height:34px;border-radius:50%;background:#fff;color:#006DAA;font-weight:900;display:flex;align-items:center;justify-content:center;font-size:17px}
.sol-top .of{align-self:flex-end;margin-bottom:6px;font-size:15px}
.sol-sub{background:#80ADE0;color:#fff;height:29px;display:flex;align-items:center;justify-content:space-between;padding:0 14px 0 16px;font-size:15px}
.sol-sub svg{width:17px;height:17px;flex:0 0 17px}
.sol-sub button{background:none;border:0;color:#fff;font-size:15px;cursor:pointer;display:flex;align-items:center;gap:6px;padding:0}
.sol-body{flex:1;overflow:auto;padding:16px 16px 30px;position:relative}
.sol-pills{display:flex;justify-content:flex-end;gap:10px;margin-bottom:6px}
.sol-pill{display:flex;border-radius:7px;overflow:hidden;font-size:15px;background:#f4f5f7}
.sol-pill span:first-child{background:#3a7cc4;color:#fff;padding:5px 6px}
.sol-pill span:last-child{padding:5px 14px;font-variant-numeric:tabular-nums}
.sol-pill.slow span:last-child{color:#C21D00;font-weight:700}
.sol-meta{font-size:13px;color:#6b7280;margin-bottom:12px}
.sol-wrap{display:flex;gap:30px}
.sol-main{flex:1;min-width:0}
.sol-stem img{display:block;max-width:100%}
.sol-opts{margin-top:18px}
.sol-opt{display:flex;align-items:flex-start;gap:8px;padding:14px 12px 14px 22px;border:2px solid transparent;border-radius:4px;margin:6px 0;min-height:52px}
.sol-opt input{margin:4px 6px 0 0}
.sol-opt .let{font-size:15px;width:24px;margin-top:1px}
.sol-opt.right{background:#D5EBDA;border-color:#28A745}
.sol-opt.wrong{background:#F8D7DA;border-color:#DC3545}
.sol-opt img{display:block}
.sol-side{width:330px;flex:0 0 330px}
.sol-side h4{text-align:right;margin:8px 0 14px;font-size:15px}
.pop{display:flex;align-items:center;gap:10px;height:58px;margin:6px 0}
.pop .b{flex:1;height:14px;background:#f2f3f5;border-radius:3px;overflow:hidden}
.pop .b i{display:block;height:100%;background:#3a8edb}
.pop span{font-size:12px;width:44px;text-align:right}
.sol-foot{background:#006DAA;color:#fff;height:44px;display:flex;align-items:stretch;justify-content:space-between}
.sol-foot .grp{display:flex}
.sol-foot button{background:none;border:0;color:#fff;font-size:18px;display:flex;align-items:center;gap:8px;padding:0 14px;cursor:pointer;border-right:1px solid rgba(255,255,255,.7)}
.sol-foot .grp.r button{border-right:0;border-left:1px solid rgba(255,255,255,.7)}
.sol-foot button:disabled{opacity:.45;cursor:default}
.sol-foot svg{width:18px;height:18px}
.explain{background:#f7f8fa;border-left:4px solid #3a7cc4;padding:12px 16px;margin:14px 0;font-size:15px;line-height:1.5}
.solnav{position:fixed;inset:0;background:rgba(0,0,0,.35);display:flex;align-items:center;justify-content:center;z-index:20}
.solnav .box{background:#fff;border-radius:10px;width:min(720px,92vw);max-height:80vh;overflow:auto;padding:22px}
.solnav .grid{display:grid;grid-template-columns:repeat(9,1fr);gap:8px}
.solnav .grid button{height:42px;border-radius:6px;border:2px solid #e9ebee;background:#fff;font-weight:700;cursor:pointer}
.solnav .grid button.ok{border-color:#28a745;background:#eaf6ec;color:#1E6500}
.solnav .grid button.bad{border-color:#dc3545;background:#fbe9eb;color:#C21D00}
.solnav .grid button.cur{outline:3px solid #0aa3c2}

.resume{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;border:2px solid #0aa3c2;background:#f0f8fb;border-radius:12px;padding:16px 20px;margin:-16px 0 28px}

.dur .seg{margin-top:4px}

/* export for AI */
.xai-bar{position:sticky;top:0;background:#fff;border-bottom:1px solid #e9ebee;padding:12px 24px;display:flex;gap:14px;align-items:center;flex-wrap:wrap;z-index:5}
.xai-doc{max-width:820px;margin:0 auto;padding:24px 24px 60px;font-family:Arial,Helvetica,sans-serif;color:#000}
.xai-doc h1{font-size:22px;margin:0 0 6px}
.xai-prompt{border:1px solid #cfd8de;border-radius:8px;padding:12px 16px;margin:16px 0 24px;background:#f7f8fa}
.xai-prompt pre{white-space:pre-wrap;font:13px/1.45 Arial,Helvetica,sans-serif;margin:8px 0 0}
.xai-q{border-top:2px solid #e9ebee;padding:18px 0 22px;break-inside:avoid;page-break-inside:avoid}
.xai-h{font-weight:700;font-size:15px;margin-bottom:4px}
.xai-m{font-size:14px;margin-bottom:12px}
.xai-q img{display:block}
.xai-opts{margin-top:10px;display:flex;flex-direction:column;gap:8px}
.xai-opts>div{display:flex;gap:12px;align-items:flex-start}
@media print{.noprint{display:none!important}.xai-doc{padding:0}body{background:#fff}}
/* guesses */
.chipl.gs{background:#FFF1C9;color:#8a5a00}
.guess-sum{background:#FFF8E1;border:1px solid #F2D27A;border-radius:8px;padding:12px 16px;margin:-14px 0 30px;line-height:1.55}
.guess-sum .mut{display:block;font-size:13px}
.sol-sub button.on{color:#FFD45C}
b.gs{color:#B07800}
.solnav .grid button.gs{border-style:dashed}
.solnav .grid button.gs::after{content:'?';font-size:11px;vertical-align:super;margin-left:1px}
.gtog{border:1px dashed #d4b45c;background:#fff;color:#8a5a00;border-radius:12px;font:700 12px/1 inherit;padding:5px 10px;cursor:pointer;white-space:nowrap}
.gtog:hover{background:#FFF8E1}
.gtog.on{border-style:solid;background:#FFF1C9}
.sm-btn.danger{border-color:#dc3545;color:#C21D00}
/* ---------- techniques ---------- */
.tech-tabs{display:flex;width:max-content;margin:0 auto 18px}
.tech-tabs button span{font-size:13px;opacity:.75;margin-left:4px}
.tech-prog{display:flex;align-items:center;gap:14px;max-width:760px;margin:0 auto 22px;color:#6b7280;font-size:14px}
.tech-prog .bar{flex:1}
.tech-list{max-width:760px;margin:0 auto}
.tl-sec{font-size:12px;font-weight:900;letter-spacing:.09em;text-transform:uppercase;color:#6b7280;margin:22px 0 6px;padding-bottom:6px;border-bottom:1px solid #e9ebee}
.tl-row{display:flex;align-items:center;gap:14px;width:100%;text-align:left;background:#fff;border:0;border-bottom:1px solid #f1f2f4;padding:11px 6px;font:inherit;font-size:16px;color:#212529;cursor:pointer}
.tl-row:hover{background:#f7fafc}
.tl-n{font-weight:900;color:#0aa3c2;width:26px;font-variant-numeric:tabular-nums}
.tl-t{flex:1}
.tl-st{font-size:12px;font-weight:700;border-radius:12px;padding:3px 10px;white-space:nowrap}
.tl-st.new{background:#f1f2f4;color:#6b7280}.tl-st.ok{background:#eaf6ec;color:#1E6500}.tl-st.bad{background:#fbe9eb;color:#C21D00}.tl-st.shown{background:#FFF1C9;color:#8a5a00}
.tp{max-width:860px;margin:0 auto}
.tp-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px;font-size:14px}
.lnk{background:none;border:0;color:#0a7fa0;font:inherit;font-size:15px;font-weight:700;cursor:pointer;padding:0}
.lnk:hover{text-decoration:underline}
.page .tp-h{text-align:left;font-size:26px;display:flex;gap:14px;align-items:baseline;border-bottom:3px solid #0aa3c2;padding-bottom:10px;margin-bottom:18px}
.tp-h span{color:#0aa3c2;font-weight:900}
.tp-lab{font-size:12px;font-weight:900;letter-spacing:.09em;text-transform:uppercase;color:#0a7fa0;margin-bottom:4px}
.tp-spot{font-size:16px;margin-bottom:16px;line-height:1.5}
.tp-move{background:#eaf7fa;border-left:4px solid #0aa3c2;border-radius:0 8px 8px 0;padding:12px 16px;font-size:16px;line-height:1.55;margin-bottom:22px}
.tp-move .katex-display{margin:.5em 0}
.tp-q{border:2px solid #e9ebee;border-radius:10px;padding:16px 18px;margin-bottom:22px}
.tp-qh{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:10px;font-size:14px}
.tp-stem img{display:block;max-width:100%;height:auto}
.to-grid{display:flex;flex-direction:column;gap:6px;margin-top:12px}
.to-opt{display:flex;align-items:center;gap:14px;text-align:left;background:#fff;border:2px solid #e9ebee;border-radius:8px;padding:6px 12px;cursor:pointer;min-height:40px}
.to-opt:hover:not(:disabled){border-color:#9fd6e3}
.to-opt img{display:block;max-width:100%;height:auto;mix-blend-mode:multiply}
.to-l{font-weight:900;color:#0a7fa0;width:16px}
.to-opt.sel{border-color:#0aa3c2;background:#eaf7fa}
.to-opt.right{border-color:#28a745;background:#eaf6ec}.to-opt.wrong{border-color:#dc3545;background:#fbe9eb}
.to-opt:disabled{cursor:default;color:inherit}
.tp-act{display:flex;align-items:center;gap:22px;margin-top:16px}
.tv{margin-top:14px;padding:10px 14px;border-radius:8px;font-size:16px}
.tv.ok{background:#eaf6ec;color:#1E6500}.tv.bad{background:#fbe9eb;color:#C21D00}.tv.shown{background:#FFF8E1;color:#8a5a00}
.tp-sol{margin-bottom:20px;font-size:16px;line-height:1.55}
.tp-sol ol{margin:6px 0 12px;padding-left:24px}.tp-sol li{margin:5px 0}
.tp-sol li::marker{color:#0a7fa0;font-weight:900}
.tp-ans{display:flex;gap:14px;align-items:flex-start;flex-wrap:wrap}
.tp-ans .ans{background:#0aa3c2;color:#fff;font-weight:900;border-radius:6px;padding:4px 12px;white-space:nowrap}
.tp-ans .trap{background:#FFF8E1;color:#5c4300;border-radius:6px;padding:4px 12px;flex:1;min-width:240px}
.tp-ans .trap b{color:#a86a00;margin-right:6px}
.tp-also{display:flex;justify-content:space-between;align-items:center;gap:16px;border-top:1px dashed #d6dadf;padding-top:16px;margin-top:6px}
.tp-again{margin-top:12px}
.tp-nav{display:flex;justify-content:space-between;margin-top:34px;padding-top:18px;border-top:1px solid #e9ebee}
.tp-nav .btn:disabled{opacity:.4;cursor:not-allowed}
@media (max-width:640px){.page{padding:24px 16px 60px}.tech-tabs{width:100%}.tech-tabs button{flex:1;padding:10px 6px;font-size:14px}.tp-also{flex-direction:column;align-items:flex-start}}
.explain .xn{margin-top:10px;font-size:15.5px;line-height:1.6}
.explain .xn p{margin:0 0 7px}
.explain .xn p.xa{background:#eaf6ec;color:#1E6500;display:inline-block;padding:2px 10px;border-radius:6px;margin:4px 0 9px}
.explain .xn p.xt{background:#FFF8E1;color:#5c4300;padding:6px 10px;border-radius:6px}
.tp-why{margin:-10px 0 22px;border:1px solid #e3e7eb;border-radius:8px;padding:10px 16px;background:#fbfcfd}
.tp-why summary{cursor:pointer;font-size:12px;font-weight:900;letter-spacing:.09em;text-transform:uppercase;color:#6b7280}
.tp-why div{margin-top:8px;font-size:16px;line-height:1.6}
.otog{border:1px solid #c9d1d9;background:#fff;color:#4b5563;border-radius:12px;font:700 12px/1 inherit;padding:5px 10px;cursor:pointer;white-space:nowrap;margin-left:4px}
.otog:hover{background:#f3f4f6}
.otog.on{background:#e8f0fe;border-color:#7aa7e0;color:#1a4f8b}
.gate{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;background:#f4f6f8;z-index:1000;padding:16px}
.gate-card{background:#fff;border:1px solid #dde2e6;border-radius:12px;padding:32px;width:100%;max-width:360px;display:flex;flex-direction:column;gap:14px}
.gate-card h1{font-size:22px;font-weight:900;margin:0}
.gate-card p{margin:0;color:#6b7280}
.gate-card input{height:46px;border:1px solid #c9d1d8;border-radius:8px;padding:0 14px;font:inherit;font-size:16px}
.gate-card input:focus{outline:2px solid #0aa3c2;border-color:transparent}
.gate-err{min-height:20px;font-size:14px;color:#b42318}
