:root {
  --c-night: #0B1D3A;
  --c-green: #2D9C4E;
  --c-track: #0F4C81;
  --c-yellow: #FFC966;
  --c-orange: #FF5E3A;
  --c-ivory: #F9F6F0;
  --c-ink: #1A1A2E;
  --c-slate: #4A5568;
  --c-sand: #D9CBB8;
  --c-glass: rgba(255, 255, 255, 0.08);
  --c-sand-soft: rgba(217, 203, 184, 0.16);
  --font-d: "Rajdhani", "Oswald", "Microsoft YaHei", sans-serif;
  --font-b: "Noto Sans SC", "Source Han Sans SC", "Helvetica Neue", Arial, sans-serif;
  --font-m: "JetBrains Mono", "Fira Code", Consolas, monospace;
  --rail-w: 300px;
  --cmd-h: 64px;
  --radius: 18px;
  --page-max: 1240px;
  --skew: -5deg;
}

@media (min-width: 992px) {
  :root { --cmd-h: 72px; }
}

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

html { scroll-behavior: smooth; }

body, h1, h2, h3, h4, p, ul, ol, figure, blockquote, dl, dd, address { margin: 0; }
ul, ol { list-style: none; padding: 0; margin: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; border: 0; background: none; color: inherit; cursor: pointer; }
address { font-style: normal; }

body {
  font-family: var(--font-b);
  font-size: 16px;
  line-height: 1.7;
  color: var(--c-ink);
  background: var(--c-ivory);
  -webkit-font-smoothing: antialiased;
  padding-top: var(--cmd-h);
}

@media (min-width: 992px) {
  body { padding-left: var(--rail-w); }
}

::selection { background: var(--c-green); color: #fff; }

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

#main-content {
  display: block;
  scroll-margin-top: var(--cmd-h);
  min-height: 55vh;
}

/* ========== 头部 ========== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--rail-w);
  background: var(--c-night);
  color: var(--c-ivory);
  z-index: 100;
  overflow-x: hidden;
}

.skip-link {
  position: fixed;
  top: -120px;
  left: 12px;
  z-index: 200;
  background: var(--c-yellow);
  color: var(--c-ink);
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  transition: top 0.2s ease;
}

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

.header-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--c-glass);
  z-index: 150;
  pointer-events: none;
}

.header-progress [data-progress-fill] {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--c-green), var(--c-yellow) 60%, var(--c-orange));
  transition: width 80ms linear;
}

.brand-rail {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 32px 24px 28px;
  overflow: hidden;
}

.brand-rail > * { position: relative; z-index: 1; }

.brand-rail::before {
  content: "";
  position: absolute;
  left: -70px;
  bottom: 88px;
  width: 220px;
  height: 220px;
  border-radius: 62% 38% 55% 45% / 50% 60% 40% 50%;
  background: radial-gradient(circle at 32% 28%, rgba(255, 201, 102, 0.13), rgba(255, 94, 58, 0.05) 55%, transparent 72%);
  pointer-events: none;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--c-ivory);
}

.brand-logo:hover .brand-mark { box-shadow: 0 0 0 4px rgba(45, 156, 78, 0.18); }

.brand-mark {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--c-green), #19753A);
  color: var(--c-night);
  display: grid;
  place-items: center;
  font-family: var(--font-d);
  font-style: italic;
  font-weight: 800;
  font-size: 21px;
  line-height: 1;
  border-radius: 8px 14px 8px 14px;
  transform: skewX(var(--skew));
  transition: box-shadow 0.2s ease;
}

.brand-mark small {
  font-size: 10px;
  color: var(--c-yellow);
  margin-left: 1px;
}

.brand-text { line-height: 1.2; }

.brand-name {
  display: block;
  font-family: var(--font-d);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.brand-sub {
  display: block;
  font-family: var(--font-m);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--c-yellow);
  margin-top: 3px;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--c-glass);
  border-radius: 8px;
  color: var(--c-ivory);
  transition: background 0.2s ease;
}

.nav-toggle:hover { background: var(--c-glass); }

.nav-toggle-box {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 16px;
}

.nav-toggle-box i {
  display: block;
  height: 2px;
  background: var(--c-yellow);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

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

.nav-toggle-text {
  font-family: var(--font-m);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(249, 246, 240, 0.7);
}

.header-index { margin-top: auto; padding-top: 56px; }

.header-index-caption {
  font-family: var(--font-m);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(249, 246, 240, 0.55);
  border-bottom: 1px solid var(--c-glass);
  padding-bottom: 10px;
  margin-bottom: 10px;
}

.header-index-list { display: flex; flex-direction: column; }

.header-index-link {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 9px 8px;
  border-left: 2px solid transparent;
  border-radius: 6px;
  color: rgba(249, 246, 240, 0.72);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.header-index-link:hover {
  background: var(--c-glass);
  color: var(--c-ivory);
  border-left-color: var(--c-green);
}

.header-index-link[aria-current="page"] {
  background: var(--c-glass);
  color: var(--c-ivory);
  border-left-color: var(--c-yellow);
}

.index-num {
  font-family: var(--font-m);
  font-size: 13px;
  color: var(--c-green);
}

.index-name { font-size: 15px; font-weight: 600; }

.index-en {
  font-family: var(--font-m);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(249, 246, 240, 0.4);
}

.brand-note {
  margin-top: 28px;
  font-size: 12px;
  line-height: 1.6;
  color: rgba(249, 246, 240, 0.5);
  border-left: 2px solid var(--c-green);
  padding-left: 12px;
}

.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--c-green);
  vertical-align: 0;
  animation: pulse-green 1.8s ease-in-out infinite;
}

@keyframes pulse-green {
  0%, 100% { box-shadow: 0 0 0 0 rgba(45, 156, 78, 0.5); }
  50% { box-shadow: 0 0 0 5px rgba(45, 156, 78, 0); }
}

/* ========== 命令栏 ========== */

