/* ==========================================================================
   奇异果指南 · /assets/site.css
   共享外壳：reset、变量、中文排版、双层头部、页脚、通用组件
   ========================================================================== */

/* ---------- 1. Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 96px;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body,
h1, h2, h3, h4, h5, h6,
p, figure, blockquote, dl, dd, ul, ol, hr { margin: 0; }

ul[class], ol[class] { list-style: none; padding: 0; }

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

button, input, select, textarea { font: inherit; color: inherit; }

a { color: inherit; }

/* ---------- 2. 变量 ---------- */
:root {
  /* 品牌色 */
  --jade: #2F9E5F;
  --jade-deep: #1B6B45;
  --seed: #141A17;
  --terracotta: #B4623C;
  --terracotta-sand: #E4B39B;
  --mist: #F6F7F2;
  --fog-green: #E2E8E1;
  --mint: #BFE3CB;
  --dawn: #D7F07A;
  --brick: #C0453B;
  --cool: #7C8A82;

  /* 派生 */
  --ink-70: rgba(20, 26, 23, 0.70);
  --ink-45: rgba(20, 26, 23, 0.45);
  --line: rgba(20, 26, 23, 0.14);
  --line-soft: rgba(20, 26, 23, 0.08);

  /* 字体 */
  --font-head: "Noto Sans SC", "Source Han Sans SC", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC",
    "SimSun", Georgia, serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace,
    SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  /* 度量 */
  --wrap: 1240px;
  --gutter: clamp(18px, 4vw, 56px);
  --cut: 22px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- 3. 排版 ---------- */
body {
  background-color: var(--mist);
  color: var(--seed);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-head);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--seed);
}

h1 { font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 900; line-height: 1.12; }
h2 { font-size: clamp(1.4rem, 2.4vw, 2rem); }
h3 { font-size: clamp(1.05rem, 1.6vw, 1.25rem); font-weight: 700; }
h4 { font-size: 1rem; font-weight: 700; line-height: 1.5; }

strong, b { font-weight: 700; }

::selection {
  background: var(--dawn);
  color: var(--seed);
}

/* ---------- 4. 焦点 ---------- */
:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- 5. 工具类 ---------- */
.u-wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.u-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.label {
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cool);
  line-height: 1.6;
}

.prose { max-width: 34em; }
.prose > p + p { margin-top: 1em; }
.prose--serif > p:first-of-type {
  font-family: var(--font-serif);
  font-size: 1.06em;
  line-height: 1.88;
  letter-spacing: 0.01em;
}

.offset-row > :nth-child(even) {
  transform: translateY(clamp(16px, 2.6vw, 40px));
}

/* ---------- 6. 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 300;
  transform: translate(-50%, -130%);
  padding: 10px 22px;
  background: var(--seed);
  color: var(--mist);
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: transform 0.22s var(--ease);
}

.skip-link:focus {
  transform: translate(-50%, 0);
  outline: 2px solid var(--dawn);
  outline-offset: -6px;
}

/* ---------- 7. 头部外壳 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(246, 247, 242, 0.94);
  -webkit-backdrop-filter: blur(12px) saturate(1.15);
  backdrop-filter: blur(12px) saturate(1.15);
  border-bottom: 1px solid var(--line);
}

/* 7.1 品牌说明条 */
.masthead {
  overflow: hidden;
  height: 46px;
  color: var(--mist);
  background:
    linear-gradient(100deg,
      rgba(47, 158, 95, 0.42) 0%,
      rgba(191, 227, 203, 0.06) 58%,
      rgba(20, 26, 23, 0) 100%),
    var(--seed);
  border-bottom: 1px solid rgba(228, 179, 155, 0.22);
  transition: height 0.32s var(--ease);
}

.is-condensed .masthead { height: 0; }

.masthead__inner {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
  height: 46px;
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vw, 26px);
}

.masthead__claim {
  margin-right: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: rgba(246, 247, 242, 0.86);
  white-space: nowrap;
}

