/* 初中知识图谱与自适应伴学系统：全站配色、字号、导航、现代化视觉规范。 */

:root {
  color-scheme: light;
  --bg: #f8fafc;
  --bg-elev: #ffffff;
  --bg-muted: #f1f5f9;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-subtle: #f1f5f9;
  --brand: #0d9488;
  --brand-strong: #0f766e;
  --brand-soft: #f0fdfa;
  --brand-glow: rgba(13, 148, 136, 0.15);
  --on-brand: #ffffff;
  --junior: #2563eb;
  --junior-soft: #eff6ff;
  --focus: #0d9488;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, 0.07), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 12px 28px -4px rgba(0, 0, 0, 0.1), 0 6px 12px -6px rgba(0, 0, 0, 0.06);
  --radius: 14px;
  --radius-lg: 18px;
  --radius-sm: 8px;
  --header-bg: rgba(255, 255, 255, 0.88);
  --logo-sheet: #ccfbf1;
  --logo-fold: #ffffff;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, "Noto Sans CJK SC", sans-serif;
  --fs: 16px;
  --ok: #16a34a;
  --ok-bg: #dcfce7;
  --on-ok: #ffffff;
  --bad: #dc2626;
  --bad-bg: #fee2e2;
  --on-bad: #ffffff;
  --warn: #ea580c;
  --warn-bg: #ffedd5;
  --unk: #475569;
  --unk-bg: #e2e8f0;
  --accent: #0d9488;
  --panel: #ffffff;
  --node-primary: #0d9488;
  --node-primary-bg: #ccfbf1;
  --node-junior: #2563eb;
  --node-junior-bg: #dbeafe;
  --node-senior: #9333ea;
  --node-senior-bg: #f3e8ff;
  --node-current-bg: #fff7ed;
  --node-current-border: #ea580c;
  --node-text: #0f172a;
  --edge: #64748b;
  --edge-soft: #94a3b8;
  --hard-bg: #ffedd5;
  --hard-fg: #c2410c;
  --soft-bg: #f1f5f9;
  --soft-fg: #475569;
  --diagram-ok-bg: #dcfce7;
  --diagram-ok: #16a34a;
  --diagram-bad-bg: #fee2e2;
  --diagram-bad: #dc2626;
  --diagram-unk-bg: #f1f5f9;
  --diagram-unk: #64748b;
  --diagram-shaky-bg: #fef3c7;
  --diagram-shaky: #b45309;
  --diagram-text: #0f172a;
  --diagram-edge: #64748b;
}

body.subject-physics {
  --brand: #b45309;
  --brand-strong: #92400e;
  --brand-soft: #fff7ed;
  --on-brand: #ffffff;
  --focus: #b45309;
  --accent: #b45309;
  --logo-sheet: #fde9d4;
  --logo-fold: #ffffff;
}

body.subject-english {
  --brand: #4338ca;
  --brand-strong: #3730a3;
  --brand-soft: #eef2ff;
  --on-brand: #ffffff;
  --focus: #4338ca;
  --accent: #4338ca;
  --logo-sheet: #e6e8fb;
  --logo-fold: #ffffff;
}

body.subject-science {
  --brand: #047857;
  --brand-strong: #065f46;
  --brand-soft: #ecfdf5;
  --on-brand: #ffffff;
  --focus: #047857;
  --accent: #047857;
  --logo-sheet: #d1fae5;
  --logo-fold: #ffffff;
}

body.subject-chinese {
  --brand: #9f1239;
  --brand-strong: #881337;
  --brand-soft: #fff1f2;
  --on-brand: #ffffff;
  --focus: #9f1239;
  --accent: #9f1239;
  --logo-sheet: #ffe4e6;
  --logo-fold: #ffffff;
}

body.subject-morality {
  --brand: #c2410c;
  --brand-strong: #9a3412;
  --brand-soft: #fff7ed;
  --on-brand: #ffffff;
  --focus: #c2410c;
  --accent: #c2410c;
  --logo-sheet: #ffedd5;
  --logo-fold: #ffffff;
}

body.subject-history {
  --brand: #6b5344;
  --brand-strong: #4a382c;
  --brand-soft: #f6f1ea;
  --on-brand: #ffffff;
  --focus: #6b5344;
  --accent: #6b5344;
  --logo-sheet: #efe4d6;
  --logo-fold: #ffffff;
}

