:root {
  color-scheme: light;
  --bg: #FAF2E3;
  --bg-panel: #FFFBF4;
  --bg-panel-2: #F2E8D5;
  --border: #E3D6BF;
  --accent: #4B36E6;
  --accent-dark: #3424B5;
  --accent-2: #7A5CFF;
  --text: #2B2118;
  --text-muted: #6E6152;
  --success: #2F8A4E;
  --warn: #B7791F;
  --error: #C2412D;
  --on-accent: #FFFFFF;
  --on-ink: var(--bg-panel);
  --hero-top: #FDF8EF;
  --hero-bottom: #F3E9D7;
  --sand: #F1E3CC;
  --sand-mid: #E9DCD6;
  --lilac: #DCD6F2;
  --flag-red: #C8352B;
  --flag-white: #FFFDF8;
  --flag-blue: #2C3A78;
  --flag-black: #231B14;
  --flag-gold: #E2B33C;
  --accent-rgb: 75 54 230;
  --accent-2-rgb: 122 92 255;
  --apricot-rgb: 240 166 102;
  --panel-rgb: 255 251 244;
  --white-rgb: 255 255 255;
  --ink-rgb: 43 33 24;
  --flag-edge: rgb(var(--ink-rgb) / .14);
  --veil-fill: rgb(var(--ink-rgb) / .28);
  --paper-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='128' height='128'%3E%3Cfilter id='paper' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1.8 0 0 0 -.6'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23paper)'/%3E%3C/svg%3E");
  --hero-glow: radial-gradient(closest-side at 60% 38%, rgb(var(--apricot-rgb) / .17), transparent 74%), radial-gradient(closest-side at 30% 64%, rgb(var(--accent-2-rgb) / .09), transparent 72%);
  --board-fill: linear-gradient(128deg, var(--sand) 6%, var(--sand-mid) 48%, var(--lilac) 100%);
  --board-light: radial-gradient(closest-side at 30% 20%, rgb(var(--white-rgb) / .45), transparent 80%);
  --tape-fill: rgb(var(--panel-rgb) / .62);
  --tape-edge: rgb(var(--white-rgb) / .7);
  --shadow-card: 0 22px 44px -18px rgb(var(--accent-rgb) / .12), 0 2px 6px rgb(var(--accent-rgb) / .05);
  --shadow-board: 0 36px 80px -28px rgb(var(--accent-rgb) / .10), 0 10px 24px -14px rgb(var(--ink-rgb) / .06);
  --shadow-cta: 0 12px 26px -12px rgb(var(--accent-rgb) / .55);
  --shadow-ghost: 0 6px 16px -10px rgb(var(--ink-rgb) / .14);
  --shadow-float: 0 14px 30px -14px rgb(var(--ink-rgb) / .55);
  --shadow-flag: 0 2px 6px -2px rgb(var(--ink-rgb) / .25);
  --hi-edge: inset 0 1px 0 rgb(var(--white-rgb) / .95), inset 0 0 0 1px rgb(var(--white-rgb) / .55);
  --hi-board: inset 0 1px 0 rgb(var(--white-rgb) / .75), inset 0 0 0 1px rgb(var(--white-rgb) / .4);
  --hi-cta: inset 0 1px 0 rgb(var(--white-rgb) / .22);
  --shadow-word: inset 0 1px 0 rgb(var(--white-rgb) / .28), 0 14px 26px -14px rgb(var(--accent-rgb) / .6);
  --font-display: "Inter", "Noto Sans SC", "PingFang SC", "Hiragino Sans", "Apple SD Gothic Neo", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: var(--font-display);
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --fs-small: .875rem;
  --fs-caption: .8125rem;
  --fs-body: 1rem;
  --fs-nav: .90625rem;
  --fs-lede: 1.1875rem;
  --fs-display: clamp(3.25rem, 4.7vw, 4.25rem);
  --fs-section: clamp(1.625rem, 3vw, 2.5rem);
  --fs-subhead: 1.25rem;
  --fs-stat: 4rem;
  --fs-stat-word: 3.625rem;
  --fs-brand: 1.1875rem;
  --fw-text: 500;
  --fw-label: 600;
  --fw-bold: 700;
  --fw-mark: 800;
  --fw-display: 900;
  --tracking-title: -.03em;
  --tracking-cjk: -.02em;
  --r-flag: 4px;
  --r-chip: 6px;
  --r-icon: 7px;
  --r-pop-item: 8px;
  --r-btn: 10px;
  --r-card: 12px;
  --r-board: 20px;
  --r-pill: 999px;
  --r-round: 50%;
  --wrap: 1200px;
  --gutter: 24px;
  --head-height: 68px;
  --anchor-pad: calc(var(--head-height) + 16px);
  --section-space: clamp(40px, 7vw, 88px);
  --tap: 24px;
  --tap-drawer: 44px;
  --z-nav: 20;
  --z-float: 50;
}