.command-bar {
  position: fixed;
  top: 0;
  left: var(--rail-w);
  right: 0;
  height: var(--cmd-h);
  background: rgba(11, 29, 58, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--c-glass);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 32px;
  z-index: 90;
}

.command-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

.command-bar > * { position: relative; z-index: 1; }

.command-nav-list { display: flex; align-items: center; gap: 4px; }

.command-nav-list a {
  display: inline-block;
  padding: 8px 14px;
  font-family: var(--font-d);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(249, 246, 240, 0.72);
  border-radius: 6px;
  position: relative;
  transition: color 0.2s ease, background 0.2s ease;
}

.command-nav-list a:hover { color: var(--c-yellow); background: var(--c-glass); }

.command-nav-list a[aria-current="page"] {
  color: var(--c-ivory);
  background: var(--c-glass);
}

.command-nav-list a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 2px;
  background: var(--c-green);
}

.command-actions { display: flex; align-items: center; gap: 10px; }

.score-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-m);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-yellow);
  border: 1px solid rgba(255, 201, 102, 0.28);
  background: rgba(255, 201, 102, 0.08);
  border-radius: 999px;
  padding: 6px 12px;
  white-space: nowrap;
}

.score-live {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-orange);
  animation: pulse-orange 1.6s ease-in-out infinite;
}

@keyframes pulse-orange {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 94, 58, 0.6); }
  50% { box-shadow: 0 0 0 5px rgba(255, 94, 58, 0); }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 10px;
  font-family: var(--font-d);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-transform: uppercase;
  border: 1px solid var(--c-sand);
  background: transparent;
  color: var(--c-ink);
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary { background: var(--c-green); border-color: var(--c-green); color: #fff; }

.btn-primary:hover { background: #258A40; border-color: #258A40; box-shadow: 0 10px 24px rgba(45, 156, 78, 0.26); }

.btn-ghost { border-color: rgba(11, 29, 58, 0.2); color: var(--c-ink); }

.btn-ghost:hover { border-color: var(--c-green); color: var(--c-green); background: rgba(45, 156, 78, 0.06); }

.btn-quick {
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--c-ivory);
  gap: 6px;
  text-align: left;
}

.btn-quick .btn-kicker {
  font-family: var(--font-m);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-yellow);
  display: block;
  line-height: 1.2;
}

.btn-quick .btn-label { display: block; line-height: 1.3; }

.btn-quick.btn-mobile { border-color: var(--c-green); background: rgba(45, 156, 78, 0.16); }

