/* ============================================================
   执兽通 · 题库界面
   取色克制：白底、深蓝主色、灰色分隔；不用渐变、光晕、表情图标。
   ============================================================ */
:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --surface-3: #eef1f5;
  --ink: #1b2430;
  --ink-2: #3a4655;
  --muted: #6b7684;
  --line: #e2e6eb;
  --line-strong: #c9d0d9;
  --brand: #1f4e79;
  --brand-2: #173d5f;
  --brand-soft: #eaf1f7;
  --brand-ink: #1b4368;
  --danger: #b42318;
  --danger-soft: #fdf1f0;
  --ok: #067647;
  --ok-soft: #eef7f2;
  --warn: #b45309;
  --warn-soft: #fdf4e8;
  --radius: 8px;
  --radius-sm: 6px;
  --font: "PingFang SC", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC",
    system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Consolas, "Cascadia Mono", monospace;
  --sidebar: 240px;
  --maxw: 1080px;
}

html[data-theme="dark"] {
  --bg: #12161b;
  --surface: #191f26;
  --surface-2: #1f262e;
  --surface-3: #252d36;
  --ink: #e6eaef;
  --ink-2: #c2cad3;
  --muted: #8b95a1;
  --line: #2b333d;
  --line-strong: #3c4652;
  --brand: #5b9bd5;
  --brand-2: #4a86bd;
  --brand-soft: #1d2b38;
  --brand-ink: #9cc6e8;
  --danger: #e58075;
  --danger-soft: #36201d;
  --ok: #6cc79a;
  --ok-soft: #182b22;
  --warn: #e0a24e;
  --warn-soft: #332a1a;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; font-size: var(--fs, 15px); }
@media (max-width: 600px) { html { font-size: calc(var(--fs, 15px) - 0.5px); } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: var(--brand-ink); text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.4; font-weight: 600; letter-spacing: 0; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.skip {
  position: fixed; left: 12px; top: -60px; z-index: 99; padding: 8px 14px;
  background: var(--ink); color: #fff; border-radius: 6px; transition: top .15s;
}
.skip:focus { top: 12px; }
[hidden] { display: none !important; }

/* ---------- 布局 ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.main { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.view {
  width: 100%; max-width: var(--maxw); margin: 0 auto;
  padding: 28px clamp(16px, 3vw, 36px) 72px;
  outline: none;
}

/* ---------- 侧栏 ---------- */
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 16px;
  padding: 20px 14px 16px;
  border-right: 1px solid var(--line);
  background: var(--surface);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); padding: 2px 6px; }
.brand-mark {
  width: 34px; height: 34px; flex: none; display: grid; place-items: center;
  border-radius: 7px; color: #fff; font-weight: 700; font-size: 17px;
  background: var(--brand);
  font-family: "Songti SC", "STSong", serif;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.3; }
.brand-text strong { font-size: 16px; letter-spacing: .02em; }
.brand-text small { color: var(--muted); font-size: 11px; }
.search-trigger {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--surface-2); color: var(--muted); cursor: pointer; text-align: left;
  font-size: 13px;
}
.search-trigger:hover { border-color: var(--line-strong); color: var(--ink-2); }
.search-trigger kbd {
  margin-left: auto; font-family: var(--mono); font-size: 10px; padding: 0 5px;
  border: 1px solid var(--line); border-radius: 3px; background: var(--surface); color: var(--muted);
}
.si { display: inline-grid; place-items: center; width: 17px; height: 17px; flex: none; }
.si svg { width: 100%; height: 100%; }

.side-nav { display: flex; flex-direction: column; gap: 1px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  border-radius: 5px; color: var(--ink-2); font-size: 13.5px;
}
.nav-item:hover { background: var(--surface-2); color: var(--ink); }
.nav-item.active { background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }

