/* ============================================================
   正版蓝 · 共享站点样式 /assets/site.css
   档案柜体系：钴蓝为体，冰蓝分层，琥珀橙只做锚点
   ============================================================ */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body,
h1, h2, h3, h4, h5, h6,
p, ul, ol, li, figure, figcaption,
blockquote, dl, dd, table, th, td {
  margin: 0;
}

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

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

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

button { background: none; border: 0; }

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

table { border-collapse: collapse; width: 100%; }

/* ---------- 2. Tokens ---------- */
:root {
  /* 色 */
  --ink: #0A1F44;
  --ink-2: #123A73;
  --blue: #2E6BE6;
  --ice: #A8C8F0;
  --mist: #E8EEF7;
  --fog: #F5F7FA;
  --amber: #F2A33C;
  --amber-deep: #9A4A06;
  --black: #101418;
  --gray: #6B7787;
  --white: #FFFFFF;

  /* 线与影 */
  --border: 2px solid var(--ink);
  --hair: 1px solid rgba(10, 31, 68, 0.16);
  --hair-light: 1px solid rgba(168, 200, 240, 0.28);
  --shadow-hard: 8px 8px 0 rgba(10, 31, 68, 0.14);
  --shadow-mid: 6px 6px 0 rgba(10, 31, 68, 0.16);
  --shadow-sm: 4px 4px 0 rgba(10, 31, 68, 0.18);
  --grid-line: rgba(10, 31, 68, 0.055);
  --grid-line-dark: rgba(168, 200, 240, 0.07);

  /* 字体 */
  --font-sans: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  /* 半径 */
  --capsule: 999px;
  --block: 6px;

  /* 间距 */
  --s1: 8px;
  --s2: 16px;
  --s3: 24px;
  --s4: 32px;
  --s5: 48px;
  --s6: 64px;
  --s7: 96px;

  /* 结构 */
  --container: 1280px;
  --header-offset: 112px;
}

/* ---------- 3. 基础排版 ---------- */
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--black);
  background-color: var(--fog);
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 24px 24px;
  padding-top: var(--header-offset);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink);
}

h1 { font-size: clamp(32px, 5vw, 56px); }
h2 { font-size: clamp(24px, 3vw, 34px); }
h3 { font-size: clamp(18px, 2vw, 22px); letter-spacing: -0.01em; }
h4 { font-size: 17px; letter-spacing: 0; }

p { max-width: 70ch; }

::selection { background: var(--amber); color: var(--black); }

#main-content { scroll-margin-top: calc(var(--header-offset) + 8px); }

/* ---------- 4. 工具类 ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 40px);
}

.sr-only {
  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;
}

.measure { max-width: 68ch; }

.lead {
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.7;
  color: var(--ink-2);
  max-width: 62ch;
}

.divider {
  height: 1px;
  border: 0;
  background: rgba(10, 31, 68, 0.16);
  margin-block: var(--s4);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 2px;
  background: var(--ink-2);
  flex: 0 0 auto;
}

.display-num {
  font-family: var(--font-sans);
  font-weight: 200;
  font-size: clamp(64px, 9vw, 132px);
  line-height: 0.86;
  letter-spacing: -0.05em;
  color: rgba(10, 31, 68, 0.16);
  font-variant-numeric: tabular-nums;
}
.on-dark .display-num { color: rgba(168, 200, 240, 0.32); }

/* ---------- 5. 版式骨架 ---------- */
.section { padding-block: clamp(40px, 6vw, 96px); }

.section-head {
  display: grid;
  gap: 10px;
  margin-bottom: clamp(24px, 3vw, 40px);
  max-width: 70ch;
}

