/* ============================================================
   /assets/site.css — 安信 CN 全站共享样式
   深靛蓝底 · 暖白内页 · 朱砂 / 松石 / 经幡黄状态色
   ============================================================ */

/* ---------- reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body, h1, h2, h3, h4, h5, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; }
a { color: inherit; }
iframe { border: 0; }

/* ---------- 变量 ---------- */
:root {
  --ink-0: #081324;
  --ink-1: #0B1B33;
  --ink-2: #12294A;
  --ink-3: #1B3760;

  --paper: #F4EEE3;
  --paper-2: #E5D8C4;
  --paper-3: #FBF7EF;

  --text: #14181F;
  --text-soft: #4A515B;

  --cinnabar: #B23A2E;
  --cinnabar-soft: #E07A69;
  --turquoise: #2F7F73;
  --turquoise-soft: #7FC3B6;
  --flag-blue: #6E8FB3;
  --flag-yellow: #C49A3A;
  --mist: #C9D2D9;

  --line-dark: rgba(244, 238, 227, .14);
  --line-dark-strong: rgba(244, 238, 227, .28);
  --line-light: rgba(20, 24, 31, .14);

  --rail-w: 88px;
  --bar-h: 60px;
  --strip-h: 4px;

  --font-display: "Noto Serif SC", "Source Han Serif SC", "Songti SC", Georgia, "Times New Roman", serif;
  --font-sans: system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --ease: cubic-bezier(.22, .68, .24, 1);
}

/* ---------- 基础排版 ---------- */
html { scroll-behavior: smooth; }

body {
  background: var(--ink-1);
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

@media (min-width: 961px) {
  body { padding-left: var(--rail-w); padding-top: var(--strip-h); }
}

@media (max-width: 960px) {
  body { padding-top: calc(var(--strip-h) + var(--bar-h)); }
}

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

:focus-visible {
  outline: 2px solid var(--flag-yellow);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: fixed;
  top: -80px;
  left: 12px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--paper);
  color: var(--text);
  font-size: 14px;
  letter-spacing: .06em;
  text-decoration: none;
  border-radius: 2px;
  box-shadow: 0 8px 24px rgba(8, 19, 36, .45);
  transition: top .2s var(--ease);
}
.skip-link:focus,
.skip-link:focus-visible { top: 12px; }

/* ---------- 排版层级 ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(44px, 7vw, 104px);
  line-height: .98;
  letter-spacing: -.03em;
}

.h2 {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.22;
  letter-spacing: -.01em;
}

.h3 {
  font-weight: 700;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.45;
  letter-spacing: -.005em;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--flag-blue);
}

.lede {
  font-size: clamp(16px, 1.6vw, 18px);
  line-height: 1.8;
  color: var(--mist);
  max-width: 34em;
}

.mono {
  font-family: var(--font-mono);
  font-size: .92em;
  letter-spacing: .02em;
}

/* ---------- 布局容器 ---------- */
.wrap {
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
  padding-inline: clamp(20px, 4vw, 48px);
}

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

.section--ink { background: var(--ink-1); color: var(--paper); }
.section--ink-2 { background: var(--ink-2); color: var(--paper); }
.section--paper { background: var(--paper); color: var(--text); }
.section--paper .lede { color: var(--text-soft); }
.section--paper .eyebrow { color: var(--turquoise); }
.section--paper .h2,
.section--paper .h3 { color: var(--text); }

.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 32px;
  margin-bottom: clamp(24px, 3vw, 44px);
}