*, *::before, *::after { box-sizing: border-box }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--anchor-pad); scroll-behavior: smooth }
html.nav-open { overflow: hidden }
body {
  margin: 0;
  position: relative;
  isolation: isolate;
  background: var(--bg);
  color: var(--text);
  font: var(--fs-body)/1.6 var(--font-body);
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
body::before, .grain {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--text);
  mask: var(--paper-grain) repeat;
  opacity: .1;
  pointer-events: none;
}
[hidden] { display: none !important }
p { margin: 0; text-wrap: pretty }
h1, h2, h3 { margin: 0; font-family: var(--font-display); line-height: 1.16; font-weight: var(--fw-display) }
h1, h2 { text-wrap: balance }
h3 { text-wrap: pretty }
h1 { font-size: var(--fs-display); line-height: 1.1; letter-spacing: var(--tracking-title) }
h1:lang(zh), h1:lang(ja), h1:lang(ko) { letter-spacing: var(--tracking-cjk) }
h2 { font-size: var(--fs-section) }
h3 { font-size: var(--fs-subhead) }
small, .muted { color: var(--text-muted) }
small { font-size: var(--fs-small) }
ul { margin: 0; padding: 0; list-style: none }
figure, blockquote { margin: 0 }
a { color: inherit; text-decoration: none }
button { color: inherit; font: inherit; cursor: pointer }
button:disabled { cursor: default }
summary { list-style: none; cursor: pointer }
summary::-webkit-details-marker { display: none }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px }
img { max-width: 100%; height: auto }
svg { flex-shrink: 0; vertical-align: middle }
pre, code, .num, .price { font-family: var(--font-mono) }
code { overflow-wrap: anywhere }
pre { max-width: 100%; overflow: auto; padding: 16px; background: var(--bg-panel-2); border-radius: var(--r-card) }
pre code { overflow-wrap: normal; white-space: pre }
.num, .price { font-variant-numeric: tabular-nums; font-weight: var(--fw-bold) }
.price, .no-break { white-space: nowrap }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0 }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden }
.stop-a { stop-color: var(--accent) }
.stop-b { stop-color: var(--accent-2) }

