/* =========================================================
   B体育赛场 — /assets/site.css
   共享外壳：重置 / 变量 / 中文排版 / 页头 / 页脚 /
   通用按钮 / 面包屑 / 正文容器 / 栅格 / 基础组件
   ========================================================= */

/* ---------- 1. 变量 ---------- */
:root {
  /* 色板 */
  --night: #0B1416;
  --grass-deep: #12403A;
  --grass: #1E5B54;
  --moss: #4A6B52;
  --stone: #3A4245;
  --clay: #B45F3C;
  --bone: #F2EDE4;
  --bone-dim: #E8E5DE;
  --score: #FF6A1A;
  --ice: #5FD0E8;
  --hairline: #C9C2B4;
  --ink-line: #2A3A3C;

  /* 派生色 */
  --muted-on-dark: #8CA0A2;
  --muted-on-light: #6B6257;
  --ice-line: rgba(95, 208, 232, 0.28);
  --score-tint: rgba(255, 106, 26, 0.10);
  --night-veil: rgba(11, 20, 22, 0.86);

  /* 字体 */
  --font-display: "Bebas Neue", "Oswald", "Arial Narrow", "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "Roboto Mono", "SFMono-Regular", Menlo, Consolas, "Courier New", monospace;

  /* 尺度 */
  --wrap-max: 1280px;
  --wrap-pad: 24px;
  --gap: clamp(16px, 2vw, 28px);
  --slant: 8deg;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- 2. 重置 ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 154px;
}

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

ul, ol { list-style: none; }

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

a { color: inherit; text-decoration: none; }

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

button { background: none; border: 0; cursor: pointer; }

table { border-collapse: collapse; width: 100%; }

hr { border: 0; }

/* ---------- 3. 基础排版 ---------- */
body {
  background: var(--bone);
  color: var(--night);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5 {
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.01em;
}

p, li, dd { overflow-wrap: break-word; }

main, #main-content { display: block; }

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

::selection {
  background: var(--score);
  color: var(--night);
}

/* ---------- 4. 布局容器 ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap-max);
  margin-inline: auto;
  padding-inline: var(--wrap-pad);
}

/* ---------- 5. 跳转链接 ---------- */
.skip-link {
  position: absolute;
  top: -120px;
  left: 12px;
  z-index: 300;
  display: inline-block;
  padding: 10px 18px;
  background: var(--score);
  color: var(--night);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  transition: top 0.16s var(--ease);
}

.skip-link:focus { top: 12px; }

/* ---------- 6. 页头 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  background: var(--night);
  color: var(--bone-dim);
  border-bottom: 1px solid var(--ink-line);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: repeating-linear-gradient(98deg, rgba(95, 208, 232, 0.07) 0 1px, transparent 1px 78px);
  pointer-events: none;
}

.header-inner {
  position: relative;
  z-index: 1;
  padding-top: 18px;
}

/* 刊头第一层 */
.masthead {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.masthead__brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.masthead__mark {
  display: grid;
  place-items: center;
  width: clamp(30px, 3vw, 38px);
  height: clamp(30px, 3vw, 38px);
  border: 1px solid var(--score);
  color: var(--score);
  font-family: var(--font-mono);
  font-size: clamp(15px, 1.6vw, 19px);
  line-height: 1;
  transform: skewX(calc(-1 * var(--slant)));
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease);
}

.masthead__brand:hover .masthead__mark {
  background: var(--score);
  color: var(--night);
}

.masthead__name {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.2vw, 40px);
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1;
  color: var(--bone);
  transition: font-size 0.2s var(--ease), letter-spacing 0.2s var(--ease);
}

.masthead__index {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted-on-dark);
}

/* 刊头第二层：栏目 */
.primary-nav {
  margin-top: 16px;
  border-top: 1px solid var(--ink-line);
}

.primary-nav__list {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.primary-nav__item { position: relative; }

.primary-nav__item + .primary-nav__item { border-left: 1px solid var(--ink-line); }

.primary-nav__link {
  display: block;
  position: relative;
  padding: 13px clamp(14px, 1.8vw, 26px);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--bone-dim);
  transition: color 0.16s var(--ease), background-color 0.16s var(--ease);
}

