/* ============================================================
   九1官网中心 · /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, figcaption, blockquote,
ul, ol, li, dl, dd, table, th, td {
  margin: 0;
  padding: 0;
}

ul, ol { list-style: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
table { border-collapse: collapse; }

/* ---------- 2. 变量 ---------- */
:root {
  --blue-900: #0B2545;
  --blue-700: #14427A;
  --blue-500: #1E6FD9;
  --blue-200: #BBD4F2;
  --orange-600: #B8430F;
  --orange-500: #F07A2B;
  --orange-100: #FDE6D6;
  --ink-900: #1C1F24;
  --ink-600: #4A5158;
  --ink-300: #A7AEB6;
  --paper: #F6F8FA;
  --white: #FFFFFF;

  --font-display: "Songti SC", "Noto Serif SC", "Source Han Serif SC", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-condensed: "Barlow Condensed", "Arial Narrow", "PingFang SC", var(--font-sans);
  --font-mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", "IBM Plex Mono", Menlo, Consolas, monospace;

  --rail-w: 96px;
  --bar-h: 56px;
  --gutter: clamp(20px, 4vw, 56px);
  --page-max: 1280px;
  --radius: 14px;
  --radius-sm: 8px;
  --line: 1px solid var(--ink-300);
  --shadow-card: 0 1px 0 rgba(28, 31, 36, .05), 0 14px 30px -22px rgba(11, 37, 69, .55);
}

html[data-scrolled="true"] { --bar-h: 48px; }

/* ---------- 3. 基础排版 ---------- */
body {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.85;
  color: var(--ink-900);
  background: var(--paper);
  padding-top: var(--bar-h);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  transition: padding-top .18s ease;
}

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

h1 { font-size: clamp(34px, 4.6vw, 60px); line-height: 1.15; }
h2 { font-size: clamp(26px, 3vw, 40px); line-height: 1.25; }
h3 { font-size: clamp(20px, 2.2vw, 26px); line-height: 1.35; }
h4 { font-family: var(--font-sans); font-size: 18px; font-weight: 600; line-height: 1.5; letter-spacing: 0; }

strong { font-weight: 700; }

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

::selection { background: var(--blue-200); color: var(--blue-900); }

/* ---------- 4. 布局工具 ---------- */
.container {
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(48px, 7vw, 88px); }

.rule {
  height: 1px;
  border: 0;
  background: var(--ink-300);
  margin: 0;
}

.grid {
  display: grid;
  gap: clamp(18px, 2.4vw, 32px);
}
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.split {
  display: grid;
  gap: clamp(24px, 3vw, 48px);
  grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 1.6vw, 20px);
}

.visually-hidden {
  position: absolute;
  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;
}

/* ---------- 5. 头部：跳过链接 ---------- */
.skip-link {
  position: absolute;
  top: -64px;
  left: 16px;
  z-index: 120;
  padding: 10px 20px;
  background: var(--ink-900);
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  transition: top .16s ease;
}
.skip-link:focus { top: 0; }

/* ---------- 6. 头部：外壳与品牌轨道 ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 80;
}

.rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--rail-w);
  z-index: 90;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  padding: 14px 0 18px;
  background: var(--blue-700);
  color: var(--white);
  border-right: 1px solid rgba(255, 255, 255, .14);
}

.rail__brand {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--white);
  color: var(--blue-700);
  font-family: var(--font-condensed);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.02em;
  transition: background .16s ease, color .16s ease;
}
.rail__brand:hover { background: var(--orange-500); color: var(--blue-900); }

.rail__nav { flex: 1 1 auto; }

.rail__steps {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.rail__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 58px;
  padding: 9px 0 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .18);
  color: rgba(255, 255, 255, .74);
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}
.rail__step:hover {
  background: rgba(255, 255, 255, .14);
  border-color: rgba(255, 255, 255, .38);
  color: var(--white);
}
.rail__step[aria-current="page"] {
  background: var(--orange-500);
  border-color: var(--orange-500);
  color: var(--blue-900);
}

.rail__num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .06em;
  line-height: 1.4;
}

.rail__label {
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: .08em;
}

.rail__ticket {
  flex: 0 0 auto;
  writing-mode: vertical-rl;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .2em;
  color: rgba(255, 255, 255, .55);
}

/* ---------- 7. 头部：命令栏 ---------- */
.command-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.6vw, 22px);
  height: var(--bar-h);
  padding: 0 var(--gutter);
  background: var(--paper);
  border-bottom: 1px solid var(--ink-300);
  transition: height .18s ease, background .18s ease, box-shadow .18s ease;
}
html[data-scrolled="true"] .command-bar {
  background: var(--white);
  box-shadow: 0 12px 26px -22px rgba(11, 37, 69, .85);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.brand__mark {
  position: relative;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: var(--blue-700);
  border: 1px solid var(--blue-900);
}
.brand__mark::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 2px solid var(--blue-200);
  border-radius: 2px;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.brand__name {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--ink-900);
}

.brand__sub {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .12em;
  color: var(--ink-600);
}

