/* ============================================================
   生物研习 · Biology Study Hub
   设计系统：绿松石主色 + 分模块强调色，浅色为默认，支持深色模式
   ============================================================ */

:root {
  --font-sans: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Helvetica Neue", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Songti SC", "SimSun", Georgia, serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;

  --bg: #f6f8f7;
  --bg-soft: #eef4f1;
  --surface: #ffffff;
  --surface-2: #f9fbfa;
  --border: #dfe8e4;
  --border-strong: #c6d6cf;
  --text: #16261f;
  --text-soft: #55675f;
  --text-mute: #8396 8d;
  --text-mute: #82958c;

  --brand: #0f9b83;
  --brand-dark: #0a6f5e;
  --brand-soft: #e2f5f0;
  --accent: #ff8a3d;
  --gold: #f2b134;
  --danger: #dc4c4c;

  --grad-hero: radial-gradient(1200px 600px at 15% 10%, #d8f3ec 0%, transparent 55%),
    radial-gradient(1000px 520px at 85% 20%, #ffe9d6 0%, transparent 50%),
    radial-gradient(900px 500px at 50% 100%, #e4eefc 0%, transparent 60%), #f7faf9;
  --img-bg: linear-gradient(135deg, #eef7f4 0%, #f4f1fb 100%);

  --shadow-sm: 0 1px 2px rgba(16, 40, 32, .06), 0 1px 3px rgba(16, 40, 32, .04);
  --shadow-md: 0 4px 12px rgba(16, 40, 32, .07), 0 2px 4px rgba(16, 40, 32, .04);
  --shadow-lg: 0 18px 48px rgba(16, 40, 32, .12), 0 4px 12px rgba(16, 40, 32, .06);
  --radius: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;
  --maxw: 1180px;
  --nav-h: 62px;
}

html[data-theme="dark"] {
  --bg: #0d1512;
  --bg-soft: #121d19;
  --surface: #15201c;
  --surface-2: #1a2723;
  --border: #24352e;
  --border-strong: #33473e;
  --text: #e6f0ec;
  --text-soft: #a8bdb4;
  --text-mute: #7d948b;
  --brand: #3fd0b2;
  --brand-dark: #7fe6d1;
  --brand-soft: #16302a;
  --accent: #ff9d5c;
  --gold: #f5c45e;
  --grad-hero: radial-gradient(1200px 600px at 15% 10%, #14322c 0%, transparent 55%),
    radial-gradient(1000px 520px at 85% 20%, #33241a 0%, transparent 50%),
    radial-gradient(900px 500px at 50% 100%, #16243a 0%, transparent 60%), #0d1512;
  --img-bg: linear-gradient(135deg, #16241f 0%, #1b1e2e 100%);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, .45);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, .55);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  transition: background .3s ease, color .3s ease;
}

img { max-width: 100%; display: block; }
a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.3; margin: 0 0 .5em; letter-spacing: -.01em; }
p { margin: 0 0 1em; }

.wrap { width: min(100% - 40px, var(--maxw)); margin-inline: auto; }

/* ── 顶部导航 ─────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { height: 100%; display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.06rem; color: var(--text); letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), #4cc9a8 60%, var(--accent));
  color: #fff; font-size: 1.05rem; box-shadow: var(--shadow-sm);
}
.nav-links { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav-links a {
  padding: 7px 13px; border-radius: var(--radius-pill); color: var(--text-soft);
  font-size: .93rem; font-weight: 600; transition: .2s;
}
.nav-links a:hover { background: var(--brand-soft); color: var(--brand-dark); text-decoration: none; }
.nav-links a.active { background: var(--brand); color: #fff; }
html[data-theme="dark"] .nav-links a.active { color: #08211c; }

.icon-btn {
  width: 36px; height: 36px; border-radius: 11px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-soft); cursor: pointer; font-size: 1rem;
  display: grid; place-items: center; transition: .2s;
}
.icon-btn:hover { border-color: var(--brand); color: var(--brand-dark); transform: translateY(-1px); }
.nav-toggle { display: none; }

/* ── 搜索面板 ─────────────────────────────── */
.search-panel {
  position: fixed; inset: 0; z-index: 200; background: rgba(8, 20, 16, .55);
  backdrop-filter: blur(4px); display: none; padding: 12vh 20px 20px;
}
.search-panel.open { display: block; }
.search-box {
  width: min(640px, 100%); margin: 0 auto; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden;
}
.search-input {
  width: 100%; border: 0; outline: 0; padding: 18px 22px; font-size: 1.05rem;
  font-family: inherit; background: transparent; color: var(--text);
}
.search-results { max-height: 52vh; overflow-y: auto; border-top: 1px solid var(--border); }
.search-results:empty { display: none; }
.sr-item { padding: 12px 20px; border-bottom: 1px solid var(--border); display: block; color: inherit; }
.sr-item:last-child { border-bottom: 0; }
.sr-item:hover, .sr-item.sel { background: var(--brand-soft); text-decoration: none; }
.sr-title { font-weight: 700; font-size: .96rem; }
.sr-title mark { background: color-mix(in srgb, var(--gold) 45%, transparent); color: inherit; border-radius: 3px; padding: 0 2px; }
.sr-kind { font-size: .74rem; color: var(--text-mute); text-transform: uppercase; letter-spacing: .06em; }
.sr-snippet { font-size: .87rem; color: var(--text-soft); margin-top: 2px; }

/* ── Hero ────────────────────────────────── */
.hero { position: relative; overflow: hidden; background: var(--grad-hero); padding: 76px 0 64px; }
.hero::after {
  content: ""; position: absolute; inset: auto 0 -1px 0; height: 60px;
  background: linear-gradient(to bottom, transparent, var(--bg));
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 54px; align-items: center; position: relative; z-index: 1; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 15px; border-radius: var(--radius-pill);
  background: var(--surface); border: 1px solid var(--border-strong); color: var(--brand-dark);
  font-size: .82rem; font-weight: 700; letter-spacing: .04em; box-shadow: var(--shadow-sm);
}
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.35rem); font-weight: 850; margin: 18px 0 14px; letter-spacing: -.03em; }
.hero h1 .grad { background: linear-gradient(120deg, var(--brand), #38bdf8 45%, var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-lead { font-size: 1.09rem; color: var(--text-soft); max-width: 56ch; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 26px 0 22px; }
.hero-stats { display: flex; gap: 30px; flex-wrap: wrap; padding-top: 18px; border-top: 1px dashed var(--border-strong); }
.hero-stats div b { display: block; font-size: 1.65rem; font-weight: 800; color: var(--brand-dark); line-height: 1.2; }
.hero-stats div span { font-size: .84rem; color: var(--text-mute); }

.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px; border-radius: var(--radius-pill);
  font-weight: 700; font-size: .95rem; border: 1px solid transparent; cursor: pointer; transition: .22s;
  font-family: inherit;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: linear-gradient(135deg, var(--brand), #35b59c); color: #fff; box-shadow: 0 8px 22px color-mix(in srgb, var(--brand) 32%, transparent); }
html[data-theme="dark"] .btn-primary { color: #06231d; }
.btn-ghost { background: var(--surface); border-color: var(--border-strong); color: var(--text); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand-dark); }

.hero-visual { position: relative; }
.hero-collage { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 132px 132px; gap: 12px; }
.hero-collage figure { margin: 0; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-md); position: relative; }
.hero-collage img { width: 100%; height: 100%; object-fit: cover; }
.hero-collage figure.is-diagram img { object-fit: contain; padding: 10px; background: var(--img-bg); }
.hero-collage figure:first-child { grid-column: span 2; height: 100%; }
.hero-collage figure::after {
  content: ""; position: absolute; inset: 0; background: linear-gradient(200deg, transparent 55%, rgba(0, 0, 0, .35));
}
.hero-blob {
  position: absolute; inset: -18px -18px 28px 28px; border-radius: 50% 42% 55% 45%;
  background: conic-gradient(from 140deg, #34d399, #38bdf8, #fbbf24, #fb7185, #34d399);
  filter: blur(42px); opacity: .32; z-index: -1;
}
.float-card {
  position: absolute; right: -14px; bottom: -18px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 16px; padding: 12px 16px; box-shadow: var(--shadow-lg);
  display: flex; gap: 11px; align-items: center; max-width: 250px;
}
.float-card b { font-size: .88rem; display: block; }
.float-card small { color: var(--text-mute); font-size: .78rem; }

/* ── 通用区块 ─────────────────────────────── */
.section { padding: 74px 0; }
.section-head { max-width: 60ch; margin-bottom: 38px; }
.section-head .kicker {
  font-size: .78rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
  color: var(--brand); margin-bottom: 10px;
}
.section-head h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); font-weight: 820; letter-spacing: -.02em; }
.section-head p { color: var(--text-soft); margin: 0; }
.section.alt { background: var(--bg-soft); }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); transition: .25s;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }

/* ── 模块卡片 ─────────────────────────────── */
.mod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.mod-card { overflow: hidden; display: flex; flex-direction: column; color: inherit; }
.mod-card:hover { text-decoration: none; }
.mod-cover { position: relative; height: 176px; overflow: hidden; background: var(--surface-2); }
.mod-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
/* SVG 示意图：完整显示 + 浅底，不做裁切与缩放 */
.mod-cover.is-diagram img { object-fit: contain; padding: 14px 14px 26px; background: var(--img-bg); }
.mod-cover.is-diagram::after { background: linear-gradient(to top, rgba(6, 22, 18, .55), rgba(6, 22, 18, 0) 65%); }
.mod-card:hover .mod-cover.is-diagram img { transform: none; }
.mod-card:hover .mod-cover img { transform: scale(1.07); }
.mod-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(6, 22, 18, .82), rgba(6, 22, 18, .12) 60%); }
.mod-badge {
  position: absolute; top: 12px; left: 12px; z-index: 2; padding: 5px 12px; border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, .92); color: #16261f; font-size: .74rem; font-weight: 800; letter-spacing: .04em;
}
.mod-icon {
  position: absolute; bottom: -22px; left: 18px; z-index: 2; width: 52px; height: 52px; border-radius: 16px;
  display: grid; place-items: center; font-size: 1.5rem; background: var(--surface);
  border: 1px solid var(--border); box-shadow: var(--shadow-md);
}
.mod-body { padding: 34px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.mod-body h3 { font-size: 1.14rem; font-weight: 780; margin-bottom: 2px; }
.mod-en { font-size: .76rem; color: var(--text-mute); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 9px; }
.mod-tag { font-size: .87rem; color: var(--text-soft); margin-bottom: 14px; }
.mod-foot {
  margin-top: auto; padding-top: 13px; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; font-size: .8rem; color: var(--text-mute);
}
.mod-foot .go { color: var(--brand-dark); font-weight: 700; }

/* ── 学习路径 ─────────────────────────────── */
.path-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 30px; }
.path-tab {
  padding: 9px 18px; border-radius: var(--radius-pill); border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text-soft); font-weight: 700; font-size: .9rem; cursor: pointer;
  font-family: inherit; transition: .2s;
}
.path-tab:hover { border-color: var(--brand); color: var(--brand-dark); }
.path-tab.active { background: var(--brand); border-color: var(--brand); color: #fff; }
html[data-theme="dark"] .path-tab.active { color: #06231d; }
.path-body { display: grid; grid-template-columns: 300px 1fr; gap: 26px; align-items: start; }
.path-info h3 { font-size: 1.3rem; margin-bottom: 6px; }
.path-info .lvl {
  display: inline-block; padding: 3px 11px; border-radius: var(--radius-pill); background: var(--brand-soft);
  color: var(--brand-dark); font-size: .76rem; font-weight: 800; margin-bottom: 12px;
}
.path-info p { color: var(--text-soft); font-size: .93rem; }
.path-steps { display: flex; flex-direction: column; gap: 12px; }
.path-step {
  display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: center;
  padding: 15px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.path-step .n {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), #4cc9a8); color: #fff; font-weight: 800; font-size: .9rem;
}
html[data-theme="dark"] .path-step .n { color: #06231d; }
.path-step b { display: block; font-size: .98rem; }
.path-step span { font-size: .85rem; color: var(--text-soft); }

/* ── 模块详情页 ───────────────────────────── */
.mod-hero { position: relative; padding: 56px 0 52px; overflow: hidden; }
.mod-hero-bg { position: absolute; inset: 0; opacity: .22; }
.mod-hero-bg img { width: 100%; height: 100%; object-fit: cover; }
/* 示意图作背景时压成柔和纹理，避免标注文字浮在标题旁 */
.mod-hero-bg.is-diagram { opacity: .14; }
.mod-hero-bg.is-diagram img { filter: blur(3px) saturate(1.1); transform: scale(1.06); }
.mod-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 10%, var(--bg) 96%); }
.mod-hero-inner { position: relative; z-index: 2; }
.crumb { font-size: .84rem; color: var(--text-mute); margin-bottom: 16px; }
.crumb a { color: var(--text-soft); }
.mod-hero h1 { font-size: clamp(1.9rem, 4.4vw, 2.9rem); font-weight: 850; letter-spacing: -.025em; }
.mod-hero .sub { color: var(--text-soft); font-size: 1.03rem; max-width: 62ch; }
.hero-tags { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 18px; }
.chip {
  padding: 5px 14px; border-radius: var(--radius-pill); background: var(--surface); border: 1px solid var(--border);
  font-size: .82rem; font-weight: 650; color: var(--text-soft); box-shadow: var(--shadow-sm);
}

.obj-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.obj-item {
  display: flex; gap: 11px; padding: 14px 16px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); font-size: .93rem;
}
.obj-item .tick { color: var(--brand); font-weight: 900; flex: none; }

