/* ==========================================================================
   博业主页 · 共享样式表  /assets/site.css
   暖纸 × 墨靛 × 琥珀 × 青瓷绿 —— 城市夜航坐标图册
   ========================================================================== */

/* ---------- 1. 设计令牌 ---------- */
:root {
  --ink: #111A2E;
  --navy: #1E2C4C;
  --paper: #F6F0E4;
  --paper-white: #FCF9F2;
  --amber: #E0A03C;
  --amber-soft: #F4DDB2;
  --amber-deep: #8A5A12;
  --celadon: #3F7F6C;
  --celadon-soft: #D3E5DD;
  --line: #C9C1B1;
  --vermilion: #C2452E;

  --ink-70: rgba(17, 26, 46, .70);
  --ink-45: rgba(17, 26, 46, .45);

  --font-sans: "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;

  --wrap: 1220px;
  --gutter: clamp(18px, 4vw, 44px);
  --r-lg: 28px;
  --r-md: 20px;
  --r-sm: 12px;
  --cmd-h: 72px;
  --cmd-h-scrolled: 56px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- 2. Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--cmd-h) + 28px);
}

body {
  margin: 0;
  min-height: 100%;
  background-color: var(--paper);
  background-image:
    linear-gradient(rgba(17, 26, 46, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 26, 46, .045) 1px, transparent 1px);
  background-size: 84px 84px, 84px 84px;
  background-position: 0 0, 0 0;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 700;
  line-height: 1.24;
  letter-spacing: -.012em;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--amber-deep); }

ul, ol { margin: 0; padding: 0; list-style: none; }

img, svg, video { max-width: 100%; display: block; }

button { font: inherit; }

hr { border: 0; border-top: 1px solid var(--line); margin: 0; }

::selection { background: var(--amber-soft); color: var(--ink); }

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

.cmd-bar :focus-visible,
.site-foot :focus-visible {
  outline-color: var(--amber-soft);
  outline-offset: 2px;
}

/* ---------- 3. 排版与工具类 ---------- */
.mono { font-family: var(--font-mono); letter-spacing: .02em; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .18em;
  color: var(--celadon);
  text-transform: uppercase;
}

.lede {
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.85;
  color: var(--ink-70);
  max-width: 36em;
}

.prose { max-width: 38em; font-size: 16.5px; }
.prose p { margin: 0 0 1.1em; }
.prose h3 { margin: 1.6em 0 .6em; font-size: 20px; }

.curve-rule {
  display: block;
  width: 100%;
  height: 26px;
  color: var(--line);
  margin: clamp(28px, 4vw, 56px) 0 0;
}

/* ---------- 4. 布局容器 ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 32px);
}

.col-3 { grid-column: span 3; }
.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; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(22px, 3.6vw, 60px);
  align-items: start;
}

.split--reverse { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }

.offset-up { transform: translateY(-34px); }
.offset-down { transform: translateY(34px); }

.section { padding: clamp(52px, 7.5vw, 104px) 0; }
.section--tight { padding: clamp(34px, 4.5vw, 62px) 0; }

.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px 18px;
  margin-bottom: clamp(20px, 3vw, 38px);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.section__num {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .1em;
  color: var(--ink);
  background: var(--amber-soft);
  border-radius: 6px;
  padding: 3px 10px;
}

.section__title { font-size: clamp(23px, 3.1vw, 36px); }
.section__head .lede { flex: 1 1 260px; margin-left: auto; }

/* ---------- 5. 跳转链接 ---------- */
.skip-link {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 200;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--amber);
  color: var(--ink);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition: top .2s var(--ease);
}

.skip-link:focus { top: 12px; }

/* ---------- 6. 命令栏 ---------- */
.cmd-bar {
  position: sticky;
  top: 0;
  z-index: 80;
  background-color: var(--navy);
  background-image:
    linear-gradient(rgba(246, 240, 228, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(246, 240, 228, .05) 1px, transparent 1px);
  background-size: 46px 46px, 46px 46px;
  color: var(--paper-white);
  border-bottom: 1px solid rgba(246, 240, 228, .16);
  box-shadow: 0 10px 30px -22px rgba(17, 26, 46, .8);
}

.cmd-bar__inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.6vw, 24px);
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
  min-height: var(--cmd-h);
  transition: min-height .3s var(--ease);
}

.cmd-bar[data-shrink="true"] .cmd-bar__inner { min-height: var(--cmd-h-scrolled); }

.cmd-bar__progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 2px;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--amber), var(--celadon));
  transition: transform .12s linear;
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  color: inherit;
  text-decoration: none;
}

