/* =========================================================
   小树苗 · 小学学习资源库  —  框架样式
   主题：浅色 / 清爽 / 卡片化
   ========================================================= */

:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #f0f4fa;
  --line: #e3e8f2;
  --line-strong: #d3dae8;

  --ink: #1b2130;
  --ink-2: #4a5468;
  --ink-3: #8a93a6;

  --primary: #2f6fe0;
  --primary-dark: #2159bd;
  --primary-soft: #eaf1fe;
  --accent: #ef7a3d;
  --accent-soft: #fdefe6;
  --green: #0f9e86;

  --radius-s: 8px;
  --radius: 14px;
  --radius-l: 20px;

  --shadow-s: 0 1px 2px rgba(27, 33, 48, .05);
  --shadow: 0 1px 2px rgba(27, 33, 48, .04), 0 8px 22px rgba(27, 33, 48, .06);
  --shadow-hover: 0 2px 4px rgba(27, 33, 48, .05), 0 14px 30px rgba(47, 111, 224, .14);

  --max: 1200px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; }

.btn:disabled { opacity: .5; cursor: default; pointer-events: none; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Source Han Sans SC", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
code {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: .88em;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 5px;
  color: var(--primary-dark);
}

/* ================= 顶栏 ================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 13px 24px;
  display: flex;
  align-items: center;
  gap: 26px;
}

.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand-mark {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 11px;
  background: linear-gradient(140deg, #3d81f0, #1f56b8);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(47, 111, 224, .32);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 16px; letter-spacing: .02em; }
.brand-text em {
  font-style: normal;
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: .14em;
}

.search-box {
  flex: 1;
  max-width: 520px;
  position: relative;
  display: flex;
  align-items: center;
}
.search-icon {
  position: absolute;
  left: 14px;
  width: 15px; height: 15px;
  border: 2px solid var(--ink-3);
  border-radius: 50%;
  pointer-events: none;
}
.search-icon::after {
  content: "";
  position: absolute;
  right: -4px; bottom: -3px;
  width: 7px; height: 2px;
  background: var(--ink-3);
  transform: rotate(45deg);
  border-radius: 2px;
}
.search-box input {
  width: 100%;
  height: 42px;
  padding: 0 66px 0 40px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--surface-2);
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: border-color .16s, background .16s, box-shadow .16s;
  font-family: inherit;
}
.search-box input::placeholder { color: var(--ink-3); }
.search-box input:focus {
  background: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(47, 111, 224, .13);
}
.search-hint {
  position: absolute;
  right: 12px;
  font-size: 11px;
  color: var(--ink-3);
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  padding: 1px 5px;
  background: #fff;
  pointer-events: none;
}

.header-actions { display: flex; align-items: center; gap: 10px; flex: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all .16s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 3px 10px rgba(47, 111, 224, .28);
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-ghost { color: var(--ink-2); border-color: var(--line-strong); background: #fff; }
.btn-ghost:hover { color: var(--primary); border-color: var(--primary); }
.btn-outline {
  background: #fff;
  border-color: var(--line-strong);
  color: var(--ink-2);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-reset {
  position: sticky;
  bottom: -18px;
  width: 100%;
  margin-top: 10px;
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--ink-2);
  font-size: 13px;
  height: 36px;
}
.btn-reset:hover { background: #e8eef8; color: var(--primary); }

/* 学科横向导航 */
.subject-nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px 0;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.subject-nav::-webkit-scrollbar { display: none; }
.subject-nav a {
  position: relative;
  padding: 9px 13px 12px;
  font-size: 14px;
  color: var(--ink-2);
  white-space: nowrap;
  transition: color .16s;
}
.subject-nav a::after {
  content: "";
  position: absolute;
  left: 13px; right: 13px; bottom: 0;
  height: 2px;
  background: transparent;
  border-radius: 2px;
  transition: background .16s;
}
.subject-nav a:hover { color: var(--primary); }
.subject-nav a.is-active { color: var(--primary); font-weight: 600; }
.subject-nav a.is-active::after { background: var(--primary); }

/* ================= Hero ================= */
.hero {
  background:
    radial-gradient(900px 300px at 12% -10%, #e8f0ff 0%, rgba(232, 240, 255, 0) 70%),
    radial-gradient(700px 280px at 88% 0%, #fdeee4 0%, rgba(253, 238, 228, 0) 70%),
    #fff;
  border-bottom: 1px solid var(--line);
}
.hero-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 54px 24px 48px;
  display: grid;
  grid-template-columns: 1.35fr .85fr;
  gap: 48px;
  align-items: start;
}

.hero-badge {
  display: inline-block;
  font-size: 12px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid #f8d9c6;
  border-radius: 100px;
  padding: 4px 12px;
  margin-bottom: 18px;
  letter-spacing: .02em;
}
.hero h1 {
  font-size: 40px;
  line-height: 1.26;
  letter-spacing: -.022em;
}
.hero-sub {
  margin-top: 16px;
  font-size: 15px;
  color: var(--ink-2);
  max-width: 540px;
}
.hero-sub strong { color: var(--ink); font-weight: 600; }

.grade-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 26px;
}
.grade-quick button {
  height: 36px;
  padding: 0 17px;
  border-radius: 100px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink-2);
  font-size: 13.5px;
  font-family: inherit;
  cursor: pointer;
  transition: all .16s;
}
.grade-quick button:hover { border-color: var(--primary); color: var(--primary); }
.grade-quick button.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(47, 111, 224, .26);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 32px;
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  max-width: 600px;
}
.stat b { display: block; font-size: 26px; line-height: 1.2; letter-spacing: -.02em; }
.stat span { font-size: 12.5px; color: var(--ink-3); }

/* 目录结构示意面板 */
.hero-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: 20px 22px 18px;
  box-shadow: var(--shadow);
}
.panel-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  letter-spacing: .04em;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--line-strong);
  margin-bottom: 12px;
}
.tree { font-size: 13.5px; color: var(--ink-2); }
.tree ul { padding-left: 16px; border-left: 1px dashed var(--line-strong); margin-left: 6px; }
.tree li { padding: 3px 0; }
.tree > li > ul { margin-top: 4px; }
.t-label { color: var(--ink); font-weight: 500; }
.tree ul .t-label { font-weight: 400; color: var(--ink-2); }
.t-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--c, var(--primary));
  margin-right: 6px;
  vertical-align: middle;
}
.t-muted { color: var(--ink-3); font-size: 12.5px; padding-left: 4px; }
.panel-foot {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line-strong);
  font-size: 12px;
  color: var(--ink-3);
}

/* ================= 通用区块 ================= */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 52px 24px;
  scroll-margin-top: 112px;
}
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.section-head h2 { font-size: 23px; letter-spacing: -.015em; }
.section-head p { margin-top: 6px; font-size: 14px; color: var(--ink-3); }
.link-more { font-size: 13.5px; color: var(--primary); }
.link-more:hover { text-decoration: underline; }

/* ================= 主科细分卡 ================= */
.major-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.major-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: 22px 22px 20px;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  overflow: hidden;
}
.major-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--c, var(--primary));
}
.major-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: transparent;
}
.major-head { display: flex; align-items: center; gap: 12px; }
.major-title h3 { font-size: 17px; line-height: 1.3; }
.major-title p { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.subject-emoji {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 12px;
  font-size: 20px;
  background: var(--cs, var(--primary-soft));
  flex: none;
}
.major-desc {
  margin-top: 13px;
  font-size: 13px;
  color: var(--ink-3);
  line-height: 1.6;
  min-height: 42px;
}

/* 知识板块 chip */
.topic-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}
.topic-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 11px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fbfcfe;
  color: var(--ink-2);
  font-size: 12.5px;
  font-family: inherit;
  cursor: pointer;
  transition: all .14s ease;
}
.topic-chip b { color: var(--c, var(--primary)); font-size: 11.5px; font-weight: 600; }
.topic-chip:hover {
  border-color: var(--c, var(--primary));
  color: var(--c, var(--primary));
  background: #fff;
}
.major-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 17px;
  font-size: 13px;
  font-weight: 600;
  color: var(--c, var(--primary));
}
.major-link:hover { gap: 9px; }

/* 其他学科 */
.minor-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 36px 0 14px;
}
.minor-head span { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.minor-head em {
  font-style: normal;
  font-size: 12px;
  color: var(--ink-3);
}
.minor-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.minor-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 17px 18px 18px;
}
.minor-top { display: flex; align-items: center; gap: 9px; }
.minor-top h4 { font-size: 14.5px; }
.minor-top em {
  margin-left: auto;
  font-style: normal;
  font-size: 11.5px;
  color: var(--ink-3);
}
.minor-card .topic-chips { margin-top: 12px; }
.minor-card .topic-chip { height: 27px; font-size: 12px; padding: 0 9px; }

/* ================= 资源全景树 ================= */
.tree-actions { display: flex; gap: 8px; flex: none; }
.tree-actions .btn { height: 34px; font-size: 13px; padding: 0 13px; }

.tree-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  align-items: start;
}
.tree-subject {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow .18s;
}
.tree-subject[open] { box-shadow: var(--shadow); }
.tree-subject > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  cursor: pointer;
  list-style: none;
  border-left: 3px solid var(--c, var(--primary));
  background: linear-gradient(90deg, var(--cs, #f5f7fb), #fff 72%);
  transition: background .18s;
}
.tree-subject > summary::-webkit-details-marker { display: none; }
.tree-subject > summary:hover { background: var(--cs, #f5f7fb); }
.ts-emoji {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
  box-shadow: var(--shadow-s);
  flex: none;
}
.ts-name { font-size: 15px; font-weight: 700; }
.ts-meta { font-size: 12px; color: var(--ink-3); }
.ts-arrow {
  margin-left: auto;
  color: var(--ink-3);
  font-size: 13px;
  transition: transform .2s;
}
.tree-subject[open] .ts-arrow { transform: rotate(90deg); }

.tree-body {
  margin: 4px 16px 14px 30px;
  padding-left: 14px;
  border-left: 1px dashed var(--line-strong);
}
.tree-topic { position: relative; padding: 5px 0; }
.tree-topic::before {
  content: "";
  position: absolute;
  left: -14px; top: 15px;
  width: 10px; height: 1px;
  background: var(--line-strong);
}
.tt-head {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 3px 0;
  border: 0;
  background: none;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
.tt-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--c, var(--primary));
  flex: none;
}
.tt-name { font-size: 13.5px; color: var(--ink); }
.tt-head:hover .tt-name { color: var(--c, var(--primary)); }
.tt-count {
  font-size: 11px;
  color: var(--ink-3);
  background: var(--surface-2);
  border-radius: 100px;
  padding: 1px 7px;
}
.tt-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 7px 0 3px 14px;
}
.tt-cat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 25px;
  padding: 0 9px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #fbfcfe;
  color: var(--ink-2);
  font-size: 11.5px;
  font-family: inherit;
  cursor: pointer;
  transition: all .14s ease;
}
.tt-cat b { color: var(--c, var(--primary)); font-weight: 600; }
.tt-cat:hover {
  border-color: var(--c, var(--primary));
  color: var(--c, var(--primary));
  background: #fff;
}