.primary-nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--score);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.2s var(--ease);
}

.primary-nav__link:hover {
  color: var(--bone);
  background: var(--grass-deep);
}

.primary-nav__link:hover::after { transform: scaleX(1); }

.primary-nav__link[aria-current="page"] {
  color: var(--score);
  background: var(--score-tint);
}

.primary-nav__link[aria-current="page"]::after { transform: scaleX(1); }

/* 刊头第三层：第二栏入口与刷新标 */
.header-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 11px 0;
  border-top: 1px solid var(--ink-line);
}

.tool-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.tool-link {
  display: inline-block;
  padding: 5px 12px;
  border: 1px solid var(--ink-line);
  color: var(--ice);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  transition: border-color 0.16s var(--ease), color 0.16s var(--ease), background-color 0.16s var(--ease);
}

.tool-link:hover {
  border-color: var(--score);
  color: var(--score);
  background: var(--score-tint);
}

.header-status {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.refresh-badge {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-on-dark);
}

.refresh-badge__dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  background: var(--score);
  box-shadow: 0 0 0 3px var(--score-tint);
  animation: refreshPulse 2.6s ease-in-out infinite;
}

@keyframes refreshPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 3px var(--score-tint); }
  50% { opacity: 0.45; box-shadow: 0 0 0 6px rgba(255, 106, 26, 0); }
}

.refresh-badge__sep { color: var(--ink-line); }

.refresh-badge__time {
  color: var(--ice);
  font-variant-numeric: tabular-nums;
}

/* 移动开关 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border: 1px solid var(--ink-line);
  color: var(--bone-dim);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.2em;
  transition: border-color 0.16s var(--ease), color 0.16s var(--ease);
}

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

.nav-toggle__bars { display: grid; gap: 4px; width: 18px; }

.nav-toggle__bar {
  display: block;
  width: 100%;
  height: 1px;
  background: currentColor;
}

.nav-toggle__label { line-height: 1; }

.site-header[data-open] .nav-toggle {
  border-color: var(--score);
  color: var(--score);
}

/* 进度尺 */
.scroll-meter {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  z-index: 2;
  height: 2px;
  overflow: hidden;
  background: transparent;
}

.scroll-meter span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--ice), var(--score));
  transform: scaleX(0);
  transform-origin: 0 50%;
}

/* 吸顶收窄 */
.site-header.is-stuck { box-shadow: 0 1px 0 var(--ink-line); }
.site-header.is-stuck .header-inner { padding-top: 10px; }
.site-header.is-stuck .masthead { gap: 4px; }
.site-header.is-stuck .masthead__name {
  font-size: clamp(20px, 2.4vw, 30px);
  letter-spacing: 0.14em;
}
.site-header.is-stuck .masthead__index { display: none; }
.site-header.is-stuck .primary-nav { margin-top: 10px; }
.site-header.is-stuck .primary-nav__link {
  padding-top: 9px;
  padding-bottom: 9px;
  font-weight: 400;
}
.site-header.is-stuck .header-tools { padding: 8px 0; }

/* ---------- 7. 页脚 ---------- */
.site-footer {
  position: relative;
  background: var(--grass-deep);
  color: var(--bone-dim);
  border-top: 1px solid var(--ice-line);
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(98deg, rgba(242, 237, 228, 0.05) 0 1px, transparent 1px 88px);
  pointer-events: none;
}

.site-footer > .wrap { position: relative; z-index: 1; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.4fr 1fr;
  gap: clamp(24px, 3vw, 48px);
  padding: clamp(44px, 6vw, 72px) 0 clamp(32px, 4vw, 44px);
  border-bottom: 1px solid var(--ice-line);
}

.footer-col { min-width: 0; }

.footer-brand {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1.1;
  color: var(--bone);
}

.footer-tagline {
  margin-top: 10px;
  font-size: 14px;
  color: var(--bone-dim);
  opacity: 0.85;
}

.footer-meta {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--ice-line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--muted-on-dark);
}

.footer-heading {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ice);
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--ice-line);
}