/* ---------- 栅格 ---------- */
.grid { display: grid; gap: clamp(18px, 2.4vw, 32px); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--split { grid-template-columns: minmax(0, 1.45fr) minmax(0, .85fr); align-items: start; }

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

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 26px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .04em;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.btn--primary { background: var(--cinnabar); color: #FFF7F2; }
.btn--primary:hover { background: #9C3126; transform: translateY(-1px); }
.btn--ghost {
  background: transparent;
  color: var(--paper);
  border-color: var(--line-dark-strong);
}
.btn--ghost:hover { border-color: var(--paper); background: rgba(244, 238, 227, .07); }
.section--paper .btn--ghost { color: var(--text); border-color: rgba(20, 24, 31, .28); }
.section--paper .btn--ghost:hover { border-color: var(--text); background: rgba(20, 24, 31, .05); }

/* ---------- 状态徽章 ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border: 1px solid;
  border-radius: 3px;
  font-size: 12px;
  letter-spacing: .08em;
  line-height: 1.5;
  white-space: nowrap;
}
.chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}
.chip--version { color: var(--cinnabar-soft); border-color: rgba(224, 122, 105, .42); background: rgba(178, 58, 46, .16); }
.chip--ok { color: var(--turquoise-soft); border-color: rgba(47, 127, 115, .5); background: rgba(47, 127, 115, .18); }
.chip--archive { color: var(--flag-yellow); border-color: rgba(196, 154, 58, .42); background: rgba(196, 154, 58, .14); }
.chip--neutral { color: var(--mist); border-color: rgba(201, 210, 217, .32); background: rgba(201, 210, 217, .08); }

/* ---------- 面包屑 ---------- */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--mist);
}
.crumbs__item { display: inline-flex; align-items: center; gap: 8px; }
.crumbs a { color: var(--mist); text-decoration: none; border-bottom: 1px solid transparent; }
.crumbs a:hover { color: var(--paper); border-bottom-color: var(--line-dark-strong); }
.crumbs__sep { color: rgba(201, 210, 217, .38); }
.section--paper .crumbs { color: var(--text-soft); }
.section--paper .crumbs a { color: var(--text-soft); }
.section--paper .crumbs a:hover { color: var(--text); }
.section--paper .crumbs__sep { color: rgba(20, 24, 31, .3); }

/* ---------- 卡片 ---------- */
.card {
  position: relative;
  background: var(--paper);
  color: var(--text);
  border: 1px solid var(--line-light);
  border-radius: 3px;
  padding: clamp(20px, 2.4vw, 30px);
}
.card--ink {
  background: var(--ink-2);
  color: var(--paper);
  border-color: var(--line-dark);
}
.card--stack { box-shadow: 8px 8px 0 0 var(--paper-2); }
.card--ink.card--stack { box-shadow: 8px 8px 0 0 rgba(110, 143, 179, .22); }
.card__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--turquoise);
  margin-bottom: 10px;
}
.card--ink .card__label { color: var(--flag-blue); }

/* ---------- 图片容器（页面阶段放置图片占位） ---------- */
.media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: var(--media-ratio, 16 / 9);
  overflow: hidden;
  border: 1px solid var(--line-dark);
  border-radius: 3px;
  background:
    repeating-linear-gradient(90deg, rgba(110, 143, 179, .12) 0 1px, transparent 1px 44px),
    repeating-linear-gradient(0deg, rgba(110, 143, 179, .12) 0 1px, transparent 1px 44px),
    linear-gradient(155deg, #162E52 0%, #0B1B33 62%, #0A1526 100%);
}
.media img,
.media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.media--wide { --media-ratio: 21 / 9; }
.media--tall { --media-ratio: 3 / 4; }
.media--square { --media-ratio: 1 / 1; }
.media__caption {
  display: block;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .06em;
  color: var(--mist);
}
.section--paper .media { border-color: var(--line-light); }
.section--paper .media__caption { color: var(--text-soft); }

/* ---------- 正文 ---------- */
.prose {
  max-width: 38em;
  font-size: 17px;
  line-height: 1.85;
}
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-weight: 700; font-size: clamp(22px, 2.4vw, 28px); line-height: 1.35; letter-spacing: -.01em; margin-top: 1.8em; }
.prose h3 { font-weight: 700; font-size: 19px; line-height: 1.5; margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.2em; list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: .4em; }
.prose a { color: var(--cinnabar); text-decoration: underline; text-underline-offset: 3px; }
.section--ink .prose a { color: var(--cinnabar-soft); }

