/* ============================================================
   语数英知识大全 · styles.css · free 模式手写
   设计推导（一句话）：学科工具书 / 数据速查——读者是学生与家长，
   需要清晰的知识框架、可扫读的知识表格与安定的阅读氛围。
   七项决定：
   1) 字体：单一无衬线族（PingFang SC / Microsoft YaHei / Noto Sans SC
      + Segoe UI），数字启用 tabular-nums；
   2) 类型尺度：16px 基准、1.25 模数，h1 clamp(2.5rem,6vw,3.8rem)；
   3) 色板（主色≤2）：暖纸白 #fafaf8 底 + 墨青黑 #1f2933 文字，
      唯一强调色靛蓝 #2563eb，灰阶 #61707c / #e5e9ec；
   4) 栏宽：1060px；
   5) 留白节奏：section 间距 88px（≤640px 时 56px）；
   6) 图形语言：圆角一档 14px（药丸 999px）、描边一档 1px、
      阴影一档低透明柔光；
   7) 动效 ≤2 种：滚动渐入（fade + 上移 24px）与数字 count-up，
      全局 smooth scroll。
   ============================================================ */

:root {
  --bg: #fafaf8;
  --panel: #ffffff;
  --ink: #1f2933;
  --muted: #61707c;
  --line: #e5e9ec;
  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, 0.08);
  --shadow: 0 1px 2px rgba(31, 41, 51, 0.05), 0 10px 28px rgba(31, 41, 51, 0.07);
  --radius: 14px;
  --wrap: 1060px;
  --font: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 92px; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.25; font-weight: 700; margin: 0 0 0.5em; }

p { margin: 0 0 1em; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap, .hero-inner, .section, footer .sitemap {
  max-width: var(--wrap);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* ---------------------------------------------------------- 导航 */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 16px 24px;
  background: rgba(250, 250, 248, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.site-nav__brand {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  color: var(--ink);
}
.site-nav__brand:hover { text-decoration: none; color: var(--accent); }

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0 0 0 auto;
  padding: 0;
}

.site-nav__item { position: relative; }

.site-nav__list a {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.95rem;
  transition: color 0.25s ease, background 0.25s ease;
}
.site-nav__list a:hover {
  color: var(--ink);
  text-decoration: none;
  background: rgba(31, 41, 51, 0.05);
}
.site-nav__list a[aria-current="page"],
.site-nav__list a.is-active {
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 600;
}

.site-nav__item--has-sub .site-nav__sub {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  min-width: 160px;
  margin: 0;
  padding: 8px;
  list-style: none;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}
.site-nav__item--has-sub .site-nav__sub a {
  display: block;
  border-radius: 10px;
  white-space: nowrap;
}
.site-nav__item--has-sub:hover .site-nav__sub,
.site-nav__item--has-sub:focus-within .site-nav__sub {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav-toggle { display: none; }
.site-nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  margin-left: auto;
  padding: 8px;
  cursor: pointer;
}
.site-nav__burger span {
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* ---------------------------------------------------------- 头图 */

.hero {
  padding: 96px 0 72px;
  background:
    radial-gradient(900px 380px at 12% -10%, var(--accent-soft), transparent 70%),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
}

.page-head__kicker {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 16px;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 3.8rem);
  letter-spacing: 0.02em;
  margin-bottom: 16px;
}

.page-head__lead {
  max-width: 640px;
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 28px;
}

.cta-row { display: flex; flex-wrap: wrap; gap: 14px; }

.cta {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.cta:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.cta--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.cta--ghost:hover { border-color: var(--ink); }

/* ---------------------------------------------------------- 板块通用 */

.section { padding: 88px 24px 72px; }
.section + .section { border-top: 1px solid var(--line); }
.section { scroll-margin-top: 84px; }

.section__kicker {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 10px;
}

.section__title { font-size: clamp(1.75rem, 3.5vw, 2.3rem); margin-bottom: 12px; }

.section__lead {
  max-width: 620px;
  color: var(--muted);
  margin-bottom: 40px;
}

/* 滚动渐入（动效 1） */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
[data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

/* ---------------------------------------------------------- 三科导览 */

.subject-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 48px;
}

.subject-card {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  color: var(--ink);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.subject-card:hover {
  text-decoration: none;
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.subject-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 14px;
}

.subject-card h3 { font-size: 1.2rem; margin-bottom: 8px; }
.subject-card p {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 16px;
  flex: 1;
}
.subject-link { color: var(--accent); font-weight: 700; font-size: 0.92rem; }

/* 信息卡 */
.info-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 32px;
}
.info-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.info-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.info-card p { color: var(--muted); font-size: 0.92rem; margin: 0; }
.info-card b { color: var(--ink); }

/* 数据条 */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  background: var(--ink);
  border-radius: var(--radius);
  padding: 32px 28px;
}
.stat { text-align: center; }
.stat__num {
  font-size: clamp(1.8rem, 3.2vw, 2.5rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #fff;
  line-height: 1.1;
}
.stat__num .unit {
  font-size: 0.45em;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  margin-left: 4px;
}
.stat__label {
  margin-top: 6px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.65);
}

.note {
  margin-top: 24px;
  font-size: 0.85rem;
  color: var(--muted);
  border-left: 3px solid var(--line);
  padding-left: 14px;
}

/* ---------------------------------------------------------- 知识表格 */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  margin-bottom: 28px;
}

.kp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  min-width: 680px;
}