.side-units { border-top: 1px solid var(--line); padding-top: 12px; }
.side-units h4 { font-size: 11px; color: var(--muted); font-weight: 600; margin: 0 0 6px 8px; letter-spacing: .04em; }
.unit-link {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 6px 8px; border-radius: 5px; font-size: 12.5px; color: var(--ink-2);
}
.unit-link:hover { background: var(--surface-2); }
.unit-link em { font-style: normal; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }

.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.countdown-card { border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; background: var(--surface-2); }
.countdown-card .cd-num { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--brand-ink); line-height: 1.2; }
.countdown-card .cd-label { font-size: 11.5px; color: var(--muted); }
.countdown-card .cd-date { font-size: 11px; color: var(--muted); margin-top: 2px; }
.offline-note { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); padding-left: 4px; }
.offline-note .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--ok); }

/* ---------- 顶栏 / 底部标签（手机） ---------- */
.topbar { display: none; position: sticky; top: 0; z-index: 30; align-items: center; gap: 4px;
  padding: calc(6px + env(safe-area-inset-top)) 8px 6px; border-bottom: 1px solid var(--line);
  background: var(--surface); }
.topbar-title { flex: 1; text-align: center; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn {
  width: 36px; height: 36px; flex: none; display: grid; place-items: center;
  border: 1px solid transparent; border-radius: 6px; background: transparent; cursor: pointer; color: var(--ink-2);
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--line); }
.icon-btn .si { width: 19px; height: 19px; }

.tabbar { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  grid-template-columns: repeat(5, 1fr); padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); background: var(--surface); }
.tab { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 5px 0 3px;
  color: var(--muted); font-size: 10.5px; border-radius: 5px; }
.tab .si { width: 20px; height: 20px; }
.tab em { font-style: normal; }
.tab.active { color: var(--brand-ink); font-weight: 600; }

