/* ==========================================================================
   亚盈看台 · 共享样式表 /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, p, ul, ol, li, figure, figcaption, blockquote, dl, dt, dd, fieldset { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, svg, video { display: block; max-width: 100%; height: auto; }
button { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
table { border-collapse: collapse; width: 100%; }
main { display: block; }
hr { border: 0; border-top: 1px solid rgba(28, 26, 22, .2); margin: 0; }

/* ---------- 2. 变量 ---------- */
:root{
  --paper:#F5EFE3;
  --ink:#1C1A16;
  --ochre:#A8501F;
  --night:#145C63;
  --deep:#0E3B40;
  --cream:#EADFC6;
  --pitch:#2F7A3E;
  --whistle:#E0722D;
  --correct:#B03A2E;
  --note:#5C6A70;
  --shade:#2A2620;

  --line: rgba(28, 26, 22, .30);
  --line-soft: rgba(28, 26, 22, .14);
  --on-deep: rgba(245, 239, 227, .82);
  --on-deep-dim: rgba(245, 239, 227, .68);
  --mint: #9FC0C1;

  --font-head: "Oswald", "Arial Narrow", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-body: "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Roboto Mono", "JetBrains Mono", Menlo, Consolas, "PingFang SC", monospace;

  --wrap: 1220px;
  --gutter: 20px;
  --shadow-1: 3px 3px 0 rgba(42, 38, 32, .18);
  --shadow-2: 5px 5px 0 rgba(42, 38, 32, .24);
  --ease: 180ms cubic-bezier(.2, .7, .3, 1);
}

/* ---------- 3. 中文排版与页面底色 ---------- */
body{
  background-color: var(--paper);
  background-image:
    radial-gradient(rgba(28, 26, 22, .05) 1px, transparent 1px),
    radial-gradient(rgba(168, 80, 31, .035) 1px, transparent 1px);
  background-size: 4px 4px, 24px 24px;
  background-position: 0 0, 2px 2px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.75;
  letter-spacing: .004em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4{
  font-family: var(--font-head);
  font-weight: 700;
  font-stretch: condensed;
  letter-spacing: -.02em;
  line-height: 1.12;
  text-transform: uppercase;
  text-wrap: balance;
}
h1{ font-size: clamp(30px, 5vw, 52px); }
h2{ font-size: clamp(22px, 3vw, 32px); }
h3{ font-size: clamp(18px, 2vw, 22px); }
h4{ font-size: 16.5px; letter-spacing: -.005em; }

p{ text-wrap: pretty; }

.mono{ font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; letter-spacing: .02em; }
.num{ font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; font-weight: 700; }
.eyebrow{ font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--note); }
.small-note{ font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .04em; line-height: 1.7; color: var(--note); }

.link{
  color: var(--night);
  border-bottom: 1px solid rgba(20, 92, 99, .45);
  transition: color var(--ease), border-color var(--ease);
}
.link:hover, .link:focus-visible{ color: var(--whistle); border-bottom-color: var(--whistle); }

.rule-band{
  height: 8px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: repeating-linear-gradient(90deg,
    var(--ochre) 0 26px, var(--pitch) 26px 42px,
    var(--whistle) 42px 58px, var(--night) 58px 84px);
}

/* ---------- 4. 布局容器 ---------- */
.wrap{ width: min(100% - (var(--gutter) * 2), var(--wrap)); margin-inline: auto; }
#main-content{ scroll-margin-top: 88px; }
[data-section]{ scroll-margin-top: 96px; }

