/* ==========================================================================
   三升体育官网 · 共享样式表 /assets/site.css
   战术板底色（深墨绿）+ 入口路径（荧光青）+ 数据高亮（暖橙）+ 纸张叠层（米白）
   ========================================================================== */

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

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

body { margin: 0; }

h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd, pre { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; }
a { color: inherit; text-decoration: none; }
table { border-collapse: collapse; width: 100%; }
[hidden] { display: none !important; }

/* 2. 设计变量 ------------------------------------------------------------- */
:root {
  --ink: #0B2B26;
  --ink-deep: #071C19;
  --ink-2: #123F36;
  --cyan: #38F2C6;
  --cyan-soft: #B9F5E4;
  --orange: #FF8A3D;
  --paper: #F4F1E8;
  --paper-2: #E7E3D8;
  --graphite: #1A1F1E;
  --cool: #8A9A94;

  --text: rgba(244, 241, 232, 0.92);
  --text-soft: rgba(244, 241, 232, 0.68);
  --text-faint: rgba(244, 241, 232, 0.46);
  --ink-text: rgba(26, 31, 30, 0.9);
  --ink-text-soft: rgba(26, 31, 30, 0.62);

  --line: rgba(56, 242, 198, 0.22);
  --line-soft: rgba(56, 242, 198, 0.12);
  --line-ink: rgba(11, 43, 38, 0.16);

  --font-head: 'Archivo Narrow', 'Oswald', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-body: 'Inter', 'Helvetica Neue', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-data: 'JetBrains Mono', 'Roboto Mono', 'SFMono-Regular', ui-monospace, monospace;
  --font-serif: 'Noto Serif SC', 'Songti SC', 'SimSun', serif;

  --radius-s: 10px;
  --radius: 16px;
  --radius-l: 26px;
  --radius-pill: 999px;

  --max: 1240px;
  --max-wide: 1440px;
  --gutter: 20px;

  --shadow-float: 0 20px 44px -26px rgba(3, 17, 15, 0.92);
  --shadow-card: 0 28px 54px -34px rgba(3, 17, 15, 0.95);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --nav-break: 980px;
}

/* 3. 基础排版 ------------------------------------------------------------- */
body {
  min-height: 100vh;
  background-color: var(--ink);
  background-image:
    radial-gradient(920px 520px at 90% -8%, rgba(56, 242, 198, 0.12), transparent 62%),
    radial-gradient(760px 480px at 4% 14%, rgba(255, 138, 61, 0.07), transparent 60%),
    linear-gradient(180deg, #0B2B26 0%, #0A2622 55%, #0B2B26 100%);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: 0.005em;
  overflow-x: hidden;
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.12;
  color: var(--text);
}

h1 { font-size: clamp(38px, 5.6vw, 66px); }
h2 { font-size: clamp(28px, 3.6vw, 44px); }
h3 { font-size: clamp(20px, 2.2vw, 27px); }
h4 { font-size: clamp(17px, 1.6vw, 20px); letter-spacing: -0.01em; }

p { max-width: 74ch; }
strong { color: var(--paper); font-weight: 600; }
em { font-style: normal; color: var(--cyan); }

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

/* 4. 通用工具 ------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: 860px; }
.container--wide { max-width: var(--max-wide); }

.section { padding-block: clamp(52px, 8vw, 104px); }
.section--tight { padding-block: clamp(32px, 4.5vw, 60px); }

.section-head {
  display: grid;
  gap: 14px;
  margin-bottom: clamp(26px, 3.6vw, 46px);
  max-width: 72ch;
}

.section-title { color: var(--paper); }

.section-desc {
  color: var(--text-soft);
  font-size: clamp(15px, 1.2vw, 17px);
  max-width: 62ch;
}

.lede {
  font-size: clamp(17px, 1.7vw, 20px);
  line-height: 1.7;
  color: var(--text-soft);
  max-width: 60ch;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-data);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--cyan);
  flex: none;
}

.mono {
  font-family: var(--font-data);
  font-size: 0.86em;
  letter-spacing: 0.02em;
}

.muted { color: var(--cool); }

.grid { display: grid; gap: clamp(16px, 2vw, 24px); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--split { grid-template-columns: minmax(220px, 280px) minmax(0, 1fr); align-items: start; }
.grid--split-right { grid-template-columns: minmax(0, 1fr) minmax(220px, 300px); align-items: start; }

/* 5. 纸面区块 ------------------------------------------------------------- */
.surface-paper {
  background-color: var(--paper);
  background-image: repeating-linear-gradient(135deg, rgba(11, 43, 38, 0.035) 0 1px, transparent 1px 15px);
  color: var(--ink-text);
  border-block: 1px solid var(--line-ink);
}
.surface-paper h1,
.surface-paper h2,
.surface-paper h3,
.surface-paper h4 { color: var(--graphite); }
.surface-paper .section-desc,
.surface-paper .lede,
.surface-paper .muted { color: var(--ink-text-soft); }
.surface-paper .eyebrow { color: #0E6E58; }
.surface-paper .eyebrow::before { background: #0E6E58; }
.surface-paper :focus-visible { outline-color: var(--ink); }

/* 6. 面板 / 卡片 / 标签 ---------------------------------------------------- */
.panel {
  position: relative;
  background: linear-gradient(158deg, rgba(18, 63, 54, 0.92), rgba(11, 43, 38, 0.94));
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: clamp(18px, 2vw, 24px);
  box-shadow: var(--shadow-card);
}
.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 1px dashed var(--line);
}
.panel-title {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--paper);
}
.panel-meta {
  font-family: var(--font-data);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cool);
  white-space: nowrap;
}
.panel-body { display: grid; gap: 12px; }
.panel-body p { color: var(--text-soft); }