/* ---------- 通用 ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { font-size: clamp(20px, 2.6vw, 24px); }
.page-head .sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.crumb { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); margin-bottom: 8px; flex-wrap: wrap; }
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--brand-ink); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.card-pad { padding: 18px 20px; }
.card-hd { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.card-hd h3 { font-size: 14.5px; }
.card.clickable { cursor: pointer; transition: border-color .12s, background .12s; }
.card.clickable:hover { border-color: var(--line-strong); background: var(--surface-2); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 14px; border-radius: 6px; border: 1px solid var(--line);
  font-size: 13.5px; font-weight: 500; cursor: pointer; transition: .12s; white-space: nowrap;
  background: var(--surface); color: var(--ink);
}
.btn:hover { border-color: var(--line-strong); background: var(--surface-2); }
.btn:active { transform: translateY(0.5px); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-2); border-color: var(--brand-2); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink-2); }
.btn-danger { color: var(--danger); border-color: var(--line); background: transparent; }
.btn-danger:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn-sm { padding: 5px 10px; font-size: 12.5px; border-radius: 5px; }
.btn-lg { padding: 10px 18px; font-size: 14.5px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

.pill { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border-radius: 4px; font-size: 11.5px; font-weight: 500; line-height: 1.8; }
.pill-brand { background: var(--brand-soft); color: var(--brand-ink); }
.pill-amber { background: var(--warn-soft); color: var(--warn); }
.pill-red { background: var(--danger-soft); color: var(--danger); }
.pill-green { background: var(--ok-soft); color: var(--ok); }
.pill-gray { background: var(--surface-3); color: var(--muted); }
.pill-blue { background: var(--brand-soft); color: var(--brand-ink); }

.stars { color: var(--warn); letter-spacing: 1px; font-size: 12px; }
.stars .off { color: var(--line-strong); }

.segmented { display: inline-flex; padding: 2px; gap: 1px; background: var(--surface-3); border-radius: 6px; }
.segmented button { border: 0; background: transparent; padding: 5px 11px; border-radius: 4px; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.segmented button.on { background: var(--surface); color: var(--ink); font-weight: 600; border: 1px solid var(--line); }

.progress { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 3px; background: var(--brand); transition: width .3s; }
.progress.thin { height: 4px; }
.progress.amber > i { background: var(--warn); }

.grid { display: grid; gap: 12px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); }
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } .grid-3 { grid-template-columns: 1fr; } }

.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.row { display: flex; align-items: center; gap: 8px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wrap { flex-wrap: wrap; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; } .mt-28 { margin-top: 28px; } .mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; }

.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .big { display: none; }
.empty h3 { color: var(--ink-2); font-size: 15px; margin-bottom: 4px; }

/* ---------- 首页总览 ---------- */
.overview {
  display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between;
  padding: 22px 24px; background: var(--surface); border: 1px solid var(--line);
  border-left: 3px solid var(--brand); border-radius: var(--radius);
}
.overview .ov-main { flex: 1; min-width: 240px; }
.overview .ov-kicker { font-size: 12px; color: var(--muted); }
.overview h1 { font-size: clamp(20px, 2.6vw, 25px); margin-top: 4px; }
.overview .ov-sub { color: var(--ink-2); font-size: 13px; margin-top: 6px; max-width: 52ch; }
.ov-stats { display: flex; gap: 28px; margin-top: 16px; flex-wrap: wrap; }
.ov-stats .k { font-size: 11.5px; color: var(--muted); }
.ov-stats .v { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ov-actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.ov-side { width: 210px; flex: none; display: flex; flex-direction: column; gap: 8px; }
.ov-side .os-row { display: flex; align-items: baseline; justify-content: space-between; font-size: 12px; color: var(--muted); }
.ov-side .os-row b { font-size: 13px; color: var(--ink); font-variant-numeric: tabular-nums; }

.section-hd { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 24px 0 10px; }
.section-hd h2 { font-size: 15.5px; }
.section-hd a { font-size: 12px; color: var(--muted); }
.section-hd a:hover { color: var(--brand-ink); }

.unit-card { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.unit-card .uc-hd { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.unit-card h3 { font-size: 14px; }
.unit-card .uc-desc { font-size: 12px; color: var(--muted); line-height: 1.6; min-height: 38px; }
.unit-card .uc-meta { display: flex; align-items: center; justify-content: space-between; font-size: 11.5px; color: var(--muted); }

.today-list { display: flex; flex-direction: column; }
.topic-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); transition: background .12s; }
.topic-item:last-child { border-bottom: 0; }
.topic-item:hover { background: var(--surface-2); }
.topic-item .no { font-family: var(--mono); font-size: 12px; color: var(--muted); padding-top: 2px; width: 20px; flex: none; }
.topic-item .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.topic-item .t-title { font-size: 13.5px; font-weight: 500; line-height: 1.5; }
.topic-item .t-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); }
.topic-item .chev { color: var(--line-strong); align-self: center; }

