/* ==========================================================================
   伟德指南 / site.css
   港口年鉴：墨蓝装订布 + 暖砂金装订线 + 堆叠画板
   ========================================================================== */

/* ---------- 01 重置 ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body,
h1, h2, h3, h4, h5, p,
figure, blockquote, dl, dd, ul, ol { 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;
  padding: 0;
  cursor: pointer;
}

a { color: inherit; text-decoration: none; }

::selection { background: #C9A227; color: #0B1B2B; }

/* ---------- 02 变量 ---------- */
:root {
  --ink-900: #0B1B2B;
  --ink-800: #10263A;
  --ink-700: #17334B;
  --ink-600: #23485F;
  --slate-400: #7C93A3;
  --mist-200: #C9D6DD;
  --paper-100: #F4F1E9;
  --paper-050: #FBFAF6;
  --gold-500: #C9A227;
  --gold-300: #E4C97A;
  --teal-500: #3E7C82;

  --gold-line: rgba(201, 162, 39, 0.42);
  --gold-line-soft: rgba(201, 162, 39, 0.2);
  --ink-line: rgba(35, 72, 95, 0.75);

  --font-display: "Source Han Sans Heavy", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "Source Han Sans", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Consolas", "Roboto Mono", monospace;

  --wrap: 1180px;
  --gutter: 20px;
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
}

/* ---------- 03 基础排版 ---------- */
body {
  min-height: 100vh;
  background: var(--ink-900);
  color: var(--mist-200);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--paper-050);
}

h1 { font-size: clamp(32px, 4.6vw, 56px); }
h2 { font-size: clamp(24px, 3vw, 32px); }
h3 { font-size: clamp(18px, 2vw, 20px); }

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--gold-300);
  outline-offset: 3px;
}

#main-content:focus { outline: none; }

/* ---------- 04 工具与容器 ---------- */
.container {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding: clamp(40px, 6vw, 72px) 0; }

.visually-hidden {
  position: absolute;
  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;
}

.label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--slate-400);
}

.numeric {
  font-family: var(--font-mono);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: var(--slate-400);
}

/* ---------- 05 面板（堆叠画板） ---------- */
.panel {
  position: relative;
  padding: clamp(32px, 5vw, 64px) 0;
  background: var(--ink-800);
}

.panel--ink800 { background: var(--ink-800); }

.panel--ink700 {
  background: var(--ink-700);
  background-image: repeating-linear-gradient(
    0deg,
    rgba(201, 214, 221, 0.025) 0 1px,
    transparent 1px 4px
  );
}

.panel--paper {
  background: var(--paper-100);
  background-image: repeating-linear-gradient(
    180deg,
    rgba(11, 27, 43, 0.045) 0 1px,
    transparent 1px 5px
  );
  color: var(--ink-900);
}

.panel--paper h1,
.panel--paper h2,
.panel--paper h3,
.panel--paper h4 { color: var(--ink-900); }

.panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 16px;
  padding-bottom: 14px;
  margin-bottom: clamp(20px, 3vw, 32px);
  border-bottom: 1px solid var(--gold-line);
}

.panel__num {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--gold-300);
  font-variant-numeric: tabular-nums;
}

.panel__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(22px, 2.8vw, 30px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: inherit;
}

.panel--paper .panel__num { color: var(--gold-500); }

/* ---------- 06 栅格 ---------- */
.grid {
  display: grid;
  gap: clamp(16px, 2.4vw, 28px);
}

.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--73 { grid-template-columns: minmax(0, 7fr) minmax(0, 3fr); }
.grid--64 { grid-template-columns: minmax(0, 6fr) minmax(0, 4fr); }
.grid--28 { grid-template-columns: minmax(0, 2fr) minmax(0, 8fr); }

/* ---------- 07 金线 · 标签 · 斜切 ---------- */
.rule {
  height: 1px;
  border: 0;
  background: var(--gold-line);
}

.rule--short {
  width: 24px;
  background: var(--gold-500);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 2px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  line-height: 1.4;
  border: 1px solid var(--ink-600);
  border-radius: 999px;
  color: var(--mist-200);
}

.tag--gold {
  border-color: var(--gold-line);
  color: var(--gold-300);
}

.tag--teal {
  border-color: var(--teal-500);
  background: rgba(62, 124, 130, 0.16);
  color: var(--mist-200);
}

