/* ============================================================
   利来赛场 · 全站共享样式  /assets/site.css
   高原赛场夜航感：深靛底色 + 经幡五色识别 + 煨桑暖橙主行动
   ============================================================ */

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

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

body,
h1, h2, h3, h4, h5, h6,
p, figure, blockquote, dl, dd, ul, ol {
  margin: 0;
}

ul, ol { padding: 0; }

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

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button { background: none; border: 0; }

table { border-collapse: collapse; }

/* ---------- 2. 变量 ---------- */
:root {
  /* 底色 */
  --ink-950: #080F1C;
  --ink-900: #0B1526;
  --ink-800: #111C33;
  --ink-700: #182545;

  /* 前景 */
  --snow: #F2EBDD;
  --white: #FAF6EC;
  --stone: #9A9488;
  --line: rgba(154, 148, 136, 0.18);
  --line-strong: rgba(154, 148, 136, 0.38);

  /* 经幡五色 + 数据色 */
  --blue: #2F6FA6;
  --red: #C85045;
  --green: #2F7D66;
  --yellow: #D7A43C;
  --ember: #E9773B;
  --ember-lift: #F08A52;
  --sand: #C9A15B;
  --teal: #2FA39A;

  /* 结构 */
  --rail-w: clamp(96px, 8.4vw, 124px);
  --shell-max: 1200px;
  --pad: clamp(20px, 4vw, 56px);
  --header-h: 62px;

  /* 圆角 */
  --radius-xs: 10px;
  --radius-sm: 16px;
  --radius-md: 24px;
  --radius-lg: 34px;
  --radius-pill: 999px;

  /* 字体 */
  --font-display: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", Georgia, serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  /* 动效 */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 200ms;
}

/* ---------- 3. 基础元素与中文排版 ---------- */
body {
  min-height: 100%;
  background-color: var(--ink-800);
  color: var(--snow);
  font-family: var(--font-display);
  font-size: clamp(16px, 0.28vw + 15.2px, 18px);
  line-height: 1.85;
  letter-spacing: 0.012em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.012em;
  color: var(--snow);
  text-wrap: balance;
}

p { text-wrap: pretty; }

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

small { font-size: 0.82em; }

hr {
  border: 0;
  height: 1px;
  background: var(--line);
}

::selection {
  background: var(--ember);
  color: var(--ink-950);
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

/* 键盘可达性：隐藏跳转链接 */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 400;
  padding: 0.7em 1.3em;
  border-radius: var(--radius-pill);
  background: var(--ember);
  color: var(--ink-950);
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform var(--dur) var(--ease);
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  outline-offset: 3px;
}

.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;
}

body.nav-locked { overflow: hidden; }

/* ---------- 4. 结构容器 ---------- */
.wrap {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.section {
  position: relative;
  padding-block: clamp(52px, 7vw, 112px);
}

.section--tight {
  padding-block: clamp(28px, 3.6vw, 56px);
}

.grid {
  display: grid;
  gap: clamp(16px, 2.4vw, 28px);
}

.grid--auto {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

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

/* ---------- 5. 排版零件 ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--stone);
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--ember);
}

.num {
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--sand);
}

.chapter {
  position: relative;
}

.chapter__no {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: var(--yellow);
  opacity: 0.85;
}

.link-underline {
  color: var(--snow);
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 1px;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.link-underline:hover {
  color: var(--ember);
  border-bottom-color: var(--ember);
}

/* ---------- 6. 按钮 ---------- */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--snow);
  --btn-bd: var(--line-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  padding: 0.86em 1.65em;
  border: 1px solid var(--btn-bd);
  border-radius: var(--radius-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.05em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease),
              color var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
}

.btn--primary {
  --btn-bg: var(--ember);
  --btn-fg: var(--ink-950);
  --btn-bd: var(--ember);
}

.btn--primary:hover {
  --btn-bg: var(--ember-lift);
  --btn-bd: var(--ember-lift);
  box-shadow: 0 0 0 4px rgba(233, 119, 59, 0.16);
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--snow);
  --btn-bd: var(--line-strong);
}