/* ---------- 考点库 ---------- */
.unit-head { display: flex; align-items: center; justify-content: space-between; margin: 22px 0 10px; gap: 10px; }
.unit-head h2 { font-size: 15.5px; }
.subject-card { padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.subject-card .sc-top { display: flex; align-items: flex-start; gap: 10px; }
.subject-ico {
  width: 38px; height: 38px; flex: none; border-radius: 6px; display: grid; place-items: center;
  font-size: 16px; font-weight: 600; background: var(--brand-soft); color: var(--brand-ink);
  border: 0;
}
.subject-card h3 { font-size: 13.5px; line-height: 1.45; font-weight: 500; }
.subject-card .sc-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.subject-card .sc-bar { display: flex; align-items: center; gap: 8px; }
.subject-card .sc-bar .progress { flex: 1; }
.subject-card .sc-pct { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- 科目页 ---------- */
.subject-hero { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; padding: 20px; }
.subject-hero .sh-body { flex: 1; min-width: 220px; }
.subject-hero h1 { font-size: clamp(19px, 2.4vw, 23px); }
.subject-hero .sh-intro { color: var(--ink-2); font-size: 13.5px; margin-top: 6px; }
.subject-hero .sh-note { color: var(--muted); font-size: 12px; margin-top: 8px; padding-left: 10px; border-left: 2px solid var(--line); }
.subject-hero .sh-stats { display: flex; gap: 24px; margin-top: 14px; flex-wrap: wrap; }
.subject-hero .sh-stats .k { font-size: 11.5px; color: var(--muted); }
.subject-hero .sh-stats .v { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }

.filter-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 16px 0 8px; }

/* ---------- 考点页 ---------- */
.topic-head { display: flex; flex-direction: column; gap: 8px; }
.topic-head h1 { font-size: clamp(19px, 2.6vw, 23px); line-height: 1.45; }
.topic-tags { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.topic-body { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) { .topic-body { grid-template-columns: minmax(0, 1fr) 264px; align-items: start; } }
.topic-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.topic-aside { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 16px; }
@media (max-width: 999px) { .topic-aside { display: none; } }

.block { padding: 18px 20px; }
.block-hd { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; padding-left: 9px; border-left: 3px solid var(--brand); }
.block-hd h3 { font-size: 14px; }
.block-hd .bh-ico { display: none; }
.explain p { font-size: 14.5px; line-height: 1.85; color: var(--ink-2); margin-bottom: 10px; }
.explain p:last-child { margin-bottom: 0; }
.explain strong { color: var(--ink); font-weight: 600; }

.mustknow { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.mustknow li { display: flex; gap: 8px; font-size: 13.5px; line-height: 1.65; color: var(--ink-2); }
.mustknow li::before { content: ""; flex: none; width: 5px; height: 5px; border-radius: 50%; background: var(--brand); margin-top: 9px; }

.mem-card { background: var(--surface-2); }
.mem-row { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; line-height: 1.7; }
.mem-row:last-child { border-bottom: 0; }
.mem-row .mk { flex: none; width: 58px; font-size: 11.5px; color: var(--muted); padding-top: 2px; }
.mem-row .mv { color: var(--ink-2); }
.mnemonic { font-weight: 600; color: var(--brand-ink); }

.trap-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.trap-list li { font-size: 13px; color: var(--ink-2); background: var(--danger-soft); border-radius: 5px; padding: 8px 10px; line-height: 1.65; }

.freq-box { font-size: 13px; color: var(--ink-2); line-height: 1.75; }
.freq-box .fb-line { display: flex; gap: 8px; padding: 4px 0; }
.freq-box .fb-line .k { color: var(--muted); flex: none; width: 60px; }
.side-link { display: flex; flex-direction: column; }
.side-link a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 2px; border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--ink-2); }
.side-link a:last-child { border-bottom: 0; }
.side-link a:hover { color: var(--brand-ink); }
.side-link a > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.side-link a .stars { flex: none; letter-spacing: 0; font-size: 10.5px; }

.read-btn { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--brand-ink); background: var(--brand-soft); border: 0; padding: 5px 10px; border-radius: 5px; cursor: pointer; }
.read-btn:hover { background: var(--surface-3); }

/* ---------- 刷题 ---------- */
.practice-top { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.practice-top .pt-title { font-size: 13.5px; font-weight: 600; }
.practice-top .pt-sub { font-size: 11.5px; color: var(--muted); }
.q-progress { flex: 1; min-width: 100px; }

.q-card { padding: clamp(16px, 2.4vw, 26px); }
.q-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.q-type { font-family: var(--mono); font-size: 11px; font-weight: 600; padding: 2px 6px; border-radius: 4px; background: var(--brand-soft); color: var(--brand-ink); }
.q-topic { font-size: 11.5px; color: var(--muted); }
.q-score { margin-left: auto; font-size: 11.5px; color: var(--muted); }
.q-case { font-size: 13.5px; line-height: 1.8; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; margin-bottom: 14px; }
.q-stem { font-size: clamp(15px, 2vw, 16.5px); font-weight: 600; line-height: 1.7; color: var(--ink); margin-bottom: 14px; }

.q-options { display: flex; flex-direction: column; gap: 8px; }
.opt {
  display: flex; align-items: flex-start; gap: 10px; width: 100%; text-align: left;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface);
  cursor: pointer; font-size: 14px; line-height: 1.6; transition: border-color .12s, background .12s;
}
.opt:hover { border-color: var(--line-strong); background: var(--surface-2); }
.opt .letter { flex: none; width: 22px; height: 22px; border-radius: 4px; display: grid; place-items: center;
  border: 1px solid var(--line); font-family: var(--mono); font-size: 11.5px; font-weight: 600; color: var(--muted); background: var(--surface-2); }
