:root {
  --bg: #F4F4F2;
  --panel: #FFFFFF;
  --panel-2: #EBEBE8;
  --border: #E2E2DE;
  --accent: #2C3440;
  --accent-2: #5A6676;
  --accent-dark: #171B22;
  --text: #1A1C1F;
  --muted: #6B6E73;
  --success: #1F9D5A;
  --warn: #C98A12;
  --error: #C8402F;
  --accent-rgb: 44 52 64;
  --steel-rgb: 90 102 118;
  --ink-rgb: 23 27 34;
  --white-rgb: 255 255 255;
  --transparent: transparent;
  --flag-red: #C8302C;
  --flag-blue: #2D3E8C;
  --flag-navy: #1E2A66;
  --flag-white: #FFFFFF;
  --flag-edge: rgb(44 52 64 / .16);
  --font-display: "Inter", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Inter", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --r-xs: 6px;
  --r-sm: 8px;
  --r-md: 10px;
  --r-card: 14px;
  --r-lg: 16px;
  --r-pill: 999px;
  --r-line: 1px;
  --gutter: 24px;
  --page-width: 1280px;
  --reading-width: 800px;
  --header-height: 72px;
  --anchor-offset: 88px;
  --toc-offset: 152px;
  --space-section: 72px;
  --display-size: clamp(52px, 4.6vw, 66px);
  --heading-size: clamp(30px, 3.3vw, 44px);
  --body-size: 16px;
  --body-leading: 1.75;
  --weight-normal: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --weight-display: 800;
  --tracking-display: -.02em;
  --tracking-latin: -.035em;
  --shadow-hero: inset 0 1px 0 rgb(var(--white-rgb)), 0 1px 2px rgb(var(--accent-rgb) / .05), 0 18px 40px -24px rgb(var(--accent-rgb) / .10), 0 48px 96px -40px rgb(var(--accent-rgb) / .18);
  --shadow-card: inset 0 1px 0 rgb(var(--white-rgb)), inset 0 0 0 1px rgb(var(--white-rgb) / .75), 0 2px 0 rgb(var(--accent-rgb) / .03), 0 10px 22px -14px rgb(var(--accent-rgb) / .16), 0 30px 64px -26px rgb(var(--accent-rgb) / .24);
  --shadow-float: inset 0 1px 0 rgb(var(--white-rgb)), 0 6px 16px -8px rgb(var(--accent-rgb) / .22), 0 16px 30px -18px rgb(var(--accent-rgb) / .20);
  --shadow-soft: inset 0 1px 0 rgb(var(--white-rgb)), 0 16px 40px -24px rgb(var(--accent-rgb) / .14);
  --shadow-selected: inset 0 0 0 1px var(--border), 0 1px 2px rgb(var(--accent-rgb) / .08);
  --button-surface: linear-gradient(180deg, var(--accent-2) -140%, var(--accent) 62%);
  --duration-fast: .18s;
  --duration-reveal: .35s;
  --ease-out: cubic-bezier(.2, .65, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--anchor-offset); }