.btn--ghost:hover {
  --btn-bd: var(--ember);
  --btn-fg: var(--ember);
}

.btn--sm {
  padding: 0.62em 1.2em;
  font-size: 0.8rem;
}

/* ---------- 7. 胶囊标签 ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.34em 0.85em;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: rgba(154, 148, 136, 0.08);
  color: var(--snow);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.pill--blue { border-color: rgba(47, 111, 166, 0.55); background: rgba(47, 111, 166, 0.16); color: #9CC3E4; }
.pill--red { border-color: rgba(200, 80, 69, 0.55); background: rgba(200, 80, 69, 0.16); color: #EBA79F; }
.pill--green { border-color: rgba(47, 125, 102, 0.55); background: rgba(47, 125, 102, 0.16); color: #8FD3BF; }
.pill--yellow { border-color: rgba(215, 164, 60, 0.55); background: rgba(215, 164, 60, 0.16); color: #EBCA85; }
.pill--ember { border-color: rgba(233, 119, 59, 0.6); background: rgba(233, 119, 59, 0.16); color: #F3B18C; }

/* ---------- 8. 资料卡 ---------- */
.card {
  position: relative;
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(158deg, rgba(24, 37, 69, 0.92), rgba(11, 21, 38, 0.94));
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

.card:hover,
.card:focus-within {
  border-color: var(--ember);
}

.card--paper {
  background: var(--white);
  border-color: rgba(17, 28, 51, 0.1);
  color: var(--ink-800);
}

.card--paper :where(h2, h3, h4, p, li) { color: var(--ink-800); }

/* ---------- 9. 图片容器（供页面占位） ---------- */
.media-frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(90% 80% at 78% 0%, rgba(47, 111, 166, 0.34), transparent 62%),
    linear-gradient(155deg, var(--ink-700), var(--ink-950) 72%);
  isolation: isolate;
}

.media-frame > img,
.media-frame > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.82) contrast(1.04);
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    180deg,
    rgba(242, 235, 221, 0.035) 0px,
    rgba(242, 235, 221, 0.035) 1px,
    transparent 1px,
    transparent 4px
  );
  mix-blend-mode: screen;
  opacity: 0.7;
}

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

/* ---------- 10. 面包屑 ---------- */
.breadcrumbs {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.05em;
  color: var(--stone);
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5em;
  list-style: none;
  margin: 0;
}

.breadcrumbs li + li::before {
  content: "/";
  margin-right: 0.5em;
  color: rgba(154, 148, 136, 0.45);
}

.breadcrumbs a {
  color: var(--stone);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.breadcrumbs a:hover {
  color: var(--ember);
  border-bottom-color: var(--ember);
}

.breadcrumbs [aria-current="page"] {
  color: var(--snow);
}

/* ============================================================
   11. 头部：侧边轨道 / 移动抽屉
   ============================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 90;
  width: var(--rail-w);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: clamp(10px, 2vh, 20px);
  padding: 18px 10px 14px;
  background: linear-gradient(178deg, #080F1C 0%, #0D1830 46%, #101C33 74%, #0A1322 100%);
  border-right: 1px solid var(--line);
  overflow: hidden;
  isolation: isolate;
}

.site-header::before {
  content: "";
  position: absolute;
  top: 14%;
  right: 6px;
  bottom: 14%;
  width: 2px;
  border-radius: 2px;
  z-index: -1;
  opacity: 0.32;
  background: linear-gradient(
    180deg,
    var(--blue) 0%,
    var(--white) 22%,
    var(--red) 46%,
    var(--green) 68%,
    var(--yellow) 88%,
    transparent 100%
  );
}

.site-header[data-scrolled="true"] {
  box-shadow: 0 0 44px rgba(8, 15, 28, 0.6);
}

/* 品牌 */
.brand {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 4px 2px 14px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: linear-gradient(145deg, var(--ember), var(--sand));
  color: var(--ink-900);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 6px 18px rgba(233, 119, 59, 0.26);
  transition: transform var(--dur) var(--ease);
}

.brand:hover .brand__mark { transform: translateY(-2px); }

.brand__text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.brand__name {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.14em;
  color: var(--snow);
  white-space: nowrap;
}

.brand__tag {
  display: none;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.08em;
  color: var(--stone);
  white-space: nowrap;
}

/* 轨道导航 */
.rail-nav {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(154, 148, 136, 0.3) transparent;
}

.rail-nav::-webkit-scrollbar { width: 4px; }
.rail-nav::-webkit-scrollbar-thumb {
  background: rgba(154, 148, 136, 0.3);
  border-radius: 4px;
}

.rail-nav__head { display: none; }

.rail-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rail-nav__link {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 9px 2px;
  border-radius: 14px;
  color: var(--stone);
  text-decoration: none;
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

.rail-nav__index {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.14em;
  color: rgba(154, 148, 136, 0.6);
  transition: color var(--dur) var(--ease);
}

.rail-nav__label {
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.1em;
  text-align: center;
  white-space: nowrap;
}

.rail-nav__link:hover {
  color: var(--snow);
  background: rgba(233, 119, 59, 0.1);
}

.rail-nav__link:hover .rail-nav__index { color: var(--ember); }

.rail-nav__link[aria-current="page"] {
  color: var(--snow);
  background: linear-gradient(180deg, rgba(47, 163, 154, 0.16), rgba(233, 119, 59, 0.1));
  box-shadow: inset 0 0 0 1px rgba(233, 119, 59, 0.36);
}

.rail-nav__link[aria-current="page"] .rail-nav__index { color: var(--ember); }

/* 轨道 CTA */
.rail-cta {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 6px;
  border-radius: var(--radius-pill);
  background: var(--ember);
  color: var(--ink-950);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.06em;
  text-align: center;
  text-decoration: none;
  transition: background-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.rail-cta:hover {
  background: var(--ember-lift);
  box-shadow: 0 0 0 4px rgba(233, 119, 59, 0.16);
}

/* 汉堡按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 9px 15px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: rgba(233, 119, 59, 0.1);
  color: var(--snow);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

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

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

.nav-toggle__bars i {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* 滚动进度条 */
.rail-progress {
  position: absolute;
  top: 0;
  right: 0;
  width: 2px;
  height: 100%;
  transform-origin: top center;
  transform: scaleY(var(--scroll-progress, 0));
  background: linear-gradient(180deg, var(--teal), var(--sand) 55%, var(--ember));
  pointer-events: none;
}

/* 遮罩 */
.nav-scrim {
  position: fixed;
  inset: 0;
  z-index: 89;
  background: rgba(8, 15, 28, 0.7);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur) var(--ease);
}

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

/* ============================================================
   12. 页脚
   ============================================================ */
.site-footer {
  position: relative;
  margin-top: clamp(72px, 9vw, 150px);
  border-top: 1px solid var(--line);
  background:
    radial-gradient(120% 92% at 78% 0%, rgba(47, 111, 166, 0.2), transparent 58%),
    linear-gradient(180deg, #0B1526 0%, #080F1C 68%, #060C16 100%);
  color: var(--stone);
  overflow: hidden;
}

.footer-ribbon {
  display: flex;
  height: 5px;
}

.footer-ribbon i {
  flex: 1 1 0;
  height: 100%;
  display: block;
}

.footer-ribbon i:nth-child(1) { background: var(--blue); }
.footer-ribbon i:nth-child(2) { background: rgba(250, 246, 236, 0.85); }
.footer-ribbon i:nth-child(3) { background: var(--red); }
.footer-ribbon i:nth-child(4) { background: var(--green); }
.footer-ribbon i:nth-child(5) { background: var(--yellow); }

.footer-shell {
  position: relative;
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding: clamp(34px, 5vw, 66px) var(--pad) 0;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.85fr) minmax(0, 0.95fr) minmax(0, 1.25fr);
  gap: clamp(26px, 3.4vw, 44px) clamp(18px, 2.6vw, 36px);
  padding-bottom: clamp(30px, 4vw, 52px);
  border-bottom: 1px solid rgba(154, 148, 136, 0.16);
}

.footer-mast { min-width: 0; }

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--snow);
}

.footer-brand__mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--ember), var(--sand));
  color: var(--ink-900);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
}

.footer-brand__name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--snow);
}

.footer-summary {
  max-width: 34ch;
  margin: 16px 0 20px;
  font-size: 0.92rem;
  line-height: 1.85;
  color: rgba(242, 235, 221, 0.72);
}

.footer-group { min-width: 0; }

.footer-group__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.18em;
  color: var(--snow);
}

.footer-group__title::before {
  content: "";
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: var(--ember);
}

.footer-group__list {
  display: grid;
  gap: 2px;
  list-style: none;
  margin: 0;
}

.footer-group__list a {
  display: inline-block;
  padding: 6px 0;
  color: rgba(242, 235, 221, 0.66);
  font-size: 0.9rem;
  line-height: 1.6;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.footer-group__list a:hover {
  color: var(--ember);
  border-bottom-color: var(--ember);
}

.footer-reach { min-width: 0; }

.footer-reach__row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  margin: 0 0 9px;
  font-size: 0.86rem;
  line-height: 1.7;
}

.footer-reach__k {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.8;
  letter-spacing: 0.12em;
  color: var(--stone);
  white-space: nowrap;
}

.footer-reach__v {
  color: rgba(242, 235, 221, 0.78);
  overflow-wrap: anywhere;
}

.footer-reach__note {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px dashed rgba(154, 148, 136, 0.22);
  font-size: 0.78rem;
  line-height: 1.7;
  color: rgba(154, 148, 136, 0.9);
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  padding-block: 22px 8px;
}

.footer-base__legal {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.05em;
  color: rgba(154, 148, 136, 0.85);
}

.footer-base__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  list-style: none;
  margin: 0;
}

.footer-base__links a {
  font-size: 0.78rem;
  color: rgba(242, 235, 221, 0.6);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}

.footer-base__links a:hover { color: var(--ember); }

.footer-watermark {
  margin: clamp(10px, 2vw, 26px) 0 -0.14em;
  font-family: var(--font-display);
  font-size: clamp(56px, 15vw, 190px);
  font-weight: 800;
  line-height: 0.86;
  letter-spacing: -0.04em;
  text-align: center;
  white-space: nowrap;
  color: rgba(242, 235, 221, 0.045);
  user-select: none;
  pointer-events: none;
}

/* ============================================================
   13. 内容显现
   ============================================================ */
html.js [data-reveal] {
  opacity: 0;
  transition: opacity 420ms var(--ease);
}

html.js [data-reveal][data-revealed="true"] {
  opacity: 1;
}

/* ============================================================
   14. 桌面：为主区域让出轨道宽度
   ============================================================ */
@media (min-width: 1024px) {
  body { padding-left: var(--rail-w); }
}

/* ============================================================
   15. 平板 / 移动：头部转顶部条 + 抽屉
   ============================================================ */