.card {
  position: relative;
  display: grid;
  gap: 10px;
  background: linear-gradient(160deg, rgba(18, 63, 54, 0.62), rgba(11, 43, 38, 0.68));
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: clamp(16px, 1.8vw, 22px);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--line);
  box-shadow: 0 26px 46px -30px rgba(56, 242, 198, 0.5);
}
.card-title {
  font-family: var(--font-head);
  font-size: clamp(17px, 1.6vw, 20px);
  font-weight: 700;
  color: var(--paper);
}
.card-meta {
  font-family: var(--font-data);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--cool);
}
.card p { color: var(--text-soft); font-size: 15px; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: rgba(56, 242, 198, 0.08);
  color: var(--cyan);
  font-family: var(--font-data);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.6;
  white-space: nowrap;
}
.tag--orange {
  border-color: rgba(255, 138, 61, 0.36);
  background: rgba(255, 138, 61, 0.12);
  color: var(--orange);
}
.tag--paper {
  background: var(--paper);
  border-color: transparent;
  color: var(--ink);
}

/* 纸面区块内的面板与卡片反色 */
.surface-paper .panel {
  background: rgba(255, 255, 255, 0.6);
  border-color: var(--line-ink);
  box-shadow: 0 24px 44px -34px rgba(11, 43, 38, 0.5);
}
.surface-paper .panel-head { border-bottom-color: var(--line-ink); }
.surface-paper .panel-title,
.surface-paper .card-title { color: var(--graphite); }
.surface-paper .panel-body p,
.surface-paper .card p { color: var(--ink-text-soft); }
.surface-paper .card {
  background: rgba(255, 255, 255, 0.62);
  border-color: var(--line-ink);
}
.surface-paper .card:hover { border-color: #0E6E58; box-shadow: 0 24px 40px -32px rgba(11, 43, 38, 0.45); }
.surface-paper .tag { color: #0E6E58; border-color: rgba(14, 110, 88, 0.3); background: rgba(14, 110, 88, 0.08); }

/* 7. 图像容器 ------------------------------------------------------------- */
.media-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line-soft);
  background-color: var(--ink-2);
  background-image:
    repeating-linear-gradient(0deg, rgba(244, 241, 232, 0.06) 0 1px, transparent 1px 38px),
    repeating-linear-gradient(90deg, rgba(244, 241, 232, 0.06) 0 1px, transparent 1px 38px),
    linear-gradient(135deg, #0E342E 0%, #123F36 48%, #0B2B26 100%);
  aspect-ratio: 16 / 9;
  width: 100%;
}
.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(200deg, rgba(56, 242, 198, 0.14), transparent 46%, rgba(255, 138, 61, 0.1));
  pointer-events: none;
}
.media-frame__inner {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.media-frame__inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.82) contrast(1.04);
}
.media-frame__label {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-data);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame--square { aspect-ratio: 1 / 1; }
.media-frame--tall { aspect-ratio: 4 / 5; }

