/* =========================================================
   33看台 · 共享外壳样式 /assets/site.css
   碳黑 + 看台深绿 + 荧光黄绿 · 锐利直角 · 精密网格
   ========================================================= */

*, *::before, *::after { box-sizing: border-box; }

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

body, h1, h2, h3, h4, h5, p, ul, ol, li, figure, blockquote, dl, dd, address {
  margin: 0;
}
ul, ol { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; }
a { color: inherit; text-decoration: none; }
table { border-collapse: collapse; }
input, textarea, select { font: inherit; color: inherit; }

/* ---------- 变量 ---------- */
:root {
  --ink: #0A0F0C;
  --stand: #0E2A1E;
  --turf: #145C3A;
  --acid: #C8FF3D;
  --acid-soft: #E4FF9A;
  --white: #F4F7F2;
  --grey: #C3CCC5;
  --steel: #7F8F85;
  --line: #2C3A31;
  --cyan: #6FE7C8;

  --topbar-h: 52px;
  --rail-w: 104px;
  --gut: clamp(16px, 4vw, 40px);
  --maxw: 1320px;

  --f-display: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --f-body: "PingFang SC", "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --f-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --ease: cubic-bezier(.22,.61,.36,1);
  --t-fast: 140ms;
  --t-fold: 220ms;
}

/* ---------- 基础排版 ---------- */
body {
  position: relative;
  min-height: 100vh;
  padding-top: var(--topbar-h);
  background: var(--ink);
  color: var(--white);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -.01em;
  color: var(--white);
}

p { max-width: 38em; }

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

#main-content { scroll-margin-top: calc(var(--topbar-h) + 16px); }

/* ---------- 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 300;
  padding: 10px 18px;
  background: var(--acid);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .06em;
  transform: translateY(-180%);
  transition: transform var(--t-fast) var(--ease);
}
.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid var(--white);
  outline-offset: 2px;
}

/* ---------- 顶栏 ---------- */
.site-header { position: relative; z-index: 100; }

.masthead {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 120;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 var(--gut);
  background: var(--ink);
  border-bottom: 1px solid var(--line);
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.brand__mark {
  flex: none;
  display: inline-block;
  padding: 6px 7px 7px;
  background: var(--acid);
  color: var(--ink);
  font-family: var(--f-mono);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.03em;
  transform: skewX(-6deg);
  transition: background var(--t-fast) var(--ease);
}
.brand:hover .brand__mark { background: var(--acid-soft); }
.brand__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  line-height: 1.15;
}
.brand__name {
  font-family: var(--f-display);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .04em;
  color: var(--white);
  white-space: nowrap;
}
.brand__line {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .14em;
  color: var(--steel);
  white-space: nowrap;
}
.brand:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 4px;
}

.masthead__end {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.util {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--steel);
  white-space: nowrap;
}
.util__item { position: relative; padding-left: 11px; }
.util__item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 4px;
  height: 1px;
  background: var(--line);
}
.util__item:first-child { padding-left: 0; }
.util__item:first-child::before { display: none; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 1px solid var(--acid);
  background: var(--acid);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: .08em;
  text-align: center;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease),
              transform var(--t-fast) var(--ease);
}
.btn:hover { background: var(--acid-soft); border-color: var(--acid-soft); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--acid); outline-offset: 3px; }

.btn--acid { background: var(--acid); border-color: var(--acid); color: var(--ink); }

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

.btn--sm { padding: 8px 14px; font-size: 12px; letter-spacing: .1em; }

/* ---------- 移动导航开关 ---------- */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  cursor: pointer;
  transition: border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.nav-toggle:hover { border-color: var(--acid); color: var(--acid); }