.opt .otext { flex: 1; }
.opt.sel { border-color: var(--brand); background: var(--brand-soft); }
.opt.sel .letter { background: var(--brand); border-color: var(--brand); color: #fff; }
.opt.correct { border-color: var(--ok); background: var(--ok-soft); }
.opt.correct .letter { background: var(--ok); border-color: var(--ok); color: #fff; }
.opt.wrong { border-color: var(--danger); background: var(--danger-soft); }
.opt.wrong .letter { background: var(--danger); border-color: var(--danger); color: #fff; }
.opt.dim { opacity: .6; }
.opt[disabled] { cursor: default; }
.opt .mark { margin-left: auto; font-size: 13px; font-weight: 700; }
.opt.correct .mark { color: var(--ok); }
.opt.wrong .mark { color: var(--danger); }

.judge { display: flex; align-items: center; gap: 8px; margin: 14px 0 4px; padding: 9px 12px; border-radius: 5px; font-size: 13px; font-weight: 600; }
.judge.ok { background: var(--ok-soft); color: var(--ok); }
.judge.bad { background: var(--danger-soft); color: var(--danger); }
.judge.neutral { background: var(--surface-3); color: var(--muted); }

.explain-box { margin-top: 12px; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--surface-2); }
.explain-box .ex-hd { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-bottom: 1px solid var(--line); font-size: 12.5px; font-weight: 600; color: var(--ink-2); background: var(--surface); }
.explain-box .ex-hd .ex-status { margin-left: auto; font-weight: 400; color: var(--muted); font-size: 11px; }
.explain-box .ex-bd { padding: 12px; font-size: 13.5px; line-height: 1.8; color: var(--ink-2); }
.explain-box .ex-bd p + p { margin-top: 6px; }
.ex-src { margin-top: 8px; font-size: 11px; color: var(--muted); line-height: 1.6; }

.steps { list-style: none; display: flex; flex-direction: column; gap: 8px; margin: 10px 0 4px; }
.steps li { display: flex; gap: 8px; font-size: 13px; line-height: 1.7; color: var(--ink-2); }
.steps li .sn { flex: none; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-3); color: var(--ink-2); font-size: 10px; font-weight: 600; margin-top: 2px; }
.kp-trap { display: grid; gap: 8px; margin-top: 12px; }
@media (min-width: 720px) { .kp-trap { grid-template-columns: 1fr 1fr; } }
.kp, .tp { border-radius: 5px; padding: 9px 11px; font-size: 12.5px; line-height: 1.7; }
.kp { background: var(--brand-soft); color: var(--brand-ink); }
.tp { background: var(--warn-soft); color: var(--warn); }
.kp b, .tp b { display: block; font-size: 10.5px; margin-bottom: 2px; opacity: .8; font-weight: 600; }

.practice-foot { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.practice-foot .btn { flex: 1; }
@media (max-width: 560px) { .practice-foot .btn { flex: 1 1 100%; } }

.session-done { text-align: center; padding: 24px 16px; }
.session-done .big-score { font-size: 44px; font-weight: 700; color: var(--ink); line-height: 1.1; font-variant-numeric: tabular-nums; }
.sd-stats { display: flex; justify-content: center; gap: 26px; margin: 16px 0 20px; flex-wrap: wrap; }
.sd-stats .k { font-size: 11.5px; color: var(--muted); }
.sd-stats .v { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- 模拟考 ---------- */
.exam-card { padding: 16px; display: flex; flex-direction: column; gap: 8px; cursor: pointer; }
.exam-card h3 { font-size: 14.5px; }
.exam-card .ec-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); }
.exam-card .ec-bar { display: flex; align-items: center; gap: 8px; }
.exam-card .ec-bar .progress { flex: 1; }

.exam-shell { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
@media (min-width: 1000px) { .exam-shell { grid-template-columns: minmax(0, 1fr) 244px; align-items: start; } }
.exam-timer { font-family: var(--mono); font-size: 14px; font-weight: 600; color: var(--brand-ink); background: var(--brand-soft); padding: 3px 8px; border-radius: 4px; font-variant-numeric: tabular-nums; }
.exam-timer.warn { color: var(--danger); background: var(--danger-soft); }
.sheet-panel { position: sticky; top: 16px; padding: 12px; }
.sheet-panel h4 { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.sheet-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; max-height: 400px; overflow-y: auto; }
@media (max-width: 999px) { .sheet-grid { grid-template-columns: repeat(8, 1fr); max-height: none; } }
.sheet-btn {
  aspect-ratio: 1; border: 1px solid var(--line); border-radius: 4px; background: var(--surface);
  font-family: var(--mono); font-size: 10.5px; color: var(--muted); cursor: pointer; display: grid; place-items: center; padding: 0;
}
.sheet-btn.done { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-ink); font-weight: 600; }
.sheet-btn.flag { background: var(--warn-soft); border-color: var(--warn); color: var(--warn); font-weight: 600; }
.sheet-btn.cur { outline: 2px solid var(--brand); outline-offset: 1px; }
.sheet-legend { display: flex; gap: 10px; margin-top: 8px; font-size: 10.5px; color: var(--muted); flex-wrap: wrap; }
.sheet-legend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; margin-right: 3px; }
.sheet-desktop { display: none; }
@media (min-width: 1000px) { .sheet-desktop { display: block; } #openSheet { display: none; } }

.result-hero { text-align: center; padding: 24px 20px; }
.result-hero .r-score { font-size: clamp(44px, 7vw, 60px); font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.result-hero .r-score.pass { color: var(--ok); }
.result-hero .r-score.fail { color: var(--danger); }
.result-hero .r-sub { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.result-hero .r-badge { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 4px 12px; border-radius: 4px; font-size: 13px; font-weight: 600; }
.result-hero .r-badge.pass { background: var(--ok-soft); color: var(--ok); }
.result-hero .r-badge.fail { background: var(--danger-soft); color: var(--danger); }
.result-grid { display: grid; gap: 10px; margin-top: 18px; text-align: left; }
@media (min-width: 720px) { .result-grid { grid-template-columns: repeat(3, 1fr); } }
.result-grid .rg-item { background: var(--surface-2); border: 1px solid var(--line); border-radius: 5px; padding: 10px 12px; }
.result-grid .rg-item .k { font-size: 11.5px; color: var(--muted); }
.result-grid .rg-item .v { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- 统计 ---------- */
.stat-hero { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.stat-box { padding: 14px 16px; }
.stat-box .k { font-size: 11.5px; color: var(--muted); }
.stat-box .v { font-size: 23px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.3; margin-top: 2px; }
.stat-box .d { font-size: 11px; color: var(--muted); }
.bar-list { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 92px minmax(0, 1fr) 70px; gap: 10px; align-items: center; font-size: 12px; }
.bar-row .bl { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .bv { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 110px; padding-top: 6px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; min-width: 0; }
.bar-col .b { width: 100%; max-width: 22px; border-radius: 3px 3px 0 0; background: var(--brand); }
.bar-col .lb { font-size: 9.5px; color: var(--muted); white-space: nowrap; }

.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal-day { position: relative; aspect-ratio: 1; border-radius: 3px; background: var(--surface-3); display: grid; place-items: center; }
.cal-day::after { content: ""; position: absolute; inset: 0; border-radius: 3px; background: var(--brand); opacity: var(--a, 0); }
.cal-day i { position: relative; z-index: 1; font-style: normal; font-size: 9px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.cal-day[style*="--a:0"] i { color: var(--muted); }

/* ---------- 列表 ---------- */
.list { display: flex; flex-direction: column; }
.list-row { display: flex; align-items: center; gap: 10px; padding: 11px 2px; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.list-row .lr-body { flex: 1; min-width: 0; }
.list-row .lr-title { font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row .lr-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.list-row .lr-act { flex: none; }

/* ---------- 弹层 ---------- */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 18px;
  background: rgba(16, 22, 28, .42); }
.modal-panel { width: min(560px, 100%); background: var(--surface); border-radius: 8px; box-shadow: 0 8px 28px rgba(16,22,28,.18);
  padding: 18px 20px; max-height: 86vh; overflow-y: auto; }
.modal-panel h3 { font-size: 16px; margin-bottom: 6px; }
.modal-panel .mp-body { color: var(--ink-2); font-size: 13.5px; line-height: 1.7; }
.modal-actions { display: flex; gap: 8px; margin-top: 16px; justify-content: flex-end; flex-wrap: wrap; }
.modal-actions .btn { flex: 0 1 auto; }
@media (max-width: 560px) {
  .modal { align-items: end; padding: 0; }
  .modal-panel { width: 100%; border-radius: 8px 8px 0 0; max-height: 88vh; }
  .modal-actions .btn { flex: 1; }
}

.toast { position: fixed; left: 50%; bottom: 76px; transform: translate(-50%, 8px); z-index: 90;
  background: var(--ink); color: #fff; font-size: 12.5px; padding: 7px 14px; border-radius: 5px;
  opacity: 0; pointer-events: none; transition: .18s; max-width: 86vw; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 961px) { .toast { bottom: 22px; } }

/* ---------- 表单 ---------- */
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 12px; color: var(--muted); font-weight: 500; }
.input, select.input { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 5px;
  background: var(--surface); color: var(--ink); font: inherit; font-size: 13.5px; }
.input:focus { border-color: var(--brand); outline: none; }
.form-grid { display: grid; gap: 12px; }
@media (min-width: 560px) { .form-grid { grid-template-columns: 1fr 1fr; } }

.search-input-wrap { position: relative; }
.search-input-wrap .si { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 17px; height: 17px; }
.search-input { width: 100%; padding: 11px 12px 11px 38px; border: 1px solid var(--line); border-radius: 6px;
  font-size: 14px; background: var(--surface); color: var(--ink); }
.search-input:focus { border-color: var(--brand); outline: none; }
mark { background: var(--warn-soft); color: var(--warn); padding: 0 1px; border-radius: 2px; }

/* ---------- 其他 ---------- */
.tip-card { display: flex; gap: 10px; padding: 12px 14px; border-radius: 5px; background: var(--brand-soft); color: var(--brand-ink); font-size: 12.5px; line-height: 1.7; }
.disclaimer { color: var(--muted); font-size: 11px; line-height: 1.7; margin-top: 24px; padding-top: 12px; border-top: 1px solid var(--line); }

.chip-row { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { padding: 4px 10px; border-radius: 4px; border: 1px solid var(--line); background: var(--surface);
  font-size: 12px; color: var(--muted); cursor: pointer; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }

@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .topbar { display: flex; }
  .tabbar { display: grid; }
  .view { padding-top: 16px; padding-bottom: 88px; }
  .topic-aside { display: none; }
  .overview { padding: 16px; gap: 14px; }
  .ov-side { width: 100%; }
}

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

.fade-in { animation: none; }

::selection { background: var(--brand-soft); color: var(--brand-ink); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }
