/* =========================================================
   多多28中心 · 共享样式 /assets/site.css
   藏地科技感 · 经幡索引栏 + 展览画册式内容区
   ========================================================= */

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

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

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

ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img, svg, video { display: block; max-width: 100%; height: auto; }
hr { border: 0; }
table { border-collapse: collapse; width: 100%; }

/* ---------- 2. 变量 ---------- */
:root {
  /* 唐卡色谱 */
  --c-ink: #0B1430;
  --c-ink-2: #16264F;
  --c-red: #C7352C;
  --c-red-lit: #E4513F;
  --c-turq: #168C7E;
  --c-turq-lit: #79D6C6;
  --c-gold: #D6A13C;
  --c-gold-lit: #F0D28C;
  --c-ivory: #F4EFE4;
  --c-mist: #8A9AB8;

  /* 语义映射 */
  --bg: var(--c-ink);
  --surface: var(--c-ink-2);
  --text: var(--c-ivory);
  --text-dim: var(--c-mist);
  --line: rgba(214, 161, 60, 0.26);
  --line-soft: rgba(244, 239, 228, 0.10);
  --accent: var(--c-red);
  --accent-lit: var(--c-red-lit);
  --state: var(--c-turq);
  --state-lit: var(--c-turq-lit);
  --index: var(--c-gold);

  /* 字体 */
  --font-display: 'Noto Serif Tibetan', 'Source Han Serif SC', 'Songti SC', Georgia, serif;
  --font-body: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'IBM Plex Mono', 'SFMono-Regular', Consolas, 'Courier New', monospace;

  /* 结构 */
  --rail: 280px;
  --topbar: 64px;
  --maxw: 1240px;
  --pad: clamp(20px, 4vw, 64px);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (min-width: 1024px) and (max-width: 1279px) {
  :root { --rail: 240px; }
}

/* ---------- 3. 基础与中文排版 ---------- */
body {
  min-height: 100vh;
  padding-left: var(--rail);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.is-locked { overflow: hidden; }

main { display: block; }

p { orphans: 2; widows: 2; }

:focus-visible {
  outline: 2px solid var(--c-gold-lit);
  outline-offset: 3px;
}

:focus:not(:focus-visible) { outline: none; }

/* ---------- 4. 跳过链接 ---------- */
.skip-link {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999;
  padding: 12px 20px;
  background: var(--c-gold-lit);
  color: var(--c-ink);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  transform: translateY(-130%);
  transition: transform 0.18s var(--ease);
}

.skip-link:focus { transform: translateY(0); }

/* ---------- 5. 头部：经幡索引栏 ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  width: var(--rail);
  display: flex;
  flex-direction: column;
  background: var(--c-ink-2);
  border-right: 1px solid var(--line);
  color: var(--text);
}

.header-inner {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 26px;
  width: 100%;
  padding: 30px 24px 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(214, 161, 60, 0.4) transparent;
}

.header-inner::-webkit-scrollbar { width: 4px; }
.header-inner::-webkit-scrollbar-thumb { background: rgba(214, 161, 60, 0.35); }

/* 品牌 */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  position: relative;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border: 1px solid var(--c-gold);
}

.brand-mark::before {
  content: "";
  position: absolute;
  inset: 5px;
  background: var(--c-red);
  transform: rotate(45deg);
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(214, 161, 60, 0.3);
  transform: translate(4px, 4px);
}

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

.brand-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: var(--c-ivory);
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.4;
  letter-spacing: 0.1em;
  color: var(--c-mist);
}

/* 移动按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--c-ivory);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease);
}

.nav-toggle:hover {
  border-color: var(--c-gold);
  color: var(--c-gold-lit);
}

.nav-toggle-label { display: inline-block; }

.nav-toggle-bars {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  background: var(--c-gold);
  transition: background 0.2s var(--ease);
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: var(--c-gold);
  transition: transform 0.24s var(--ease);
}

.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

.site-header[data-open="true"] .nav-toggle-bars { background: transparent; }
.site-header[data-open="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.site-header[data-open="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

/* 导航 */
.primary-nav {
  display: flex;
  flex-direction: column;
  gap: 22px;
  flex: 1 1 auto;
  min-height: 0;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item { display: block; }

.nav-link {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 9px 10px 9px 12px;
  border-left: 2px solid transparent;
  color: var(--c-ivory);
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease);
}

