/* ============================================================
   AB娱乐 · 共享样式表 /assets/site.css
   深空编辑部：暗底霓虹 + 非对称栅格 + 等宽数据
   ============================================================ */

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

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

body {
  margin: 0;
  min-height: 100vh;
  background-color: #060A18;
  background-image:
    radial-gradient(920px 620px at 10% -10%, rgba(122, 77, 255, .30), transparent 62%),
    radial-gradient(720px 520px at 94% 2%, rgba(56, 232, 200, .13), transparent 60%),
    radial-gradient(1100px 720px at 58% 110%, rgba(58, 30, 115, .48), transparent 66%);
  background-attachment: fixed;
  color: #F3F6FF;
  font-family: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

::selection { background: rgba(122, 77, 255, .55); color: #FFFFFF; }

/* ---------- 2. 变量 ---------- */
:root {
  color-scheme: dark;

  --ink-0: #060A18;
  --ink-1: #0E1730;
  --ink-2: #111C3A;
  --violet: #7A4DFF;
  --violet-deep: #3A1E73;
  --lime: #B6FF3C;
  --orange: #FF9A3C;
  --porcelain: #F3F6FF;
  --mist: #9BA8C8;
  --line: #2B3766;
  --mint: #38E8C8;

  --shell: 1280px;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 26px;
  --radius-pill: 999px;

  --font-display: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", Georgia, serif;
  --font-ui: Inter, "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "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: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;

  --grad-nebula: linear-gradient(135deg, #3A1E73 0%, #7A4DFF 52%, #38E8C8 100%);
  --grad-lime: linear-gradient(120deg, #38E8C8 0%, #B6FF3C 100%);
  --grad-warm: linear-gradient(120deg, #FF9A3C 0%, #7A4DFF 100%);
}

/* ---------- 3. 基础排版 ---------- */
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 .5em;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -.01em;
  color: var(--porcelain);
}

h1 { font-size: clamp(2.6rem, 6vw, 4.8rem); font-weight: 900; }
h2 { font-size: clamp(1.7rem, 3vw, 2.6rem); }
h3 { font-family: var(--font-ui); font-size: 1.25rem; font-weight: 600; letter-spacing: 0; line-height: 1.35; }
h4 { font-family: var(--font-ui); font-size: 1rem; font-weight: 600; letter-spacing: .01em; }

p { margin: 0 0 1em; }

a { color: inherit; }

strong, b { font-weight: 600; color: var(--porcelain); }

small { font-size: .8rem; }

hr {
  height: 1px;
  border: 0;
  margin: 2rem 0;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

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

/* ---------- 4. 工具与容器 ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding-inline: clamp(16px, 2.4vw, 28px);
}

.stack > * + * { margin-top: var(--stack, 1.1rem); }

.stat__value,
.data-table td.is-num,
.eyebrow,
.toc__title,
.footer-contact__key,
.copy-btn {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* ---------- 5. 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 200;
  padding: 11px 20px;
  border-radius: var(--radius-pill);
  background: var(--lime);
  color: #0A0F22;
  font-family: var(--font-ui);
  font-size: .86rem;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform .22s ease;
}

.skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid var(--mint);
  outline-offset: 2px;
}

/* ---------- 6. 头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  padding: 12px clamp(12px, 2.4vw, 28px) 6px;
}

.header-shell {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 9px 12px 9px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: rgba(10, 16, 36, .78);
  box-shadow:
    0 22px 48px -30px rgba(0, 0, 0, .95),
    inset 0 1px 0 rgba(255, 255, 255, .04);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  transition: padding .3s ease, background-color .3s ease, border-color .3s ease;
}

.site-header.is-pinned .header-shell {
  padding: 6px 10px 6px 14px;
  background: rgba(10, 16, 36, .93);
  border-color: #35428A;
}

/* 品牌 */
.brand {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  padding: 4px 6px;
  border-radius: var(--radius-pill);
  color: inherit;
  text-decoration: none;
  transition: background-color .22s ease;
}

.brand:hover { background: rgba(122, 77, 255, .14); }

.brand-mark {
  position: relative;
  display: grid;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 11px;
  background: var(--grad-nebula);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .08),
    0 10px 22px -12px rgba(122, 77, 255, .95);
}

.brand-mark__core {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: var(--ink-0);
  box-shadow: 0 0 0 2px rgba(6, 10, 24, .5);
  animation: brandPulse 6s ease-in-out infinite;
}

@keyframes brandPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(.7); opacity: .72; }
}

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

.brand-name {
  font-family: var(--font-ui);
  font-size: .98rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--porcelain);
}

.brand-line {
  font-size: .66rem;
  letter-spacing: .07em;
  color: var(--mist);
}

/* 主导航 */
.site-nav {
  display: flex;
  flex: 1 1 auto;
  justify-content: center;
  min-width: 0;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list a {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  font-family: var(--font-ui);
  font-size: .88rem;
  font-weight: 500;
  color: var(--mist);
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s ease, background-color .2s ease, box-shadow .2s ease;
}

.nav-list a:hover {
  color: var(--porcelain);
  background: rgba(122, 77, 255, .18);
}

.nav-list a[aria-current="page"] {
  color: #FFFFFF;
  background: linear-gradient(120deg, rgba(122, 77, 255, .46), rgba(58, 30, 115, .55));
  box-shadow: inset 0 0 0 1px rgba(122, 77, 255, .6);
}

/* 头部按钮区 */
.header-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

/* 移动导航按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: rgba(122, 77, 255, .13);
  color: var(--porcelain);
  font-family: var(--font-ui);
  font-size: .84rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .22s ease, background-color .22s ease;
}

.nav-toggle:hover { border-color: var(--violet); background: rgba(122, 77, 255, .22); }

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

.nav-toggle__bars span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--mint);
  transition: transform .25s ease, opacity .25s ease;
}

.site-header[data-open] .nav-toggle__bars span:first-child { transform: translateY(3px) rotate(45deg); }
.site-header[data-open] .nav-toggle__bars span:last-child { transform: translateY(-3px) rotate(-45deg); }

/* 滚动进度带 */
.header-progress {
  position: absolute;
  right: 26px;
  bottom: 4px;
  left: 26px;
  height: 2px;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(255, 255, 255, .06);
  pointer-events: none;
}

.header-progress__bar {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--violet), var(--mint), var(--lime));
  transition: width .14s linear;
}

