:root {
  color-scheme: light;
  --ink: #142633;
  --muted: #546775;
  --subtle: #435867;
  --surface: #ffffff;
  --background: #f4f7f8;
  --line: #dce5e9;
  --accent: #106451;
  --accent-soft: #e5f3ee;
  --night: #172b39;
  --sidebar: 200px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--background);
  font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}
h1, h2, p, ul, dl, dd { margin: 0; }
h1, h2 { line-height: 1.35; }
a { color: var(--accent); text-underline-offset: .2em; }
a:focus-visible, input:focus-visible { outline: 2px solid #13856b; outline-offset: 3px; }
.icon { display: block; width: 20px; height: 20px; flex: none; }
.shell { width: min(100% - 64px, 1320px); margin-inline: auto; }
.skip { position: absolute; top: -6rem; left: 12px; z-index: 2; padding: .5rem 1rem; background: var(--surface); }
.skip:focus { top: 12px; }
.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.header-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.header-inner { min-height: 67px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); line-height: 1.2; text-decoration: none; }
.brand strong { display: block; font-size: 18px; letter-spacing: .05em; }
.brand small { display: block; margin-top: 4px; color: var(--subtle); font-size: 12px; font-weight: 650; }
.brand-mark {
  width: 37px; height: 37px; display: grid; place-items: center; border-radius: 9px;
  background: #194d43; color: #dbf7eb;
}
.brand-mark svg { width: 23px; height: 23px; }
.header-link {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px;
  border: 1px solid var(--line); border-radius: 7px; color: var(--subtle);
  font-size: 13px; font-weight: 650; text-decoration: none;
}
.header-link svg { width: 16px; height: 16px; }
.header-link:hover { background: var(--accent-soft); border-color: #beded4; color: var(--accent); }
.workspace { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); gap: 32px; padding-top: 30px; padding-bottom: 64px; }
#main { min-width: 0; }
.sidebar nav { position: sticky; top: 26px; display: grid; gap: 4px; }
.nav-label { padding: 4px 10px; color: var(--muted); font-size: 12px; font-weight: 700; }
.topic-label { margin-top: 15px; }
.sidebar a {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px; border: 1px solid transparent;
  border-radius: 7px; color: var(--subtle); font-size: 14px; font-weight: 610; text-decoration: none;
}
.sidebar a svg { width: 17px; height: 17px; }
.sidebar a:hover { border-color: var(--line); background: var(--surface); color: var(--accent); }
.sidebar a[aria-current="page"], .sidebar a.in-topic { border-color: #cce5dc; background: var(--accent-soft); color: var(--accent); }
.nav-count { margin-left: auto; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.index-intro {
  position: relative; display: flex; align-items: center; min-height: 206px; isolation: isolate; overflow: hidden;
  padding: 27px clamp(20px, 4vw, 44px); border-radius: 12px; background: linear-gradient(108deg, #172936 24%, #223c4b);
  color: #f6fcff;
}
.map-art { position: absolute; z-index: -1; right: 0; bottom: -5px; width: min(43%, 420px); height: auto; opacity: .85; mask-image: linear-gradient(to right, transparent 0, black 30%); }
.intro-copy { max-width: 62%; }
.eyebrow { display: flex; align-items: center; gap: 8px; color: #9edecb; font-size: 11px; font-weight: 750; letter-spacing: .18em; }
.eyebrow > span { width: 7px; height: 7px; border-radius: 50%; background: #8ecdb9; }
.index-intro h1 { margin: 9px 0 9px; font-size: clamp(31px, 4vw, 49px); letter-spacing: .02em; font-weight: 790; }
.intro-copy > p:last-child { max-width: 40ch; color: #d1e0e6; font-size: 15px; }
.archive-search {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: center;
  padding: 12px 14px; margin-top: 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface);
}
.archive-search label { color: var(--ink); font-size: 14px; font-weight: 720; white-space: nowrap; }
.search-field { position: relative; }
.search-field svg { position: absolute; top: 10px; left: 12px; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.search-field input {
  width: 100%; min-height: 40px; padding: 7px 12px 7px 36px; border: 1px solid #d6e3e7; border-radius: 6px;
  background: var(--background); color: var(--ink); font: inherit; font-size: 14px;
}
.search-field input::placeholder { color: var(--muted); }
.topic-section, .listing { margin-top: 30px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.section-head h2 { font-size: 20px; }
.section-head > span { color: var(--muted); font-size: 13px; }
.topic-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 225px), 1fr)); gap: 12px; }
.topic-card {
  display: flex; align-items: center; gap: 12px; min-height: 76px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink); text-decoration: none;
}
.topic-card:hover { border-color: #9bcbbd; }
.topic-icon {
  display: grid; place-items: center; width: 39px; height: 39px; flex: none; border-radius: 8px;
  background: var(--accent-soft); color: var(--accent);
}
.topic-card:nth-child(even) .topic-icon { background: #e8f0f6; color: #2d5e7b; }
.topic-text { flex: 1; min-width: 0; }
.topic-text strong, .topic-text small { display: block; }
.topic-text strong { font-size: 15px; }
.topic-text small { margin-top: 2px; color: var(--muted); font-size: 13px; }
.topic-arrow { color: var(--accent); }
.topic-arrow svg { width: 17px; height: 17px; }
.archive-list { overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.archive-list ul { padding: 0; list-style: none; }
.archive-columns {
  display: grid; grid-template-columns: minmax(0, 1fr) 8.5rem 6.3rem; gap: 16px;
  padding: 8px 16px; border-bottom: 1px solid var(--line); background: #eef3f5; color: var(--subtle);
  font-size: 12px; font-weight: 680;
}
.archive-row {
  display: grid; grid-template-columns: 34px minmax(0, 1fr) 8.5rem 6.3rem; gap: 0 16px;
  align-items: center; padding: 15px 16px;
}
.archive-row + .archive-row { border-top: 1px solid var(--line); }
.archive-row:focus-within, .archive-row:hover { background: #f9fbfb; }
.row-icon { display: grid; place-items: center; align-self: start; width: 34px; height: 34px; border-radius: 7px; background: #eef3f5; color: #4a6b7d; }
.row-icon svg { width: 18px; height: 18px; }
.row-category { margin-bottom: 3px; color: var(--accent); font-size: 11px; font-weight: 720; }
.row-title { display: inline-block; color: var(--ink); font-size: 16px; font-weight: 740; line-height: 1.45; text-decoration: none; overflow-wrap: anywhere; }
.row-title:hover { color: var(--accent); text-decoration: underline; }
.row-description { margin-top: 4px; color: var(--muted); font-size: 13px; }
.row-version, .archive-row time { color: var(--muted); font-size: 12px; }
.archive-row time, .article-meta time { font-variant-numeric: tabular-nums; }
.empty { padding: 15px 16px; color: var(--muted); font-size: 14px; }
.crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 2px 0 15px; color: var(--muted); font-size: 13px; }
.crumb a { color: var(--subtle); text-decoration: none; }
.crumb a:hover { color: var(--accent); text-decoration: underline; }
.reading { display: grid; grid-template-columns: minmax(0, 790px) minmax(140px, 1fr); gap: 22px; align-items: start; }
.article-sheet { min-width: 0; padding: clamp(20px, 4vw, 37px); border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.article-heading { margin-bottom: 23px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.article-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; color: var(--accent); font-size: 13px; font-weight: 710; }
.article-kicker svg { width: 17px; height: 17px; }
.article-heading h1 { margin: 11px 0; font-size: clamp(28px, 3.2vw, 40px); overflow-wrap: anywhere; }
.lede { color: var(--muted); font-size: 16px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 8px 19px; margin-top: 17px; font-size: 13px; }
.article-meta > div { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 7px; }
.article-meta dt { color: var(--muted); }
.article-meta dd { color: var(--ink); font-weight: 650; }
.tag { padding: 1px 6px; border-radius: 4px; background: var(--accent-soft); }
.prose { font-size: 16px; line-height: 1.85; overflow-wrap: anywhere; }
.prose h2, .sources h2 { margin: 25px 0 9px; font-size: 22px; scroll-margin-top: 16px; }
.prose p, .prose ul { margin: 11px 0; }
.prose ul { padding-left: 1.3em; }
.prose li + li { margin-top: 6px; }
.prose sup { padding-left: 3px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 8px 11px; text-align: left; border: 1px solid var(--line); }
th { background: #eef3f5; }
th:first-child, td:first-child { min-width: 4.25em; }
.sources { margin-top: 26px; border-top: 1px solid var(--line); font-size: 14px; overflow-wrap: anywhere; }
.sources ol { padding-left: 1.4em; margin: 0; }
.sources li + li { margin-top: 5px; }
.sources svg { display: inline-block; width: 13px; height: 13px; vertical-align: -.16em; }
.article-toc { position: sticky; top: 26px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.article-toc p { margin-bottom: 7px; color: var(--ink); font-size: 14px; font-weight: 740; }
.article-toc ul { padding: 0; list-style: none; }
.article-toc li { border-left: 2px solid var(--line); }
.article-toc a { display: block; padding: 3px 0 3px 9px; color: var(--subtle); font-size: 13px; text-decoration: none; }
.article-toc a:hover { color: var(--accent); text-decoration: underline; }
.category-intro { display: flex; align-items: center; gap: 14px; padding: 20px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.category-intro h1 { font-size: clamp(25px, 4vw, 34px); }
.category-intro p { margin-top: 2px; color: var(--muted); font-size: 14px; }
.ad { margin-block: 18px; max-width: 100%; overflow-x: auto; }
.not-found { padding: 48px 0; }
.not-found .eyebrow { color: var(--accent); }
.not-found h1 { margin: 8px 0 15px; }
.site-footer { padding: 19px 0; border-top: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 13px; }
.footer-inner strong { color: var(--ink); }
@media (max-width: 1100px) {
  :root { --sidebar: 160px; }
  .workspace { gap: 20px; }
  .reading { grid-template-columns: minmax(0, 1fr) 140px; gap: 13px; }
}
@media (max-width: 880px) {
  .shell { width: calc(100% - 36px); }
  .workspace { grid-template-columns: minmax(0, 1fr); gap: 16px; padding-top: 12px; }
  .sidebar nav { position: static; display: flex; flex-wrap: wrap; gap: 4px; }
  .sidebar .nav-label, .nav-count { display: none; }
  .sidebar a { gap: 5px; padding: 5px 7px; font-size: 13px; }
  .sidebar a svg { width: 15px; height: 15px; }
}
@media (max-width: 650px) {
  .shell { width: calc(100% - 28px); }
  .header-inner { min-height: 60px; }
  .index-intro { min-height: 166px; }
  .intro-copy { max-width: 100%; }
  .map-art { opacity: .26; }
  .intro-copy > p:last-child { font-size: 14px; }
  .search-field input { font-size: 16px; }
  .archive-columns { display: none; }
  .archive-row { grid-template-columns: 27px minmax(0, 1fr) auto; gap: 4px 8px; padding: 11px; align-items: start; }
  .row-icon { width: 27px; height: 27px; }
  .row-main { grid-column: 2 / -1; }
  .row-version { grid-column: 2; }
  .archive-row time { grid-column: 3; }
  .reading { grid-template-columns: minmax(0, 1fr); }
  .article-toc { position: static; }
  .footer-inner { align-items: flex-start; flex-direction: column; gap: 2px; }
}