.concept { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-bottom: 26px; overflow: hidden; }
.concept:nth-child(even) .concept-media { order: 2; }
.concept-media { min-height: 268px; position: relative; background: var(--surface-2); }
.concept-media img { width: 100%; height: 100%; object-fit: cover; }
.concept-media.is-diagram { background: var(--img-bg); }
.concept-media.is-diagram img { object-fit: contain; padding: 16px; }
.concept-body { padding: 28px 30px; }
.concept-tag {
  display: inline-block; padding: 4px 12px; border-radius: var(--radius-pill);
  background: var(--brand-soft); color: var(--brand-dark); font-size: .74rem; font-weight: 800; margin-bottom: 10px;
}
.concept-body h3 { font-size: 1.16rem; font-weight: 780; }
.concept-body p { font-size: .95rem; color: var(--text-soft); margin: 0; }

/* ── 图集 ────────────────────────────────── */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.gal-item {
  border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--border);
  cursor: zoom-in; position: relative; transition: .25s;
}
.gal-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.gal-item img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.gal-item.is-diagram img { object-fit: contain; padding: 12px; background: var(--img-bg); }
.gal-cap { padding: 11px 13px 13px; font-size: .83rem; color: var(--text-soft); line-height: 1.6; }
.gal-credit {
  padding: 0 13px 12px; font-size: .7rem; color: var(--text-mute);
  display: flex; gap: 6px; flex-wrap: wrap; align-items: center;
}
.gal-credit a { color: var(--text-mute); text-decoration: underline; }
.badge-license {
  padding: 1px 7px; border-radius: 5px; background: var(--bg-soft); border: 1px solid var(--border);
  font-size: .68rem; font-weight: 700;
}

