/* ==========================================================================
   196体育赛 · /assets/site.css
   共享层：reset / 变量 / 中文排版 / 侧边轨道头部 / 页脚 / 通用组件
   高原蓝 · 经幡橙 · 青稞绿 · 岩灰 · 米白
   ========================================================================== */

/* ---------- 1. 变量 ---------- */
:root {
  --ink-900: #1B1F24;
  --ink-800: #242A31;
  --ink-700: #333A42;
  --ink-400: #7C8792;
  --blue-700: #14568F;
  --blue-500: #1E7FC4;
  --blue-300: #8CC0E4;
  --orange-500: #F07818;
  --orange-200: #FBD7B4;
  --green-500: #2E9E63;
  --moss-600: #5F7C4E;
  --clay-500: #B4653A;
  --sand-100: #F2ECE1;
  --white-050: #FAFBFC;

  --bg: var(--ink-900);
  --bg-deep: #0D1014;
  --panel: var(--ink-700);
  --line: rgba(124, 135, 146, 0.30);
  --line-strong: rgba(124, 135, 146, 0.58);
  --txt: var(--white-050);
  --txt-dim: #A9B3BD;
  --on-sand: #1F2429;
  --on-sand-dim: #4A5158;

  --rail-w: 276px;
  --shell: 1360px;
  --pad-x: clamp(1.15rem, 4vw, 4.25rem);
  --radius: 4px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.42);

  --font-sans: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --ease: cubic-bezier(0.22, 0.8, 0.32, 1);
}

/* ---------- 2. 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, ul, ol, dl, figure, blockquote, pre {
  margin: 0;
}

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

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

a { color: inherit; }

button, input, select, textarea { font: inherit; color: inherit; }
button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

table { border-collapse: collapse; border-spacing: 0; }

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

::selection {
  background: var(--blue-500);
  color: var(--white-050);
}

/* ---------- 3. 基底与中文排版 ---------- */
body {
  background: var(--bg);
  color: var(--txt);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.75;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100%;
}

main { display: block; }

h1, h2, h3, h4, h5, h6 {
  color: inherit;
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 5vw, 4rem); }
h2 { font-size: clamp(1.6rem, 3.1vw, 2.5rem); }
h3 { font-size: clamp(1.15rem, 1.9vw, 1.5rem); }
h4 { font-size: 1.0625rem; }

p { text-wrap: pretty; }

strong, b { font-weight: 800; }

em, i { font-style: normal; }

code, kbd, samp, .mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.num,
[data-count] {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

:where([id]) { scroll-margin-top: 4.5rem; }

.is-hidden,
[hidden] { display: none !important; }

/* ---------- 4. 通用布局 ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

.section {
  position: relative;
  padding-block: clamp(2.75rem, 6.5vw, 5.75rem);
}

.section--tight { padding-block: clamp(1.75rem, 4vw, 3rem); }

.section--deep {
  background: var(--bg-deep);
  color: var(--txt);
}

.section--sand {
  background: var(--sand-100);
  color: var(--on-sand);
}

.section--sand .sec-num { color: var(--blue-700); }
.section--sand .prose { color: var(--on-sand-dim); }
.section--sand .table td { border-bottom-color: rgba(31, 36, 41, 0.14); }
.section--sand .table th { color: var(--white-050); }
.section--sand .table tbody tr:nth-child(even) { background: rgba(31, 36, 41, 0.045); }

.grid {
  display: grid;
  gap: clamp(1rem, 2.4vw, 2rem);
  grid-template-columns: minmax(0, 1fr);
}

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

@media (min-width: 720px) {
  .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1080px) {
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.prose {
  max-width: 68ch;
  font-size: 1.0625rem;
  line-height: 1.85;
  color: inherit;
}

.prose > p + p,
.prose > p + ul,
.prose > ul + p { margin-top: 1em; }

.prose ul,
.prose ol {
  padding-left: 1.5em;
}

.prose ul li { list-style: disc; }
.prose ol li { list-style: decimal; }
.prose li { margin-bottom: 0.35em; }

.prose a {
  color: var(--blue-300);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose strong { color: var(--white-050); }
.section--sand .prose strong { color: var(--on-sand); }

/* ---------- 5. 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: 0.6rem;
  left: 0.6rem;
  z-index: 320;
  padding: 0.62rem 1.05rem;
  font-size: 0.875rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #221204;
  background: var(--orange-500);
  border-radius: 3px;
  text-decoration: none;
  transform: translateY(-200%);
  transition: transform 0.25s var(--ease);
}

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

/* ---------- 6. 头部 · 侧边轨道 / 移动抽屉 ---------- */
.rail {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  max-height: 88vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1.5rem var(--pad-x) 5.75rem;
  background: #101418;
  color: var(--txt);
  border-top: 1px solid var(--blue-500);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -20px 54px rgba(0, 0, 0, 0.62);
  transform: translateY(104%);
  visibility: hidden;
  transition: transform 0.42s var(--ease), visibility 0.42s var(--ease);
}

.rail::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background-image: repeating-linear-gradient(90deg, var(--blue-500) 0 2px, transparent 2px 9px);
  opacity: 0.6;
  border-radius: 16px 16px 0 0;
  pointer-events: none;
}