.wrap, .reading-wrap { width: 100%; margin-inline: auto; padding-inline: var(--gutter) }
.wrap { max-width: calc(var(--wrap) + 2 * var(--gutter)) }
.reading-wrap { max-width: calc(46em + 2 * var(--gutter)) }
.sec { padding-top: var(--section-space); padding-bottom: var(--section-space) }
.stack > * + * { margin-block-start: 16px }
.prose { min-width: 0 }
.prose p { max-width: 46em }
.prose p + p { margin-top: 1em }
.prose section + section { margin-top: 48px }
.prose h2, .prose h3 { margin-block-end: .65em }
.prose ul { list-style: disc; padding-inline-start: 1.5em }
.prose a:not(.btn) { text-decoration: underline; text-underline-offset: .18em }
.prose ol.steps { counter-reset: step; list-style: none; padding: 0 }
.steps > li { counter-increment: step; position: relative; padding-inline-start: 44px; margin-block: 16px }
.steps > li::before {
  content: counter(step);
  position: absolute;
  inset-inline-start: 0;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  background: var(--bg-panel-2);
  border-radius: var(--r-round);
  font-family: var(--font-mono);
}
.card, .panel { min-width: 0; padding: clamp(16px, 3vw, 32px); border: 1px solid var(--border); border-radius: var(--r-card) }
.card { background: var(--bg-panel); box-shadow: var(--shadow-card), var(--hi-edge) }
.panel { background: var(--bg-panel-2) }
.chip-word {
  display: inline-block;
  margin-left: .1em;
  padding: .02em .16em .06em;
  border-radius: var(--r-chip);
  background: var(--accent);
  color: var(--on-accent);
  letter-spacing: 0;
  line-height: 1.04;
  box-shadow: var(--shadow-word);
}
.btn, .btn-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--r-btn);
  font-weight: var(--fw-bold);
  white-space: nowrap;
  transition: background .15s ease;
}
.btn { gap: 8px; min-height: 48px; padding: 0 23px; font-size: var(--fs-body) }
.btn svg { width: 16px; height: 16px }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: var(--hi-cta), var(--shadow-cta) }
.btn-primary:hover, .btn-primary:active { background: var(--accent-dark) }
.btn-ghost, .btn-secondary { background: var(--bg-panel); border-color: var(--border); box-shadow: var(--hi-edge), var(--shadow-ghost); flex-shrink: 0 }
.btn-ghost:hover, .btn-secondary:hover { background: var(--bg-panel-2) }
.btn:disabled { background: var(--bg-panel-2); color: var(--text-muted); border-color: var(--border); box-shadow: none }
.badge, .fact-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 30px;
  max-width: 100%;
  padding: 3px 14px 3px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--bg-panel);
  box-shadow: var(--hi-edge);
  font-size: var(--fs-small);
  font-weight: var(--fw-label);
  overflow-wrap: anywhere;
}
.badge-dot { width: 8px; height: 8px; border-radius: var(--r-round); background: var(--accent); flex-shrink: 0 }
.reveal { transition: opacity .34s ease, transform .34s ease }
.reveal.pending { opacity: 0; transform: translateY(16px) }
#server-status { margin-block: 24px; padding: 12px; background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--r-card); overflow: hidden }
#server-status + * { margin-block-start: 24px }

.topbar { position: relative; z-index: var(--z-nav); background: var(--hero-top) }
.screen .topbar { background: transparent }
.topbar-in { position: relative; display: flex; align-items: center; flex-wrap: nowrap; gap: 24px; height: var(--head-height) }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: var(--tap); white-space: nowrap }
.brand-mark { width: 30px; height: 30px; flex-shrink: 0 }
.brand-word { font-family: var(--font-display); font-weight: var(--fw-mark); font-size: var(--fs-brand); letter-spacing: -.025em }
.nav-dots { flex: 1; min-width: 0 }
.nav-dots > ul { display: flex; align-items: center; justify-content: center; list-style: none; padding: 0; margin: 0 }
.nav-dots > ul > li { display: inline-flex; align-items: center; white-space: nowrap }
.nav-dots > ul > li + li::before { content: "·"; color: var(--text-muted); margin-inline: clamp(6px, .94vw, 12px); font-weight: var(--fw-bold) }
.nav-dots a, .nav-dots .more-toggle { display: inline-flex; align-items: center; min-height: var(--tap); font-size: var(--fs-nav); font-weight: var(--fw-text); color: var(--text-muted); white-space: nowrap }
.nav-dots a:hover, .nav-dots .more-toggle:hover { color: var(--text) }
.nav-dots a[aria-current="page"], .nav-dots .more.is-current .more-toggle, .drawer-nav a[aria-current="page"] { color: var(--text); font-weight: var(--fw-bold) }
.more, .lang { position: relative }
.more-toggle { padding: 0; border: 0; background: transparent }
.more-toggle, .lang summary, .lang-toggle { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap }
.chev { width: 12px; height: 12px }
.globe { width: 16px; height: 16px; color: var(--text-muted) }
.pop {
  position: absolute;
  inset-block-start: calc(100% + 12px);
  inset-inline-end: 0;
  min-width: 168px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--bg-panel);
  box-shadow: var(--shadow-card);
  z-index: 3;
}
.pop a { display: flex; align-items: center; min-height: 36px; padding: 6px 12px; border-radius: var(--r-pop-item); font-size: var(--fs-small); color: var(--text); white-space: nowrap }
.pop a:hover, .lang-toggle:hover, .lang summary:hover { background: var(--bg-panel-2) }
.topbar-end { display: inline-flex; align-items: center; gap: 14px; flex-shrink: 0 }
.lang-toggle, .lang summary { min-height: 38px; padding: 6px 8px; border: 0; border-radius: var(--r-pop-item); background: transparent; font-size: var(--fs-small); font-weight: var(--fw-text) }
.btn-login { height: 38px; padding: 0 18px; background: var(--bg-panel); border-color: var(--text); box-shadow: var(--hi-edge); font-size: var(--fs-nav) }
.btn-login:hover { background: var(--bg-panel-2) }
.menu-toggle, .preview-menu { display: none }
.menu-toggle, .preview-menu summary {
  min-width: var(--tap-drawer);
  min-height: var(--tap-drawer);
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--r-btn);
  background: var(--bg-panel);
}
.menu-toggle svg, .preview-menu svg { width: 20px; height: 20px }
.drawer-nav, .nav-veil { position: fixed; inset-block-start: var(--head-height) }
.drawer-nav {
  z-index: 2;
  inset-inline-end: 0;
  width: min(100%, 360px);
  height: calc(100dvh - var(--head-height));
  max-height: calc(100dvh - var(--head-height));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px var(--gutter) calc(16px + env(safe-area-inset-bottom, 0px));
  background: var(--bg-panel);
  border-block-start: 1px solid var(--border);
}
.drawer-nav a { display: flex; align-items: center; width: 100%; min-height: var(--tap-drawer); padding: 8px 12px; border-radius: var(--r-pop-item) }
.drawer-nav a:hover { background: var(--bg-panel-2) }
.drawer-nav ul + ul { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border) }
.nav-veil { z-index: 1; inset-inline: 0; inset-block-end: 0; background: var(--veil-fill) }
#site-header:has(.menu-toggle[aria-expanded="true"]), #site-header:has(.lang-toggle[aria-expanded="true"]) { z-index: calc(var(--z-float) + 1) }
.topbar-in > .topbar-end { position: relative; z-index: 4 }