.grid{ display: grid; gap: var(--gap, 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--12{ grid-template-columns: repeat(12, minmax(0, 1fr)); }

.prose{ max-width: 40em; }
.prose > * + *{ margin-top: 1.5em; }
.prose ul, .prose ol{ padding-left: 1.35em; list-style: disc; }
.prose ol{ list-style: decimal; }
.prose li + li{ margin-top: .5em; }
.prose strong{ font-weight: 700; background: linear-gradient(transparent 62%, var(--cream) 62%); }

/* ---------- 5. 焦点与动效基线 ---------- */
:focus-visible{ outline: 2px solid var(--whistle); outline-offset: 2px; }

/* ---------- 6. 跳转链接 ---------- */
.skip-link{
  position: fixed;
  left: 12px;
  top: -80px;
  z-index: 320;
  padding: 10px 18px;
  background: var(--whistle);
  color: var(--ink);
  border: 1px solid var(--ink);
  box-shadow: var(--shadow-1);
  font-family: var(--font-head);
  font-size: 14px;
  letter-spacing: .06em;
  text-transform: uppercase;
  transition: top var(--ease);
}
.skip-link:focus{ top: 12px; }

/* ---------- 7. 滚动进度 ---------- */
.scroll-progress{
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--ochre) 0%, var(--whistle) 62%, var(--pitch) 100%);
  z-index: 300;
  pointer-events: none;
}

/* ---------- 8. 页头 ---------- */
.site-header{
  position: sticky;
  top: 0;
  z-index: 260;
  background-color: var(--paper);
  background-image: linear-gradient(180deg, rgba(234, 223, 198, .55) 0%, rgba(245, 239, 227, 0) 100%);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 0 rgba(42, 38, 32, .10);
}
.header-grid{
  display: grid;
  grid-template-columns: auto minmax(48px, 1fr) auto;
  align-items: center;
  column-gap: 26px;
  padding-block: 11px;
}
.brand-block{ display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.brand{
  display: inline-block;
  align-self: flex-start;
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(19px, 2.3vw, 25px);
  line-height: 1.05;
  letter-spacing: .03em;
  text-transform: uppercase;
  transition: border-color var(--ease), color var(--ease);
}
.brand:hover, .brand:focus-visible{ border-bottom-color: var(--whistle); color: var(--ochre); }
.brand-meta{
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .05em;
  color: var(--note);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 44vw;
}
.brand-meta b{ color: var(--ochre); font-weight: 700; }

.header-sash{ position: relative; height: 18px; align-self: center; }
.header-sash[hidden]{ display: none; }
.header-sash::before{
  content: "";
  position: absolute;
  top: 50%;
  left: -3%;
  right: -3%;
  height: 9px;
  transform: translateY(-50%) rotate(-3deg);
  background: linear-gradient(90deg,
    var(--ochre) 0 26%, var(--pitch) 26% 44%,
    var(--whistle) 44% 60%, var(--night) 60% 82%, var(--correct) 82% 100%);
  border: 1px solid rgba(28, 26, 22, .42);
  opacity: .92;
}
.header-sash::after{
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 9px;
  height: 9px;
  transform: translate(-50%, -50%) rotate(45deg);
  background: var(--paper);
  border: 1px solid rgba(28, 26, 22, .5);
}

.site-nav{ justify-self: end; min-width: 0; }
.nav-list{ display: flex; align-items: center; gap: clamp(10px, 1.4vw, 24px); }
.nav-list > li{ transform: translateY(0); }
.nav-list a{
  position: relative;
  display: inline-block;
  padding: 7px 2px 9px;
  font-family: var(--font-head);
  font-size: 13.5px;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ink);
  transition: color var(--ease);
}
.nav-list a::after{
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--whistle);
  transition: width var(--ease), height var(--ease);
}
.nav-list a:hover, .nav-list a:focus-visible{ color: var(--ochre); }
.nav-list a:hover::after, .nav-list a:focus-visible::after{ width: 100%; }
.nav-list a[aria-current="page"]{ color: var(--ochre); }
.nav-list a[aria-current="page"]::after{ width: 100%; height: 3px; }

@media (min-width: 900px){
  .nav-list > li:nth-child(1){ transform: translateY(-7px); }
  .nav-list > li:nth-child(2){ transform: translateY(5px); }
  .nav-list > li:nth-child(3){ transform: translateY(-3px); }
  .nav-list > li:nth-child(4){ transform: translateY(7px); }
  .nav-list > li:nth-child(5){ transform: translateY(-5px); }
  .nav-list > li:nth-child(6){ transform: translateY(3px); }
}

