/* ==========================================================================
   云体育主站 — /assets/site.css
   共享层：reset / 变量 / 中文排版 / 头部轨道 / 抽屉导航 / 页脚 / 通用组件
   ========================================================================== */

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

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

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

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

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

a { color: inherit; }

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

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

[hidden] { display: none !important; }

/* ---------- 2. 变量 ---------- */
:root {
  --night: #0B1E3A;
  --night-deep: #071426;
  --night-soft: #132B4D;
  --paper: #F7F0E3;
  --paper-dim: #EFE6D5;
  --ink: #241A14;
  --ink-soft: #4A3A30;
  --red: #E23A2E;
  --red-deep: #7A1E17;
  --yellow: #F5C518;
  --green: #1F7A4D;
  --haze: #8FA3BF;
  --sand: #D8C7A8;
  --white: #FFFFFF;

  --rail-w: 252px;
  --bar-h: 62px;
  --shell-max: 1180px;
  --gutter: clamp(16px, 3.4vw, 44px);
  --notch: 14px;

  --font-display: Impact, "Haettenschweiler", "Arial Narrow", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-body: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;

  --ease: cubic-bezier(.32, .72, .28, 1);
}

/* ---------- 3. 基础排版 ---------- */
body {
  font-family: var(--font-body);
  font-size: clamp(15px, .42vw + 14px, 17px);
  line-height: 1.75;
  letter-spacing: .01em;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.06;
  letter-spacing: -.02em;
  text-wrap: balance;
}

h1 { font-size: clamp(30px, 4.4vw, 54px); }
h2 { font-size: clamp(23px, 2.6vw, 34px); }
h3 { font-size: clamp(18px, 1.7vw, 23px); }
h4 { font-size: clamp(16px, 1.2vw, 18px); letter-spacing: 0; }

p { text-wrap: pretty; }

strong, b { font-weight: 800; }

::selection { background: var(--yellow); color: var(--ink); }

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

/* ---------- 4. 工具类 ---------- */
.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;
}

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

.shell {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(40px, 5.4vw, 78px); }

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

.cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--cluster-gap, 12px);
}

.rule { height: 0; border: 0; border-top: 1px solid rgba(36, 26, 20, .16); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--red-deep);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 3px;
  background: var(--red);
  flex: 0 0 22px;
}

.display {
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: -.03em;
  line-height: .98;
  text-transform: lowercase;
}

.lede {
  font-size: clamp(15.5px, 1vw + 13px, 18px);
  line-height: 1.8;
  color: var(--ink-soft);
  max-width: 62ch;
}

/* ---------- 5. Skip link ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 999;
  display: inline-block;
  padding: 11px 20px;
  background: var(--yellow);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .04em;
  text-decoration: none;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  transform: translateY(-180%);
  transition: transform .22s var(--ease);
}

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

/* ---------- 6. 头部轨道（移动优先） ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: var(--bar-h);
  padding: 0 16px;
  background: var(--night);
  color: var(--paper);
  border-bottom: 1px solid rgba(216, 199, 168, .24);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(143, 163, 191, .10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(143, 163, 191, .10) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  opacity: .55;
}

.rail-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 1 1 auto;
  min-width: 0;
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  background: var(--red);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%);
  transition: background .2s var(--ease);
}

.brand-mark::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 12px;
  height: 12px;
  background: var(--yellow);
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
}

.brand:hover .brand-mark { background: var(--red-deep); }

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  min-width: 0;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: .03em;
  color: var(--paper);
  white-space: nowrap;
}

.brand-line {
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .2em;
  color: var(--haze);
  text-transform: uppercase;
  white-space: nowrap;
}

/* 抽屉按钮 */
.nav-toggle {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 13px;
  background: rgba(247, 240, 227, .07);
  border: 1px solid rgba(216, 199, 168, .38);
  border-radius: 0;
  color: var(--paper);
  cursor: pointer;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  transition: background .2s var(--ease), border-color .2s var(--ease);
}

.nav-toggle:hover { background: rgba(247, 240, 227, .14); }

.nav-toggle-bars {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 17px;
  height: 12px;
}

.nav-toggle-bars span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--yellow);
  transition: transform .26s var(--ease), opacity .18s var(--ease);
}

.nav-toggle-text {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--paper);
}