.brand__mark { display: inline-flex; color: var(--amber); }
.brand__text { display: block; }
.brand__name {
  display: block;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .03em;
  line-height: 1.3;
}
.brand__sub {
  display: block;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .16em;
  color: rgba(246, 240, 228, .55);
  transition: opacity .25s var(--ease);
}
.cmd-bar[data-shrink="true"] .brand__sub { opacity: 0; }

/* 导航 */
.cmd-nav {
  flex: 1 1 auto;
  min-width: 0;
}
.cmd-nav__label { display: none; }

.cmd-nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
}

.cmd-nav__item { position: relative; }

.cmd-nav__item + .cmd-nav__item .cmd-nav__link::before {
  content: "";
  position: absolute;
  left: -3px;
  top: 50%;
  width: 1px;
  height: 13px;
  transform: translateY(-50%);
  background: rgba(246, 240, 228, .22);
}

.cmd-nav__link {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13.5px;
  color: rgba(246, 240, 228, .78);
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s var(--ease), background-color .2s var(--ease);
}

.cmd-nav__idx {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--amber);
  opacity: .9;
}

.cmd-nav__link:hover {
  color: var(--paper-white);
  background: rgba(246, 240, 228, .09);
}

.cmd-nav__link[aria-current="page"] {
  background: var(--amber);
  color: var(--ink);
  font-weight: 700;
}

.cmd-nav__link[aria-current="page"] .cmd-nav__idx { color: var(--ink); opacity: .72; }

/* 工具区 */
.cmd-bar__tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex: 0 0 auto;
}

.coord-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid rgba(246, 240, 228, .24);
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(246, 240, 228, .86);
  text-decoration: none;
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}

.coord-chip:hover { border-color: rgba(246, 240, 228, .6); background: rgba(246, 240, 228, .08); }

.coord-chip__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--celadon);
  box-shadow: 0 0 0 3px rgba(63, 127, 108, .3);
}

.cmd-search {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px dashed rgba(246, 240, 228, .3);
  background: rgba(246, 240, 228, .06);
  font-size: 12.5px;
  color: rgba(246, 240, 228, .78);
  text-decoration: none;
  transition: border-color .2s var(--ease), color .2s var(--ease);
}

.cmd-search:hover { border-color: var(--amber); color: var(--paper-white); }
.cmd-search__key { font-family: var(--font-mono); font-size: 11px; color: var(--amber-soft); }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease),
              border-color .2s var(--ease), transform .2s var(--ease);
}

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

.btn--amber { background: var(--amber); color: #20180A; }
.btn--amber:hover { background: #EFB158; }

.btn--ink { background: var(--ink); color: var(--paper-white); }
.btn--ink:hover { background: var(--navy); }

.btn--ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn--ghost:hover { border-color: var(--ink); background: var(--paper-white); }

.btn--quiet {
  background: var(--paper-white);
  border-color: var(--amber-soft);
  color: var(--amber-deep);
}
.btn--quiet:hover { background: var(--amber-soft); }

.cmd-bar__cta { padding: 8px 16px; font-size: 13.5px; white-space: nowrap; }

/* 移动导航按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 8px 14px;
  border: 1px solid rgba(246, 240, 228, .3);
  border-radius: 999px;
  background: transparent;
  color: var(--paper-white);
  font-size: 13px;
  cursor: pointer;
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}

.nav-toggle:hover { background: rgba(246, 240, 228, .1); }

.nav-toggle__bars {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  width: 16px;
}

.nav-toggle__bars > span {
  display: block;
  height: 1.5px;
  width: 100%;
  background: currentColor;
  transition: transform .25s var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars > span:first-child {
  transform: translateY(2.75px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars > span:last-child {
  transform: translateY(-2.75px) rotate(-45deg);
}

/* ---------- 7. 页脚 ---------- */
.site-foot {
  margin-top: clamp(48px, 7vw, 96px);
  background-color: var(--ink);
  background-image:
    linear-gradient(rgba(246, 240, 228, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(246, 240, 228, .045) 1px, transparent 1px);
  background-size: 46px 46px, 46px 46px;
  color: rgba(246, 240, 228, .78);
  font-size: 15px;
}

.site-foot__inner {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(44px, 6vw, 76px) var(--gutter) 26px;
}

.site-foot__top {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1.2fr);
  gap: clamp(26px, 4vw, 56px);
  padding-bottom: clamp(28px, 4vw, 46px);
  border-bottom: 1px solid rgba(246, 240, 228, .14);
}

.site-foot__name {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--paper-white);
  margin: 0 0 4px;
}

.site-foot__tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--amber);
  margin: 0 0 14px;
}

.site-foot__desc { max-width: 32em; color: rgba(246, 240, 228, .66); }

.site-foot__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  color: rgba(246, 240, 228, .48);
  margin: 0 0 14px;
}

