:root {
  --bg: #fbfbfe;
  --bg-panel: #ffffff;
  --bg-panel-2: #f5f6fa;
  --border: #e6e7ee;
  --border-strong: #d6d8e1;
  --dot: #dcdee7;
  --accent: #f2643d;
  --accent-dark: #c94a26;
  --text: #16171d;
  --text-muted: #62656f;
  --text-faint: #8b8e98;
  --success: #2fb27e;
  --success-ring: rgba(47,178,126,.22);
  --warn: #d99a1e;
  --error: #d33a3a;
  --on-accent: #ffffff;
  --mask-on: #000000;
  --clear: transparent;
  --veil: rgba(22,23,29,.28);
  --font-display: 'Inter','Noto Sans SC',-apple-system,BlinkMacSystemFont,'PingFang SC','Hiragino Sans','Apple SD Gothic Neo','Microsoft YaHei',sans-serif;
  --font-body: 'Inter','Noto Sans SC',-apple-system,BlinkMacSystemFont,'PingFang SC','PingFang TC','Hiragino Sans','Apple SD Gothic Neo',sans-serif;
  --font-mono: 'JetBrains Mono',ui-monospace,'SF Mono',Menlo,Consolas,monospace;
  --r-card: 8px;
  --r-btn: 6px;
  --r-pill: 999px;
  --r-mark: 7px;
  --r-rig: 12px;
  --r-screen: 6px;
  --r-round: 50%;
  --r-shot: 10px;
  --shadow-hair: 0 1px 2px rgba(22,23,29,.04);
  --shadow-rig: 0 1px 0 rgba(22,23,29,.02),0 28px 56px -32px rgba(22,23,29,.16);
  --shadow-btn: 0 1px 0 rgba(22,23,29,.06),inset 0 1px 0 rgba(255,255,255,.16);
  --container: 1280px;
  --reading: 900px;
  --gutter: 48px;
  --topbar-h: 64px;
  --facts-h: 44px;
  --section-space: 140px;
  --track: -.025em;
  --track-cjk: -.02em;
  --ease: 180ms ease;
  --reveal-time: 550ms;
  --layer-header: 40;
  --layer-veil: 30;
  --layer-fab: 20;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.nav-open { overflow: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
[hidden] { display: none !important; }
img, svg { max-width: 100%; }
img { vertical-align: middle; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: .2em; }
a, button { -webkit-tap-highlight-color: var(--clear); }
:focus-visible { outline: 2px solid var(--accent-dark); outline-offset: 3px; }
button:focus-visible, a:focus-visible { border-radius: var(--r-btn); }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: var(--track-cjk);
  line-height: 1.3;
  text-wrap: balance;
  overflow-wrap: break-word;
}
h1 { font-size: clamp(34px,3.4vw,48px); line-height: 1.14; }
h2 { font-size: clamp(24px,2.3vw,32px); }
h3 { font-size: 21px; }
p, ul, ol { margin-top: 0; }
p { margin-bottom: 1.2em; }
strong { font-weight: 600; }
code, pre, kbd { font-family: var(--font-mono); }
code { font-size: .88em; overflow-wrap: anywhere; }
pre {
  max-width: 100%;
  min-width: 0;
  margin: 24px 0;
  padding: 20px;
  overflow-x: auto;
  background: var(--bg-panel-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  line-height: 1.8;
  tab-size: 2;
}
pre code { font-size: 13px; white-space: pre; overflow-wrap: normal; word-break: normal; }
hr { border: 0; border-top: 1px solid var(--border); margin: 40px 0; }
figure { margin: 0; }
summary { cursor: pointer; }
:where(section, article, [id]) { scroll-margin-top: 28px; }
:where(.wrap, .reading, .lead__grid, .band__row, .card-grid, .footer__grid) > * { min-width: 0; }
.vh {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.keep { white-space: nowrap; }
.muted { color: var(--text-muted); }
.mono { font-family: var(--font-mono); }
.kw { color: var(--accent); }
.wrap {
  width: 100%; max-width: var(--container); margin-inline: auto;
  padding-inline: var(--gutter);
}
.reading {
  width: 100%; max-width: var(--reading); margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-top: var(--section-space); padding-bottom: var(--section-space); border-bottom: 1px solid var(--border); }
.section--white { background: var(--bg-panel); color: var(--text); }
.section--soft { background: var(--bg-panel-2); color: var(--text); }
.section-head { margin-bottom: 36px; }
.section-head__seg, .band__seg {
  margin-right: 14px; font-family: var(--font-mono); font-size: 12px; color: var(--text-muted);
}
.section-head h2 { display: inline; margin: 0; }
.section-head p { max-width: 42em; margin-top: 18px; color: var(--text-muted); }
.prose { min-width: 0; overflow-wrap: break-word; }
.prose h2 { margin-top: 64px; margin-bottom: 24px; }
.prose h3 { margin-top: 36px; }
.prose p, .prose li { line-height: 1.85; }
.prose li + li { margin-top: 10px; }
.prose :where(ul,ol) { padding-left: 1.5em; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.btn {
  display: inline-flex; justify-content: center; align-items: center; gap: 8px;
  min-height: 42px; padding: 9px 18px; border: 1px solid var(--clear);
  border-radius: var(--r-btn); font-family: var(--font-body);
  font-size: 15px; font-weight: 500; letter-spacing: -.005em;
  text-align: center; text-decoration: none;
  transition: background-color var(--ease),border-color var(--ease),color var(--ease);
}
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn:hover { text-decoration: none; }
.btn--solid { background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow-btn); }
.btn--solid:hover, .btn--solid.is-hover { background: var(--accent-dark); color: var(--on-accent); }
.btn--solid:active { background: var(--accent-dark); color: var(--on-accent); box-shadow: none; }
.btn--line { background: var(--bg-panel); color: var(--text); border-color: var(--border-strong); }
.btn--line:hover, .btn--line.is-hover { border-color: var(--text-muted); }
.btn--quiet { background: var(--clear); color: var(--accent-dark); }
.btn--quiet:hover { background: var(--bg-panel-2); color: var(--accent-dark); }
.btn:disabled, .btn[aria-disabled="true"] {
  background: var(--bg-panel-2); color: var(--text-muted); border-color: var(--border); box-shadow: none;
}
.btn.is-focus { outline: 2px solid var(--accent-dark); outline-offset: 3px; }
.btn__arrow { color: var(--text-muted); font-size: 14px; }

.topbar { position: relative; z-index: var(--layer-header); min-height: var(--topbar-h); border-bottom: 1px solid var(--border); background: var(--bg); color: var(--text); }
.topbar__row {
  position: relative; width: 100%; max-width: min(100%,calc(1280px + var(--gutter) * 2));
  min-height: var(--topbar-h); margin-inline: auto; padding-inline: var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 28px;
  border-left: 1px solid var(--border); border-right: 1px solid var(--border);
}
.wordmark {
  display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0;
  color: var(--text); font-family: var(--font-display); font-size: 15px; letter-spacing: -.01em;
}
.wordmark:hover { text-decoration: none; }
.wordmark__tile {
  display: block; width: 28px; height: 28px; flex-shrink: 0;
  border-radius: var(--r-mark); border: 1px solid var(--border-strong);
  background: linear-gradient(180deg,var(--bg-panel),var(--bg-panel-2)); color: var(--text);
}
.wordmark__sub { color: var(--text-muted); }
.trail { display: flex; align-items: center; margin-left: auto; min-width: 0; }
.trail__list { display: flex; align-items: center; list-style: none; margin: 0; padding: 0; gap: 0; font-size: 14px; }
.trail__list li { display: flex; align-items: center; }
.trail__list li + li::before { content: "·"; content: "·" / ""; margin-inline: 12px; color: var(--text-faint); }
.trail__list a { color: var(--text-muted); white-space: nowrap; transition: color var(--ease); padding-block: 10px; }
.trail__list a:hover { color: var(--text); text-decoration: none; }
.trail__list a[aria-current="page"] { color: var(--text); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 6px; }
.header-tools { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.locale-wrap { position: relative; }
.locale {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 30px; padding: 4px 10px; border: 1px solid var(--border);
  border-radius: var(--r-btn); background: var(--bg-panel); color: var(--text-muted);
  font-size: 13px; white-space: nowrap;
}
.locale__caret { font-size: 10px; color: var(--text-muted); }
.locale__short { display: none; }
.locale-menu {
  position: absolute; top: calc(100% + 10px); right: 0; width: 190px;
  padding: 6px; margin: 0; list-style: none;
  border: 1px solid var(--border); border-radius: var(--r-card);
  background: var(--bg-panel); color: var(--text); box-shadow: var(--shadow-hair);
}
.locale-menu a { display: flex; align-items: center; min-height: 44px; padding: 8px 12px; color: var(--text-muted); border-radius: var(--r-btn); }
.locale-menu a:hover, .locale-menu a[aria-current] { background: var(--bg-panel-2); color: var(--text); text-decoration: none; }
.menu-toggle {
  display: none; align-items: center; justify-content: center; min-width: 44px; min-height: 44px;
  border: 1px solid var(--border); border-radius: var(--r-btn); background: var(--bg-panel); color: var(--text);
}
.menu-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.mobile-drawer {
  position: absolute; inset: 100% 0 auto; padding: 18px var(--gutter) 24px;
  max-height: calc(100dvh - var(--topbar-h)); overflow-y: auto; overscroll-behavior: contain;
  background: var(--bg-panel); color: var(--text); border-bottom: 1px solid var(--border);
}
.mobile-drawer ul { list-style: none; margin: 0; padding: 0; }
.mobile-drawer a { display: flex; align-items: center; width: 100%; min-height: 48px; padding: 12px 10px; color: var(--text-muted); border-bottom: 1px solid var(--border); }
.mobile-drawer a[aria-current] { color: var(--accent-dark); }
.mobile-drawer__label { margin: 24px 10px 4px; font-size: 13px; color: var(--text-muted); }
.nav-veil { position: fixed; inset: 0; z-index: var(--layer-veil); border: 0; padding: 0; background: var(--veil); color: var(--text); }
.skip-link { position: absolute; left: var(--gutter); top: 8px; transform: translateY(-180%); padding: 8px 14px; background: var(--bg-panel); color: var(--text); border: 1px solid var(--border); }
.skip-link:focus { transform: none; z-index: 2; }

.card-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; }
.card, .panel {
  min-width: 0; padding: 28px; border: 1px solid var(--border);
  border-radius: var(--r-card); background: var(--bg-panel); color: var(--text);
}
.card h3, .panel h3 { margin-top: 0; }
.card p:last-child, .panel p:last-child { margin-bottom: 0; }
.card__meta { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }
.card__link { display: inline-block; margin-top: 18px; }
.group-list { list-style: none; padding: 0; margin: 0; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--bg-panel); color: var(--text); }
.group-list li + li { border-top: 1px solid var(--border); }
.group-list a { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; color: var(--text); }
.group-list a::after { content: "›"; color: var(--text-muted); flex-shrink: 0; }

.footer { border-top: 1px solid var(--border); background: var(--bg-panel-2); color: var(--text); }
.footer__inner { padding-top: 72px; padding-bottom: 28px; }
.footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1.5fr 1fr; gap: 36px; }
.footer__brand p { max-width: 29em; margin-top: 20px; color: var(--text-muted); font-size: 14px; line-height: 1.8; }
.footer__title { font-size: 14px; margin: 0 0 16px; font-weight: 500; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li + li { margin-top: 7px; }
.footer li a { display: inline-block; padding-block: 4px; color: var(--text-muted); font-size: 13px; overflow-wrap: anywhere; }
.footer li a:hover { color: var(--accent-dark); }
.footer__bottom { display: flex; flex-wrap: wrap; gap: 12px 28px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 12px; }
.footer__bottom p { margin: 0; }
.footer__bottom a { color: var(--text-muted); }

.reveal { opacity: 1; }
.reveal-ready .reveal:not(.shown) { opacity: 0; transform: translateY(14px); }
.reveal-ready .reveal { transition: opacity var(--reveal-time) ease,transform var(--reveal-time) ease; }
.reveal.shown { opacity: 1; transform: none; }

@media (max-width: 1024px) {
  .topbar__row { gap: 20px; }
  .trail { display: none; }
  .header-tools { margin-left: auto; }
  .menu-toggle { display: inline-flex; }
}
@media (min-width: 1025px) {
  .mobile-drawer, .nav-veil { display: none !important; }
}
@media (max-width: 768px) {
  h1 { font-size: clamp(24px,4vw,30px); }
  .footer__grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 640px) {
  :root { --gutter: 20px; }
  .topbar__row { gap: 10px; }
  .wordmark { font-size: 13px; gap: 8px; }
  .wordmark__tile { width: 26px; height: 26px; }
  .header-tools { margin-left: auto; gap: 6px; }
  .locale { min-height: 44px; padding-inline: 9px; }
  .locale__full { display: none; }
  .locale__short { display: inline; }
  .card-grid, .footer__grid { grid-template-columns: minmax(0,1fr); }
  .card, .panel { padding: 22px; }
  .tilt, [data-tilt] { transform: none !important; }
  .footer__inner { padding-top: 56px; }
  .footer__bottom { margin-top: 32px; }
  pre { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal-ready .reveal:not(.shown) { opacity: 1; transform: none; }
}
@media print {
  .header-tools, .mobile-drawer, .nav-veil, .dl-fab { display: none !important; }
  .reveal-ready .reveal:not(.shown) { opacity: 1; transform: none; }
}