/* ---------- 章节索引 ---------- */
.toc { font-size: 13px; letter-spacing: .04em; }
.toc__link {
  display: block;
  padding: 7px 0 7px 14px;
  border-left: 1px solid var(--line-dark);
  color: var(--mist);
  text-decoration: none;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.toc__link:hover { color: var(--paper); }
.toc__link[aria-current="true"] {
  color: var(--paper);
  border-left-color: var(--cinnabar-soft);
}
.section--paper .toc__link { color: var(--text-soft); border-left-color: var(--line-light); }
.section--paper .toc__link:hover { color: var(--text); }
.section--paper .toc__link[aria-current="true"] { color: var(--text); border-left-color: var(--cinnabar); }

/* ---------- 显现动画协议 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .55s var(--ease), transform .55s var(--ease);
}
[data-reveal].is-in { opacity: 1; transform: none; }

/* ============================================================
   头部
   ============================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  width: 100%;
}

.version-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--strip-h);
  display: flex;
  z-index: 64;
  pointer-events: none;
}
.version-bar__seg { flex: 1 1 auto; height: 100%; }
.version-bar__seg:nth-child(1) { background: #2C4A72; }
.version-bar__seg:nth-child(2) { background: #D8CFC0; }
.version-bar__seg:nth-child(3) { background: #9E362B; }
.version-bar__seg:nth-child(4) { background: #2F7F73; }
.version-bar__seg:nth-child(5) { background: #B08B33; }

.rail {
  position: fixed;
  top: var(--strip-h);
  left: 0;
  width: var(--rail-w);
  height: calc(100vh - var(--strip-h));
  height: calc(100dvh - var(--strip-h));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 20px 8px 18px;
  border-right: 1px solid transparent;
  background: linear-gradient(180deg, rgba(8, 19, 36, .58) 0%, rgba(8, 19, 36, .16) 62%, rgba(8, 19, 36, 0) 100%);
  z-index: 62;
  transition: background-color .24s var(--ease), border-color .24s var(--ease), box-shadow .24s var(--ease);
}
.site-header.is-scrolled .rail {
  background: var(--ink-2);
  border-right-color: var(--line-dark);
  box-shadow: 0 10px 30px rgba(6, 14, 26, .35);
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--paper);
  flex: none;
}
.brand__seal {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(178, 58, 46, .85);
  border-radius: 5px;
  background: linear-gradient(150deg, rgba(178, 58, 46, .34), rgba(178, 58, 46, .08));
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 20px;
  line-height: 1;
  color: var(--paper);
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.brand:hover .brand__seal { border-color: var(--cinnabar-soft); }
.brand__name {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .22em;
  line-height: 1.4;
  text-align: center;
  white-space: nowrap;
}
.brand__sub {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .1em;
  color: var(--mist);
  margin-left: 3px;
}

/* 移动导航按钮（桌面隐藏） */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(244, 238, 227, .22);
  border-radius: 3px;
  color: var(--paper);
  cursor: pointer;
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.nav-toggle:hover { border-color: rgba(244, 238, 227, .48); background: rgba(244, 238, 227, .07); }
.nav-toggle__bars { display: flex; flex-direction: column; gap: 4px; width: 18px; }
.nav-toggle__bars span {
  display: block;
  height: 2px;
  width: 100%;
  border-radius: 1px;
  background: currentColor;
  transition: transform .25s var(--ease), opacity .2s var(--ease);
}
.nav-toggle__text { font-size: 12px; letter-spacing: .14em; }
.site-header[data-open] .nav-toggle__bars span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.site-header[data-open] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.site-header[data-open] .nav-toggle__bars span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* 主导航 */
.site-nav {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
}
.site-nav__list {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  overflow-y: auto;
  scrollbar-width: thin;
}
.site-nav__list::-webkit-scrollbar { width: 3px; }
.site-nav__list::-webkit-scrollbar-thumb { background: rgba(244, 238, 227, .22); border-radius: 2px; }

.nav-link {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  width: 100%;
  padding: 11px 0;
  font-size: 12px;
  letter-spacing: .06em;
  line-height: 1.4;
  color: var(--mist);
  text-decoration: none;
  transition: color .2s var(--ease);
}
.nav-link__num {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .1em;
  color: rgba(201, 210, 217, .45);
  transition: color .2s var(--ease);
}
.nav-link__label { white-space: nowrap; }
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 2px;
  height: 0;
  background: var(--cinnabar-soft);
  transform: translateY(-50%);
  transition: height .2s var(--ease);
}
.nav-link:hover { color: var(--paper); }
.nav-link:hover::after { height: 16px; }
.nav-link[aria-current="page"] { color: var(--paper); font-weight: 500; }
.nav-link[aria-current="page"] .nav-link__num { color: var(--cinnabar-soft); }
.nav-link[aria-current="page"]::after { height: 22px; }

