/* =========================================================
   财神主页 · 共享样式 /assets/site.css
   开运仪表盘：蓝图网格底 + 朱红印章 + 墨青框架 + 鎏金索引
   ========================================================= */

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

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

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

ul,
ol { padding: 0; }

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

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

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

/* ---------- 2. 变量 ---------- */
:root {
  /* 品牌色 */
  --c-red: #C0392B;
  --c-red-deep: #8C1F1A;
  --c-gold: #C79A3A;
  --c-gold-bright: #E9C46A;
  --c-ink: #1F3A44;
  --c-black: #14100E;
  --c-paper: #F6F0E3;
  --c-panel: #EADFC9;
  --c-green: #2F7A55;
  --c-line: #C8BDA6;

  /* 字体 */
  --font-display: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --font-body: "HarmonyOS Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, "SFMono-Regular", "Cascadia Mono", Consolas, monospace;

  /* 字号阶梯 12 / 14 / 16 / 18 / 22 / 28 / 36 / 48 / 64 / 96 */
  --fs-12: 12px;
  --fs-14: 14px;
  --fs-16: 16px;
  --fs-18: 18px;
  --fs-22: clamp(20px, 2vw, 22px);
  --fs-28: clamp(24px, 2.6vw, 28px);
  --fs-36: clamp(28px, 3.6vw, 36px);
  --fs-48: clamp(34px, 5vw, 48px);
  --fs-64: clamp(40px, 7vw, 64px);
  --fs-96: clamp(54px, 11vw, 96px);

  /* 布局 */
  --page-max: 1440px;
  --gutter: clamp(16px, 3.2vw, 44px);
  --rule: 1px;
  --radius: 2px;
}

/* ---------- 3. 基础排版与纸底网格 ---------- */
html { background-color: var(--c-paper); }

body {
  font-family: var(--font-body);
  font-size: var(--fs-16);
  line-height: 1.75;
  letter-spacing: 0.01em;
  color: var(--c-ink);
  background-color: var(--c-paper);
  background-image:
    linear-gradient(to right, rgba(31, 58, 68, 0.075) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(31, 58, 68, 0.075) 1px, transparent 1px);
  background-size: 80px 80px;
  background-position: -1px -1px;
  min-height: 100vh;
}

a {
  color: var(--c-red);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: var(--c-line);
  transition: color 0.18s ease, text-decoration-color 0.18s ease;
}

a:hover { text-decoration-color: currentColor; }

strong,
b { font-weight: 700; color: var(--c-black); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.28;
  color: var(--c-black);
  letter-spacing: 0.01em;
}

p { max-width: 38em; }

::selection {
  background: var(--c-red);
  color: var(--c-paper);
}

/* ---------- 4. 焦点与无障碍 ---------- */
.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 900;
  padding: 10px 18px;
  background: var(--c-ink);
  color: var(--c-paper);
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: 0.1em;
  text-decoration: none;
  border: 1px solid var(--c-gold);
  border-radius: var(--radius);
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 12px;
  color: var(--c-paper);
}

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--c-red);
  outline-offset: 3px;
}

#main-content {
  display: block;
  scroll-margin-top: 132px;
}

#main-content:focus-visible {
  outline: 2px solid var(--c-red);
  outline-offset: -4px;
}

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

/* ---------- 5. Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  background: rgba(246, 240, 227, 0.97);
  border-bottom: 2px solid var(--c-ink);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.scroll-progress {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 2px;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--c-gold) 0%, var(--c-gold-bright) 42%, var(--c-red) 100%);
  z-index: 3;
  transition: transform 0.12s linear;
}

.site-header__inner {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.site-header__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 11px 0 10px;
}

/* 品牌印章 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
  color: var(--c-black);
}

.brand__seal {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  background: var(--c-red);
  color: var(--c-gold-bright);
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  padding-bottom: 2px;
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 2px var(--c-gold), inset 0 0 0 4px var(--c-red);
  transition: box-shadow 0.2s ease, background-color 0.2s ease;
}

.brand:hover .brand__seal {
  background: var(--c-red-deep);
  box-shadow: inset 0 0 0 2px var(--c-gold-bright), inset 0 0 0 4px var(--c-red-deep);
}

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.brand__name {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: 0.06em;
  color: var(--c-black);
}

.brand__sub {
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.3;
  letter-spacing: 0.16em;
  color: var(--c-gold);
  white-space: nowrap;
}

/* 工具区 */
.site-header__tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.version-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  background: var(--c-paper);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: 0.06em;
  color: var(--c-ink);
  white-space: nowrap;
}

.version-badge__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-green);
  box-shadow: 0 0 0 3px rgba(47, 122, 85, 0.16);
}

/* 移动导航按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--c-ink);
  border-radius: var(--radius);
  background: var(--c-paper);
  color: var(--c-ink);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.nav-toggle:hover {
  background: var(--c-ink);
  color: var(--c-paper);
}

.nav-toggle__label { line-height: 1; }

.nav-toggle__bars {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  width: 16px;
}

.nav-toggle__bars i {
  display: block;
  height: 1.5px;
  width: 100%;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(1) {
  transform: translateY(4.5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(3) {
  transform: translateY(-4.5px) rotate(-45deg);
}

/* 主导航：作为页面视觉边框的索引条 */
.site-nav {
  border-top: 1px solid var(--c-line);
}