.status-lamp {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--blue-200);
  background: var(--white);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .04em;
  color: var(--blue-700);
  cursor: default;
}

.status-lamp__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange-500);
  box-shadow: 0 0 0 3px var(--orange-100);
}

.status-lamp__tip {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  z-index: 20;
  transform: translate(-50%, -4px);
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--blue-900);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .04em;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}
.status-lamp:hover .status-lamp__tip,
.status-lamp:focus-within .status-lamp__tip,
.status-lamp:focus .status-lamp__tip {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

/* ---------- 8. 头部：导航 ---------- */
.site-nav { margin-left: auto; }

.site-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(6px, 1vw, 18px);
}

.site-nav__item { display: block; }

.site-nav__link {
  display: inline-block;
  padding: 6px 2px;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: .01em;
  color: var(--ink-600);
  border-bottom: 2px solid transparent;
  transition: color .16s ease, border-color .16s ease;
}
.site-nav__link:hover {
  color: var(--blue-700);
  border-bottom-color: var(--orange-500);
}
.site-nav__link[aria-current="page"] {
  color: var(--ink-900);
  font-weight: 600;
  border-bottom-color: var(--blue-500);
}

.nav-toggle {
  position: relative;
  display: none;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border: 1px solid var(--ink-300);
  border-radius: var(--radius-sm);
  background: var(--white);
  cursor: pointer;
}

.nav-toggle__bar {
  position: absolute;
  left: 11px;
  right: 11px;
  height: 2px;
  background: var(--ink-900);
  border-radius: 1px;
  transition: transform .18s ease, opacity .18s ease;
}
.nav-toggle__bar:nth-child(1) { top: 14px; }
.nav-toggle__bar:nth-child(2) { top: 19px; }
.nav-toggle__bar:nth-child(3) { top: 24px; }

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* ---------- 9. 头部：滚动进度 ---------- */
.scroll-meter {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: transparent;
  pointer-events: none;
}
.scroll-meter__fill {
  display: block;
  height: 100%;
  width: 0;
  background: var(--orange-500);
  transition: width .08s linear;
}

/* ---------- 10. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background .16s ease, color .16s ease, border-color .16s ease, transform .16s ease;
}
.btn:hover { transform: translateY(-1px); }

.btn--primary {
  background: var(--blue-500);
  border-color: var(--blue-500);
  color: var(--white);
}
.btn--primary:hover {
  background: var(--blue-700);
  border-color: var(--blue-700);
}

.btn--ghost {
  background: transparent;
  border-color: var(--blue-500);
  color: var(--blue-700);
}
.btn--ghost:hover {
  background: var(--blue-500);
  color: var(--white);
}

.btn--on-dark {
  background: var(--orange-500);
  border-color: var(--orange-500);
  color: var(--blue-900);
}
.btn--on-dark:hover {
  background: var(--orange-100);
  border-color: var(--orange-100);
  color: var(--blue-900);
}

.command-bar__cta { flex: 0 0 auto; }

/* ---------- 11. 页脚 ---------- */
.site-footer {
  margin-top: clamp(56px, 8vw, 104px);
  padding: clamp(44px, 6vw, 76px) var(--gutter) 24px;
  background: var(--blue-900);
  color: #E8EEF6;
  border-top: 1px solid var(--ink-300);
  font-size: 15px;
  line-height: 1.75;
}

.footer__inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1.2fr;
  gap: clamp(28px, 4vw, 56px);
  max-width: var(--page-max);
  margin-inline: auto;
}

.footer__brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.footer__mark {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--white);
  line-height: 1.25;
}

.footer__sub {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--blue-200);
}

.footer__note {
  max-width: 28em;
  font-size: 14px;
  line-height: 1.8;
  color: #C9D8EA;
  margin-bottom: 6px;
}

.footer__col {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer__title {
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(187, 212, 242, .3);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .18em;
  color: var(--blue-200);
  line-height: 1.5;
}

.footer__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.footer__list a {
  display: inline-block;
  padding: 4px 0;
  font-size: 14.5px;
  color: #DCE6F2;
  border-bottom: 1px solid transparent;
  transition: color .16s ease, border-color .16s ease;
}
.footer__list a:hover {
  color: var(--white);
  border-bottom-color: var(--orange-500);
}

.footer__col--contact { gap: 8px; }

.footer__line {
  display: flex;
  flex-wrap: wrap;
  gap: 0 8px;
  font-size: 14px;
  line-height: 1.7;
  color: #C9D8EA;
  word-break: break-word;
}

.footer__label {
  display: inline-block;
  min-width: 4.6em;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--blue-200);
  line-height: 2.1;
}

.footer__base {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  max-width: var(--page-max);
  margin: 40px auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, .16);
}

.footer__meta {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .04em;
  color: rgba(230, 238, 246, .68);
  line-height: 1.8;
}

