:root {
  color-scheme: dark;
  --bg: #080b10;
  --surface: #10151d;
  --surface-2: #151c26;
  --surface-3: #1a2330;
  --text: #edf2f7;
  --muted: #aeb8c4;
  --subtle: #7f8b9a;
  --primary: #4d9cff;
  --primary-strong: #78b5ff;
  --primary-deep: #123d73;
  --border: #2a3543;
  --warning: #f2c66d;
  --max-width: 1200px;
  --article-width: 780px;
  --radius: 6px;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
  --transition: 180ms ease;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.78;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: var(--primary-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition: color var(--transition), background-color var(--transition), border-color var(--transition);
}

a:hover {
  color: #b5d7ff;
}

button,
a {
  touch-action: manipulation;
}

button {
  font: inherit;
}

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

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  transform: translateY(-180%);
  padding: 10px 14px;
  border-radius: 4px;
  background: #fff;
  color: #05070a;
  font-weight: 700;
}

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

.container {
  width: min(calc(100% - 30px), var(--max-width));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  border-bottom: 1px solid rgba(174, 184, 196, 0.18);
  background: rgba(8, 11, 16, 0.96);
  backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  min-height: 80px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 44px;
  color: var(--text);
  text-decoration: none;
}

.brand picture,
.brand img {
  width: 200px;
  height: 80px;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 8px 13px;
  border-radius: 4px;
  color: #c8d1dc;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: var(--surface-3);
  color: #fff;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  color: #fff;
  cursor: pointer;
}

.menu-toggle svg {
  width: 23px;
  height: 23px;
  stroke: currentColor;
}

main {
  min-height: 65vh;
}

.hero {
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #0c1118 0%, var(--bg) 100%);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: 64px;
  align-items: end;
  min-height: 520px;
  padding-block: 82px 70px;
}

.eyebrow,
.section-label {
  margin: 0 0 14px;
  color: var(--primary-strong);
  font-size: 14px;
  font-weight: 700;
}

.hero h1,
.article-header h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 56px);
  line-height: 1.18;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 760px;
  margin: 24px 0 0;
  color: #bdc7d3;
  font-size: 19px;
}

.hero-index {
  border-top: 2px solid var(--primary);
  padding-top: 22px;
}

.hero-index strong {
  display: block;
  margin-bottom: 10px;
  font-size: 15px;
}

.hero-index p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.section {
  padding-block: 72px;
  border-bottom: 1px solid var(--border);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(220px, 0.45fr) minmax(0, 1fr);
  gap: 48px;
  margin-bottom: 36px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(25px, 3vw, 36px);
  line-height: 1.28;
}

.section-heading p {
  max-width: 700px;
  margin: 0;
  color: var(--muted);
}

.intro-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border: 1px solid var(--border);
  background: var(--border);
}

.intro-item {
  min-height: 220px;
  padding: 28px;
  background: var(--surface);
}

.intro-item .number {
  display: block;
  color: var(--primary);
  font-size: 14px;
  font-weight: 700;
}

.intro-item h3 {
  margin: 38px 0 10px;
  font-size: 20px;
}

.intro-item p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.topic-list {
  border-top: 1px solid var(--border);
}

.topic-link {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 32px;
  gap: 20px;
  align-items: center;
  min-height: 108px;
  padding: 20px 8px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
}

.topic-link:hover {
  background: var(--surface);
  color: #fff;
}

.topic-link .topic-number {
  color: var(--subtle);
  font-size: 14px;
}

.topic-link h3 {
  margin: 0 0 5px;
  font-size: 21px;
}

.topic-link p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.topic-link .arrow {
  color: var(--primary);
  font-size: 25px;
  text-align: center;
}

.faq-list {
  max-width: 900px;
  border-top: 1px solid var(--border);
}

.faq-list details {
  border-bottom: 1px solid var(--border);
}

.faq-list summary {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 2px;
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: "+";
  flex: 0 0 auto;
  color: var(--primary);
  font-size: 24px;
  font-weight: 400;
}

.faq-list details[open] summary::after {
  content: "−";
}

.faq-list details p {
  max-width: 760px;
  margin: 0;
  padding: 0 0 24px;
  color: var(--muted);
}

.breadcrumb {
  padding-block: 24px;
  color: var(--subtle);
  font-size: 14px;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: 8px;
  color: #576270;
}

.breadcrumb a {
  color: var(--muted);
}

.article-shell {
  display: grid;
  grid-template-columns: minmax(0, var(--article-width)) minmax(220px, 300px);
  gap: 72px;
  align-items: start;
  padding-bottom: 80px;
}

.article-header {
  margin-bottom: 42px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--border);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 20px 0 0;
  color: var(--subtle);
  font-size: 14px;
}

.article-summary {
  margin: 28px 0 0;
  padding: 20px 22px;
  border-left: 3px solid var(--primary);
  background: var(--surface);
  color: #c5cfda;
}

.article-body h2 {
  margin: 52px 0 18px;
  color: #fff;
  font-size: 28px;
  line-height: 1.35;
}

.article-body h3 {
  margin: 32px 0 12px;
  font-size: 21px;
  line-height: 1.45;
}

.article-body p,
.article-body li {
  color: #c6d0dc;
}

.article-body p {
  margin: 0 0 20px;
}

.article-body ul,
.article-body ol {
  padding-left: 1.35em;
}

.article-body li {
  margin-bottom: 10px;
}

.notice {
  margin: 32px 0;
  padding: 20px 22px;
  border: 1px solid #685b36;
  border-radius: var(--radius);
  background: #1b1811;
  color: #dfd2aa;
}