.footer-list { display: grid; gap: 8px; }

.footer-list a {
  font-size: 13.5px;
  color: var(--bone-dim);
  padding-bottom: 1px;
  border-bottom: 1px solid transparent;
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease);
}

.footer-list a:hover {
  color: var(--score);
  border-bottom-color: var(--score);
}

.footer-list--contact { gap: 10px; }

.footer-list--contact li {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  font-size: 13.5px;
}

.footer-list--contact span:last-child { overflow-wrap: anywhere; }

.footer-label {
  padding-top: 3px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--muted-on-dark);
}

.footer-note {
  margin-top: 12px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted-on-dark);
}

.footer-icp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--ice-line);
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.1em;
  color: var(--bone);
}

.footer-icp::before {
  content: "";
  width: 7px;
  height: 7px;
  background: var(--ice);
  transform: skewX(calc(-1 * var(--slant)));
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  padding: 18px 0 30px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: var(--muted-on-dark);
}

/* ---------- 8. 分区与章节标题 ---------- */
.section {
  position: relative;
  padding: clamp(56px, 8vw, 110px) 0;
}

.section--bone { background: var(--bone); color: var(--night); }
.section--bone-dim { background: var(--bone-dim); color: var(--night); }
.section--night { background: var(--night); color: var(--bone-dim); }
.section--grass { background: var(--grass-deep); color: var(--bone-dim); }
.section--stone { background: var(--stone); color: var(--bone-dim); }
.section--tint { background: var(--bone); color: var(--night); border-top: 1px solid var(--hairline); }

.section-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 20px;
  align-items: start;
  margin-bottom: clamp(28px, 3.4vw, 48px);
}

.section-head__num {
  grid-row: 1 / span 2;
  align-self: start;
  padding: 4px 9px;
  border: 1px solid var(--clay);
  color: var(--clay);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  line-height: 1.4;
}

.section-head__title {
  font-family: var(--font-display);
  font-size: clamp(30px, 4.4vw, 62px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.02em;
  color: currentColor;
}

.section-head__desc {
  max-width: 56ch;
  font-size: 15px;
  line-height: 1.7;
  opacity: 0.82;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--clay);
}

.muted { color: var(--muted-on-light); }
.section--night .muted,
.section--grass .muted,
.section--stone .muted { color: var(--muted-on-dark); }

/* ---------- 9. 栅格 ---------- */
.grid { display: grid; gap: var(--gap); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--sidebar { grid-template-columns: minmax(0, 260px) minmax(0, 1fr); }

/* ---------- 10. 卡片 ---------- */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(18px, 2vw, 26px);
  border: 1px solid var(--hairline);
  background: transparent;
  transition: border-color 0.18s var(--ease), background-color 0.18s var(--ease);
}

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

.card--onDark { border-color: var(--ink-line); }
.card--onDark:hover { border-color: var(--ice); }

.card--fill { background: var(--bone-dim); }

.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card__title { font-size: 19px; font-weight: 600; line-height: 1.35; }

.card__body { font-size: 14.5px; line-height: 1.75; opacity: 0.86; }

.card__foot {
  margin-top: auto;
  padding-top: 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--hairline);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: var(--muted-on-light);
}

.card--onDark .card__foot {
  border-top-color: var(--ink-line);
  color: var(--muted-on-dark);
}

/* ---------- 11. 标签与索引 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border: 1px solid currentColor;
  color: var(--moss);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
}

.tag--clay { color: var(--clay); }
.tag--ice { color: var(--ice); }
.tag--score { color: var(--score); }

.index-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--clay);
}

.index-chip::before {
  content: "";
  width: 8px;
  height: 8px;
  border: 1px solid currentColor;
  transform: skewX(calc(-1 * var(--slant)));
}

/* ---------- 12. 细线与台账 ---------- */
.rule { height: 1px; margin: 0; background: var(--hairline); }
.rule--dark { background: var(--ink-line); }
.rule--accent { height: 2px; background: var(--score); }

.ledger { display: grid; }

.ledger__row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid var(--hairline);
}

.ledger--dark .ledger__row { border-bottom-color: var(--ink-line); }

