/* ==========================================================================
   Mouseion 慕识书院 — 网站设计系统
   色彩 / 字体 / 标识规范 均取自《慕识书院品牌指导手册》(welldesign, 2021)
   --------------------------------------------------------------------------
   品牌主色      Pantone BLACK 6C  #221814   辅助色 Pantone 7562C #C9A865
   品牌专色      Pantone 7406C #F4C404 / 7480C #00BC74 / 279C #3D8CDC / 1645C #FC6C34
   辅助色系      #C3CBD0 / #FBCF00 / #F4DB8C / #F8EAA3
   专用字形      中文 HarmonyOS Sans SC   英文 Futura Condensed Medium
   ========================================================================== */

/* ---------- 1. 设计令牌 ---------- */
:root {
  /* 墨色与纸色 */
  --ink: #221814;
  --ink-2: #4a423c;
  --ink-3: #6f665e;
  --paper: #fbfbf7;
  --paper-2: #f4f4ec;
  --paper-3: #f8f8f0;
  --surface: #ffffff;
  --line: #e4e1d6;
  --line-2: #efece3;

  /* 品牌主色 */
  --slate: #244c5c;
  --slate-2: #1b3a47;
  --slate-3: #35657a;
  --bronze: #c9a865;
  --bronze-ink: #8a6a2e;
  --gold: #f4c404;
  --gold-deep: #d9a800;
  --gold-soft: #f4db8c;
  --gold-pale: #f8eaa3;
  --yellow: #fbcf00;
  --grey-cool: #c3cbd0;

  /* 四大阅读领域 */
  --domain-sci: #00bc74;
  --domain-life: #f4c404;
  --domain-social: #3d8cdc;
  --domain-art: #fc6c34;

  /* 字体 */
  --font-sans: "HarmonyOS Sans SC", "PingFang SC", "Hiragino Sans GB",
    "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei", system-ui,
    -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-disp: "Futura Condensed Medium", "Futura Condensed", "Futura",
    "Avenir Next Condensed", "Helvetica Neue", var(--font-sans);

  /* 尺寸与节奏 */
  --wrap: 1220px;
  --wrap-narrow: 860px;
  --pad: clamp(20px, 5vw, 44px);
  --sec-y: clamp(60px, 8.5vw, 116px);
  --gap: clamp(16px, 2.4vw, 28px);
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 26px;
  --r-xl: 36px;
  --r-pill: 999px;
  --shadow-1: 0 1px 2px rgba(34, 24, 20, 0.05), 0 8px 24px -14px rgba(34, 24, 20, 0.16);
  --shadow-2: 0 2px 6px rgba(34, 24, 20, 0.06), 0 24px 48px -26px rgba(34, 24, 20, 0.28);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  --header-h: 68px;
}

/* ---------- 2. 基础重置 ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 18px);
  /* clip 而非 hidden：不会创建滚动容器，避免破坏 sticky 定位 */
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: clamp(0.95rem, 0.9rem + 0.22vw, 1.0625rem);
  line-height: 1.78;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img,
svg,
video {
  max-width: 100%;
  display: block;
}

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 700;
  line-height: 1.24;
  letter-spacing: -0.005em;
  text-wrap: balance;
}

p {
  margin: 0;
}

:focus-visible {
  outline: 3px solid var(--slate);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: var(--gold-soft);
  color: var(--ink);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--ink);
  color: #fff;
  padding: 12px 20px;
  border-radius: 0 0 var(--r-sm) 0;
}

.skip:focus {
  left: 0;
}

/* ---------- 3. 排版元件 ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.wrap--narrow {
  max-width: var(--wrap-narrow);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-disp);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bronze-ink);
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--gold);
  flex: none;
}

.eyebrow--plain::before {
  display: none;
}

.eyebrow--light {
  color: var(--gold-pale);
}

.display {
  font-size: clamp(1.95rem, 1.15rem + 3.9vw, 3.6rem);
  line-height: 1.18;
  font-weight: 700;
}

/* 高亮不使用绝对定位下划线：改用逐行背景带，换行时每一行都有底色 */
.display em {
  font-style: normal;
  background-image: linear-gradient(var(--gold-soft), var(--gold-soft));
  background-repeat: no-repeat;
  background-size: 100% 0.3em;
  background-position: 0 0.94em;
}