/* ---------- 7. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-ui);
  font-size: .88rem;
  font-weight: 600;
  letter-spacing: .02em;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease, color .2s ease;
}

.btn--sm { padding: 8px 15px; font-size: .84rem; }

.btn--primary {
  background: var(--grad-lime);
  color: #0A0F22;
  box-shadow: 0 14px 30px -18px rgba(182, 255, 60, .85);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 34px -18px rgba(182, 255, 60, 1);
}

.btn--ghost {
  border-color: rgba(122, 77, 255, .5);
  background: rgba(122, 77, 255, .12);
  color: var(--porcelain);
}

.btn--ghost:hover {
  transform: translateY(-2px);
  border-color: var(--mint);
  background: rgba(122, 77, 255, .24);
}

.btn--violet {
  background: linear-gradient(120deg, var(--violet-deep), var(--violet));
  color: #FFFFFF;
  box-shadow: 0 14px 30px -18px rgba(122, 77, 255, .95);
}

.btn--violet:hover { transform: translateY(-2px); }

.btn--block { width: 100%; }

.btn:active { transform: translateY(0) scale(.985); }

/* ---------- 8. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(64px, 10vw, 140px);
  padding: clamp(40px, 6vw, 74px) clamp(16px, 2.4vw, 28px) 30px;
  background: linear-gradient(180deg, rgba(14, 23, 48, 0) 0%, rgba(14, 23, 48, .82) 38%, rgba(6, 10, 24, .99) 100%);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(122, 77, 255, .75), rgba(56, 232, 200, .55), transparent);
}

.footer-shell {
  display: grid;
  grid-template-columns: minmax(250px, 1.25fr) 2.1fr;
  gap: clamp(28px, 5vw, 72px);
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
}

.footer-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }

.brand--footer { padding: 0; }

.footer-note {
  max-width: 34ch;
  margin: 0;
  font-size: .9rem;
  line-height: 1.7;
  color: var(--mist);
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
}

.footer-col__title {
  margin: 0 0 12px;
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .22em;
  color: var(--mint);
  text-transform: uppercase;
}

.footer-links { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }

.footer-links a {
  display: inline-block;
  padding: 4px 0;
  font-size: .9rem;
  color: var(--mist);
  text-decoration: none;
  transition: color .2s ease, transform .2s ease;
}

.footer-links a:hover { color: var(--lime); transform: translateX(3px); }

.footer-contact {
  max-width: var(--shell);
  margin: clamp(34px, 5vw, 56px) auto 0;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.footer-contact__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
}

.footer-contact__key {
  font-size: .68rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--mist);
}

.footer-contact__value {
  font-size: .88rem;
  color: var(--porcelain);
}

.footer-contact__value--note { color: var(--mist); font-size: .82rem; }

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: rgba(122, 77, 255, .1);
  color: var(--porcelain);
  font-size: .82rem;
  cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease, color .2s ease;
}

.copy-btn::after {
  content: "复制";
  font-family: var(--font-ui);
  font-size: .68rem;
  letter-spacing: .08em;
  color: var(--mist);
}

.copy-btn:hover {
  border-color: var(--mint);
  background: rgba(56, 232, 200, .14);
  color: var(--lime);
}

.copy-btn:active { transform: scale(.97); }

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  max-width: var(--shell);
  margin: clamp(26px, 4vw, 42px) auto 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.footer-legal,
.footer-copy {
  margin: 0;
  font-size: .78rem;
  letter-spacing: .02em;
  color: var(--mist);
}

/* ---------- 9. 通用内容组件 ---------- */
.section {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: clamp(40px, 6vw, 92px) clamp(16px, 2.4vw, 28px);
}