.grid { display: grid; gap: var(--s3); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.rail-layout {
  display: grid;
  grid-template-columns: minmax(200px, 248px) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}

.rail {
  position: sticky;
  top: calc(var(--header-offset) + 12px);
  display: grid;
  gap: 6px;
  align-content: start;
}

.prose { max-width: 68ch; }
.prose > * + * { margin-top: 1em; }
.prose h2 { margin-top: 1.8em; }
.prose h3 { margin-top: 1.5em; }
.prose ul { display: grid; gap: 8px; }
.prose ul > li {
  position: relative;
  padding-left: 20px;
}
.prose ul > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 8px;
  height: 8px;
  background: var(--blue);
}
.prose a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- 6. 按钮 / 标签 / 卡片 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: var(--border);
  border-radius: 4px;
  background: var(--white);
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  box-shadow: 5px 5px 0 rgba(10, 31, 68, 0.16);
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease,
              background-color 0.16s ease, color 0.16s ease;
}
.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 rgba(10, 31, 68, 0.22);
}
.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 rgba(10, 31, 68, 0.2);
}
.btn--primary { background: var(--ink); color: var(--white); }
.btn--primary:hover { background: var(--ink-2); }
.btn--amber {
  background: var(--amber);
  color: var(--black);
  border-color: var(--ink);
}
.btn--amber:hover { background: #F7B256; }
.btn--ghost { background: transparent; box-shadow: none; }
.btn--ghost:hover { transform: none; box-shadow: none; background: var(--mist); }
.btn--sm { padding: 8px 14px; font-size: 13px; }

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border: 1.5px solid rgba(10, 31, 68, 0.24);
  border-radius: var(--capsule);
  background: var(--white);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease,
              border-color 0.16s ease;
}
.chip:hover { background: var(--mist); border-color: var(--ink); }
.chip[aria-pressed="true"],
.chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border: 1px solid rgba(10, 31, 68, 0.22);
  border-radius: 3px;
  background: var(--mist);
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}
.tag--amber {
  background: var(--amber);
  border-color: var(--amber-deep);
  color: var(--black);
  font-weight: 700;
}

.card {
  background: var(--white);
  border: var(--border);
  border-radius: var(--block);
  box-shadow: var(--shadow-hard);
  padding: clamp(16px, 2vw, 24px);
}
.card--flat { box-shadow: none; }
.card--dark {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--mist);
}
.card--dark h2,
.card--dark h3 { color: var(--white); }

.archive-row {
  position: relative;
  padding: 14px 16px 14px 20px;
  border-bottom: var(--hair);
  transition: background-color 0.18s ease;
}
.archive-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--amber);
  transform: scaleY(0);
  transform-origin: top center;
  transition: transform 0.18s ease;
}
.archive-row:hover,
.archive-row:focus-within { background: var(--white); }
.archive-row:hover::before,
.archive-row:focus-within::before { transform: scaleY(1); }

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-block: 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.03em;
  color: var(--gray);
}
.crumbs li { display: flex; align-items: center; gap: 8px; }
.crumbs li + li::before { content: "/"; color: rgba(10, 31, 68, 0.3); }
.crumbs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.crumbs [aria-current="page"] { color: var(--ink); font-weight: 700; }

/* ---------- 7. 图片容器基础规则 ---------- */
.img-frame {
  position: relative;
  display: block;
  border: var(--border);
  border-radius: var(--block);
  background: var(--mist);
  box-shadow: var(--shadow-hard);
  overflow: hidden;
  aspect-ratio: 16 / 9;
}
.img-frame img,
.img-frame picture > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.img-frame--wide { aspect-ratio: 21 / 9; }
.img-frame--square { aspect-ratio: 1 / 1; }
.img-frame--tall { aspect-ratio: 4 / 5; }
.img-frame figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 8px 12px;
  background: rgba(10, 31, 68, 0.92);
  color: var(--ice);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
}