.site-header[data-open] .nav-toggle-bars span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.site-header[data-open] .nav-toggle-bars span:nth-child(2) { opacity: 0; }
.site-header[data-open] .nav-toggle-bars span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* 抽屉导航 */
.site-nav {
  position: fixed;
  top: var(--bar-h);
  left: 0;
  bottom: 0;
  z-index: 70;
  width: min(86vw, 344px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 18px 26px;
  background: var(--night);
  background-image:
    linear-gradient(rgba(143, 163, 191, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(143, 163, 191, .07) 1px, transparent 1px);
  background-size: 28px 28px;
  border-right: 1px solid rgba(216, 199, 168, .26);
  box-shadow: 16px 0 44px rgba(7, 20, 38, .5);
  overflow-y: auto;
  transform: translateX(-102%);
  visibility: hidden;
  transition: transform .34s var(--ease), visibility .34s;
}

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

.nav-scrim {
  position: fixed;
  top: var(--bar-h);
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 65;
  background: rgba(7, 20, 38, .66);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ease);
}

.site-header[data-open] .nav-scrim {
  opacity: 1;
  pointer-events: auto;
}

.nav-caption {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-bottom: 11px;
  border-bottom: 1px solid rgba(216, 199, 168, .24);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--haze);
}

.nav-caption-dot {
  width: 7px;
  height: 7px;
  background: var(--red);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(226, 58, 46, .22);
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-link {
  position: relative;
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .04em;
  text-decoration: none;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 9px 100%, 0 calc(100% - 9px));
  transition: background .18s var(--ease), color .18s var(--ease), transform .18s var(--ease);
}

.nav-link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  bottom: 9px;
  width: 3px;
  background: var(--red);
  transform: scaleY(0);
  transform-origin: top center;
  transition: transform .22s var(--ease);
}

.nav-link:hover {
  background: rgba(247, 240, 227, .08);
  transform: translateX(2px);
}

.nav-link:hover::before { transform: scaleY(1); }

.nav-coord {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .1em;
  color: var(--haze);
  transition: color .18s var(--ease);
}

.nav-label { min-width: 0; }

.nav-link[aria-current="page"] {
  background: var(--red);
  color: var(--white);
}

.nav-link[aria-current="page"] .nav-coord { color: var(--yellow); }

.nav-link[aria-current="page"]::before {
  background: var(--yellow);
  transform: scaleY(1);
}

.nav-utility {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px dashed rgba(216, 199, 168, .28);
}

.nav-shortcut {
  display: block;
  padding: 13px 15px;
  background: var(--yellow);
  color: var(--ink);
  text-decoration: none;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
  transition: transform .2s var(--ease), background .2s var(--ease);
}

.nav-shortcut:hover {
  background: #ffd633;
  transform: translateX(3px);
}

.nav-shortcut-label {
  display: block;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: .06em;
  line-height: 1.2;
}

.nav-shortcut-meta {
  display: block;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .12em;
  color: var(--red-deep);
}

.nav-status {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .14em;
  color: var(--haze);
}

.nav-status-dot {
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(31, 122, 77, .25);
}

.rail-track { display: none; }

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