.nav-toggle:focus-visible { outline: 2px solid var(--acid); outline-offset: 2px; }
.nav-toggle__bars {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  width: 14px;
  height: 14px;
}
.nav-toggle__bars i {
  display: block;
  height: 2px;
  background: currentColor;
  transition: transform var(--t-fast) var(--ease), opacity var(--t-fast) var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* ---------- 台阶导航（移动端抽屉） ---------- */
.rail {
  position: fixed;
  top: var(--topbar-h);
  left: 0;
  right: 0;
  z-index: 110;
  max-height: calc(100dvh - var(--topbar-h));
  overflow-y: auto;
  padding: 14px var(--gut) 22px;
  background: var(--stand);
  border-bottom: 1px solid var(--line);
  transform: translateY(-10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-fast) var(--ease),
              transform var(--t-fast) var(--ease),
              visibility 0s linear var(--t-fast);
}
.rail[data-open] {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  transition: opacity var(--t-fast) var(--ease),
              transform var(--t-fast) var(--ease),
              visibility 0s linear 0s;
}

.rail__title {
  padding: 0 2px 10px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--line);
  font-family: var(--f-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .24em;
  color: var(--steel);
}

.rail__list { display: grid; gap: 0; }
.rail__item { display: block; }

.rail__link {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 13px 4px;
  border-bottom: 1px solid var(--line);
  color: var(--white);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .02em;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.rail__num {
  flex: none;
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .1em;
  color: var(--steel);
  transition: color var(--t-fast) var(--ease);
}
.rail__label { display: block; }

.rail__link:hover { color: var(--acid); }
.rail__link:hover .rail__num { color: var(--acid-soft); }
.rail__link[aria-current="page"] { color: var(--acid); }
.rail__link[aria-current="page"] .rail__num { color: var(--acid); }
.rail__link:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 2px;
}

/* ---------- 阅读进度 ---------- */
.progress {
  position: fixed;
  left: 0;
  right: 0;
  top: calc(var(--topbar-h) - 2px);
  height: 2px;
  z-index: 130;
  pointer-events: none;
  background: transparent;
}
.progress__bar {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--acid), var(--cyan));
  transform: scaleX(0);
  transform-origin: left center;
}

/* ---------- 页脚：横向档案柜 ---------- */
.site-footer {
  margin-top: clamp(48px, 8vw, 96px);
  padding: clamp(36px, 6vw, 72px) var(--gut) 26px;
  background: var(--stand);
  border-top: 1px solid var(--line);
  color: var(--grey);
  font-size: 14px;
  line-height: 1.8;
}

.foot-main {
  display: grid;
  gap: clamp(28px, 4vw, 56px);
  grid-template-columns: 1fr;
  max-width: var(--maxw);
  margin: 0 auto;
}

.foot-brand { display: grid; gap: 16px; align-content: start; }
.foot-tagline {
  max-width: 26em;
  color: var(--grey);
  font-size: 13.5px;
  line-height: 1.9;
}

.foot-cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
}

.foot-col { min-width: 0; }
.foot-col__title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .18em;
  color: var(--steel);
  text-transform: none;
}
.foot-col__idx {
  color: var(--turf);
  font-size: 11px;
  letter-spacing: .08em;
}
.foot-col__list { display: grid; gap: 4px; }
.foot-col__list a {
  display: inline-block;
  padding: 4px 0;
  color: var(--grey);
  font-size: 13.5px;
  border-bottom: 1px solid transparent;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.foot-col__list a:hover {
  color: var(--acid);
  border-bottom-color: var(--acid);
}
.foot-col__list a:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 3px;
}

.foot-contact {
  max-width: var(--maxw);
  margin: clamp(28px, 4vw, 48px) auto 0;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
}
.foot-contact__line {
  max-width: none;
  font-family: var(--f-mono);
  font-size: 12.5px;
  line-height: 1.95;
  letter-spacing: .01em;
  color: var(--grey);
}
.foot-contact__note {
  max-width: 62ch;
  font-size: 12px;
  line-height: 1.8;
  color: var(--steel);
}

.foot-legal {
  max-width: var(--maxw);
  margin: 22px auto 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: .05em;
  color: var(--steel);
}
.foot-legal__copy { max-width: none; }
.foot-legal__links { display: flex; flex-wrap: wrap; gap: 16px; }
.foot-legal__links a { color: var(--steel); transition: color var(--t-fast) var(--ease); }
.foot-legal__links a:hover { color: var(--acid); }
.foot-legal__links a:focus-visible { outline: 2px solid var(--acid); outline-offset: 3px; }

/* ---------- 通用容器与栅格 ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gut);
}

.grid { display: grid; gap: clamp(16px, 2.5vw, 28px); }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--auto { grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); }

.stack { display: grid; gap: clamp(14px, 2vw, 22px); }

/* ---------- 面包屑 ---------- */
.breadcrumb {
  padding-block: 16px;
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: .06em;
  color: var(--steel);
}
.breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; }
.breadcrumb li { display: flex; align-items: center; gap: 8px; }
.breadcrumb li + li::before { content: "/"; color: var(--line); }
.breadcrumb a { color: var(--grey); transition: color var(--t-fast) var(--ease); }
.breadcrumb a:hover { color: var(--acid); }
.breadcrumb a:focus-visible { outline: 2px solid var(--acid); outline-offset: 3px; }
.breadcrumb [aria-current="page"] { color: var(--white); }