/* 灯箱 */
.lightbox {
  position: fixed; inset: 0; z-index: 300; background: rgba(6, 16, 13, .93); display: none;
  flex-direction: column; padding: 22px; overflow-y: auto;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: min(1100px, 100%); max-height: 76vh; margin: 0 auto; border-radius: 12px; object-fit: contain; }
.lb-bar { max-width: min(1100px, 100%); margin: 0 auto; width: 100%; color: #e6f0ec; }
.lb-title { font-size: 1.05rem; font-weight: 700; margin: 14px 0 4px; }
.lb-desc { font-size: .88rem; color: #a8bdb4; }
.lb-credit { font-size: .78rem; color: #7d948b; margin-top: 8px; }
.lb-credit a { color: #7fe6d1; }
.lb-close {
  position: fixed; top: 18px; right: 20px; width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .08); color: #fff;
  font-size: 1.2rem; cursor: pointer; display: grid; place-items: center;
}
.lb-nav {
  position: fixed; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .08); color: #fff; font-size: 1.3rem; cursor: pointer;
}
.lb-prev { left: 20px; } .lb-next { right: 20px; }

/* ── 术语 / 误区 / 自测 ─────────────────────── */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: start; }
.panel { padding: 26px 28px; }
.panel h3 { font-size: 1.1rem; display: flex; align-items: center; gap: 8px; }
.term-list { display: flex; flex-direction: column; gap: 2px; }
.term-row { padding: 11px 0; border-bottom: 1px dashed var(--border); }
.term-row:last-child { border-bottom: 0; }
.term-row b { color: var(--brand-dark); font-size: .95rem; }
.term-row span { display: block; font-size: .87rem; color: var(--text-soft); }

.qa-item { border-bottom: 1px solid var(--border); }
.qa-q {
  width: 100%; text-align: left; background: none; border: 0; padding: 15px 30px 15px 0; cursor: pointer;
  font-family: inherit; font-size: .96rem; font-weight: 700; color: var(--text); position: relative;
}
.qa-q::after {
  content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  font-size: 1.3rem; color: var(--brand); font-weight: 400; transition: .25s;
}
.qa-item.open .qa-q::after { content: "−"; }
.qa-a { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.qa-a p { padding: 0 0 16px; font-size: .91rem; color: var(--text-soft); margin: 0; }

.quiz-item { padding: 20px 0; border-bottom: 1px solid var(--border); }
.quiz-item:last-child { border-bottom: 0; }
.quiz-q { font-weight: 700; font-size: 1rem; margin-bottom: 12px; display: flex; gap: 10px; }
.quiz-q .qn {
  flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-dark);
  display: grid; place-items: center; font-size: .8rem; font-weight: 800;
}
.opt {
  display: flex; align-items: center; gap: 11px; padding: 11px 15px; border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 8px; cursor: pointer; font-size: .93rem; transition: .2s;
  background: var(--surface-2);
}
.opt:hover { border-color: var(--brand); background: var(--brand-soft); }
.opt .marker {
  flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--border-strong);
  display: grid; place-items: center; font-size: .72rem; font-weight: 800; color: var(--text-mute);
}
.opt.correct { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, transparent); }
.opt.correct .marker { background: var(--brand); border-color: var(--brand); color: #fff; }
html[data-theme="dark"] .opt.correct .marker { color: #06231d; }
.opt.wrong { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); }
.opt.wrong .marker { background: var(--danger); border-color: var(--danger); color: #fff; }
.opt.locked { cursor: default; }
.quiz-feedback { font-size: .89rem; margin-top: 10px; padding: 12px 15px; border-radius: var(--radius); background: var(--bg-soft); color: var(--text-soft); display: none; }
.quiz-feedback.show { display: block; }
.quiz-score {
  margin-top: 20px; padding: 16px 20px; border-radius: var(--radius); background: var(--brand-soft);
  color: var(--brand-dark); font-weight: 700; display: none;
}
.quiz-score.show { display: block; }

.read-more { display: flex; flex-wrap: wrap; gap: 12px; }
.read-more a {
  padding: 11px 18px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface);
  font-size: .9rem; font-weight: 650; color: var(--text); box-shadow: var(--shadow-sm); transition: .2s;
}
.read-more a:hover { border-color: var(--brand); color: var(--brand-dark); text-decoration: none; transform: translateY(-2px); }

/* ── 进度条 ─────────────────────────────── */
.progress-wrap { display: flex; align-items: center; gap: 14px; margin: 20px 0 8px; }
.progress-track { flex: 1; height: 8px; border-radius: 99px; background: var(--bg-soft); overflow: hidden; }
.progress-fill { height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--brand), var(--accent)); transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.progress-label { font-size: .84rem; color: var(--text-mute); font-weight: 700; white-space: nowrap; }
.master-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-soft);
  font-size: .85rem; font-weight: 700; cursor: pointer; font-family: inherit; transition: .2s;
}
.master-btn:hover { border-color: var(--brand); color: var(--brand-dark); }
.master-btn.on { background: var(--brand); border-color: var(--brand); color: #fff; }
html[data-theme="dark"] .master-btn.on { color: #06231d; }

/* ── 交互实验室 ───────────────────────────── */
.lab-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 22px; }
.lab-card { padding: 22px 24px 26px; }
.lab-card h3 { font-size: 1.06rem; display: flex; align-items: center; gap: 9px; }
.lab-card > p { font-size: .89rem; color: var(--text-soft); }

/* 细胞器探索 */
.org-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 16px 0; }
.org {
  aspect-ratio: 1; border-radius: 12px; display: grid; place-items: center; font-size: 1.5rem; cursor: pointer;
  border: 2px solid transparent; transition: .2s; background: var(--surface-2);
}
.org:hover { transform: scale(1.06); }
.org.active { border-color: var(--brand); background: var(--brand-soft); }
.org-info { min-height: 96px; padding: 14px 16px; background: var(--bg-soft); border-radius: var(--radius); font-size: .89rem; }
.org-info b { display: block; color: var(--brand-dark); font-size: .98rem; margin-bottom: 3px; }

