/* =========================================================
   AB游艺 · 共享样式 /assets/site.css
   0 reset · 1 变量 · 2 基础排版 · 3 布局 · 4 头部
   5 页脚 · 6 通用组件 · 7 状态与动效 · 8 响应式
   ========================================================= */

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

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

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

ul[class],
ol[class] { list-style: none; padding: 0; }

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

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

a { color: inherit; }

/* ---------- 1 变量 ---------- */
:root {
  --deep: #061826;
  --mid: #0B2740;
  --steel: #123B5C;
  --cyan: #45E0DA;
  --mist: #A9F4F1;
  --paper: #F4F6F2;
  --orange: #FF8A3D;
  --amber: #FFC857;
  --slate: #7D93A6;
  --ink: #030A10;
  --green: #4CD08A;
  --red: #FF5C6C;

  --bg: var(--deep);
  --fg: var(--paper);
  --fg-dim: #9DB4C6;
  --line: rgba(69, 224, 218, 0.22);
  --line-soft: rgba(125, 147, 166, 0.24);
  --line-strong: var(--steel);

  --rail-w: 272px;
  --topbar-h: 64px;
  --content-max: 1280px;
  --gutter: clamp(18px, 4vw, 56px);
  --radius: 2px;

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

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- 2 基础排版 ---------- */
body {
  min-height: 100vh;
  margin: 0;
  padding-left: var(--rail-w);
  background-color: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(69, 224, 218, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(69, 224, 218, 0.045) 1px, transparent 1px);
  background-size: 72px 72px;
}

main,
#main-content {
  position: relative;
  z-index: 1;
}

#main-content {
  display: block;
  padding-top: clamp(20px, 3vw, 44px);
  scroll-margin-top: 96px;
}

#main-content:focus { outline: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.01em;
}

h2[id],
h3[id] { scroll-margin-top: 96px; }

p { text-wrap: pretty; }

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

/* ---------- 3 布局 ---------- */
.wrap {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

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

.stack {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 2vw, 22px);
}

.rule {
  height: 1px;
  border: 0;
  margin: clamp(28px, 4vw, 48px) 0;
  background: linear-gradient(90deg, var(--line), rgba(69, 224, 218, 0));
}

/* ---------- 4 头部：侧边轨道 ---------- */
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 220;
  padding: 10px 16px;
  transform: translateY(-180%);
  background: var(--cyan);
  color: var(--deep);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.18s var(--ease);
}

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

.site-header {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 100;
  width: var(--rail-w);
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--mid) 0%, #081F33 58%, var(--deep) 100%);
  border-right: 1px solid var(--line);
}

.rail-inner {
  display: flex;
  flex-direction: column;
  gap: 18px;
  height: 100%;
  padding: 22px 18px 18px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--steel) transparent;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 210;
  pointer-events: none;
  background: transparent;
}

.scroll-progress-bar {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--orange));
  transition: width 0.1s linear;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--paper);
}

.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  background: var(--cyan);
  color: var(--deep);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
  box-shadow: 4px 4px 0 rgba(3, 10, 16, 0.7);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--slate);
}

.rail-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  background: var(--orange);
  color: #1B0A00;
  border: 1px solid #FFB07A;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 5px 5px 0 rgba(3, 10, 16, 0.65);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), background 0.18s var(--ease);
}

.rail-cta::after {
  content: "↘";
  font-family: var(--font-mono);
  font-size: 13px;
}

.rail-cta:hover,
.rail-cta:focus-visible {
  background: #FFA167;
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 rgba(3, 10, 16, 0.7);
}

.nav-toggle {
  display: none;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: rgba(69, 224, 218, 0.08);
  border: 1px solid var(--line-strong);
  color: var(--mist);
  cursor: pointer;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease);
}

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

.nav-toggle-bar {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: background 0.16s var(--ease);
}

.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: transform 0.2s var(--ease);
}

.nav-toggle-bar::before { top: -6px; }
.nav-toggle-bar::after { top: 6px; }

.site-header[data-open] .nav-toggle-bar { background: transparent; }
.site-header[data-open] .nav-toggle-bar::before { transform: translateY(6px) rotate(45deg); }
.site-header[data-open] .nav-toggle-bar::after { transform: translateY(-6px) rotate(-45deg); }

.site-nav {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
}

.nav-label {
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--slate);
  text-transform: uppercase;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: navidx;
}

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

.nav-list a {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 9px 10px 9px 12px;
  border-left: 2px solid transparent;
  color: var(--mist);
  font-size: 15px;
  text-decoration: none;
  transition: color 0.18s var(--ease), background 0.18s var(--ease), border-color 0.18s var(--ease);
}

.nav-list a::before {
  content: counter(navidx, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--slate);
}