.section__head { margin-bottom: clamp(20px, 3vw, 38px); }

.eyebrow {
  display: block;
  margin-bottom: 10px;
  font-size: .72rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--mint);
}

.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  font-weight: 700;
  color: var(--porcelain);
}

.lede {
  max-width: 62ch;
  margin: 12px 0 0;
  font-size: 1.03rem;
  line-height: 1.75;
  color: var(--mist);
}

.grid { display: grid; gap: clamp(16px, 2vw, 26px); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(228px, 1fr)); }
.grid--editorial { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(20px, 3vw, 56px); }

.card {
  position: relative;
  padding: clamp(18px, 2.2vw, 26px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(14, 23, 48, .96), rgba(10, 16, 36, .84));
  transition: border-color .22s ease, transform .22s ease, box-shadow .22s ease;
}

.card:hover {
  border-color: rgba(122, 77, 255, .72);
  transform: translateY(-2px);
  box-shadow: 0 26px 50px -34px rgba(122, 77, 255, .95);
}

.card--accent::before {
  content: "";
  position: absolute;
  top: 0;
  right: 22px;
  left: 22px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--violet), var(--mint), var(--lime));
}

.panel {
  padding: clamp(16px, 2vw, 24px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(14, 23, 48, .68);
}

.stat { display: flex; flex-direction: column; gap: 4px; }

.stat__value {
  font-size: clamp(2.2rem, 4.4vw, 3.2rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -.02em;
  color: var(--lime);
}

.stat__label {
  font-family: var(--font-ui);
  font-size: .78rem;
  letter-spacing: .14em;
  color: var(--mist);
  text-transform: uppercase;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-family: var(--font-ui);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--mist);
}

.badge--lime { border-color: rgba(182, 255, 60, .45); background: rgba(182, 255, 60, .12); color: var(--lime); }
.badge--orange { border-color: rgba(255, 154, 60, .45); background: rgba(255, 154, 60, .12); color: var(--orange); }
.badge--mint { border-color: rgba(56, 232, 200, .45); background: rgba(56, 232, 200, .12); color: var(--mint); }

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(14, 23, 48, .7);
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: .92rem;
}

.data-table caption {
  padding: 14px 16px 0;
  font-family: var(--font-ui);
  font-size: .82rem;
  text-align: left;
  color: var(--mist);
}

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

.data-table thead th {
  font-family: var(--font-ui);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--mist);
  background: rgba(122, 77, 255, .1);
  white-space: nowrap;
}

.data-table tbody tr:last-child th,
.data-table tbody tr:last-child td { border-bottom: 0; }

.data-table tbody tr:hover { background: rgba(122, 77, 255, .09); }

.data-table td.is-num { color: var(--lime); white-space: nowrap; }

.breadcrumbs {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 20px clamp(16px, 2.4vw, 28px) 0;
}

.breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-ui);
  font-size: .8rem;
}

.breadcrumbs__item { display: flex; align-items: center; gap: 8px; color: var(--mist); }

.breadcrumbs__item + .breadcrumbs__item::before { content: "/"; color: #3A4270; }

.breadcrumbs a { color: var(--mist); text-decoration: none; transition: color .2s ease; }
.breadcrumbs a:hover { color: var(--mint); }
.breadcrumbs [aria-current="page"] { color: var(--porcelain); }

.prose {
  max-width: 70ch;
  color: var(--mist);
  font-size: 1rem;
}

.prose h3 { margin-top: 1.8em; color: var(--porcelain); }
.prose h3:first-child { margin-top: 0; }
.prose strong { color: var(--porcelain); }
.prose a { color: var(--mint); text-decoration: underline; text-underline-offset: 3px; }
.prose ul, .prose ol { margin: 0 0 1.15em; padding-left: 1.25em; }
.prose li { margin-bottom: .45em; }
.prose code {
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(122, 77, 255, .16);
  font-family: var(--font-mono);
  font-size: .88em;
  color: var(--lime);
}

/* ---------- 10. 跟随式章节目录 ---------- */
.toc {
  position: sticky;
  top: 96px;
  align-self: start;
}

.toc__title {
  margin: 0 0 12px;
  font-size: .7rem;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--mist);
}

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