/* ---------- 12. 通用内容组件 ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .16em;
  color: var(--blue-700);
  line-height: 1.6;
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--orange-500);
}

.mono {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .04em;
}

.hand-note {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 15px;
  letter-spacing: .02em;
  color: var(--orange-600);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(20, 66, 122, .2);
  background: var(--blue-200);
  color: var(--blue-900);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .06em;
  line-height: 1.7;
}
.tag--warn {
  background: var(--orange-100);
  border-color: rgba(184, 67, 15, .24);
  color: var(--orange-600);
}
.tag--solid {
  background: var(--blue-700);
  border-color: var(--blue-700);
  color: var(--white);
}

.panel {
  padding: clamp(18px, 2.4vw, 30px);
  background: var(--white);
  border: 1px solid var(--ink-300);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: clamp(16px, 2.2vw, 26px);
  background: var(--white);
  border: 1px solid var(--ink-300);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.card:hover {
  transform: translateY(-2px);
  border-color: var(--orange-500);
  box-shadow: 0 2px 0 rgba(28, 31, 36, .05), 0 20px 34px -24px rgba(11, 37, 69, .7);
}

.ledger-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--ink-300);
  border-radius: var(--radius);
  background: var(--white);
}

.ledger {
  width: 100%;
  min-width: 560px;
  font-size: 15px;
  line-height: 1.7;
}
.ledger th,
.ledger td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--blue-200);
}
.ledger thead th {
  background: var(--paper);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .08em;
  color: var(--ink-600);
}
.ledger tbody tr:nth-child(even) { background: #FBFCFD; }
.ledger tbody tr:last-child td { border-bottom: 0; }

.figure {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--ink-300);
  border-radius: var(--radius);
  background: var(--white);
}

.figure__media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--blue-200);
  overflow: hidden;
}
.figure__media img,
.figure__media svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.figure--wide .figure__media { aspect-ratio: 16 / 9; }
.figure--tall .figure__media { aspect-ratio: 3 / 4; }

.figure__caption {
  padding: 10px 14px;
  border-top: 1px solid var(--blue-200);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .02em;
  line-height: 1.7;
  color: var(--ink-600);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-block: 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  line-height: 1.7;
  color: var(--ink-600);
}
.breadcrumb__link {
  color: var(--blue-700);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.breadcrumb__link:hover { color: var(--orange-600); }
.breadcrumb__sep { color: var(--ink-300); }
.breadcrumb__current { color: var(--ink-900); }

.prose { max-width: 38em; }
.prose p + p { margin-top: 1.05em; }
.prose h2 { margin-top: 1.5em; margin-bottom: .55em; }
.prose h3 { margin-top: 1.3em; margin-bottom: .45em; }
.prose ul {
  margin-block: 1em;
  padding-left: 1.2em;
  list-style: none;
}
.prose ul li {
  position: relative;
  padding-left: 1.1em;
  margin-block: .35em;
}
.prose ul li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--orange-500);
}
.prose a {
  color: var(--blue-700);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.prose a:hover { color: var(--orange-600); }

/* ---------- 13. 进场层次变化 ---------- */
html[data-js="true"] [data-reveal] {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .32s ease, transform .32s ease;
}
html[data-js="true"] [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- 14. 响应式 ---------- */
@media (min-width: 1080px) {
  .rail { display: flex; }
  body { padding-left: var(--rail-w); }
  .site-header { left: var(--rail-w); }
}

@media (max-width: 1100px) {
  .site-nav__list { gap: 8px; }
  .site-nav__link { font-size: 13px; }
}

@media (max-width: 900px) {
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-left: 0;
    display: none;
    padding: 10px var(--gutter) 18px;
    background: var(--white);
    border-bottom: 1px solid var(--ink-300);
    box-shadow: 0 22px 34px -28px rgba(11, 37, 69, .9);
  }
  .site-nav[data-open="true"] { display: block; }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .site-nav__link {
    display: block;
    padding: 12px 10px;
    font-size: 16px;
    border-bottom: 1px solid var(--blue-200);
    border-left: 3px solid transparent;
  }
  .site-nav__link:hover {
    background: var(--paper);
    border-bottom-color: var(--blue-200);
    border-left-color: var(--orange-500);
  }
  .site-nav__link[aria-current="page"] {
    background: var(--paper);
    border-bottom-color: var(--blue-200);
    border-left-color: var(--blue-500);
    color: var(--blue-700);
  }

  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .command-bar__cta { margin-left: auto; padding: 8px 15px; font-size: 13px; }

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

@media (max-width: 720px) {
  .status-lamp { display: none; }
  body { font-size: 16px; }
  .footer__inner { gap: 28px; }
}

@media (max-width: 620px) {
  .grid--2,
  .grid--3 { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; }
  .footer__base { margin-top: 28px; }
  .brand__sub { display: none; }
  .command-bar { gap: 10px; }
}

@media (max-width: 420px) {
  .command-bar__cta { padding: 8px 12px; font-size: 12.5px; }
  .brand__name { font-size: 13px; }
}

/* ---------- 15. 动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  body { transition: none; }
  html[data-js="true"] [data-reveal] {
    opacity: 1;
    transform: none;
  }
  .btn:hover,
  .card:hover { transform: none; }
}