html, body { margin: 0; overflow-x: clip; }
body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: var(--body-size);
  line-height: var(--body-leading);
  color: var(--text);
  background-color: var(--bg);
  background-image: linear-gradient(180deg, rgb(var(--white-rgb) / .55) 0, rgb(var(--white-rgb) / 0) 240px), linear-gradient(180deg, rgb(var(--accent-rgb) / 0) 42%, rgb(var(--accent-rgb) / .05) 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
[hidden] { display: none !important; }
a { color: inherit; text-underline-offset: .2em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { cursor: not-allowed; }
button, a, summary { -webkit-tap-highlight-color: var(--transparent); }
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
img { display: block; max-width: 100%; height: auto; }
svg { display: block; flex-shrink: 0; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; margin: 0; overflow-wrap: break-word; }
h1 { font-size: var(--display-size); font-weight: var(--weight-display); letter-spacing: var(--tracking-display); line-height: 1.1; }
h2 { font-size: var(--heading-size); font-weight: var(--weight-display); letter-spacing: var(--tracking-display); }
h3 { font-size: 22px; font-weight: var(--weight-bold); }
:lang(en) h1 { letter-spacing: var(--tracking-latin); }
code { font-family: var(--font-mono); font-size: .9em; overflow-wrap: anywhere; }
pre { max-width: 100%; min-width: 0; overflow-x: auto; padding: 20px; background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--r-md); }
pre code { white-space: pre; overflow-wrap: normal; }
table { border-collapse: collapse; }
input, select, textarea { max-width: 100%; background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 10px 12px; }
input::placeholder, textarea::placeholder { color: var(--muted); }
.no-break { white-space: nowrap; }
.wrap { width: 100%; max-width: var(--page-width); margin-inline: auto; padding-inline: var(--gutter); }
.reading-wrap { width: 100%; max-width: var(--reading-width); margin-inline: auto; padding-inline: var(--gutter); }
.sec { padding-top: var(--space-section); padding-bottom: var(--space-section); }
.wrap > *, .reading-wrap > *, :where([class*="grid"]) > * { min-width: 0; }
.section-head { max-width: 760px; margin-bottom: 32px; }
.section-head h2 { margin-top: 18px; }
.section-head p { margin-top: 16px; color: var(--muted); }
.muted { color: var(--muted); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.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; pointer-events: none; }
.icon { width: 20px; height: 20px; flex-shrink: 0; }
.rig { position: relative; max-width: var(--page-width); margin: 0 auto; min-height: 100vh; }
.rig::before, .rig::after { content: ""; position: absolute; top: 0; bottom: 0; width: 1px; background: var(--border); pointer-events: none; z-index: 0; }
.rig::before { left: 0; }
.rig::after { right: 0; }
.tick { position: absolute; width: 15px; height: 15px; pointer-events: none; z-index: 2; }
.tick::before, .tick::after { content: ""; position: absolute; background: var(--muted); opacity: .5; }
.tick::before { left: 0; right: 0; top: 7px; height: 1px; }
.tick::after { top: 0; bottom: 0; left: 7px; width: 1px; }
.tick--tl { top: -8px; left: -8px; }
.tick--tr { top: -8px; right: -8px; }
.tick--bl { bottom: -8px; left: -8px; }
.tick--br { bottom: -8px; right: -8px; }
.seam { position: relative; height: 1px; margin-top: 28px; z-index: 1; }
.seam::before { content: ""; position: absolute; top: 0; left: 50%; width: 100vw; height: 1px; transform: translateX(-50%); background: var(--border); }
.seam .tick { top: -7px; }
.tick--l { left: -7px; }
.tick--r { right: -7px; }
.card, .panel { position: relative; background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-card); box-shadow: var(--shadow-soft); padding: 28px; min-width: 0; }
.panel { background: linear-gradient(180deg, var(--panel), rgb(var(--steel-rgb) / .04)); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 24px; border-radius: var(--r-pill); text-decoration: none;
  font-weight: var(--weight-semibold); white-space: nowrap; flex-shrink: 0;
  transition: transform var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
}
.btn-primary { height: 52px; font-size: 16px; color: var(--panel); background: var(--button-surface); box-shadow: inset 0 1px 0 rgb(var(--white-rgb) / .16), inset 0 -1px 0 rgb(var(--ink-rgb) / .6), 0 14px 26px -14px rgb(var(--accent-rgb) / .6); }
.btn-primary svg { width: 18px; height: 18px; }
.btn-secondary { height: 48px; font-size: 15px; color: var(--text); background: var(--bg); border: 1px solid var(--border); box-shadow: inset 0 1px 0 rgb(var(--white-rgb)); }
.btn-secondary .chev { color: var(--muted); }
.btn:hover:not(:disabled):not([aria-disabled="true"]) { transform: translateY(-1px); }
.btn:active:not(:disabled):not([aria-disabled="true"]), .btn.is-pressed { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; pointer-events: none; }
.btn.is-focused { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.topbar {
  position: relative; z-index: 30; display: grid; grid-template-columns: auto 1fr auto;
  align-items: center; gap: 24px; height: var(--header-height); padding: 0 40px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); white-space: nowrap; }