.nav-index {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--c-gold);
  opacity: 0.7;
  transition: opacity 0.18s var(--ease), color 0.18s var(--ease);
}

.nav-label {
  font-size: 15px;
  line-height: 1.45;
  letter-spacing: 0.01em;
  transition: color 0.18s var(--ease);
}

.nav-link:hover {
  background: rgba(244, 239, 228, 0.06);
  border-left-color: var(--c-gold);
}

.nav-link:hover .nav-index { opacity: 1; }
.nav-link:hover .nav-label { color: var(--c-gold-lit); }

.nav-link[aria-current="page"] {
  background: rgba(199, 53, 44, 0.2);
  border-left-color: var(--c-red-lit);
}

.nav-link[aria-current="page"] .nav-index { opacity: 1; color: var(--c-gold-lit); }
.nav-link[aria-current="page"] .nav-label { color: var(--c-ivory); font-weight: 700; }

/* 经幡装饰 */
.header-flags {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 20px;
  margin-top: -6px;
}

.header-flags span {
  display: block;
  width: 2px;
  height: 100%;
  background: var(--c-gold);
  opacity: 0.5;
}

.header-flags span:nth-child(1) { height: 55%; background: var(--c-red-lit); opacity: 0.7; }
.header-flags span:nth-child(2) { height: 100%; background: var(--c-gold); opacity: 0.8; }
.header-flags span:nth-child(3) { height: 70%; background: var(--c-turq-lit); opacity: 0.7; }
.header-flags span:nth-child(4) { height: 88%; background: var(--c-ivory); opacity: 0.5; }
.header-flags span:nth-child(5) { height: 48%; background: var(--c-mist); opacity: 0.6; }

/* 操作区与状态 */
.header-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
}

.header-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.6;
  letter-spacing: 0.04em;
  color: var(--c-mist);
}

.status-dot {
  display: block;
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  background: var(--c-turq-lit);
  box-shadow: 0 0 0 3px rgba(121, 214, 198, 0.16);
}

/* 阅读进度 */
.rail-progress {
  position: absolute;
  top: 0;
  right: -1px;
  bottom: 0;
  width: 2px;
  background: rgba(214, 161, 60, 0.12);
  pointer-events: none;
}

.rail-progress-fill {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, var(--c-gold), var(--c-red-lit));
  transform: scaleY(0);
  transform-origin: top center;
  transition: transform 0.12s linear;
}

/* 抽屉遮罩 */
.nav-scrim {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  background: rgba(11, 20, 48, 0.74);
}