.masthead__claim::before {
  content: "";
  flex: none;
  width: 16px;
  height: 1px;
  background: var(--terracotta-sand);
}

.device-switch {
  flex: none;
  display: inline-flex;
  border: 1px solid rgba(246, 247, 242, 0.24);
  overflow: hidden;
}

.device-switch__item {
  padding: 3px 10px;
  font-family: var(--font-head);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: rgba(246, 247, 242, 0.66);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.device-switch__item + .device-switch__item {
  border-left: 1px solid rgba(246, 247, 242, 0.18);
}

.device-switch__item:hover {
  background: rgba(246, 247, 242, 0.14);
  color: var(--mist);
}

.device-switch__item:focus-visible {
  outline: 2px solid var(--dawn);
  outline-offset: -3px;
}

.masthead__link {
  flex: none;
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--dawn);
  text-decoration: none;
  padding-bottom: 1px;
  border-bottom: 1px solid rgba(215, 240, 122, 0.45);
  white-space: nowrap;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.masthead__link:hover { color: #ffffff; border-color: #ffffff; }

.masthead__link:focus-visible { outline: 2px solid var(--dawn); outline-offset: 3px; }

/* 7.2 导航行 */
.navbar {
  position: relative;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
  height: 76px;
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.8vw, 26px);
  transition: height 0.32s var(--ease);
}

.is-condensed .navbar { height: 56px; }

.brand {
  flex: none;
  margin-right: auto;
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  text-decoration: none;
  color: var(--seed);
}

.brand__name {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 20px;
  letter-spacing: 0.01em;
  line-height: 1;
}

.brand__sub {
  font-size: 9.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--cool);
  line-height: 1;
}

.brand:hover .brand__name { color: var(--jade-deep); }

.brand:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 4px; }

/* 7.3 主导航 */
.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.4vw, 22px);
  flex-wrap: nowrap;
}

.site-nav__link {
  position: relative;
  display: inline-block;
  padding: 6px 0 9px;
  font-family: var(--font-head);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-70);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s var(--ease);
}

.site-nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--terracotta);
  transition: width 0.26s var(--ease);
}

.site-nav__link:hover { color: var(--seed); }
.site-nav__link:hover::after { width: 100%; }

.site-nav__link[aria-current="page"] {
  color: var(--jade-deep);
  font-weight: 700;
}

.site-nav__link[aria-current="page"]::after { width: 100%; }

.site-nav__link:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 2px; }

/* 7.4 版本徽章 */
.version-badge {
  position: relative;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px 5px 9px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--jade-deep);
  background: rgba(47, 158, 95, 0.08);
  border: 1px solid rgba(27, 107, 69, 0.3);
  cursor: pointer;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
  transition: background 0.2s var(--ease);
}

.version-badge:hover { background: rgba(47, 158, 95, 0.16); }

.version-badge:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--jade-deep);
}

.version-badge__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--dawn);
  box-shadow: inset 0 0 0 1px rgba(27, 107, 69, 0.6);
}

/* 7.5 版本面板 */
.version-panel {
  position: absolute;
  top: calc(100% - 6px);
  right: var(--gutter);
  z-index: 95;
  width: min(330px, calc(100vw - 2 * var(--gutter)));
  padding: 16px 18px 18px;
  background: var(--mist);
  border: 1px solid var(--line);
  box-shadow: 0 22px 44px -22px rgba(20, 26, 23, 0.45);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%);
}

.version-panel[hidden] { display: none; }

.version-panel__head {
  color: var(--terracotta);
  margin-bottom: 10px;
}

.version-panel__list {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  display: grid;
  gap: 7px;
}

.version-panel__list li {
  display: flex;
  gap: 9px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-70);
}

.version-panel__list .mono {
  flex: none;
  padding-top: 0.15em;
  font-size: 12px;
  color: var(--jade-deep);
}

.version-panel__link {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--jade-deep);
  text-decoration: none;
  padding-bottom: 1px;
  border-bottom: 1px solid rgba(27, 107, 69, 0.4);
}