.panel--paper .tag {
  border-color: rgba(11, 27, 43, 0.24);
  color: var(--ink-900);
}

.panel--paper .tag--gold {
  border-color: var(--gold-500);
  color: var(--ink-900);
}

.slant-cut {
  --slant: 22px;
  clip-path: polygon(0 0, 100% 0, calc(100% - var(--slant)) 100%, 0 100%);
}

/* ---------- 08 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.2;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  transition: background-color 0.18s var(--ease),
              border-color 0.18s var(--ease),
              color 0.18s var(--ease),
              transform 0.18s var(--ease);
}

.btn--primary {
  background: var(--gold-500);
  border-color: var(--gold-500);
  color: var(--ink-900);
}

.btn--primary:hover {
  background: var(--gold-300);
  border-color: var(--gold-300);
}

.btn--ghost {
  background: transparent;
  border-color: var(--gold-line);
  color: var(--mist-200);
}

.btn--ghost:hover {
  border-color: var(--gold-300);
  color: var(--gold-300);
}

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

/* ---------- 09 面包屑 ---------- */
.breadcrumb { margin-bottom: 18px; }

.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.breadcrumb__item {
  display: inline-flex;
  align-items: center;
}

.breadcrumb__item + .breadcrumb__item::before {
  content: "/";
  margin-right: 8px;
  color: var(--ink-600);
}

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

.breadcrumb__link:hover {
  color: var(--gold-300);
  border-bottom-color: var(--gold-line);
}

.breadcrumb__current { color: var(--gold-300); }

.panel--paper .breadcrumb__link { color: var(--ink-700); }
.panel--paper .breadcrumb__current { color: var(--ink-900); }

/* ---------- 10 正文 ---------- */
.prose {
  max-width: 34em;
  font-size: 17px;
  line-height: 1.75;
  color: var(--mist-200);
}

.prose > * + * { margin-top: 16px; }

.prose h2 {
  margin-top: 36px;
  font-size: 28px;
  letter-spacing: -0.02em;
}

.prose h3 {
  margin-top: 28px;
  font-size: 20px;
  letter-spacing: 0;
}

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

.prose ol { list-style: decimal; }

.prose li + li { margin-top: 8px; }

.prose a {
  color: var(--gold-300);
  border-bottom: 1px solid var(--gold-line);
  transition: border-color 0.18s var(--ease);
}

.prose a:hover { border-bottom-color: var(--gold-300); }

.prose blockquote {
  padding-left: 18px;
  border-left: 2px solid var(--gold-500);
  color: var(--mist-200);
  font-size: 18px;
}

.prose code {
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 1px 6px;
  background: rgba(35, 72, 95, 0.55);
  border-radius: 2px;
}

.panel--paper .prose { color: var(--ink-800); }
.panel--paper .prose a { color: var(--ink-900); border-bottom-color: var(--gold-500); }
.panel--paper .prose code { background: rgba(11, 27, 43, 0.08); }

/* ---------- 11 图片容器 ---------- */
.media {
  position: relative;
  overflow: hidden;
  background: var(--ink-700);
  border: 1px solid var(--gold-line-soft);
}

.media__img {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  filter: saturate(0.86) contrast(1.02);
}

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

.media__caption {
  padding: 10px 2px 0;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: 0.06em;
  color: var(--slate-400);
}

/* ---------- 12 目录 ---------- */
.toc {
  position: sticky;
  top: 120px;
  align-self: start;
  padding-top: 14px;
  border-top: 1px solid var(--gold-line);
}

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

.toc__link {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-height: 44px;
  padding: 6px 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--slate-400);
  transition: color 0.18s var(--ease);
}

.toc__link:hover { color: var(--mist-200); }

.toc__link[aria-current="location"] { color: var(--gold-300); }

.toc__num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-600);
}

.toc__link[aria-current="location"] .toc__num { color: var(--gold-500); }

/* ---------- 13 显现动效 ---------- */
[data-reveal] {
  transition: opacity 0.24s var(--ease), transform 0.24s var(--ease);
}

.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
}

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