.nav-toggle{
  display: none;
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  align-items: center;
  gap: 9px;
  padding: 9px 15px;
  border: 1px solid var(--ink);
  background: var(--cream);
  font-family: var(--font-head);
  font-size: 12.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  box-shadow: var(--shadow-1);
  transition: background-color var(--ease), box-shadow var(--ease), color var(--ease);
}
.nav-toggle::before{
  content: "";
  width: 15px;
  height: 9px;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}
.nav-toggle[aria-expanded="true"]{ background: var(--whistle); box-shadow: 1px 1px 0 rgba(42, 38, 32, .2); }
.nav-toggle[aria-expanded="true"]::before{ border-bottom-color: transparent; }

/* ---------- 9. 页脚 ---------- */
.site-footer{
  margin-top: 72px;
  background: var(--deep);
  color: var(--paper);
  border-top: 5px solid var(--ochre);
}
.footer-masthead{
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 22px;
  padding-block: 26px 20px;
  border-bottom: 1px solid rgba(245, 239, 227, .22);
}
.footer-logo{
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(20px, 2.4vw, 26px);
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--paper);
}
.footer-stamp{ font-family: var(--font-mono); font-size: 12px; letter-spacing: .05em; color: var(--mint); }
.footer-stamp b{ color: var(--whistle); }
.footer-badge{
  margin-left: auto;
  padding: 3px 10px;
  border: 1px solid rgba(245, 239, 227, .35);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .08em;
  color: var(--mint);
}
.footer-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 30px 34px;
  padding-block: 38px 34px;
}
.footer-col{ min-width: 0; }
.footer-title{
  padding-bottom: 9px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(245, 239, 227, .24);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--mint);
}
.footer-list{ display: grid; gap: 9px; font-size: 14.5px; line-height: 1.6; color: var(--on-deep); }
.footer-list--plain li{ color: var(--on-deep); }
.footer-list a{
  border-bottom: 1px solid rgba(245, 239, 227, .28);
  padding-bottom: 1px;
  transition: color var(--ease), border-color var(--ease);
}
.footer-list a:hover, .footer-list a:focus-visible{ color: var(--whistle); border-bottom-color: var(--whistle); }
.footer-tag{
  display: inline-block;
  margin-right: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--whistle);
}
.footer-contact{
  margin-top: 10px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--on-deep);
  overflow-wrap: anywhere;
}
.site-footer .copy-btn{ border-color: rgba(245, 239, 227, .45); color: var(--paper); }
.site-footer .copy-btn:hover{ border-color: var(--whistle); color: var(--whistle); }
.footer-base{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 22px;
  padding-block: 16px 30px;
  border-top: 1px solid rgba(245, 239, 227, .22);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .03em;
  color: var(--on-deep-dim);
}
.footer-base-note{ flex: 1 1 320px; min-width: 0; }

