/* ==========================================================================
   UED主页 · 共享样式 /assets/site.css
   深海档案室 × 终端命令栏
   ========================================================================== */

:root {
  --abyss-900: #0A1A2A;
  --abyss-700: #122E45;
  --ink-600: #1B405C;
  --cyan-400: #3FE0CE;
  --amber-500: #F5A63C;
  --paper-100: #F3EFE6;
  --moss-600: #5A7A5F;
  --clay-500: #B96A45;
  --rock-400: #8C9499;
  --mist-100: #E8EDF0;

  --text: var(--mist-100);
  --text-dim: var(--rock-400);
  --surface: var(--ink-600);
  --accent: var(--cyan-400);
  --accent-2: var(--amber-500);
  --line: rgba(232, 237, 240, 0.14);
  --line-strong: rgba(63, 224, 206, 0.34);

  --font-sans: "Inter", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB",
    "Source Han Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  --font-mono: "IBM Plex Mono", "JetBrains Mono", ui-monospace, SFMono-Regular,
    Menlo, Consolas, "PingFang SC", monospace;

  --fs-xs: 12px;
  --fs-sm: 15px;
  --fs-base: 17px;
  --fs-md: 21px;
  --fs-lg: 26px;
  --fs-xl: 34px;
  --fs-2xl: 44px;
  --fs-3xl: 58px;
  --fs-4xl: 76px;

  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --radius-pill: 999px;

  --wrap: 1240px;
  --gutter: clamp(18px, 4vw, 48px);
  --ease: cubic-bezier(.2, .7, .3, 1);
  --shadow-soft: 0 28px 64px -34px rgba(0, 0, 0, 0.85);
}

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

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

body { margin: 0; }

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

body {
  background: var(--abyss-900);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--cyan-400); color: var(--abyss-900); }

:focus-visible {
  outline: 2px solid var(--cyan-400);
  outline-offset: 3px;
  border-radius: 8px;
}

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

/* ---------- 排版 ---------- */
.display-1 {
  font-size: clamp(40px, 7.2vw, var(--fs-4xl));
  line-height: 1.02;
  letter-spacing: -0.02em;
  font-weight: 900;
}
.display-2 {
  font-size: clamp(28px, 4vw, var(--fs-2xl));
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 800;
}
.display-3 {
  font-size: clamp(21px, 2.6vw, var(--fs-lg));
  line-height: 1.25;
  letter-spacing: -0.01em;
  font-weight: 700;
}
.lede {
  font-size: clamp(17px, 1.5vw, var(--fs-md));
  line-height: 1.7;
  color: var(--text-dim);
  max-width: 52ch;
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
  flex: 0 0 auto;
}
.mono {
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}
.vertical-note {
  writing-mode: vertical-rl;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.22em;
  color: var(--rock-400);
  text-transform: uppercase;
}
.rule {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 0;
}

.prose { max-width: 68ch; }
.prose p { margin-bottom: 1.1em; }
.prose p:last-child { margin-bottom: 0; }
.prose h2 {
  font-size: clamp(21px, 2.4vw, var(--fs-lg));
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 1.9em 0 0.6em;
}
.prose h3 {
  font-size: var(--fs-md);
  margin: 1.6em 0 0.5em;
}
.prose ul, .prose ol { margin: 0 0 1.1em; padding-left: 1.3em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: 0.35em; }
.prose a { color: var(--accent); text-underline-offset: 3px; }
.prose strong { color: var(--text); font-weight: 700; }

/* ---------- 容器与分区 ---------- */
.container {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: clamp(52px, 8vw, 116px); }
.section--abyss { background: var(--abyss-900); }
.section--paper {
  --text: #0A1A2A;
  --text-dim: #54636e;
  --surface: #FBF8F1;
  --accent: #12786e;
  --accent-2: #a8631c;
  --line: rgba(10, 26, 42, 0.14);
  --line-strong: rgba(10, 26, 42, 0.3);
  background: var(--paper-100);
  color: var(--text);
}