/* ---------- 7. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(48px, 7vw, 92px);
  padding: clamp(72px, 8vw, 108px) 0 26px;
  background: var(--night);
  color: var(--paper);
  clip-path: polygon(0 44px, 100% 0, 100% 100%, 0 100%);
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(143, 163, 191, .085) 1px, transparent 1px),
    linear-gradient(90deg, rgba(143, 163, 191, .085) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

.site-footer::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 44px;
  background: linear-gradient(90deg, var(--red) 0%, var(--red) 22%, var(--yellow) 22%, var(--yellow) 34%, transparent 34%);
  opacity: .9;
  clip-path: polygon(0 100%, 0 0, 100% 0, 100% 0);
  pointer-events: none;
}

.footer-coord {
  position: absolute;
  right: -8px;
  bottom: -18px;
  z-index: 0;
  font-family: var(--font-mono);
  font-size: clamp(46px, 9vw, 132px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.04em;
  white-space: nowrap;
  color: rgba(143, 163, 191, .085);
  user-select: none;
  pointer-events: none;
}

.footer-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(28px, 3.4vw, 46px);
}

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

.brand--footer .brand-mark { flex-basis: 38px; width: 38px; height: 38px; font-size: 20px; }
.brand--footer .brand-name { font-size: 17px; }

.footer-brand-line {
  margin-top: 18px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .04em;
  color: var(--paper);
}

.footer-version {
  display: inline-block;
  margin-left: 7px;
  padding: 1px 8px;
  background: var(--yellow);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .08em;
  vertical-align: 2px;
}

.footer-note {
  margin-top: 14px;
  max-width: 44ch;
  padding-left: 14px;
  border-left: 3px solid var(--red);
  font-size: 13.5px;
  line-height: 1.72;
  color: rgba(247, 240, 227, .74);
}

.footer-cta { margin-top: 20px; }

.footer-heading {
  margin-bottom: 15px;
  padding-bottom: 11px;
  border-bottom: 1px solid rgba(216, 199, 168, .26);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--yellow);
}

.footer-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14.5px;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--paper);
  opacity: .84;
  text-decoration: none;
  transition: opacity .18s var(--ease), color .18s var(--ease), transform .18s var(--ease);
}

.footer-link::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  background: var(--red);
  transform: rotate(45deg);
  opacity: 0;
  transition: opacity .18s var(--ease);
}

.footer-link:hover {
  opacity: 1;
  color: var(--yellow);
  transform: translateX(2px);
}

.footer-link:hover::before { opacity: 1; }

.footer-list--plain { gap: 12px; font-size: 14px; }

.footer-kv {
  display: flex;
  flex-direction: column;
  gap: 3px;
  line-height: 1.55;
}

.footer-key {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--haze);
}

.footer-val {
  color: var(--paper);
  overflow-wrap: anywhere;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 26px;
  margin-top: clamp(32px, 4vw, 54px);
  padding-top: 18px;
  border-top: 1px solid rgba(216, 199, 168, .24);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .06em;
  color: var(--haze);
}

.footer-legal { margin: 0; }

.footer-icp { margin: 0; color: var(--sand); }

/* ---------- 8. 通用按钮 ---------- */
.btn {
  --btn-bg: var(--red);
  --btn-fg: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 24px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .06em;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
  transition: transform .2s var(--ease), filter .2s var(--ease), background .2s var(--ease);
}

.btn:hover { transform: translateY(-2px); filter: brightness(1.08); }
.btn:active { transform: translateY(0); }

.btn--red { --btn-bg: var(--red); --btn-fg: var(--white); }
.btn--yellow { --btn-bg: var(--yellow); --btn-fg: var(--ink); }
.btn--green { --btn-bg: var(--green); --btn-fg: var(--white); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--paper); box-shadow: inset 0 0 0 2px rgba(247, 240, 227, .55); }
.btn--ghost-dark { --btn-bg: transparent; --btn-fg: var(--ink); box-shadow: inset 0 0 0 2px rgba(36, 26, 20, .38); }

/* ---------- 9. 标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  background: var(--sand);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 7px 100%, 0 calc(100% - 7px));
}

.tag--red { background: var(--red); color: var(--white); }
.tag--yellow { background: var(--yellow); color: var(--ink); }
.tag--green { background: var(--green); color: var(--white); }
.tag--night { background: var(--night); color: var(--paper); }

/* ---------- 10. 卡片 ---------- */
.card {
  position: relative;
  background: var(--white);
  color: var(--ink);
  padding: clamp(20px, 2.4vw, 30px);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%);
  transition: transform .24s var(--ease), background .24s var(--ease);
}

.card:hover { transform: translateY(-3px); }

.card * { position: relative; z-index: 1; }

.card-corner {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 0;
  width: 34px;
  height: 64px;
  background: var(--yellow);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 74%, 0 100%);
  transition: transform .24s var(--ease);
}

.card-corner--red { background: var(--red); }

.card:hover .card-corner { transform: translateY(-5px); }

/* ---------- 11. 面包屑 ---------- */
.breadcrumb { padding-block: 16px 0; }

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .07em;
  color: var(--ink-soft);
}

.breadcrumb-item { display: flex; align-items: center; gap: 8px; }

.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  color: var(--red);
  font-weight: 700;
}

.breadcrumb-link {
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .18s var(--ease), color .18s var(--ease);
}

.breadcrumb-link:hover { border-bottom-color: var(--red); color: var(--red-deep); }

.breadcrumb-item[aria-current="page"] { color: var(--ink); font-weight: 700; }