/* ---------- 正文长文 ---------- */
.prose {
  max-width: 68ch;
  font-size: 16.5px;
  line-height: 1.9;
  color: var(--grey);
}
.prose > * + * { margin-top: 1.1em; }
.prose h2 {
  margin-top: 2.2em;
  padding-left: 14px;
  border-left: 3px solid var(--acid);
  font-size: 1.4rem;
  color: var(--white);
}
.prose h3 { font-size: 1.1rem; color: var(--white); }
.prose strong { color: var(--white); font-weight: 700; }
.prose a {
  color: var(--acid);
  border-bottom: 1px solid var(--turf);
  transition: border-color var(--t-fast) var(--ease);
}
.prose a:hover { border-bottom-color: var(--acid); }
.prose a:focus-visible { outline: 2px solid var(--acid); outline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose ul li { list-style: square; }
.prose ol li { list-style: decimal; }
.prose li + li { margin-top: .4em; }

/* ---------- 章节导视与大编号 ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .2em;
  color: var(--acid);
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--acid);
}

.sec-num {
  display: block;
  font-family: var(--f-mono);
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.04em;
  color: var(--turf);
}

/* ---------- 档案卡 ---------- */
.file-card {
  position: relative;
  display: block;
  padding: clamp(16px, 2.4vw, 26px);
  background: var(--stand);
  border: 1px solid var(--line);
  color: var(--grey);
  transition: transform var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease),
              background var(--t-fast) var(--ease);
}
.file-card:hover {
  transform: translateY(-2px);
  border-color: var(--turf);
}
.file-card:focus-within { border-color: var(--acid); }

.file-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.file-card__title {
  font-family: var(--f-display);
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: .01em;
  color: var(--white);
}
.file-card__meta {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--steel);
}

/* ---------- 标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  background: rgba(20, 92, 58, .26);
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .08em;
  line-height: 1.6;
  color: var(--grey);
}
.tag--acid { color: var(--acid); border-color: rgba(200, 255, 61, .45); background: rgba(200, 255, 61, .08); }
.tag--cyan { color: var(--cyan); border-color: rgba(111, 231, 200, .42); background: rgba(111, 231, 200, .07); }

/* ---------- 图片容器基础 ---------- */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  background: linear-gradient(140deg, var(--stand) 0%, var(--turf) 100%);
}
.media--wide { aspect-ratio: 21 / 9; }
.media--tall { aspect-ratio: 3 / 4; }
.media--square { aspect-ratio: 1 / 1; }

.media img,
.media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.9) contrast(1.04);
}

.media__ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  text-align: center;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .22em;
  color: rgba(244, 247, 242, .42);
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 28px 28px;
}

.media__cap {
  display: block;
  margin-top: 10px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--steel);
}

/* ---------- 工具类 ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* =========================================================
   响应式
   ========================================================= */

/* 平板起：页脚分栏 */
@media (min-width: 640px) {
  .foot-cols { grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
}

/* 隐藏规则 */
@media (max-width: 900px) {
  .util__item--hide-md { display: none; }
}
@media (max-width: 620px) {
  .util { display: none; }
  .brand__line { display: none; }
}

/* 桌面：左侧固定台阶导航 */
@media (min-width: 1080px) {
  body { padding-left: var(--rail-w); }

  .masthead { height: var(--topbar-h); }

  .nav-toggle { display: none; }

  .rail {
    top: var(--topbar-h);
    bottom: 0;
    right: auto;
    left: 0;
    width: var(--rail-w);
    max-height: none;
    overflow-y: auto;
    padding: 18px 0 24px;
    border-bottom: 0;
    border-right: 1px solid var(--line);
    transform: none;
    opacity: 1;
    visibility: visible;
    transition: none;
    display: flex;
    flex-direction: column;
  }

  .rail__title {
    padding: 0 14px 10px;
    margin: 0 8px 8px;
    font-size: 9.5px;
    letter-spacing: .22em;
  }

  .rail__list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 8px;
  }

  .rail__link {
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    padding: 11px 8px;
    border-bottom: 0;
    border-left: 2px solid transparent;
    font-size: 13px;
    line-height: 1.35;
    letter-spacing: .04em;
  }
  .rail__num { font-size: 10px; }
  .rail__link:hover {
    border-left-color: var(--acid-soft);
    background: rgba(200, 255, 61, .06);
  }
  .rail__link[aria-current="page"] {
    border-left-color: var(--acid);
    background: rgba(200, 255, 61, .1);
  }

  .grid--3 { grid-template-columns: repeat(3, 1fr); }

  .foot-main { grid-template-columns: minmax(240px, 1fr) 2.1fr; }
}

@media (min-width: 1280px) {
  .foot-cols { gap: 32px; }
}

/* ---------- 降低动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

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

  .rail { transform: none; }
  .rail[data-open] { transform: none; }
  .file-card:hover { transform: none; }
  .btn:active { transform: none; }
  .skip-link { transition: none; }
}
