:root {
  --ink: #1b2024;
  --ink-soft: #252c31;
  --paper: #f4f3ef;
  --white: #ffffff;
  --muted: #667078;
  --line: rgba(27, 32, 36, 0.16);
  --gold: #f2c14e;
  --coral: #ff6b57;
  --mint: #67d6c1;
  --blue: #3468d4;
  --content: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--paper);
  font-family: "Microsoft YaHei UI", "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, a { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.skip-link {
  position: fixed;
  z-index: 20;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  color: var(--ink);
  background: var(--gold);
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }
.content-width { width: min(var(--content), calc(100% - 40px)); margin: 0 auto; }

.site-header { color: var(--white); background: var(--ink); }
.nav-bar {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}
.brand { display: inline-flex; min-height: 44px; align-items: center; gap: 10px; font-weight: 800; }
.brand img { width: 36px; height: 36px; border-radius: 6px; }
.nav-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 22px; }
.nav-links a { min-height: 44px; display: inline-flex; align-items: center; color: #d8dee2; font-size: 14px; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--gold); }

.breadcrumb { padding: 18px 0 0; color: var(--muted); font-size: 13px; }
.breadcrumb ol { display: flex; flex-wrap: wrap; margin: 0; padding: 0; gap: 7px; list-style: none; }
.breadcrumb li:not(:last-child)::after { margin-left: 7px; content: "/"; }
.breadcrumb a:hover { color: var(--ink); text-decoration: underline; }

.page-hero { padding: 68px 0 72px; border-bottom: 1px solid var(--line); background: var(--white); }
.eyebrow { margin: 0 0 14px; color: #8a5305; font-size: 12px; font-weight: 800; text-transform: uppercase; }
.page-hero h1 { max-width: 900px; margin: 0; font-size: 50px; line-height: 1.14; }
.page-hero .lede { max-width: 760px; margin: 22px 0 0; color: #4f5960; font-size: 19px; }
.meta-row { display: flex; flex-wrap: wrap; margin-top: 28px; gap: 10px 24px; color: var(--muted); font-size: 13px; }

.doc-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 70px; padding-top: 62px; padding-bottom: 92px; }
.toc { position: sticky; top: 24px; align-self: start; border-top: 3px solid var(--gold); padding-top: 16px; }
.toc strong { display: block; margin-bottom: 9px; font-size: 13px; }
.toc a { display: block; min-height: 40px; padding: 7px 0; color: var(--muted); font-size: 13px; }
.toc a:hover { color: var(--ink); }
.article { min-width: 0; max-width: 800px; }
.article h2 { margin: 64px 0 18px; font-size: 31px; line-height: 1.25; }
.article h2:first-child { margin-top: 0; }
.article h3 { margin: 34px 0 12px; font-size: 21px; line-height: 1.35; }
.article p { margin: 0 0 18px; }
.article ul, .article ol { margin: 0 0 22px; padding-left: 24px; }
.article li { margin: 8px 0; }
.article a { color: #1e56b3; text-decoration: underline; text-underline-offset: 3px; }
.article strong { font-weight: 800; }
.answer-box { border-left: 4px solid var(--mint); background: var(--white); padding: 20px 22px; }
.answer-box p:last-child { margin-bottom: 0; }
.warning-box { border-left: 4px solid var(--coral); background: #fff8f6; padding: 20px 22px; }
pre {
  margin: 20px 0 26px;
  overflow: auto;
  border-radius: 6px;
  padding: 20px;
  color: #e8edf0;
  background: #171c20;
  font-family: Consolas, "Microsoft YaHei UI", monospace;
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
}
code { font-family: Consolas, "Microsoft YaHei UI", monospace; }
p code, li code { border: 1px solid var(--line); border-radius: 4px; padding: 2px 5px; background: #fff; font-size: 14px; }

.fact-table { width: 100%; margin: 22px 0 30px; border-collapse: collapse; background: var(--white); }
.fact-table th, .fact-table td { border-bottom: 1px solid var(--line); padding: 13px 14px; text-align: left; vertical-align: top; }
.fact-table th { width: 28%; font-size: 13px; }
.fact-table td { color: #4f5960; }
.comparison-table { width: 100%; margin: 24px 0 32px; border-collapse: collapse; background: var(--white); }
.comparison-table th, .comparison-table td { border: 1px solid var(--line); padding: 14px; text-align: left; vertical-align: top; }
.comparison-table th { background: #e5ecea; }

.resource-band { padding: 70px 0; border-top: 1px solid var(--line); background: var(--white); }
.resource-band h2 { margin: 0 0 28px; font-size: 30px; }
.resource-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.resource-link { min-height: 180px; border-right: 1px solid var(--line); padding: 24px; }
.resource-link:first-child { padding-left: 0; }
.resource-link:last-child { border-right: 0; }
.resource-link span { color: #8a5305; font-size: 12px; font-weight: 800; }
.resource-link h3 { margin: 22px 0 8px; font-size: 18px; line-height: 1.35; }
.resource-link p { margin: 0; color: var(--muted); font-size: 14px; }
.resource-link:hover h3 { color: #1e56b3; }

.proof-figure { margin: 30px 0; border: 1px solid var(--line); background: var(--white); }
.proof-figure img { width: 100%; aspect-ratio: 16 / 7; object-fit: cover; object-position: center 35%; }
.proof-figure figcaption { padding: 12px 14px; color: var(--muted); font-size: 12px; }
.version-block { border-top: 1px solid var(--line); padding: 30px 0; }
.version-block h2 { margin-top: 0; }
.version-label { display: inline-flex; border-radius: 999px; padding: 5px 9px; color: #18302b; background: var(--mint); font-size: 12px; font-weight: 800; }

.site-footer { padding: 26px 0; color: #aeb7bd; background: #111518; font-size: 13px; }
.footer-row { display: flex; justify-content: space-between; gap: 22px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 18px; }
.footer-links a:hover { color: var(--white); }

.not-found { display: grid; min-height: 100vh; place-items: center; padding: 30px; color: var(--white); background: var(--ink); }
.not-found-inner { width: min(680px, 100%); }
.not-found .code { color: var(--mint); font-size: 14px; font-weight: 800; }
.not-found h1 { margin: 12px 0 18px; font-size: 52px; line-height: 1.15; }
.not-found p { color: #bdc5ca; }
.back-link { display: inline-flex; min-height: 46px; margin-top: 18px; align-items: center; border-radius: 6px; padding: 10px 16px; color: var(--ink); background: var(--gold); font-weight: 800; }

@media (max-width: 820px) {
  .page-hero h1 { font-size: 40px; }
  .doc-layout { grid-template-columns: 1fr; gap: 34px; }
  .toc { position: static; display: flex; overflow-x: auto; gap: 18px; scrollbar-width: none; }
  .toc::-webkit-scrollbar { display: none; }
  .toc strong { display: none; }
  .toc a { flex: 0 0 auto; white-space: nowrap; }
  .resource-grid { grid-template-columns: 1fr; }
  .resource-link, .resource-link:first-child { min-height: 0; border-right: 0; border-top: 1px solid var(--line); padding: 22px 0; }
  .resource-link:first-child { border-top: 0; }
}

@media (max-width: 620px) {
  .content-width { width: calc(100% - 28px); }
  .nav-bar { align-items: flex-start; padding: 14px 0; }
  .brand span { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nav-links { gap: 8px 14px; }
  .nav-links a:not([aria-current="page"]) { display: none; }
  .page-hero { padding: 52px 0 58px; }
  .page-hero h1 { font-size: 34px; overflow-wrap: anywhere; }
  .page-hero .lede { font-size: 17px; }
  .doc-layout { padding-top: 42px; padding-bottom: 68px; }
  .article h2 { margin-top: 50px; font-size: 27px; }
  .fact-table, .comparison-table { display: block; overflow-x: auto; white-space: normal; }
  .footer-row { flex-direction: column; }
  .footer-links { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}