.kp-table th {
  text-align: left;
  padding: 14px 18px;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  background: rgba(31, 41, 51, 0.02);
  white-space: nowrap;
}

.kp-table td {
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.kp-table tbody tr:last-child td { border-bottom: 0; }

.kp-table tbody tr { transition: background 0.25s ease; }
.kp-table tbody tr:hover { background: rgba(37, 99, 235, 0.035); }

.kp-table td:first-child { font-weight: 700; white-space: nowrap; }
.kp-table td:last-child { color: var(--muted); }
.kp-table b { color: var(--accent); }

/* ---------------------------------------------------------- 页脚与翻页 */

.site-footer {
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 56px 0 40px;
  margin-top: 40px;
}
.site-footer__brand {
  max-width: var(--wrap);
  margin: 0 auto 24px;
  padding: 0 24px;
  font-weight: 800;
  font-size: 1.15rem;
}
.site-footer blockquote {
  max-width: var(--wrap);
  margin: 0 auto 32px;
  padding: 0 24px;
  color: var(--muted);
  font-style: italic;
}
.sitemap {
  display: flex;
  flex-wrap: wrap;
  gap: 32px 64px;
  padding-bottom: 32px;
}
.sitemap__title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 0 0 10px;
}
.sitemap__col a {
  display: block;
  color: var(--ink);
  font-size: 0.92rem;
  padding: 3px 0;
}
.sitemap__col a:hover { color: var(--accent); text-decoration: none; }

.site-footer__legal {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 24px 24px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
}

.pager {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px 56px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.pager a {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 16px 20px;
  color: var(--ink);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.pager a:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.pager small { display: block; color: var(--muted); font-size: 0.8rem; }
.pager b { font-size: 1.05rem; }
.pager a:last-child { text-align: right; }

/* 面包屑 */
.breadcrumb {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 16px 24px 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.breadcrumb a { color: var(--muted); }
.breadcrumb__sep { margin: 0 8px; }

/* 内页头 */
.page-head {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 72px 24px 40px;
}
.page-head h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); margin-bottom: 12px; }
.page-head + .section { padding-top: 44px; }

/* 单张翻页卡（首末页）文字靠左，避免视觉错位 */
.pager a:only-child { text-align: left; }

/* ---------------------------------------------------------- 响应式 */

@media (max-width: 900px) {
  .site-nav { flex-wrap: wrap; }
  .site-nav__burger { display: flex; }

  .site-nav__list {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 8px 0 12px;
  }
  .nav-toggle:checked ~ .site-nav__list { display: flex; }

  .nav-toggle:checked ~ .site-nav__burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle:checked ~ .site-nav__burger span:nth-child(2) { opacity: 0; }
  .nav-toggle:checked ~ .site-nav__burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .site-nav__item--has-sub .site-nav__sub {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    box-shadow: none;
    border: 0;
    background: transparent;
    padding: 0 0 0 16px;
  }

  .subject-grid { grid-template-columns: 1fr; }
  .info-cols { grid-template-columns: 1fr; }
  .stats-strip { grid-template-columns: repeat(2, 1fr); padding: 28px 20px; }
  .hero { padding: 72px 0 56px; }
  .section { padding: 64px 24px 56px; }
}

@media (max-width: 640px) {
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 56px 0 48px; }
  .section { padding: 56px 20px 48px; }
  .page-head { padding: 56px 20px 40px; }
}

/* ============================================================
   二级结构：知识地图 / 分支卡片 / 页内目录 / 练习入口
   ============================================================ */

.stats-strip { margin-bottom: 44px; }

.map {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 40px;
}

.map__col {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 18px 14px;
}

.map__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-weight: 800;
  font-size: 1.05rem;
}
.map__head span {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.map__row {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 9px 8px;
  border-radius: 10px;
  color: var(--ink);
  font-size: 0.92rem;
  transition: background 0.22s ease, color 0.22s ease;
}
.map__row:hover {
  background: var(--accent-soft);
  color: var(--accent);
  text-decoration: none;
}
.map__row b {
  color: var(--accent);
  font-size: 0.76rem;
  font-variant-numeric: tabular-nums;
}
.map__row em {
  font-style: normal;
  color: var(--muted);
  font-size: 0.76rem;
}

/* 答题入口条 */
.quiz-teaser {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: 28px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--panel);
}
.quiz-teaser__tag {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 8px;
}
.quiz-teaser__title { font-size: 1.25rem; margin: 0 0 6px; }
.quiz-teaser__desc {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0;
  max-width: 560px;
}

/* 分支卡片 */
.branch-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 32px;
}