/* ---------- 6. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(64px, 9vw, 120px);
  background: var(--c-ink-2);
  border-top: 1px solid var(--line);
  color: var(--text);
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(214, 161, 60, 0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(214, 161, 60, 0.055) 1px, transparent 1px);
  background-size: 72px 72px;
  pointer-events: none;
}

.footer-inner {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(40px, 6vw, 72px) var(--pad) 26px;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
  gap: 20px 48px;
  align-items: end;
  padding-bottom: clamp(26px, 4vw, 40px);
  border-bottom: 1px solid var(--line);
}

.footer-mark {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.01em;
  color: var(--c-ivory);
  transition: color 0.2s var(--ease);
}

.footer-mark:hover { color: var(--c-gold-lit); }

.footer-statement {
  font-size: 15px;
  line-height: 1.8;
  color: var(--c-mist);
  max-width: 30em;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px 24px;
  padding-block: clamp(32px, 4.5vw, 48px);
}

.footer-col { min-width: 0; }

.footer-col-title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--c-gold);
}

.footer-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer-link {
  font-size: 14px;
  line-height: 1.6;
  color: var(--c-ivory);
  opacity: 0.8;
  transition: color 0.18s var(--ease), opacity 0.18s var(--ease);
}

.footer-link:hover {
  opacity: 1;
  color: var(--c-gold-lit);
}

.footer-list--contact { gap: 8px; }

.footer-contact-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
}

.footer-contact-key {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--c-mist);
}

.footer-contact-val {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--c-ivory);
  opacity: 0.86;
  overflow-wrap: anywhere;
}

.footer-note {
  margin-top: 14px;
  padding-left: 12px;
  border-left: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.75;
  color: var(--c-mist);
  max-width: 34em;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--c-mist);
}

.footer-copy { color: var(--c-mist); }
.footer-icp { color: var(--c-mist); }

/* ---------- 7. 通用按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 0;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  transition: background 0.18s var(--ease), color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.btn--primary {
  background: var(--c-red);
  border-color: var(--c-red);
  color: var(--c-ivory);
}

.btn--primary:hover {
  background: var(--c-red-lit);
  border-color: var(--c-red-lit);
}

.btn--secondary {
  background: transparent;
  border-color: var(--c-gold);
  color: var(--c-gold-lit);
}

.btn--secondary:hover {
  background: rgba(214, 161, 60, 0.14);
  color: var(--c-ivory);
}

.btn--ghost {
  background: transparent;
  border-color: var(--line-soft);
  color: var(--c-ivory);
}

.btn--ghost:hover {
  border-color: var(--c-turq-lit);
  color: var(--c-turq-lit);
}

.btn--sm { padding: 8px 14px; font-size: 13px; }
.btn--block { width: 100%; }

/* ---------- 8. 容器与章节 ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.section { margin-top: clamp(48px, 7vw, 96px); }

.section-head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: clamp(24px, 3.5vw, 40px);
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--c-gold);
}

.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--c-gold);
  flex: 0 0 24px;
}

/* ---------- 9. 标题与文本 ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(40px, 7vw, 96px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  color: var(--c-ivory);
}

.h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(32px, 4.4vw, 60px);
  line-height: 1.03;
  letter-spacing: -0.02em;
  color: var(--c-ivory);
}

.h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.18;
  letter-spacing: -0.01em;
  color: var(--c-ivory);
}

.h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(19px, 2vw, 24px);
  line-height: 1.35;
  color: var(--c-ivory);
}

.lede {
  font-size: clamp(15px, 1.4vw, 18px);
  line-height: 1.85;
  color: var(--c-mist);
  max-width: 40em;
}

.prose {
  max-width: 42em;
  font-size: 16px;
  line-height: 1.8;
  color: var(--c-ivory);
}

.prose p + p { margin-top: 1.1em; }
.prose strong { color: var(--c-gold-lit); font-weight: 700; }

.mono {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  line-height: 1.6;
  color: var(--c-gold);
}

.rule {
  height: 1px;
  background: var(--line);
  margin-block: clamp(28px, 4vw, 48px);
}

/* ---------- 10. 面包屑 ---------- */
.breadcrumb {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--c-mist);
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

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

.breadcrumb-link {
  color: var(--c-mist);
  border-bottom: 1px solid transparent;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}

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

.breadcrumb-sep {
  color: var(--c-gold);
  opacity: 0.6;
}

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

/* ---------- 11. 网格 ---------- */
.grid {
  display: grid;
  gap: clamp(16px, 2vw, 24px);
}

.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--auto { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* ---------- 12. 卡片 ---------- */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  background: var(--c-ink-2);
  border: 1px solid var(--line);
  border-radius: 0;
}

.card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 18px;
  height: 18px;
  border-top: 1px solid var(--c-gold);
  border-left: 1px solid var(--c-gold);
  pointer-events: none;
}

.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.card-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--c-ivory);
}

.card-text {
  font-size: 14.5px;
  line-height: 1.78;
  color: var(--c-mist);
}

.card-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--c-gold);
}