.h2 {
  font-size: clamp(1.5rem, 1.05rem + 1.9vw, 2.3rem);
  line-height: 1.25;
}

.h3 {
  font-size: clamp(1.12rem, 1rem + 0.55vw, 1.375rem);
}

.h4 {
  font-size: 1.0625rem;
}

.lead {
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.15rem);
  line-height: 1.85;
  color: var(--ink-2);
}

.muted {
  color: var(--ink-3);
}

.small {
  font-size: 0.875rem;
  line-height: 1.7;
}

.mono-en {
  font-family: var(--font-disp);
  letter-spacing: 0.06em;
}

.quote {
  font-size: clamp(1.05rem, 0.98rem + 0.5vw, 1.3rem);
  line-height: 1.75;
  color: var(--slate);
}

.quote cite {
  display: block;
  margin-top: 12px;
  font-size: 0.85rem;
  font-style: normal;
  color: var(--ink-3);
  font-family: var(--font-disp);
  letter-spacing: 0.08em;
}

.mark {
  background: linear-gradient(transparent 62%, var(--gold-soft) 62%);
  padding-inline: 2px;
}

/* ---------- 4. 段落与区块 ---------- */
.section {
  padding-block: var(--sec-y);
  position: relative;
}

.section--tint {
  background: var(--paper-2);
}

.section--paper3 {
  background: var(--paper-3);
}

.section--tight {
  padding-block: clamp(40px, 5vw, 68px);
}

.section--dark {
  background: var(--slate);
  color: #f3f1ea;
}

.section--dark .lead,
.section--dark .muted {
  color: #cdd8dd;
}

.section--dark .eyebrow {
  color: var(--gold-pale);
}

.section--ink {
  background: var(--ink);
  color: #f3f1ea;
}

.section__head {
  max-width: 760px;
  margin-bottom: clamp(30px, 4vw, 54px);
}

.section__head--center {
  margin-inline: auto;
  text-align: center;
}

.section__head .h2 {
  margin-top: 14px;
}

.section__head .lead {
  margin-top: 16px;
}

.head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: clamp(26px, 3.4vw, 46px);
}

.head-row .section__head {
  margin-bottom: 0;
}

/* 扇贝缺角圆形 —— 空间设计语言（MOUSEION 博学园 / 扇贝曲线） */
.scallop {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  background: conic-gradient(from 200deg, currentColor 0 340deg, transparent 340deg 360deg);
  opacity: 0.1;
  z-index: 0;
}

.section > .wrap {
  position: relative;
  z-index: 1;
}

.arc-divider {
  height: 1px;
  background: var(--line);
  position: relative;
}

.arc-divider::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: var(--gold);
}

/* ---------- 5. 按钮 ---------- */
.btn {
  --btn-bg: var(--ink);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.3;
  text-align: center;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease),
    background-color 0.18s var(--ease), border-color 0.18s var(--ease),
    color 0.18s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-1);
}

.btn:active {
  transform: translateY(0);
}

.btn--gold {
  --btn-bg: var(--gold);
  --btn-fg: var(--ink);
}

.btn--gold:hover {
  --btn-bg: var(--gold-deep);
}

.btn--slate {
  --btn-bg: var(--slate);
  --btn-fg: #fff;
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  border-color: var(--line);
}

.btn--ghost:hover {
  --btn-bg: #fff;
  border-color: var(--bronze);
}

.btn--onDark {
  --btn-bg: transparent;
  --btn-fg: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}

.btn--onDark:hover {
  --btn-bg: rgba(255, 255, 255, 0.12);
}

.btn--sm {
  min-height: 40px;
  padding: 9px 18px;
  font-size: 0.875rem;
}

.btn--block {
  width: 100%;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.textlink {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--slate);
  border-bottom: 1.5px solid var(--gold);
  padding-bottom: 2px;
  transition: gap 0.18s var(--ease);
}

.textlink:hover {
  gap: 11px;
}

.textlink--light {
  color: var(--gold-pale);
}