.toc__link {
  display: block;
  padding: 8px 12px;
  border-left: 2px solid var(--line);
  font-family: var(--font-ui);
  font-size: .87rem;
  color: var(--mist);
  text-decoration: none;
  transition: color .2s ease, border-color .2s ease, background-color .2s ease;
}

.toc__link:hover { color: var(--porcelain); border-left-color: var(--mint); }

.toc__link[aria-current="true"] {
  color: var(--porcelain);
  border-left-color: var(--lime);
  background: linear-gradient(90deg, rgba(122, 77, 255, .26), transparent);
}

[data-section] { scroll-margin-top: 110px; }

/* ---------- 11. 图片容器 ---------- */
.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background-image:
    radial-gradient(120% 120% at 16% 0%, rgba(122, 77, 255, .38), transparent 62%),
    radial-gradient(90% 100% at 100% 100%, rgba(56, 232, 200, .18), transparent 58%),
    linear-gradient(150deg, #0E1730, #060A18);
}

.media-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.media-frame--21x9 { aspect-ratio: 21 / 9; }
.media-frame--16x9 { aspect-ratio: 16 / 9; }
.media-frame--4x3 { aspect-ratio: 4 / 3; }
.media-frame--3x4 { aspect-ratio: 3 / 4; }
.media-frame--1x1 { aspect-ratio: 1 / 1; }

.media-frame__inner { position: absolute; inset: 0; }

.media-frame__caption {
  display: block;
  margin-top: 10px;
  font-size: .78rem;
  letter-spacing: .02em;
  color: var(--mist);
}

/* ---------- 12. 返回顶部 / Toast / 入场 ---------- */
.to-top {
  position: fixed;
  right: clamp(14px, 2.4vw, 28px);
  bottom: clamp(14px, 2.4vw, 28px);
  z-index: 100;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 17px;
  border: 1px solid rgba(122, 77, 255, .5);
  border-radius: var(--radius-pill);
  background: rgba(10, 16, 36, .9);
  color: var(--porcelain);
  font-family: var(--font-ui);
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: opacity .28s ease, transform .28s ease, visibility .28s ease, border-color .2s ease;
}

.to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { border-color: var(--mint); }

.to-top__glyph {
  width: 9px;
  height: 9px;
  border-top: 2px solid var(--lime);
  border-left: 2px solid var(--lime);
  transform: rotate(45deg) translate(1px, 1px);
}

.toast {
  position: fixed;
  bottom: clamp(20px, 4vw, 44px);
  left: 50%;
  z-index: 120;
  max-width: min(92vw, 520px);
  padding: 11px 20px;
  border: 1px solid rgba(56, 232, 200, .5);
  border-radius: var(--radius-pill);
  background: rgba(9, 14, 32, .97);
  color: var(--porcelain);
  font-family: var(--font-ui);
  font-size: .84rem;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 14px);
  transition: opacity .24s ease, transform .24s ease, visibility .24s ease;
}

.toast.is-visible { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .42s ease, transform .42s ease;
  transition-delay: var(--reveal-delay, 0s);
}

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

/* ---------- 13. 响应式 ---------- */
@media (max-width: 1140px) {
  .grid--editorial { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; top: auto; }
}

@media (max-width: 980px) {
  body { background-attachment: scroll; }

  .nav-toggle { display: inline-flex; margin-left: calc(var(--radius-pill) * 0); }
  .header-actions { margin-left: auto; }
  .header-actions .btn--ghost { display: none; }

  .site-nav {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    left: 0;
    display: block;
    max-height: min(70vh, 460px);
    overflow-y: auto;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(9, 14, 32, .97);
    box-shadow: 0 34px 64px -36px rgba(0, 0, 0, .98);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity .22s ease, transform .22s ease, visibility .22s ease;
  }

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

  .nav-list { flex-direction: column; align-items: stretch; gap: 2px; }

  .nav-list a { padding: 12px 16px; border-radius: 14px; font-size: .95rem; }

  .footer-shell { grid-template-columns: minmax(0, 1fr); }
  .footer-cols { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
}

@media (max-width: 620px) {
  .site-header { padding: 9px 10px 5px; }
  .header-shell { gap: 10px; padding: 7px 8px 7px 12px; }
  .brand-line { display: none; }
  .brand-mark { flex-basis: 28px; width: 28px; height: 28px; border-radius: 9px; }
  .btn--sm { padding: 8px 13px; font-size: .8rem; }
  .header-progress { right: 18px; left: 18px; }
  .to-top__label { display: none; }
  .to-top { padding: 11px 13px; }
  .footer-meta { flex-direction: column; }
  .data-table th, .data-table td { padding: 10px 12px; }
}

/* ---------- 14. 减少动态效果 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

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

  .reveal { opacity: 1; transform: none; }
}