.site-nav__foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding-top: 14px;
  margin-top: 12px;
  border-top: 1px solid var(--line-dark);
}
.rail-link {
  font-size: 11px;
  letter-spacing: .04em;
  line-height: 1.5;
  color: var(--mist);
  text-decoration: none;
  text-align: center;
  border-bottom: 1px solid transparent;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.rail-link:hover { color: var(--paper); border-bottom-color: var(--line-dark-strong); }
.rail-link--version {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .04em;
  color: var(--flag-blue);
}
.rail-link--version:hover { color: var(--cinnabar-soft); }

/* 阅读进度 */
.reading-progress {
  position: fixed;
  top: var(--strip-h);
  left: calc(var(--rail-w) - 2px);
  width: 2px;
  height: calc(100vh - var(--strip-h));
  height: calc(100dvh - var(--strip-h));
  background: rgba(244, 238, 227, .07);
  pointer-events: none;
  z-index: 63;
}
.reading-progress__fill {
  display: block;
  width: 100%;
  height: calc(var(--p, 0) * 100%);
  background: linear-gradient(180deg, var(--cinnabar-soft), var(--flag-yellow));
  transition: height .1s linear;
}

/* 抽屉遮罩（移动端） */
.nav-scrim { display: none; }

/* ============================================================
   页脚
   ============================================================ */
.site-footer {
  position: relative;
  overflow: hidden;
  background: var(--ink-1);
  color: var(--paper);
  border-top: 1px solid var(--line-dark);
  padding-top: clamp(48px, 6vw, 80px);
}
.footer__ridge {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 130px;
  pointer-events: none;
  opacity: .55;
  background: linear-gradient(180deg, rgba(110, 143, 179, .18), rgba(11, 27, 51, 0));
  clip-path: polygon(0 100%, 0 64%, 11% 44%, 21% 60%, 33% 27%, 45% 55%, 57% 35%, 69% 61%, 81% 41%, 91% 59%, 100% 45%, 100% 100%);
}
.site-footer .wrap { position: relative; z-index: 1; }

.footer__grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1.35fr 1fr;
  gap: clamp(24px, 3.4vw, 48px);
}
.footer__col { min-width: 0; }
.footer__col--brand { display: flex; flex-direction: column; align-items: flex-start; }

.brand--footer { flex-direction: row; align-items: center; gap: 12px; }
.brand--footer .brand__seal { width: 34px; height: 34px; font-size: 18px; }
.brand--footer .brand__name { font-size: 12px; letter-spacing: .2em; }

.footer__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}
.footer__inline {
  font-size: 12.5px;
  letter-spacing: .04em;
  color: var(--mist);
  text-decoration: none;
  border-bottom: 1px solid var(--line-dark-strong);
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.footer__inline:hover { color: var(--paper); border-bottom-color: var(--paper); }

.footer__title {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--mist);
  margin-bottom: 16px;
}
.footer__list { font-size: 14px; line-height: 1.7; }
.footer__list li + li { margin-top: 9px; }
.footer__list a {
  color: var(--mist);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.footer__list a:hover { color: var(--paper); border-bottom-color: var(--line-dark-strong); }
.footer__list--meta li { color: var(--mist); font-size: 13px; line-height: 1.65; }
.footer__list--meta .mono { color: var(--paper); }
.footer__plain { color: rgba(201, 210, 217, .8); font-family: var(--font-mono); font-size: 12px; }

.footer__base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 28px;
  margin-top: clamp(32px, 4vw, 56px);
  padding: 22px 0 30px;
  border-top: 1px solid var(--line-dark);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--mist);
}
.footer__legal { font-family: var(--font-mono); font-size: 11.5px; }
.footer__copy { font-size: 12px; }