.site-foot__links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 18px;
}

.site-foot__links a {
  color: rgba(246, 240, 228, .82);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}

.site-foot__links a:hover { color: var(--amber); border-bottom-color: currentColor; }

.site-foot__contact-list { display: grid; gap: 10px; }

.site-foot__contact-list li {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  color: rgba(246, 240, 228, .82);
  word-break: break-word;
}

.site-foot__contact-key {
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--celadon);
}

.site-foot__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  align-items: baseline;
  padding-top: 22px;
}

.site-foot__change {
  flex: 1 1 340px;
  max-width: 66em;
  font-size: 13.5px;
  color: rgba(246, 240, 228, .6);
}

.site-foot__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 0;
  font-size: 12px;
  color: rgba(246, 240, 228, .55);
}

.site-foot__icp { letter-spacing: .04em; }

/* ---------- 8. 通用组件 ---------- */
/* 面包屑 */
.crumbs {
  padding: clamp(18px, 2.4vw, 30px) 0 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--ink-45);
}

.crumbs ol { display: flex; flex-wrap: wrap; gap: 0 8px; }

.crumbs li + li::before {
  content: "/";
  margin-right: 8px;
  color: var(--line);
}

.crumbs a {
  color: var(--amber-deep);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.crumbs a:hover { border-bottom-color: currentColor; }

/* 卡片 / 展签 */
.card {
  position: relative;
  background: var(--paper-white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(20px, 2.4vw, 30px);
}

.card--ink {
  background: var(--navy);
  border-color: rgba(246, 240, 228, .16);
  color: rgba(246, 240, 228, .86);
}

.card--ink .card__body { color: rgba(246, 240, 228, .72); }

.card__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--celadon);
  text-transform: uppercase;
}

.card__title {
  margin: 10px 0 10px;
  font-size: clamp(19px, 2vw, 22px);
}

.card__body { font-size: 15.5px; color: var(--ink-70); }

/* 胶囊标签 */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.5;
}

.pill--amber { background: var(--amber-soft); color: var(--amber-deep); }
.pill--celadon { background: var(--celadon-soft); color: #23523f; }
.pill--line { border-color: var(--line); color: var(--ink-70); }
.pill--ink { background: var(--ink); color: var(--paper-white); }

/* 对照表 */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--paper-white);
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 15px;
}

.data-table caption {
  padding: 18px 20px 2px;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .12em;
  color: var(--ink-45);
}

.data-table th,
.data-table td {
  padding: 14px 20px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.data-table thead th {
  background: rgba(30, 44, 76, .05);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table .is-yes { color: var(--celadon); font-weight: 600; }
.data-table .is-no { color: var(--ink-45); }

/* 折叠面板 */
.acc { border-top: 1px solid var(--line); }

.acc__item { border-bottom: 1px solid var(--line); }

.acc__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  padding: 18px 4px;
  border: 0;
  background: none;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: color .2s var(--ease);
}

.acc__trigger:hover { color: var(--amber-deep); }

.acc__mark {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 18px;
  line-height: 1;
  color: var(--amber-deep);
  transition: transform .28s var(--ease);
}

.acc__trigger[aria-expanded="true"] .acc__mark { transform: rotate(45deg); }

.acc__panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height .34s var(--ease);
}

.acc__panel > * { padding-bottom: 18px; }

.acc__item[data-open="true"] .acc__mark { color: var(--celadon); }

/* 标签切换 */
.tabs__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: clamp(16px, 2vw, 26px);
}

.tab {
  padding: 8px 17px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-white);
  color: var(--ink-70);
  font-size: 13.5px;
  cursor: pointer;
  transition: background-color .22s var(--ease), color .22s var(--ease), border-color .22s var(--ease);
}

.tab:hover { border-color: var(--ink); color: var(--ink); }

.tab[aria-selected="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper-white);
  font-weight: 600;
}

.tabs__panel[hidden] { display: none; }

