/* ==========================================================================
   多米体育局 · 共享样式表 /assets/site.css
   纵向叙事长卷 · 深夜战术档案馆视觉体系
   01 重置 / 02 令牌 / 03 排版 / 04 容器 / 05 跳转 / 06 进度 /
   07 刊头 / 08 导航 / 09 页脚 / 10 组件 / 11 栅格 / 12 动效 / 13 无障碍
   ========================================================================== */

/* ---------- 01 重置 ---------- */
*,
*::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, p, figure, blockquote, dl, dd, ol, ul, table { margin: 0; }
ol, ul { 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; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
table { border-collapse: collapse; border-spacing: 0; }

/* ---------- 02 令牌 ---------- */
:root {
  --field: #10241C;
  --ink: #0B0D0C;
  --turf: #1C3C2E;
  --flare: #FF4B1F;
  --ember: #FF9147;
  --silver: #C7CED0;
  --signal: #35E0C8;
  --paper: #F1F5F2;
  --note: #7E8F86;
  --violet: #3B2E4A;

  --line: rgba(199, 206, 208, .18);
  --line-strong: rgba(199, 206, 208, .38);
  --ink-soft: rgba(241, 245, 242, .78);
  --ink-dim: rgba(241, 245, 242, .54);

  --shell: 1320px;
  --gutter: 24px;
  --gap: 24px;
  --radius: 2px;
  --ease: cubic-bezier(.22, .61, .36, 1);

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

/* ---------- 03 排版 ---------- */
body {
  background-color: var(--field);
  background-image:
    radial-gradient(1200px 620px at 84% -10%, rgba(53, 224, 200, .07), transparent 62%),
    radial-gradient(920px 500px at 4% 2%, rgba(255, 75, 31, .065), transparent 64%);
  background-repeat: no-repeat;
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.02em;
  font-stretch: condensed;
}

h1 { font-size: clamp(38px, 7vw, 92px); line-height: .98; }
h2 { font-size: clamp(24px, 3vw, 36px); font-weight: 600; }
h3 { font-size: clamp(18px, 2vw, 22px); font-weight: 600; }
h4 { font-size: 16px; font-weight: 600; }

.display {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(38px, 7vw, 92px);
  line-height: .98;
  letter-spacing: -.02em;
  font-stretch: condensed;
}
.display--sm { font-size: clamp(30px, 5vw, 56px); }

.lede {
  max-width: 40em;
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.8;
  color: var(--ink-soft);
}

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

.meta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--note);
}

.mono-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--note);
}
.mono-tag--flare { color: var(--flare); }
.mono-tag--flare [data-year] { color: var(--paper); }

.text-flare { color: var(--flare); }
.text-signal { color: var(--signal); }
.text-note { color: var(--note); }

/* ---------- 04 容器 ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(56px, 8vw, 120px); }
.section--tight { padding-block: clamp(36px, 5vw, 72px); }
.section--flush { padding-top: 0; }

.section-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 14px;
  margin: 0 0 clamp(20px, 3vw, 32px);
  padding-top: 14px;
  border-top: 1px solid var(--line-strong);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(22px, 2.6vw, 34px);
  line-height: 1.2;
  letter-spacing: -.01em;
  color: var(--paper);
}
.section-heading__tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--flare);
}

.chapter-num {
  font-family: var(--font-mono);
  font-size: clamp(13px, 1.4vw, 16px);
  font-weight: 700;
  letter-spacing: .22em;
  color: var(--note);
}

.chapter-rail {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--note);
}

.hairline {
  height: 1px;
  border: 0;
  background: var(--line-strong);
}

.band {
  position: relative;
  height: clamp(44px, 6vw, 84px);
  border-block: 1px solid var(--line);
  background-color: var(--turf);
  background-image:
    repeating-linear-gradient(90deg, rgba(199, 206, 208, .14) 0 1px, transparent 1px 48px),
    linear-gradient(90deg, var(--flare) 0 5%, var(--ember) 5% 8%, transparent 8% 100%);
}

#main-content { display: block; scroll-margin-top: 24px; }

/* ---------- 05 跳转链接 ---------- */
.skip-link {
  position: absolute;
  left: 12px;
  top: -64px;
  z-index: 120;
  display: inline-block;
  padding: 10px 18px;
  background: var(--flare);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .06em;
  border-radius: var(--radius);
  transition: top .18s ease;
}
.skip-link:focus { top: 12px; }

/* ---------- 06 阅读进度 ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 110;
  pointer-events: none;
  background: rgba(199, 206, 208, .12);
}
.scroll-progress__bar {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--signal) 0%, var(--ember) 55%, var(--flare) 100%);
}

/* ---------- 07 刊头 ---------- */
.masthead {
  position: relative;
  z-index: 60;
  background: var(--ink);
  border-bottom: 1px solid var(--line-strong);
}

.masthead__strip { border-bottom: 1px solid var(--line); }

.masthead__strip-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 20px;
  padding-block: 8px;
}

.masthead__plate {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding-block: 18px 14px;
}

.masthead__index-hint {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .14em;
  color: var(--note);
}