/* 8. 按钮 ----------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background-color 0.25s var(--ease),
    color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--cyan { background: linear-gradient(120deg, var(--cyan), var(--cyan-soft)); color: var(--ink); }
.btn--orange { background: var(--orange); color: #2B1100; }
.btn--ghost {
  border-color: var(--line);
  color: var(--paper);
  background: rgba(18, 63, 54, 0.35);
}
.btn--ghost:hover { border-color: var(--cyan); color: var(--cyan); }

/* 9. 面包屑与章节目录 ----------------------------------------------------- */
.breadcrumb {
  display: block;
  padding-block: 18px 0;
}
.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-data);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--cool);
}
.breadcrumb-item { display: inline-flex; align-items: center; gap: 8px; }
.breadcrumb-item::after {
  content: "/";
  color: rgba(138, 154, 148, 0.55);
}
.breadcrumb-item:last-child::after { display: none; }
.breadcrumb-item a { color: var(--text-soft); }
.breadcrumb-item a:hover { color: var(--cyan); }
.breadcrumb-current { color: var(--cyan); }

.toc {
  position: sticky;
  top: 138px;
  padding: 4px 0;
}
.toc-list {
  display: grid;
  gap: 2px;
  border-left: 1px solid var(--line-soft);
}
.toc-link {
  display: block;
  margin-left: -1px;
  padding: 8px 12px;
  border-left: 2px solid transparent;
  font-family: var(--font-data);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  transition: color 0.22s var(--ease), border-color 0.22s var(--ease), background-color 0.22s var(--ease);
}
.toc-link:hover { color: var(--text); }
.toc-link[aria-current="true"] {
  color: var(--cyan);
  border-left-color: var(--cyan);
  background: linear-gradient(90deg, rgba(56, 242, 198, 0.12), transparent);
}

/* 10. 正文长文 ------------------------------------------------------------ */
.prose { max-width: 70ch; display: grid; gap: 18px; }
.prose h2 { margin-top: 18px; }
.prose h3 { margin-top: 10px; }
.prose p, .prose li { color: var(--text-soft); }
.prose ul { display: grid; gap: 8px; }
.prose ul li {
  position: relative;
  padding-left: 20px;
}
.prose ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 10px;
  height: 1px;
  background: var(--cyan);
}
.prose a {
  color: var(--cyan);
  border-bottom: 1px solid var(--line);
}
.prose a:hover { border-bottom-color: var(--cyan); }
.prose blockquote {
  padding: 14px 18px;
  border-left: 2px solid var(--orange);
  background: rgba(255, 138, 61, 0.06);
  color: var(--text-soft);
  font-family: var(--font-serif);
}
.surface-paper .prose p,
.surface-paper .prose li { color: var(--ink-text-soft); }
.surface-paper .prose a { color: #0E6E58; }

/* 11. 头部 ---------------------------------------------------------------- */
.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 200;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: var(--cyan);
  color: var(--ink);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 14px;
  transition: top 0.24s var(--ease);
}
.skip-link:focus { top: 14px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  background: linear-gradient(180deg, rgba(7, 28, 25, 0.98) 0%, rgba(11, 43, 38, 0.94) 68%, rgba(11, 43, 38, 0.78) 100%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}

.header-rail {
  height: 34px;
  overflow: hidden;
  border-bottom: 1px solid var(--line-soft);
  transition: height 0.32s var(--ease), opacity 0.32s var(--ease);
}
.site-header[data-stuck] .header-rail {
  height: 0;
  opacity: 0;
  border-bottom-color: transparent;
}
.rail-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 34px;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.rail-dot {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 4px rgba(56, 242, 198, 0.14);
}
.rail-label {
  font-family: var(--font-data);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
}
.rail-text {
  font-size: 12px;
  color: var(--text-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rail-progress {
  margin-left: auto;
  flex: none;
  width: 140px;
  height: 3px;
  border-radius: var(--radius-pill);
  background: rgba(244, 241, 232, 0.12);
  overflow: hidden;
}
.rail-progress > i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--orange));
}