/* 左侧坐标轴 */
.rail {
  position: sticky;
  top: calc(var(--cmd-h-scrolled) + 26px);
  align-self: start;
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.rail__item {
  display: block;
  margin-left: -19px;
  padding: 7px 0 7px 17px;
  border-left: 2px solid transparent;
  font-size: 14px;
  color: var(--ink-45);
  text-decoration: none;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}

.rail__item:hover { color: var(--ink); }

.rail__item.is-current {
  border-left-color: var(--amber);
  color: var(--ink);
  font-weight: 600;
}

/* 视窗框景 */
.window {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(246, 240, 228, .16);
  border-radius: var(--r-lg);
  background: var(--navy);
  color: var(--paper-white);
}

.window__grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(246, 240, 228, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(246, 240, 228, .07) 1px, transparent 1px);
  background-size: 42px 42px, 42px 42px;
  mask-image: radial-gradient(120% 90% at 12% 0%, #000 30%, transparent 88%);
  -webkit-mask-image: radial-gradient(120% 90% at 12% 0%, #000 30%, transparent 88%);
}

.window__inner { position: relative; padding: clamp(26px, 3.6vw, 52px); }

.window__corner {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 1px solid var(--amber);
  pointer-events: none;
}

.window__corner--tl { top: 12px; left: 12px; border-right: 0; border-bottom: 0; }
.window__corner--tr { top: 12px; right: 12px; border-left: 0; border-bottom: 0; }
.window__corner--bl { bottom: 12px; left: 12px; border-right: 0; border-top: 0; }
.window__corner--br { bottom: 12px; right: 12px; border-left: 0; border-top: 0; }

/* 图像容器基础（页面阶段把 img 放入 .figure__media） */
.figure {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--navy);
}

.figure__media {
  position: relative;
  aspect-ratio: 16 / 10;
  background-image:
    linear-gradient(160deg, #1E2C4C 0%, #111A2E 62%, #16233C 100%);
}

.figure--tall .figure__media { aspect-ratio: 3 / 4; }
.figure--wide .figure__media { aspect-ratio: 21 / 9; }

.figure__media > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.figure__grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(246, 240, 228, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(246, 240, 228, .08) 1px, transparent 1px);
  background-size: 36px 36px, 36px 36px;
}

.figure__points {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.figure__point {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(224, 160, 60, .2);
}

.figure__point--celadon {
  background: var(--celadon);
  box-shadow: 0 0 0 4px rgba(63, 127, 108, .22);
}

.figure__caption {
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: var(--paper-white);
  color: var(--ink-70);
  font-size: 13px;
}

/* 页面右侧内容主线 */
.page-main { display: block; }

/* ---------- 9. 动效 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- 10. 响应式 ---------- */
@media (max-width: 1280px) {
  .cmd-nav__link { padding: 8px 9px; font-size: 13px; }
  .cmd-search { display: none; }
}

@media (max-width: 1040px) {
  .coord-chip { display: none; }
  .offset-up, .offset-down { transform: none; }
}

@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .cmd-bar__cta { padding: 8px 13px; font-size: 13px; }

  .cmd-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: block;
    background-color: var(--ink);
    background-image:
      linear-gradient(rgba(246, 240, 228, .05) 1px, transparent 1px),
      linear-gradient(90deg, rgba(246, 240, 228, .05) 1px, transparent 1px);
    background-size: 46px 46px, 46px 46px;
    border-top: 1px solid rgba(246, 240, 228, .14);
    border-bottom: 1px solid rgba(246, 240, 228, .18);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: max-height .34s var(--ease), opacity .24s var(--ease), visibility .34s;
  }

  .cmd-nav[data-open="true"] {
    max-height: min(78vh, 540px);
    overflow-y: auto;
    opacity: 1;
    visibility: visible;
  }

  .cmd-nav__label {
    display: block;
    margin: 0;
    padding: 18px 22px 4px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .16em;
    color: rgba(246, 240, 228, .45);
  }

  .cmd-nav__list { display: block; padding: 6px 12px 20px; }

  .cmd-nav__item + .cmd-nav__item .cmd-nav__link::before { display: none; }

  .cmd-nav__link {
    display: flex;
    align-items: baseline;
    padding: 14px 12px;
    border-bottom: 1px solid rgba(246, 240, 228, .09);
    border-radius: 12px;
    font-size: 16.5px;
  }

  .cmd-nav__item:last-child .cmd-nav__link { border-bottom: 0; }
  .cmd-nav__idx { font-size: 11px; }

  .grid-12 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .col-3, .col-4, .col-5, .col-6, .col-7, .col-8 { grid-column: span 6; }

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

  .rail {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 10px 0;
  }

  .rail__item {
    margin-left: 0;
    padding: 4px 0;
    border-left: 0;
    border-bottom: 2px solid transparent;
  }

  .rail__item.is-current { border-bottom-color: var(--amber); }

  .site-foot__top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-foot__brand { grid-column: span 2; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .cmd-bar__cta { display: none; }
  .brand__sub { display: none; }
  .site-foot__top { grid-template-columns: minmax(0, 1fr); }
  .site-foot__brand { grid-column: span 1; }
  .section__head .lede { margin-left: 0; }
}

@media (max-width: 420px) {
  .brand__name { font-size: 15px; }
  .nav-toggle { padding: 8px 12px; font-size: 12.5px; }
}

/* ---------- 11. 无障碍：减少动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }

  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .cmd-bar__progress { transition: none; }
}