body.subject-geography {
  --brand: #0e7490;
  --brand-strong: #155e75;
  --brand-soft: #ecfeff;
  --on-brand: #ffffff;
  --focus: #0e7490;
  --accent: #0e7490;
  --logo-sheet: #cffafe;
  --logo-fold: #ffffff;
}

body.subject-biology {
  --brand: #3f6212;
  --brand-strong: #365314;
  --brand-soft: #f7fee7;
  --on-brand: #ffffff;
  --focus: #4d7c0f;
  --accent: #4d7c0f;
  --logo-sheet: #ecfccb;
  --logo-fold: #ffffff;
}

body.subject-chemistry {
  --brand: #de3b16;
  --brand-strong: #9f2a10;
  --brand-soft: #fff1ec;
  --on-brand: #ffffff;
  --focus: #de3b16;
  --accent: #de3b16;
  --logo-sheet: #ffe4dc;
  --logo-fold: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #10141c;
    --bg-elev: #181e29;
    --bg-muted: #232b39;
    --text: #e8edf5;
    --muted: #a7b2c2;
    --line: #313b4d;
    --brand: #2dd4bf;
    --brand-strong: #5eead4;
    --brand-soft: #134e4a;
    --on-brand: #042f2e;
    --junior: #93c5fd;
    --junior-soft: #1e3a8a;
    --focus: #5eead4;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 12px 28px rgba(0, 0, 0, 0.28);
    --ok: #4ade80;
    --ok-bg: #14532d;
    --on-ok: #052e16;
    --bad: #fca5a5;
    --bad-bg: #7f1d1d;
    --on-bad: #450a0a;
    --warn: #fdba74;
    --warn-bg: #7c2d12;
    --unk: #cbd5e1;
    --unk-bg: #223044;
    --accent: #2dd4bf;
    --header-bg: #171e2a;
    --logo-sheet: #123f3c;
    --logo-fold: #1c5c56;
    --panel: #172232;
    --node-primary: #5eead4;
    --node-primary-bg: #115e59;
    --node-junior: #93c5fd;
    --node-junior-bg: #1e3a8a;
    --node-senior: #f0abfc;
    --node-senior-bg: #4a044e;
    --node-current-bg: #7c2d12;
    --node-current-border: #fdba74;
    --node-text: #f8fafc;
    --edge: #94a3b8;
    --edge-soft: #64748b;
    --hard-bg: #7c2d12;
    --hard-fg: #ffedd5;
    --soft-bg: #232b39;
    --soft-fg: #cbd5e1;
    --diagram-ok-bg: #14532d;
    --diagram-ok: #4ade80;
    --diagram-bad-bg: #7f1d1d;
    --diagram-bad: #fca5a5;
    --diagram-unk-bg: #1e293b;
    --diagram-unk: #cbd5e1;
    --diagram-shaky-bg: #78350f;
    --diagram-shaky: #fcd34d;
    --diagram-text: #f8fafc;
    --diagram-edge: #94a3b8;
  }
  body.subject-physics {
    --brand: #fdba74;
    --brand-strong: #fed7aa;
    --brand-soft: #7c2d12;
    --on-brand: #431407;
    --focus: #fed7aa;
    --accent: #fdba74;
    --logo-sheet: #6b2f12;
    --logo-fold: #8a4218;
  }
  body.subject-english {
    --brand: #a5b4fc;
    --brand-strong: #c7d2fe;
    --brand-soft: #312e81;
    --on-brand: #1e1b4b;
    --focus: #c7d2fe;
    --accent: #a5b4fc;
    --logo-sheet: #2a2870;
    --logo-fold: #3c3a96;
  }
  body.subject-science {
    --brand: #6ee7b7;
    --brand-strong: #a7f3d0;
    --brand-soft: #064e3b;
    --on-brand: #022c22;
    --focus: #a7f3d0;
    --accent: #6ee7b7;
    --logo-sheet: #065f46;
    --logo-fold: #047857;
  }
  body.subject-chinese {
    --brand: #fda4af;
    --brand-strong: #fecdd3;
    --brand-soft: #881337;
    --on-brand: #4c0519;
    --focus: #fecdd3;
    --accent: #fda4af;
    --logo-sheet: #6b1230;
    --logo-fold: #9f1239;
  }
  body.subject-morality {
    --brand: #fdba74;
    --brand-strong: #fed7aa;
    --brand-soft: #7c2d12;
    --on-brand: #431407;
    --focus: #fed7aa;
    --accent: #fdba74;
    --logo-sheet: #9a3412;
    --logo-fold: #c2410c;
  }
  body.subject-history {
    --brand: #d6c3ad;
    --brand-strong: #e7d7c6;
    --brand-soft: #3f3228;
    --on-brand: #2a211b;
    --focus: #e7d7c6;
    --accent: #d6c3ad;
    --logo-sheet: #4a382c;
    --logo-fold: #6b5344;
  }
  body.subject-geography {
    --brand: #67e8f9;
    --brand-strong: #a5f3fc;
    --brand-soft: #164e63;
    --on-brand: #083344;
    --focus: #a5f3fc;
    --accent: #67e8f9;
    --logo-sheet: #155e75;
    --logo-fold: #0e7490;
  }
  body.subject-biology {
    --brand: #bef264;
    --brand-strong: #d9f99d;
    --brand-soft: #1a2e05;
    --on-brand: #1a2e05;
    --focus: #d9f99d;
    --accent: #bef264;
    --logo-sheet: #365314;
    --logo-fold: #4d7c0f;
  }
  body.subject-chemistry {
    --brand: #ff8a65;
    --brand-strong: #ffccbc;
    --brand-soft: #5d1a0e;
    --on-brand: #3e0e06;
    --focus: #ffccbc;
    --accent: #ff8a65;
    --logo-sheet: #7a2614;
    --logo-fold: #de3b16;
  }
}