.header-capsule {
  position: relative;
  z-index: 130;
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: var(--max);
  margin: 12px auto 14px;
  padding-inline: var(--gutter);
  transition: margin-top 0.32s var(--ease);
}
.site-header[data-stuck] .header-capsule { margin-top: 8px; }

.brand {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 18px 6px 6px;
  border-radius: var(--radius-pill);
  background: var(--paper);
  border: 1px solid rgba(11, 43, 38, 0.1);
  box-shadow: var(--shadow-float);
  transition: transform 0.25s var(--ease);
}
.brand:hover { transform: translateY(-2px); }
.brand-mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--ink), var(--ink-2));
  color: var(--cyan);
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.brand-text { display: grid; line-height: 1.1; }
.brand-name {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink);
}
.brand-sub {
  font-family: var(--font-data);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: rgba(11, 43, 38, 0.52);
}

.capsule-nav { margin-inline: auto; }
.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px;
  border-radius: var(--radius-pill);
  background: rgba(18, 63, 54, 0.82);
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-float);
}
.nav-item { display: block; }
.nav-link {
  display: block;
  padding: 8px 15px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  line-height: 1.4;
  color: rgba(244, 241, 232, 0.72);
  white-space: nowrap;
  transition: color 0.22s var(--ease), background-color 0.22s var(--ease);
}
.nav-link:hover {
  color: var(--paper);
  background: rgba(56, 242, 198, 0.1);
}
.nav-link[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
  background: linear-gradient(120deg, var(--cyan), var(--cyan-soft));
}

.header-cta {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius-pill);
  background: var(--orange);
  color: #2B1100;
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: var(--shadow-float);
  transition: transform 0.25s var(--ease), background-color 0.25s var(--ease);
}
.header-cta:hover { transform: translateY(-2px); background: #FFA05F; }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-soft);
  background: rgba(18, 63, 54, 0.88);
  color: var(--paper);
  font-size: 14px;
  cursor: pointer;
}
.nav-toggle-text {
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: 0.04em;
}
.nav-toggle-bars {
  position: relative;
  flex: none;
  width: 18px;
  height: 12px;
}
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--cyan);
  transition: transform 0.3s var(--ease);
}
.nav-toggle-bars::before { top: 0; }
.nav-toggle-bars::after { bottom: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-5px) rotate(-45deg); }

.nav-scrim {
  position: fixed;
  inset: 0;
  z-index: 118;
  background: rgba(5, 20, 18, 0.68);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s var(--ease);
}
.site-header[data-menu="open"] .nav-scrim {
  opacity: 1;
  visibility: visible;
}

body.nav-locked { overflow: hidden; }

/* 12. 页脚 ---------------------------------------------------------------- */
.site-footer {
  position: relative;
  margin-top: clamp(48px, 7vw, 96px);
  background: linear-gradient(180deg, #0B2B26 0%, #071C19 100%);
  border-top: 1px solid var(--line-soft);
}
.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 4px;
  background: repeating-linear-gradient(
    115deg,
    var(--cyan) 0 14px,
    transparent 14px 28px,
    var(--orange) 28px 38px,
    transparent 38px 56px
  );
  opacity: 0.55;
}
.footer-inner {
  max-width: var(--max);
  margin-inline: auto;
  padding: clamp(44px, 6vw, 72px) var(--gutter) 26px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1.2fr 0.9fr;
  gap: clamp(24px, 3.4vw, 48px);
}
.footer-col { display: grid; gap: 12px; align-content: start; }
.footer-col--brand { max-width: 46ch; }
.footer-brand {
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--paper);
}
.footer-line {
  font-size: 15px;
  color: var(--text-soft);
  max-width: 34ch;
}
.footer-note {
  font-size: 13px;
  line-height: 1.7;
  color: var(--cool);
  max-width: 42ch;
}
.footer-title {
  font-family: var(--font-data);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
}
.footer-contact { display: grid; gap: 8px; }
.footer-contact li {
  font-family: var(--font-data);
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-soft);
  word-break: break-word;
}
.footer-links { display: grid; gap: 8px; }
.footer-links a {
  font-size: 15px;
  color: var(--text-soft);
  border-bottom: 1px solid transparent;
  justify-self: start;
  transition: color 0.22s var(--ease), border-color 0.22s var(--ease);
}
.footer-links a:hover { color: var(--cyan); border-bottom-color: var(--line); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: clamp(28px, 4vw, 44px);
  padding-top: 18px;
  border-top: 1px dashed rgba(56, 242, 198, 0.18);
  font-family: var(--font-data);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--cool);
}
.footer-legal { color: var(--text-soft); }
.footer-meta { color: var(--text-faint); }