.btn-quick.btn-mobile:hover { background: var(--c-green); color: #fff; }

.btn-quick.btn-desktop { border-color: var(--c-yellow); background: rgba(255, 201, 102, 0.1); }

.btn-quick.btn-desktop:hover { background: var(--c-yellow); color: var(--c-ink); }

/* ========== 页脚 ========== */

.site-footer {
  position: relative;
  background: var(--c-night);
  color: var(--c-ivory);
  border-top: 1px solid var(--c-sand-soft);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -3px;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--c-green) 0 30%, var(--c-yellow) 55%, var(--c-orange));
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 64px 24px 48px;
}

.footer-brand { grid-column: 1 / -1; }

.footer-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.footer-mark {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--c-green), #19753A);
  color: var(--c-night);
  font-family: var(--font-d);
  font-style: italic;
  font-weight: 800;
  font-size: 21px;
  line-height: 1;
  display: grid;
  place-items: center;
  border-radius: 8px 14px 8px 14px;
  transform: skewX(var(--skew));
}

.footer-mark small { font-size: 10px; color: var(--c-yellow); }

.footer-brand-name {
  font-family: var(--font-d);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.footer-trust {
  margin-top: 18px;
  font-size: 14px;
  line-height: 1.9;
  color: rgba(249, 246, 240, 0.62);
  max-width: 46ch;
}

.footer-domain {
  margin-top: 14px;
  font-family: var(--font-m);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--c-green);
}

.footer-caption {
  font-family: var(--font-m);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--c-yellow);
  margin-bottom: 18px;
}

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

.footer-list a {
  color: rgba(249, 246, 240, 0.72);
  transition: color 0.15s ease;
}

.footer-list a:hover { color: var(--c-ivory); }

.footer-contact-list li { line-height: 1.7; color: rgba(249, 246, 240, 0.78); }

.footer-contact-note {
  margin-top: 18px;
  font-size: 13px;
  line-height: 1.7;
  color: rgba(249, 246, 240, 0.5);
}

.footer-bottom {
  border-top: 1px solid var(--c-sand-soft);
  background: rgba(8, 15, 39, 0.55);
  padding: 20px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  font-family: var(--font-m);
  font-size: 13px;
  color: rgba(249, 246, 240, 0.6);
}

.footer-bottom a { color: rgba(249, 246, 240, 0.75); transition: color 0.15s ease; }

.footer-bottom a:hover { color: var(--c-yellow); }

.footer-legal { display: flex; flex-wrap: wrap; gap: 6px 16px; }

.footer-icp { letter-spacing: 0.04em; }

/* ========== 布局与排版通用 ========== */

.container {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: clamp(56px, 8vw, 96px) 0; }

.section-dark { background: var(--c-night); color: var(--c-ivory); }

.eyebrow {
  font-family: var(--font-m);
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--c-green);
  display: flex;
  align-items: center;
  gap: 10px;
}

.display-title {
  font-family: var(--font-d);
  font-size: clamp(48px, 8vw, 104px);
  font-weight: 800;
  font-style: italic;
  text-transform: uppercase;
  line-height: 0.95;
  letter-spacing: 0.01em;
  transform: skewX(var(--skew));
  transform-origin: left center;
  margin: 16px 0 20px;
}

.lead {
  font-size: 17px;
  line-height: 1.8;
  color: var(--c-slate);
  max-width: 66ch;
}

.page-hero {
  position: relative;
  overflow: hidden;
  background: var(--c-night);
  color: var(--c-ivory);
  padding: clamp(48px, 8vw, 88px) 0;
}

.page-hero::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -10%;
  width: 60%;
  height: 130%;
  border-radius: 44% 56% 60% 40% / 55% 45% 60% 40%;
  background: linear-gradient(135deg, rgba(15, 76, 129, 0.85), rgba(45, 156, 78, 0.25));
  transform: rotate(-12deg);
  pointer-events: none;
}

.page-hero .container { position: relative; z-index: 1; }

.page-kicker {
  font-family: var(--font-m);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-yellow);
}

.page-title {
  font-family: var(--font-d);
  font-size: clamp(40px, 7vw, 78px);
  font-weight: 800;
  font-style: italic;
  text-transform: uppercase;
  line-height: 1;
  letter-spacing: 0.01em;
  transform: skewX(var(--skew));
  transform-origin: left center;
  margin: 14px 0 18px;
}

.page-desc {
  font-size: 16px;
  line-height: 1.8;
  color: rgba(249, 246, 240, 0.75);
  max-width: 56ch;
}