@media print {
  :root {
    --bg: #fff;
    --bg-elev: #fff;
    --bg-muted: #f4f7fb;
    --text: #162033;
    --muted: #475569;
    --line: #d5dde6;
    --panel: #fff;
    --header-bg: #fff;
    --logo-sheet: #dff3ef;
    --logo-fold: #ffffff;
    --shadow: none;
  }
}

/* Lucide 图标库集成规范 */
.lucide, [data-lucide] {
  width: 1.2em;
  height: 1.2em;
  display: inline-block;
  vertical-align: -0.2em;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  flex-shrink: 0;
}
.btn .lucide, .btn [data-lucide] {
  width: 1.15em;
  height: 1.15em;
  margin-right: 6px;
  vertical-align: -0.18em;
}
.nav-link .lucide, .nav-link [data-lucide] {
  width: 1.05em;
  height: 1.05em;
  margin-right: 5px;
  vertical-align: -0.15em;
}
.section-title .lucide, .section-title [data-lucide] {
  width: 1.2em;
  height: 1.2em;
  color: var(--brand);
  vertical-align: -0.18em;
  margin-right: 8px;
}
.eyebrow .lucide, .eyebrow [data-lucide] {
  width: 1.1em;
  height: 1.1em;
  color: var(--brand);
  margin-right: 4px;
}
.stat-icon {
  width: 24px;
  height: 24px;
  color: var(--brand);
  margin-bottom: 6px;
}
.step-icon-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.step-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand-strong);
}
.step-icon .lucide {
  width: 18px;
  height: 18px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  letter-spacing: 0.01em;
}
img { max-width: 100%; height: auto; }
.node-tip {
  position: absolute;
  z-index: 6;
  max-width: min(280px, calc(100% - 16px));
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.45;
  pointer-events: none;
  box-shadow: var(--shadow);
  overflow-wrap: anywhere;
}
code { overflow-wrap: anywhere; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

.top-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 34px;
  padding: 5px 12px;
  background: #17191f;
  color: #f4f5f7;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  letter-spacing: 0;
}
.top-banner:hover { background: var(--brand-strong); color: var(--on-brand); }
@media (max-width: 420px) {
  .top-banner { font-size: 12.5px; padding: 5px 8px; }
}
@media print {
  .top-banner { display: none !important; }
}

.site-header {
  display: flex;
  flex-direction: column;
  padding: 0;
  background: var(--header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  max-width: 100%;
}
body:not(.page-explore) .site-header {
  position: sticky;
  top: 0;
  z-index: 30;
}
.header-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  padding: 10px 20px;
  max-width: 1080px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}
