/* ================================================================
   长乐坊 · 共享 Site Kit
   坊市骨架：靛墨命令栏 / 米白正文 / 鎏金细线 / 朱砂红门面
   ================================================================ */

/* ---------- 1. 变量 ---------- */
:root {
  --cinnabar: #B5342B;
  --cinnabar-deep: #7A1E19;
  --gold: #C9A227;
  --gold-light: #E9CE86;
  --ink: #16323A;
  --indigo: #0B1D23;
  --paper: #F5EFE3;
  --paper-card: #FCF9F2;
  --celadon: #3F8574;
  --celadon-soft: #7FBFAD;
  --lantern: #D2764A;
  --stone: #6B7A7E;

  --line-gold: rgba(201, 162, 39, 0.38);
  --line-gold-soft: rgba(233, 206, 134, 0.22);
  --line-ink: rgba(22, 50, 58, 0.18);
  --line-ink-soft: rgba(22, 50, 58, 0.1);
  --on-dark: rgba(245, 239, 227, 0.82);
  --on-dark-dim: rgba(245, 239, 227, 0.58);
  --tint-dark: rgba(245, 239, 227, 0.05);

  --font-display: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", serif;
  --font-sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --header-h: 68px;
  --header-h-compact: 52px;
  --wrap: 1200px;
  --wrap-wide: 1440px;
  --gutter: 24px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.85;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; }
img, svg, picture, video { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }

::selection {
  background: var(--cinnabar);
  color: var(--paper-card);
}

/* ---------- 3. 焦点与可访问性 ---------- */
:focus-visible {
  outline: 2px solid var(--cinnabar);
  outline-offset: 3px;
}

.site-header :focus-visible,
.site-footer :focus-visible,
.section--dark :focus-visible,
.section--ink :focus-visible,
.section--cinnabar :focus-visible {
  outline-color: var(--gold-light);
}

.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;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -72px;
  z-index: 300;
  display: inline-block;
  padding: 10px 18px;
  background: var(--gold-light);
  color: var(--indigo);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  border-radius: 2px;
  transition: top 0.18s var(--ease);
}

.skip-link:focus-visible { top: 12px; }

/* ---------- 4. 排版档位 ---------- */
.t-display,
.t-title {
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.04;
}

.t-display { font-size: clamp(40px, 7vw, 72px); }
.t-title { font-size: clamp(32px, 4.4vw, 48px); }