/* ---------- 12. 正文容器 ---------- */
.prose { max-width: 68ch; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { margin-top: 2em; font-size: clamp(22px, 2.3vw, 30px); }
.prose h3 { margin-top: 1.7em; font-size: clamp(18px, 1.5vw, 22px); }
.prose p { line-height: 1.85; }
.prose ul, .prose ol { padding-left: 1.35em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--red); }
.prose a {
  color: var(--red-deep);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.prose a:hover { background: var(--yellow); }
.prose strong { font-weight: 800; }
.prose blockquote {
  margin-inline: 0;
  padding: 4px 0 4px 18px;
  border-left: 4px solid var(--yellow);
  color: var(--ink-soft);
  font-size: 1.02em;
}
.prose code {
  font-family: var(--font-mono);
  font-size: .92em;
  background: var(--paper-dim);
  padding: 1px 6px;
}

/* ---------- 13. 图片容器 ---------- */
.media {
  position: relative;
  display: block;
  margin: 0;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background:
    radial-gradient(circle at 78% 12%, rgba(245, 197, 24, .28), transparent 46%),
    linear-gradient(135deg, var(--night) 0%, #16304f 56%, var(--red-deep) 100%);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%);
}

.media > img,
.media > picture,
.media > picture > img,
.media > .media-placeholder {
  width: 100%;
  height: 100%;
  display: block;
}

.media > img,
.media > picture > img {
  object-fit: cover;
  object-position: center;
}

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

.media-caption {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid rgba(36, 26, 20, .18);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .05em;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* ---------- 14. 网格 ---------- */
.grid { display: grid; gap: clamp(16px, 2vw, 28px); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(258px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(238px, 1fr)); }
.grid--12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }

.grid--12 > .col-4,
.grid--12 > .col-5,
.grid--12 > .col-6,
.grid--12 > .col-7,
.grid--12 > .col-8,
.grid--12 > .col-12 { grid-column: 1 / -1; }

@media (min-width: 900px) {
  .grid--12 > .col-4 { grid-column: span 4; }
  .grid--12 > .col-5 { grid-column: span 5; }
  .grid--12 > .col-6 { grid-column: span 6; }
  .grid--12 > .col-7 { grid-column: span 7; }
  .grid--12 > .col-8 { grid-column: span 8; }
  .grid--12 > .col-12 { grid-column: span 12; }
}

/* ---------- 15. 主题筛选 ---------- */
.filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-btn {
  padding: 8px 16px;
  background: transparent;
  border: 1px solid rgba(36, 26, 20, .3);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .1em;
  cursor: pointer;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  transition: background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}

.filter-btn:hover { background: rgba(36, 26, 20, .08); }

.filter-btn[aria-pressed="true"],
.filter-btn.is-active {
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--ink);
}

.filter--on-dark .filter-btn {
  color: var(--paper);
  border-color: rgba(247, 240, 227, .42);
}

.filter--on-dark .filter-btn:hover { background: rgba(247, 240, 227, .14); }

.filter--on-dark .filter-btn[aria-pressed="true"],
.filter--on-dark .filter-btn.is-active {
  background: var(--yellow);
  color: var(--ink);
  border-color: var(--yellow);
}

.filter-status {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--haze);
}

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

  .site-header {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--rail-w);
    height: auto;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 22px;
    padding: 26px 18px 22px;
    border-bottom: 0;
    border-right: 1px solid rgba(216, 199, 168, .22);
  }

  .site-header::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 82% 4%, rgba(245, 197, 24, .13), transparent 52%);
    pointer-events: none;
  }

  .rail-head {
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }

  .brand-mark { flex-basis: 42px; width: 42px; height: 42px; font-size: 21px; }
  .brand-name { font-size: 17px; }
  .brand-line { font-size: 10px; }

  .nav-toggle { display: none; }

  .site-nav {
    position: relative;
    top: auto;
    left: auto;
    bottom: auto;
    z-index: 2;
    width: auto;
    flex: 1 1 auto;
    min-height: 0;
    padding: 0;
    background: transparent;
    background-image: none;
    border: 0;
    box-shadow: none;
    overflow-y: auto;
    overflow-x: hidden;
    transform: none;
    visibility: visible;
    transition: none;
    scrollbar-width: thin;
  }

  .site-nav::-webkit-scrollbar { width: 4px; }
  .site-nav::-webkit-scrollbar-thumb { background: rgba(216, 199, 168, .35); }

  .nav-scrim { display: none; }

  .nav-link { font-size: 14.5px; padding: 10px 11px; }

  .rail-track {
    display: block;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    width: 3px;
    background: rgba(247, 240, 227, .08);
    pointer-events: none;
  }

  .rail-track-fill {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, var(--red) 0%, var(--yellow) 100%);
    transform: scaleY(var(--progress, 0));
    transform-origin: top center;
  }

  .footer-top { grid-template-columns: 1.5fr .95fr .95fr 1.4fr; }
}

/* ---------- 17. 平板 / 小桌面 ---------- */
@media (min-width: 640px) and (max-width: 1023px) {
  .footer-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) and (max-width: 1279px) {
  :root { --rail-w: 228px; }
  .footer-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

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

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