:root {
  --bg: #FDFCFA;
  --bg-panel: #F6F5F2;
  --bg-panel-2: #EEEDEA;
  --border: #E3E1DD;
  --accent: #3B6E78;
  --accent-dark: #24464E;
  --text: #1E2224;
  --text-muted: #6B6F71;
  --success: #3F8763;
  --warn: #C9843F;
  --error: #C2564B;
  --on-accent: #FDFCFA;
  --chrome-dot: #D6D4CF;
  --warn-ink: #875124;
  --success-ink: #30694C;
  --error-ink: #A13E35;
  --sky-top: #8DA6A9;
  --sky-mid: #B4C1BD;
  --sky-low: #D8D5CB;
  --cloud-peach: #E6AC88;
  --cloud-apricot: #EEC3A0;
  --cloud-cream: #F2DCC7;
  --ridge-far: #A6B9B5;
  --ridge-mid: #849D96;
  --ridge-near: #607A6F;
  --frame-edge: rgba(30,34,36,.07);
  --veil: rgba(30,34,36,.22);
  --clear: transparent;
  --shadow-window: 0 1px 2px rgba(30,34,36,.06),0 6px 14px -4px rgba(36,70,78,.12),0 34px 72px -22px rgba(36,70,78,.42);
  --shadow-card: 0 1px 2px rgba(30,34,36,.06),0 18px 40px -16px rgba(36,70,78,.34);
  --shadow-seg: 0 1px 2px rgba(30,34,36,.08),0 0 0 1px rgba(30,34,36,.04);
  --shadow-btn: 0 1px 2px rgba(36,70,78,.20),0 6px 16px -8px rgba(36,70,78,.45);
  --radius-frame: 12px;
  --radius-window: 10px;
  --radius-ctl: 8px;
  --radius-sm: 6px;
  --radius-format: 5px;
  --radius-pill: 999px;
  --radius-circle: 50%;
  --font-display: "Inter","Noto Sans SC","PingFang SC","Hiragino Sans GB","Microsoft YaHei",system-ui,sans-serif;
  --font-body: "Inter","Noto Sans SC","PingFang SC","Hiragino Sans GB","Microsoft YaHei",system-ui,-apple-system,"Segoe UI",sans-serif;
  --font-mono: "JetBrains Mono",ui-monospace,"SFMono-Regular",Menlo,Consolas,monospace;
  --size-xs: 11px;
  --size-code-label: 11.5px;
  --size-sm: 12px;
  --size-caption: 12.5px;
  --size-ui: 13px;
  --size-platform: 13.5px;
  --size-tab: 14px;
  --size-button: 14.5px;
  --size-body: 15px;
  --size-brand: 15.5px;
  --size-lede: 16.5px;
  --size-h3: 22px;
  --size-h2: 30px;
  --size-h1: clamp(34px,3.3vw,46px);
  --size-h1-mobile: clamp(24px,4.7vw,30px);
  --weight-normal: 400;
  --weight-medium: 500;
  --track-heading: -.02em;
  --shell: 1200px;
  --reading: 840px;
  --header-width: 1280px;
  --gutter: 32px;
  --header-height: 64px;
  --space-section: 96px;
  --motion-short: 150ms;
  --motion-reveal: 500ms;
  --z-header: 40;
  --z-veil: 41;
  --z-drawer: 42;
  --z-language: 43;
  --z-fab: 30;
}
*, *::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: var(--size-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
[hidden] { display: none !important; }
img, svg { max-width: 100%; vertical-align: middle; }
img { height: auto; }
svg, .tag__dot { flex-shrink: 0; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
a, button, summary { -webkit-tap-highlight-color: var(--clear); }
:where(a, button, summary, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: var(--weight-medium);
  letter-spacing: var(--track-heading);
  text-wrap: balance;
  overflow-wrap: break-word;
}
h1 { font-size: var(--size-h1); line-height: 1.17; }
h2 { font-size: var(--size-h2); line-height: 1.3; }
h3 { font-size: var(--size-h3); line-height: 1.4; }
p { margin: 0 0 1em; }
strong { font-weight: var(--weight-medium); }
code, pre { font-family: var(--font-mono); }
code { overflow-wrap: anywhere; }
pre {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  padding: 20px;
  background: var(--bg-panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-ctl);
  font-size: var(--size-ui);
  line-height: 1.75;
}
pre code { white-space: pre; overflow-wrap: normal; word-break: normal; }
:where(main, section, article, aside, div, nav, ul, li) { min-width: 0; }
:where(section, h2, h3, [role="tabpanel"]) { scroll-margin-top: 28px; }
.shell, .wrap {
  width: 100%;
  max-width: calc(var(--shell) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.reading { max-width: calc(var(--reading) + var(--gutter) * 2); }
.section { padding-top: var(--space-section); padding-bottom: 80px; }
.section__heading { margin: 0 0 22px; }
.section__intro { max-width: 680px; color: var(--text-muted); }
.surface { background: var(--bg-panel); color: var(--text); }
.surface-2 { background: var(--bg-panel-2); color: var(--text); }
.panel, .card {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-frame);
  background: var(--bg);
  color: var(--text);
}
.panel { background: var(--bg-panel); color: var(--text); }
.card h3, .panel h3 { margin: 0 0 12px; }
.card p:last-child, .panel p:last-child { margin-bottom: 0; }
.card-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; }
.card-grid > * { min-width: 0; }
.stack { display: grid; gap: 20px; }
.muted { color: var(--text-muted); }
.tone { color: var(--accent); }
.nowrap { white-space: nowrap; }
.text-link, .prose a:not(.btn) {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.text-link:hover, .prose a:not(.btn):hover { color: var(--accent-dark); }
.prose { min-width: 0; line-height: 1.85; }
.prose h2 { margin-top: 2.4em; margin-bottom: .7em; }
.prose h3 { margin-top: 1.8em; margin-bottom: .6em; }
.prose li + li { margin-top: .5em; }
.prose :not(pre) > code {
  padding: 2px 5px;
  background: var(--bg-panel);
  color: var(--text);
  border-radius: var(--radius-sm);
  font-size: .9em;
}
.prose > :first-child { margin-top: 0; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  font-family: var(--font-body);
  font-size: var(--size-button);
  font-weight: var(--weight-medium);
  line-height: 1.5;
  letter-spacing: .005em;
  text-align: center;
  border: 1px solid var(--clear);
  border-radius: var(--radius-ctl);
  transition: background-color var(--motion-short) ease,border-color var(--motion-short) ease,color var(--motion-short) ease;
}
.btn svg { width: 16px; height: 16px; flex: none; }
.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--primary:active { background: var(--accent-dark); color: var(--on-accent); box-shadow: none; }
.btn--ghost { background: var(--bg); color: var(--text); border-color: var(--border); }
.btn--ghost:hover, .btn--ghost.is-hover { background: var(--bg-panel); color: var(--text); border-color: var(--bg-panel-2); }
.btn--ghost:active { background: var(--bg-panel-2); color: var(--text); }
.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; }
.topbar { height: var(--header-height); position: relative; z-index: var(--z-header); }
.topbar__inner {
  height: 100%;
  width: 100%;
  max-width: min(100%,calc(var(--header-width) + var(--gutter) * 2));
  padding-inline: var(--gutter);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: var(--size-brand);
  font-weight: var(--weight-medium);
  letter-spacing: -.01em;
  color: var(--text);
  flex-shrink: 0;
}
.brand__mark { width: 28px; height: 28px; flex: none; }
.mainnav { margin-left: auto; min-width: 0; }
.mainnav ul {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.mainnav a { display: inline-flex; align-items: center; min-height: 44px; font-size: var(--size-button); color: var(--text-muted); white-space: nowrap; }
.mainnav a:hover { color: var(--text); }
.mainnav a[aria-current="page"] { color: var(--text); font-weight: var(--weight-medium); }
.topbar__tools { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.language { position: relative; }
.lang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  padding: 5px 12px;
  font-family: var(--font-body);
  font-size: var(--size-platform);
  line-height: 1.5;
  color: var(--text-muted);
  background: var(--clear);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  white-space: nowrap;
}
.lang:hover { color: var(--text); background: var(--bg-panel); }
.lang__short { display: none; }
.language__list {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 190px;
  padding: 8px;
  margin: 0;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-window);
  background: var(--bg);
  color: var(--text);
  box-shadow: var(--shadow-card);
  z-index: var(--z-language);
}
.language__list a { display: flex; align-items: center; min-height: 44px; padding: 9px 12px; border-radius: var(--radius-sm); }
.language__list a:hover, .language__list a[aria-current] { background: var(--bg-panel); color: var(--accent-dark); }
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 10px;
  background: var(--clear);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-ctl);
}
.menu-toggle svg { width: 20px; height: 20px; }
.menu-veil { position: fixed; inset: var(--header-height) 0 0; background: var(--veil); color: var(--text); z-index: var(--z-veil); border: 0; }
.mobile-drawer {
  position: absolute;
  inset: var(--header-height) 0 auto;
  padding: 16px var(--gutter) 24px;
  max-height: calc(100dvh - var(--header-height));
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--bg);
  color: var(--text);
  border-bottom: 1px solid var(--border);
  z-index: var(--z-drawer);
}
.mobile-drawer ul { list-style: none; padding: 0; margin: 0; }
.mobile-drawer a { display: flex; align-items: center; width: 100%; min-height: 44px; padding: 10px 12px; border-radius: var(--radius-sm); }
.mobile-drawer a:hover, .mobile-drawer a[aria-current] { background: var(--bg-panel); color: var(--accent-dark); }
.mobile-drawer__languages { border-top: 1px solid var(--border); margin-top: 16px; padding-top: 12px; }
.mobile-drawer__label { padding-inline: 12px; margin-bottom: 6px; color: var(--text-muted); font-size: var(--size-ui); }
.site-footer { margin-top: 48px; padding-top: 56px; padding-bottom: 28px; background: var(--bg-panel); color: var(--text); border-top: 1px solid var(--border); }
.footer-grid { display: grid; grid-template-columns: 1.2fr .8fr 1.3fr .7fr; gap: 40px; }
.footer-brand p { margin-top: 18px; max-width: 300px; color: var(--text-muted); font-size: var(--size-tab); }
.footer-title { margin: 0 0 14px; font-size: var(--size-tab); font-weight: var(--weight-medium); }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer-links a { color: var(--text-muted); font-size: var(--size-tab); }
.footer-links a:hover { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 4px; }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-top: 42px; padding-top: 20px; border-top: 1px solid var(--border); font-size: var(--size-ui); color: var(--text-muted); }
.footer-legal { display: flex; flex-wrap: wrap; gap: 20px; }
.reveal { opacity: 1; transform: none; }
html.reveal-ready .reveal:not(.shown) { opacity: 0; transform: translateY(12px); }
html.reveal-ready .reveal { transition: opacity var(--motion-reveal) ease,transform var(--motion-reveal) ease; }
.reveal.shown { opacity: 1; transform: none; }
.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:1279px) {
  .mainnav { display: none; }
  .topbar__tools { margin-left: auto; }
  .menu-toggle { display: inline-flex; }
}
@media (min-width:1280px) {
  .mobile-drawer, .menu-veil { display: none !important; }
}
@media (max-width:900px) {
  .footer-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width:768px) {
  h1 { font-size: var(--size-h1-mobile); }
}
@media (max-width:640px) {
  :root { --gutter: 16px; --space-section: 64px; --size-h2: 26px; }
  .topbar__inner { gap: 10px; }
  .brand { gap: 8px; font-size: var(--size-ui); }
  .brand__mark { width: 26px; height: 26px; }
  .lang { min-height: 36px; padding-inline: 10px; }
  .lang__full { display: none; }
  .lang__short { display: inline; }
  .topbar__tools { gap: 6px; margin-left: auto; }
  .card-grid, .footer-grid { grid-template-columns: minmax(0,1fr); }
  .card, .panel { padding: 22px; }
  .tilt, [data-tilt] { transform: none !important; }
  .footer-grid { gap: 30px; }
}
@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; }
}