/* ================= 资源库布局 ================= */
.library-layout {
  display: grid;
  grid-template-columns: 208px 1fr;
  gap: 26px;
  align-items: start;
}

.filters {
  position: sticky;
  top: 118px;
  max-height: calc(100vh - 128px);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-s);
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
.filters::-webkit-scrollbar { width: 6px; }
.filters::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 3px;
}
.filter-block { margin-bottom: 14px; }
.filter-block:last-of-type { margin-bottom: 8px; }
.filter-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
  letter-spacing: .1em;
  margin-bottom: 10px;
}
.title-hint {
  font-style: normal;
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--ink-3);
  margin-left: 4px;
  opacity: .8;
}
.filter-list--grouped .group-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  color: var(--ink-3);
  letter-spacing: .06em;
  margin: 10px 0 3px;
  padding-left: 9px;
}
.filter-list--grouped .group-label:first-child { margin-top: 0; }
.filter-list--grouped .group-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.chip-wrap { display: flex; flex-wrap: wrap; gap: 7px; }
#gradeFilter {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
#gradeFilter .chip { width: 100%; padding: 0 4px; }
.chip {
  height: 29px;
  padding: 0 11px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  font-size: 12.5px;
  font-family: inherit;
  cursor: pointer;
  transition: all .14s;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.is-active {
  background: var(--primary-soft);
  border-color: #b9cffa;
  color: var(--primary-dark);
  font-weight: 600;
}
.chip-n {
  font-style: normal;
  font-size: 10.5px;
  opacity: .58;
  margin-left: 4px;
}
.chip.is-active .chip-n { opacity: .9; }

.level-chip { color: var(--lc, var(--ink-2)); border-color: var(--line); }
.level-chip:hover { border-color: var(--lc, var(--primary)); color: var(--lc, var(--primary)); }
.level-chip.is-active {
  background: var(--ls, var(--primary-soft));
  border-color: var(--lc, var(--primary));
  color: var(--lc, var(--primary-dark));
  font-weight: 600;
}

.filter-empty {
  display: block;
  font-size: 12px;
  color: var(--ink-3);
  padding: 2px 0;
}
.chip-more {
  border-style: dashed;
  color: var(--primary);
  background: #fff;
}
.chip-more:hover { background: var(--primary-soft); }
.chip-more-sm {
  width: 100%;
  padding: 5px 9px;
  border: 1px dashed var(--line-strong);
  border-radius: 7px;
  background: #fff;
  color: var(--primary);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  transition: all .14s;
}
.chip-more-sm:hover { background: var(--primary-soft); border-color: #b9cffa; }
.is-zero {
  opacity: .38;
}
.filter-list button.is-zero .count { color: var(--ink-3); opacity: 1; }

.filter-list li { margin-bottom: 2px; }
.filter-list button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink-2);
  font-size: 12.5px;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: background .14s, color .14s;
}
.filter-list button:hover { background: var(--surface-2); }
.filter-list button.is-active {
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 600;
}
.filter-list .count {
  font-size: 11.5px;
  color: var(--ink-3);
  background: var(--surface-2);
  border-radius: 100px;
  padding: 1px 7px;
  min-width: 24px;
  text-align: center;
}
.filter-list button.is-active .count { background: #fff; color: var(--primary); }

/* 视图切换 */
.view-switch {
  display: flex;
  gap: 2px;
  padding: 3px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 9px;
}
.view-switch button {
  height: 28px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-3);
  font-size: 12.5px;
  font-family: inherit;
  cursor: pointer;
  transition: all .14s;
}
.view-switch button.is-active {
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  box-shadow: var(--shadow-s);
}

/* 板块筛选条 */
.topic-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 11px 13px;
  margin-bottom: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-s);
}
.topic-bar .tb-label {
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: .08em;
  margin-right: 4px;
}
.topic-bar button {
  height: 31px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: all .14s ease;
}
.topic-bar button:hover { color: var(--primary); border-color: #b9cffa; }
.topic-bar button.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 3px 10px rgba(47, 111, 224, .22);
}
.topic-bar button .n { font-size: 11px; opacity: .65; margin-left: 5px; font-weight: 400; }
.topic-bar button.is-active .n { opacity: .85; }