.masthead__brand {
  grid-column: 2;
  display: block;
  justify-self: center;
  text-align: center;
}

.masthead__wordmark {
  display: block;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(30px, 4.6vw, 52px);
  line-height: 1;
  letter-spacing: .14em;
  text-indent: .14em;
  color: var(--paper);
  transition: color .24s ease;
}
.masthead__brand:hover .masthead__wordmark { color: var(--signal); }

.masthead__tagline {
  display: block;
  margin-top: 9px;
  font-size: 12px;
  letter-spacing: .16em;
  color: var(--note);
}

.nav-toggle {
  grid-column: 3;
  justify-self: end;
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--silver);
  font-size: 12px;
  letter-spacing: .14em;
  transition: color .22s ease, border-color .22s ease;
}
.nav-toggle:hover { border-color: var(--signal); color: var(--signal); }
.nav-toggle[aria-expanded="true"] { border-color: var(--flare); color: var(--flare); }

.nav-toggle__bars {
  display: grid;
  gap: 4px;
  width: 18px;
}
.nav-toggle__bars i {
  display: block;
  height: 1px;
  background: currentColor;
}
.nav-toggle__text { font-family: var(--font-mono); }

/* ---------- 08 导航 ---------- */
.primary-nav {
  background: var(--ink);
  border-top: 1px solid var(--line);
}

.primary-nav__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 clamp(18px, 3.4vw, 44px);
}

.primary-nav__list a {
  display: inline-block;
  padding: 16px 2px 15px;
  font-size: 14px;
  letter-spacing: .1em;
  color: var(--ink-soft);
  border-bottom: 2px solid transparent;
  transition: color .22s ease, border-color .22s ease;
}
.primary-nav__list a:hover { color: var(--paper); border-bottom-color: var(--ember); }
.primary-nav__list a[aria-current="page"] { color: var(--paper); border-bottom-color: var(--flare); }

/* ---------- 09 页脚 ---------- */
.colophon {
  margin-top: clamp(64px, 10vw, 140px);
  background: var(--ink);
  border-top: 1px solid var(--line-strong);
}

.colophon__inner { padding-block: clamp(40px, 6vw, 64px) 28px; }

.colophon__top {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(28px, 4vw, 52px);
}

.colophon__brand {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.colophon__wordmark {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(26px, 3.2vw, 40px);
  line-height: 1;
  letter-spacing: .14em;
  text-indent: .14em;
  color: var(--paper);
  transition: color .24s ease;
}
.colophon__wordmark:hover { color: var(--signal); }

.colophon__line {
  margin-top: 10px;
  font-size: 12px;
  letter-spacing: .12em;
  color: var(--note);
}
.colophon__line--dim {
  max-width: 26em;
  line-height: 1.85;
  letter-spacing: .04em;
  color: var(--ink-dim);
}

.colophon__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.colophon__col { min-width: 0; }

.colophon__col-title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--flare);
}

.colophon__list { display: grid; gap: 10px; }

.colophon__list a {
  font-size: 14px;
  color: var(--ink-soft);
  border-bottom: 1px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.colophon__list a:hover { color: var(--signal); border-bottom-color: var(--signal); }

.colophon__static { font-size: 14px; color: var(--ink-dim); }

.colophon__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 28px;
  margin-top: clamp(28px, 4vw, 44px);
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.colophon__meta-item {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--note);
}

/* ---------- 10 组件 ---------- */
.crumbs {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
}
.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 6px;
  color: var(--note);
}
.crumbs li { display: flex; align-items: center; gap: 6px; }
.crumbs li + li::before { content: "/"; color: var(--line-strong); }
.crumbs a { color: var(--note); transition: color .2s ease; }
.crumbs a:hover { color: var(--signal); }
.crumbs [aria-current="page"] { color: var(--silver); }

.prose {
  max-width: 39em;
  font-size: 16px;
  line-height: 1.85;
  color: var(--ink-soft);
}
.prose--loose {
  max-width: 34em;
  font-size: 17px;
  line-height: 1.9;
}
.prose p + p { margin-top: 1.05em; }
.prose strong { color: var(--paper); font-weight: 600; }
.prose a {
  color: var(--signal);
  border-bottom: 1px solid rgba(53, 224, 200, .42);
}
.prose a:hover { border-bottom-color: var(--signal); }
.prose ul,
.prose ol { display: grid; gap: 8px; margin: 1em 0; padding-left: 1.15em; }
.prose ul li { position: relative; list-style: none; }
.prose ul li::before {
  content: "";
  position: absolute;
  left: -1.15em;
  top: .76em;
  width: 7px;
  height: 1px;
  background: var(--ember);
}
.prose ol { list-style: decimal; }