.ledger__num {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  color: var(--clay);
}

.ledger__main { min-width: 0; font-size: 15px; }

.ledger__meta {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  white-space: nowrap;
  color: var(--muted-on-light);
}

.ledger--dark .ledger__meta { color: var(--muted-on-dark); }

/* ---------- 13. 比分与数字 ---------- */
.score {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  line-height: 1;
}

.score__value {
  font-size: clamp(22px, 2.8vw, 38px);
  font-weight: 500;
  color: var(--score);
}

.score__sep { font-size: 0.7em; color: var(--muted-on-dark); }

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

/* ---------- 14. 图例 ---------- */
.legend { display: flex; flex-wrap: wrap; gap: 10px 20px; }

.legend__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  color: inherit;
  opacity: 0.8;
}

.legend__swatch { width: 12px; height: 12px; border: 1px solid currentColor; }
.legend__swatch--score { background: var(--score); border-color: var(--score); }
.legend__swatch--ice { background: var(--ice); border-color: var(--ice); }
.legend__swatch--moss { background: var(--moss); border-color: var(--moss); }
.legend__swatch--clay { background: var(--clay); border-color: var(--clay); }

/* ---------- 15. 图片容器 ---------- */
.figure {
  position: relative;
  border: 1px solid var(--ink-line);
  background: var(--stone);
  overflow: hidden;
}

.figure__frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background:
    linear-gradient(102deg, rgba(11, 20, 22, 0.92), rgba(30, 91, 84, 0.55) 55%, rgba(58, 66, 69, 0.9)),
    var(--night);
}

.figure__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(98deg, rgba(242, 237, 228, 0.07) 0 1px, transparent 1px 46px),
    repeating-linear-gradient(8deg, rgba(255, 106, 26, 0.09) 0 1px, transparent 1px 46px);
}

.figure__frame img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.figure__caption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 14px;
  padding: 10px 12px;
  border-top: 1px solid var(--ink-line);
  background: var(--night);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted-on-dark);
}

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

.figure--bone { border-color: var(--hairline); background: var(--bone-dim); }
.figure--bone .figure__frame {
  background:
    linear-gradient(102deg, rgba(242, 237, 228, 0.9), rgba(201, 194, 180, 0.7)),
    var(--bone-dim);
}
.figure--bone .figure__caption {
  border-top-color: var(--hairline);
  background: var(--bone-dim);
  color: var(--muted-on-light);
}

/* ---------- 16. 斜向色带 ---------- */
.slant-band {
  height: 4px;
  background-image: repeating-linear-gradient(98deg, var(--clay) 0 10px, transparent 10px 26px);
}

.slant-band--score {
  background-image: repeating-linear-gradient(98deg, var(--score) 0 10px, transparent 10px 26px);
}

/* ---------- 17. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 22px;
  border: 1px solid var(--moss);
  background: transparent;
  color: var(--night);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  line-height: 1;
  text-transform: uppercase;
  transition: background-color 0.16s var(--ease), color 0.16s var(--ease), border-color 0.16s var(--ease);
}

.btn:hover {
  background: var(--grass-deep);
  border-color: var(--grass-deep);
  color: var(--bone);
}

.btn--solid {
  background: var(--grass-deep);
  border-color: var(--grass-deep);
  color: var(--bone);
}

.btn--solid:hover {
  background: var(--grass);
  border-color: var(--grass);
  color: var(--bone);
}

.btn--score {
  background: var(--score);
  border-color: var(--score);
  color: var(--night);
  font-weight: 700;
}

.btn--score:hover {
  background: #FF8A47;
  border-color: #FF8A47;
  color: var(--night);
}

.btn--ghost {
  border-color: var(--hairline);
  background: transparent;
  color: var(--night);
}

.btn--ghost:hover {
  border-color: var(--score);
  background: transparent;
  color: var(--score);
}

.btn--onDark {
  border-color: var(--ink-line);
  background: transparent;
  color: var(--bone);
}

.btn--onDark:hover {
  border-color: var(--ice);
  background: transparent;
  color: var(--ice);
}

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

/* ---------- 18. 面包屑 ---------- */
.breadcrumb { padding: 14px 0 0; }