/* DNA 配对游戏 */
.dna-game { display: flex; flex-direction: column; gap: 10px; }
.dna-slot {
  min-height: 50px; border: 2px dashed var(--border-strong); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center; gap: 7px; padding: 8px; transition: .2s;
  background: var(--surface-2);
}
.dna-slot.right { border-style: solid; border-color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, transparent); }
.dna-slot.wrong { border-style: solid; border-color: var(--danger); }
.base-chip {
  width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-weight: 800;
  color: #fff; cursor: grab; user-select: none; font-size: 1rem; font-family: var(--font-mono);
}
.base-chip:active { cursor: grabbing; }
.b-A { background: linear-gradient(135deg, #10b981, #059669); }
.b-T { background: linear-gradient(135deg, #f59e0b, #d97706); }
.b-C { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.b-G { background: linear-gradient(135deg, #ec4899, #db2777); }
.pool { display: flex; gap: 8px; flex-wrap: wrap; }

/* 孟德尔计算器 */
.pun-grid { display: grid; grid-template-columns: repeat(3, 52px); gap: 5px; margin: 14px 0; }
.pun-cell {
  aspect-ratio: 1; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 9px;
  font-size: .86rem; font-weight: 700; background: var(--surface-2); font-family: var(--font-mono);
}
.pun-cell.h { background: var(--brand-soft); color: var(--brand-dark); }
.pun-cell.empty { background: transparent; border-style: dashed; }
.ctrl-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; font-size: .89rem; }
.ctrl-row input[type=range] { flex: 1; accent-color: var(--brand); }
.ctrl-row output { font-weight: 800; color: var(--brand-dark); min-width: 56px; text-align: right; font-family: var(--font-mono); }

/* 酶曲线 */
.curve-wrap { position: relative; margin-top: 10px; }
.curve-wrap svg { width: 100%; height: auto; }
.axis { stroke: var(--border-strong); stroke-width: 1.5; }
.curve { fill: none; stroke: var(--brand); stroke-width: 3; }
.curve-2 { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-dasharray: 5 4; }

/* 分类树 */
.tree-node { cursor: pointer; }
.tree-label { font-size: 11px; font-weight: 700; fill: var(--text); }
.tree-sub { font-size: 9.5px; fill: var(--text-mute); }

/* ── 术语表页 ─────────────────────────────── */
.gloss-tools { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 24px; }
.gloss-search {
  flex: 1; min-width: 240px; padding: 11px 16px; border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong); background: var(--surface); font-family: inherit; font-size: .93rem;
  color: var(--text); outline: 0;
}
.gloss-search:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.alpha-bar { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 20px; }
.alpha-bar button {
  width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text-soft); font-weight: 700; font-size: .82rem; cursor: pointer; font-family: inherit; transition: .18s;
}
.alpha-bar button:hover, .alpha-bar button.active { background: var(--brand); border-color: var(--brand); color: #fff; }
html[data-theme="dark"] .alpha-bar button.active { color: #06231d; }
.gloss-group, .credit-group { margin-bottom: 30px; }
.gloss-group h3,
.credit-group h3 {
  font-size: 1rem; color: var(--brand-dark); border-bottom: 2px solid var(--brand-soft);
  padding-bottom: 7px; margin-bottom: 12px;
}
.gloss-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.gloss-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.gloss-table tr:hover td { background: var(--surface-2); }
.gloss-table td:first-child { width: 190px; font-weight: 700; color: var(--brand-dark); }

/* ── 页脚 ────────────────────────────────── */
.footer { background: var(--surface); border-top: 1px solid var(--border); padding: 52px 0 28px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 36px; }
.footer h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .12em; color: var(--text-mute); margin-bottom: 14px; }
.footer p { font-size: .88rem; color: var(--text-soft); }
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.footer li a { font-size: .89rem; color: var(--text-soft); }
.footer-contact {
  display: inline-flex; align-items: center; gap: 9px; margin-top: 6px; padding: 9px 16px;
  border-radius: var(--radius-pill); background: var(--brand-soft); color: var(--brand-dark);
  font-weight: 700; font-size: .92rem; border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent);
}
.footer-contact:hover { text-decoration: none; border-color: var(--brand); }
.footer-bottom {
  margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  font-size: .8rem; color: var(--text-mute);
}

/* ── 响应式 ─────────────────────────────── */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 38px; }
  .hero-visual { order: -1; }
  .path-body { grid-template-columns: 1fr; }
  .concept { grid-template-columns: 1fr; }
  .concept:nth-child(even) .concept-media { order: 0; }
  .concept-media { min-height: 220px; }
  .two-col { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nav-links {
    position: fixed; inset: var(--nav-h) 0 auto 0; flex-direction: column; align-items: stretch;
    background: var(--surface); border-bottom: 1px solid var(--border); padding: 12px 20px 18px; gap: 2px;
    display: none; box-shadow: var(--shadow-lg);
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: grid; margin-left: auto; }
  .nav-links .icon-btn { position: absolute; right: 20px; top: 14px; }
  .wrap { width: calc(100% - 32px); }
  .section { padding: 54px 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .org-grid { grid-template-columns: repeat(4, 1fr); }
  .lb-nav { width: 38px; height: 38px; }
  .lb-prev { left: 8px; } .lb-next { right: 8px; }
}

/* ── 动效 ────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .8, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* 打印 */
@media print {
  .nav, .footer, .btn, .quiz-item, .lightbox, .search-panel { display: none !important; }
  body { background: #fff; }
}
