:root {
  --bg: #F5F8FF;
  --bg-panel: #FFFFFF;
  --bg-panel-2: #EDF1F9;
  --bg-sunk: #F7F9FD;
  --border: #DCE2EC;
  --border-strong: #C6CFDC;
  --accent: #1E66D0;
  --accent-dark: #154C9E;
  --accent-wash: #E6EEFB;
  --on-accent: #FFFFFF;
  --text: #222B36;
  --text-muted: #5B6675;
  --text-faint: #8D97A6;
  --success: #2E8B57;
  --warn: #B7791F;
  --error: #C53B3B;
  --mark: #FFE16B;
  --clear: transparent;
  --veil: rgba(28, 48, 84, .18);
  --font-display: "Inter", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "Inter", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --radius: 6px;
  --radius-sm: 4px;
  --radius-mark: 2px;
  --radius-pill: 999px;
  --radius-round: 50%;
  --radius-scribble: 60% 40% 70% 30% / 90% 70% 40% 50%;
  --shadow-window: 0 1px 2px rgba(28,48,84,.05), 0 18px 40px -18px rgba(28,48,84,.16), 0 56px 110px -36px rgba(28,48,84,.24);
  --shadow-sheet: 0 24px 60px -30px rgba(28,48,84,.22);
  --shadow-card: 0 1px 2px rgba(28,48,84,.04), 0 6px 18px -12px rgba(28,48,84,.16);
  --shadow-chip: 0 1px 2px rgba(28,48,84,.05);
  --shadow-btn: 0 1px 0 rgba(255,255,255,.18) inset, 0 8px 20px -10px rgba(30,102,208,.55);
  --shadow-seg: 0 1px 2px rgba(28,48,84,.12), 0 0 0 1px rgba(28,48,84,.06);
  --shadow-toggle: 0 1px 2px rgba(28,48,84,.25);
  --shadow-input: inset 0 1px 1px rgba(28,48,84,.04);
  --highlight: inset 0 1px 0 rgba(255,255,255,.9);
  --gutter: 48px;
  --content-width: 1344px;
  --reading-width: 820px;
  --header-width: 1280px;
  --nav-h: 64px;
  --peek: 56px;
  --ease: cubic-bezier(.2,.7,.2,1);
  --speed: .15s;
  --reveal-time: .55s;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }
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;
  text-rendering: optimizeLegibility;
}
[hidden] { display: none !important; }
img, svg, video { max-width: 100%; vertical-align: middle; }
img { height: auto; }
button, input, select, textarea { font: inherit; }
button, summary { cursor: pointer; }
button { color: var(--text); }
a { color: var(--accent); text-underline-offset: 4px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-dark); }
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.015em;
  text-wrap: balance;
}
h1, .h1 { font-size: clamp(34px, 3.35vw, 48px); }
h2 { font-size: clamp(24px, 2.2vw, 32px); }
h3 { font-size: 22px; }
p, li { overflow-wrap: break-word; }
code { font-family: var(--font-mono); overflow-wrap: anywhere; }
pre {
  max-width: 100%;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.75;
  tab-size: 2;
}
pre code { overflow-wrap: normal; word-break: normal; white-space: pre; }
blockquote { margin-inline: 0; }
:where(main, section, article, aside, nav, figure, .grid, .hero-grid, .letter-grid) > * { min-width: 0; }
.wrap {
  width: 100%;
  max-width: calc(var(--content-width) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.reading { max-width: calc(var(--reading-width) + var(--gutter) * 2); }
.sec { padding-top: 64px; padding-bottom: 64px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.keep { white-space: nowrap; }
.mono { font-family: var(--font-mono); }
.muted { color: var(--text-muted); }
.accent { color: var(--accent); }
mark {
  background: var(--mark); color: var(--text);
  padding: 0 .18em; border-radius: var(--radius-mark);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.skip-link {
  position: fixed; top: 8px; left: 16px; z-index: 100;
  padding: 10px 16px; background: var(--bg-panel); color: var(--accent-dark);
  border: 1px solid var(--border); border-radius: var(--radius);
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 48px; padding: 10px 22px;
  border: 1px solid var(--clear); border-radius: var(--radius);
  font: inherit; font-size: 16px; font-weight: 700;
  text-align: center; text-decoration: none;
  transition: background-color var(--speed), border-color var(--speed), color var(--speed);
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.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-line { background: var(--bg-panel); color: var(--text); border-color: var(--border-strong); box-shadow: var(--shadow-chip); }
.btn-line:hover, .btn-line.is-hover { border-color: var(--accent); color: var(--accent-dark); }
.btn:active { box-shadow: var(--highlight); }
.btn:disabled, .btn[aria-disabled="true"] {
  background: var(--bg-panel-2); color: var(--text-muted);
  border-color: var(--border); box-shadow: none; cursor: not-allowed;
}
.btn.is-focus { outline: 2px solid var(--accent); outline-offset: 3px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.panel, .card {
  min-width: 0; padding: 24px; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--bg-panel); color: var(--text);
  box-shadow: var(--shadow-card);
}
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 20px; }
.prose { min-width: 0; font-size: 17px; line-height: 1.88; }
.prose h2 { margin-top: 2.4em; margin-bottom: .8em; }
.prose h3 { margin-top: 1.8em; }
.prose p { margin: 0 0 1.2em; }
.prose :not(pre) > code {
  padding: 1px 5px; font-size: .88em; border-radius: var(--radius-sm);
  background: var(--bg-panel-2); color: var(--text);
}
.prose pre { padding: 18px; background: var(--bg-sunk); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); }
.prose :where(div, section, figure) { min-width: 0; max-width: 100%; }
.decorated, .hero { overflow-x: clip; }
.reveal { opacity: 1; transform: none; }
html.reveal-ready .reveal:not(.shown) { opacity: 0; transform: translateY(18px); }
.reveal { transition: opacity var(--reveal-time) var(--ease), transform var(--reveal-time) var(--ease); }
.reveal.shown { opacity: 1; transform: none; }

/* 独立的宽版页头；工具区不属于折叠导航。 */
.topbar, #site-header { position: relative; z-index: 40; min-height: var(--nav-h); }
.header-inner {
  width: 100%; max-width: min(100%, calc(var(--header-width) + var(--gutter) * 2));
  min-height: var(--nav-h); margin-inline: auto; padding-inline: var(--gutter);
  display: flex; align-items: center; gap: 24px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0;
  font-family: var(--font-display); font-size: 17px; font-weight: 800;
  letter-spacing: -.01em; color: var(--text); text-decoration: none;
}
.brand:hover { color: var(--text); }
.brand img { width: 30px; height: 30px; flex-shrink: 0; }
.mainnav { min-width: 0; margin-left: auto; }
.mainnav ul { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.mainnav a {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 7px 14px; border-radius: var(--radius-pill);
  font-size: 14.5px; font-weight: 500; color: var(--text-muted); text-decoration: none; white-space: nowrap;
}
.mainnav a:hover { background: var(--bg-panel-2); color: var(--text); }
.mainnav a[aria-current="page"], .mobile-drawer a[aria-current="page"] {
  background: var(--accent-wash); color: var(--accent-dark); font-weight: 700;
}
.header-tools { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.language { position: relative; }
.lang {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 34px; padding: 6px 12px; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--bg-panel); color: var(--text);
  font: inherit; font-size: 13.5px; white-space: nowrap; box-shadow: var(--shadow-chip);
}
.lang svg { width: 15px; height: 15px; flex-shrink: 0; color: var(--text-muted); }
.lang-short { display: none; }
.caret { color: var(--text-muted); font-size: 11px; }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 44;
  min-width: 172px; margin: 0; padding: 6px; list-style: none;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-panel); color: var(--text); box-shadow: var(--shadow-sheet);
}
.lang-menu a { display: flex; align-items: center; min-height: 44px; padding: 8px 12px; text-decoration: none; color: var(--text); border-radius: var(--radius-sm); }
.lang-menu a:hover, .lang-menu a[aria-current="true"] { background: var(--accent-wash); color: var(--accent-dark); }
.menu-toggle {
  display: none; align-items: center; justify-content: center; min-width: 44px; min-height: 44px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-panel); color: var(--text);
}
.menu-toggle svg { width: 20px; height: 20px; flex-shrink: 0; }
.mobile-drawer { display: none; }
.nav-veil { position: fixed; inset: var(--nav-h) 0 0; z-index: 41; background: var(--veil); color: var(--text); border: 0; }
.site-footer { border-top: 1px solid var(--border); padding-top: 56px; padding-bottom: 28px; }
.footer-grid { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(0,1fr) minmax(0,1.6fr); gap: 48px; }
.footer-brand p { max-width: 29em; color: var(--text-muted); font-size: 14px; line-height: 1.8; }
.footer-title { margin: 0 0 16px; font-size: 14px; font-weight: 700; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px 16px; }
.footer-links a, .footer-bottom a { color: var(--text-muted); font-size: 14px; }
.footer-links a:hover, .footer-bottom a:hover { color: var(--accent-dark); }
.footer-languages { display: flex; flex-wrap: wrap; gap: 12px 20px; margin-top: 32px; }
.footer-languages a { font-size: 14px; }
.footer-languages [aria-current="true"] { color: var(--text); font-weight: 700; text-decoration: none; }
.footer-bottom { border-top: 1px solid var(--border); margin-top: 24px; padding-top: 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; font-size: 13px; color: var(--text-muted); }
.footer-legal { display: flex; flex-wrap: wrap; gap: 20px; }

/* 首屏沿用已确认的左文右窗比例与静态界面。 */
.hero {
  min-height: calc(100vh - var(--nav-h) - var(--peek));
  min-height: calc(100svh - var(--nav-h) - var(--peek));
  display: grid; align-content: center;
  padding-top: 22px; padding-bottom: 40px;
}
.hero-grid { display: grid; grid-template-columns: minmax(0,42fr) minmax(0,58fr); gap: 64px; align-items: stretch; }
.lead { display: flex; flex-direction: column; justify-content: space-between; gap: 40px; min-width: 0; }
.toc-cap { margin: 0 0 8px; font-size: 12.5px; font-weight: 600; letter-spacing: .08em; color: var(--text-muted); }
.hero-toc ul { list-style: none; margin: 0; padding: 0; }
.hero-toc li { font-size: 17px; line-height: 1.72; color: var(--text); }
.hero-toc a { color: var(--accent); font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.hero-toc .dash { color: var(--text-muted); margin: 0 .38em; }
.scribble { position: relative; z-index: 0; white-space: nowrap; }
.scribble::after {
  content: ""; position: absolute; z-index: -1; left: -.08em; right: -.12em; bottom: -.2em; height: .24em;
  background: var(--mark); color: var(--text); border-radius: var(--radius-scribble); transform: rotate(-1.1deg) skewX(-14deg);
}
.h1 { margin: 0; font-family: var(--font-display); font-weight: 800; line-height: 1.13; letter-spacing: -.015em; color: var(--text); }
.h1-line { display: block; animation: lead-rise .62s var(--ease) both; }
.h1-line:nth-child(2) { animation-delay: .12s; }
.h1-line:nth-child(3) { animation-delay: .24s; }
.h1-mark { position: relative; z-index: 0; }
.h1-mark::before {
  content: ""; position: absolute; z-index: -1; left: -.06em; right: -.06em; bottom: .05em; height: .42em;
  background: var(--mark); color: var(--text); border-radius: var(--radius-mark);
  transform-origin: left center; animation: lead-swipe .38s var(--ease) .78s both;
}
@keyframes lead-rise { from { opacity: 0; transform: translateY(.45em); } to { opacity: 1; transform: none; } }
@keyframes lead-swipe { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.desc { margin: 16px 0 0; max-width: 33em; font-size: 16.5px; line-height: 1.72; color: var(--text-muted); }
.desc strong { color: var(--text); font-weight: 700; background: var(--mark); padding: 0 .22em; border-radius: var(--radius-mark); }
.facts { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--border); display: grid; gap: 12px; }
.facts-row { display: grid; grid-template-columns: 36px minmax(0,1fr); align-items: center; gap: 12px; }
.facts-key { font-size: 12.5px; font-weight: 600; letter-spacing: .06em; color: var(--text-muted); }
.plats, .chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.plat {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 32px; padding: 5px 12px 5px 10px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-panel); color: var(--text);
  font-size: 13.5px; font-weight: 600; text-decoration: none; box-shadow: var(--shadow-chip);
}
.plat svg { width: 15px; height: 15px; flex-shrink: 0; }
.plat:hover { border-color: var(--accent); color: var(--accent-dark); }

@media (max-width: 1240px) {
  .hero-grid { gap: 44px; }
  .mainnav a { padding-inline: 11px; }
}
@media (max-width: 1100px) {
  .mainnav { display: none; }
  .header-tools { margin-left: auto; }
  .menu-toggle { display: inline-flex; }
  .mobile-drawer:not([hidden]) {
    display: block; position: absolute; top: 100%; left: 0; right: 0; z-index: 43;
    padding: 16px var(--gutter) 24px; max-height: calc(100dvh - var(--nav-h));
    overflow-y: auto; overscroll-behavior: contain;
    background: var(--bg-panel); color: var(--text); border-block: 1px solid var(--border); box-shadow: var(--shadow-sheet);
  }
  .mobile-drawer ul { list-style: none; margin: 0; padding: 0; }
  .mobile-drawer a { display: flex; align-items: center; width: 100%; min-height: 44px; padding: 10px 14px; color: var(--text-muted); text-decoration: none; border-radius: var(--radius); }
  .mobile-drawer a:hover { background: var(--bg-panel-2); color: var(--text); }
  .drawer-languages { border-top: 1px solid var(--border); margin-top: 12px !important; padding-top: 12px !important; }
}
@media (max-width: 1060px) {
  .hero { min-height: 0; padding-top: 28px; padding-bottom: 64px; }
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .lead { gap: 32px; }
  .footer-grid { gap: 28px; }
}
@media (max-width: 768px) {
  :root { --gutter: 20px; }
  h1, .h1 { font-size: clamp(24px, 4.2vw, 30px); }
  .grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .sec { padding-top: 44px; padding-bottom: 44px; }
}
@media (max-width: 640px) {
  .tilt, [data-tilt] { transform: none !important; }
  .header-inner { gap: 8px; }
  .header-inner .brand { font-size: 14px; gap: 7px; flex-shrink: 1; min-width: 0; }
  .header-inner .brand span { min-width: 0; overflow-wrap: anywhere; }
  .header-inner .brand img { width: 26px; height: 26px; }
  .lang-full { display: none; }
  .lang-short { display: inline; }
  .lang { min-height: 44px; padding-inline: 9px; }
  .hero-toc li { font-size: 15.5px; }
  .hero .lead { gap: 26px; }
  .grid, .footer-grid { grid-template-columns: 1fr; }
  .footer-brand { grid-column: auto; }
  .facts-row { grid-template-columns: 1fr; gap: 7px; }
  .plats { gap: 6px; }
  .plat { font-size: 12px; padding-inline: 8px; }
  .prose { font-size: 16px; }
}
@media (max-width: 360px) {
  :root { --gutter: 16px; }
  .header-inner .brand { font-size: 12px; }
  .header-tools { gap: 5px; }
  .lang svg { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html.reveal-ready .reveal:not(.shown) { opacity: 1; transform: none; }
}