/* ---------- 8. Skip link ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 300;
  padding: 10px 18px;
  border: var(--border);
  border-radius: var(--capsule);
  background: var(--ink);
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
  pointer-events: auto;
  transform: translateY(-180%);
  transition: transform 0.2s ease;
}
.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

/* ---------- 9. 头部：悬浮胶囊导航 ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  padding: 18px clamp(12px, 3vw, 32px) 0;
  pointer-events: none;
}

.header-shell {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
}

.nav-capsule {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.6vw, 24px);
  padding: 10px 12px 10px 18px;
  border: var(--border);
  border-radius: var(--capsule);
  background-color: var(--fog);
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 24px 24px;
  box-shadow: var(--shadow-mid);
  pointer-events: auto;
  transition: padding 0.25s ease, box-shadow 0.25s ease, border-radius 0.25s ease;
}

.brand {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  flex: 0 0 auto;
  padding-left: 16px;
  padding-right: clamp(8px, 1.4vw, 20px);
  border-right: 1px solid rgba(10, 31, 68, 0.16);
}
.brand::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 34px;
  max-height: 100%;
  background: var(--amber);
  border-radius: 1px;
}
.brand-mark {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink);
}
.brand-sub {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: 0.04em;
  color: var(--gray);
  white-space: nowrap;
  max-height: 20px;
  opacity: 1;
  overflow: hidden;
  transition: max-height 0.25s ease, opacity 0.2s ease;
}

.nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  min-width: 0;
}
.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: nowrap;
}
.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: var(--capsule);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  white-space: nowrap;
  transition: background-color 0.18s ease, color 0.18s ease;
}
.nav-link:hover { background: var(--mist); color: var(--ink); }
.nav-link[aria-current="page"] {
  gap: 6px;
  background: var(--ink);
  color: var(--white);
  font-weight: 700;
}
.nav-link[aria-current="page"]::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--amber);
  flex: 0 0 auto;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  margin-left: auto;
}

.quick-entry {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 15px;
  border: 2px solid var(--ink);
  border-radius: var(--capsule);
  background: var(--amber);
  color: var(--black);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.01em;
  white-space: nowrap;
  box-shadow: 3px 3px 0 rgba(10, 31, 68, 0.85);
  transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}
.quick-entry:hover {
  background: #F7B256;
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 rgba(10, 31, 68, 0.9);
}
.quick-entry:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 rgba(10, 31, 68, 0.9);
}
.quick-entry-dot {
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: var(--ink);
  flex: 0 0 auto;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border: 2px solid var(--ink);
  border-radius: var(--capsule);
  background: var(--ink);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.16s ease;
}
.nav-toggle:hover { background: var(--ink-2); }
.nav-toggle-bars {
  position: relative;
  width: 16px;
  height: 11px;
  flex: 0 0 auto;
}
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--amber);
  transition: transform 0.2s ease, top 0.2s ease, bottom 0.2s ease;
}
.nav-toggle-bars::before { top: 0; }
.nav-toggle-bars::after { bottom: 0; }
.site-header[data-open="true"] .nav-toggle-bars::before {
  top: 4px;
  transform: rotate(45deg);
}
.site-header[data-open="true"] .nav-toggle-bars::after {
  bottom: 5px;
  transform: rotate(-45deg);
}

/* 滚动后收缩 */
.site-header[data-scrolled="true"] .nav-capsule {
  padding: 6px 10px 6px 16px;
  box-shadow: 9px 9px 0 rgba(10, 31, 68, 0.2);
}
.site-header[data-scrolled="true"] .brand-sub {
  max-height: 0;
  opacity: 0;
}

/* ---------- 10. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(48px, 7vw, 96px);
  padding-block: clamp(36px, 5vw, 64px) 28px;
  border-top: 2px solid var(--ink-2);
  background-color: var(--ink);
  background-image:
    linear-gradient(to right, var(--grid-line-dark) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line-dark) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--mist);
}

.footer-inner { display: grid; gap: clamp(24px, 3.5vw, 44px); }

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(16px, 3vw, 36px);
  padding-bottom: clamp(20px, 3vw, 32px);
  border-bottom: var(--hair-light);
}

.footer-brand { display: flex; flex-direction: column; gap: 3px; }
.footer-brand-mark {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--white);
  line-height: 1.2;
}
.footer-brand-sub {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--ice);
}
.footer-tagline {
  font-size: clamp(20px, 2.6vw, 34px);
  font-weight: 200;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ice);
  max-width: 24ch;
}
.footer-cta { justify-self: end; }

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: var(--hair-light);
}
.footer-col {
  padding: clamp(14px, 2vw, 22px) clamp(12px, 2vw, 24px);
  min-width: 0;
}
.footer-col:first-child { padding-left: 0; }
.footer-col:last-child { padding-right: 0; }
.footer-col + .footer-col { border-left: var(--hair-light); }

.footer-col-title {
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ice);
}
.footer-links { display: grid; gap: 8px; }
.footer-link {
  display: inline-block;
  padding-block: 2px;
  font-size: 14px;
  color: rgba(232, 238, 247, 0.88);
  transition: color 0.16s ease, transform 0.16s ease;
}
.footer-link:hover {
  color: var(--white);
  transform: translateX(2px);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer-meta {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 44px);
  align-items: start;
}
.footer-contact { display: grid; gap: 6px; }
.footer-contact-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--mist);
  max-width: none;
}
.footer-contact-label {
  flex: 0 0 auto;
  min-width: 42px;
  padding-top: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ice);
}
.footer-note {
  max-width: 54ch;
  margin-top: 4px;
  font-size: 12.5px;
  line-height: 1.65;
  color: rgba(232, 238, 247, 0.62);
}
.footer-legal {
  display: grid;
  gap: 6px;
  justify-items: start;
  font-size: 12.5px;
  line-height: 1.6;
  color: rgba(232, 238, 247, 0.7);
}
.footer-legal-line { max-width: none; }
.footer-legal-line .mono { font-size: 12px; letter-spacing: 0.04em; color: var(--ice); }
.footer-legal-line--dim { color: rgba(232, 238, 247, 0.45); }

/* 返回索引浮标 */
.index-float {
  position: fixed;
  right: clamp(12px, 3vw, 28px);
  bottom: clamp(12px, 3vw, 28px);
  z-index: 150;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 17px;
  border: 2px solid var(--amber);
  border-radius: var(--capsule);
  background: var(--ink);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 5px 5px 0 rgba(10, 31, 68, 0.28);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease,
              visibility 0.25s ease, background-color 0.18s ease;
}
.index-float::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: var(--amber);
  flex: 0 0 auto;
}
.index-float[data-visible="true"] {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.index-float:hover { background: var(--ink-2); }

/* ---------- 11. 滚动进度与显现 ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 3px;
  z-index: 250;
  background: var(--amber);
  pointer-events: none;
  transition: width 0.1s linear;
}

[data-js="on"] [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}
[data-js="on"] [data-reveal][data-revealed] {
  opacity: 1;
  transform: none;
}

/* ---------- 12. 焦点可见 ---------- */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 3px;
}
.card a:focus-visible,
.archive-row a:focus-visible { outline-offset: 2px; }