.version-panel__link:hover { color: var(--jade); border-color: var(--jade); }

/* 7.6 导航行 CTA */
.navbar__cta { flex: none; }

/* 7.7 移动导航按钮 */
.nav-toggle {
  display: none;
  position: relative;
  flex: none;
  width: 42px;
  height: 42px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line);
  cursor: pointer;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
}

.nav-toggle::before,
.nav-toggle::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 16px;
  height: 1.5px;
  background: var(--seed);
  transition: transform 0.26s var(--ease), top 0.26s var(--ease);
}

.nav-toggle::before { top: 16px; transform: translateX(-50%); }
.nav-toggle::after { top: 23px; transform: translateX(-50%); }

.nav-toggle[aria-expanded="true"]::before {
  top: 20px;
  transform: translateX(-50%) rotate(45deg);
}

.nav-toggle[aria-expanded="true"]::after {
  top: 20px;
  transform: translateX(-50%) rotate(-45deg);
}

.nav-toggle:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--terracotta);
}

/* ---------- 8. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(56px, 8vw, 112px);
  background: var(--seed);
  color: var(--mist);
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 150px;
  background: linear-gradient(180deg, rgba(191, 227, 203, 0.22) 0%, rgba(20, 26, 23, 0) 78%);
  pointer-events: none;
}

.site-footer__grain {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(246, 247, 242, 0.2) 1px, transparent 1.5px);
  background-size: 17px 17px;
  opacity: 0.35;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 28%, #000 72%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 28%, #000 72%, transparent 100%);
  pointer-events: none;
}

.footer__inner {
  position: relative;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: clamp(44px, 6vw, 74px) var(--gutter) clamp(30px, 4vw, 46px);
  display: grid;
  grid-template-columns: 1.35fr 0.85fr 1.25fr 0.85fr;
  gap: clamp(24px, 3.4vw, 52px);
}

.footer-brand__name {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.1;
  letter-spacing: 0.01em;
  color: var(--mist);
}

.footer-brand__claim {
  margin-top: 10px;
  font-family: var(--font-serif);
  font-size: 15px;
  letter-spacing: 0.04em;
  color: rgba(246, 247, 242, 0.78);
}

.footer-brand__hint {
  margin-top: 20px;
  padding-left: 12px;
  border-left: 2px solid var(--terracotta);
  max-width: 20em;
  font-size: 13px;
  line-height: 1.65;
  color: rgba(246, 247, 242, 0.62);
}

.footer-nav__title,
.footer-contact__title,
.footer-legal__title {
  color: rgba(246, 247, 242, 0.46);
  margin-bottom: 14px;
}

.footer-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
}

.footer-nav__list a {
  position: relative;
  display: inline-block;
  padding-left: 14px;
  font-family: var(--font-head);
  font-size: 14.5px;
  color: rgba(246, 247, 242, 0.82);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

.footer-nav__list a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(191, 227, 203, 0.5);
  transition: background 0.2s var(--ease);
}

.footer-nav__list a:hover { color: #ffffff; }
.footer-nav__list a:hover::before { background: var(--dawn); }

.footer-nav__list a:focus-visible,
.footer-legal__list a:focus-visible,
.footer-contact__link:focus-visible {
  outline: 2px solid var(--dawn);
  outline-offset: 3px;
}

.footer-contact__row {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 8px;
  margin-bottom: 7px;
  font-size: 13.5px;
  line-height: 1.7;
  color: rgba(246, 247, 242, 0.86);
  overflow-wrap: anywhere;
}

.footer-contact__key {
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--terracotta-sand);
  padding-top: 0.35em;
}

.footer-contact__note {
  margin-top: 12px;
  max-width: 28em;
  font-size: 12.5px;
  line-height: 1.75;
  color: rgba(246, 247, 242, 0.55);
}

.footer-contact__link {
  display: inline-block;
  margin-top: 14px;
  padding-bottom: 2px;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  color: var(--dawn);
  text-decoration: none;
  border-bottom: 1px solid rgba(215, 240, 122, 0.4);
}

.footer-contact__link:hover { color: #ffffff; border-color: #ffffff; }

.footer-legal__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
}

.footer-legal__list a {
  font-family: var(--font-head);
  font-size: 14px;
  color: rgba(246, 247, 242, 0.78);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

.footer-legal__list a:hover { color: #ffffff; }

.footer-legal__icp {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid rgba(246, 247, 242, 0.14);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: rgba(246, 247, 242, 0.44);
}

.footer__base {
  position: relative;
  border-top: 1px solid rgba(246, 247, 242, 0.12);
}

.footer__base-inner {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 16px var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
}

.footer__copy {
  font-size: 12.5px;
  color: rgba(246, 247, 242, 0.52);
}

.footer__lang {
  font-size: 11px;
  letter-spacing: 0.12em;
  color: rgba(246, 247, 242, 0.4);
}

/* ---------- 9. 通用按钮 ---------- */
.btn {
  --btn-bg: var(--jade);
  --btn-fg: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  padding: 0.72em 1.35em;
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  color: var(--btn-fg);
  background: var(--btn-bg);
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.btn:hover { background: var(--jade-deep); color: #ffffff; }

.btn:active { background: #14502F; }

.btn:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 3px var(--dawn);
}

.btn--sm {
  padding: 0.5em 1em;
  font-size: 13.5px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%);
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--jade-deep);
  border-color: rgba(27, 107, 69, 0.4);
}