.header-sub {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 4px 16px 8px;
  width: 100%;
  box-sizing: border-box;
}
.header-sub-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: 1080px;
  width: 100%;
  margin: 0 auto;
}
body.page-explore .header-main,
body.page-explore .header-sub-inner {
  max-width: 100%;
  padding-left: 20px;
  padding-right: 20px;
}
.header-sub::-webkit-scrollbar {
  display: none;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}
.brand-logo-svg {
  width: 38px;
  height: 38px;
  flex: none;
  display: block;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(13, 148, 136, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.brand:hover .brand-logo-svg {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3);
}
.brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand-soft) 0%, rgba(13, 148, 136, 0.16) 100%);
  color: var(--brand);
  border: 1px solid rgba(13, 148, 136, 0.22);
  flex: none;
  box-shadow: 0 2px 6px rgba(13, 148, 136, 0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.brand:hover .brand-logo {
  transform: scale(1.05);
  border-color: var(--brand);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.25);
}
.brand-logo svg, .brand-logo i {
  width: 22px;
  height: 22px;
  stroke-width: 2.2px;
  display: block;
}
.logo {
  color: var(--brand);
  width: 38px;
  height: 38px;
  flex: none;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(13, 148, 136, 0.2));
}
.brand-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  gap: 2px;
}
.brand-name {
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
  overflow-wrap: anywhere;
}
.brand-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.08em;
  color: var(--brand);
  text-transform: uppercase;
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  min-width: 0;
}
.subject-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 2px 0;
  margin: 0 auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  max-width: 100%;
}
.page-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 13px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 650;
  gap: 6px;
  transition: all 0.15s ease;
}
.nav-link:hover { background: var(--bg-muted); color: var(--text); }
.nav-link.active, .nav-link[aria-current="page"] {
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-weight: 750;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.nav-link.active:hover, .nav-link[aria-current="page"]:hover {
  background: var(--brand-soft);
  color: var(--brand-strong);
}
.nav-link.subject-link {
  color: var(--muted);
  border: 0;
  background: transparent;
  padding: 0 13px;
  min-height: 32px;
  font-size: 0.88rem;
}
.nav-link.subject-link:hover { background: transparent; color: var(--text); }
.nav-link.subject-link.on {
  background: var(--brand);
  color: var(--on-brand);
  font-weight: 750;
  box-shadow: 0 2px 6px rgba(13, 148, 136, 0.35);
}
.nav-link.subject-link.on:hover { background: var(--brand); color: var(--on-brand); }
@media (max-width: 720px) {
  .header-main { padding: 8px 14px; gap: 6px 12px; }
  .header-sub { padding: 6px 12px 8px; }
  .brand { gap: 10px; min-height: 40px; }
  .brand-logo { width: 34px; height: 34px; }
  .brand-logo svg, .brand-logo i { width: 20px; height: 20px; }
  .logo { width: 34px; height: 34px; }
  .brand-name { font-size: 1.05rem; }
  .brand-kicker { font-size: 0.7rem; letter-spacing: 0.06em; }
  .site-nav { flex: 1 1 100%; justify-content: space-between; gap: 4px 8px; }
  .nav-link { padding: 0 8px; font-size: 0.88rem; }
  .nav-link.subject-link { padding: 0 10px; }
}

.site-footer {
  padding: 14px 16px 18px;
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
  border-top: 1px solid var(--line);
  max-width: 100%;
}
.site-footer p { margin: 0; overflow-wrap: anywhere; }
.site-footer a { color: var(--brand-strong); font-weight: 700; }

button, .btn {
  font: inherit;
  font-weight: 650;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--text);
  cursor: pointer;
}
button:hover, .btn:hover { background: var(--bg-muted); }
button.primary, .btn-primary {
  background: var(--brand);
  border-color: transparent;
  color: var(--on-brand);
}
button.primary:hover, .btn-primary:hover { filter: brightness(1.06); background: var(--brand); }