/* ==========================================================================
   14 页头：居中刊头
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(11, 27, 43, 0.97);
  border-bottom: 1px solid var(--gold-line-soft);
}

.skip-link {
  position: fixed;
  top: -90px;
  left: 16px;
  z-index: 200;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  background: var(--gold-500);
  color: var(--ink-900);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  border-radius: 2px;
  transition: top 0.18s var(--ease);
}

.skip-link:focus,
.skip-link:focus-visible {
  top: 12px;
  outline: 2px solid var(--gold-300);
  outline-offset: 3px;
}

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  z-index: 150;
  pointer-events: none;
}

.reading-progress__bar {
  display: block;
  width: 100%;
  height: 1px;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--gold-500), var(--gold-300));
  box-shadow: 0 0 6px rgba(228, 201, 122, 0.45);
  transition: transform 0.1s linear;
}

body[data-no-progress] .reading-progress { display: none; }

.masthead {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 18px var(--gutter) 0;
  transition: padding 0.2s var(--ease);
}

.masthead__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--gold-line);
}

.masthead__meta {
  justify-self: start;
  align-self: end;
  padding-bottom: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--slate-400);
}

.masthead__brand { text-align: center; }

.brand {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(24px, 3.4vw, 40px);
  line-height: 1.05;
  letter-spacing: 0.06em;
  text-indent: 0.06em;
  color: var(--paper-050);
  transition: color 0.18s var(--ease);
}

.brand:hover { color: var(--gold-300); }

.brand__sub {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: 0.22em;
  text-indent: 0.22em;
  color: var(--slate-400);
}

.masthead__aside {
  justify-self: end;
  align-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 2px;
  margin-bottom: 2px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--mist-200);
  border-bottom: 1px solid transparent;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.masthead__aside:hover {
  color: var(--gold-300);
  border-bottom-color: var(--gold-line);
}

.masthead__arrow {
  display: inline-block;
  transition: transform 0.18s var(--ease);
}

.masthead__aside:hover .masthead__arrow { transform: translateX(3px); }

.navrow {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 0 10px;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--gold-line);
  border-radius: 2px;
  background: rgba(23, 51, 75, 0.55);
  color: var(--mist-200);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease);
}

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

.nav-toggle__icon {
  display: grid;
  gap: 4px;
  width: 18px;
}

.nav-toggle__line {
  display: block;
  height: 1px;
  background: currentColor;
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}

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

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

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

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

.site-nav { display: block; }

.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(2px, 1.6vw, 22px);
}

.site-nav__item { display: block; }

.site-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  font-size: 15px;
  letter-spacing: 0.05em;
  color: var(--mist-200);
  transition: color 0.18s var(--ease);
}

.site-nav__link::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 6px;
  height: 1px;
  background: var(--gold-500);
  transform: scaleX(0);
  transform-origin: 50% 50%;
  transition: transform 0.2s var(--ease), background-color 0.18s var(--ease);
}

.site-nav__link:hover { color: var(--gold-300); }

.site-nav__link:hover::after {
  transform: scaleX(1);
  background: var(--gold-300);
}

.site-nav__link[aria-current="page"] { color: var(--gold-300); }

.site-nav__link[aria-current="page"]::after {
  transform: scaleX(1);
  background: var(--gold-300);
}

/* 压缩态：刊头单行 */
.site-header[data-compact] .masthead {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-top: 6px;
  padding-bottom: 6px;
}

.site-header[data-compact] .masthead__inner {
  display: block;
  flex: 0 0 auto;
  padding-bottom: 0;
  border-bottom: 0;
}

.site-header[data-compact] .masthead__meta,
.site-header[data-compact] .masthead__aside { display: none; }

.site-header[data-compact] .masthead__brand { text-align: left; }

.site-header[data-compact] .brand {
  font-size: 18px;
  letter-spacing: 0.12em;
  text-indent: 0.12em;
}

.site-header[data-compact] .brand__sub { display: none; }

.site-header[data-compact] .navrow {
  flex: 1 1 auto;
  padding: 0;
  justify-content: center;
}

.site-header[data-compact] .site-nav__list {
  gap: clamp(0px, 1.2vw, 14px);
}

.site-header[data-compact] .site-nav__link {
  min-height: 40px;
  padding: 0 6px;
  font-size: 14px;
}

.site-header[data-compact] .site-nav__link::after {
  left: 6px;
  right: 6px;
  bottom: 5px;
}

/* ==========================================================================
   15 页脚
   ========================================================================== */