.brand-mark { width: 28px; height: 28px; flex-shrink: 0; }
.brand-word { font-family: var(--font-display); font-weight: var(--weight-display); font-size: 19px; letter-spacing: var(--tracking-latin); }
.brand-zh { font-weight: var(--weight-medium); color: var(--muted); font-size: 14px; }
.nav { justify-self: stretch; min-width: 0; display: flex; justify-content: center; }
.nav-list { display: flex; align-items: center; list-style: none; margin: 0; padding: 0; gap: 2px; }
.nav-list > li { flex: none; }
.nav-more { position: relative; }
.nav-more-menu { position: absolute; top: calc(100% + 10px); right: 0; min-width: 190px; padding: 6px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-float); z-index: 40; }
.nav-more-menu .nav-link { display: flex; min-height: 44px; height: auto; padding: 10px 12px; }
.nav-link { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px; border-radius: var(--r-pill); font-size: 14px; text-decoration: none; color: var(--text); white-space: nowrap; }
.nav-link svg { width: 15px; height: 15px; color: var(--muted); flex: none; }
.nav-link:hover { background: rgb(var(--accent-rgb) / .05); }
.nav-link[aria-current="page"] { background: var(--panel); box-shadow: var(--shadow-selected); font-weight: var(--weight-semibold); }
.nav-link[aria-current="page"] svg { color: var(--accent); }
.topbar-end { display: flex; align-items: center; gap: 14px; flex-shrink: 0; flex-wrap: nowrap; position: relative; z-index: 32; }
.language { position: relative; }
.lang { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; min-width: 24px; width: auto; padding: 0 6px; font-size: 14px; color: var(--text); white-space: nowrap; list-style: none; cursor: pointer; }
.lang::-webkit-details-marker { display: none; }
.lang span { white-space: nowrap; }
.lang svg { width: 15px; height: 15px; color: var(--muted); }
.lang-caret { font-size: 11px; color: var(--muted); }
.lang-menu { position: absolute; top: calc(100% + 10px); right: 0; width: max-content; min-width: 170px; padding: 6px; z-index: 45; background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-float); }
.lang-menu a { display: flex; align-items: center; min-height: 44px; padding: 8px 12px; text-decoration: none; border-radius: var(--r-xs); }
.lang-menu a:hover, .lang-menu a[aria-current="true"] { background: var(--panel-2); }
details.language:not([open]) > .lang-menu { display: none; }
.login { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 14px 0 18px; border-radius: var(--r-pill); text-decoration: none; font-size: 14px; font-weight: var(--weight-semibold); color: var(--panel); background: linear-gradient(180deg, var(--accent-2) -160%, var(--accent) 60%); box-shadow: inset 0 1px 0 rgb(var(--white-rgb) / .14), 0 6px 14px -8px rgb(var(--accent-rgb) / .55); white-space: nowrap; }
.login svg { width: 14px; height: 14px; }
.menu-toggle { display: none; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; color: var(--accent); border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--panel); }
.menu-toggle svg { width: 20px; height: 20px; }
.menu-toggle[aria-expanded="true"] { background: var(--panel-2); }
.mobile-drawer { display: none; position: fixed; top: var(--header-height); left: 0; right: 0; height: calc(100dvh - var(--header-height)); max-height: calc(100dvh - var(--header-height)); overflow-y: auto; overscroll-behavior: contain; padding: 16px var(--gutter) 32px; background: var(--panel); z-index: 29; }
.mobile-drawer a { display: flex; align-items: center; width: 100%; min-height: 44px; padding: 12px 14px; gap: 10px; text-decoration: none; border-radius: var(--r-sm); }
.mobile-drawer a svg { width: 18px; height: 18px; color: var(--muted); }
.mobile-drawer a:hover, .mobile-drawer a[aria-current] { background: var(--panel-2); }
.drawer-languages { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.nav-veil { display: none; position: fixed; inset: var(--header-height) 0 0; z-index: 28; background: rgb(var(--ink-rgb) / .2); }
html.nav-open { overflow: hidden; }
.site-footer { position: relative; border-top: 1px solid var(--border); background: linear-gradient(180deg, rgb(var(--white-rgb) / .4), var(--bg)); }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 40px; padding-top: 48px; padding-bottom: 40px; }
.footer-brand p { margin-top: 16px; max-width: 340px; font-size: 14px; color: var(--muted); }
.footer-title { font-size: 14px; font-weight: var(--weight-semibold); margin: 0 0 12px; }
.footer-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; }
.footer-links a, .footer-languages a, .footer-legal a { display: inline-flex; align-items: center; min-height: 28px; font-size: 13px; text-decoration: none; }
.footer-links a:hover, .footer-legal a:hover, .footer-languages a:hover { text-decoration: underline; }
.footer-languages { display: flex; gap: 12px 20px; flex-wrap: wrap; padding-bottom: 24px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 20px; padding-bottom: 24px; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; }
.footer-legal { display: flex; gap: 16px; flex-wrap: wrap; }
.prose { min-width: 0; overflow-wrap: break-word; }
.prose p, .prose ul, .prose ol, .prose pre, .prose blockquote, .prose .table-scroll { margin-block: 20px; }
.prose ul { list-style: disc; padding-left: 24px; }
.prose ol { padding-left: 24px; }
.prose li { margin-block: 8px; }
.prose h2 { margin-top: 48px; margin-bottom: 20px; font-size: clamp(26px, 3vw, 36px); }
.prose h3 { margin-top: 32px; margin-bottom: 16px; }
.prose section:first-of-type h2 { margin-top: 28px; }
.reveal { transition: opacity var(--duration-reveal) var(--ease-out), transform var(--duration-reveal) var(--ease-out); }
.reveal.pending { opacity: 0; transform: translateY(16px); }
.reveal.shown { opacity: 1; transform: none; }
.decor-section { position: relative; overflow-x: clip; }
.decor-section > [aria-hidden="true"] { max-width: 100%; pointer-events: none; }
.tilt { transform: rotate(-.45deg); }
#server-status { display: block; position: relative; min-width: 0; max-width: 100%; min-height: 80px; overflow: hidden; margin-block: 24px; }
#server-status + * { margin-top: 24px; }