/* ---------- 13. 标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border: 1px solid rgba(214, 161, 60, 0.4);
  border-radius: 999px;
  background: rgba(214, 161, 60, 0.1);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: 0.08em;
  color: var(--c-gold-lit);
}

.tag--gold { color: var(--c-gold-lit); border-color: rgba(214, 161, 60, 0.4); background: rgba(214, 161, 60, 0.1); }
.tag--turq { color: var(--c-turq-lit); border-color: rgba(121, 214, 198, 0.36); background: rgba(22, 140, 126, 0.18); }
.tag--red { color: var(--c-ivory); border-color: rgba(228, 81, 63, 0.5); background: rgba(199, 53, 44, 0.24); }
.tag--mist { color: var(--c-mist); border-color: rgba(138, 154, 184, 0.32); background: transparent; }

/* ---------- 14. 色块分区 ---------- */
.band { padding-block: clamp(40px, 6vw, 80px); }

.band--ivory {
  background: var(--c-ivory);
  color: var(--c-ink);
  border-block: 1px solid rgba(11, 20, 48, 0.14);
}

.band--ivory .eyebrow { color: var(--c-red); }
.band--ivory .eyebrow::before { background: var(--c-red); }
.band--ivory .lede { color: var(--c-ink-2); }
.band--ivory .display,
.band--ivory .h1,
.band--ivory .h2,
.band--ivory .h3 { color: var(--c-ink); }
.band--ivory .card { background: #fff; border-color: rgba(11, 20, 48, 0.14); }
.band--ivory .card-text { color: var(--c-ink-2); }
.band--ivory .card-title { color: var(--c-ink); }

/* ---------- 15. 图片容器（供页面阶段放置占位） ---------- */
.media-frame {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  background: var(--c-ink-2);
  border: 1px solid var(--line);
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    135deg,
    rgba(214, 161, 60, 0.08) 0 1px,
    transparent 1px 9px
  );
  pointer-events: none;
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

/* ---------- 16. 滚动显现 ---------- */
[data-reveal-pending] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.36s var(--ease), transform 0.36s var(--ease);
}

[data-reveal-pending].is-revealed {
  opacity: 1;
  transform: translateY(0);
}

.is-revealed { opacity: 1; }

/* ---------- 17. 响应式：平板与手机 ---------- */
@media (max-width: 1023px) {
  body {
    padding-left: 0;
    padding-top: var(--topbar);
  }

  .site-header {
    right: 0;
    bottom: auto;
    width: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .header-inner {
    flex: 0 0 auto;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: var(--topbar);
    padding: 0 20px;
    overflow: visible;
  }

  .brand { flex: 1 1 auto; min-width: 0; }
  .brand-sub { display: none; }
  .brand-name { font-size: 18px; }
  .brand-mark { width: 22px; height: 22px; flex: 0 0 22px; }
  .brand-mark::before { inset: 4px; }

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

  .primary-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(88vw, 400px);
    padding: 84px 24px 32px;
    gap: 22px;
    background: var(--c-ink-2);
    border-left: 1px solid var(--line);
    overflow-y: auto;
    transform: translateX(102%);
    visibility: hidden;
    transition: transform 0.3s var(--ease), visibility 0.3s var(--ease);
    box-shadow: -24px 0 48px rgba(11, 20, 48, 0.55);
  }

  .site-header[data-open="true"] .primary-nav {
    transform: translateX(0);
    visibility: visible;
  }

  .nav-scrim {
    display: block;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s var(--ease), visibility 0.25s var(--ease);
  }

  .site-header[data-open="true"] .nav-scrim {
    opacity: 1;
    visibility: visible;
  }

  .rail-progress { display: none; }
  .header-flags { display: none; }
  .header-actions { margin-top: 0; }

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

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

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

@media (max-width: 767px) {
  .grid--2,
  .grid--3,
  .grid--4 { grid-template-columns: minmax(0, 1fr); }

  .display { font-size: clamp(36px, 11vw, 56px); }
  .h1 { font-size: clamp(28px, 8vw, 40px); }

  .card { padding: 20px; }
}

@media (max-width: 639px) {
  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

/* ---------- 18. 减少动效 ---------- */
@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-reveal-pending] {
    opacity: 1;
    transform: none;
  }

  .primary-nav { transition: none; }
  .rail-progress-fill { transition: none; }
}