.rail[data-open] {
  transform: translateY(0);
  visibility: visible;
}

.rail__inner {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
}

.rail__head {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.rail__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--white-050);
}

.rail__mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--white-050);
  background: var(--blue-700);
  border: 1px solid var(--blue-500);
  border-bottom: 3px solid var(--orange-500);
  border-radius: 3px;
}

.rail__brand-text { display: block; }

.rail__brand-text strong {
  display: block;
  font-size: 1.0625rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.25;
}

.rail__brand-text em {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--blue-300);
  line-height: 1.4;
}

.rail__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.3rem 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--orange-200);
  background: rgba(240, 120, 24, 0.10);
  border: 1px solid var(--clay-500);
  border-radius: 2px;
  white-space: nowrap;
}

.rail__badge::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--green-500);
}

.rail__nav { width: 100%; }

.rail__list {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  border-top: 1px solid var(--line);
  padding-top: 0.5rem;
}

.rail__link {
  display: grid;
  grid-template-columns: 1.85rem minmax(0, 1fr);
  align-items: baseline;
  gap: 0.35rem;
  padding: 0.62rem 0.55rem 0.62rem 0.7rem;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--txt-dim);
  text-decoration: none;
  border-left: 2px solid transparent;
  border-radius: 0 3px 3px 0;
  transition: color 0.24s var(--ease), background-color 0.24s var(--ease), border-color 0.24s var(--ease);
}

.rail__num {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink-400);
  transition: color 0.24s var(--ease);
}

.rail__link:hover {
  color: var(--white-050);
  background: rgba(30, 127, 196, 0.10);
  border-left-color: var(--blue-500);
}

.rail__link[aria-current="page"] {
  color: var(--white-050);
  font-weight: 700;
  border-left-color: var(--orange-500);
  background: linear-gradient(90deg, rgba(30, 127, 196, 0.26), rgba(30, 127, 196, 0));
}

.rail__link[aria-current="page"] .rail__num { color: var(--orange-500); }

.rail__foot {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 0.25rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--line);
}

.rail__note {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--ink-400);
  line-height: 1.6;
}

/* 移动端唤起按钮 */
.rail__toggle {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  z-index: 100;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.72rem 1.2rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--white-050);
  background: var(--blue-700);
  border: 1px solid var(--blue-500);
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
  transition: background-color 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease);
}

.rail__toggle[aria-expanded="true"] {
  color: #221204;
  background: var(--orange-500);
  border-color: var(--orange-500);
}

.rail__toggle-bars {
  position: relative;
  display: block;
  width: 16px;
  height: 11px;
  flex: none;
}

.rail__toggle-bars::before,
.rail__toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.3s var(--ease);
}

.rail__toggle-bars::before {
  top: 0;
  box-shadow: 0 4.5px 0 currentColor;
}

.rail__toggle-bars::after { bottom: 0; }

.rail__toggle[aria-expanded="true"] .rail__toggle-bars::before {
  transform: translateY(4.5px) rotate(45deg);
  box-shadow: none;
}