.site-nav__list {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
}

.site-nav__item {
  display: flex;
  position: relative;
}

.site-nav__item + .site-nav__item {
  border-left: 1px solid var(--c-line);
}

.site-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 18px 10px;
  border-bottom: 2px solid transparent;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--c-ink);
  text-decoration: none;
  transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.site-nav__link::before {
  content: attr(data-index);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--c-gold);
  transition: transform 0.2s ease, color 0.18s ease;
}

.site-nav__link:hover {
  background: var(--c-panel);
  color: var(--c-red-deep);
  border-bottom-color: var(--c-gold);
}

.site-nav__link:hover::before {
  transform: translateY(-2px);
  color: var(--c-red-deep);
}

.site-nav__link[aria-current="page"] {
  color: var(--c-red);
  background: rgba(192, 57, 43, 0.06);
  border-bottom-color: var(--c-red);
}

.site-nav__link[aria-current="page"]::before {
  color: var(--c-red);
}

/* ---------- 6. Footer ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(56px, 8vw, 108px);
  background: var(--c-ink);
  color: var(--c-paper);
  border-top: 4px solid var(--c-red);
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(246, 240, 227, 0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(246, 240, 227, 0.035) 1px, transparent 1px);
  background-size: 88px 88px;
}

.site-footer__inner {
  position: relative;
  z-index: 1;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: clamp(38px, 5.5vw, 70px) var(--gutter) 0;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr 1.55fr;
  gap: clamp(24px, 4vw, 56px);
  padding-bottom: clamp(30px, 4.5vw, 54px);
  border-bottom: 1px solid rgba(246, 240, 227, 0.18);
}

.footer-brand__seal {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 14px;
  background: var(--c-red);
  color: var(--c-gold-bright);
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  padding-bottom: 2px;
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 2px var(--c-gold);
}

.footer-brand__name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--c-paper);
  max-width: none;
}

.footer-brand__line {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  color: var(--c-gold);
  max-width: none;
}

.footer-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--c-gold);
  margin-bottom: 14px;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(199, 154, 58, 0.34);
}

.footer-list {
  display: grid;
  gap: 9px;
}

.footer-link {
  position: relative;
  display: inline-block;
  font-size: 14.5px;
  line-height: 1.6;
  color: rgba(246, 240, 227, 0.82);
  text-decoration: none;
  transition: color 0.18s ease;
}

.footer-link::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 0;
  height: 1px;
  background: var(--c-gold-bright);
  transition: width 0.22s ease;
}

.footer-link:hover {
  color: var(--c-paper);
}

.footer-link:hover::before { width: 100%; }

.footer-link--quiet {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: rgba(246, 240, 227, 0.6);
}

.footer-list--plain { gap: 10px; }

.footer-list--plain li {
  display: grid;
  grid-template-columns: 3.4em 1fr;
  gap: 10px;
  font-size: 13.5px;
  line-height: 1.65;
}

.footer-key {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--c-gold);
  padding-top: 3px;
}

.footer-val {
  color: rgba(246, 240, 227, 0.86);
  overflow-wrap: break-word;
}

.footer-note {
  margin-top: 14px;
  padding-left: 12px;
  border-left: 2px solid var(--c-red);
  font-size: 12.5px;
  line-height: 1.7;
  color: rgba(246, 240, 227, 0.58);
  max-width: 32em;
}

.site-footer__base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 26px;
  padding: 18px 0 22px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: rgba(246, 240, 227, 0.55);
}

.footer-copy,
.footer-legal { max-width: none; }

.footer-legal {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.footer-sep {
  color: rgba(246, 240, 227, 0.3);
  margin: 0 6px;
}

.footer-micro {
  width: 100%;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px dashed rgba(246, 240, 227, 0.16);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: rgba(246, 240, 227, 0.4);
  max-width: none;
}

/* ---------- 7. 通用布局与组件 ---------- */
.shell {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.grid {
  display: grid;
  gap: clamp(16px, 2vw, 28px);
}

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

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 16px;
  border: 1px solid var(--c-ink);
  border-radius: var(--radius);
  background: var(--c-paper);
  color: var(--c-ink);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

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

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

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

.btn--solid {
  background: var(--c-red);
  border-color: var(--c-red-deep);
  color: #fff;
}

.btn--solid:hover {
  background: var(--c-red-deep);
  border-color: var(--c-red-deep);
  color: #fff;
}

.btn--gold {
  background: var(--c-gold-bright);
  border-color: var(--c-gold);
  color: var(--c-black);
}

.btn--gold:hover {
  background: var(--c-gold);
  border-color: var(--c-gold);
  color: var(--c-black);
}

/* 面包屑 */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 18px 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--c-ink);
}