/* ---------- 10. 堆叠面板 ---------- */
.panel{
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
  transition: box-shadow var(--ease), border-color var(--ease);
}
.panel:hover{ box-shadow: var(--shadow-2); border-color: rgba(28, 26, 22, .5); }
.panel-head{
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 12px;
  padding: 13px 18px;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
  transition: background-color var(--ease);
}
.panel:hover > .panel-head{ background-color: #E3D5B7; }
.panel-num{
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--ochre);
}
.panel-title{
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 17px;
  line-height: 1.2;
  letter-spacing: .005em;
  text-transform: uppercase;
}
.panel-meta{
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .05em;
  color: var(--note);
}
.panel-body{ padding: 20px; }
.panel-body > * + *{ margin-top: 14px; }
.panel-foot{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding: 12px 20px;
  border-top: 1px solid var(--line-soft);
  background: rgba(234, 223, 198, .42);
  font-size: 13.5px;
  color: var(--note);
}
.panel--ink{ background: var(--deep); color: var(--paper); border-color: rgba(14, 59, 64, .9); }
.panel--ink .panel-head{ background: rgba(245, 239, 227, .08); border-bottom-color: rgba(245, 239, 227, .24); }
.panel--ink:hover > .panel-head{ background: rgba(245, 239, 227, .14); }
.panel--ink .panel-num{ color: var(--whistle); }
.panel--ink .panel-foot{ background: rgba(0, 0, 0, .14); border-top-color: rgba(245, 239, 227, .2); color: var(--on-deep-dim); }
.panel--ochre .panel-head{ background: var(--ochre); border-bottom-color: rgba(28, 26, 22, .45); color: var(--paper); }
.panel--ochre .panel-num{ color: var(--cream); }
.panel--ochre:hover > .panel-head{ background: #96471B; }

[data-section]:target,
[data-section].is-current{
  border-color: var(--ochre);
  box-shadow: inset 6px 0 0 var(--whistle), var(--shadow-2);
}

/* ---------- 11. 标签 ---------- */
.tag{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 9px;
  border: 1px solid var(--line);
  background: var(--cream);
  color: var(--shade);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .07em;
  text-transform: uppercase;
  white-space: nowrap;
}
.tag--pitch{ background: rgba(47, 122, 62, .14); border-color: rgba(47, 122, 62, .5); color: #1F5B2C; }
.tag--whistle{ background: rgba(224, 114, 45, .16); border-color: rgba(224, 114, 45, .55); color: #8A4212; }
.tag--correct{ background: rgba(176, 58, 46, .13); border-color: rgba(176, 58, 46, .5); color: #8E2C22; }
.tag--night{ background: rgba(20, 92, 99, .12); border-color: rgba(20, 92, 99, .45); color: #0F474D; }
.tag--ochre{ background: rgba(168, 80, 31, .12); border-color: rgba(168, 80, 31, .5); color: #7E3A15; }

/* ---------- 12. 按钮 ---------- */
.btn{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-head);
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  box-shadow: var(--shadow-1);
  transition: background-color var(--ease), box-shadow var(--ease), color var(--ease), transform var(--ease), border-color var(--ease);
}
.btn:hover{ background: var(--cream); box-shadow: var(--shadow-2); transform: translate(-1px, -1px); }
.btn:active{ box-shadow: 1px 1px 0 rgba(42, 38, 32, .2); transform: translate(2px, 2px); }
.btn--primary{ background: var(--whistle); }
.btn--primary:hover{ background: #EF8139; }
.btn--night{ background: var(--night); color: var(--paper); border-color: var(--deep); }
.btn--night:hover{ background: #0E4A50; }
.btn--ghost{ background: transparent; border-color: var(--night); color: var(--night); box-shadow: none; }
.btn--ghost:hover{ background: rgba(20, 92, 99, .08); border-color: var(--ochre); color: var(--ochre); transform: none; }

/* ---------- 13. 面包屑 ---------- */
.crumbs{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 8px;
  padding-block: 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .05em;
  color: var(--note);
}
.crumbs li{ display: inline-flex; align-items: center; gap: 8px; }
.crumbs li:not(:last-child)::after{ content: "›"; color: rgba(92, 106, 112, .65); }
.crumbs a{ border-bottom: 1px solid rgba(92, 106, 112, .45); transition: color var(--ease), border-color var(--ease); }
.crumbs a:hover, .crumbs a:focus-visible{ color: var(--whistle); border-bottom-color: var(--whistle); }

/* ---------- 14. 图片容器 ---------- */
.figure{
  margin: 0;
  border: 1px solid var(--line);
  background: var(--cream);
  box-shadow: var(--shadow-1);
  overflow: hidden;
  transition: box-shadow var(--ease), border-color var(--ease);
}
.figure:hover{ box-shadow: var(--shadow-2); border-color: rgba(28, 26, 22, .5); }
.figure img{
  width: 100%;
  aspect-ratio: var(--ratio, 16 / 9);
  object-fit: cover;
  filter: saturate(.95) contrast(1.02);
  transition: filter var(--ease);
}
.figure:hover img{ filter: saturate(1.06) contrast(1.05); }
.figure-cap{
  padding: 9px 12px;
  border-top: 1px solid var(--line-soft);
  background: rgba(234, 223, 198, .5);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .03em;
  color: var(--note);
}
.img-frame{
  position: relative;
  overflow: hidden;
  aspect-ratio: var(--ratio, 16 / 9);
  background: var(--cream);
  border: 1px solid var(--line);
}
.img-frame img{ position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.img-frame--tall{ --ratio: 3 / 4; }
.img-frame--wide{ --ratio: 21 / 9; }
.img-frame--square{ --ratio: 1 / 1; }

/* ---------- 15. 目录 ---------- */
.toc{ position: sticky; top: 96px; align-self: start; }
.toc-title{
  padding-bottom: 8px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--note);
}
.toc-list{ display: grid; gap: 2px; }
.toc-list a{
  display: block;
  padding: 7px 12px;
  border-left: 2px solid var(--line-soft);
  font-size: 14.5px;
  color: var(--note);
  transition: color var(--ease), border-color var(--ease), background-color var(--ease);
}
.toc-list a:hover{ color: var(--ink); border-left-color: var(--night); background: rgba(234, 223, 198, .5); }
.toc-list a[aria-current="true"]{ color: var(--ochre); border-left-color: var(--whistle); background: var(--cream); font-weight: 600; }

/* ---------- 16. 键值行 ---------- */
.kv{ display: grid; border-top: 1px solid var(--line-soft); }
.kv-row{
  display: grid;
  grid-template-columns: minmax(0, 7.5rem) minmax(0, 1fr);
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14.5px;
}
.kv-key{ font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; color: var(--note); padding-top: 3px; }
.kv-val{ font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

/* ---------- 17. 复制按钮 ---------- */
.copy-btn{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 5px 10px;
  border: 1px dashed rgba(92, 106, 112, .6);
  background: transparent;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .03em;
  text-align: left;
  overflow-wrap: anywhere;
  transition: border-color var(--ease), color var(--ease), background-color var(--ease);
}
.copy-btn:hover, .copy-btn:focus-visible{ border-color: var(--whistle); color: var(--whistle); }
.copy-btn[data-copied]{
  border-style: solid;
  border-color: var(--pitch);
  color: var(--pitch);
  background: rgba(47, 122, 62, .1);
}

/* ---------- 18. 筛选条 ---------- */
.filter-bar{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--cream);
  border: 1px solid var(--line);
}
.filter-chip{
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .04em;
  cursor: pointer;
  transition: background-color var(--ease), border-color var(--ease), color var(--ease);
}
.filter-chip:hover{ border-color: var(--whistle); color: var(--ochre); }
.filter-chip input{ position: absolute; width: 1px; height: 1px; opacity: 0; }
.filter-chip:has(input:checked){ background: var(--whistle); border-color: var(--ink); color: var(--ink); }
.filter-chip:has(input:focus-visible){ outline: 2px solid var(--whistle); outline-offset: 2px; }

/* ---------- 19. 平板 ---------- */
@media (max-width: 1080px){
  .footer-grid{ gap: 26px 26px; }
  .toc{ position: static; top: auto; }
}

/* ---------- 20. 手机 / 窄屏 ---------- */
@media (max-width: 899px){
  .header-grid{
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 14px;
    padding-block: 10px;
  }
  .brand-block{ grid-column: 1; grid-row: 1; }
  .brand-meta{ max-width: 62vw; }
  .nav-toggle{ display: inline-flex; }
  .header-sash{ display: none !important; }
  .site-nav{ grid-column: 1 / -1; grid-row: 2; justify-self: stretch; display: none; }
  .site-nav[data-open]{ display: block; }
  .nav-list{
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-top: 8px;
    margin-top: 8px;
    border-top: 1px solid rgba(28, 26, 22, .24);
  }
  .nav-list > li{ transform: none; }
  .nav-list a{
    display: block;
    padding: 13px 4px;
    border-bottom: 1px solid var(--line-soft);
    font-size: 15px;
  }
  .nav-list a::after{ display: none; }
  .nav-list a[aria-current="page"]{
    padding-left: 12px;
    box-shadow: inset 4px 0 0 var(--whistle);
    background: rgba(234, 223, 198, .55);
  }
  .footer-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-badge{ margin-left: 0; }
}

@media (max-width: 600px){
  :root{ --gutter: 16px; }
  body{ font-size: 16px; }
  .grid--2, .grid--3, .grid--4{ grid-template-columns: minmax(0, 1fr); }
  .grid--12{ grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .footer-grid{ grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .kv-row{ grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .site-footer{ margin-top: 52px; }
}

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