/* 公共工程品質管理互動題庫 · UI v3 — shared by the overview page and every quiz page */
:root {
  --bg:#f2f4f7; --surface:#ffffff; --surface-2:#f1f4f9; --line:#dce3ed; --line-strong:#c5d0df;
  --ink:#152033; --muted:#5a6679; --brand:#1f4f96; --brand-strong:#163c75; --brand-soft:#e3ebf8; --on-brand:#ffffff;
  --accent:#f3b61f; --accent-soft:#fff3cf; --accent-ink:#6d4b00;
  --good:#16794a; --good-bg:#e3f4ea; --bad:#be3a2b; --bad-bg:#fdebe8; --warn:#9c5a08; --warn-bg:#fff4df;
  --shadow:0 1px 2px rgba(21,32,51,.06),0 12px 32px -16px rgba(21,32,51,.22); --radius:18px;
  --grid:rgba(31,79,150,.07);
  color-scheme:light;
}
[data-theme="dark"] {
  --bg:#0d1420; --surface:#141d2c; --surface-2:#1b2638; --line:#28364c; --line-strong:#374a66;
  --ink:#e7edf7; --muted:#9ba9bf; --brand:#86b3ff; --brand-strong:#b0ccff; --brand-soft:#1c3156; --on-brand:#0d1420;
  --accent:#f5c451; --accent-soft:#3a2f12; --accent-ink:#f5d58a;
  --good:#6fd49c; --good-bg:#15372a; --bad:#ff9d90; --bad-bg:#40211d; --warn:#f2b45c; --warn-bg:#3a2a12;
  --shadow:0 1px 2px rgba(0,0,0,.3),0 14px 34px -18px rgba(0,0,0,.6);
  --grid:rgba(134,179,255,.06);
  color-scheme:dark;
}
* { box-sizing:border-box; }
[hidden] { display:none !important; }
html { scroll-behavior:smooth; -webkit-text-size-adjust:100%; }
body { margin:0; color:var(--ink); background:var(--bg); font-family:"Microsoft JhengHei","Noto Sans TC","PingFang TC",system-ui,sans-serif; line-height:1.65; }
button,input,select { font:inherit; color:inherit; }
a { color:var(--brand); }
img { max-width:100%; }
.shell { width:min(1200px,calc(100% - 32px)); margin:0 auto; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.skip { position:absolute; left:12px; top:-60px; z-index:60; padding:9px 13px; color:#fff; background:var(--brand-strong); border-radius:10px; }
.skip:focus { top:10px; }
:focus-visible { outline:3px solid color-mix(in srgb,var(--brand) 65%,transparent); outline-offset:2px; }
kbd { display:inline-block; min-width:1.6em; padding:0 .35em; border:1px solid var(--line-strong); border-bottom-width:2px; border-radius:6px; background:var(--surface); font:600 .78em/1.6 "Cascadia Mono",Consolas,monospace; text-align:center; color:var(--ink); }

/* ---------- top bar ---------- */
.topbar { position:sticky; top:0; z-index:40; background:color-mix(in srgb,var(--surface) 88%,transparent); backdrop-filter:saturate(1.4) blur(10px); border-bottom:1px solid var(--line); }
.topbar-in { display:flex; align-items:center; gap:16px; min-height:62px; }
.brand { display:flex; align-items:center; gap:10px; color:var(--ink); text-decoration:none; flex:0 0 auto; }
.brand img { display:block; width:34px; height:34px; }
.brand span { display:grid; line-height:1.15; }
.brand b { font-size:1.02rem; letter-spacing:.04em; }
.brand small { color:var(--muted); font-size:.72rem; }
.set-switch { display:flex; gap:6px; margin-left:auto; overflow-x:auto; scrollbar-width:none; }
.set-switch::-webkit-scrollbar { display:none; }
.set-switch a { flex:0 0 auto; display:inline-flex; align-items:center; gap:6px; padding:6px 12px; border:1px solid var(--line); border-radius:999px; color:var(--muted); background:var(--surface); text-decoration:none; font-size:.84rem; font-weight:700; white-space:nowrap; }
.set-switch a:hover { color:var(--brand); border-color:var(--brand); }
.set-switch a[aria-current="page"] { color:var(--on-brand); background:var(--brand); border-color:var(--brand); }
.set-switch .now { padding:0 6px; border-radius:999px; background:var(--accent); color:#3b2a00; font-size:.68rem; }
.icon-btn { flex:0 0 auto; display:grid; place-items:center; width:40px; height:40px; border:1px solid var(--line); border-radius:12px; background:var(--surface); color:var(--ink); cursor:pointer; }
.icon-btn:hover { border-color:var(--brand); color:var(--brand); }

/* ---------- page head ---------- */
.page-head { background-color:var(--surface); background-image:linear-gradient(var(--grid) 1px,transparent 1px),linear-gradient(90deg,var(--grid) 1px,transparent 1px); background-size:28px 28px; border-bottom:1px solid var(--line); }
.crumbs { display:flex; flex-wrap:wrap; gap:6px; padding-top:18px; color:var(--muted); font-size:.84rem; }
.crumbs a { color:var(--muted); text-decoration:none; }
.crumbs a:hover { color:var(--brand); text-decoration:underline; }
.crumbs span[aria-hidden] { opacity:.6; }
.head-row { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; padding:10px 0 0; }
.head-label { display:inline-flex; align-items:center; gap:8px; color:var(--brand); font-weight:800; font-size:.9rem; letter-spacing:.04em; }
.head-label .unit { padding:2px 9px; border-radius:7px; background:var(--accent-soft); color:var(--accent-ink); }
h1 { margin:4px 0 0; font-size:clamp(1.55rem,3vw,2.3rem); line-height:1.25; letter-spacing:.01em; }
.head-meta { margin:6px 0 18px; color:var(--muted); }
.head-meta b { color:var(--ink); }
.tabs { display:flex; gap:4px; align-self:flex-end; }
.tab { position:relative; padding:10px 18px 12px; border:0; background:transparent; color:var(--muted); font-weight:800; cursor:pointer; }
.tab[aria-selected="true"] { color:var(--brand); }
.tab[aria-selected="true"]::after { content:""; position:absolute; left:12px; right:12px; bottom:0; height:3px; border-radius:3px 3px 0 0; background:var(--brand); }

/* ---------- generic ---------- */
.panel { background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow); }
.btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:44px; padding:9px 16px; border:1px solid var(--line-strong); border-radius:12px; background:var(--surface); color:var(--ink); font-weight:800; cursor:pointer; text-decoration:none; }
.btn:hover { border-color:var(--brand); color:var(--brand); }
.btn.primary { border-color:var(--brand); background:var(--brand); color:var(--on-brand); }
.btn.primary:hover { background:var(--brand-strong); border-color:var(--brand-strong); color:var(--on-brand); }
.btn.accent { border-color:var(--accent); background:var(--accent); color:#2f2200; }
.btn.accent:hover { filter:brightness(.96); color:#2f2200; }
.btn.danger { color:var(--bad); border-color:color-mix(in srgb,var(--bad) 40%,var(--line)); background:var(--bad-bg); }
.btn.block { width:100%; }
.btn:disabled { opacity:.45; cursor:not-allowed; }
.link-btn { border:0; background:none; padding:0; color:var(--brand); font-weight:800; font-size:.86rem; cursor:pointer; text-decoration:none; }
.link-btn:hover { text-decoration:underline; }
main { padding-bottom:40px; }

/* ---------- quiz layout ---------- */
.quiz-layout { display:grid; grid-template-columns:300px minmax(0,1fr); gap:22px; align-items:start; padding-top:22px; }
.side { position:sticky; top:84px; display:grid; gap:14px; }
.setup summary { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:16px 18px; cursor:pointer; list-style:none; }
.setup summary::-webkit-details-marker { display:none; }
.sum-title { font-weight:900; }
.sum-now { color:var(--muted); font-size:.8rem; text-align:right; }
.setup[open] .sum-now { display:none; }
.setup-body { display:grid; gap:14px; padding:0 18px 18px; }
.field { display:grid; gap:6px; min-width:0; }
.field label,.field-label { color:var(--muted); font-size:.8rem; font-weight:800; }
select,input[type="search"] { width:100%; min-height:42px; padding:8px 11px; border:1px solid var(--line-strong); border-radius:11px; background:var(--surface); }
select:disabled { opacity:.8; }
.course-fixed { padding:9px 12px; border-radius:11px; background:var(--surface-2); font-weight:700; font-size:.92rem; line-height:1.45; }
.seg { display:grid; gap:6px; }
.seg-2 { grid-template-columns:1fr 1fr; }
.seg-4 { grid-template-columns:repeat(4,1fr); }
.seg button { display:flex; align-items:center; justify-content:center; gap:6px; min-height:40px; padding:6px 8px; border:1px solid var(--line-strong); border-radius:10px; background:var(--surface); color:var(--ink); font-weight:700; font-size:.88rem; cursor:pointer; }
.seg button small { color:var(--muted); font-weight:700; font-variant-numeric:tabular-nums; }
.seg button[aria-checked="true"] { border-color:var(--brand); background:var(--brand-soft); color:var(--brand); box-shadow:inset 0 0 0 1px var(--brand); }
.seg button[aria-checked="true"] small { color:var(--brand); }
.switch { display:flex; align-items:center; gap:10px; font-weight:700; font-size:.92rem; cursor:pointer; }
.switch input { position:absolute; opacity:0; }
.switch .track { position:relative; width:42px; height:24px; border-radius:999px; background:var(--line-strong); transition:background .15s; }
.switch .track::after { content:""; position:absolute; top:3px; left:3px; width:18px; height:18px; border-radius:50%; background:#fff; box-shadow:0 1px 3px rgba(0,0,0,.25); transition:transform .15s; }
.switch input:checked + .track { background:var(--brand); }
.switch input:checked + .track::after { transform:translateX(18px); }
.switch input:focus-visible + .track { outline:3px solid color-mix(in srgb,var(--brand) 65%,transparent); outline-offset:2px; }
.mine { padding:16px 18px; }
.mine-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; font-weight:900; }
.mine-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.mine-grid div { display:grid; padding:10px 12px; border-radius:12px; background:var(--surface-2); }
.mine-grid strong { font-size:1.45rem; line-height:1.15; font-variant-numeric:tabular-nums; }
.mine-grid span { color:var(--muted); font-size:.78rem; font-weight:700; }
.mine-grid small { margin-left:3px; }
.mine-bar { height:6px; margin-top:12px; border-radius:999px; background:var(--surface-2); overflow:hidden; }
.mine-bar i { display:block; height:100%; width:0; background:var(--brand); border-radius:inherit; }
.kbd-note { margin:0 4px; color:var(--muted); font-size:.8rem; line-height:1.9; }
.stage { min-width:0; }
.status { min-height:1.4em; margin:0 4px 8px; color:var(--muted); font-size:.88rem; }
.status:empty { margin-bottom:0; min-height:0; }

/* ---------- question card ---------- */
.qcard { padding:0; background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow); overflow:clip; }
.qhead { display:flex; align-items:center; gap:14px; padding:14px 22px; border-bottom:1px solid var(--line); background:var(--surface-2); }
.qcount { flex:0 0 auto; font-variant-numeric:tabular-nums; white-space:nowrap; }
.qcount strong { font-size:1.08rem; }
.qcount span { color:var(--muted); font-weight:700; }
.qprog { flex:1 1 auto; height:8px; border-radius:999px; background:var(--line); overflow:hidden; }
.qprog i { display:block; height:100%; border-radius:inherit; background:var(--brand); transition:width .25s; }
.qscore { flex:0 0 auto; color:var(--muted); font-size:.85rem; font-weight:700; white-space:nowrap; }
.qscore b { color:var(--good); }
.qscore em { font-style:normal; color:var(--bad); font-weight:800; }
.star { flex:0 0 auto; display:inline-flex; align-items:center; gap:5px; padding:5px 11px; border:1px solid var(--line-strong); border-radius:999px; background:var(--surface); color:var(--muted); font-weight:800; font-size:.84rem; cursor:pointer; }
.star:hover { color:var(--accent-ink); border-color:var(--accent); }
.star.on { color:var(--accent-ink); background:var(--accent-soft); border-color:var(--accent); }
.qnav { display:flex; flex-wrap:wrap; gap:5px; padding:12px 22px 0; }
.qnav button { width:30px; height:30px; padding:0; border:1px solid var(--line); border-radius:8px; background:var(--surface); color:var(--muted); font:700 .76rem/1 "Cascadia Mono",Consolas,monospace; cursor:pointer; }
.qnav button.ok { background:var(--good-bg); border-color:color-mix(in srgb,var(--good) 45%,var(--line)); color:var(--good); }
.qnav button.ng { background:var(--bad-bg); border-color:color-mix(in srgb,var(--bad) 45%,var(--line)); color:var(--bad); }
.qnav button.cur { border:2px solid var(--brand); color:var(--brand); }
.qbody { padding:20px 22px 22px; }
.chips { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:12px; }
.chip { padding:3px 10px; border-radius:999px; background:var(--brand-soft); color:var(--brand); font-size:.78rem; font-weight:800; }
.chip.plain { background:var(--surface-2); color:var(--muted); }
.chip.warn { background:var(--warn-bg); color:var(--warn); }
.stem { margin:0 0 18px; font-size:clamp(1.1rem,2vw,1.3rem); font-weight:800; line-height:1.75; white-space:pre-wrap; overflow-wrap:anywhere; }
.raw-question { margin:0 0 8px; padding:14px 16px; border-radius:12px; background:var(--surface-2); font-weight:700; line-height:1.8; white-space:pre-wrap; overflow-wrap:anywhere; }
.format-note { margin:0 0 14px; color:var(--warn); font-size:.86rem; }
.options { display:grid; gap:10px; }
.option { position:relative; display:flex; align-items:flex-start; gap:14px; width:100%; min-height:58px; padding:13px 16px; border:1.5px solid var(--line); border-radius:14px; background:var(--surface); color:var(--ink); text-align:left; cursor:pointer; transition:border-color .15s,background .15s,box-shadow .15s; }
.option:hover:not(:disabled) { border-color:var(--brand); box-shadow:0 6px 18px -12px var(--brand); }
.option .key { flex:0 0 auto; display:grid; place-items:center; width:32px; height:32px; border-radius:9px; background:var(--surface-2); color:var(--brand); font:800 1rem/1 "Cascadia Mono",Consolas,monospace; }
.option .otext { flex:1 1 auto; min-width:0; padding-top:3px; font-size:1.02rem; overflow-wrap:anywhere; }
.option .ostate { flex:0 0 auto; align-self:center; padding:3px 10px; border-radius:999px; font-size:.78rem; font-weight:900; white-space:nowrap; }
.option.selected { border-color:var(--brand); background:var(--brand-soft); box-shadow:inset 0 0 0 1px var(--brand); }
.option.selected .key { background:var(--brand); color:var(--on-brand); }
.option:disabled { cursor:default; }
.option.dim { opacity:.62; }
.option.correct { opacity:1; border-color:var(--good); background:var(--good-bg); box-shadow:inset 0 0 0 1px var(--good); }
.option.correct .key { background:var(--good); color:var(--surface); }
.option.correct .ostate { background:var(--good); color:var(--surface); }
.option.wrong { opacity:1; border-color:var(--bad); background:var(--bad-bg); box-shadow:inset 0 0 0 1px var(--bad); }
.option.wrong .key { background:var(--bad); color:var(--surface); }
.option.wrong .ostate { background:var(--bad); color:var(--surface); }
.actions { display:flex; align-items:center; gap:10px; margin-top:20px; }
.actions .grow { flex:1 1 auto; }
.actions .hint { color:var(--muted); font-size:.8rem; }
.actions .btn.primary { min-width:150px; }
.answer { margin-top:22px; padding-top:20px; border-top:1px dashed var(--line-strong); scroll-margin-top:84px; }
.answer:focus { outline:none; }
.verdict { display:flex; align-items:center; gap:12px; padding:14px 16px; border-radius:14px; background:var(--good-bg); color:var(--good); font-weight:900; }
.verdict.bad { background:var(--bad-bg); color:var(--bad); }
.verdict .vi { display:grid; place-items:center; width:34px; height:34px; border-radius:50%; background:currentColor; flex:0 0 auto; }
.verdict .vi svg { color:var(--surface); }
.verdict small { display:block; color:var(--ink); font-weight:700; font-size:.86rem; opacity:.8; }
.ex-title { display:flex; align-items:center; gap:8px; margin:20px 0 10px; font-size:1.12rem; }
.ex-title::before { content:""; width:6px; height:20px; border-radius:3px; background:var(--accent); }
.rationale { margin:0; padding:15px 18px; border-radius:14px; background:var(--surface-2); white-space:pre-wrap; overflow-wrap:anywhere; }
.analysis { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin:0; padding:0; list-style:none; }
.analysis li { display:grid; grid-template-columns:34px minmax(0,1fr); gap:10px; padding:13px 14px; border:1px solid var(--line); border-radius:14px; }
.analysis li.correct { border-color:var(--good); background:var(--good-bg); }
.analysis li.wrong { border-color:var(--bad); background:var(--bad-bg); }
.analysis .key { display:grid; place-items:center; width:32px; height:32px; border-radius:9px; background:var(--surface-2); color:var(--brand); font:800 .95rem/1 "Cascadia Mono",Consolas,monospace; }
.analysis li.correct .key { background:var(--good); color:var(--surface); }
.analysis li.wrong .key { background:var(--bad); color:var(--surface); }
.analysis .tags { display:flex; flex-wrap:wrap; gap:5px; min-height:22px; }
.analysis .tag { padding:1px 8px; border-radius:999px; font-size:.72rem; font-weight:900; border:1px solid currentColor; }
.analysis .tag.good { color:var(--good); }
.analysis .tag.bad { color:var(--bad); }
.analysis p { margin:4px 0 0; overflow-wrap:anywhere; white-space:pre-wrap; }
.tip { margin-top:14px; padding:14px 16px 14px 18px; border-radius:14px; background:var(--accent-soft); border:1px solid color-mix(in srgb,var(--accent) 55%,transparent); }
.tip h3 { display:flex; align-items:center; gap:7px; margin:0 0 4px; font-size:.95rem; color:var(--accent-ink); }
.tip p { margin:0; white-space:pre-wrap; }
.notice { margin:14px 0; padding:12px 15px; border-radius:12px; background:var(--warn-bg); border:1px solid color-mix(in srgb,var(--warn) 40%,transparent); }
.notice strong { color:var(--warn); }
.notice p { margin:3px 0 0; font-size:.92rem; }
.empty { display:grid; place-items:center; min-height:320px; padding:30px; text-align:center; color:var(--muted); }
.empty strong { display:block; margin:6px 0; color:var(--ink); font-size:1.1rem; }
/* end-of-set summary */
.summary { padding:26px 24px; }
.sum-top { display:flex; align-items:center; gap:26px; }
.ring { --pct:0%; --ring:var(--brand); position:relative; display:grid; place-items:center; align-content:center; flex:0 0 auto; width:132px; aspect-ratio:1; border-radius:50%; background:conic-gradient(var(--ring) var(--pct),var(--surface-2) 0); }
.ring::after { content:""; position:absolute; inset:14px; border-radius:50%; background:var(--surface); }
.ring strong,.ring span { position:relative; z-index:1; }
.ring strong { font-size:1.9rem; line-height:1; font-variant-numeric:tabular-nums; }
.ring span { color:var(--muted); font-size:.78rem; font-weight:700; }
.ring.big { width:170px; margin:6px auto 12px; }
.summary h2 { margin:0 0 4px; font-size:1.4rem; }
.summary p { margin:0; color:var(--muted); }
.sum-btns { display:flex; flex-wrap:wrap; gap:8px; margin-top:14px; }
.review { display:grid; gap:8px; margin:22px 0 0; padding:0; list-style:none; }
.review button { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:12px; width:100%; padding:11px 14px; border:1px solid var(--line); border-radius:12px; background:var(--surface); text-align:left; cursor:pointer; }
.review button:hover { border-color:var(--brand); }
.review .no { font:800 .8rem/1 "Cascadia Mono",Consolas,monospace; color:var(--bad); }
.review .rs { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.review .ra { color:var(--muted); font-size:.82rem; white-space:nowrap; }

/* ---------- stats ---------- */
.stats { padding-top:22px; display:grid; gap:18px; }
.stats-top { display:grid; grid-template-columns:300px minmax(0,1fr); gap:18px; align-items:start; }
.stats h2 { margin:0 0 10px; font-size:1.05rem; }
.overall { padding:20px; text-align:center; }
.overall p { margin:0 0 14px; color:var(--muted); }
.overall-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.overall-grid div { display:grid; padding:9px 4px; border-radius:12px; background:var(--surface-2); }
.overall-grid strong { font-size:1.25rem; font-variant-numeric:tabular-nums; }
.overall-grid span { color:var(--muted); font-size:.74rem; font-weight:700; }
.per-course { padding:20px; min-width:0; }
.table-wrap { overflow-x:auto; }
table { width:100%; border-collapse:collapse; font-size:.92rem; }
th,td { padding:10px 8px; text-align:left; border-bottom:1px solid var(--line); vertical-align:middle; }
th { color:var(--muted); font-size:.78rem; font-weight:800; white-space:nowrap; }
td.num { font-variant-numeric:tabular-nums; white-space:nowrap; }
td .cname { font-weight:700; }
td .cunit { display:block; color:var(--muted); font-size:.76rem; }
.col-bar { width:24%; }
.bar { height:8px; min-width:80px; border-radius:999px; background:var(--surface-2); overflow:hidden; }
.bar i { display:block; height:100%; border-radius:inherit; background:var(--brand); }
.data-tools { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:14px; padding:18px 20px; }
.data-tools p { margin:0; color:var(--muted); font-size:.9rem; }
.tool-btns { display:flex; flex-wrap:wrap; gap:8px; }

/* ---------- course index (quiz pages) ---------- */
.course-index { margin-top:22px; padding:20px; }
.ci-head { display:flex; justify-content:space-between; align-items:baseline; gap:10px; margin-bottom:12px; }
.ci-head h2 { margin:0; font-size:1.05rem; }
.ci-list { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin:0; padding:0; list-style:none; counter-reset:none; }
.ci-list a { display:grid; grid-template-columns:auto minmax(0,1fr); gap:3px 10px; height:100%; padding:10px 12px; border:1px solid var(--line); border-radius:12px; color:var(--ink); text-decoration:none; }
.ci-list a:hover { border-color:var(--brand); }
.ci-list a[aria-current="page"] { border-color:var(--brand); background:var(--brand-soft); }
.ci-list .no { grid-row:span 2; display:grid; place-items:center; width:30px; height:30px; border-radius:8px; background:var(--surface-2); color:var(--brand); font:800 .8rem/1 "Cascadia Mono",Consolas,monospace; }
.ci-list .t { font-weight:700; font-size:.9rem; line-height:1.4; }
.ci-list .m { color:var(--muted); font-size:.76rem; }
.site-foot { padding:26px 0 34px; color:var(--muted); font-size:.84rem; border-top:1px solid var(--line); background:var(--surface); }
.site-foot p { margin:0 0 4px; }

/* ---------- overview page ---------- */
.hero { background-color:var(--surface); background-image:linear-gradient(var(--grid) 1px,transparent 1px),linear-gradient(90deg,var(--grid) 1px,transparent 1px); background-size:28px 28px; border-bottom:1px solid var(--line); }
.hero-in { display:grid; grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr); gap:44px; align-items:center; padding:56px 0 60px; }
.eyebrow { display:inline-flex; align-items:center; gap:10px; color:var(--brand); font-weight:900; letter-spacing:.08em; font-size:.88rem; }
.eyebrow::before { content:""; width:28px; height:4px; border-radius:2px; background:var(--accent); }
.hero h1 { margin:12px 0 14px; font-size:clamp(2.1rem,4.6vw,3.5rem); line-height:1.18; letter-spacing:.01em; }
.hero h1 em { font-style:normal; color:var(--brand); box-shadow:inset 0 -.32em 0 var(--accent-soft); }
.lead { margin:0; color:var(--muted); font-size:1.08rem; max-width:34em; }
.hero-cta { display:flex; flex-wrap:wrap; gap:10px; margin-top:24px; }
.hero-cta .btn { min-height:50px; padding:10px 20px; font-size:1rem; }
.kpis { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin-top:30px; }
.kpis div { padding:12px 14px; border:1px solid var(--line); border-radius:14px; background:var(--surface); }
.kpis strong { display:block; font-size:1.5rem; line-height:1.15; font-variant-numeric:tabular-nums; }
.kpis span { color:var(--muted); font-size:.8rem; font-weight:700; }
.demo { position:relative; padding:18px; border:1px solid var(--line); border-radius:22px; background:var(--surface); box-shadow:0 30px 60px -30px rgba(21,32,51,.35); }
.demo .chips { margin-bottom:10px; }
.demo .stem { font-size:1.08rem; margin-bottom:12px; }
.demo .option { min-height:48px; padding:10px 12px; }
.demo .option .otext { font-size:.95rem; }
.demo .tip { margin-top:12px; }
.demo-badge { position:absolute; right:-10px; top:-14px; padding:6px 12px; border-radius:10px; background:var(--accent); color:#2f2200; font-weight:900; font-size:.82rem; transform:rotate(3deg); box-shadow:0 8px 20px -10px rgba(0,0,0,.4); }
.section { padding:46px 0 10px; }
.section h2 { margin:0 0 6px; font-size:clamp(1.4rem,2.6vw,1.9rem); }
.section .sub { margin:0 0 20px; color:var(--muted); }
.picker { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin-bottom:16px; }
.pick-group { display:grid; gap:8px; }
.pick-group > span { color:var(--muted); font-size:.82rem; font-weight:800; }
.pick { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.pick button { display:grid; gap:2px; padding:12px 14px; border:1.5px solid var(--line-strong); border-radius:14px; background:var(--surface); text-align:left; cursor:pointer; }
.pick button b { font-size:1.05rem; }
.pick button small { color:var(--muted); font-weight:700; }
.pick button[aria-checked="true"] { border-color:var(--brand); background:var(--brand-soft); box-shadow:inset 0 0 0 1px var(--brand); }
.pick button[aria-checked="true"] b { color:var(--brand); }
.pick .now { display:inline-block; margin-left:6px; padding:0 7px; border-radius:999px; background:var(--accent); color:#2f2200; font-size:.7rem; vertical-align:2px; }
.set-panel { padding:22px; }
.set-top { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:16px; padding-bottom:18px; border-bottom:1px solid var(--line); }
.set-top h3 { margin:0; font-size:1.35rem; }
.set-top p { margin:2px 0 0; color:var(--muted); }
.set-top h3 .now { margin-left:8px; padding:1px 8px; border-radius:999px; background:var(--accent); color:#2f2200; font-size:.72rem; vertical-align:3px; }
.set-prog { display:flex; align-items:center; gap:14px; }
.set-prog .ring { width:74px; }
.set-prog .ring::after { inset:8px; }
.set-prog .ring strong { font-size:1rem; }
.set-prog .ring span { font-size:.62rem; }
.set-prog div > b { display:block; font-variant-numeric:tabular-nums; }
.set-prog div > span { color:var(--muted); font-size:.82rem; }
.courses { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin:16px 0 0; padding:0; list-style:none; }
.courses a { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:12px; padding:11px 14px; border:1px solid var(--line); border-radius:13px; color:var(--ink); text-decoration:none; }
.courses a:hover { border-color:var(--brand); box-shadow:0 8px 20px -16px var(--brand); }
.courses .no { display:grid; place-items:center; width:34px; height:34px; border-radius:9px; background:var(--surface-2); color:var(--brand); font:800 .85rem/1 "Cascadia Mono",Consolas,monospace; }
.courses .t { display:grid; min-width:0; line-height:1.35; }
.courses .t b { font-size:.95rem; overflow-wrap:anywhere; }
.courses .t small { color:var(--muted); font-size:.76rem; font-weight:700; }
.courses .c { display:grid; justify-items:end; gap:4px; font-size:.8rem; color:var(--muted); font-weight:700; font-variant-numeric:tabular-nums; white-space:nowrap; }
.courses .c .bar { width:70px; min-width:0; height:5px; }
.features { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; }
.feature { padding:20px; }
.feature .fi { display:grid; place-items:center; width:44px; height:44px; margin-bottom:12px; border-radius:12px; background:var(--brand-soft); color:var(--brand); }
.feature h3 { margin:0 0 6px; font-size:1.05rem; }
.feature p { margin:0; color:var(--muted); font-size:.92rem; }
.foot-row { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:14px; }
.visitor-counter { display:inline-flex; align-items:center; gap:10px; padding:9px 14px; border:1px solid var(--line); border-radius:999px; background:var(--surface-2); color:var(--brand); font-weight:900; }
.visitor-counter strong { min-width:2ch; font-variant-numeric:tabular-nums; }
.counter-dot { width:8px; height:8px; border-radius:50%; background:var(--good); box-shadow:0 0 0 4px color-mix(in srgb,var(--good) 18%,transparent); }

/* ---------- responsive ---------- */
@media (max-width:1100px) {
  .features { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .ci-list { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:960px) {
  .quiz-layout { grid-template-columns:minmax(0,1fr); gap:14px; padding-top:14px; }
  .side { position:static; grid-template-columns:minmax(0,1fr); }
  .kbd-note { display:none; }
  .mine { padding:12px 14px; }
  .mine-head { display:none; }
  .mine-grid { grid-template-columns:repeat(4,minmax(0,1fr)); gap:6px; }
  .mine-grid div { padding:7px 8px; }
  .mine-grid strong { font-size:1.1rem; }
  .mine-grid span { font-size:.7rem; }
  .mine-bar { display:none; }
  .stats-top { grid-template-columns:minmax(0,1fr); }
  .hero-in { grid-template-columns:minmax(0,1fr); padding:36px 0 40px; gap:30px; }
  .courses { grid-template-columns:minmax(0,1fr); }
}
@media (max-width:720px) {
  .shell { width:calc(100% - 24px); }
  .topbar-in { min-height:56px; gap:10px; }
  .brand small { display:none; }
  .set-switch a { padding:5px 10px; font-size:.78rem; }
  .head-row { flex-direction:column; align-items:stretch; gap:6px; }
  .head-meta { margin-bottom:6px; }
  .tabs { align-self:flex-start; margin-left:-12px; }
  .qhead { padding:12px 14px; gap:10px; flex-wrap:wrap; }
  .qprog { order:3; flex-basis:100%; }
  .qscore { margin-left:auto; }
  .qnav { flex-wrap:nowrap; overflow-x:auto; padding:10px 14px 2px; scrollbar-width:none; }
  .qnav::-webkit-scrollbar { display:none; }
  .qnav button { flex:0 0 auto; }
  .crumbs { display:none; }
  .head-row { padding-top:14px; }
  .head-meta { font-size:.88rem; }
  .quiz-page .mine { display:none; }
  .setup summary { padding:13px 16px; }
  .qbody { padding:16px 14px 18px; }
  .option { padding:11px 12px; gap:11px; }
  .actions { position:sticky; bottom:0; z-index:5; margin:18px -14px -18px; padding:10px 14px calc(10px + env(safe-area-inset-bottom)); background:color-mix(in srgb,var(--surface) 94%,transparent); backdrop-filter:blur(8px); border-top:1px solid var(--line); }
  .actions .hint { display:none; }
  .actions .btn.primary { min-width:0; flex:1 1 auto; }
  .answer { margin-top:28px; }
  .analysis { grid-template-columns:minmax(0,1fr); }
  .sum-top { flex-direction:column; align-items:flex-start; gap:14px; }
  .ci-list { grid-template-columns:minmax(0,1fr); }
  .picker { grid-template-columns:minmax(0,1fr); }
  .kpis { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .features { grid-template-columns:minmax(0,1fr); }
  .demo-badge { right:8px; }
  .col-bar { display:none; }
  td.cbar { display:none; }
}
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior:auto!important; transition-duration:.01ms!important; animation-duration:.01ms!important; } }