/* ---------- 栅格 ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 32px);
}
.col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; }
.col-6 { grid-column: span 6; }
.col-7 { grid-column: span 7; }
.col-8 { grid-column: span 8; }
.col-12 { grid-column: span 12; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
}
.split--reverse { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }

/* ---------- 按钮与标签 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease),
    border-color 0.18s var(--ease), transform 0.18s var(--ease);
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: var(--cyan-400);
  border-color: transparent;
  color: #062019;
}
.btn--primary:hover {
  background: #63efe2;
  border-color: transparent;
  color: #062019;
}
.btn--amber {
  background: var(--amber-500);
  border-color: transparent;
  color: #23150a;
}
.btn--amber:hover { background: #ffb757; color: #23150a; }
.btn--ghost { background: rgba(232, 237, 240, 0.04); }
.btn--sm { padding: 8px 15px; font-size: 13px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  text-transform: uppercase;
}
.chip--amber {
  border-color: rgba(245, 166, 60, 0.5);
  color: var(--amber-500);
  background: rgba(245, 166, 60, 0.1);
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: clamp(18px, 2.2vw, 30px);
  color: var(--text);
}
.card--flat { background: transparent; }

/* ---------- 面包屑 ---------- */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.06em;
  color: var(--text-dim);
}
.breadcrumbs__item { display: inline-flex; align-items: center; gap: 8px; }
.breadcrumbs__link {
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.breadcrumbs__link:hover { color: var(--accent); border-color: currentColor; }
.breadcrumbs__sep { color: var(--clay-500); }

/* ---------- 图片容器（页面阶段放置内容） ---------- */
.img-frame {
  position: relative;
  isolation: isolate;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(155deg, var(--ink-600), var(--abyss-700) 72%);
  border: 1px solid var(--line);
}
.img-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.img-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(63, 224, 206, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(63, 224, 206, 0.16) 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: 0.45;
  mix-blend-mode: screen;
}
.section--paper .img-frame::after {
  background-image:
    linear-gradient(rgba(10, 26, 42, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(10, 26, 42, 0.12) 1px, transparent 1px);
  mix-blend-mode: multiply;
}
.img-frame--wide { aspect-ratio: 21 / 9; }
.img-frame--tall { aspect-ratio: 3 / 4; }
.img-frame--square { aspect-ratio: 1 / 1; }
.img-frame__label {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 2;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  background: rgba(10, 26, 42, 0.78);
  border: 1px solid var(--line-strong);
  color: var(--cyan-400);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
}

/* ---------- 标签页 ---------- */
.tabs__list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px;
  border-radius: var(--radius-pill);
  background: rgba(232, 237, 240, 0.05);
  border: 1px solid var(--line);
}
.section--paper .tabs__list { background: rgba(10, 26, 42, 0.05); }
.tabs__tab {
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-dim);
  transition: background-color 0.16s var(--ease), color 0.16s var(--ease);
}
.tabs__tab:hover { color: var(--text); }
.tabs__tab[aria-selected="true"] {
  background: var(--cyan-400);
  color: #062019;
}
.tabs__panel { padding-top: 22px; }
.tabs__panel[hidden] { display: none; }

/* ---------- 显现 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.26s var(--ease), transform 0.26s var(--ease);
}
[data-reveal].is-revealed { opacity: 1; transform: none; }

/* ==========================================================================
   头部 · 紧凑命令栏
   ========================================================================== */
.skip-link {
  position: fixed;
  z-index: 200;
  top: 10px;
  left: 10px;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: var(--cyan-400);
  color: #062019;
  font-size: var(--fs-sm);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.2s var(--ease);
}
.skip-link:focus-visible { transform: translateY(0); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(10, 26, 42, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  color: var(--mist-100);
}
.site-header[data-condensed="true"] {
  background: rgba(10, 26, 42, 0.98);
  border-bottom-color: var(--line-strong);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 14px var(--gutter);
  transition: padding 0.22s var(--ease);
}
.site-header[data-condensed="true"] .site-header__inner {
  padding-top: 8px;
  padding-bottom: 8px;
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  color: var(--mist-100);
  text-decoration: none;
}
.brand__mark {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: linear-gradient(150deg, var(--cyan-400), #1E7F79 62%, var(--abyss-700));
  box-shadow: inset 0 0 0 1px rgba(10, 26, 42, 0.45);
  flex: 0 0 auto;
}
.brand__mark::after {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 4px;
  border: 2px solid var(--abyss-900);
  border-right-color: transparent;
  border-bottom-color: transparent;
  transform: rotate(45deg);
}
.brand__text { display: flex; flex-direction: column; line-height: 1.25; }
.brand__name {
  font-size: var(--fs-base);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.brand__meta {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rock-400);
}

/* 期号徽标 */
.issue-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.04em;
  color: var(--cyan-400);
  white-space: nowrap;
}
.issue-badge__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber-500);
  box-shadow: 0 0 0 4px rgba(245, 166, 60, 0.16);
  animation: issue-pulse 3.2s ease-in-out infinite;
}
@keyframes issue-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(245, 166, 60, 0.14); }
  50% { box-shadow: 0 0 0 7px rgba(245, 166, 60, 0.04); }
}