.btn--ghost:hover {
  background: rgba(47, 158, 95, 0.1);
  color: var(--jade-deep);
}

.btn--line {
  --btn-bg: transparent;
  --btn-fg: var(--seed);
  border-color: rgba(20, 26, 23, 0.22);
}

.btn--line:hover {
  background: var(--fog-green);
  color: var(--seed);
}

/* ---------- 10. 面板与展签 ---------- */
.panel {
  position: relative;
  padding: clamp(18px, 2.6vw, 28px);
  background: var(--mist);
  border: 1px solid var(--line);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%);
}

.panel--fog {
  background: var(--fog-green);
  border-color: rgba(20, 26, 23, 0.1);
}

.panel--seed {
  background: var(--seed);
  color: var(--mist);
  border-color: transparent;
}

.panel--seed h2,
.panel--seed h3 { color: var(--mist); }

.panel--sand { border-color: rgba(180, 98, 60, 0.4); }

.cut-card {
  position: relative;
  padding: clamp(16px, 2.4vw, 26px);
  background: var(--mist);
  border: 1px solid var(--line);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 24px), calc(100% - 24px) 100%, 0 100%);
}

.cut-card--alt {
  clip-path: polygon(24px 0, 100% 0, 100% 100%, 0 100%, 0 24px);
}

.plate {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  padding: 12px 14px;
  background: var(--fog-green);
  border-left: 3px solid var(--terracotta);
}

.plate__no {
  grid-row: 1 / span 2;
  padding-top: 2px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--terracotta);
}

.plate__term {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 14.5px;
  line-height: 1.5;
}

.plate__desc {
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-70);
}

/* ---------- 11. 信息图形 ---------- */
.meter { display: grid; gap: 8px; }

.meter__track {
  position: relative;
  height: 8px;
  background: var(--fog-green);
}

.meter__fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: linear-gradient(90deg, var(--jade-deep) 0%, var(--jade) 78%, var(--jade) 100%);
  transition: width 0.55s var(--ease);
}

.meter__fill::after {
  content: "";
  position: absolute;
  right: -5px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--seed);
  transform: translateY(-50%);
}

.meter.is-in .meter__fill { width: var(--v, 0%); }

.meter__legend {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--cool);
}

.seed-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.seed-dots li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--ink-70);
}

.seed-dots li::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--jade);
}

/* ---------- 12. 标题组 / 面包屑 ---------- */
.section-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: clamp(16px, 2.4vw, 28px);
}