.site-footer {
  position: relative;
  margin-top: 0;
  padding: clamp(40px, 6vw, 72px) 0 0;
  background: var(--ink-900);
  border-top: 1px solid var(--gold-line);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 50%;
  width: 84px;
  height: 1px;
  transform: translateX(-50%);
  background: var(--gold-300);
}

.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.35fr);
  gap: clamp(24px, 4vw, 48px);
}

.footer__col { min-width: 0; }

.footer__wordmark {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: 0.08em;
  color: var(--paper-050);
}

.footer__tagline {
  margin-top: 12px;
  max-width: 22em;
  font-size: 14px;
  line-height: 1.75;
  color: var(--slate-400);
}

.footer__since {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--gold-500);
}

.footer__heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-300);
}

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

.footer__list {
  display: flex;
  flex-direction: column;
}

.footer__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 15px;
  color: var(--mist-200);
  transition: color 0.18s var(--ease);
}

.footer__link:hover { color: var(--gold-300); }

.footer__note {
  margin-top: 12px;
  max-width: 20em;
  font-size: 13px;
  line-height: 1.7;
  color: var(--slate-400);
}

.footer__contact-item + .footer__contact-item {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--ink-line);
}

.footer__contact-label {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--slate-400);
}

.footer__contact-value {
  margin-top: 2px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--mist-200);
  overflow-wrap: anywhere;
}

.footer__contact-note {
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--slate-400);
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: clamp(32px, 5vw, 56px);
  padding: 18px 0 22px;
  border-top: 1px solid var(--gold-line-soft);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--slate-400);
}

.footer__copyright,
.footer__icp {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   16 响应式
   ========================================================================== */
@media (max-width: 1080px) {
  .grid--73,
  .grid--64 { grid-template-columns: minmax(0, 1fr); }

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

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

  .toc {
    position: static;
    top: auto;
  }

  .media--tall .media__img { aspect-ratio: 4 / 3; }
}

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

  .masthead { padding-top: 14px; }

  .masthead__inner {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 8px;
    padding-bottom: 12px;
  }

  .masthead__meta {
    justify-self: center;
    padding-bottom: 0;
    font-size: 10px;
    letter-spacing: 0.18em;
  }

  .masthead__aside { display: none; }

  .brand { font-size: clamp(26px, 7vw, 34px); }

  .brand__sub {
    margin-top: 6px;
    font-size: 10px;
    letter-spacing: 0.16em;
    text-indent: 0.16em;
  }

  .navrow {
    justify-content: center;
    padding: 8px 0 12px;
  }

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

  .site-nav {
    position: absolute;
    top: 100%;
    left: calc(-1 * var(--gutter));
    right: calc(-1 * var(--gutter));
    z-index: 70;
    display: none;
    padding: 6px var(--gutter) 14px;
    background: var(--ink-800);
    border-top: 1px solid var(--gold-line);
    border-bottom: 1px solid var(--gold-line);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  }

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

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

  .site-nav__item { border-bottom: 1px solid var(--ink-line); }

  .site-nav__item:last-child { border-bottom: 0; }

  .site-nav__link {
    display: flex;
    width: 100%;
    min-height: 52px;
    padding: 0 10px;
    font-size: 16px;
  }

  .site-nav__link::after { display: none; }

  .site-nav__link[aria-current="page"] {
    background: rgba(201, 162, 39, 0.08);
    box-shadow: inset 2px 0 0 var(--gold-500);
  }

  /* 压缩态在移动端保持单行，导航仍为抽屉 */
  .site-header[data-compact] .masthead {
    display: flex;
    gap: 12px;
    padding-top: 6px;
    padding-bottom: 6px;
  }

  .site-header[data-compact] .navrow {
    flex: 1 1 auto;
    justify-content: flex-end;
    padding: 0;
  }
}

@media (max-width: 600px) {
  :root { --gutter: 16px; }

  body {
    font-size: 16px;
    line-height: 1.8;
  }

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

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

  .footer__bottom {
    justify-content: flex-start;
    font-size: 11px;
  }

  .prose { max-width: none; }
  .prose h2 { font-size: 24px; }
  .prose h3 { font-size: 18px; }
}

/* ==========================================================================
   17 减少动效
   ========================================================================== */
@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;
  }

  [data-reveal],
  .js-reveal [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }

  .masthead__arrow { transition: none; }
  .reading-progress__bar { transition: none; }
}