/* 已选条件 */
.active-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}
.active-filters .tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--primary-dark);
  background: var(--primary-soft);
  border: 1px solid #c9dafa;
  border-radius: 100px;
  padding: 3px 6px 3px 11px;
}
.active-filters .tag button {
  width: 16px; height: 16px;
  border: 0; border-radius: 50%;
  background: rgba(47, 111, 224, .16);
  color: var(--primary-dark);
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-family: inherit;
}
.active-filters .tag button:hover { background: var(--primary); color: #fff; }
.active-filters .tag--sub {
  background: #fff;
  border-color: var(--line-strong);
  color: var(--ink-2);
}
.active-filters .tag--sub button { background: rgba(27, 33, 48, .08); color: var(--ink-2); }
.active-filters .tag--sub button:hover { background: var(--ink-2); color: #fff; }

/* ================= 资源卡片 ================= */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.resource-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 16px 14px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.resource-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: #cfe0fd;
}
.rc-head {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.badge {
  font-size: 11.5px;
  line-height: 1;
  padding: 4px 7px;
  border-radius: 5px;
  font-weight: 500;
}
.badge-subject { background: var(--bs, var(--primary-soft)); color: var(--bc, var(--primary-dark)); }
.badge-topic { background: #fff; border: 1px solid var(--line); color: var(--ink-2); font-weight: 400; }
.badge-level {
  margin-left: auto;
  background: var(--ls, var(--surface-2));
  color: var(--lc, var(--ink-2));
  font-weight: 600;
}
.badge-grade { background: var(--surface-2); color: var(--ink-2); }
.badge-format {
  margin-left: auto;
  background: #f4f6fa;
  color: var(--ink-3);
  border: 1px solid var(--line);
  letter-spacing: .04em;
}
.rc-title {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 43px;
}
.rc-desc {
  margin-top: 7px;
  font-size: 12.5px;
  color: var(--ink-3);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
}
.rc-tag {
  font-size: 10.5px;
  line-height: 1.7;
  color: var(--ink-3);
  background: var(--surface-2);
  border-radius: 4px;
  padding: 0 6px;
}
.rc-foot {
  margin-top: auto;
  padding-top: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px dashed var(--line);
}
.rc-meta {
  display: flex;
  gap: 12px;
  font-size: 11.5px;
  color: var(--ink-3);
}
.rc-dl {
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 12.5px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
  white-space: nowrap;
}
.rc-dl:hover { color: var(--primary-dark); text-decoration: underline; }

/* 列表视图 */
.resource-grid.is-list {
  grid-template-columns: 1fr;
  gap: 10px;
}
.resource-grid.is-list .resource-card {
  flex-direction: row;
  align-items: center;
  gap: 16px;
  padding: 13px 16px;
}
.resource-grid.is-list .rc-head { margin-bottom: 0; flex: none; min-width: 232px; }
.resource-grid.is-list .badge-format { margin-left: 0; }
.resource-grid.is-list .rc-body { flex: 1; min-width: 0; display: flex; align-items: center; gap: 16px; }
.resource-grid.is-list .rc-main { min-width: 0; flex: 1; }
.resource-grid.is-list .rc-title { min-height: auto; -webkit-line-clamp: 1; }
.resource-grid.is-list .rc-desc { display: none; }
.resource-grid.is-list .rc-foot {
  margin-top: 0; padding-top: 0; border-top: 0;
  flex: none; gap: 18px;
}
.resource-grid.is-list .rc-meta { display: none; }

/* 空状态 */
.empty-state { text-align: center; padding: 64px 20px; }
.empty-icon { font-size: 34px; margin-bottom: 10px; }
.empty-state h3 { font-size: 17px; margin-bottom: 6px; }
.empty-state p { color: var(--ink-3); font-size: 13.5px; margin-bottom: 18px; }

.load-more-wrap { text-align: center; padding: 30px 0 6px; }
.load-more-wrap .btn { padding: 0 26px; }

/* ================= 说明区 ================= */
.notice-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.notice-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.notice-card h3 { font-size: 14.5px; margin-bottom: 9px; }
.notice-card p { font-size: 13px; color: var(--ink-2); line-height: 1.7; }
.notice-list { font-size: 13px; color: var(--ink-2); }
.notice-list li {
  position: relative;
  padding-left: 15px;
  margin-bottom: 5px;
}
.notice-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 9px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.notice-list--tight li { font-size: 12.5px; margin-bottom: 3px; line-height: 1.6; }
.notice-card strong { color: var(--ink); font-weight: 600; }
.notice-note {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--line-strong);
  font-size: 12px;
  color: var(--ink-3);
}

/* ================= 轻提示 ================= */
.toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translate(-50%, 14px);
  max-width: min(520px, calc(100vw - 40px));
  padding: 11px 20px;
  border-radius: 10px;
  background: rgba(27, 33, 48, .92);
  color: #fff;
  font-size: 13.5px;
  line-height: 1.55;
  box-shadow: 0 12px 30px rgba(27, 33, 48, .22);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
  z-index: 200;
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* ================= 页脚 ================= */
.site-footer {
  border-top: 1px solid var(--line);
  background: #fff;
  margin-top: 20px;
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 30px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.footer-inner strong { font-size: 14px; }
.footer-inner p { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; }
.footer-links { display: flex; gap: 20px; font-size: 13px; color: var(--ink-2); }
.footer-links a:hover { color: var(--primary); }

/* ================= 响应式 ================= */
@media (max-width: 1080px) {
  .resource-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { grid-template-columns: 1fr; gap: 32px; }
  .hero-panel { max-width: 460px; }
  .notice-grid { grid-template-columns: 1fr; }
}

@media (max-width: 980px) {
  .major-grid, .minor-grid { grid-template-columns: 1fr; }
  .major-desc { min-height: 0; }
  .tree-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .header-inner { flex-wrap: wrap; gap: 12px; padding: 12px 16px; }
  .search-box { order: 3; max-width: none; flex-basis: 100%; }
  .header-actions .btn-ghost { display: none; }
  .hero h1 { font-size: 30px; }
  .hero-inner { padding: 36px 16px 34px; }
  .section { padding: 40px 16px; }
  .library-layout { grid-template-columns: 1fr; }
  .major-grid, .minor-grid { grid-template-columns: 1fr; }
  .filters { position: static; max-height: none; overflow: visible; }
  .filter-block { margin-bottom: 14px; }
  .filter-list { display: flex; flex-wrap: wrap; gap: 6px; }
  #gradeFilter { display: flex; }
  .filter-list li { margin: 0; }
  .filter-list button { width: auto; border: 1px solid var(--line); padding: 5px 10px; font-size: 12.5px; }
  .btn-reset { display: none; }
  .resource-grid.is-list .resource-card { flex-direction: column; align-items: stretch; }
  .resource-grid.is-list .rc-head { min-width: 0; }
  .resource-grid.is-list .rc-foot { justify-content: space-between; }
}

@media (max-width: 600px) {
  .resource-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 26px; }
  .hero-stats { gap: 26px; }
  .stat b { font-size: 22px; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .search-hint { display: none; }
  .search-box input { padding-right: 16px; }
}

/* =========================================================
   第二轮扩展：领域分支卡 / 学习路径 / 四层树 / 标签分组
   ========================================================= */

/* -------- 顶部导航分组 -------- */
.subject-nav { align-items: center; }
.nav-sep {
  flex: none;
  width: 1px;
  height: 14px;
  background: var(--line-strong);
  margin: 0 5px;
}
.nav-group {
  flex: none;
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: .06em;
  white-space: nowrap;
  padding-right: 1px;
}

/* -------- 领域分支卡 -------- */
.branch-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.branch-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 19px 21px 20px;
  cursor: pointer;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.branch-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--c, var(--primary));
}
.branch-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: transparent;
}
.branch-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.branch-title h3 { font-size: 16px; }
.branch-title p {
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--ink-3);
  line-height: 1.55;
}
.branch-count {
  margin-left: auto;
  flex: none;
  font-style: normal;
  font-size: 12px;
  color: var(--c, var(--primary));
  background: var(--cs, var(--primary-soft));
  border-radius: 100px;
  padding: 4px 11px;
  white-space: nowrap;
}
.topic-chips--wide { margin-top: 0; }
.minor-head--method span { color: #1f7a8c; }
.minor-head--star span { color: #b3541e; }
.minor-head--fun span { color: #8a4fbd; }

/* -------- 树：领域分组标题 -------- */
.tree-group-head {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  gap: 9px;
  padding: 10px 2px 7px;
  border-bottom: 1px solid var(--line);
}
.tree-group-head:first-child { padding-top: 0; }
.tg-emoji { font-size: 14px; }
.tg-name { font-size: 14.5px; font-weight: 700; }
.tg-desc { font-style: normal; font-size: 12px; color: var(--ink-3); }
.tg-count {
  margin-left: auto;
  font-size: 12px;
  color: var(--ink-3);
  background: var(--surface-2);
  border-radius: 100px;
  padding: 1px 9px;
}

/* -------- 树：大类 + 形态（第四层） -------- */
.tt-cat-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 7px 0 2px 14px;
}
.tt-cat-row .tt-cat { flex: none; }
.tt-types {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  flex: 1;
  padding-top: 1px;
}
.tt-type {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 23px;
  padding: 0 7px;
  border-radius: 5px;
  border: 1px dashed var(--line-strong);
  background: #fff;
  color: var(--ink-3);
  font-size: 11px;
  font-family: inherit;
  cursor: pointer;
  transition: all .14s ease;
}
.tt-type i { font-style: normal; color: var(--c, var(--primary)); opacity: .8; }
.tt-type:hover {
  border-style: solid;
  border-color: var(--c, var(--primary));
  color: var(--c, var(--primary));
  background: var(--cs, var(--primary-soft));
}

/* -------- 学习路径 -------- */
.path-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.path-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 20px 18px;
  box-shadow: var(--shadow-s);
}
.path-card--start { border-top: 3px solid #0f9e86; }
.path-card--up { border-top: 3px solid #d97706; }
.path-card--parent { border-top: 3px solid #2f6fe0; }
.path-head {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  margin-bottom: 15px;
}
.path-emoji {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--surface-2);
  font-size: 18px;
  flex: none;
}
.path-head h3 { font-size: 15.5px; }
.path-head p {
  margin-top: 3px;
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.5;
}
.path-steps { display: grid; gap: 8px; list-style: none; margin: 0; padding: 0; }
.path-steps li { list-style: none; }
.path-steps button {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  grid-template-areas: "n t" "n s";
  gap: 0 9px;
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fbfcfe;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.path-steps button b {
  grid-area: n;
  align-self: center;
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 11.5px;
  font-weight: 600;
  transition: background .15s, color .15s;
}
.path-steps button span { grid-area: t; font-size: 13.5px; color: var(--ink); }
.path-steps button em {
  grid-area: s;
  font-style: normal;
  font-size: 11.5px;
  color: var(--ink-3);
}
.path-steps button:hover {
  border-color: var(--primary);
  background: #fff;
  box-shadow: var(--shadow-s);
}
.path-steps button:hover b { background: var(--primary); color: #fff; }

/* -------- 标签分组 -------- */
.chip-group-label {
  flex-basis: 100%;
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: .08em;
  margin-top: 4px;
}
.chip-group-label:first-child { margin-top: 0; }

/* -------- 本轮响应式 -------- */
@media (max-width: 1080px) {
  .path-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 980px) {
  .path-grid { grid-template-columns: 1fr; }
  .tt-cat-row { flex-direction: column; gap: 5px; }
  .tg-desc { display: none; }
}
@media (max-width: 860px) {
  .nav-group { display: none; }
  .branch-card { padding: 16px 17px 17px; }
  .branch-head { flex-wrap: wrap; gap: 8px; }
  .branch-count { margin-left: 0; }
}
@media (max-width: 600px) {
  .hero-stats { gap: 14px 22px; }
  .path-card { padding: 16px 16px 14px; }
  .tree-group-head { flex-wrap: wrap; }
  .tg-count { margin-left: 0; }
}

/* 主科卡：底部入口对齐 */
.major-card { display: flex; flex-direction: column; }
.major-card .major-link { margin-top: auto; }

/* 卡片底部信息：允许换行但每项不拆字 */
.rc-meta { flex-wrap: wrap; row-gap: 3px; }
.rc-meta span { white-space: nowrap; }
.rc-foot { gap: 6px; }

/* 说明卡片等高 */
.notice-grid { align-items: stretch; }
.notice-card { height: 100%; }

/* 侧栏底部操作按钮与滚动留白 */
.filters { padding-bottom: 46px; }
.btn-reset {
  box-shadow: 0 -10px 16px -12px rgba(27, 33, 48, .4);
  border: 1px solid var(--line);
}

/* =========================================================
   第三轮扩展：教材定位矩阵 / 快速定位条 / 使用场景 / 教材行
   ========================================================= */

.section--tint { background: var(--surface-2); }
.section--tint .section-head { max-width: var(--max); margin: 0 auto; }

/* ---------- 教材定位矩阵 ---------- */
.matrix-card {
  max-width: var(--max);
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px 18px;
  box-shadow: var(--shadow-s);
  overflow-x: auto;
}
.matrix-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.mx-tab {
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: #fff;
  color: var(--ink-2);
  font-family: inherit;
  font-size: 12.5px;
  cursor: pointer;
  transition: all .15s ease;
}
.mx-tab:hover { border-color: var(--ec); color: var(--ec); }
.mx-tab.is-active {
  background: var(--es);
  border-color: var(--ec);
  color: var(--ec);
  font-weight: 600;
}

.matrix-grid {
  display: grid;
  grid-template-columns: 78px repeat(9, minmax(48px, 1fr));
  gap: 6px;
  min-width: 660px;
}
.mx-corner, .mx-col-head, .mx-row-head {
  display: grid;
  place-items: center;
  font-size: 12px;
  color: var(--ink-3);
  min-height: 30px;
}
.mx-corner { justify-items: start; font-size: 11.5px; }
.mx-col-head { font-weight: 600; color: var(--ink-2); }
.mx-row-head {
  font-weight: 600;
  color: var(--ink-2);
  border-right: 1px solid var(--line);
}
.mx-cell {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink-3);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.mx-cell:disabled { cursor: default; opacity: .55; }
.mx-cell.has {
  background: rgba(47, 111, 224, calc(0.07 + var(--heat, .2) * 0.62));
  border-color: rgba(47, 111, 224, calc(0.16 + var(--heat, .2) * 0.5));
  color: #173f86;
}
.mx-cell.has:hover { transform: translateY(-2px); box-shadow: var(--shadow-s); }
.mx-cell.is-active {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}
.matrix-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 18px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 11.5px;
  color: var(--ink-3);
}
.matrix-foot span { display: inline-flex; align-items: center; gap: 5px; }
.heat-demo {
  display: inline-block;
  width: 12px; height: 12px;
  border-radius: 3px;
  margin-right: -3px;
}
.heat-demo.h0 { background: rgba(47,111,224,.10); }
.heat-demo.h1 { background: rgba(47,111,224,.28); }
.heat-demo.h2 { background: rgba(47,111,224,.48); }
.heat-demo.h3 { background: rgba(47,111,224,.68); }

/* ---------- 资源库顶部教材定位条 ---------- */
.book-bar {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
  padding: 13px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.bb-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}
.bb-row + .bb-row { padding-top: 7px; border-top: 1px dashed var(--line); }
.bb-label {
  padding-top: 4px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-3);
  white-space: nowrap;
}
.bb-chips { display: flex; flex-wrap: wrap; gap: 5px 6px; }
.bb-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink-2);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: all .14s ease;
}
.bb-chip em {
  font-style: normal;
  font-size: 10.5px;
  color: var(--ink-3);
  background: var(--surface-2);
  border-radius: 100px;
  padding: 1px 5px;
}
.bb-chip:hover { border-color: var(--primary); color: var(--primary); }
.bb-chip.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 600;
}
.bb-chip.is-active em { background: rgba(255,255,255,.22); color: #fff; }

/* ---------- 卡片教材行 ---------- */
.rc-book {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 9px;
  font-size: 11.5px;
  color: var(--ink-3);
}
.rc-book-ed {
  padding: 2px 7px;
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-weight: 600;
}
.scene-chip .scene-emoji { margin-right: 2px; }

@media (max-width: 1080px) {
  .matrix-grid { grid-template-columns: 64px repeat(9, minmax(46px, 1fr)); }
}
@media (max-width: 860px) {
  .matrix-card { padding: 16px 15px; }
  .bb-row { grid-template-columns: 48px minmax(0, 1fr); gap: 8px; }
  .bb-chip { height: 25px; padding: 0 7px; font-size: 11.5px; }
}
@media (max-width: 600px) {
  .matrix-tabs { gap: 5px; }
  .mx-tab { height: 27px; padding: 0 9px; font-size: 11.5px; }
  .matrix-foot span:last-child { display: none; }
}

/* 8 项统计一行排布 */
.hero-stats { max-width: 100%; gap: 12px 20px; }
.hero-stats .stat b { font-size: 23px; }

/* =========================================================
   第五轮扩展：能力成长地图（从零到竞赛 · 六级阶梯）
   ========================================================= */

/* -------- 阶梯看板：六级并排，逐级抬高形成台阶 -------- */
.growth-board {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: end;
  gap: 12px;
  margin-top: 26px;
  padding: 8px 2px 4px;
}
.growth-step {
  --gc: var(--primary);
  --gs: var(--primary-soft);
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin-bottom: calc(var(--gi, 0) * 11px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--gc);
  border-radius: var(--radius);
  padding: 14px 13px 13px;
  box-shadow: var(--shadow-s);
  transition: transform .16s ease, box-shadow .16s ease;
}
.growth-step::before {
  /* 台阶底座：让抬升有「一级级」的落点感 */
  content: "";
  position: absolute;
  left: 10px; right: 10px; bottom: -9px;
  height: 8px;
  background: var(--gs);
  border-radius: 0 0 8px 8px;
  opacity: .85;
}
.growth-step:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.growth-step.is-active {
  border-color: var(--gc);
  border-top-width: 3px;
  box-shadow: 0 0 0 2px var(--gc), var(--shadow);
}

.gs-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.gs-num {
  width: 23px; height: 23px;
  display: grid; place-items: center;
  flex: none;
  border-radius: 7px;
  background: var(--gc);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.gs-emoji { font-size: 21px; line-height: 1; }
.gs-count {
  margin-left: auto;
  font-size: 17px;
  font-weight: 700;
  color: var(--gc);
  line-height: 1;
}
.gs-count em { font-size: 10px; font-style: normal; font-weight: 400; color: var(--ink-3); margin-left: 1px; }
.gs-heading { flex-basis: 100%; margin-top: 2px; }
.gs-heading h3 { font-size: 14px; }
.gs-heading p { font-size: 11px; color: var(--ink-3); line-height: 1.5; margin-top: 2px; min-height: 33px; }

.gs-meta { display: grid; gap: 5px; margin-top: 8px; }
.gs-who, .gs-focus {
  font-size: 10.5px;
  line-height: 1.45;
  color: var(--ink-2);
  background: var(--gs);
  border-radius: 6px;
  padding: 4px 7px;
}

.gs-picks { display: grid; gap: 3px; margin-top: 10px; }
.gs-pick {
  display: flex;
  align-items: center;
  gap: 5px;
  width: 100%;
  min-width: 0;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 5px;
  padding: 3px 3px;
  cursor: pointer;
}
.gs-pick:hover { background: var(--gs); }
.gs-pick-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--pc, #888); flex: none; }
.gs-pick-title {
  flex: 1;
  min-width: 0;
  font-size: 10.5px;
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gs-pick em { flex: none; font-size: 9.5px; font-style: normal; color: var(--ink-3); }

.gs-enter {
  margin-top: 11px;
  width: 100%;
  height: 30px;
  border: 1px solid var(--gc);
  border-radius: 7px;
  background: #fff;
  color: var(--gc);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.gs-enter:hover { background: var(--gc); color: #fff; }

/* -------- 诊断条 -------- */
.growth-tip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 30px;
  padding: 14px 16px;
  background: var(--surface-2);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}
.gt-label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-right: 4px; }
.gt-quick {
  border: 1px solid var(--line-strong);
  background: #fff;
  border-radius: 18px;
  padding: 5px 12px;
  font-size: 11.5px;
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease;
}
.gt-quick:hover { border-color: var(--primary); color: var(--primary); }

/* -------- 侧栏阶段筛选 chip -------- */
.stage-chip { color: var(--gc, var(--ink-2)); }
.stage-chip:hover { border-color: var(--gc, var(--primary)); color: var(--gc, var(--primary)); }
.stage-chip.is-active {
  background: var(--gc, var(--primary));
  border-color: var(--gc, var(--primary));
  color: #fff;
}
.stage-chip.is-active .chip-n { opacity: 1; }

/* -------- 资源卡阶段徽标 -------- */
.badge-stage { background: var(--gs, var(--surface-2)); color: var(--gc, var(--ink-2)); font-weight: 600; }

/* -------- 响应式 -------- */
@media (max-width: 1080px) {
  .growth-board {
    grid-template-columns: repeat(6, 190px);
    align-items: stretch;
    overflow-x: auto;
    padding-bottom: 12px;
  }
  .growth-step { margin-bottom: 0; }
  .growth-step::before { display: none; }
  .gs-heading p { min-height: 0; }
}
@media (max-width: 600px) {
  .growth-board { grid-template-columns: repeat(6, 168px); gap: 9px; }
  .growth-tip { gap: 6px; }
  .gt-quick { font-size: 11px; padding: 5px 9px; }
}

/* 锚点跳转避开 sticky 顶栏，避免章节标题被遮挡 */
.section { scroll-margin-top: 172px; }
@media (max-width: 600px) { .section { scroll-margin-top: 196px; } }

/* =========================================================
   第六轮扩展：学习闯关地图（六级 × 4 关 · 进度打卡）
   ========================================================= */

/* -------- 总进度 -------- */
.quest-progress {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px 16px;
  box-shadow: var(--shadow-s);
}
.qp-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.qp-main { display: flex; align-items: center; gap: 15px; }
.qp-ring {
  --p: 0;
  position: relative;
  width: 62px; height: 62px;
  flex: none;
  border-radius: 50%;
  display: grid; place-items: center;
  background: conic-gradient(var(--primary) calc(var(--p) * 1%), var(--line) 0);
}
.qp-ring::before {
  content: "";
  position: absolute; inset: 6px;
  border-radius: 50%;
  background: var(--surface);
}
.qp-ring b { position: relative; font-size: 17px; letter-spacing: -.02em; }
.qp-ring em { font-size: 10px; font-style: normal; color: var(--ink-3); }
.qp-sum { display: flex; flex-direction: column; gap: 2px; }
.qp-sum strong { font-size: 15px; }
.qp-sum span { font-size: 12px; color: var(--ink-3); }
.qp-legend { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink-3); }
.qp-legend i { width: 14px; height: 6px; border-radius: 3px; background: var(--primary); }

.qp-segs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}
.qp-seg { --gc: var(--primary); display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; align-items: center; }
.qp-seg-name { font-size: 11px; color: var(--ink-2); white-space: nowrap; }
.qp-seg-num { font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.qp-seg-bar { grid-column: 1 / -1; height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; }
.qp-seg-bar i { display: block; height: 100%; border-radius: 3px; background: var(--gc); transition: width .25s ease; }

/* -------- 六站关卡 -------- */
.quest-board { display: grid; gap: 14px; margin-top: 18px; }
.quest-station {
  --gc: var(--primary); --gs: var(--primary-soft);
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--gc);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-s);
}
.quest-station.is-complete { background: linear-gradient(90deg, var(--gs), var(--surface) 38%); }
.qs-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.qs-num {
  font-size: 10.5px; font-weight: 600; color: var(--gc);
  background: var(--gs); border-radius: 6px; padding: 3px 8px; white-space: nowrap;
}
.qs-emoji { font-size: 20px; line-height: 1; }
.qs-title { flex: 1; min-width: 0; }
.qs-title h3 { font-size: 14px; }
.qs-title p { font-size: 11px; color: var(--ink-3); margin-top: 1px; }
.qs-prog { font-size: 12px; font-weight: 700; color: var(--gc); font-variant-numeric: tabular-nums; white-space: nowrap; }