.rail__toggle[aria-expanded="true"] .rail__toggle-bars::after {
  transform: translateY(-4.5px) rotate(-45deg);
}

/* 桌面端：固定侧边轨道 */
@media (min-width: 1080px) {
  body { padding-left: var(--rail-w); }

  .rail {
    top: 0;
    right: auto;
    bottom: 0;
    left: 0;
    width: var(--rail-w);
    max-height: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 0;
    border-top: 0;
    border-right: 1px solid var(--line);
    border-radius: 0;
    box-shadow: none;
    transform: none;
    visibility: visible;
    background: linear-gradient(170deg, #151C23 0%, #111519 46%, #0D1014 100%);
  }

  .rail::before {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 3px;
    height: auto;
    border-radius: 0;
    background-image: none;
    background: linear-gradient(180deg, var(--blue-500) 0%, var(--blue-700) 42%, var(--orange-500) 42%, var(--orange-500) 66%, var(--green-500) 66%, var(--green-500) 100%);
    opacity: 0.9;
  }

  .rail::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 7px;
    pointer-events: none;
    background-image: repeating-linear-gradient(to bottom, rgba(124, 135, 146, 0.5) 0 1px, transparent 1px 26px);
  }

  .rail__inner {
    flex: 1 1 auto;
    max-width: none;
    margin: 0;
    height: 100%;
    overflow-y: auto;
    padding: 1.85rem 1.4rem 1.6rem 1.6rem;
    gap: 1.5rem;
  }

  .rail__head {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0.85rem;
  }

  .rail__list { padding-top: 0.6rem; }

  .rail__foot { margin-top: auto; }

  .rail__toggle { display: none; }
}

/* ---------- 7. 页脚 ---------- */
.site-foot {
  position: relative;
  margin-top: clamp(2.5rem, 6vw, 5rem);
  background: #0C0F13;
  color: var(--txt-dim);
  border-top: 1px solid var(--line);
}

.site-foot::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg,
    var(--blue-500) 0%, var(--blue-500) 34%,
    var(--orange-500) 34%, var(--orange-500) 62%,
    var(--green-500) 62%, var(--green-500) 100%);
  opacity: 0.9;
}

.site-foot__inner {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: clamp(2.25rem, 5vw, 3.75rem) var(--pad-x) 1.75rem;
}

.site-foot__main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1.75rem, 4vw, 3.5rem);
  padding-bottom: clamp(1.5rem, 3vw, 2.25rem);
  border-bottom: 1px solid var(--line);
}

.site-foot__brand { max-width: 46ch; }

.site-foot__name {
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--white-050);
  line-height: 1.2;
}

.site-foot__tag {
  display: inline-flex;
  align-items: center;
  margin-top: 0.6rem;
  padding: 0.26rem 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--orange-200);
  background: rgba(240, 120, 24, 0.10);
  border: 1px solid var(--clay-500);
  border-radius: 2px;
}

.site-foot__summary {
  margin-top: 0.95rem;
  font-size: 0.9375rem;
  line-height: 1.8;
  color: var(--txt-dim);
}

.site-foot__cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: clamp(1.25rem, 3vw, 2.25rem);
}

.site-foot__title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--blue-300);
  margin-bottom: 0.85rem;
}

.site-foot__list {
  display: grid;
  gap: 0.55rem;
}

.site-foot__list a {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--txt-dim);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.22s var(--ease), border-color 0.22s var(--ease);
}

.site-foot__list a:hover {
  color: var(--orange-200);
  border-bottom-color: var(--orange-500);
}

.site-foot__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  justify-content: space-between;
  padding-top: 1.35rem;
}

.site-foot__contact,
.site-foot__legal {
  font-size: 0.8125rem;
  line-height: 1.7;
  color: var(--ink-400);
}

.site-foot__contact { flex: 1 1 22rem; }
.site-foot__legal { flex: 0 1 auto; font-family: var(--font-mono); letter-spacing: 0.02em; }