.section-head__index {
  flex: none;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--terracotta);
}

.section-head__title {
  font-family: var(--font-head);
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  font-weight: 800;
  line-height: 1.2;
}

.section-head__rule {
  flex: 1 1 auto;
  height: 1px;
  min-width: 24px;
  background: var(--line);
  transform: translateY(-0.28em);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: clamp(14px, 2vw, 22px);
  font-size: 13px;
  color: var(--cool);
}

.breadcrumb a {
  color: var(--cool);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.breadcrumb a:hover { color: var(--jade-deep); border-color: rgba(27, 107, 69, 0.4); }

.breadcrumb__sep { color: var(--terracotta-sand); }

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

/* ---------- 13. 图片容器基础 ---------- */
.media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--fog-green);
  border: 1px solid rgba(180, 98, 60, 0.34);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
}

.media > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.media--wide { aspect-ratio: 16 / 9; }
.media--tall { aspect-ratio: 3 / 4; }
.media--square { aspect-ratio: 1 / 1; }

.media__plate {
  position: absolute;
  left: 0;
  bottom: 0;
  max-width: 88%;
  padding: 5px 12px;
  background: var(--terracotta-sand);
  color: var(--seed);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
}

/* ---------- 14. 动效 ---------------------------------------------------- */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 3px;
  z-index: 120;
  background: linear-gradient(90deg, var(--terracotta) 0%, var(--jade) 100%);
  pointer-events: none;
  transition: width 0.08s linear;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}

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

.reveal-group > [data-reveal]:nth-child(1) { transition-delay: 0s; }
.reveal-group > [data-reveal]:nth-child(2) { transition-delay: 0.06s; }
.reveal-group > [data-reveal]:nth-child(3) { transition-delay: 0.12s; }
.reveal-group > [data-reveal]:nth-child(4) { transition-delay: 0.18s; }
.reveal-group > [data-reveal]:nth-child(5) { transition-delay: 0.24s; }
.reveal-group > [data-reveal]:nth-child(6) { transition-delay: 0.3s; }

/* 章节高亮锚点 */
[data-spy-link] {
  color: var(--cool);
  transition: color 0.2s var(--ease);
}

[data-spy-link][aria-current="true"] {
  color: var(--jade-deep);
  font-weight: 700;
}

[data-spy-link][aria-current="true"]::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--seed);
  vertical-align: middle;
}

/* ---------- 15. 响应式 ---------- */
@media (max-width: 1080px) {
  .brand__sub { display: none; }
}

@media (max-width: 980px) {
  html { scroll-padding-top: 72px; }

  .navbar { height: 64px; }

  .is-condensed .navbar { height: 56px; }

  .nav-toggle { display: block; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 6px var(--gutter) 20px;
    background: var(--mist);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 22px 30px -26px rgba(20, 26, 23, 0.55);
    max-height: calc(100vh - 72px);
    overflow-y: auto;
  }

  .site-nav[data-open] { display: flex; }

  .site-nav__link {
    padding: 13px 0;
    font-size: 16.5px;
    border-bottom: 1px solid var(--line-soft);
  }

  .site-nav__link::after { bottom: 8px; }

  .footer__inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
  .device-switch { display: none; }

  .masthead__claim {
    font-size: 11.5px;
    letter-spacing: 0.06em;
  }

  .masthead { height: 42px; }
  .masthead__inner { height: 42px; }

  .navbar__cta { display: none; }

  .brand__name { font-size: 18px; }

  .version-panel {
    left: var(--gutter);
    right: var(--gutter);
    width: auto;
  }

  .footer__inner { grid-template-columns: 1fr; gap: 32px; }

  .footer__base-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 420px) {
  body { font-size: 16px; }
  .masthead__link { font-size: 11px; }
}

/* ---------- 16. 减少动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  html { scroll-behavior: auto; }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .meter__fill { width: var(--v, 0%); }

  .offset-row > :nth-child(even) { transform: none; }
}