/* ---------- 6. 顶栏与导航 ---------- */
.topbar {
  background: var(--ink);
  color: #e8e4dc;
  font-size: 0.8125rem;
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 38px;
  padding-block: 6px;
}

.topbar a:hover {
  color: var(--gold-pale);
}

.topbar__meta {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.topbar__item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.siteheader {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 251, 247, 0.9);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.siteheader.is-stuck {
  border-bottom-color: var(--line-2);
  background: rgba(251, 251, 247, 0.97);
}

.siteheader__inner {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  flex: none;
}

.brand img {
  height: 30px;
  width: auto;
}

.nav {
  margin-left: auto;
  display: none;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav__link {
  display: block;
  padding: 9px 13px;
  border-radius: var(--r-pill);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--ink-2);
  transition: background-color 0.16s var(--ease), color 0.16s var(--ease);
}

/* 导航文字按语意分组：空间不足时只在词组之间换行（如「成长 / 路径」） */
.nav-seg {
  display: inline-block;
  white-space: nowrap;
}

.nav__link:hover {
  background: rgba(34, 24, 20, 0.06);
  color: var(--ink);
}

.nav__link[aria-current="page"] {
  color: var(--ink);
  font-weight: 700;
  box-shadow: inset 0 -2px 0 var(--gold);
  border-radius: 4px;
}

.siteheader__cta {
  margin-left: auto;
  display: none;
}

.navtoggle {
  margin-left: auto;
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.navtoggle span {
  position: relative;
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  display: block;
}

.navtoggle span::before,
.navtoggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.22s var(--ease), top 0.22s var(--ease);
}

.navtoggle span::before {
  top: -6px;
}

.navtoggle span::after {
  top: 6px;
}

.navtoggle[aria-expanded="true"] span {
  background: transparent;
}

.navtoggle[aria-expanded="true"] span::before {
  top: 0;
  transform: rotate(45deg);
}

.navtoggle[aria-expanded="true"] span::after {
  top: 0;
  transform: rotate(-45deg);
}

/* 移动端抽屉 */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: var(--paper);
  padding: calc(var(--header-h) + 20px) var(--pad) 40px;
  overflow-y: auto;
  display: grid;
  align-content: start;
  gap: 8px;
  transform: translateY(-8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease),
    visibility 0.22s;
}

.drawer.is-open {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

.drawer__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 4px;
  border-bottom: 1px solid var(--line-2);
  font-size: 1.0625rem;
  font-weight: 600;
}

.drawer__link[aria-current="page"] {
  color: var(--slate);
}

.drawer__link::after {
  content: "→";
  color: var(--bronze);
  font-weight: 400;
}

.drawer__foot {
  margin-top: 26px;
  display: grid;
  gap: 12px;
}

body.is-locked {
  overflow: hidden;
}