.chapter { padding: clamp(56px, 8vw, 104px) 0; transition: background-color 0.5s ease; }

.chapter[data-active] { background: rgba(255, 201, 102, 0.05); }

.chapter-head { margin-bottom: 40px; }

.chapter-index {
  font-family: var(--font-m);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-green);
  display: flex;
  align-items: center;
  gap: 12px;
}

.chapter-index::after {
  content: "";
  height: 1px;
  width: 60px;
  background: var(--c-sand);
}

.chapter-title {
  font-family: var(--font-d);
  font-size: clamp(30px, 4.5vw, 52px);
  font-weight: 800;
  font-style: italic;
  text-transform: uppercase;
  line-height: 1;
  letter-spacing: 0.01em;
  transform: skewX(var(--skew));
  transform-origin: left center;
  margin-top: 12px;
}

.breadcrumbs {
  font-family: var(--font-m);
  font-size: 13px;
  color: var(--c-slate);
  padding: 18px 0;
}

.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 4px 8px; }

.breadcrumbs li + li::before { content: "/"; margin-right: 8px; color: var(--c-sand); }

.breadcrumbs a:hover { color: var(--c-green); }

.card {
  background: var(--c-ivory);
  border: 1px solid var(--c-sand);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 1px 2px rgba(11, 29, 58, 0.05);
}

.card-dark {
  background: var(--c-night);
  color: var(--c-ivory);
  border: 1px solid var(--c-glass);
}

.grid-2, .grid-3, .grid-4 { display: grid; gap: 24px; }

.data-num {
  font-family: var(--font-m);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--c-orange);
  letter-spacing: -0.02em;
}

.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  background: linear-gradient(145deg, var(--c-track), var(--c-night));
  aspect-ratio: 4 / 3;
}

.media-frame.wide { aspect-ratio: 16 / 9; }

.media-frame.square { aspect-ratio: 1 / 1; }

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(11, 29, 58, 0.12), rgba(11, 29, 58, 0.2));
  pointer-events: none;
}

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

@media (min-width: 600px) {
  .footer-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 768px) {
  .container { padding: 0 32px; }
  .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)); }
}

@media (min-width: 1100px) {
  .footer-top { grid-template-columns: 1.4fr 1fr 1fr 1.3fr; }
  .footer-brand { grid-column: auto; }
}

@media (max-width: 991.98px) {
  body { padding-left: 0; }

  .site-header {
    bottom: auto;
    width: auto;
    height: var(--cmd-h);
    flex-direction: row;
    align-items: center;
    border-bottom: 1px solid var(--c-glass);
  }

  .brand-rail {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    height: 100%;
    overflow: visible;
  }

  .brand-rail::before { display: none; }
  .brand-mark { width: 36px; height: 36px; font-size: 17px; }
  .brand-name { font-size: 18px; }
  .brand-sub { display: none; }
  .header-index { display: none; }
  .brand-note { display: none; }

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

  .command-bar {
    top: var(--cmd-h);
    left: 0;
    right: 0;
    height: auto;
    max-height: calc(100vh - var(--cmd-h));
    overflow-y: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
    background: var(--c-night);
    border-bottom: 1px solid var(--c-glass);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.28s ease, opacity 0.28s ease, visibility 0.28s;
  }

  .site-header[data-open] .command-bar {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .command-nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 16px;
  }

  .command-nav-list a {
    display: block;
    padding: 13px 8px;
    font-size: 16px;
    border-bottom: 1px solid var(--c-glass);
    border-radius: 0;
  }

  .command-nav-list a[aria-current="page"]::after { display: none; }

  .command-actions {
    padding: 12px 16px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .score-tag { display: none; }

  .btn-quick {
    flex-direction: column;
    gap: 4px;
    text-align: center;
    font-size: 13px;
    padding: 10px 8px;
  }

  .footer-top { padding: 56px 24px 40px; }
  .footer-bottom { justify-content: center; text-align: center; }
  .footer-legal { justify-content: center; }
}

@media (max-height: 720px) and (min-width: 992px) {
  .brand-rail { padding-top: 20px; padding-bottom: 20px; }
  .header-index { padding-top: 20px; }
  .header-index-link { padding: 5px 8px; }
  .brand-note { margin-top: 14px; }
}

/* ========== 动态偏好 ========== */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