.nav-list a:hover,
.nav-list a:focus-visible {
  background: rgba(69, 224, 218, 0.08);
  color: #FFFFFF;
  border-left-color: var(--cyan);
}

.nav-list a[aria-current="page"] {
  background: rgba(69, 224, 218, 0.14);
  border-left-color: var(--cyan);
  color: #FFFFFF;
  font-weight: 700;
}

.nav-list a[aria-current="page"]::before { color: var(--cyan); }

.rail-toc {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}

.rail-toc[hidden] { display: none; }

.toc-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--slate);
}

.toc-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  max-height: 34vh;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-y: auto;
  scrollbar-width: thin;
}

.toc-link {
  display: block;
  padding: 5px 10px;
  border-left: 1px solid transparent;
  color: var(--slate);
  font-size: 13px;
  line-height: 1.5;
  text-decoration: none;
  transition: color 0.16s var(--ease), background 0.16s var(--ease), border-color 0.16s var(--ease);
}

.toc-link:hover,
.toc-link:focus-visible { color: var(--mist); }

.toc-link.is-active {
  border-left-color: var(--cyan);
  background: rgba(69, 224, 218, 0.08);
  color: var(--cyan);
}

.rail-foot {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}

.rail-support {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid var(--amber);
  color: var(--amber);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}

.rail-support:hover,
.rail-support:focus-visible {
  background: var(--amber);
  color: #2A1A00;
}

.rail-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--slate);
}