/* ---------- 7. 首页 Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(38px, 6vw, 84px) clamp(50px, 7vw, 96px);
  background: linear-gradient(180deg, var(--paper-3) 0%, var(--paper) 62%);
}

.hero__grid {
  display: grid;
  gap: clamp(30px, 4vw, 56px);
  align-items: center;
}

.hero__copy .display {
  margin-top: 18px;
}

.hero__copy .lead {
  margin-top: 20px;
  max-width: 34em;
}

.hero .btn-row {
  margin-top: 28px;
}

.hero__note {
  margin-top: 18px;
}

.hero__media {
  position: relative;
}

.hero__collage {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  grid-template-rows: auto auto;
  gap: 12px;
}

.hero__collage .media:first-child {
  grid-row: span 2;
}

.hero__badge {
  position: absolute;
  left: -6px;
  bottom: 18px;
  background: #fff;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-2);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 260px;
}

.hero__badge strong {
  display: block;
  font-size: 1.05rem;
  line-height: 1.2;
}

.hero__badge span {
  font-size: 0.78rem;
  color: var(--ink-3);
}

.arcmark {
  position: absolute;
  width: clamp(180px, 26vw, 320px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, var(--gold-soft) 0 30%, transparent 31%),
    radial-gradient(circle at 50% 50%, transparent 0 46%, var(--gold-pale) 46% 60%, transparent 61%);
  opacity: 0.5;
  right: -8%;
  top: -14%;
  z-index: 0;
  pointer-events: none;
}

/* 数据条 */
.stats {
  display: grid;
  gap: 2px;
  background: var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stat {
  background: var(--paper);
  padding: 20px 18px;
}

.stat__num {
  font-family: var(--font-disp);
  font-size: clamp(1.5rem, 1.2rem + 1.1vw, 2rem);
  font-weight: 600;
  line-height: 1.1;
  color: var(--slate);
}

.stat__num sup {
  font-size: 0.5em;
  top: -0.6em;
}

.stat__label {
  margin-top: 6px;
  font-size: 0.8125rem;
  color: var(--ink-3);
  line-height: 1.5;
}

/* ---------- 8. 媒体与图集 ---------- */
.media {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-md);
  background: var(--paper-2);
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.media--r16 {
  aspect-ratio: 16 / 10;
}

.media--r43 {
  aspect-ratio: 4 / 3;
}

.media--r11 {
  aspect-ratio: 1 / 1;
}

.media--r34 {
  aspect-ratio: 3 / 4;
}

.media--r59 {
  aspect-ratio: 5 / 9;
}

.media--wide {
  aspect-ratio: 21 / 9;
}

a.media:hover img,
.media--zoom:hover img {
  transform: scale(1.045);
}

.gallery {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gallery .media:nth-child(1) {
  grid-column: span 2;
}

.gallery__cap {
  font-size: 0.8125rem;
  color: var(--ink-3);
  margin-top: 2px;
}

/* ---------- 9. 卡片与栅格 ---------- */
.grid {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
}

.grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}

.grid--4 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
}

.grid--6 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  padding: clamp(20px, 2.4vw, 30px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease),
    border-color 0.22s var(--ease);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-1);
  border-color: var(--line);
}

.card > * {
  min-width: 0;
}

.card--flat {
  background: var(--paper);
}

.card--flush {
  padding: 0;
  overflow: hidden;
}

.card--flush .card__body {
  padding: clamp(18px, 2vw, 24px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.card--accent {
  border-color: transparent;
  box-shadow: inset 0 3px 0 var(--gold);
}

.card__num {
  font-family: var(--font-disp);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  color: var(--bronze-ink);
}

.card__title {
  font-size: 1.0625rem;
  font-weight: 700;
}

.card__body-text {
  font-size: 0.9375rem;
  color: var(--ink-2);
  line-height: 1.78;
}

.card--dark {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
  color: #f3f1ea;
}

.card--dark .card__body-text {
  color: #cbd6db;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  background: var(--paper-2);
  border: 1px solid var(--line-2);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}

.chip--gold {
  background: var(--gold-pale);
  border-color: var(--gold-soft);
  color: #6d4f13;
}

.chiprow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.chip-scroll::-webkit-scrollbar {
  display: none;
}

/* 领域卡（四色） */
.domain {
  --dc: var(--domain-sci);
  position: relative;
  padding-top: 26px;
}

.domain::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  background: var(--dc);
}

.domain__dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--paper-2);
  background: color-mix(in srgb, var(--dc) 18%, #fff);
  border: 1.5px solid var(--dc);
  display: grid;
  place-items: center;
  font-family: var(--font-disp);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-2);
  color: color-mix(in srgb, var(--dc) 70%, var(--ink));
}

.pathgrid {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
}

.split {
  display: grid;
  gap: clamp(22px, 3.2vw, 44px);
  align-items: start;
}

/* 关键：允许栅格/弹性子项收缩到内容宽度以下，避免横向溢出 */
.split > *,
.hero__grid > *,
.grid > *,
.head-row > *,
.stats > *,
.footer__grid > * {
  min-width: 0;
}

.sticky-col {
  position: static;
}

@media (min-width: 900px) {
  .split {
    grid-template-columns: 0.82fr 1.18fr;
  }

  .split--even {
    grid-template-columns: 1fr 1fr;
  }

  .sticky-col {
    position: sticky;
    top: calc(var(--header-h) + 24px);
  }
}

.domain--sci {
  --dc: var(--domain-sci);
}

.domain--life {
  --dc: var(--domain-life);
}

.domain--social {
  --dc: var(--domain-social);
}

.domain--art {
  --dc: var(--domain-art);
}