/* ---------- 8. 通用按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.35rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-align: center;
  text-decoration: none;
  color: var(--white-050);
  background: var(--ink-700);
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background-color 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease);
}

.btn:hover { transform: translateY(-2px); border-color: var(--blue-500); }
.btn:active { transform: translateY(0); }

.btn--primary {
  color: #221204;
  background: var(--orange-500);
  border-color: var(--orange-500);
}

.btn--primary:hover { background: #FF8C2E; border-color: #FF8C2E; }

.btn--ghost {
  color: var(--txt);
  background: transparent;
  border-color: var(--line-strong);
}

.btn--ghost:hover {
  color: var(--white-050);
  background: rgba(30, 127, 196, 0.14);
  border-color: var(--blue-500);
}

.btn--sm { padding: 0.55rem 0.9rem; font-size: 0.875rem; }
.btn--block { width: 100%; }

/* ---------- 9. 面包屑 ---------- */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8125rem;
  line-height: 1.7;
  color: var(--ink-400);
}

.crumbs li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.crumbs li + li::before {
  content: "/";
  color: var(--ink-400);
  opacity: 0.7;
}

.crumbs a {
  color: inherit;
  text-decoration: none;
  transition: color 0.22s var(--ease);
}

.crumbs a:hover { color: var(--orange-200); }

.crumbs [aria-current="page"] { color: var(--txt-dim); }

/* ---------- 10. 框景与章节头 ---------- */
.frame {
  position: relative;
  padding: clamp(1.25rem, 3.5vw, 2.75rem);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(30, 127, 196, 0.06), rgba(27, 31, 36, 0)),
    var(--ink-900);
}

.frame::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 18px;
  height: 18px;
  border-top: 3px solid var(--orange-500);
  border-left: 3px solid var(--orange-500);
  border-radius: var(--radius) 0 0 0;
  pointer-events: none;
}

.frame::after {
  content: "";
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 18px;
  height: 18px;
  border-right: 3px solid var(--blue-500);
  border-bottom: 3px solid var(--blue-500);
  border-radius: 0 0 var(--radius) 0;
  pointer-events: none;
}

.frame--ticks { border-style: solid; }

.sec-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.5rem;
  margin-bottom: clamp(1.25rem, 3vw, 2.25rem);
}

@media (min-width: 720px) {
  .sec-head {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: baseline;
    gap: 0.35rem 1.35rem;
  }
}

.sec-num {
  font-family: var(--font-mono);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--blue-500);
  font-variant-numeric: tabular-nums;
}

.sec-title {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 800;
  line-height: 1.2;
}

.sec-kicker {
  grid-column: 1 / -1;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--ink-400);
}

/* ---------- 11. 卡片 / 标签 / 数据块 ---------- */
.card {
  position: relative;
  padding: 1.15rem 1.25rem 1.35rem;
  background: var(--ink-700);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}

.card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 15px;
  height: 15px;
  border-top: 2px solid var(--blue-500);
  border-left: 2px solid var(--blue-500);
  border-radius: var(--radius) 0 0 0;
  pointer-events: none;
}

.card:hover { border-color: var(--line-strong); }

.card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.card__head h3 { font-size: 1.0625rem; }

.card__body { font-size: 0.9375rem; line-height: 1.75; color: var(--txt-dim); }

.section--sand .card {
  background: var(--white-050);
  border-color: rgba(31, 36, 41, 0.14);
}

.section--sand .card__body { color: var(--on-sand-dim); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.24rem 0.55rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.5;
  color: var(--txt-dim);
  background: rgba(242, 236, 225, 0.04);
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  white-space: nowrap;
}

.tag--accent {
  color: #221204;
  background: var(--orange-200);
  border-color: var(--orange-200);
}

.tag--ok {
  color: var(--green-500);
  border-color: rgba(46, 158, 99, 0.55);
  background: rgba(46, 158, 99, 0.10);
}

.tag--clay {
  color: var(--clay-500);
  border-color: var(--clay-500);
  background: rgba(180, 101, 58, 0.10);
}

.stat { display: grid; gap: 0.2rem; align-content: start; }

.stat__value {
  font-family: var(--font-mono);
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--orange-500);
}

