/* ==========================================================================
   南宫赛场 · 共享站点样式  /assets/site.css
   01 reset · 02 变量 · 03 基础排版 · 04 可访问性 · 05 布局工具
   06 标题工具 · 07 按钮 · 08 标签 · 09 卡片 · 10 图片容器
   11 面包屑 · 12 章节头 · 13 时间轴 · 14 标签页
   15 页头 · 16 页脚 · 17 响应式 · 18 动效偏好
   ========================================================================== */

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

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body,
h1, h2, h3, h4, h5, h6,
p, figure, blockquote,
ul, ol, dl, dd, address { 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; }

table { border-collapse: collapse; }

/* ---------- 02 变量 ---------- */
:root {
  --ink: #071A14;
  --cabinet: #0F2E24;
  --paper: #F4F0E6;
  --cyan: #35F2D6;
  --orange: #FF8A3D;
  --red: #E5484D;
  --yellow: #F5C542;
  --teal: #0E7C74;
  --mist: #9BB0A8;

  --line: rgba(53, 242, 214, 0.22);
  --line-soft: rgba(244, 240, 230, 0.12);
  --shadow-card: 0 26px 50px -36px rgba(0, 0, 0, 0.95);

  --font-display: "Barlow Condensed", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-editorial: "Noto Serif SC", "Songti SC", "Source Han Serif SC", "SimSun", serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 26px;
  --r-xl: 34px;
  --r-pill: 999px;

  --frame-max: 1440px;
  --gutter: clamp(14px, 3.4vw, 34px);
  --stack: clamp(18px, 2.6vw, 30px);
}

/* ---------- 03 基础排版 ---------- */
body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: clamp(15px, 0.42vw + 14px, 17px);
  font-weight: 400;
  line-height: 1.75;
  color: var(--paper);
  background-color: var(--ink);
  background-image:
    radial-gradient(1120px 520px at 88% -8%, rgba(53, 242, 214, 0.10), transparent 62%),
    radial-gradient(880px 520px at -6% 14%, rgba(255, 138, 61, 0.08), transparent 60%),
    repeating-linear-gradient(90deg, rgba(244, 240, 230, 0.028) 0 1px, transparent 1px 120px);
}