/* ---------- 10. 成长路径 ---------- */
.pathline {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 26px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
}

.pathline::-webkit-scrollbar {
  display: none;
}

.pathline__node {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 14px;
  font-family: var(--font-disp);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  color: var(--ink-3);
}

.pathline__node::after {
  content: "";
  width: 34px;
  height: 1px;
  background: var(--line);
}

.pathline__node:last-child::after {
  display: none;
}

.pathline__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--line);
  flex: none;
}

.pathline__node.is-on .pathline__dot {
  background: var(--gold);
}

.pathline__node.is-on {
  color: var(--ink);
}

.stage {
  --sc: var(--gold);
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  padding: clamp(18px, 2vw, 24px);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stage__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.stage__code {
  font-family: var(--font-disp);
  font-size: 1.5rem;
  line-height: 1;
  color: var(--sc);
  letter-spacing: 0.02em;
}

.stage__age {
  font-size: 0.8125rem;
  color: var(--ink-3);
  white-space: nowrap;
}

.stage__name {
  font-size: 1.0625rem;
  font-weight: 700;
}

.stage__meta {
  list-style: none;
  display: grid;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--ink-2);
  line-height: 1.65;
}

.stage__meta li {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 10px;
}

.stage__meta b {
  font-weight: 500;
  color: var(--ink-3);
  font-size: 0.8125rem;
}

.stage--m0 { --sc: #c3cbd0; }
.stage--m1 { --sc: #a9c6a1; }
.stage--m2 { --sc: #6bbf95; }
.stage--m3 { --sc: var(--domain-sci); }
.stage--m4 { --sc: var(--slate-3); }
.stage--m5 { --sc: var(--domain-social); }
.stage--m6 { --sc: var(--domain-art); }
.stage--m7 { --sc: var(--bronze); }

/* 书塔（品牌标志性视觉：白色书塔随阅读级别逐级点亮） */
.tower {
  --steps: 8;
  width: 100%;
  max-width: 300px;
  margin-inline: auto;
}

.tower__svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.tower__step rect {
  fill: var(--line-2);
  transition: fill 0.45s var(--ease), opacity 0.45s var(--ease);
}

.tower__step.is-lit rect {
  fill: var(--gold);
}

.tower__step.is-lit.is-dim rect {
  fill: var(--gold-soft);
}

.tower__base {
  fill: var(--line);
}

.tower__label {
  font-family: var(--font-disp);
  font-size: 11px;
  letter-spacing: 0.12em;
  fill: var(--ink-2);
}

.tower__label.is-on {
  fill: var(--ink);
  font-weight: 600;
}

.stagepanel {
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  padding: clamp(20px, 2.6vw, 32px);
}

.stagepanel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
}

.stagepanel__code {
  font-family: var(--font-disp);
  font-size: 2.4rem;
  line-height: 1;
  color: var(--gold-deep);
}

.stagepanel__grid {
  display: grid;
  gap: 18px;
  margin-top: 20px;
}

.stagepanel__item h4 {
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  color: var(--bronze-ink);
  text-transform: uppercase;
  font-family: var(--font-disp);
}

.stagepanel__item p {
  margin-top: 6px;
  font-size: 0.9375rem;
  color: var(--ink-2);
}

.tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  flex: none;
  padding: 8px 15px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-2);
  background: var(--surface);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-2);
  transition: all 0.16s var(--ease);
}

.tab:hover {
  border-color: var(--bronze);
}

.tab[aria-selected="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

/* ---------- 11. 横滑轨道 ---------- */
.rail {
  position: relative;
}

.rail__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 82%);
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 4px 18px;
  margin-inline: -4px;
  scrollbar-width: thin;
}

.rail__track > * {
  scroll-snap-align: start;
}

.rail__hint {
  font-size: 0.8125rem;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---------- 12. 时间轴 / 步骤 ---------- */
.steps {
  display: grid;
  gap: var(--gap);
  counter-reset: step;
}

.step {
  position: relative;
  padding-left: 58px;
}

.step::before {
  counter-increment: step;
  content: "0" counter(step);
  position: absolute;
  left: 0;
  top: 2px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--slate);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--font-disp);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
}