.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(18, 63, 54, 0.94);
  color: var(--cyan);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  box-shadow: var(--shadow-float);
  transition: opacity 0.28s var(--ease), transform 0.28s var(--ease),
    visibility 0.28s var(--ease), border-color 0.28s var(--ease);
}
.to-top::before {
  content: "";
  width: 10px;
  height: 10px;
  border-left: 2px solid currentColor;
  border-top: 2px solid currentColor;
  transform: rotate(45deg) translate(1px, 1px);
}
.to-top[data-visible] {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.to-top:hover { border-color: var(--cyan); }

/* 13. 滚动显现 ------------------------------------------------------------ */
.has-js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.62s var(--ease), transform 0.62s var(--ease);
  will-change: opacity, transform;
}
.has-js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* 14. 响应式 -------------------------------------------------------------- */
@media (max-width: 1080px) {
  .grid--split,
  .grid--split-right { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

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

  .header-capsule { margin: 10px auto 12px; gap: 10px; }
  .brand { padding-right: 14px; }
  .nav-toggle { display: inline-flex; margin-left: auto; }
  .header-cta { display: none; }

  .capsule-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 125;
    width: min(86vw, 340px);
    margin: 0;
    padding: 92px 20px 32px;
    background: linear-gradient(180deg, #123F36 0%, #0B2B26 100%);
    border-left: 1px solid var(--line);
    border-radius: 0;
    box-shadow: -34px 0 70px -34px rgba(0, 0, 0, 0.85);
    overflow-y: auto;
    transform: translateX(104%);
    transition: transform 0.42s var(--ease);
  }
  .capsule-nav[data-open] { transform: none; }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    counter-reset: navidx;
  }
  .nav-item { counter-increment: navidx; }
  .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid transparent;
    font-size: 17px;
    color: var(--text-soft);
  }
  .nav-link::before {
    content: "0" counter(navidx);
    font-family: var(--font-data);
    font-size: 11px;
    letter-spacing: 0.08em;
    color: var(--cool);
  }
  .nav-link[aria-current="page"] {
    color: var(--cyan);
    font-weight: 600;
    background: rgba(56, 242, 198, 0.12);
    border-color: var(--line);
  }
  .nav-link[aria-current="page"]::before { color: var(--cyan); }

  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-col--brand { grid-column: 1 / -1; max-width: none; }
}

@media (max-width: 720px) {
  .rail-text { display: none; }
  .rail-progress { width: 92px; }
  .grid--2,
  .grid--3 { grid-template-columns: minmax(0, 1fr); }
  .prose { gap: 16px; }
}

@media (max-width: 560px) {
  :root { --gutter: 16px; }
  body { font-size: 15.5px; }
  .brand-sub { display: none; }
  .brand-mark { width: 32px; height: 32px; font-size: 11px; }
  .nav-toggle { padding: 10px 13px; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .to-top { right: 14px; bottom: 14px; }
}

/* 15. 动效偏好 ------------------------------------------------------------ */
@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;
  }
  .has-js [data-reveal] {
    opacity: 1;
    transform: none;
  }
  .card:hover,
  .btn:hover,
  .brand:hover,
  .header-cta:hover { transform: none; }
}