.stat__label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--ink-400);
}

/* ---------- 12. 表格 ---------- */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(51, 58, 66, 0.28);
}

.table {
  width: 100%;
  min-width: 620px;
  font-size: 0.9375rem;
  line-height: 1.6;
}

.table th {
  padding: 0.7rem 0.9rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  white-space: nowrap;
  color: var(--blue-300);
  background: rgba(20, 86, 143, 0.42);
  border-bottom: 1px solid var(--line);
}

.table td {
  padding: 0.8rem 0.9rem;
  border-bottom: 1px solid var(--line);
  color: inherit;
}

.table tbody tr:nth-child(even) { background: rgba(51, 58, 66, 0.42); }
.table tbody tr:last-child td { border-bottom: 0; }

.table .num,
.table td.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ---------- 13. 图片容器（页面阶段放置图片） ---------- */
.media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(20, 86, 143, 0.62), rgba(13, 16, 20, 0.94)),
    repeating-linear-gradient(135deg, rgba(242, 236, 225, 0.06) 0 2px, transparent 2px 9px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.media::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 26px;
  height: 26px;
  background: var(--orange-500);
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
  opacity: 0.85;
  pointer-events: none;
}

.media > img,
.media > picture > img,
.media > video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.media__caption {
  margin-top: 0.6rem;
  font-size: 0.8125rem;
  line-height: 1.7;
  color: var(--ink-400);
}

/* ---------- 14. 序号收束列表 ---------- */
.list-num {
  display: grid;
  gap: 0.6rem;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}

.list-num li {
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: baseline;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--txt-dim);
}

.list-num li:last-child { border-bottom: 0; padding-bottom: 0; }

.list-num .num {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--blue-500);
  letter-spacing: 0.04em;
}

.section--sand .list-num { border-top-color: rgba(31, 36, 41, 0.14); }
.section--sand .list-num li { color: var(--on-sand-dim); border-bottom-color: rgba(31, 36, 41, 0.12); }
.section--sand .list-num .num { color: var(--blue-700); }

/* ---------- 15. 装饰件 ---------- */
.rule-weave {
  height: 6px;
  border-radius: 1px;
  background-image: repeating-linear-gradient(90deg, var(--blue-500) 0 2px, transparent 2px 9px);
  opacity: 0.5;
}

.edge-slant {
  position: relative;
}

.edge-slant::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  background: linear-gradient(90deg, transparent 0 6%, var(--orange-500) 6% 44%, var(--blue-500) 44% 100%);
  opacity: 0.55;
}

/* ---------- 16. 脚本注入元素 ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 300;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--blue-500), var(--orange-500));
  pointer-events: none;
}

@media (min-width: 1080px) {
  .scroll-progress { left: var(--rail-w); }
}

.to-top {
  position: fixed;
  right: clamp(0.85rem, 2vw, 1.6rem);
  bottom: clamp(0.85rem, 2vw, 1.6rem);
  z-index: 200;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--white-050);
  background: rgba(27, 31, 36, 0.94);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), visibility 0.35s var(--ease), border-color 0.25s var(--ease), background-color 0.25s var(--ease);
}

.to-top[data-visible] {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.to-top:hover {
  background: var(--blue-700);
  border-color: var(--orange-500);
}

.to-top span {
  display: block;
  width: 11px;
  height: 11px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: translateY(3px) rotate(-45deg);
}

/* ---------- 17. 显现 / 目录高亮 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

[data-reveal][data-revealed] {
  opacity: 1;
  transform: none;
}

[data-toc] {
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}

[data-toc][aria-current="true"] {
  color: var(--orange-500);
  border-left-color: var(--orange-500);
}

/* ---------- 18. 平板与移动端微调 ---------- */
@media (max-width: 719px) {
  .rail__brand-text strong { font-size: 1rem; }
  .rail__list { gap: 0.1rem; }
  .rail__link { font-size: 0.9375rem; }
  .site-foot__meta { flex-direction: column; }
}

/* ---------- 19. 动效降级 ---------- */
@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;
  }

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

  .btn:hover,
  .card:hover { transform: none; }
}