.notice strong {
  color: var(--warning);
}

.simulator {
  margin: 34px 0 44px;
  padding: 28px;
  border: 1px solid #38597c;
  border-radius: var(--radius);
  background: #0d141e;
  box-shadow: var(--shadow);
}

.simulator-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.simulator-header h2 {
  margin: 0 0 8px;
  font-size: 25px;
}

.simulator-header p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.demo-badge {
  flex: 0 0 auto;
  padding: 5px 9px;
  border: 1px solid #52677e;
  border-radius: 3px;
  color: #c9d5e2;
  font-size: 12px;
  font-weight: 700;
}

.prediction-fieldset {
  margin: 0 0 24px;
  padding: 0;
  border: 0;
}

.prediction-fieldset legend {
  margin-bottom: 12px;
  font-size: 15px;
  font-weight: 700;
}

.prediction-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.prediction-option {
  position: relative;
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  color: #dce5ef;
  cursor: pointer;
  font-weight: 700;
}

.prediction-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.prediction-option:has(input:checked) {
  border-color: var(--primary);
  background: #132b48;
  color: #fff;
}

.prediction-option:has(input:focus-visible) {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}

.ladder-stage {
  position: relative;
  height: 300px;
  margin-bottom: 22px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #090d13;
  overflow: hidden;
}

.ladder-line,
.ladder-rung {
  position: absolute;
  display: block;
  background: #566577;
}

.ladder-line {
  top: 44px;
  bottom: 44px;
  width: 3px;
  transform: translateX(-50%);
}

.ladder-rung {
  height: 3px;
  transform: translateY(-50%);
  background: var(--primary);
}

.ladder-start,
.ladder-end {
  position: absolute;
  transform: translateX(-50%);
  font-size: 13px;
  font-weight: 700;
}

.ladder-start {
  top: 12px;
  color: var(--warning);
}

.ladder-end {
  bottom: 10px;
  display: grid;
  width: 34px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--surface);
  color: var(--muted);
}

.ladder-end.is-result {
  border-color: var(--primary);
  background: var(--primary-deep);
  color: #fff;
}

.simulator-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.simulate-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 18px;
  border: 1px solid #6db0ff;
  border-radius: 4px;
  background: var(--primary);
  color: #07101c;
  cursor: pointer;
  font-weight: 800;
}

.simulate-button:hover {
  background: #78b5ff;
}

.simulate-button svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.simulation-result {
  min-height: 48px;
  margin: 0;
  color: #d5dfeb;
  font-size: 15px;
}

.simulation-result strong {
  color: #fff;
}

.article-toc,
.article-side-note {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.article-toc {
  position: sticky;
  top: 104px;
}

.article-toc h2,
.article-side-note h2 {
  margin: 0 0 14px;
  font-size: 16px;
}

.article-toc ol {
  margin: 0;
  padding-left: 20px;
}

.article-toc li {
  margin-bottom: 8px;
  color: var(--subtle);
  font-size: 14px;
}

.article-toc a {
  color: var(--muted);
  text-decoration: none;
}

.article-side-note {
  margin-top: 18px;
}

.article-side-note p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.related-card {
  min-height: 180px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}

.related-card:hover {
  border-color: #41668f;
  background: var(--surface-2);
  color: #fff;
}

.related-card span {
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
}

.related-card h3 {
  margin: 28px 0 8px;
  font-size: 18px;
  line-height: 1.45;
}

.related-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.site-footer {
  padding-block: 42px;
  background: #06080c;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: end;
}

.footer-brand {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
}

.footer-note,
.copyright {
  margin: 0;
  color: var(--subtle);
  font-size: 13px;
}

.footer-note {
  max-width: 720px;
}

@media (max-width: 920px) {
  .header-inner {
    min-height: 72px;
  }

  .brand picture,
  .brand img {
    width: 175px;
    height: 70px;
  }

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

  .site-nav {
    position: absolute;
    top: 100%;
    right: 15px;
    left: 15px;
    display: none;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #0d1219;
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    display: grid;
    gap: 2px;
  }

  .site-nav a {
    width: 100%;
    min-height: 48px;
    padding-inline: 14px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 46px;
    min-height: auto;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .article-shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }

  .article-aside {
    order: -1;
  }

  .article-toc {
    position: static;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 16px;
    line-height: 1.72;
  }

  .hero-inner {
    padding-block: 58px 52px;
  }

  .hero h1,
  .article-header h1 {
    font-size: clamp(28px, 8vw, 38px);
  }

  .hero-copy {
    font-size: 17px;
  }

  .section {
    padding-block: 54px;
  }

  .intro-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .intro-item {
    min-height: auto;
  }

  .intro-item h3 {
    margin-top: 22px;
  }

  .topic-link {
    grid-template-columns: 36px minmax(0, 1fr) 28px;
    gap: 10px;
    min-height: 116px;
  }

  .topic-link h3 {
    font-size: 18px;
  }

  .article-body h2 {
    margin-top: 42px;
    font-size: 24px;
  }

  .article-body h3 {
    font-size: 19px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .simulator {
    padding: 20px 16px;
  }

  .simulator-header {
    display: block;
  }

  .demo-badge {
    display: inline-block;
    margin-top: 14px;
  }

  .prediction-options {
    grid-template-columns: repeat(2, 1fr);
  }

  .ladder-stage {
    height: 270px;
  }

  .simulator-actions {
    align-items: stretch;
  }

  .simulate-button,
  .simulation-result {
    width: 100%;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
