:root {
  --bg: #FFFFFF;
  --bg-panel: #F6F7F9;
  --bg-panel-2: #EDEFF3;
  --border: #E3E5EA;
  --line-strong: #CDD1D8;
  --accent: #1E6CE0;
  --accent-dark: #1554B8;
  --text: #141518;
  --text-muted: #5E636E;
  --text-faint: #8C919B;
  --success: #1F9D55;
  --warn: #C98A06;
  --error: #D93B3B;
  --on-accent: #FFFFFF;
  --clear: transparent;
  --mask-solid: #000000;
  --success-ring: rgba(31,157,85,.16);
  --accent-halo: rgba(30,108,224,.20);
  --ink-veil: rgba(20,21,24,.80);
  --overlay: rgba(20,21,24,.24);
  --shadow-demo: 0 40px 120px -30px rgba(20,21,24,.30), 0 14px 36px -18px rgba(20,21,24,.12), 0 1px 2px rgba(20,21,24,.05);
  --shadow-btn: 0 10px 24px -10px rgba(30,108,224,.60);
  --shadow-play: 0 18px 40px -14px rgba(21,84,184,.60);
  --shadow-raise: 0 1px 2px rgba(20,21,24,.06), 0 2px 8px -2px rgba(20,21,24,.06);
  --shadow-fab: 0 16px 36px -14px rgba(20,21,24,.45);
  --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;
  --r-demo: 40px;
  --r-lg: 32px;
  --r-md: 14px;
  --r-sm: 10px;
  --r-menu: 12px;
  --r-pill: 999px;
  --r-round: 50%;
  --wrap: 1200px;
  --reading: 800px;
  --header-span: 1280px;
  --gutter: 24px;
  --demo-w: min(92vw,1200px);
  --header-h: 76px;
  --section-gap: 120px;
  --ease: cubic-bezier(.2,.7,.3,1);
  --chapter-time: 8s;
}
*, *::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;
  text-rendering: optimizeLegibility;
}
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button, input, select, textarea { max-width: 100%; }
button { color: var(--text); }
img, svg, video { max-width: 100%; }
img, video { height: auto; }
img { display: block; }
svg { vertical-align: middle; }
button svg, a svg, .badge-dot { flex-shrink: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
figure, blockquote { margin: 0; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text);
  text-wrap: balance;
  overflow-wrap: break-word;
}
h1 { font-size: clamp(34px,3.4vw,48px); font-weight: 800; line-height: 1.12; letter-spacing: -.02em; }
h2 { font-size: clamp(26px,3vw,36px); font-weight: 800; line-height: 1.2; letter-spacing: -.02em; }
h3 { font-size: 22px; line-height: 1.35; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
code, pre, kbd { font-family: var(--font-mono); }
code { overflow-wrap: anywhere; }
pre {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  padding: 24px;
  border-radius: var(--r-md);
  background: var(--bg-panel);
  color: var(--text);
  font-size: 13px;
  line-height: 1.8;
  tab-size: 2;
}
pre code { overflow-wrap: normal; white-space: pre; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: var(--r-sm); }
:target { scroll-margin-top: 28px; }
.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.reading { width: 100%; max-width: calc(var(--reading) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-top: 72px; padding-bottom: var(--section-gap); }
.section-heading { max-width: 760px; margin-bottom: 36px; }
.section-heading h2 { margin: 10px 0 16px; }
.section-heading p, .muted { color: var(--text-muted); }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
.cluster { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.stack { display: grid; gap: 24px; }
.stack > *, .split > *, .card-grid > *, .footer-grid > *, .chapter-player > *, .win-body > * { min-width: 0; }
.split, .card-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; }
.panel, .card {
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--bg);
  color: var(--text);
  min-width: 0;
}
.panel-soft { border-color: var(--clear); background: var(--bg-panel); color: var(--text); }
.card h3 { margin: 0 0 12px; }
.card p:last-child { margin-bottom: 0; }
.eyebrow { margin: 0; font-family: var(--font-mono); font-size: 13px; color: var(--text-muted); }
.text-link { display: inline-block; margin-top: 22px; color: var(--accent); font-weight: 600; }
.text-link:hover { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 4px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 28px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--bg-panel-2);
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -.005em;
  text-align: center;
  transition: background .2s, transform .2s;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow-btn); }