/* 题目图示：只用 currentColor，浅色和深色都看得见。宽度跟着容器走，不写死像素。 */
.q-figure { color: inherit; max-width: 100%; min-width: 0; margin: 8px 0 2px; }
.q-figure svg { width: 100%; max-width: 440px; height: auto; display: block; overflow: visible; }
.choices.fig-icons, .sample-choices.fig-icons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr));
}
.choices.fig-icons .q-figure svg, .sample-choices.fig-icons .q-figure svg { max-width: 100%; }
button.choice.fig-choice {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  min-width: 0;
}
.sample-choices { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.sample-choice {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  color: var(--text);
  padding: 8px 10px;
  min-width: 0;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  text-align: center;
}
.btn-lg { min-height: 48px; padding: 10px 18px; font-size: 1rem; }
.btn-block { width: 100%; }

input[type="search"], input[type="text"], input[type="password"], input[type="number"], select, textarea {
  font: inherit;
  color: var(--text);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  min-height: 44px;
  max-width: 100%;
}
textarea { min-height: 96px; }
.search-lg { width: 100%; font-size: 1.08rem; min-height: 52px; }

.stage-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.stage-tab { border-radius: 999px; }
.stage-tab.on, .stage-tab[aria-selected="true"] {
  background: var(--brand);
  color: var(--on-brand);
  border-color: transparent;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}
.badge.hard { background: var(--hard-bg); color: var(--hard-fg); }
.badge.soft { background: var(--soft-bg); color: var(--soft-fg); }

/* 首页 */
.home { width: min(1080px, 100%); margin: 0 auto; padding: 24px 16px 56px; }

/* 首页当前孩子档案与教材版本指示条 */
.home-child-status {
  margin-bottom: 18px;
}
.home-child-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 18px;
  padding: 12px 18px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-left: 5px solid var(--brand);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}
.home-child-bar.is-guest {
  border-left-color: var(--muted);
  background: var(--bg-muted);
}
.home-child-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  font-size: 0.94rem;
}
.home-child-info .lucide {
  color: var(--brand);
}
.home-child-bar.is-guest .home-child-info .lucide {
  color: var(--muted);
}
.home-child-label {
  color: var(--muted);
  font-weight: 600;
}
.home-child-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
}
.home-child-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 750;
  background: var(--brand-soft);
  color: var(--brand-strong);
}
.home-child-badge.edition-badge {
  background: var(--junior-soft);
  color: var(--junior);
  border: 1px solid rgba(37, 99, 235, 0.25);
}
.home-child-hint {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 500;
}
.home-child-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.home-child-switch select {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg-elev);
  font-size: 0.88rem;
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}
.home-child-switch select:focus {
  outline: none;
  border-color: var(--brand);
}
.current-grade-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--ok-bg);
  color: var(--ok);
  font-size: 0.82rem;
  font-weight: 750;
}
a.grade-card.is-current-child-grade {
  border-color: var(--brand);
  background: linear-gradient(to bottom, var(--brand-soft), var(--bg-elev));
  box-shadow: 0 0 0 1.5px var(--brand), var(--shadow);
}

.hero {
  position: relative;
  overflow: hidden;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 36px 32px 30px;
  box-shadow: var(--shadow-lg);
  background-image: radial-gradient(circle at 90% 10%, var(--brand-soft) 0%, transparent 60%);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 14px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-weight: 750;
  font-size: 0.86rem;
  letter-spacing: 0.02em;
  border: 1px solid rgba(13, 148, 136, 0.2);
}
.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(1.9rem, 4.5vw, 2.75rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
  font-weight: 850;
  color: var(--text);
}
.lede { margin: 0 0 22px; font-size: 1.08rem; max-width: 100%; color: var(--muted); line-height: 1.7; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-actions .btn {
  flex: 1 1 190px;
  box-shadow: var(--shadow-sm);
  transition: all 0.18s ease;
}
.hero-actions .btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.hero-actions .btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  border: none;
  box-shadow: 0 4px 14px var(--brand-glow);
}
.hero-actions .btn-primary:hover {
  filter: brightness(1.08);
  box-shadow: 0 6px 20px var(--brand-glow);
}
.quiet-link { margin: 16px 0 0; }
.quiet-link a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--brand-strong);
  font-weight: 700;
  font-size: 0.94rem;
  text-decoration: none;
}
.quiet-link a:hover { text-decoration: underline; }

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 36px 0 14px;
}
.section-title {
  margin: 0;
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-sub {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
}

/* 中考高频核心考点直达 */
.exam-focus-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.exam-topic-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 16px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: all 0.18s ease;
  position: relative;
  overflow: hidden;
}
.exam-topic-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--brand);
  opacity: 0.8;
}
.exam-topic-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand);
  box-shadow: var(--shadow-hover);
}
.exam-topic-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}
.exam-badge {
  font-size: 0.72rem;
  font-weight: 750;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--warn-bg);
  color: var(--warn);
}
.exam-grade-badge {
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--muted);
}
.exam-topic-title {
  font-size: 1.05rem;
  font-weight: 750;
  letter-spacing: -0.01em;
  margin: 2px 0;
  color: var(--text);
}
.exam-topic-desc {
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.45;
}
.exam-topic-action {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  transition: transform 0.15s ease;
}
.exam-topic-card:hover .exam-topic-action {
  color: var(--brand-strong);
  transform: translateX(3px);
}