.t-h3 {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(24px, 2.6vw, 32px);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.t-h4 {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(19px, 1.6vw, 24px);
  line-height: 1.45;
}

.lead {
  font-size: clamp(17px, 1.4vw, 19px);
  line-height: 1.8;
  color: var(--ink);
}

.t-body { font-size: 17px; line-height: 1.85; }

.t-caption {
  font-size: 13px;
  line-height: 1.7;
  color: var(--stone);
}

.t-mono {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mono-num {
  font-family: var(--font-mono);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
}

/* ---------- 5. 布局骨架 ---------- */
.container {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

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

.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; }
.col-6 { grid-column: span 6; }
.col-7 { grid-column: span 7; }
.col-8 { grid-column: span 8; }
.col-12 { grid-column: span 12; }

.section {
  position: relative;
  padding-block: clamp(56px, 8vw, 104px);
}

.section--card { background: var(--paper-card); }
.section--ink { background: var(--ink); color: var(--paper); }
.section--dark { background: var(--indigo); color: var(--paper); }
.section--cinnabar { background: var(--cinnabar-deep); color: var(--paper); }

.section--ink .t-caption,
.section--dark .t-caption,
.section--cinnabar .t-caption { color: var(--on-dark-dim); }

.section--ink .lead,
.section--dark .lead,
.section--cinnabar .lead { color: var(--on-dark); }

.section-head {
  display: grid;
  gap: 14px;
  max-width: 62ch;
  margin-bottom: clamp(28px, 4vw, 48px);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(32px, 4.4vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.section-lead {
  font-size: 17px;
  line-height: 1.85;
  color: var(--stone);
  max-width: 46ch;
}

.section--ink .section-lead,
.section--dark .section-lead,
.section--cinnabar .section-lead { color: var(--on-dark); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cinnabar);
  line-height: 1.4;
}

.eyebrow::before {
  content: "";
  width: 30px;
  height: 1px;
  background: currentColor;
  flex: 0 0 auto;
}

.section--ink .eyebrow,
.section--dark .eyebrow,
.section--cinnabar .eyebrow { color: var(--gold-light); }

.rule {
  height: 1px;
  background: var(--line-gold);
  border: 0;
  margin-block: clamp(24px, 3vw, 40px);
}

/* ---------- 6. 正文容器 ---------- */
.prose {
  max-width: 68ch;
  font-size: 17px;
  line-height: 1.85;
}

.prose > * + * { margin-top: 1.1em; }

.prose h3 {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(19px, 1.6vw, 24px);
  line-height: 1.5;
  margin-top: 1.8em;
}

.prose ul,
.prose ol { padding-left: 1.35em; }

.prose li + li { margin-top: 0.4em; }

.prose a { color: var(--cinnabar); text-underline-offset: 3px; }

/* ---------- 7. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 26px;
  border: 1px solid transparent;
  border-radius: 2px;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease),
    border-color 0.18s var(--ease), transform 0.18s var(--ease);
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--cinnabar);
  border-color: var(--cinnabar);
  color: var(--paper-card);
}

.btn--primary:hover {
  background: var(--cinnabar-deep);
  border-color: var(--cinnabar-deep);
}

.btn--ghost {
  border-color: rgba(22, 50, 58, 0.35);
  color: var(--ink);
}

.btn--ghost:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.btn--gold {
  border-color: var(--line-gold);
  color: var(--gold-light);
}

.btn--gold:hover {
  background: rgba(201, 162, 39, 0.16);
  border-color: var(--gold);
}

.btn--sm {
  padding: 10px 16px;
  font-size: 13px;
}

/* ---------- 8. 卡片 / 标签 ---------- */
.card {
  position: relative;
  padding: clamp(22px, 2.4vw, 30px);
  background: var(--paper-card);
  border: 1px solid var(--line-ink);
  border-radius: 2px;
  transition: transform 0.18s var(--ease), border-color 0.18s var(--ease);
}

.card:hover {
  transform: translateY(-1px);
  border-color: var(--gold);
}

.card--dark {
  background: var(--tint-dark);
  border-color: var(--line-gold-soft);
  color: var(--paper);
}

.card--dark:hover { border-color: var(--gold); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border: 1px solid currentColor;
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  line-height: 1.6;
  text-transform: uppercase;
  white-space: nowrap;
}

.tag--pass { color: var(--celadon); }
.tag--pending { color: var(--lantern); }
.tag--gold { color: var(--gold); }
.tag--ink { color: var(--ink); }

.section--ink .tag--pass,
.section--dark .tag--pass,
.section--cinnabar .tag--pass { color: var(--celadon-soft); }

/* ---------- 9. 面包屑 ---------- */
.breadcrumb { margin-bottom: clamp(20px, 3vw, 32px); }

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  line-height: 1.6;
  color: var(--stone);
}

.breadcrumb-item { display: inline-flex; align-items: center; gap: 6px; }

.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  color: var(--gold);
  opacity: 0.85;
}

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

.breadcrumb-link:hover {
  color: var(--ink);
  border-bottom-color: var(--gold);
}

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

/* ---------- 10. 图片容器基座（页面阶段放入 <img>） ---------- */
.media-frame {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  border: 1px solid var(--line-ink);
  border-radius: 2px;
  isolation: isolate;
}

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

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.06) saturate(0.94);
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(120% 100% at 50% 30%, rgba(11, 29, 35, 0) 42%, rgba(11, 29, 35, 0.55) 100%);
}

.media-frame--cinnabar::before,
.media-frame--ink::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  mix-blend-mode: multiply;
}

.media-frame--cinnabar::before { background: rgba(181, 52, 43, 0.32); }
.media-frame--ink::before { background: rgba(22, 50, 58, 0.42); }

.media-caption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--stone);
  line-height: 1.7;
}