.card {
  position: relative;
  padding: clamp(18px, 2.2vw, 26px);
  background: var(--turf);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .42);
}
.card--paper {
  background: var(--paper);
  border-color: rgba(16, 36, 28, .22);
  color: #16211B;
}
.card__title {
  margin-bottom: 8px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--paper);
}
.card--paper .card__title { color: #10241C; }
.card__meta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--note);
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--turf);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.data-table {
  width: 100%;
  min-width: 520px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.data-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 11px 14px;
  background: var(--ink);
  color: var(--note);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--line-strong);
}
.data-table td {
  padding: 11px 14px;
  color: var(--ink-soft);
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover td { background: rgba(53, 224, 200, .07); color: var(--paper); }
.data-table .num { text-align: right; }
.data-table .hl { color: var(--flare); }
.data-table caption {
  caption-side: bottom;
  padding: 10px 14px;
  font-size: 12px;
  letter-spacing: .04em;
  text-align: left;
  color: var(--note);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--silver);
}
.tag--flare { border-color: rgba(255, 75, 31, .55); color: var(--flare); }
.tag--signal { border-color: rgba(53, 224, 200, .5); color: var(--signal); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: transparent;
  color: var(--paper);
  font-size: 14px;
  letter-spacing: .08em;
  cursor: pointer;
  transition: border-color .24s ease, background-color .24s ease, color .24s ease;
}
.btn:hover { border-color: var(--signal); color: var(--signal); }
.btn--flare {
  background: var(--flare);
  border-color: var(--flare);
  color: var(--ink);
  font-weight: 600;
}
.btn--flare:hover { background: var(--ember); border-color: var(--ember); color: var(--ink); }
.btn--ghost { color: var(--silver); }
.btn__arrow { font-family: var(--font-mono); font-size: 13px; }

.figure { margin: 0; }
.figure__frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(140deg, var(--turf) 0%, var(--ink) 100%);
}
.figure__frame--wide { aspect-ratio: 21 / 9; }
.figure__frame--tall { aspect-ratio: 3 / 4; }
.figure__frame--square { aspect-ratio: 1 / 1; }
.figure__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.94) contrast(1.06);
}
.figure__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px rgba(199, 206, 208, .09);
  pointer-events: none;
}
.figure__cap {
  margin-top: 10px;
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--note);
}

/* ---------- 11 栅格 ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gap);
}
.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; }
.col-6 { grid-column: span 6; }
.col-7 { grid-column: span 7; }
.col-8 { grid-column: span 8; }
.col-9 { grid-column: span 9; }
.col-12 { grid-column: span 12; }

/* ---------- 12 动效 ---------- */
html[data-js="on"] .reveal,
html[data-js="on"] .band {
  opacity: 0;
  transition: opacity .6s ease, transform .6s var(--ease);
}
html[data-js="on"] .reveal { transform: translateY(16px); }
html[data-js="on"] .band { transform: scaleX(.9); transform-origin: left center; }
html[data-js="on"] .reveal[data-shown],
html[data-js="on"] .band[data-shown] { opacity: 1; transform: none; }

.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 100;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(11, 13, 12, .9);
  color: var(--silver);
  font-family: var(--font-mono);
  font-size: 15px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .3s ease, transform .3s ease, visibility .3s ease,
              border-color .24s ease, color .24s ease;
}
.to-top[data-visible] { opacity: 1; visibility: visible; transform: none; }
.to-top:hover,
.to-top:focus-visible { border-color: var(--signal); color: var(--signal); }

/* ---------- 13 无障碍与响应式 ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
  border-radius: var(--radius);
}

@media (max-width: 1023px) {
  .grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .col-3 { grid-column: span 3; }
  .col-4 { grid-column: span 3; }
  .col-5 { grid-column: span 6; }
  .col-6 { grid-column: span 6; }
  .col-7 { grid-column: span 6; }
  .col-8 { grid-column: span 6; }
  .col-9 { grid-column: span 6; }
  .colophon__top { grid-template-columns: minmax(0, 1fr); }
  .colophon__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 20px; }
}

@media (max-width: 860px) {
  .masthead__plate {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    padding-block: 14px 12px;
  }
  .masthead__index-hint { display: none; }
  .masthead__brand {
    justify-self: start;
    text-align: left;
  }
  .masthead__wordmark {
    font-size: 26px;
    letter-spacing: .1em;
    text-indent: .1em;
  }
  .masthead__tagline { display: none; }

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

  .primary-nav { display: none; }
  .primary-nav[data-open] { display: block; }
  .primary-nav__list {
    display: grid;
    gap: 0;
    justify-content: stretch;
  }
  .primary-nav__list li + li { border-top: 1px solid var(--line); }
  .primary-nav__list a {
    display: block;
    padding: 16px 6px;
    border-bottom: 0;
    border-left: 2px solid transparent;
  }
  .primary-nav__list a:hover { border-left-color: var(--ember); border-bottom-color: transparent; }
  .primary-nav__list a[aria-current="page"] { border-left-color: var(--flare); border-bottom-color: transparent; }
}

@media (max-width: 639px) {
  :root { --gutter: 18px; --gap: 16px; }
  body { font-size: 15.5px; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-12 { grid-column: 1 / -1; }
  .card { padding: 18px; }
  .to-top { right: 14px; bottom: 14px; width: 42px; height: 42px; }
  .colophon__meta { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  html[data-js="on"] .reveal,
  html[data-js="on"] .band {
    opacity: 1 !important;
    transform: none !important;
  }
  .scroll-progress { display: none; }
}