/* ---------- 5 页脚 ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  margin-top: clamp(48px, 7vw, 96px);
  background: linear-gradient(180deg, var(--mid) 0%, var(--deep) 55%, var(--ink) 100%);
  border-top: 1px solid var(--line);
  color: var(--paper);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 22px;
  max-width: var(--content-max);
  margin-inline: auto;
  padding: clamp(28px, 5vw, 56px) var(--gutter) 28px;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 28px;
}

.footer-row--meta {
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line-soft);
}

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

.footer-region {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--mist);
}

.footer-icp {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--slate);
}

.footer-row--support {
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line-soft);
}

.support-card {
  position: relative;
  flex: 1 1 560px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 32px;
  padding: clamp(16px, 2.4vw, 24px);
  border: 1px solid var(--amber);
  background: linear-gradient(120deg, rgba(255, 200, 87, 0.11), rgba(255, 200, 87, 0.02) 58%, transparent 100%);
  box-shadow: inset 0 0 0 1px rgba(3, 10, 16, 0.55), 8px 8px 0 rgba(3, 10, 16, 0.5);
}

.support-card::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px dashed rgba(255, 200, 87, 0.24);
  pointer-events: none;
}

.support-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 210px;
}

.support-title {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 800;
  color: var(--amber);
  letter-spacing: 0.01em;
}

.support-sub {
  font-size: 13px;
  line-height: 1.6;
  color: var(--mist);
}

.support-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 26px;
}

.support-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.support-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--slate);
}

.support-value {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--paper);
  word-break: break-all;
}

.support-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.footer-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--amber);
  border: 1px solid var(--amber);
  color: #2A1A00;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 4px 4px 0 rgba(3, 10, 16, 0.6);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), background 0.18s var(--ease);
}

.footer-cta:hover,
.footer-cta:focus-visible {
  background: #FFD77F;
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 rgba(3, 10, 16, 0.65);
}

.footer-row--legal {
  align-items: flex-start;
  justify-content: space-between;
}

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

.footer-legal-links a {
  border-bottom: 1px solid transparent;
  color: var(--mist);
  font-size: 13px;
  text-decoration: none;
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease);
}

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

.footer-copy {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.9;
  color: var(--slate);
}

/* ---------- 6 通用组件 ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cyan);
}

.eyebrow::before {
  content: "";
  width: 20px;
  height: 1px;
  background: currentColor;
}

.lede {
  max-width: 62ch;
  font-size: clamp(16px, 1.7vw, 19px);
  line-height: 1.85;
  color: var(--mist);
}

.sec-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 18px;
  margin: 0 0 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.sec-num {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--cyan);
}

.sec-title {
  font-size: clamp(24px, 3.4vw, 38px);
  font-weight: 800;
}

.sec-note {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--slate);
}

.annotation {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--slate);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: 1px solid transparent;
  background: transparent;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), background 0.18s var(--ease), color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.btn--primary {
  background: var(--cyan);
  border-color: var(--cyan);
  color: #03252B;
  box-shadow: 6px 6px 0 rgba(3, 10, 16, 0.55);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 rgba(3, 10, 16, 0.6);
}

.btn--ghost {
  background: rgba(69, 224, 218, 0.05);
  border-color: var(--line-strong);
  color: var(--mist);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  border-color: var(--cyan);
  color: #FFFFFF;
}

.btn--amber {
  background: transparent;
  border-color: var(--amber);
  color: var(--amber);
}

.btn--amber:hover,
.btn--amber:focus-visible {
  background: var(--amber);
  color: #2A1A00;
}

.btn--sm {
  padding: 8px 14px;
  font-size: 13px;
}

.panel {
  position: relative;
  padding: clamp(16px, 2.2vw, 24px);
  background: var(--mid);
  border: 1px solid var(--line-strong);
  box-shadow: 8px 8px 0 rgba(3, 10, 16, 0.45);
  transition: border-color 0.18s var(--ease), transform 0.18s var(--ease);
}

.panel:hover {
  border-color: rgba(69, 224, 218, 0.5);
  transform: translateY(-2px);
}

.sheet {
  --fg: var(--deep);
  --fg-dim: #3D5B70;
  --line: rgba(6, 24, 38, 0.16);
  --line-soft: rgba(6, 24, 38, 0.12);
  position: relative;
  padding: clamp(22px, 3.4vw, 44px);
  background: var(--paper);
  color: var(--fg);
  border: 1px solid rgba(6, 24, 38, 0.2);
  box-shadow: 14px 14px 0 rgba(3, 10, 16, 0.5), 0 0 0 1px rgba(69, 224, 218, 0.14);
}

.sheet::after {
  content: "";
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 22px;
  height: 22px;
  background: linear-gradient(135deg, transparent 50%, rgba(6, 24, 38, 0.16) 50%);
  pointer-events: none;
}

.sheet .sec-head { border-bottom-color: rgba(6, 24, 38, 0.18); }
.sheet .sec-num { color: #0B7C84; }
.sheet .sec-title { color: var(--deep); }
.sheet .sec-note { color: #4E6B7E; }
.sheet .eyebrow { color: #0B7C84; }
.sheet .lede { color: #33505F; }
.sheet .btn--ghost {
  background: rgba(6, 24, 38, 0.04);
  border-color: rgba(6, 24, 38, 0.32);
  color: var(--deep);
}
.sheet .btn--ghost:hover,
.sheet .btn--ghost:focus-visible {
  background: var(--deep);
  border-color: var(--deep);
  color: var(--paper);
}
.sheet .btn--primary { box-shadow: 6px 6px 0 rgba(6, 24, 38, 0.22); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border: 1px solid currentColor;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.7;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.tag--live { color: var(--green); }
.tag--warn { color: var(--red); }
.tag--new { color: var(--orange); background: rgba(255, 138, 61, 0.12); }
.tag--muted { color: var(--slate); }

.sheet .tag--live { color: #16794A; }
.sheet .tag--warn { color: #B4213A; }
.sheet .tag--new { color: #B04708; background: rgba(255, 138, 61, 0.16); }
.sheet .tag--muted { color: #527082; }

.breadcrumb { margin: 0 0 18px; }

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--slate);
}

.breadcrumb li { display: inline-flex; gap: 6px; }
.breadcrumb li + li::before { content: "/"; color: var(--steel); }
.breadcrumb a { color: var(--mist); text-decoration: none; }
.breadcrumb a:hover,
.breadcrumb a:focus-visible { color: var(--cyan); }
.sheet .breadcrumb ol { color: #4E6B7E; }
.sheet .breadcrumb a { color: #1C4155; }
.sheet .breadcrumb a:hover { color: #0B7C84; }

.img-frame {
  position: relative;
  display: block;
  margin: 0;
  overflow: hidden;
  background: linear-gradient(145deg, var(--steel), var(--mid) 58%, var(--ink));
  border: 1px solid var(--line-strong);
  box-shadow: 8px 8px 0 rgba(3, 10, 16, 0.45);
}

.img-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(69, 224, 218, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(69, 224, 218, 0.09) 1px, transparent 1px);
  background-size: 26px 26px;
}

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

.img-frame--wide { aspect-ratio: 16 / 9; }
.img-frame--tall { aspect-ratio: 4 / 5; }
.img-frame--thumb { aspect-ratio: 4 / 3; }

.img-cap,
.img-frame figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 8px 12px;
  background: linear-gradient(180deg, rgba(3, 10, 16, 0), rgba(3, 10, 16, 0.84));
  border-top: 1px solid rgba(69, 224, 218, 0.18);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--mist);
}

.prose {
  font-size: 16.5px;
  line-height: 1.85;
  color: var(--fg);
}

.prose p { margin: 0 0 1.1em; }
.prose h2, .prose h3 { margin: 1.7em 0 0.6em; }
.prose ul, .prose ol { margin: 0 0 1.1em; padding-left: 1.4em; }
.prose li { margin-bottom: 0.4em; }
.prose a {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.sheet .prose { color: #17303F; }
.sheet .prose a { color: #0B6E77; }
.prose code {
  padding: 1px 5px;
  background: rgba(69, 224, 218, 0.14);
  font-family: var(--font-mono);
  font-size: 0.92em;
}
.sheet .prose code { background: rgba(6, 24, 38, 0.08); }

.copy-field {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.copy-value {
  font-family: var(--font-mono);
  font-size: 14px;
  word-break: break-all;
  color: inherit;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  background: transparent;
  border: 1px solid currentColor;
  color: inherit;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: background 0.16s var(--ease), color 0.16s var(--ease), border-color 0.16s var(--ease);
}

.copy-btn:hover,
.copy-btn:focus-visible {
  background: var(--cyan);
  border-color: var(--cyan);
  color: var(--deep);
}

.copy-btn[data-copied="ok"] {
  background: var(--green);
  border-color: var(--green);
  color: #04140B;
}

.copy-btn[data-copied="fail"] {
  background: var(--red);
  border-color: var(--red);
  color: #1A0206;
}

.to-top {
  position: fixed;
  right: clamp(14px, 2.5vw, 28px);
  bottom: clamp(14px, 2.5vw, 28px);
  z-index: 80;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--mid);
  border: 1px solid var(--line-strong);
  color: var(--mist);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  box-shadow: 6px 6px 0 rgba(3, 10, 16, 0.5);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s, border-color 0.2s var(--ease);
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.to-top:hover,
.to-top:focus-visible {
  border-color: var(--cyan);
  color: #FFFFFF;
}

/* ---------- 7 状态与动效 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

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

.support-card.is-pulse {
  animation: support-pulse 1.6s var(--ease) 1;
}

@keyframes support-pulse {
  0%, 100% {
    box-shadow: inset 0 0 0 1px rgba(3, 10, 16, 0.55), 8px 8px 0 rgba(3, 10, 16, 0.5), 0 0 0 0 rgba(255, 200, 87, 0);
  }
  45% {
    box-shadow: inset 0 0 0 1px rgba(3, 10, 16, 0.55), 8px 8px 0 rgba(3, 10, 16, 0.5), 0 0 0 6px rgba(255, 200, 87, 0.18);
  }
}

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

.sheet :focus-visible {
  outline-color: var(--deep);
}

body.is-nav-open { overflow: hidden; }

/* ---------- 8 响应式 ---------- */
@media (max-width: 1199px) {
  :root { --rail-w: 244px; }
}