/* 主导航 */
.site-nav { margin-left: auto; }
.site-nav__list { display: flex; align-items: center; gap: 2px; }
.site-nav__link {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-sm);
  font-weight: 500;
  text-decoration: none;
  color: var(--mist-100);
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease);
}
.site-nav__num {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--rock-400);
}
.site-nav__link:hover { background: rgba(63, 224, 206, 0.12); color: #fff; }
.site-nav__link[aria-current="page"] {
  background: var(--cyan-400);
  color: #062019;
  font-weight: 700;
}
.site-nav__link[aria-current="page"] .site-nav__num { color: rgba(6, 32, 25, 0.6); }

.site-nav__head { display: none; }
.site-nav__foot { display: none; }
.site-nav__title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rock-400);
}
.site-nav__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  font-size: 20px;
  line-height: 1;
  color: var(--mist-100);
}
.site-nav__close:hover { border-color: var(--accent); color: var(--accent); }

/* 工具区 */
.cmdbar__tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.index-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  color: var(--mist-100);
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease);
}
.index-toggle:hover { border-color: var(--accent); color: var(--accent); }
.index-toggle[aria-expanded="true"] {
  border-color: var(--cyan-400);
  color: var(--cyan-400);
  background: rgba(63, 224, 206, 0.1);
}
.index-toggle__icon {
  width: 12px;
  height: 12px;
  background-image: radial-gradient(circle, currentColor 1.1px, transparent 1.2px);
  background-size: 6px 6px;
  background-position: 0 0;
  background-repeat: repeat;
  flex: 0 0 auto;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  color: var(--mist-100);
}
.nav-toggle:hover { border-color: var(--accent); color: var(--accent); }
.nav-toggle__bars { display: block; width: 18px; }
.nav-toggle__bars span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}
.nav-toggle__bars span + span { margin-top: 4px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* 索引面板 */
.site-index {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: var(--gutter);
  width: min(540px, calc(100vw - 2 * var(--gutter)));
  padding: 18px;
  border-radius: 24px;
  background: var(--abyss-700);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-soft);
  color: var(--mist-100);
}
.site-index[data-open="true"] { display: block; }
.site-index__head {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rock-400);
  margin-bottom: 12px;
}
.site-index__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}
.site-index__link {
  display: flex;
  align-items: baseline;
  gap: 9px;
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--mist-100);
  font-size: var(--fs-sm);
  transition: background-color 0.16s var(--ease), color 0.16s var(--ease);
}
.site-index__link:hover { background: rgba(63, 224, 206, 0.12); color: #fff; }
.site-index__link[aria-current="page"] {
  background: rgba(63, 224, 206, 0.16);
  color: var(--cyan-400);
}
.site-index__num {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--clay-500);
}
.site-index__label { font-weight: 600; }
.site-index__hint {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--rock-400);
}

/* 进度轨 */
.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  pointer-events: none;
  background-image: linear-gradient(90deg, var(--cyan-400), var(--amber-500));
  background-repeat: no-repeat;
  background-size: var(--progress, 0%) 100%;
}

/* 遮罩 */
.nav-scrim {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 5;
  background: rgba(5, 14, 23, 0.62);
  backdrop-filter: blur(2px);
}
.nav-scrim[data-open="true"] { display: block; }

body[data-nav-open="true"] { overflow: hidden; }

/* ==========================================================================
   页脚 · 档案柜
   ========================================================================== */