.step::after {
  content: "";
  position: absolute;
  left: 19px;
  top: 48px;
  bottom: -18px;
  width: 1px;
  background: var(--line);
}

.step:last-child::after {
  display: none;
}

.step h3 {
  font-size: 1.0625rem;
}

.step p {
  margin-top: 8px;
  font-size: 0.9375rem;
  color: var(--ink-2);
}

/* ---------- 13. 表格（响应式：移动端转卡片） ---------- */
.tablewrap {
  overflow-x: auto;
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  background: var(--surface);
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  min-width: 620px;
}

table.data caption {
  text-align: left;
  padding: 16px 20px 0;
  font-size: 0.8125rem;
  color: var(--ink-3);
}

table.data th,
table.data td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--line-2);
  vertical-align: top;
}

table.data thead th {
  background: var(--paper-2);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  font-weight: 600;
  white-space: nowrap;
}

table.data tbody tr:last-child td {
  border-bottom: 0;
}

table.data td b {
  color: var(--ink);
}

.cards-fallback {
  display: grid;
  gap: 12px;
}

/* ---------- 14. 手风琴 ---------- */
.accordion {
  border-top: 1px solid var(--line);
}

.acc {
  border-bottom: 1px solid var(--line);
}

.acc__q {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  font-size: 1rem;
}

.acc__q::-webkit-details-marker {
  display: none;
}

.acc__q::after {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  margin-top: 8px;
  border-right: 1.5px solid var(--bronze);
  border-bottom: 1.5px solid var(--bronze);
  transform: rotate(45deg);
  transition: transform 0.22s var(--ease);
}

.acc[open] .acc__q::after {
  transform: rotate(-135deg);
}

.acc__a {
  padding: 0 0 22px;
  font-size: 0.9375rem;
  color: var(--ink-2);
  max-width: 62ch;
}

.acc__a p + p {
  margin-top: 10px;
}

/* ---------- 15. 表单 ---------- */
.form {
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-2);
}

.field label span {
  color: #b4452f;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  font: inherit;
  font-size: 0.9375rem;
  color: var(--ink);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--slate);
  box-shadow: 0 0 0 3px rgba(36, 76, 92, 0.14);
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.field__hint {
  font-size: 0.8125rem;
  color: var(--ink-3);
}

.form__row {
  display: grid;
  gap: 18px;
}

/* ---------- 16. 页脚 ---------- */
.footer {
  background: var(--ink);
  color: #d9d4ca;
  padding-block: clamp(44px, 5.5vw, 72px) 28px;
  font-size: 0.9375rem;
}

.footer a:hover {
  color: var(--gold-pale);
}

.footer__grid {
  display: grid;
  gap: clamp(26px, 3.4vw, 46px);
}

.footer__brand img {
  height: 34px;
  width: auto;
  margin-bottom: 16px;
}

.footer__title {
  font-family: var(--font-disp);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: 14px;
}

.footer__list {
  display: grid;
  gap: 9px;
}

.footer__bottom {
  margin-top: clamp(30px, 4vw, 46px);
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: #9c958a;
}

/* ---------- 17. 移动端底部行动条 ---------- */
.bottomcta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 10px;
  padding: 10px var(--pad) calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(251, 251, 247, 0.96);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
}

.bottomcta .btn {
  min-height: 46px;
  padding-inline: 12px;
  font-size: 0.9rem;
}

.has-bottomcta {
  padding-bottom: 82px;
}

/* ---------- 18. 通用小件 ---------- */
.breadcrumb {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 0.8125rem;
  color: var(--ink-3);
  padding-top: 22px;
}

.breadcrumb a:hover {
  color: var(--slate);
}

.pagehead {
  padding-block: clamp(20px, 3vw, 40px) clamp(36px, 5vw, 64px);
  background: var(--paper-3);
  border-bottom: 1px solid var(--line-2);
  position: relative;
  overflow: hidden;
}

.pagehead__inner {
  max-width: 800px;
}

.pagehead .display,
.pagehead .h1 {
  margin-top: 16px;
  font-size: clamp(1.85rem, 1.3rem + 2.6vw, 3rem);
}

.pagehead .lead {
  margin-top: 18px;
  max-width: 46em;
}