.branch-card {
  display: flex;
  flex-direction: column;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.branch-card:hover {
  text-decoration: none;
  transform: translateY(-4px);
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: var(--shadow);
}
.branch-card__no {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin: 0 0 8px;
}
.branch-card h3 {
  font-size: 1.1rem;
  margin: 0 0 8px;
}
.branch-card > p:not(.branch-card__no):not(.branch-card__meta) {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 14px;
  flex: 1;
}
.branch-card__meta {
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  color: var(--muted);
}

/* 模块页：页内目录 */
.toc {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 40px;
  padding-bottom: 22px;
  border-bottom: 1px dashed var(--line);
}
.toc__label {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 4px;
}
.toc a {
  font-size: 0.85rem;
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.toc a:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
  text-decoration: none;
}

/* 模块页：小节标题 */
.block-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 1.22rem;
  margin: 48px 0 10px;
  scroll-margin-top: 96px;
}
.toc + .block-title { margin-top: 0; }
.block-title span {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.block-lead {
  max-width: 780px;
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0 0 18px;
}

/* 提示块 */
.callout {
  margin: 30px 0 0;
  padding: 18px 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
}
.callout__label {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin: 0 0 6px;
  text-transform: uppercase;
}
.callout p:last-child { margin-bottom: 0; }
.callout--path { border-left-color: var(--ink); }
.callout--path .callout__label { color: var(--ink); }

/* 模块页：练习入口 */
.module-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.module-foot p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.module-foot__link {
  font-size: 0.9rem;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--accent-soft);
  transition: background 0.22s ease, color 0.22s ease;
}
.module-foot__link:hover {
  background: var(--accent);
  color: #fff;
  text-decoration: none;
}

/* ============================================================
   答题组件
   ============================================================ */

.quiz {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 34px;
}

.quiz-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
}

.chip {
  font: inherit;
  font-size: 0.9rem;
  padding: 9px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.is-on {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 700;
}

.quiz-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 4px;
}
.quiz-hint { font-size: 0.85rem; color: var(--muted); }
.quiz-hint b { color: var(--ink); }

.quiz-bar {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  margin-bottom: 10px;
}

.quiz-track {
  height: 6px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
  margin-bottom: 28px;
}
.quiz-track__fill {
  height: 100%;
  width: 0;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.4s ease;
}

.quiz-meta {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin: 0 0 10px;
}

.quiz-stem {
  font-size: 1.12rem;
  font-weight: 600;
  line-height: 1.7;
  margin: 0 0 22px;
}

.quiz-options { display: grid; gap: 10px; }

.quiz-opt {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font: inherit;
  font-size: 0.95rem;
  text-align: left;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.quiz-opt:hover { border-color: var(--accent); }
.quiz-opt__key {
  flex: 0 0 22px;
  height: 22px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--muted);
  background: rgba(31, 41, 51, 0.06);
}
.quiz-opt.is-correct { border-color: var(--accent); background: var(--accent-soft); }
.quiz-opt.is-correct .quiz-opt__key { background: var(--accent); color: #fff; }
.quiz-opt.is-wrong { border-color: var(--ink); background: rgba(31, 41, 51, 0.05); }
.quiz-opt.is-wrong .quiz-opt__key { background: var(--ink); color: #fff; }
.quiz-opt:disabled { cursor: default; }

.quiz-fill {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}
.quiz-input {
  flex: 1;
  min-width: 220px;
  font: inherit;
  font-size: 1rem;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
}
.quiz-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.quiz-feedback {
  margin-top: 22px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 0.92rem;
}
.quiz-feedback.is-ok { border-color: var(--accent); background: var(--accent-soft); }
.quiz-feedback.is-no { border-color: var(--ink); background: rgba(31, 41, 51, 0.045); }
.quiz-feedback strong { font-weight: 800; }
.quiz-feedback p { margin: 6px 0 0; color: var(--muted); }

/* 结果页 */
.quiz-score {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}
.score-ring {
  --p: 0;
  flex: 0 0 auto;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--line) 0);
}
.score-ring span {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: var(--panel);
  display: grid;
  place-items: center;
  font-size: 1.55rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.quiz-summary { flex: 1; min-width: 220px; }
.quiz-summary h3 { font-size: 1.2rem; margin: 0 0 8px; }
.quiz-summary p { margin: 0 0 4px; color: var(--muted); font-size: 0.92rem; }

.quiz-subjects {
  list-style: none;
  margin: 0 0 26px;
  padding: 0;
  display: grid;
  gap: 8px;
}
.quiz-subjects li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg);
  border-radius: 10px;
  font-size: 0.9rem;
}
.quiz-subjects b { font-variant-numeric: tabular-nums; }

.wrong-list {
  list-style: none;
  margin: 0 0 26px;
  padding: 0;
  display: grid;
  gap: 10px;
}
.wrong-item {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 0.9rem;
}
.wrong-item p { margin: 0 0 4px; }
.wrong-item small { display: block; color: var(--muted); }

@media (max-width: 900px) {
  .map { grid-template-columns: 1fr; }
  .branch-grid { grid-template-columns: 1fr; }
  .quiz { padding: 24px 20px; }
  .quiz-teaser { padding: 22px; }
  .toc { margin-bottom: 32px; }
  .block-title { margin-top: 40px; }
}

/* 尊重系统减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .subject-card, .cta, .pager a, .region-index a { transition: none; }
}