.site-footer {
  background: var(--abyss-900);
  color: var(--mist-100);
  border-top: 1px solid var(--line-strong);
  padding-block: clamp(44px, 6vw, 82px) 0;
}
.footer__inner {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 0.85fr 0.95fr 1.2fr;
  gap: clamp(20px, 3vw, 40px);
  padding-bottom: clamp(32px, 4vw, 56px);
}
.footer__col + .footer__col {
  border-left: 1px solid var(--line);
  padding-left: clamp(16px, 2vw, 28px);
}
.footer__col--brand { border-left: 0; padding-left: 0; }
.brand--footer { margin-bottom: 14px; }
.footer__blurb {
  font-size: var(--fs-sm);
  line-height: 1.7;
  color: var(--rock-400);
  max-width: 34ch;
}
.footer__stamp {
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: rgba(63, 224, 206, 0.18);
  line-height: 1;
}
.footer__heading {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rock-400);
  margin-bottom: 14px;
}
.footer__list { display: flex; flex-direction: column; gap: 9px; }
.footer__link {
  font-size: var(--fs-sm);
  text-decoration: none;
  color: var(--mist-100);
  border-bottom: 1px solid transparent;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.footer__link:hover { color: var(--cyan-400); border-color: currentColor; }
.footer__link[aria-current="page"] { color: var(--cyan-400); }
.footer__list--contact { gap: 12px; }
.footer__contact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: var(--fs-sm);
  line-height: 1.6;
}
.footer__contact-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--clay-500);
  padding-top: 3px;
  flex: 0 0 34px;
}
.footer__contact-value { color: var(--mist-100); flex: 1 1 12ch; }
.footer__note {
  margin-top: 14px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--rock-400);
  max-width: 30ch;
}
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 18px;
  border-top: 1px solid var(--line);
}
.footer__copy {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.04em;
  color: var(--rock-400);
}
.footer__legal { display: flex; flex-wrap: wrap; gap: 18px; }
.footer__legal .footer__link { font-size: var(--fs-xs); }

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

@media (max-width: 1079px) {
  .nav-toggle { display: inline-flex; }
  .issue-badge { margin-left: auto; }
  .cmdbar__tools { margin-left: 0; }

  .site-nav {
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 6;
    width: min(390px, 88vw);
    height: 100dvh;
    margin-left: 0;
    padding: calc(18px + env(safe-area-inset-top, 0px)) 22px 32px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    background: var(--abyss-700);
    border-left: 1px solid var(--line-strong);
    transform: translateX(103%);
    transition: transform 0.26s var(--ease);
    overflow-y: auto;
  }
  .site-nav[data-open="true"] { transform: none; }
  .site-nav__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }
  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }
  .site-nav__link {
    font-size: var(--fs-base);
    padding: 13px 12px;
    border-radius: var(--radius-sm);
    justify-content: flex-start;
    gap: 10px;
  }
  .site-nav__num { font-size: 11px; }
  .site-nav__foot {
    display: block;
    margin-top: auto;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.06em;
    line-height: 1.8;
    color: var(--rock-400);
  }
  .site-index {
    position: fixed;
    top: 78px;
    left: 12px;
    right: 12px;
    width: auto;
    max-height: calc(100dvh - 100px);
    overflow-y: auto;
  }

  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__col + .footer__col { border-left: 0; padding-left: 0; }
  .footer__col--brand { grid-column: 1 / -1; }
  .footer__blurb { max-width: 46ch; }
}

@media (max-width: 900px) {
  .col-4, .col-5, .col-6, .col-7, .col-8 { grid-column: span 6; }
  .split, .split--reverse { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 720px) {
  .site-header__inner { gap: 10px; padding-block: 11px; }
  html { scroll-padding-top: 88px; }
  .col-4, .col-5, .col-6, .col-7, .col-8, .col-12 { grid-column: 1 / -1; }
  .site-index__list { grid-template-columns: minmax(0, 1fr); }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 620px) {
  .issue-badge { display: none; }
  .cmdbar__tools { margin-left: auto; }
  .btn--sm { padding: 7px 12px; font-size: 12px; }
  .index-toggle { padding: 8px 11px; }
  .footer__grid { grid-template-columns: minmax(0, 1fr); }
  .footer__contact-label { flex-basis: 100%; padding-top: 0; }
}

@media (max-width: 400px) {
  .brand__name { font-size: var(--fs-sm); }
  .cmdbar__cta { display: none; }
}

/* ==========================================================================
   可访问性与动效降级
   ========================================================================== */
@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] { opacity: 1; transform: none; }
  .issue-badge__dot { animation: none; }
}