/* 诊断三步机制 */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.steps li {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 18px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  transition: all 0.18s ease;
}
.steps li:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow);
}
.step-icon-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.step-no {
  display: inline-flex;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  color: #ffffff;
  font-weight: 800;
  font-size: 0.9rem;
  box-shadow: 0 2px 6px var(--brand-glow);
}
.step-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand-strong);
}
.step-icon .lucide {
  width: 18px;
  height: 18px;
}
.steps h3 { margin: 10px 0 6px; font-size: 1.12rem; font-weight: 800; letter-spacing: -0.02em; color: var(--text); }
.steps p { margin: 0; color: var(--muted); font-size: 0.94rem; line-height: 1.6; }

/* 统计卡片与年级卡片 */
.stat-grid, .grade-grid {
  display: grid;
  gap: 14px;
}
.stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grade-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.stat-card, a.grade-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-width: 0;
  transition: all 0.18s ease;
}
.stat-card {
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  overflow: hidden;
}
.stat-card:hover { border-color: var(--brand); box-shadow: var(--shadow); }
.stat-card .stat-icon {
  width: 24px;
  height: 24px;
  color: var(--brand);
  opacity: 0.85;
  margin-bottom: 2px;
}
.stat-num {
  font-size: 2rem;
  font-weight: 850;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text);
  background: linear-gradient(135deg, var(--text), var(--brand-strong));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-label { color: var(--muted); font-weight: 700; font-size: 0.94rem; }
.stat-note { color: var(--muted); margin: 10px 0 0; font-size: 0.9rem; }

a.grade-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
  padding: 18px 20px;
  min-height: 120px;
  text-decoration: none;
  color: inherit;
  border-top: 4px solid var(--brand);
  box-shadow: var(--shadow-sm);
}
a.grade-card.is-junior { border-top-color: var(--brand); }
a.grade-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand);
  box-shadow: var(--shadow-hover);
}
a.grade-card strong {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}
.grade-stage {
  color: var(--brand-strong);
  font-size: 0.84rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.grade-count {
  font-weight: 750;
  font-size: 1.02rem;
  color: var(--text);
}
.grade-split {
  font-size: 0.88rem;
  color: var(--muted);
}
.grade-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--brand);
  transition: transform 0.15s ease;
}
.grade-card:hover .grade-card-actions {
  color: var(--brand-strong);
  transform: translateX(3px);
}

a.finals-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 24px;
  padding: 18px 22px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-left: 5px solid var(--brand);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: all 0.18s ease;
}
a.finals-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand);
  box-shadow: var(--shadow-hover);
}
a.finals-card strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--text);
}
a.finals-card strong .lucide {
  color: var(--brand);
}
a.finals-card .finals-sub { color: var(--muted); font-size: 0.95rem; font-weight: 600; }

.load-error {
  background: var(--bad-bg);
  color: var(--bad);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-top: 14px;
  font-weight: 600;
}

@media (max-width: 900px) {
  .grade-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .hero { padding: 24px 18px 20px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .exam-focus-grid { grid-template-columns: 1fr; }
}

/* 首页本机盲区汇总 */
.blind-home { margin: 32px 0 12px; }
.blind-home-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.blind-home-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 14px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
  box-shadow: var(--shadow-sm);
  transition: all 0.15s ease;
}
.blind-home-item:hover { border-color: var(--brand); }
.blind-home-name { font-weight: 800; font-size: 1.02rem; color: var(--brand-strong); text-decoration: none; }
.blind-home-name:hover { text-decoration: underline; }
.blind-home-meta { color: var(--muted); font-size: 0.92rem; font-weight: 600; }
.blind-home-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }

/* 通用加载动画与图标对齐 */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.spin {
  animation: spin 1s linear infinite;
  display: inline-block;
}
svg.lucide, i[data-lucide] {
  vertical-align: -0.15em;
}