.btn-primary:hover, .btn-primary.is-hover { background: var(--accent-dark); color: var(--on-accent); }
.btn-ghost { background: var(--bg-panel-2); color: var(--text); }
.btn-ghost:hover, .btn-ghost.is-hover { background: var(--border); color: var(--text); }
.btn:active, .btn.is-active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--bg-panel-2); color: var(--text-muted); box-shadow: none; cursor: not-allowed; }
.btn-small { min-height: 44px; padding: 10px 20px; font-size: 14px; }
.btn.is-focus { outline: 2px solid var(--accent); outline-offset: 3px; }
.masthead {
  position: relative;
  z-index: 51;
  width: 100%;
  max-width: min(100%,calc(var(--header-span) + var(--gutter) * 2));
  min-height: var(--header-h);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
#site-header { position: relative; z-index: 50; background: var(--bg); color: var(--text); }
.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--text);
}
.brand-mark { width: 30px; height: 30px; flex-shrink: 0; }
.topnav { min-width: 0; margin-left: auto; }
.dotline { display: flex; align-items: center; list-style: none; margin: 0; padding: 0; }
.dotline li { display: flex; align-items: center; }
.dotline li + li::before { content: "·"; margin: 0 14px; color: var(--line-strong); font-weight: 700; }
.dotline a { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; color: var(--text-muted); white-space: nowrap; transition: color .2s; }
.dotline a:hover, .dotline a[aria-current="page"] { color: var(--text); }
.dotline a[aria-current="page"] { font-weight: 600; }
.header-tools { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.language-control { position: relative; }
.lang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 8px 16px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--bg-panel);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}
.lang:hover { background: var(--bg-panel-2); color: var(--text); }
.lang-caret { font-size: 11px; color: var(--text-muted); }
.language-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 55;
  min-width: 180px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg);
  color: var(--text);
  box-shadow: var(--shadow-raise);
}
.language-menu a { display: flex; align-items: center; min-height: 44px; padding: 10px 14px; border-radius: var(--r-sm); }
.language-menu a:hover, .language-menu a[aria-current="true"] { background: var(--bg-panel); color: var(--text); }
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--bg-panel);
  color: var(--text);
}
.menu-toggle svg { width: 22px; height: 22px; }
.mobile-drawer { display: none; }
.menu-veil { position: fixed; inset: var(--header-h) 0 0; z-index: 50; border: 0; background: var(--overlay); color: var(--text); }
.skip-link { position: absolute; z-index: 100; left: 16px; top: -100px; padding: 12px 20px; border-radius: var(--r-pill); background: var(--text); color: var(--on-accent); }
.skip-link:focus { top: 12px; }
.site-footer { padding-top: 64px; padding-bottom: 100px; border-top: 1px solid var(--border); }
.footer-grid { display: grid; grid-template-columns: 1.25fr .8fr 1.4fr .75fr; gap: 40px; }
.footer-brand p { max-width: 300px; margin-top: 20px; color: var(--text-muted); font-size: 14px; }
.footer-title { margin: 0 0 16px; font-size: 14px; font-weight: 700; }
.footer-links { display: grid; gap: 10px; font-size: 14px; color: var(--text-muted); }
.footer-links a { display: inline-block; padding-block: 3px; overflow-wrap: anywhere; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 16px 28px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-muted); }
.footer-bottom p { margin: 0; }
.prose { min-width: 0; overflow-wrap: break-word; }
.prose h2 { margin: 64px 0 24px; }
.prose h3 { margin: 36px 0 16px; }
.prose p, .prose li { line-height: 1.9; }
.prose ul, .prose ol { padding-left: 1.5em; margin-block: 20px; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: 10px; }
.prose a:not(.btn) { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose :not(pre) > code { padding: 2px 5px; border-radius: var(--r-sm); background: var(--bg-panel); color: var(--text); font-size: .88em; }
.prose img { border-radius: var(--r-md); }
.prose > :first-child { margin-top: 0; }
.reveal { opacity: 1; transform: none; }
.reveal.is-waiting { opacity: 0; transform: translateY(18px); transition: opacity .65s var(--ease), transform .65s var(--ease); }
.reveal.shown { opacity: 1; transform: none; }
.decorated, [data-hero-visual] { overflow-x: clip; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 1100px) {
  .topnav { display: none; }
  .header-tools { margin-left: auto; }
  .menu-toggle { display: inline-flex; }
  .mobile-drawer:not([hidden]) {
    display: block;
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    z-index: 52;
    padding: 16px var(--gutter) 28px;
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--bg);
    color: var(--text);
    border-top: 1px solid var(--border);
    box-shadow: var(--shadow-raise);
  }
  .mobile-drawer a { display: flex; align-items: center; width: 100%; min-height: 48px; padding: 12px 16px; border-radius: var(--r-sm); }
  .mobile-drawer a:hover, .mobile-drawer a[aria-current="page"] { background: var(--bg-panel); color: var(--text); }
  .drawer-languages { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
  .footer-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 768px) {
  h1 { font-size: clamp(24px,6vw,30px); }
  h2 { font-size: 26px; }
  .split, .card-grid { grid-template-columns: minmax(0,1fr); }
  .btn { min-height: 48px; padding: 12px 22px; font-size: 15px; }
}
@media (max-width: 640px) {
  :root { --gutter: 20px; --section-gap: 72px; }
  .section { padding-top: 48px; }
  .masthead { gap: 12px; }
  .brand { font-size: 16px; gap: 8px; }
  .brand-mark { width: 28px; height: 28px; }
  .lang { padding: 8px 12px; font-size: 13px; }
  .header-tools { margin-left: auto; gap: 6px; }
  .panel, .card { padding: 24px; }
  .footer-grid { gap: 28px 20px; }
  .footer-brand { grid-column: 1 / -1; }
  .site-footer { padding-bottom: 90px; }
  .tilt, [data-tilt] { transform: none !important; }
  pre { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal.is-waiting { opacity: 1; transform: none; }
}