.site-foot { padding-top: 48px; padding-bottom: 28px; background: var(--bg-panel-2); border-top: 1px solid var(--border) }
.foot-grid { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: 32px }
.foot-grid > * { min-width: 0 }
.foot-intro p { max-width: 25em; margin-top: 12px; color: var(--text-muted) }
.foot-title { margin-bottom: 8px; font: var(--fw-bold) var(--fs-body)/1.5 var(--font-display) }
.foot-grid li a, .foot-floor a { display: inline-flex; align-items: center; min-height: 28px; font-size: var(--fs-small); color: var(--text-muted) }
.foot-grid li a:hover, .foot-floor a:hover { text-decoration: underline; color: var(--text) }
.foot-floor { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 24px; padding-top: 16px; margin-top: 32px; border-top: 1px solid var(--border) }
.foot-floor ul { display: flex; flex-wrap: wrap; gap: 0 16px }

@media (max-width: 1080px) {
  .nav-dots { display: none }
  .topbar-end { margin-left: auto }
  .menu-toggle, .preview-menu { display: inline-flex }
  .preview-menu summary { display: inline-flex }
  .preview-menu .pop { width: min(300px, calc(100vw - 2 * var(--gutter))); inset-inline-end: 0 }
  .preview-menu .pop a { width: 100%; min-height: var(--tap-drawer) }
}
@media (max-width: 768px) {
  :root { --fs-display: clamp(1.75rem, 5.2vw, 2.5rem); --gutter: 20px }
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; --fs-brand: 1.0625rem; --fs-display: clamp(1.9rem, 8.6vw, 2.5rem) }
  .no-break { white-space: normal }
  .tilt, .tilt-panel { transform: none }
  .topbar-in { gap: 8px }
  .topbar-end { gap: 6px }
  .brand { gap: 6px }
  .brand-mark { width: 26px; height: 26px }
  .lang-text { display: none }
  .lang-toggle, .lang summary { padding-inline: 5px }
  .btn-login { padding-inline: 10px }
  .btn { padding-inline: 19px }
}
@media (max-width: 480px) {
  .drawer-nav { width: 100% }
  .preview-menu .pop { position: fixed; inset: var(--head-height) 0 auto; width: auto; max-height: calc(100dvh - var(--head-height)); overflow-y: auto; border-radius: 0; padding-inline: var(--gutter) }
  .topbar-in > .topbar-end { position: static }
  .foot-intro { grid-column: 1 / -1 }
}
@media (max-width: 350px) {
  :root { --fs-brand: .9375rem }
  .topbar-end { gap: 4px }
  .brand-mark { width: 24px; height: 24px }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto }
  *, *::before, *::after { transition: none !important; animation: none !important }
  .reveal, .reveal.pending { opacity: 1; transform: none }
}