/* ---------- 11. 头部：靛墨命令栏 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  background: var(--indigo);
  color: var(--paper);
  border-bottom: 1px solid var(--line-gold);
  transition: box-shadow 0.22s var(--ease);
}

.site-header[data-scrolled] {
  box-shadow: 0 1px 0 rgba(201, 162, 39, 0.26), 0 14px 30px rgba(4, 12, 16, 0.42);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  width: 100%;
  max-width: var(--wrap-wide);
  margin-inline: auto;
  padding-inline: var(--gutter);
  height: var(--header-h);
  transition: height 0.22s var(--ease);
}

.site-header[data-scrolled] .header-inner { height: var(--header-h-compact); }

/* 坊印 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  text-decoration: none;
  color: inherit;
}

.brand-seal {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  background: var(--cinnabar);
  color: var(--gold-light);
  border: 1px solid rgba(233, 206, 134, 0.55);
  border-radius: 2px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 20px;
  line-height: 1;
  transition: transform 0.22s var(--ease), background-color 0.22s var(--ease);
}

.brand:hover .brand-seal {
  transform: translateY(-1px);
  background: var(--cinnabar-deep);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 20px;
  line-height: 1.05;
  letter-spacing: 0.04em;
  color: var(--paper-card);
}

.brand-tagline {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  line-height: 1.2;
  color: var(--gold-light);
  opacity: 0.78;
}

/* 主导航 */
.site-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1 1 auto;
  min-width: 0;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-inline: auto;
  list-style: none;
}

.nav-item { flex: 0 0 auto; }

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 10px 12px;
  border-radius: 2px;
  color: var(--on-dark);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  transition: color 0.16s var(--ease), background-color 0.16s var(--ease);
}

.nav-index {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--gold);
  opacity: 0.72;
}

.nav-link:hover {
  color: var(--paper-card);
  background: rgba(201, 162, 39, 0.1);
}

.nav-link[aria-current="page"] {
  color: var(--paper-card);
  background: rgba(181, 52, 43, 0.3);
}

.nav-link[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--gold);
}

.nav-link[aria-current="page"] .nav-index {
  color: var(--gold-light);
  opacity: 1;
}

/* 检索与状态 */
.nav-aside {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
}

.nav-search { position: relative; display: flex; align-items: center; }

.nav-search-input {
  width: 232px;
  height: 34px;
  padding: 0 46px 0 12px;
  background: rgba(245, 239, 227, 0.06);
  border: 1px solid rgba(233, 206, 134, 0.26);
  border-radius: 2px;
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1;
  transition: border-color 0.16s var(--ease), background-color 0.16s var(--ease);
}

.nav-search-input::placeholder {
  color: rgba(245, 239, 227, 0.42);
  font-size: 12.5px;
}

.nav-search-input:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(245, 239, 227, 0.1);
}

.nav-search-input:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 2px;
}

.nav-search-key {
  position: absolute;
  right: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--gold);
  opacity: 0.72;
  pointer-events: none;
}

.nav-status {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  line-height: 1.4;
  color: var(--gold-light);
  white-space: nowrap;
}

.status-dot {
  display: block;
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  background: var(--celadon-soft);
  box-shadow: 0 0 0 1px rgba(127, 191, 173, 0.35);
}

/* 移动导航按钮 */
.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  margin-left: auto;
  padding: 0;
  background: transparent;
  border: 1px solid rgba(233, 206, 134, 0.3);
  border-radius: 2px;
  cursor: pointer;
  transition: border-color 0.18s var(--ease), background-color 0.18s var(--ease);
}

.nav-toggle:hover {
  border-color: var(--gold);
  background: rgba(201, 162, 39, 0.12);
}

.nav-toggle-bar {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--gold-light);
  transition: transform 0.2s var(--ease), opacity 0.15s var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ---------- 12. 页脚 ---------- */
.site-footer {
  background: var(--indigo);
  color: var(--on-dark);
  border-top: 1px solid var(--line-gold);
  font-size: 15px;
}

.footer-inner {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: clamp(40px, 6vw, 72px) var(--gutter) 28px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.7fr;
  gap: 36px 40px;
}

.footer-brand .brand { gap: 14px; }

.footer-brand .brand-name { font-size: 24px; }

.footer-note {
  margin-top: 16px;
  max-width: 34ch;
  font-size: 14px;
  line-height: 1.8;
  color: var(--on-dark-dim);
}

.footer-col-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--gold);
}

.footer-col-title::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: var(--line-gold-soft);
}

.footer-list {
  display: grid;
  gap: 10px;
  list-style: none;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--on-dark);
  text-decoration: none;
  transition: color 0.16s var(--ease);
}