/* ---------- 13. 响应式 ---------- */
@media (max-width: 1180px) {
  .brand-sub { display: none; }
  .nav-link { padding: 8px 10px; font-size: 13.5px; }
}

@media (max-width: 940px) {
  :root { --header-offset: 96px; }

  .nav-toggle { display: inline-flex; }

  .nav {
    position: absolute;
    left: -2px;
    right: -2px;
    top: calc(100% + 12px);
    display: block;
    flex: 0 0 auto;
    margin: 0;
    padding: 10px;
    border: var(--border);
    border-radius: 18px;
    background-color: var(--fog);
    background-image:
      linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
      linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
    background-size: 24px 24px;
    box-shadow: 8px 8px 0 rgba(10, 31, 68, 0.18);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
  }
  .site-header[data-open="true"] .nav {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  .site-header[data-open="true"] .nav-capsule { border-radius: 20px; }

  .nav-list { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav-link { padding: 12px 14px; border-radius: 12px; font-size: 15px; }
  .nav-link:hover { background: var(--mist); }

  .rail-layout { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; }
  .grid--2, .grid--3 { grid-template-columns: minmax(0, 1fr); }

  .footer-top { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .footer-cta { justify-self: start; }

  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-col:first-child { padding-left: clamp(12px, 2vw, 24px); }
  .footer-col:nth-child(odd) { border-left: 0; padding-left: 0; }
  .footer-col:nth-child(even) { border-left: var(--hair-light); }
  .footer-col:nth-child(n + 3) { border-top: var(--hair-light); }

  .footer-meta { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 620px) {
  body { font-size: 15.5px; line-height: 1.72; }

  .site-header { padding: 12px 12px 0; }
  .nav-capsule { gap: 8px; padding: 8px 8px 8px 12px; border-radius: 18px; }
  .brand { padding-left: 12px; padding-right: 8px; }
  .brand::before { width: 4px; height: 26px; }
  .brand-mark { font-size: 16px; }
  .nav-toggle { padding: 8px 11px; }
  .nav-toggle-text { display: none; }
  .quick-entry { padding: 7px 12px; font-size: 12px; }

  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-col,
  .footer-col:nth-child(even) {
    border-left: 0;
    padding-left: 0;
    padding-right: 0;
  }
  .footer-col + .footer-col { border-top: var(--hair-light); }

  .img-frame { box-shadow: var(--shadow-sm); }
  .card { box-shadow: var(--shadow-sm); }

  .index-float { padding: 10px 14px; font-size: 12px; }
}

/* ---------- 14. 动效降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  [data-js="on"] [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }

  .archive-row::before { transform: scaleY(0); }
  .archive-row:hover::before,
  .archive-row:focus-within::before { transform: scaleY(1); }

  .scroll-progress { transition: none; }
}