a { color: var(--cyan); text-decoration: none; }
a:hover { color: #8BFFF0; }

p { max-width: 70ch; }

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

code, kbd, samp, time, .mono {
  font-family: var(--font-mono);
  font-size: 0.86em;
  letter-spacing: 0.02em;
}

::selection { background: var(--cyan); color: #04241d; }

#main-content { display: block; }
#main-content:focus-visible { outline: 2px solid var(--cyan); outline-offset: 6px; }

/* ---------- 04 可访问性 ---------- */
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 14px;
  top: 10px;
  z-index: 200;
  padding: 0.6em 1.1em;
  border-radius: var(--r-pill);
  background: var(--cyan);
  color: #04241d;
  font-weight: 700;
  font-size: 0.9rem;
  transform: translateY(-180%);
  transition: transform 180ms ease;
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  color: #04241d;
  outline-offset: 2px;
}

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

body.nav-open { overflow: hidden; }

/* ---------- 05 布局工具 ---------- */
.shell {
  width: 100%;
  max-width: var(--frame-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.shell--narrow { max-width: 880px; }

.grid { display: grid; gap: clamp(14px, 2vw, 22px); }
.grid--split,
.grid--asym { grid-template-columns: minmax(0, 1fr); }

@media (min-width: 880px) {
  .grid--split {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: start;
  }
  .grid--asym {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: clamp(20px, 3vw, 36px);
  }
}

/* ---------- 06 标题工具 ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2rem, 5vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.editorial-title {
  font-family: var(--font-editorial);
  font-weight: 600;
  font-size: clamp(1.25rem, 2.2vw, 1.8rem);
  line-height: 1.35;
  letter-spacing: 0.01em;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cyan);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--orange);
  flex: 0 0 auto;
}

.lede {
  max-width: 62ch;
  color: var(--mist);
  font-size: 1.02rem;
}

/* ---------- 07 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  padding: 0.72em 1.3em;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease,
              color 160ms ease, transform 160ms ease;
}

.btn--primary { background: var(--orange); color: #241202; }
.btn--primary:hover,
.btn--primary:focus-visible { background: #FFA463; color: #241202; transform: translateY(-1px); }

.btn--ghost { background: transparent; border-color: var(--line); color: var(--paper); }
.btn--ghost:hover,
.btn--ghost:focus-visible { border-color: var(--cyan); color: var(--cyan); transform: translateY(-1px); }

.btn--quiet { background: rgba(53, 242, 214, 0.10); color: var(--cyan); }
.btn--quiet:hover,
.btn--quiet:focus-visible { background: rgba(53, 242, 214, 0.18); color: var(--cyan); }

/* ---------- 08 标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.22em 0.72em;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: rgba(244, 240, 230, 0.04);
  color: var(--mist);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.tag--cyan { background: var(--cyan); border-color: transparent; color: #04241d; }
.tag--orange { background: var(--orange); border-color: transparent; color: #2B1204; }
.tag--red { background: var(--red); border-color: transparent; color: #2B0507; }
.tag--yellow { background: var(--yellow); border-color: transparent; color: #2A2004; }

/* ---------- 09 卡片 ---------- */
.card {
  position: relative;
  padding: clamp(18px, 2.4vw, 26px);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  background: linear-gradient(165deg, rgba(15, 46, 36, 0.96), rgba(9, 32, 25, 0.94));
  box-shadow: var(--shadow-card);
}

.card--paper {
  background: var(--paper);
  border-color: rgba(7, 26, 20, 0.14);
  color: #0B241C;
}

.card--paper .card__title,
.card--paper strong { color: #0B241C; }

.card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.card__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.24rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.card__meta {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: var(--mist);
}

.card--paper .card__meta { color: #4A6A5F; }

/* ---------- 10 图片容器 ---------- */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  background:
    linear-gradient(140deg, rgba(14, 124, 116, 0.42), rgba(7, 26, 20, 0.92) 62%);
  isolation: isolate;
}

.media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(118deg, transparent 42%, rgba(53, 242, 214, 0.20) 50%, transparent 58%);
  mix-blend-mode: screen;
}

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

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

.media__label {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 3;
  padding: 0.2em 0.7em;
  border-radius: var(--r-pill);
  background: rgba(7, 26, 20, 0.78);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
}

.media__caption {
  margin-top: 10px;
  color: var(--mist);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

/* ---------- 11 面包屑 ---------- */
.breadcrumbs { margin-bottom: 18px; }

.breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  color: var(--mist);
}

.breadcrumbs__list li { display: flex; align-items: center; gap: 8px; }

.breadcrumbs__list li + li::before {
  content: "/";
  color: var(--teal);
}

.breadcrumbs a { color: var(--mist); }
.breadcrumbs a:hover { color: var(--cyan); }
.breadcrumbs [aria-current="page"] { color: var(--paper); }

/* ---------- 12 章节头 ---------- */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 18px;
  padding-bottom: 14px;
  margin-bottom: clamp(18px, 2.6vw, 28px);
  border-bottom: 1px dashed var(--line);
}

.section-head__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.5rem, 3vw, 2.3rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.section-head__note {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: var(--mist);
}

/* ---------- 13 时间轴 ---------- */
.timeline {
  position: relative;
  display: grid;
  gap: 18px;
  padding-left: 26px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--cyan), rgba(53, 242, 214, 0.06));
}

.timeline__item { position: relative; }

.timeline__item::before {
  content: "";
  position: absolute;
  left: -26px;
  top: 0.55em;
  width: 14px;
  height: 14px;
  border: 2px solid var(--cyan);
  border-radius: 50%;
  background: var(--ink);
}

.timeline__time {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  color: var(--cyan);
}

/* ---------- 14 标签页 ---------- */
.tabs { --tab-x: 0px; --tab-w: 0px; }

.tabs__list {
  position: relative;
  display: flex;
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-pill);
  background: rgba(7, 26, 20, 0.72);
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs__list::-webkit-scrollbar { display: none; }

.tabs__list::before {
  content: "";
  position: absolute;
  top: 5px;
  left: var(--tab-x);
  width: var(--tab-w);
  height: calc(100% - 10px);
  border-radius: var(--r-pill);
  background: var(--cyan);
  opacity: 0;
  pointer-events: none;
  transition: left 200ms ease, width 200ms ease, opacity 150ms ease;
}

.tabs.is-enhanced .tabs__list::before { opacity: 1; }