.footer-link::before {
  content: "";
  width: 6px;
  height: 1px;
  flex: 0 0 auto;
  background: var(--gold);
  opacity: 0.55;
  transition: width 0.18s var(--ease), opacity 0.18s var(--ease);
}

.footer-link:hover { color: var(--paper-card); }
.footer-link:hover::before { width: 14px; opacity: 1; }

.footer-lines {
  display: grid;
  gap: 12px;
  list-style: none;
  font-size: 14px;
  line-height: 1.7;
  color: var(--on-dark-dim);
}

.footer-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  word-break: break-word;
}

.footer-key {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  line-height: 1.6;
  text-transform: uppercase;
  color: var(--gold);
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  background: transparent;
  border: 1px solid rgba(233, 206, 134, 0.28);
  border-radius: 2px;
  color: var(--gold-light);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  line-height: 1.5;
  cursor: pointer;
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease),
    border-color 0.15s var(--ease);
}

.copy-btn:hover {
  background: rgba(201, 162, 39, 0.16);
  border-color: var(--gold);
}

.copy-btn[data-copied] {
  color: var(--celadon-soft);
  border-color: var(--celadon-soft);
}

.footer-craft {
  height: 1px;
  margin: clamp(30px, 4vw, 46px) 0 20px;
  background: linear-gradient(90deg, var(--gold) 0%, rgba(201, 162, 39, 0.16) 42%, rgba(201, 162, 39, 0.16) 100%);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 28px;
}

.footer-closing {
  max-width: 58ch;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--on-dark-dim);
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  line-height: 1.7;
  color: rgba(245, 239, 227, 0.5);
}

/* ---------- 13. JS 注入元素 ---------- */
.read-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 200;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cinnabar) 0%, var(--gold) 100%);
  pointer-events: none;
}

.to-top {
  position: fixed;
  right: 20px;
  bottom: 24px;
  z-index: 110;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: var(--indigo);
  border: 1px solid var(--line-gold);
  border-radius: 2px;
  color: var(--gold-light);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease),
    visibility 0.2s var(--ease), background-color 0.18s var(--ease);
}

.to-top[data-visible] {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.to-top:hover {
  background: var(--cinnabar-deep);
  border-color: var(--gold);
}

/* ---------- 14. 进场 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

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

/* ---------- 15. 响应式 ---------- */
@media (max-width: 1280px) {
  .nav-search-input { width: 196px; }
  .nav-link { padding: 10px 9px; font-size: 13.5px; }
}

@media (max-width: 1080px) {
  .nav-toggle { display: inline-flex; }

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 22px;
    background: var(--indigo);
    border-top: 1px solid var(--line-gold-soft);
    border-bottom: 1px solid var(--line-gold);
    box-shadow: 0 18px 34px rgba(4, 12, 16, 0.5);
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }

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

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-inline: 0;
  }

  .nav-link {
    padding: 15px 4px;
    font-size: 15px;
    gap: 10px;
    border-radius: 0;
  }

  .nav-item + .nav-item .nav-link { border-top: 1px solid rgba(233, 206, 134, 0.14); }

  .nav-link[aria-current="page"] { background: rgba(181, 52, 43, 0.24); }
  .nav-link[aria-current="page"]::before { top: 0; bottom: 0; left: -6px; }

  .nav-aside {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--line-gold-soft);
  }

  .nav-search-input { width: 100%; height: 40px; }
  .nav-status { white-space: normal; }
  .brand-tagline { display: none; }

  .footer-top { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  body { font-size: 16px; }

  .grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .col-3, .col-4, .col-5, .col-6, .col-7, .col-8 { grid-column: span 6; }

  .section-title { font-size: clamp(28px, 6vw, 36px); }
}

@media (max-width: 640px) {
  :root { --gutter: 18px; }

  .footer-top { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .footer-meta { font-size: 11px; }

  .to-top { right: 14px; bottom: 16px; width: 40px; height: 40px; }

  .brand-name { font-size: 18px; }
  .brand-seal { width: 34px; height: 34px; font-size: 18px; }
  .footer-brand .brand-name { font-size: 22px; }
}

/* ---------- 16. 减少动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

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

  .btn:hover,
  .card:hover,
  .brand:hover .brand-seal { transform: none; }
}