/* 返回顶部 */
.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 55;
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  border: 1px solid var(--line-dark-strong);
  border-radius: 3px;
  background: var(--ink-2);
  color: var(--paper);
  font-size: 12px;
  letter-spacing: .12em;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s, border-color .2s var(--ease);
}
.to-top:hover { border-color: var(--cinnabar-soft); }
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }

/* ============================================================
   响应式：≤960px 窄栏转顶栏 + 抽屉导航
   ============================================================ */
@media (max-width: 960px) {
  html { scroll-padding-top: calc(var(--strip-h) + var(--bar-h) + 16px); }
  html.nav-open { overflow: hidden; }

  .rail {
    top: var(--strip-h);
    left: 0;
    width: 100%;
    height: var(--bar-h);
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 16px;
    border-right: 0;
    border-bottom: 1px solid transparent;
    background: linear-gradient(180deg, rgba(8, 19, 36, .86), rgba(8, 19, 36, .3));
  }
  .site-header.is-scrolled .rail {
    background: var(--ink-2);
    border-bottom-color: var(--line-dark);
    box-shadow: 0 8px 24px rgba(6, 14, 26, .4);
  }

  .brand { flex-direction: row; gap: 10px; }
  .brand__seal { width: 30px; height: 30px; font-size: 16px; }
  .brand__name { font-size: 12px; letter-spacing: .18em; }

  .nav-toggle { display: flex; }

  .site-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: min(84vw, 340px);
    height: 100vh;
    height: 100dvh;
    flex: none;
    padding: calc(var(--strip-h) + var(--bar-h) + 18px) 24px 28px;
    background: var(--ink-1);
    border-right: 1px solid var(--line-dark);
    overflow-y: auto;
    z-index: 70;
    transform: translateX(-102%);
    visibility: hidden;
    transition: transform .32s var(--ease), visibility .32s var(--ease);
  }
  .site-header[data-open] .site-nav { transform: translateX(0); visibility: visible; }

  .site-nav__list { justify-content: flex-start; overflow: visible; padding-top: 4px; }
  .nav-link {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 15px 2px;
    font-size: 17px;
    letter-spacing: .04em;
    border-bottom: 1px solid rgba(244, 238, 227, .1);
  }
  .nav-link__num { order: 2; font-size: 11px; }
  .nav-link::after { display: none; }
  .nav-link[aria-current="page"] { color: var(--paper); }
  .nav-link[aria-current="page"] .nav-link__label { border-bottom: 2px solid var(--cinnabar-soft); padding-bottom: 2px; }

  .site-nav__foot {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 8px 16px;
    padding-top: 20px;
  }
  .rail-link { font-size: 12.5px; }

  .nav-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 65;
    background: rgba(6, 14, 26, .62);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s var(--ease);
  }
  .site-header[data-open] .nav-scrim { opacity: 1; pointer-events: auto; }

  .reading-progress {
    top: calc(var(--strip-h) + var(--bar-h));
    left: 0;
    width: 100%;
    height: 2px;
    background: rgba(244, 238, 227, .08);
  }
  .reading-progress__fill {
    width: calc(var(--p, 0) * 100%);
    height: 100%;
    background: linear-gradient(90deg, var(--cinnabar-soft), var(--flag-yellow));
    transition: width .1s linear;
  }

  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__col--brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .footer__grid { grid-template-columns: minmax(0, 1fr); }
  .footer__base { flex-direction: column; align-items: flex-start; gap: 8px; }
  .to-top { right: 14px; bottom: 14px; padding: 9px 13px; }
}

/* ============================================================
   reduced-motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .reading-progress__fill { transition: none; }
}