.tabs__tab {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  padding: 0.55em 1.05em;
  border-radius: var(--r-pill);
  color: var(--mist);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  white-space: nowrap;
  cursor: pointer;
  transition: color 160ms ease, background-color 160ms ease;
}

.tabs__tab:hover { color: var(--paper); }

.tabs__tab[aria-selected="true"] {
  background: var(--cyan);
  color: #04241d;
  font-weight: 600;
}

.tabs.is-enhanced .tabs__tab[aria-selected="true"] {
  background: transparent;
  color: #04241d;
}

.tabs__panel { padding-top: 18px; }
.tabs__panel[hidden] { display: none; }

/* ---------- 15 页头（框架式导航） ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  padding: 12px var(--gutter) 6px;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(7, 26, 20, 0.98) 58%, rgba(7, 26, 20, 0) 100%);
}

.site-header__frame {
  position: relative;
  z-index: 2;
  max-width: var(--frame-max);
  margin-inline: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(15, 46, 36, 0.98) 0%, rgba(7, 26, 20, 0.97) 100%);
  box-shadow: 0 24px 46px -32px #000, inset 0 1px 0 rgba(244, 240, 230, 0.07);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.6vw, 20px);
  padding: 10px clamp(10px, 1.6vw, 16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  padding: 4px 6px;
  border-radius: var(--r-pill);
  color: var(--paper);
  text-decoration: none;
}

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

.brand__mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(150deg, var(--cyan), var(--teal));
  color: #04241d;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.08;
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.18rem;
  letter-spacing: 0.02em;
  color: var(--paper);
}

.brand__sub {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mist);
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.4vw, 18px);
  margin-left: auto;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0.52em 0.78em;
  border-radius: var(--r-pill);
  color: var(--mist);
  font-size: 0.94rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 160ms ease, background-color 160ms ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--cyan);
  transform: translateX(-50%);
  transition: width 180ms ease;
}

.nav-link:hover {
  color: var(--paper);
  background: rgba(53, 242, 214, 0.08);
}

.nav-link[aria-current="page"] {
  color: var(--paper);
  background: rgba(53, 242, 214, 0.12);
}

.nav-link[aria-current="page"]::after { width: 18px; }

.nav-search {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.5em 0.9em;
  border: 1px dashed var(--line);
  border-radius: var(--r-pill);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.nav-search:hover {
  background: rgba(53, 242, 214, 0.10);
  border-color: var(--cyan);
  color: var(--cyan);
}

.nav-search__icon { width: 14px; height: 14px; flex: 0 0 auto; }
.nav-search__label { white-space: nowrap; }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 0.5em 0.9em;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: rgba(53, 242, 214, 0.08);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  cursor: pointer;
}

.nav-toggle__bars {
  display: grid;
  gap: 3px;
  width: 16px;
}

.nav-toggle__bar {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--cyan);
  transition: transform 180ms ease, opacity 180ms ease;
}

.site-header[data-open="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.site-header[data-open="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.site-header[data-open="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

.scroll-progress {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: rgba(53, 242, 214, 0.12);
  overflow: hidden;
  pointer-events: none;
}

.scroll-progress__bar {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--orange));
}

.nav-scrim {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: none;
  background: rgba(4, 16, 12, 0.68);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}

/* ---------- 16 页脚 ---------- */
.site-footer {
  padding: clamp(34px, 6vw, 76px) var(--gutter) clamp(18px, 3vw, 30px);
}

.site-footer__frame {
  max-width: var(--frame-max);
  margin-inline: auto;
  padding: clamp(22px, 3.4vw, 42px);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-xl);
  background: linear-gradient(180deg, rgba(15, 46, 36, 0.96), rgba(7, 26, 20, 0.98));
  box-shadow: 0 30px 60px -46px #000, inset 0 1px 0 rgba(244, 240, 230, 0.06);
}

.site-footer__grid {
  display: grid;
  gap: clamp(20px, 3vw, 34px);
  grid-template-columns: minmax(0, 1fr);
}

.footer-brand {
  display: grid;
  gap: 14px;
  align-content: start;
  max-width: 36ch;
}

.footer-brand__line {
  color: var(--mist);
  font-size: 0.92rem;
  line-height: 1.72;
}

.footer-brand__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--teal);
}

.footer-brand__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange);
  flex: 0 0 auto;
}

.footer-col {
  display: grid;
  gap: 10px;
  align-content: start;
}