.qs-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 13px 15px 15px; }
.quest-card {
  --qc: var(--gc);
  display: flex; flex-direction: column;
  min-width: 0;
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 11px 12px 12px;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.quest-card:hover { border-color: var(--qc); box-shadow: var(--shadow-s); transform: translateY(-2px); }
.quest-card.is-done { background: var(--gs); border-color: var(--gc); }
.qc-index {
  position: absolute; top: 9px; right: 11px;
  font-size: 10px; color: var(--ink-3); font-variant-numeric: tabular-nums;
}
.qc-icon { font-size: 22px; line-height: 1.15; }
.qc-info { flex: 1; margin-top: 5px; min-width: 0; }
.qc-info h4 { font-size: 12.5px; }
.quest-card.is-done .qc-info h4 { color: var(--gc); }
.qc-info p { font-size: 10.5px; color: var(--ink-3); line-height: 1.5; margin-top: 2px; min-height: 31px; }
.qc-count { display: inline-block; margin-top: 5px; font-size: 10px; color: var(--ink-3); background: var(--surface-2); border-radius: 4px; padding: 1px 6px; }
.qc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 9px; }
.qc-actions button {
  height: 27px; border-radius: 6px; font-size: 11px; cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.qc-go { border: 1px solid var(--qc); background: #fff; color: var(--qc); font-weight: 600; }
.qc-go:hover { background: var(--qc); color: #fff; }
.qc-check { border: 1px solid var(--line); background: #fff; color: var(--ink-2); }
.qc-check:hover { border-color: var(--qc); color: var(--qc); }
.qc-check.is-on { background: var(--gc); border-color: var(--gc); color: #fff; font-weight: 600; }

/* -------- 继续闯关引导 -------- */
.quest-guide { margin-top: 16px; }
.qg-done {
  display: block; text-align: center;
  background: linear-gradient(90deg, #e6f7f3, #fef6e6);
  border: 1px dashed var(--green);
  border-radius: var(--radius);
  padding: 15px; font-size: 13px; font-weight: 600; color: var(--green);
}
.qg-next {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 16px;
  box-shadow: var(--shadow-s);
}
.qg-label { font-size: 11px; font-weight: 600; color: var(--ink-3); letter-spacing: .05em; }
.qg-badge {
  --gc: var(--primary); --gs: var(--primary-soft);
  font-size: 11px; font-weight: 600; color: var(--gc);
  background: var(--gs); border-radius: 6px; padding: 3px 9px;
}
.qg-name { flex: 1; min-width: 180px; font-size: 12.5px; color: var(--ink-2); }
.qg-btn {
  border: 0; border-radius: 8px; padding: 8px 15px;
  background: var(--primary); color: #fff; font-size: 12px; font-weight: 600; cursor: pointer;
}
.qg-btn:hover { background: var(--primary-dark); }

/* -------- 响应式 -------- */
@media (max-width: 1080px) {
  .qs-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .qp-segs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .quest-progress { padding: 14px 14px 12px; }
  .qp-ring { width: 52px; height: 52px; }
  .qp-legend { display: none; }
  .qs-head { flex-wrap: wrap; padding: 10px 12px; }
  .qs-cards { grid-template-columns: 1fr; padding: 11px 12px 13px; }
  .quest-card { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 0 10px; }
  .qc-icon { font-size: 20px; }
  .qc-info { flex: 1 1 110px; margin-top: 0; }
  .qc-info p { min-height: 0; }
  .qc-actions { flex: 1 1 100%; }
  .qg-btn { width: 100%; }
}

/* =========================================================
   第七轮扩展：我的学习台（收藏 · 打卡日历 · 连续天数）
   ========================================================= */

/* -------- 资源卡收藏星标 -------- */
.rc-fav {
  margin-left: 2px;
  width: 24px; height: 22px;
  flex: none;
  border: 0;
  background: transparent;
  color: #c2cad8;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  transition: color .15s ease, transform .15s ease;
}
.rc-fav:hover { color: #e0a912; transform: scale(1.15); }
.rc-fav.is-on { color: #e0a912; }

/* -------- 资源库工具区：收藏开关 + 视图切换 -------- */
.lib-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fav-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink-2);
  font-size: 12.5px;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.fav-toggle:hover { border-color: #e0a912; color: #b8860b; }
.fav-toggle .fav-star { font-size: 16px; color: #d9a521; line-height: 1; }
.fav-toggle em {
  font-style: normal; font-size: 11px;
  min-width: 18px; height: 18px; padding: 0 5px;
  display: inline-grid; place-items: center;
  background: var(--surface-2); border-radius: 9px; color: var(--ink-3);
}
.fav-toggle.is-active {
  background: #fff8e8; border-color: #e0a912; color: #9a6d00; font-weight: 600;
}
.fav-toggle.is-active .fav-star { color: #e0a912; }
.fav-toggle.is-active em { background: #f0d68a; color: #7a5600; }

/* -------- 学习台概览 -------- */
.hub-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}
.hub-stat {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 16px 14px;
  box-shadow: var(--shadow-s);
}
.hub-stat-icon { position: absolute; top: 14px; right: 15px; font-size: 20px; }
.hub-stat b { font-size: 27px; line-height: 1.1; letter-spacing: -.02em; }
.hub-stat-label { font-size: 12.5px; font-weight: 600; color: var(--ink); margin-top: 3px; }
.hub-stat em { font-size: 10.5px; font-style: normal; color: var(--ink-3); margin-top: 4px; line-height: 1.5; }

/* -------- 学习台双栏 -------- */
.hub-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 14px; margin-top: 14px; }
.hub-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px 18px;
  box-shadow: var(--shadow-s);
  min-width: 0;
}
.hub-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.hub-card-head h3 { font-size: 14.5px; }
.hub-card-note { font-size: 11px; color: var(--ink-3); }
.hub-link {
  border: 0; background: transparent;
  color: var(--primary); font-size: 11.5px; cursor: pointer; padding: 0;
}
.hub-link:hover { text-decoration: underline; }

/* 热力日历：7 行 × 12 列 */
.hub-cal-grid {
  display: grid;
  grid-template-rows: repeat(7, 1fr);
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
}
.hub-cell {
  display: block;
  aspect-ratio: 1;
  border-radius: 3px;
  background: #eef1f6;
  min-width: 8px;
}
.hub-cell.lv0 { background: #eef1f6; }
.hub-cell.lv1 { background: #c6e8dd; }
.hub-cell.lv2 { background: #6cc4a8; }
.hub-cell.lv3 { background: #0f9e86; }
.hub-cell.is-today { box-shadow: 0 0 0 2px var(--primary); }
.hub-cal-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-top: 12px;
  font-size: 10.5px; color: var(--ink-3);
}
.hub-cal-legend { display: inline-flex; align-items: center; gap: 3px; }
.hub-cal-legend .hub-cell { width: 11px; height: 11px; aspect-ratio: auto; }

/* -------- 收藏清单 -------- */
.hub-favlist { display: grid; gap: 7px; max-height: 300px; overflow-y: auto; }
.hub-fav-item {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); border-radius: 9px;
  padding: 8px 10px;
  min-width: 0;
}
.hub-fav-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--pc, #888); flex: none; }
.hub-fav-title {
  flex: 1; min-width: 0;
  font-size: 12px; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hub-fav-sub { font-size: 10.5px; color: var(--ink-3); white-space: nowrap; flex: none; }
.hub-fav-open, .hub-fav-del {
  flex: none; border: 0; background: transparent; cursor: pointer;
  width: 20px; height: 20px; border-radius: 5px;
  color: var(--ink-3); font-size: 14px; line-height: 1;
}
.hub-fav-open:hover { background: var(--primary-soft); color: var(--primary); }
.hub-fav-del:hover { background: #fbe9ec; color: #c2384a; }
.hub-fav-more { text-align: center; font-size: 11px; color: var(--ink-3); padding: 6px; }
.hub-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 34px 12px; text-align: center;
  color: var(--ink-3);
}
.hub-empty > span { font-size: 32px; }
.hub-empty p { font-size: 12.5px; }

/* -------- 响应式 -------- */
@media (max-width: 980px) {
  .hub-grid { grid-template-columns: 1fr; }
  .hub-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .lib-tools { width: 100%; }
  .hub-overview { gap: 9px; }
  .hub-stat { padding: 13px 12px 12px; }
  .hub-stat b { font-size: 22px; }
  .hub-stat em { font-size: 10px; }
  .hub-card { padding: 14px 13px 15px; }
  .hub-fav-sub { display: none; }
}

/* -------- 学习报告导出按钮 -------- */
.hub-export {
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #fff;
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 600;
  padding: 9px 16px;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.hub-export:hover {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: var(--shadow-s);
}
@media (max-width: 600px) {
  .hub-export { width: 100%; }
}

/* =========================================================
   第八轮扩展：考点速查（语数英 45 个考点 · 板块分组）
   ========================================================= */

.points-card {
  margin-top: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-s);
  overflow: hidden;
}

/* 学科页签 */
.points-tabs {
  display: flex;
  gap: 4px;
  padding: 12px 14px 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.pt-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px 10px;
  border: 1px solid transparent;
  border-bottom: 2px solid transparent;
  border-radius: 8px 8px 0 0;
  background: transparent;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: color .15s ease, background .15s ease;
}
.pt-tab:hover { color: var(--pc); background: #fff; }
.pt-tab.is-active {
  background: var(--surface);
  color: var(--pc);
  border-color: var(--line);
  border-bottom-color: var(--pc);
  margin-bottom: -1px;
}
.pt-emoji { font-size: 15px; line-height: 1; }
.pt-tab em {
  font-style: normal;
  font-size: 10.5px;
  font-weight: 400;
  color: var(--ink-3);
  background: var(--surface-2);
  border-radius: 9px;
  padding: 1px 6px;
}
.pt-tab.is-active em { background: var(--ps); color: var(--pc); }

/* 板块分行 */
.points-body { padding: 16px 18px 6px; display: grid; gap: 12px; }
.pg-row { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: start; }
.pg-head {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-3);
  padding-top: 6px;
  line-height: 1.4;
}
.pg-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.pt-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  color: var(--ink-2);
  font-size: 12px;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.pt-chip:hover { border-color: var(--pc); color: var(--pc); }
.pt-chip em {
  font-style: normal;
  font-size: 10px;
  color: var(--ink-3);
  background: var(--surface-2);
  border-radius: 8px;
  padding: 0 5px;
  min-width: 16px;
  text-align: center;
}
.pt-chip.is-active {
  background: var(--pc);
  border-color: var(--pc);
  color: #fff;
  font-weight: 600;
}
.pt-chip.is-active em { background: rgba(255,255,255,.22); color: #fff; }

/* 底部汇总 */
.points-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 18px 14px;
  border-top: 1px dashed var(--line);
  background: var(--surface-2);
}
.points-note { font-size: 12px; color: var(--ink-2); }
.points-note b { color: var(--primary); font-weight: 700; }
.pn-tag {
  display: inline-block;
  font-style: normal;
  font-size: 11px;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 5px;
  padding: 1px 7px;
  margin: 0 4px 0 2px;
}
.points-actions { display: flex; gap: 8px; }

/* 资源卡考点标签 */
.rc-points { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.rc-point {
  font-size: 10px;
  line-height: 1.6;
  color: #6b4fb0;
  background: #f2edfd;
  border-radius: 4px;
  padding: 0 6px;
  white-space: nowrap;
}

/* 响应式 */
@media (max-width: 760px) {
  .pg-row { grid-template-columns: 1fr; gap: 4px; }
  .pg-head { padding-top: 0; }
  .points-body { padding: 14px 14px 4px; }
}
@media (max-width: 600px) {
  .points-tabs { padding: 10px 10px 0; gap: 2px; }
  .pt-tab { padding: 8px 10px 9px; font-size: 12px; }
  .pt-tab em { display: none; }
  .points-foot { padding: 11px 12px 12px; }
  .points-actions { width: 100%; }
  .points-actions .btn { flex: 1; }
}

/* ================= 学情诊断台（按症状找） ================= */
.sym-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.sym-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.sym-tab:hover { border-color: var(--gc); color: var(--gc); }
.sym-tab.is-active { background: var(--gc); border-color: var(--gc); color: #fff; }
.sym-tab-e { font-size: 14px; line-height: 1; }
.sym-tab em {
  font-style: normal;
  font-size: 10.5px;
  font-weight: 400;
  color: var(--ink-3);
  background: var(--surface-2);
  border-radius: 9px;
  padding: 1px 6px;
}
.sym-tab.is-active em { background: rgba(255, 255, 255, .24); color: #fff; }

.sym-board {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.sym-card {
  display: flex;
  flex-direction: column;
  padding: 18px 20px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--sc);
  border-radius: var(--radius);
  box-shadow: var(--shadow-s);
  transition: box-shadow .18s ease, transform .18s ease;
}
.sym-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }

.sym-head { display: flex; align-items: flex-start; gap: 12px; }
.sym-icon {
  flex: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  font-size: 19px;
  border-radius: 11px;
  background: var(--ss);
  color: var(--sc);
}
.sym-title h3 { font-size: 16.5px; line-height: 1.35; }
.sym-who {
  display: inline-block;
  margin-top: 3px;
  font-size: 10.5px;
  color: var(--sc);
  background: var(--ss);
  border-radius: 9px;
  padding: 1px 8px;
}

.sym-tell {
  margin-top: 12px;
  padding: 9px 12px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-2);
  background: var(--surface-2);
  border-radius: 9px;
}

.sym-steps { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.sym-steps li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; }
.sym-n {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--ss);
  color: var(--sc);
  font-size: 11px;
  font-weight: 700;
}
.sym-step-body b { display: block; font-size: 12px; color: var(--sc); letter-spacing: .02em; }
.sym-step-body p { margin-top: 1px; font-size: 12.5px; line-height: 1.6; color: var(--ink-2); }

.sym-foot {
  margin-top: auto;
  padding-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  border-top: 1px dashed var(--line);
}
.sym-count { font-size: 11.5px; color: var(--ink-3); }
.sym-count b { color: var(--sc); font-weight: 700; }
.sym-go {
  padding: 7px 14px;
  border: 1px solid var(--sc);
  border-radius: 20px;
  background: transparent;
  color: var(--sc);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.sym-go:hover { background: var(--sc); color: #fff; }

.sym-tip { margin-top: 14px; font-size: 12px; color: var(--ink-3); }
.sym-tip b { color: var(--ink-2); margin-right: 4px; }

/* ================= 题型攻略 ================= */
.tg-card {
  margin-top: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-s);
  overflow: hidden;
}
.tg-tabs {
  display: flex;
  gap: 6px;
  padding: 12px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.tg-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border: 1px solid transparent;
  border-radius: 18px;
  background: transparent;
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.tg-tab:hover { background: #fff; color: var(--primary); }
.tg-tab.is-active { background: var(--primary); color: #fff; }
.tg-tab em {
  font-style: normal;
  font-size: 10px;
  font-weight: 400;
  background: rgba(0, 0, 0, .07);
  border-radius: 8px;
  padding: 0 5px;
}
.tg-tab.is-active em { background: rgba(255, 255, 255, .24); }

.tg-layout { display: grid; grid-template-columns: 272px minmax(0, 1fr); }
.tg-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-content: start;
  gap: 6px;
  padding: 14px;
  border-right: 1px solid var(--line);
  background: #fcfdff;
}
.tg-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.tg-item:hover { border-color: var(--tc); color: var(--tc); }
.tg-item.is-active {
  background: var(--tc);
  border-color: var(--tc);
  color: #fff;
}
.tg-item em {
  font-style: normal;
  font-size: 10px;
  font-weight: 400;
  color: var(--ink-3);
  background: var(--surface-2);
  border-radius: 8px;
  padding: 0 5px;
}
.tg-item.is-active em { background: rgba(255, 255, 255, .24); color: #fff; }

.tg-detail { display: flex; flex-direction: column; padding: 20px 24px 22px; }
.tg-dhead { border-bottom: 1px dashed var(--line); padding-bottom: 14px; }
.tg-sub-badge {
  display: inline-block;
  font-size: 10.5px;
  color: var(--tc);
  background: #eef2f8;
  border-radius: 10px;
  padding: 1px 9px;
  margin-bottom: 6px;
}
.tg-dhead h3 { display: flex; align-items: baseline; gap: 10px; font-size: 19px; }
.tg-dhead h3 em { font-style: normal; font-size: 11.5px; font-weight: 400; color: var(--ink-3); }
.tg-signal { margin-top: 8px; font-size: 12.5px; line-height: 1.65; color: var(--ink-2); }
.tg-signal b { color: var(--tc); margin-right: 6px; font-weight: 700; }

.tg-steps { margin-top: 16px; }
.tg-label { display: block; font-size: 12px; color: var(--ink-3); letter-spacing: .04em; }
.tg-steps ol { margin: 9px 0 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.tg-steps li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; align-items: start; }
.tg-steps li span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--tc);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
}
.tg-steps li p { font-size: 12.5px; line-height: 1.6; color: var(--ink-2); padding-top: 2px; }

.tg-trap {
  margin-top: 16px;
  margin-bottom: 18px;
  padding: 10px 13px;
  background: #fdf6e9;
  border-left: 3px solid #c47a0a;
  border-radius: 0 8px 8px 0;
}
.tg-trap b { font-size: 11.5px; color: #9a5c05; display: block; margin-bottom: 2px; }
.tg-trap p { font-size: 12.5px; line-height: 1.6; color: #7c5a1e; }

.tg-go {
  margin-top: auto;
  align-self: flex-start;
  padding: 10px 20px;
  border: none;
  border-radius: 10px;
  background: var(--tc);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: filter .15s ease;
}
.tg-go:hover { filter: brightness(1.08); }

@media (max-width: 1000px) {
  .tg-layout { grid-template-columns: 230px minmax(0, 1fr); }
  .tg-list { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .sym-board { grid-template-columns: 1fr; }
  .tg-layout { grid-template-columns: 1fr; }
  .tg-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
}
@media (max-width: 600px) {
  .sym-tab { padding: 7px 12px; font-size: 12px; }
  .sym-tab em { display: none; }
  .sym-card { padding: 15px 15px 13px; }
  .sym-icon { width: 34px; height: 34px; font-size: 16px; }
  .sym-title h3 { font-size: 15px; }
  .sym-foot { padding-top: 12px; }
  .sym-go { flex: 1; text-align: center; }
  .tg-tabs { padding: 10px 10px; overflow-x: auto; }
  .tg-tab { padding: 6px 11px; font-size: 12px; white-space: nowrap; }
  .tg-list { grid-template-columns: 1fr 1fr; padding: 10px; }
  .tg-detail { padding: 16px 15px 18px; }
  .tg-dhead h3 { font-size: 17px; }
  .tg-go { width: 100%; }
}

/* ================= 学段衔接（按年级跨度找） ================= */
.tr-rail {
  display: flex;
  gap: 8px;
  margin-top: 24px;
  overflow-x: auto;
  padding-bottom: 2px;
}
.tr-node {
  flex: 1 0 138px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink-2);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.tr-node:hover { border-color: var(--primary); }
.tr-node.is-active {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: 0 4px 14px rgba(47, 111, 224, .12);
}
.tr-dot { font-size: 16px; line-height: 1; flex: none; }
.tr-node-text { display: flex; flex-direction: column; min-width: 0; }
.tr-node-text b { font-size: 13px; color: var(--ink); line-height: 1.3; }
.tr-node-text em {
  font-style: normal;
  font-size: 10px;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tr-node.is-active .tr-node-text b { color: var(--primary-dark); }

.tr-panel {
  margin-top: 14px;
  padding: 22px 24px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-s);
}
.tr-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--line);
}
.tr-kicker { font-size: 11px; color: var(--ink-3); letter-spacing: .06em; }
.tr-span h3 { margin-top: 4px; font-size: 18px; line-height: 1.45; }
.tr-badge {
  flex: none;
  font-size: 11.5px;
  color: var(--primary-dark);
  background: var(--primary-soft);
  border-radius: 14px;
  padding: 4px 12px;
  white-space: nowrap;
}

.tr-cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 26px; margin-top: 18px; }
.tr-col h4, .tr-weeks h4 {
  margin-bottom: 10px;
  font-size: 11.5px;
  color: var(--ink-3);
  letter-spacing: .05em;
  font-weight: 600;
}
.tr-shifts li {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px dotted var(--line);
}
.tr-shifts li:last-child { border-bottom: none; }
.tr-shifts b { font-size: 12px; color: var(--primary); font-weight: 700; padding-top: 1px; }
.tr-shifts p { font-size: 12.5px; line-height: 1.62; color: var(--ink-2); }

.tr-must li {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 5px 0;
  font-size: 12.5px;
  color: var(--ink-2);
}
.tr-must span {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  margin-top: 1px;
  border-radius: 6px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 10.5px;
  font-weight: 700;
}

.tr-weeks { margin-top: 18px; padding-top: 15px; border-top: 1px dashed var(--line); }
.tr-weeks ol {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tr-weeks li { padding: 10px 12px; background: var(--surface-2); border-radius: 10px; }
.tr-weeks b { display: block; margin-bottom: 3px; font-size: 11.5px; color: var(--primary); }
.tr-weeks p { font-size: 12px; line-height: 1.6; color: var(--ink-2); }

.tr-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  font-size: 12px;
  color: var(--ink-3);
}
.tr-foot b { color: var(--primary); font-weight: 700; }
.tr-go {
  padding: 8px 16px;
  border: 1px solid var(--primary);
  border-radius: 20px;
  background: transparent;
  color: var(--primary);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.tr-go:hover { background: var(--primary); color: #fff; }

/* ================= 知识链路（考点先后关系） ================= */
.chain-card {
  margin-top: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-s);
  overflow: hidden;
}
.chain-tabs {
  display: flex;
  gap: 4px;
  padding: 12px 14px 0;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.ct-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px 10px;
  border: 1px solid transparent;
  border-bottom: 2px solid transparent;
  border-radius: 8px 8px 0 0;
  background: transparent;
  color: var(--ink-2);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: color .15s ease, background .15s ease;
}
.ct-tab:hover { color: var(--pc); background: #fff; }
.ct-tab.is-active {
  background: var(--surface);
  color: var(--pc);
  border-color: var(--line);
  border-bottom-color: var(--pc);
  margin-bottom: -1px;
}
.ct-tab em {
  font-style: normal;
  font-size: 10.5px;
  font-weight: 400;
  color: var(--ink-3);
  background: var(--surface-2);
  border-radius: 9px;
  padding: 1px 6px;
}
.ct-tab.is-active em { background: var(--ps); color: var(--pc); }

.chain-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 14px 18px;
  border-bottom: 1px dashed var(--line);
}
.cpick {
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--ink-2);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.cpick:hover { border-color: var(--pc); color: var(--pc); }
.cpick.is-active { background: var(--pc); border-color: var(--pc); color: #fff; font-weight: 600; }

.chain-view { padding: 18px 20px 20px; }
.chain-line { display: flex; align-items: flex-start; gap: 14px; }
.chain-lbl {
  flex: none;
  width: 56px;
  padding-top: 12px;
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: .04em;
}
.chain-path { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; flex: 1; }
.cp-node {
  min-width: 78px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.cp-node:hover { border-color: var(--primary); }
.cp-node b { display: block; font-size: 12px; color: var(--ink); line-height: 1.35; }
.cp-node em { display: block; margin-top: 1px; font-style: normal; font-size: 10px; color: var(--ink-3); }
.cp-node.is-cur {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 6px 16px rgba(47, 111, 224, .22);
}
.cp-node.is-cur b { color: #fff; }
.cp-node.is-cur em { color: rgba(255, 255, 255, .78); }
.cp-arrow { color: var(--ink-3); font-size: 12px; }

.chain-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1px dashed var(--line);
}
.cm-block > b {
  display: block;
  margin-bottom: 7px;
  font-size: 11.5px;
  color: var(--ink-3);
  letter-spacing: .04em;
  font-weight: 600;
}
.cm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cp-link {
  padding: 4px 10px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  background: #fff;
  color: var(--ink-2);
  font-family: inherit;
  font-size: 11.5px;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease;
}
.cp-link:hover { border-color: var(--primary); color: var(--primary); }
.cm-none { font-size: 12px; color: var(--ink-3); }

.chain-act {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  font-size: 12px;
  color: var(--ink-2);
}
.chain-act b { color: var(--primary); font-weight: 700; }
.chain-go {
  padding: 8px 18px;
  border: none;
  border-radius: 20px;
  background: var(--primary);
  color: #fff;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease;
}
.chain-go:hover { background: var(--primary-dark); }

@media (max-width: 1000px) {
  .tr-cols { grid-template-columns: 1fr; gap: 18px; }
  .tr-weeks ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tr-node { flex: 0 0 132px; }
}
@media (max-width: 760px) {
  .chain-meta { grid-template-columns: 1fr; gap: 14px; }
  .chain-line { flex-direction: column; gap: 8px; }
  .chain-lbl { width: auto; padding-top: 0; }
  .tr-panel { padding: 18px 16px 16px; }
  .tr-top { flex-direction: column; gap: 8px; }
  .tr-span h3 { font-size: 16px; }
}
@media (max-width: 600px) {
  .tr-weeks ol { grid-template-columns: 1fr; }
  .tr-shifts li { grid-template-columns: 1fr; gap: 2px; }
  .chain-tabs { padding: 10px 10px 0; }
  .ct-tab { padding: 8px 11px 9px; font-size: 12px; }
  .ct-tab em { display: none; }
  .chain-picks { padding: 12px 12px; }
  .chain-view { padding: 14px 14px 16px; }
  .cp-node { min-width: 0; width: 100%; padding: 8px 10px; }
  .chain-path { flex-direction: column; align-items: stretch; gap: 4px; }
  .cp-arrow { align-self: center; transform: rotate(90deg); line-height: 1; }
  .chain-act { flex-direction: column; align-items: flex-start; }
  .chain-go { width: 100%; }
  .tr-foot { flex-direction: column; align-items: flex-start; }
  .tr-go { width: 100%; }
}

/* ================= 错题本 · 遗忘曲线复习 ================= */
.mk-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}
.mk-stat {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 16px 16px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-s);
}
.mk-stat-icon { position: absolute; top: 13px; right: 15px; font-size: 19px; }
.mk-stat b { font-size: 24px; line-height: 1.15; letter-spacing: -.02em; }
.mk-stat-label { font-size: 12.5px; font-weight: 600; color: var(--ink); margin-top: 3px; }
.mk-stat em { font-size: 10.5px; font-style: normal; color: var(--ink-3); margin-top: 4px; line-height: 1.5; }

.mk-grid { display: grid; grid-template-columns: 1fr 1.08fr; gap: 14px; margin-top: 14px; align-items: stretch; }
.mk-card {
  display: flex;
  flex-direction: column;
  padding: 16px 18px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-s);
}
.mk-card--today { min-height: 320px; }

/* -------- 记一道错题 -------- */
.mk-form { display: grid; gap: 13px; }
.mk-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mk-field { display: grid; gap: 5px; min-width: 0; }
.mk-label { font-size: 11.5px; font-weight: 600; color: var(--ink-2); letter-spacing: .02em; }
.mk-label em { font-style: normal; font-weight: 400; color: var(--ink-3); font-size: 10.5px; margin-left: 3px; }

.mk-form select,
.mk-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 12.5px;
  line-height: 1.4;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.mk-form select:focus,
.mk-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47, 111, 224, .12); }
.mk-input::placeholder { color: var(--ink-3); }

.mk-causes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.mk-cause {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  column-gap: 6px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink-2);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.mk-cause:hover { border-color: var(--mc); }
.mk-cause.is-active {
  border-color: var(--mc);
  background: var(--surface-2);
  background: color-mix(in srgb, var(--mc) 8%, #fff);
  box-shadow: inset 0 0 0 1px var(--mc);
}
.mk-cause-icon { font-size: 14px; line-height: 1; grid-row: span 2; }
.mk-cause b { font-size: 12px; font-weight: 700; color: var(--ink); line-height: 1.3; }
.mk-cause.is-active b { color: var(--mc); }
.mk-cause em {
  font-style: normal;
  font-size: 10px;
  color: var(--ink-3);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mk-cause-hint {
  padding: 10px 12px;
  background: var(--surface-2);
  border-radius: 10px;
  border-left: 3px solid var(--line-strong);
}
.mk-cause-hint b {
  display: block;
  font-size: 10.5px;
  color: var(--mc, var(--ink-2));
  letter-spacing: .03em;
}
.mk-cause-hint b + p { margin: 2px 0 8px; }
.mk-cause-hint p { font-size: 12px; line-height: 1.6; color: var(--ink-2); }
.mk-cause-hint p:last-child { margin-bottom: 0; }

.mk-save-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.mk-save-hint { font-size: 11px; color: var(--ink-3); }

/* -------- 今日清单 -------- */
.mk-card--today .mk-list { flex: 1; align-content: start; }
.mk-list.is-empty { display: flex; align-items: center; justify-content: center; }
.mk-list.is-empty .mk-empty { width: 100%; }
.mk-list { display: grid; gap: 9px; }
.mk-item {
  padding: 12px 13px 11px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--mc);
  border-radius: 11px;
  background: #fff;
  transition: box-shadow .15s ease;
}
.mk-item:hover { box-shadow: var(--shadow-s); }
.mk-item-top { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.mk-cause-tag {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--mc);
  background: var(--surface-2);
  background: color-mix(in srgb, var(--mc) 10%, #fff);
  border-radius: 9px;
  padding: 1px 8px;
  white-space: nowrap;
}
.mk-item-sub {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--ink-3);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mk-sub-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--sc); flex: none; }
.mk-due {
  margin-left: auto;
  font-size: 10.5px;
  color: var(--ink-3);
  white-space: nowrap;
}
.mk-due.is-over { color: #c0392b; font-weight: 600; }

.mk-item-title {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mk-item-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}
.mk-pips { display: inline-flex; align-items: center; gap: 3px; }
.mk-pip {
  width: 13px;
  height: 4px;
  border-radius: 2px;
  background: var(--line-strong);
}
.mk-pip.is-on { background: var(--mc); }
.mk-pips em { font-style: normal; font-size: 10.5px; color: var(--ink-3); margin-left: 5px; }

.mk-item-act { display: inline-flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.mk-btn {
  padding: 4px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: #fff;
  color: var(--ink-2);
  font-family: inherit;
  font-size: 11.5px;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.mk-btn:hover { border-color: var(--ink-3); color: var(--ink); }
.mk-btn--go { border-color: var(--primary); color: var(--primary); font-weight: 600; }
.mk-btn--go:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.mk-btn--ok { color: var(--green); border-color: #b7e3d9; border-color: color-mix(in srgb, var(--green) 45%, #fff); }
.mk-btn--ok:hover { background: var(--green); color: #fff; border-color: var(--green); }
.mk-btn--del { padding: 4px 8px; color: var(--ink-3); }
.mk-btn--del:hover { color: #c0392b; border-color: #e6b0aa; background: #fdf2f1; }

.mk-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 34px 16px;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  background: #fcfdff;
}
.mk-empty-icon { font-size: 26px; line-height: 1; }
.mk-empty p { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.mk-empty em { font-style: normal; font-size: 11.5px; color: var(--ink-3); line-height: 1.6; max-width: 320px; }
.mk-demo {
  margin-top: 8px;
  padding: 6px 14px;
  border: 1px solid var(--primary);
  border-radius: 16px;
  background: transparent;
  color: var(--primary);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}
.mk-demo:hover { background: var(--primary); color: #fff; }

/* -------- 错因分布 -------- */
.mk-causecard {
  margin-top: 14px;
  padding: 16px 18px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-s);
}
.mk-cc-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.mk-cc-head h3 { font-size: 14.5px; }
.mk-cc-head span { font-size: 11.5px; color: var(--ink-3); }
.mk-cc-bars { display: grid; gap: 5px; }
.mk-bar {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) 62px;
  align-items: center;
  gap: 12px;
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.mk-bar:hover { background: var(--surface-2); border-color: var(--line); }
.mk-bar-name { font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.mk-bar.is-zero .mk-bar-name { color: var(--ink-3); }
.mk-bar-track { height: 9px; border-radius: 5px; background: var(--surface-2); overflow: hidden; }
.mk-bar-track i { display: block; height: 100%; border-radius: 5px; background: var(--mc); transition: width .3s ease; }
.mk-bar-n { font-size: 12px; font-weight: 700; color: var(--ink); text-align: right; white-space: nowrap; }
.mk-bar-n em { font-style: normal; font-weight: 400; font-size: 10px; color: var(--ink-3); margin-left: 3px; }
.mk-bar.is-zero .mk-bar-n { color: var(--ink-3); font-weight: 400; }
.mk-cc-foot { margin-top: 10px; padding-top: 9px; border-top: 1px dashed var(--line); }
.mk-cc-foot span { font-size: 11.5px; color: var(--ink-3); }
.mk-cc-empty { font-size: 12px; color: var(--ink-3); line-height: 1.7; }

.mk-tip { margin-top: 12px; font-size: 12px; color: var(--ink-3); line-height: 1.7; }
.mk-tip b { color: var(--ink-2); margin-right: 6px; }

/* 错因跳到症状卡时的高亮 */
.sym-card.is-flash { animation: symFlash 1.6s ease; }
@keyframes symFlash {
  0% { box-shadow: 0 0 0 0 rgba(47, 111, 224, .35); }
  35% { box-shadow: 0 0 0 5px rgba(47, 111, 224, .18); }
  100% { box-shadow: 0 0 0 0 rgba(47, 111, 224, 0); }
}

@media (max-width: 1080px) {
  .mk-causes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .mk-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mk-grid { grid-template-columns: 1fr; }
  .mk-card--today { min-height: 0; }
}
@media (max-width: 600px) {
  .mk-stats { gap: 9px; }
  .mk-stat { padding: 13px 13px 12px; }
  .mk-stat-icon { font-size: 16px; top: 11px; right: 12px; }
  .mk-stat b { font-size: 20px; }
  .mk-stat-label { font-size: 11.5px; }
  .mk-stat em { font-size: 10px; }
  .mk-card { padding: 14px 14px 15px; }
  .mk-row { grid-template-columns: 1fr; }
  .mk-causes { grid-template-columns: 1fr 1fr; gap: 6px; }
  .mk-cause { padding: 7px 8px; }
  .mk-cause b { font-size: 11.5px; }
  .mk-item { padding: 11px 11px 10px; }
  .mk-due { margin-left: auto; }
  .mk-item-act { width: 100%; }
  .mk-btn { flex: 1; text-align: center; }
  .mk-btn--del { flex: 0 0 34px; }
  .mk-bar { grid-template-columns: 78px minmax(0, 1fr) 46px; gap: 8px; padding: 5px 2px; }
  .mk-bar-name { font-size: 11px; }
  .mk-causecard { padding: 14px 13px 12px; }
  .mk-cc-head h3 { font-size: 13.5px; }
}

/* ================= 未来七天 · 自动排程 ================= */
.wp-actions { display: flex; flex-wrap: wrap; gap: 8px; flex: none; }
.wp-rebuild--ghost { border-color: var(--line-strong); color: var(--ink-2); }
.wp-rebuild--ghost:hover { background: var(--ink-2); border-color: var(--ink-2); color: #fff; }
.wp-rebuild {
  flex: none;
  padding: 9px 18px;
  border: 1px solid var(--primary);
  border-radius: 20px;
  background: transparent;
  color: var(--primary);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.wp-rebuild:hover { background: var(--primary); color: #fff; }

.wp-setup {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 26px;
  margin-top: 22px;
  padding: 14px 16px 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-s);
}
.wp-set { display: flex; align-items: center; gap: 10px; min-width: 0; }
.wp-set-label { font-size: 11.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.wp-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.wp-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  padding: 6px 12px 5px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.wp-chip:hover { border-color: var(--primary); }
.wp-chip b { font-size: 12px; color: var(--ink); line-height: 1.35; }
.wp-chip em { font-style: normal; font-size: 10px; color: var(--ink-3); line-height: 1.3; white-space: nowrap; }
.wp-chip.is-active {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: inset 0 0 0 1px var(--primary);
}
.wp-chip.is-active b { color: var(--primary-dark); }
.wp-chip.is-active em { color: var(--primary); }

.wp-meta {
  flex: 1 1 100%;
  padding-top: 11px;
  border-top: 1px dashed var(--line);
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--ink-3);
}
.wp-meta b { color: var(--ink-2); font-weight: 600; }

.wp-plan {
  margin-top: 14px;
  padding: 6px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-s);
}
.wp-row {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px dashed var(--line);
}
.wp-row:last-child { border-bottom: none; }
.wp-row.is-today {
  margin: 6px -12px;
  padding: 13px 12px;
  background: linear-gradient(180deg, #f6faff, #fdfeff);
  border: 1px solid #d9e8fd;
  border-radius: 12px;
}
.wp-row.is-weekend .wp-day b { color: var(--accent); }

.wp-day { display: grid; align-content: start; gap: 1px; padding-top: 2px; }
.wp-day b { font-size: 14px; line-height: 1.3; }
.wp-day em { font-style: normal; font-size: 11px; color: var(--ink-3); }
.wp-day-min { margin-top: 3px; font-size: 10.5px; color: var(--ink-3); }
.wp-day-done { font-size: 10.5px; font-weight: 600; color: var(--primary); }

.wp-tasks { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 9px; }
.wp-task {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: start;
  padding: 10px 12px 9px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--tk);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: box-shadow .15s ease, border-color .15s ease, opacity .15s ease;
}
.wp-task:hover { box-shadow: var(--shadow-s); border-color: var(--line-strong); border-left-color: var(--tk); }
.wp-check {
  width: 15px;
  height: 15px;
  margin: 3px 0 0;
  accent-color: var(--tk);
  cursor: pointer;
}
.wp-task-body { display: grid; gap: 2px; min-width: 0; }
.wp-kind {
  font-style: normal;
  font-size: 10px;
  font-weight: 600;
  color: var(--tk);
  background: var(--surface-2);
  background: color-mix(in srgb, var(--tk) 10%, #fff);
  border-radius: 8px;
  padding: 0 6px;
  justify-self: start;
  line-height: 1.7;
}
.wp-task-title {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--ink);
  cursor: pointer;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.wp-task-title:hover { color: var(--primary); text-decoration: underline; }
.wp-task-sub {
  font-style: normal;
  font-size: 10.5px;
  line-height: 1.5;
  color: var(--ink-3);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.wp-task-min {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink-3);
  white-space: nowrap;
  padding-top: 2px;
}
.wp-task.is-done { background: var(--surface-2); }
.wp-task.is-done .wp-task-title { text-decoration: line-through; color: var(--ink-3); font-weight: 400; }
.wp-task.is-done .wp-kind,
.wp-task.is-done .wp-task-sub,
.wp-task.is-done .wp-task-min { opacity: .55; }

.wp-rest {
  grid-column: 1 / -1;
  padding: 11px 14px;
  font-size: 11.5px;
  color: var(--ink-3);
  background: repeating-linear-gradient(135deg, #fbfcfe, #fbfcfe 6px, #f5f8fc 6px, #f5f8fc 12px);
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
}

.wp-foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 22px;
  align-items: center;
  margin-top: 14px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-s);
}
.wp-sum { display: grid; gap: 10px; }
.wp-sum-cells { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.wp-sum-cell { display: grid; gap: 1px; }
.wp-sum-cell b { font-size: 21px; line-height: 1.15; letter-spacing: -.02em; }
.wp-sum-cell span { font-size: 10.5px; color: var(--ink-3); }
.wp-sum-bar { height: 7px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.wp-sum-bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #2f6fe0, #6a4fe0); transition: width .3s ease; }
.wp-note { font-size: 11.5px; line-height: 1.75; color: var(--ink-3); }
.wp-note b { display: block; margin-bottom: 2px; font-size: 11.5px; color: var(--ink-2); }

@media (max-width: 900px) {
  .wp-foot { grid-template-columns: 1fr; gap: 14px; }
  .wp-row { grid-template-columns: 70px minmax(0, 1fr); gap: 12px; }
  .wp-tasks { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
}
@media (max-width: 600px) {
  .wp-rebuild { width: 100%; text-align: center; }
  .wp-setup { padding: 12px 13px; gap: 12px 18px; }
  .wp-set { width: 100%; flex-direction: column; align-items: flex-start; gap: 6px; }
  .wp-chips { width: 100%; }
  .wp-chip { flex: 1 1 0; min-width: 0; padding: 6px 8px 5px; }
  .wp-chip em { white-space: normal; font-size: 9.5px; }
  .wp-plan { padding: 4px 12px; }
  .wp-row { grid-template-columns: 1fr; gap: 8px; padding: 12px 0; }
  .wp-day { grid-auto-flow: column; justify-content: start; align-items: baseline; gap: 7px; }
  .wp-day b { font-size: 13px; }
  .wp-day-min { margin-top: 0; }
  .wp-tasks { grid-template-columns: 1fr; gap: 7px; }
  .wp-task { padding: 9px 10px 8px; }
  .wp-sum-cells { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .wp-foot { padding: 14px 14px; }
}

/* ---------- 打印：只留本周计划，A4 一页起 ---------- */
@media print {
  @page { size: A4 portrait; margin: 10mm 12mm; }
  html, body { background: #fff !important; }
  .site-header, .site-footer, #toastBox, .hero { display: none !important; }
  main > section:not(#weekPlan) { display: none !important; }
  main { display: block !important; }
  #weekPlan {
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #fff !important;
  }
  #weekPlan .section-head { margin-bottom: 10px; }
  #weekPlan .section-head h2 { font-size: 18pt; }
  #weekPlan .section-head p,
  #weekPlan .wp-actions,
  #weekPlan .wp-setup .wp-set,
  #weekPlan .wp-foot .wp-note { display: none !important; }
  #weekPlan .wp-setup {
    display: block;
    padding: 0 0 8px;
    margin: 0 0 8px;
    border: none;
    border-bottom: 1px solid #ccc;
    box-shadow: none;
  }
  #weekPlan .wp-meta { border: none; padding: 0; font-size: 9pt; }
  #weekPlan .wp-plan {
    padding: 0;
    border: none;
    box-shadow: none;
    background: #fff;
  }
  #weekPlan .wp-row {
    break-inside: avoid;
    page-break-inside: avoid;
    padding: 7px 0;
    gap: 10px;
    grid-template-columns: 62px minmax(0, 1fr) !important;
  }
  #weekPlan .wp-row.is-today { margin: 0; padding: 7px 0; background: none; border: none; border-radius: 0; }
  #weekPlan .wp-day b { font-size: 10pt; }
  #weekPlan .wp-day em, #weekPlan .wp-day-min, #weekPlan .wp-day-done { font-size: 8pt; }
  #weekPlan .wp-tasks { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 6px; }
  #weekPlan .wp-task {
    box-shadow: none;
    break-inside: avoid;
    page-break-inside: avoid;
    padding: 6px 8px;
    border: 1px solid #d8d8d8;
    border-left: 3px solid var(--tk);
  }
  #weekPlan .wp-task-title { font-size: 9.5pt; -webkit-line-clamp: 3; }
  #weekPlan .wp-task-sub, #weekPlan .wp-kind, #weekPlan .wp-task-min { font-size: 7.5pt; }
  #weekPlan .wp-task.is-done { opacity: .45; background: none; }
  #weekPlan .wp-rest { font-size: 8pt; padding: 6px 8px; background: none; }
  #weekPlan .wp-foot {
    margin-top: 8px;
    padding: 8px 0 0;
    border: none;
    border-top: 1px solid #ccc;
    border-radius: 0;
    box-shadow: none;
    grid-template-columns: 1fr;
    gap: 6px;
  }
  #weekPlan .wp-sum { gap: 6px; }
  #weekPlan .wp-sum-cells { display: flex; flex-wrap: wrap; gap: 8px 30px; }
  #weekPlan .wp-sum-cell { display: flex; align-items: baseline; gap: 5px; }
  #weekPlan .wp-sum-cell b { font-size: 13pt; }
  #weekPlan .wp-sum-cell span { font-size: 8pt; }
}

/* =========================================================
   官方资源直达（真实外链专区）
   ========================================================= */
#official .of-verify {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px; border-radius: 999px;
  background: #e6f7f3; color: #0f9e86;
  font-size: 13px; font-weight: 600; white-space: nowrap;
}
.of-notice {
  display: flex; gap: 10px; align-items: flex-start;
  max-width: var(--max); margin: 0 auto 20px;
  padding: 12px 16px; border: 1px solid #f0d9a8;
  background: #fffaf0; border-radius: var(--radius);
  color: #8a6420; font-size: 13px; line-height: 1.6;
}
.of-notice > span { font-size: 16px; line-height: 1.4; flex: none; }
.of-notice b { color: #6d4d12; }

.of-grid {
  max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px;
}
.of-card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px;
  box-shadow: var(--shadow-s);
  transition: transform .18s ease, box-shadow .18s ease;
}
.of-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.of-card-head { display: flex; align-items: center; gap: 12px; }
.of-icon {
  width: 44px; height: 44px; flex: none;
  display: grid; place-items: center;
  background: var(--os); border-radius: 12px; font-size: 22px;
}
.of-head-text h3 { font-size: 16px; line-height: 1.35; }
.of-org { font-size: 12px; color: var(--ink-3); }
.of-intro {
  margin: 12px 0 14px; font-size: 13px;
  color: var(--ink-2); line-height: 1.65; flex: 1;
}
.of-links { display: flex; flex-direction: column; gap: 7px; }
.of-link {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 11px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid transparent;
  transition: background .15s ease, border-color .15s ease;
}
.of-link:hover { background: var(--os); border-color: var(--oc); }
.of-link-name { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.of-link-meta { margin-left: auto; font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.of-link-go { font-size: 14px; color: var(--oc); font-weight: 700; }
.of-card-foot {
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px; margin-top: 14px; padding-top: 12px;
  border-top: 1px solid var(--line); font-size: 12px;
}
.of-card-foot span { color: var(--green); }
.of-card-foot a { color: var(--oc); font-weight: 600; }
.of-card-foot a:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .of-grid { grid-template-columns: 1fr; gap: 12px; }
  .of-card { padding: 15px; }
  .of-notice { font-size: 12.5px; }
  #official .section-head { flex-direction: row; align-items: center; }
}