.pagehead__meta {
  margin-top: 24px;
}

.notice {
  display: flex;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--r-md);
  background: var(--gold-pale);
  border: 1px solid var(--gold-soft);
  font-size: 0.875rem;
  color: #6d4f13;
  line-height: 1.7;
}

.notice--slate {
  background: #eaf0f2;
  border-color: #d5e0e4;
  color: var(--slate-2);
}

.kv {
  display: grid;
  gap: 14px;
}

.kv__row {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  font-size: 0.9375rem;
}

.kv__k {
  color: var(--ink-3);
  font-size: 0.875rem;
}

.kv__v {
  color: var(--ink);
}

.divider {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 0;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.62s var(--ease), transform 0.62s var(--ease);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

.only-mobile {
  display: block;
}

.only-desktop {
  display: none;
}

/* ---------- 19. 响应式：≥640px 平板竖屏 ---------- */
@media (min-width: 640px) {
  .grid--6 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .gallery .media:nth-child(1) {
    grid-column: span 2;
    grid-row: span 2;
  }

  .form__row {
    grid-template-columns: 1fr 1fr;
  }

  .rail__track {
    grid-auto-columns: minmax(280px, 46%);
  }

  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px var(--gap);
  }

  .step::after {
    display: none;
  }
}

/* ---------- 20. 响应式：≥900px 平板横屏 / 小笔记本 ---------- */
@media (min-width: 900px) {
  :root {
    --header-h: 76px;
  }

  .nav {
    display: block;
  }

  .nav__link {
    padding: 9px 10px;
    font-size: 0.875rem;
  }

  .navtoggle {
    display: none;
  }

  /* 桌面端使用顶部 CTA，隐藏移动端底部行动条并释放底部留白 */
  .bottomcta {
    display: none;
  }

  .has-bottomcta {
    padding-bottom: 0;
  }

  .siteheader__cta {
    display: inline-flex;
    margin-left: 12px;
  }

  .hero__grid {
    grid-template-columns: 1.05fr 0.95fr;
  }

  .rail__track {
    grid-auto-columns: minmax(300px, 31%);
  }

  .only-mobile {
    display: none;
  }

  .only-desktop {
    display: block;
  }

  .footer__grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }

  .stagepanel__grid {
    grid-template-columns: 1fr 1fr;
  }

  .pathgrid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ---------- 21. 响应式：≥1200px 桌面 ---------- */
@media (min-width: 1200px) {
  .nav__link {
    padding: 9px 14px;
    font-size: 0.9375rem;
  }

  .hero__grid {
    grid-template-columns: 1.02fr 0.98fr;
    gap: 64px;
  }

  .footer__grid {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
  }
}

/* ---------- 导航溢出保护：菜单增至 9 项后，900–1119px 改用抽屉，避免顶部溢出 ---------- */
@media (min-width: 900px) and (max-width: 1119px) {
  .nav {
    display: none;
  }

  .navtoggle {
    display: inline-flex;
  }

  .siteheader__cta {
    display: none;
  }

  .bottomcta {
    display: grid;
  }

  .has-bottomcta {
    padding-bottom: 82px;
  }
}

/* ---------- 22. 无障碍与降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

@media print {
  .siteheader,
  .topbar,
  .bottomcta,
  .drawer {
    display: none !important;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 23. 图集灯箱 ---------- */
.lightbox {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: min(1100px, 94vw);
  max-height: 92vh;
  width: auto;
  position: relative;
  margin: auto;
}

.lightbox::backdrop {
  background: rgba(20, 14, 12, 0.82);
}

.lightbox__fig {
  margin: 0;
  background: var(--paper);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-2);
}

.lightbox__fig img {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  background: #111;
}

.lightbox__fig figcaption {
  padding: 12px 18px;
  font-size: 0.875rem;
  color: var(--ink-2);
}

.lightbox__fig figcaption:empty {
  display: none;
}

.lightbox__close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: #fff;
  color: var(--ink);
  font-size: 1.4rem;
  line-height: 1;
  box-shadow: var(--shadow-1);
}

[data-zoom] {
  cursor: zoom-in;
}

/* 图片懒加载占位 */
img[loading="lazy"] {
  background: var(--paper-2);
}