@media (max-width: 1023px) {
  html { scroll-padding-top: 80px; }

  .site-header {
    top: 0;
    right: 0;
    bottom: auto;
    left: 0;
    width: auto;
    height: auto;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px clamp(14px, 4vw, 26px);
    border-right: 0;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(8, 15, 28, 0.97), rgba(11, 21, 38, 0.93));
    overflow: visible;
  }

  .site-header::before { display: none; }

  .site-header[data-scrolled="true"] {
    border-bottom-color: rgba(233, 119, 59, 0.34);
    box-shadow: 0 8px 30px rgba(8, 15, 28, 0.5);
  }

  .brand {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 0;
    border-bottom: 0;
  }

  .brand__mark {
    width: 32px;
    height: 32px;
    border-radius: 11px;
    font-size: 15px;
  }

  .brand__text { align-items: flex-start; gap: 1px; }

  .brand__name { font-size: 13px; letter-spacing: 0.1em; }

  .brand__tag { display: block; }

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

  .rail-nav {
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 100;
    flex: 0 0 auto;
    width: min(340px, 84vw);
    padding: 0 0 24px;
    gap: 0;
    border-left: 1px solid var(--line);
    background: linear-gradient(170deg, #0B1526 0%, #111C33 58%, #0A1322 100%);
    box-shadow: -26px 0 64px rgba(8, 15, 28, 0.62);
    transform: translateX(102%);
    visibility: hidden;
    transition: transform 240ms var(--ease), visibility 0s linear 240ms;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .rail-nav[data-open="true"] {
    transform: translateX(0);
    visibility: visible;
    transition: transform 240ms var(--ease), visibility 0s linear 0s;
  }

  .rail-nav__head {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 16px clamp(16px, 5vw, 24px);
    border-bottom: 1px solid var(--line);
    background: rgba(11, 21, 38, 0.97);
  }

  .rail-nav__eyebrow {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.2em;
    color: var(--yellow);
    white-space: nowrap;
  }

  .rail-nav__badge {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.32em 0.7em;
    border: 1px solid rgba(47, 111, 166, 0.5);
    border-radius: var(--radius-pill);
    background: rgba(47, 111, 166, 0.16);
    color: #9CC3E4;
    font-family: var(--font-mono);
    font-size: 9.5px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.04em;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .rail-nav__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    min-height: 38px;
    padding: 0 8px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--stone);
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
  }

  .rail-nav__close:hover {
    color: var(--ember);
    border-color: var(--ember);
  }

  .rail-nav__list {
    gap: 0;
    padding: 8px 0 0;
  }

  .rail-nav__link {
    flex-direction: row;
    align-items: center;
    gap: 14px;
    padding: 15px clamp(16px, 5vw, 24px);
    border-radius: 0;
    border-bottom: 1px solid rgba(154, 148, 136, 0.1);
  }

  .rail-nav__index {
    width: 26px;
    font-size: 11px;
    letter-spacing: 0.12em;
  }

  .rail-nav__label {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.04em;
    white-space: normal;
    text-align: left;
  }

  .rail-nav__link:hover {
    background: rgba(233, 119, 59, 0.08);
  }

  .rail-nav__link[aria-current="page"] {
    background: linear-gradient(90deg, rgba(233, 119, 59, 0.18), transparent 72%);
    box-shadow: inset 3px 0 0 var(--ember);
  }

  .rail-cta {
    margin: 20px clamp(16px, 5vw, 24px) 0;
    min-height: 50px;
    font-size: 14px;
  }

  .rail-progress {
    top: auto;
    right: 0;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    transform-origin: left center;
    transform: scaleX(var(--scroll-progress, 0));
  }

  .nav-scrim { z-index: 99; }
}

/* ============================================================
   16. 页脚与网格断点
   ============================================================ */
@media (max-width: 1080px) {
  .footer-top {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
  }
  .footer-reach { grid-column: 1 / -1; }
}

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

  .footer-top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .footer-mast { grid-column: 1 / -1; }
  .footer-reach { grid-column: 1 / -1; }
}

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

  .footer-top { grid-template-columns: minmax(0, 1fr); }
  .footer-mast,
  .footer-reach { grid-column: auto; }

  .footer-base { padding-block: 20px 6px; }
  .footer-summary { max-width: none; }
}

/* ============================================================
   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;
    scroll-behavior: auto !important;
  }

  .skip-link { transform: none; opacity: 0; }
  .skip-link:focus,
  .skip-link:focus-visible { opacity: 1; }

  html.js [data-reveal] { opacity: 1; }

  .brand:hover .brand__mark { transform: none; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars i { transform: none; }
}