@media (max-width: 1280px) {
  .seam .tick--l { left: 0; }
  .seam .tick--r { right: 0; }
}
@media (max-width: 1240px) {
  .nav-link { padding: 0 8px; font-size: 13.5px; }
  .topbar { padding: 0 28px; gap: 16px; }
}
@media (max-width: 1120px) {
  .nav { display: none; }
  .topbar { grid-template-columns: auto 1fr; }
  .topbar-end { justify-self: end; margin-left: auto; gap: 10px; }
  .menu-toggle { display: inline-flex; }
  .mobile-drawer:not([hidden]), .nav-veil:not([hidden]) { display: block; }
}
@media (max-width: 768px) {
  :root { --space-section: 48px; --display-size: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; --display-size: 38px; }
  .no-break { white-space: normal; }
  .topbar { padding: 0 18px; gap: 8px; }
  .topbar-end { gap: 6px; margin-left: auto; }
  .lang { padding-inline: 3px; font-size: 11px; gap: 3px; }
  .lang svg { display: none; }
  .brand { gap: 6px; }
  .brand-word { font-size: 17px; }
  .brand-mark { width: 24px; height: 24px; }
  .brand-zh { font-size: 12px; }
  .login { padding-inline: 12px; font-size: 13px; }
  .login svg { display: none; }
  .menu-toggle { min-width: 44px; }
  .card, .panel { padding: 22px; }
  .tilt, [data-tilt] { transform: none; }
  .decor-section > [aria-hidden="true"] { max-width: 100%; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-brand { grid-column: auto; }
}
@media (max-width: 359px) {
  .topbar { padding-inline: 16px; }
  .brand-word { font-size: 15px; }
  .brand-mark { width: 22px; height: 22px; }
  .topbar-end { gap: 3px; }
  .lang { font-size: 10px; }
  .login { padding-inline: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .reveal.pending { opacity: 1; transform: none; }
}