.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  color: var(--muted-on-light);
}

.breadcrumb__item { display: flex; align-items: center; }

.breadcrumb__item + .breadcrumb__item::before {
  content: "/";
  margin: 0 10px;
  color: var(--clay);
}

.breadcrumb__link { transition: color 0.16s var(--ease); }
.breadcrumb__link:hover { color: var(--score); }

/* ---------- 19. 正文容器 ---------- */
.prose {
  max-width: 34em;
  font-size: 16.5px;
  line-height: 1.85;
}

.prose > * + * { margin-top: 1.1em; }

.prose h2 { margin-top: 2em; font-size: clamp(20px, 2.2vw, 26px); }
.prose h3 { margin-top: 1.6em; font-size: 18px; font-weight: 600; }

.prose ul,
.prose ol { display: grid; gap: 0.5em; padding-left: 1.4em; }

.prose ul li,
.prose ol li { list-style: none; position: relative; }

.prose ul li::before {
  content: "";
  position: absolute;
  left: -1.1em;
  top: 0.72em;
  width: 6px;
  height: 6px;
  background: var(--clay);
  transform: skewX(calc(-1 * var(--slant)));
}

.prose ol { counter-reset: item; }

.prose ol li { counter-increment: item; }

.prose ol li::before {
  content: counter(item, decimal-leading-zero);
  position: absolute;
  left: -2.3em;
  top: 0.4em;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--clay);
}

.prose blockquote {
  padding-left: 18px;
  border-left: 2px solid var(--score);
  color: var(--muted-on-light);
}

.prose a {
  color: var(--grass-deep);
  border-bottom: 1px solid var(--grass-deep);
}

.prose a:hover {
  color: var(--score);
  border-bottom-color: var(--score);
}

/* ---------- 20. 返回顶部与显现 ---------- */
.scroll-top {
  position: fixed;
  right: 20px;
  bottom: 24px;
  z-index: 110;
  display: none;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--ice);
  background: var(--night-veil);
  color: var(--ice);
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1;
  transition: border-color 0.16s var(--ease), color 0.16s var(--ease);
}

.scroll-top.is-visible { display: inline-flex; }
.scroll-top:hover { border-color: var(--score); color: var(--score); }

.js .reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

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

/* ---------- 21. 响应式 ---------- */
@media (max-width: 1024px) {
  .primary-nav__link {
    padding-inline: 12px;
    font-size: 13px;
    letter-spacing: 0.1em;
  }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--sidebar { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

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

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

  .primary-nav { display: none; }

  .site-header[data-open] .primary-nav {
    display: block;
    max-height: calc(100vh - 170px);
    overflow-y: auto;
    border-top: 1px solid var(--ink-line);
  }

  .primary-nav__list { flex-direction: column; align-items: stretch; }

  .primary-nav__item + .primary-nav__item {
    border-left: 0;
    border-top: 1px solid var(--ink-line);
  }

  .primary-nav__link {
    padding: 15px 4px;
    font-size: 15.5px;
    letter-spacing: 0.12em;
  }

  .primary-nav__link::after {
    left: 0;
    right: auto;
    width: 36px;
    bottom: 8px;
  }

  .primary-nav__link[aria-current="page"] { background: transparent; }

  .header-tools { padding: 10px 0 12px; }
}

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

@media (max-width: 620px) {
  :root { --wrap-pad: 16px; }
  .grid--2,
  .grid--3,
  .grid--4 { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .section-head { grid-template-columns: minmax(0, 1fr); }
  .section-head__num { grid-row: auto; justify-self: start; }
  .ledger__row { grid-template-columns: auto minmax(0, 1fr); }
  .ledger__meta { grid-column: 2; }
}

@media (max-width: 560px) {
  .masthead__name { letter-spacing: 0.12em; }
  .refresh-badge { display: none; }
  .tool-link { padding: 5px 10px; font-size: 11px; }
  .footer-list--contact li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .footer-label { padding-top: 0; }
}

/* ---------- 22. 降低动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .js .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}