.breadcrumbs a {
  color: var(--c-ink);
  text-decoration: none;
  border-bottom: 1px solid var(--c-line);
  transition: color 0.18s ease, border-color 0.18s ease;
}

.breadcrumbs a:hover {
  color: var(--c-red);
  border-bottom-color: var(--c-red);
}

.breadcrumbs__sep {
  color: var(--c-gold);
  margin: 0 2px;
}

.breadcrumbs__current {
  color: var(--c-red);
  font-weight: 600;
}

/* 正文容器 */
.prose {
  max-width: 38em;
  font-size: 17px;
  line-height: 1.8;
  color: var(--c-ink);
}

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

.prose h2 {
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.35;
  padding-top: 0.4em;
}

.prose h3 {
  font-size: 19px;
  font-weight: 700;
  color: var(--c-ink);
}

.prose a {
  color: var(--c-red);
  text-decoration-color: var(--c-line);
}

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

.prose ol { list-style: decimal; }

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

.prose blockquote {
  padding-left: 16px;
  border-left: 3px solid var(--c-gold);
  color: var(--c-ink);
  font-family: var(--font-display);
}

.prose code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  padding: 1px 5px;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  background: var(--c-panel);
}

/* 面板 */
.panel {
  position: relative;
  padding: clamp(16px, 2.2vw, 28px);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  background: var(--c-paper);
}

.panel--tint {
  background: var(--c-panel);
}

/* 卡片 */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  background: var(--c-paper);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

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

.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--c-line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--c-gold);
}

.card__body {
  flex: 1;
  padding: 18px;
}

/* 标签 */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border: 1px solid var(--c-gold);
  border-radius: 1px;
  background: rgba(199, 154, 58, 0.1);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: 0.08em;
  color: var(--c-ink);
}

.tag--red {
  border-color: var(--c-red);
  background: rgba(192, 57, 43, 0.1);
  color: var(--c-red);
}

.tag--green {
  border-color: var(--c-green);
  background: rgba(47, 122, 85, 0.1);
  color: var(--c-green);
}

/* 索引小标与章节标题 */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.2em;
  color: var(--c-gold);
  max-width: none;
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--c-gold);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(26px, 3.4vw, 40px);
  line-height: 1.24;
  letter-spacing: 0.01em;
  color: var(--c-black);
}

/* 分隔线 */
.rule {
  height: 1px;
  width: 100%;
  border: 0;
  margin: 0;
  background: var(--c-line);
}

/* 图片容器基础规则 */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(45deg, rgba(200, 189, 166, 0.34) 0 1px, transparent 1px 10px),
    var(--c-panel);
}

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

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

.media__caption {
  padding: 9px 12px;
  border-top: 1px solid var(--c-line);
  background: var(--c-paper);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--c-ink);
}

/* ---------- 8. 滚动显现 ---------- */
@media (prefers-reduced-motion: no-preference) {
  html.js [data-reveal] {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    transition-delay: var(--reveal-delay, 0ms);
  }

  html.js [data-reveal].is-visible {
    opacity: 1;
    transform: none;
  }
}

/* ---------- 9. 响应式 ---------- */
@media (max-width: 1180px) {
  .version-badge { display: none; }
}

@media (max-width: 1024px) {
  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
    row-gap: 34px;
  }

  .footer-brand { grid-column: 1 / -1; }

  .prose { max-width: 100%; }
}

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

  .site-header__top {
    padding: 10px 0 9px;
  }

  .brand__seal {
    width: 40px;
    height: 40px;
    font-size: 22px;
  }

  .brand__sub { display: none; }

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

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: none;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    border-top: 1px solid var(--c-line);
    border-bottom: 2px solid var(--c-ink);
    background: var(--c-paper);
    box-shadow: 0 26px 44px -26px rgba(20, 16, 14, 0.5);
  }

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

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
  }

  .site-nav__item + .site-nav__item {
    border-left: 0;
    border-top: 1px solid var(--c-line);
  }

  .site-nav__link {
    width: 100%;
    padding: 14px var(--gutter);
    border-bottom: 0;
    border-left: 3px solid transparent;
    font-size: 15px;
  }

  .site-nav__link:hover {
    border-bottom-color: transparent;
    border-left-color: var(--c-gold);
  }

  .site-nav__link[aria-current="page"] {
    border-bottom-color: transparent;
    border-left-color: var(--c-red);
    background: rgba(192, 57, 43, 0.07);
  }

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

@media (max-width: 640px) {
  .brand__name { font-size: 17px; }

  .site-header__tools { gap: 8px; }

  .btn { padding: 7px 12px; font-size: 13px; }

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

  .site-footer__grid {
    grid-template-columns: 1fr;
    row-gap: 28px;
  }

  .site-footer__base {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .footer-legal { gap: 4px; }
}

@media (max-width: 420px) {
  .site-header__tools .btn--ghost { display: none; }
}

/* ---------- 10. 降低动效偏好 ---------- */
@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;
    scroll-behavior: auto !important;
  }

  .scroll-progress { transition: none; }
}