.footer-col__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cyan);
}

.footer-col__title::before {
  content: "";
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: var(--orange);
  flex: 0 0 auto;
}

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

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  border-bottom: 1px solid transparent;
  color: var(--paper);
  font-size: 0.94rem;
  text-decoration: none;
  transition: color 160ms ease, border-color 160ms ease;
}

.footer-links a::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--teal);
  flex: 0 0 auto;
}

.footer-links a:hover {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}

.footer-contact {
  display: grid;
  gap: 10px;
  font-style: normal;
}

.footer-contact__row { display: grid; gap: 1px; }

.footer-contact__key {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal);
}

.footer-contact__val {
  font-family: var(--font-mono);
  font-size: 0.79rem;
  line-height: 1.65;
  letter-spacing: 0.02em;
  color: var(--paper);
  overflow-wrap: anywhere;
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
  margin-top: clamp(22px, 3vw, 34px);
  padding-top: 16px;
  border-top: 1px dashed var(--line);
  font-family: var(--font-mono);
  font-size: 0.71rem;
  letter-spacing: 0.04em;
  color: var(--mist);
}

.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
  max-width: none;
}

.site-footer__stamp {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.site-footer__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  flex: 0 0 auto;
}

.site-footer__note {
  max-width: 46ch;
  color: var(--mist);
  line-height: 1.6;
}

/* ---------- 17 响应式 ---------- */
@media (min-width: 680px) {
  .site-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; max-width: 42ch; }
}

@media (min-width: 1024px) {
  .site-footer__grid {
    grid-template-columns: 1.5fr 0.8fr 0.8fr 0.9fr 1.2fr;
    align-items: start;
  }
  .footer-brand { grid-column: auto; }
  .site-footer__note { text-align: right; }
}

@media (max-width: 1100px) {
  .nav-link { padding-inline: 0.6em; font-size: 0.9rem; }
  .nav-search__label { display: none; }
  .nav-search { padding: 0.5em 0.62em; }
}

@media (max-width: 959px) {
  .site-header { padding: 8px 8px 4px; }

  .site-header__frame { border-radius: 20px; }

  .brand__sub { display: none; }

  .nav-toggle { display: inline-flex; margin-left: auto; }

  .primary-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    display: block;
    margin: 0;
    padding: 22px 18px calc(26px + env(safe-area-inset-bottom));
    max-height: 80vh;
    overflow-y: auto;
    border-top: 1px solid var(--line);
    border-radius: 28px 28px 0 0;
    background: linear-gradient(180deg, rgba(15, 46, 36, 0.99), rgba(7, 26, 20, 0.99));
    box-shadow: 0 -30px 64px -26px rgba(0, 0, 0, 0.92);
    visibility: hidden;
    transform: translateY(110%);
    transition: transform 240ms cubic-bezier(0.22, 0.7, 0.3, 1), visibility 240ms;
  }

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

  .nav-scrim { display: block; }

  .site-header[data-open="true"] .nav-scrim {
    opacity: 1;
    pointer-events: auto;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    counter-reset: navidx;
  }

  .nav-list li { counter-increment: navidx; }

  .nav-link {
    width: 100%;
    gap: 12px;
    padding: 0.86em 0.9em;
    border-radius: 14px;
    font-size: 1rem;
  }

  .nav-link::before {
    content: "0" counter(navidx);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    color: var(--teal);
    min-width: 2.4ch;
  }

  .nav-link::after {
    left: auto;
    right: 16px;
    bottom: 50%;
    transform: translateY(50%);
    transition: width 180ms ease;
  }

  .nav-link[aria-current="page"] {
    box-shadow: inset 0 0 0 1px rgba(53, 242, 214, 0.34);
  }

  .nav-link[aria-current="page"]::after { width: 14px; }

  .nav-search {
    width: 100%;
    justify-content: center;
    margin-top: 16px;
    padding: 0.9em 1em;
    font-size: 0.8rem;
  }

  .nav-search__label { display: inline; }
}

@media (max-width: 520px) {
  .brand__mark { width: 34px; height: 34px; border-radius: 10px; font-size: 1.02rem; }
  .brand__name { font-size: 1.06rem; }
  .site-footer__grid { gap: 22px; }
  .site-footer__bottom { flex-direction: column; align-items: flex-start; }
}

/* ---------- 18 动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