@media (max-width: 899px) {
  body {
    padding-left: 0;
    padding-top: var(--topbar-h);
  }

  .site-header {
    inset: 0 0 auto 0;
    width: auto;
    height: var(--topbar-h);
    flex-direction: row;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 26px rgba(3, 10, 16, 0.55);
  }

  .rail-inner {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    height: var(--topbar-h);
    padding: 0 14px;
    overflow: visible;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    font-size: 16px;
    box-shadow: 3px 3px 0 rgba(3, 10, 16, 0.7);
  }

  .brand-name { font-size: 17px; }
  .brand-sub { display: none; }

  .rail-cta {
    margin-left: auto;
    padding: 8px 12px;
    font-size: 13px;
    box-shadow: 3px 3px 0 rgba(3, 10, 16, 0.6);
  }

  .rail-cta::after { display: none; }

  .nav-toggle { display: grid; }

  .site-nav {
    position: fixed;
    top: var(--topbar-h);
    left: 0;
    bottom: 0;
    z-index: 98;
    width: min(330px, 86vw);
    padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
    overflow-y: auto;
    background: linear-gradient(180deg, var(--mid), var(--deep));
    border-right: 1px solid var(--line);
    box-shadow: 14px 0 40px rgba(3, 10, 16, 0.6);
    transform: translateX(-104%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.22s var(--ease), opacity 0.18s var(--ease), visibility 0.22s;
  }

  .site-nav[data-open] {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
  }

  .site-header[data-open]::after {
    content: "";
    position: fixed;
    inset: var(--topbar-h) 0 0 0;
    z-index: 90;
    background: rgba(3, 10, 16, 0.62);
  }

  .rail-toc .toc-list { max-height: 30vh; }

  .footer-row--meta { justify-content: flex-start; }
  .footer-row--legal { flex-direction: column; align-items: flex-start; }

  .to-top {
    right: 14px;
    bottom: 14px;
    padding: 9px 12px;
  }

  .grid--2,
  .grid--3,
  .grid--5-7,
  .grid--7-5,
  .grid--4-8,
  .grid--3-6-3 { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 420px) {
  .rail-cta { font-size: 12px; padding: 7px 10px; }
  .brand-name { font-size: 15px; }
  .nav-toggle { width: 40px; height: 40px; }
}

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

  .scroll-progress-bar { transition: none; }
}
