:root {
  --bg: #ffffff;
  --bg-panel: #f7f7f7;
  --bg-panel-2: #13150f;
  --border: #e5e5e5;
  --accent: #9aaf17;
  --accent-hi: #a9bf1f;
  --accent-dark: #5d6b0a;
  --text: #111311;
  --text-muted: #5f625c;
  --success: #2f8f4e;
  --warn: #c98a0b;
  --error: #c2372b;
  --ink-card: #1c1f17;
  --on-dark: #ffffff;
  --on-dark-muted: #a9ada3;
  --on-dark-dim: #71756b;
  --on-dark-readable: #969c8d;
  --accent-rgb: 154 175 23;
  --white-rgb: 255 255 255;
  --ink-rgb: 17 19 17;
  --shade-rgb: 6 7 4;
  --transparent: transparent;
  --line-on-dark: rgb(var(--white-rgb) / .11);
  --line-on-dark-strong: rgb(var(--white-rgb) / .26);
  --line-on-dark-hover: rgb(var(--white-rgb) / .5);
  --dark-wash: rgb(var(--white-rgb) / .03);
  --dark-wash-hover: rgb(var(--white-rgb) / .04);
  --veil: rgb(var(--ink-rgb) / .4);
  --dot-grid: rgb(var(--white-rgb) / .085);
  --focus-ring: 2px solid var(--accent-dark);
  --r-card: 8px;
  --r-block: 12px;
  --r-control: 6px;
  --r-small: 4px;
  --r-pill: 999px;
  --r-circle: 50%;
  --r-shot: 10px;
  --font-display: "Inter", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans", "Apple SD Gothic Neo", "Microsoft YaHei", sans-serif;
  --font-body: "Inter", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans", "Apple SD Gothic Neo", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --weight-body: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-button: 650;
  --weight-bold: 700;
  --weight-display: 800;
  --size-body: 15px;
  --size-small: 13px;
  --size-caption: 12px;
  --size-h1: clamp(34px, 3.3vw, 48px);
  --size-h2: 24px;
  --size-h3: 19px;
  --line-body: 1.6;
  --line-prose: 1.85;
  --line-title: 1.15;
  --tracking-title: -.02em;
  --gutter: 24px;
  --content-width: 1280px;
  --reading-width: 800px;
  --header-width: 1280px;
  --header-height: 64px;
  --space-section: 64px;
  --space-card: 24px;
  --shadow-soft: 0 1px 2px rgb(var(--ink-rgb) / .04), 0 4px 14px rgb(var(--ink-rgb) / .04);
  --shadow-lift: 0 2px 4px rgb(var(--ink-rgb) / .05), 0 12px 28px -8px rgb(var(--ink-rgb) / .12);
  --shadow-cfg: inset 0 1px 0 rgb(var(--white-rgb) / .05), 0 2px 4px rgb(var(--shade-rgb) / .35), 0 14px 28px -10px rgb(var(--shade-rgb) / .55), 0 38px 76px -24px rgb(var(--shade-rgb) / .7);
  --shadow-primary: 0 0 0 1px rgb(var(--accent-rgb) / .35), 0 10px 26px -10px rgb(var(--accent-rgb) / .6);
  --shadow-popover: 0 12px 32px rgb(var(--ink-rgb) / .12);
  --ease-ui: cubic-bezier(.2, .65, .3, 1);
  --duration-ui: .2s;
  --duration-reveal: .55s;
  --layer-header: 100;
  --layer-fab: 40;
  --layer-toc: 10;
}

*, *::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: var(--size-body);
  font-weight: var(--weight-body);
  line-height: var(--line-body);
  -webkit-font-smoothing: antialiased;
}
body, main, section, article, aside, nav, div, figure { min-width: 0; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button, a { -webkit-tap-highlight-color: var(--transparent); }
button { color: var(--text); }
img, svg { max-width: 100%; }
img { display: block; }
svg { flex-shrink: 0; }
figure { margin: 0; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text);
  line-height: var(--line-title);
  text-wrap: balance;
  overflow-wrap: break-word;
}
h1 {
  font-size: var(--size-h1);
  font-weight: var(--weight-display);
  letter-spacing: var(--tracking-title);
}
h2 {
  font-size: var(--size-h2);
  font-weight: var(--weight-display);
  letter-spacing: var(--tracking-title);
}
h3 { font-size: var(--size-h3); font-weight: var(--weight-bold); }
p { margin-top: 0; }
strong { font-weight: var(--weight-semibold); }
code, pre, kbd { font-family: var(--font-mono); }
code { overflow-wrap: anywhere; }
pre {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--bg-panel);
  color: var(--text);
  font-size: var(--size-small);
  line-height: 1.8;
  tab-size: 2;
}
pre code { white-space: pre; overflow-wrap: normal; word-break: normal; }
:focus-visible { outline: var(--focus-ring); outline-offset: 3px; border-radius: var(--r-control); }
::selection { background: var(--accent); color: var(--bg-panel-2); }

.wrap {
  width: 100%;
  max-width: calc(var(--content-width) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.reading {
  width: 100%;
  max-width: calc(var(--reading-width) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-top: var(--space-section); padding-bottom: var(--space-section); }
.section-panel { background: var(--bg-panel); color: var(--text); }
.section + .section { border-top: 1px solid var(--border); }
.section-intro { max-width: 680px; margin-inline: auto; text-align: center; color: var(--text-muted); }
.sec-head { display: flex; align-items: center; gap: 24px; }
.sec-head::before, .sec-head::after {
  content: "";
  flex: 1;
  min-width: 16px;
  height: 1px;
  background: var(--border);
}
.sec-title { margin: 0; font-size: var(--size-h2); font-weight: var(--weight-display); }
.sec-sub { margin: 10px 0 28px; text-align: center; color: var(--text-muted); }
.keep { white-space: nowrap; }
.muted { color: var(--text-muted); }
.mono { font-family: var(--font-mono); }
.text-link { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 4px; }
.text-link:hover { color: var(--text); }
.stack > * + * { margin-top: 20px; }
.grid-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.grid-two > *, .card-grid > * { min-width: 0; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.card, .panel {
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--bg);
  color: var(--text);
  box-shadow: var(--shadow-soft);
}
.card { padding: var(--space-card); }
.panel-head { padding: 24px; border-bottom: 1px solid var(--border); background: var(--bg); color: var(--text); border-radius: var(--r-card) var(--r-card) 0 0; }
.panel-body { padding: 24px; background: var(--bg-panel); color: var(--text); border-radius: 0 0 var(--r-card) var(--r-card); }
.card h3, .panel-head h3 { margin-top: 0; }
.card p:last-child, .panel-body p:last-child { margin-bottom: 0; }
.prose { line-height: var(--line-prose); }
.prose h2 { margin-top: 52px; margin-bottom: 20px; scroll-margin-top: 96px; }
.prose h3 { margin-top: 32px; margin-bottom: 14px; scroll-margin-top: 96px; }
.prose p, .prose ul, .prose ol { margin-bottom: 20px; }
.prose li + li { margin-top: 8px; }
.prose a:not(.btn):not(.app-store-button) { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; }
.prose :not(pre) > code { padding: 2px 5px; border-radius: var(--r-small); background: var(--bg-panel); color: var(--text); font-size: .9em; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.skip-link {
  position: absolute;
  top: 8px;
  left: var(--gutter);
  z-index: 110;
  padding: 10px 16px;
  transform: translateY(-160%);
  border-radius: var(--r-control);
  background: var(--bg-panel-2);
  color: var(--on-dark);
}
.skip-link:focus { 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; }

.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 26px; }
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 22px;
  max-width: 100%;
  border: 1px solid var(--transparent);
  border-radius: var(--r-card);
  background: var(--bg);
  color: var(--text);
  font-size: var(--size-body);
  font-weight: var(--weight-button);
  line-height: 1.4;
  text-align: center;
  transition: transform var(--duration-ui) var(--ease-ui), background-color var(--duration-ui) var(--ease-ui), border-color var(--duration-ui) var(--ease-ui);
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--accent); color: var(--bg-panel-2); box-shadow: var(--shadow-primary); }
.btn-primary:hover, .btn-primary.is-hover { background: var(--accent-hi); color: var(--bg-panel-2); transform: translateY(-1px); }
.btn-secondary { border-color: var(--border); background: var(--bg); color: var(--text); }
.btn-secondary:hover { border-color: var(--text-muted); background: var(--bg-panel); color: var(--text); }
.btn-ghost { background: var(--transparent); color: var(--on-dark); border-color: var(--line-on-dark-strong); }
.btn-ghost:hover { border-color: var(--line-on-dark-hover); background: var(--dark-wash-hover); color: var(--on-dark); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { cursor: not-allowed; background: var(--bg-panel); color: var(--text-muted); border-color: var(--border); box-shadow: none; transform: none; }
.btn.is-focus { outline: var(--focus-ring); outline-offset: 3px; }

#site-header, .preview-header { position: relative; z-index: var(--layer-header); background: var(--bg); color: var(--text); }
.header-shell {
  width: 100%;
  max-width: min(100%, calc(var(--header-width) + var(--gutter) * 2));
  margin-inline: auto;
  padding-inline: var(--gutter);
  min-height: var(--header-height);
  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: 16px;
  font-weight: var(--weight-bold);
  letter-spacing: -.01em;
  color: var(--text);
}
.brand-logo { width: 30px; height: 30px; flex-shrink: 0; border-radius: var(--r-circle); }
.brand-placeholder { width: 30px; height: 30px; flex-shrink: 0; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--bg-panel); color: var(--text-muted); }
.desktop-nav { min-width: 0; margin-left: auto; }
.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-list li { min-width: 0; }
.nav-list a {
  display: block;
  padding: 8px 12px;
  color: var(--text-muted);
  font-size: 14.5px;
  font-weight: var(--weight-medium);
  white-space: nowrap;
}
.nav-list a:hover { color: var(--text); }
.nav-list a[aria-current="page"] { color: var(--text); font-weight: var(--weight-bold); }
.header-tools { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.language-picker { position: relative; }
.language-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  padding: 6px 0 6px 18px;
  border: 0;
  border-left: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  white-space: nowrap;
}
.language-arrow { color: var(--text-muted); }
.language-short { display: none; }
.language-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 190px;
  padding: 6px;
  margin: 0;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--bg);
  color: var(--text);
  box-shadow: var(--shadow-popover);
  z-index: 5;
}
.language-menu a { display: flex; align-items: center; min-height: 44px; padding: 10px 12px; border-radius: var(--r-small); }
.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;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-control);
  background: var(--bg);
  color: var(--text);
}
.menu-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.mobile-drawer {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  z-index: 3;
  max-height: calc(100dvh - var(--header-height));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px var(--gutter) 24px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}
.mobile-drawer ul { list-style: none; padding: 0; margin: 0; }
.mobile-drawer a { display: flex; width: 100%; align-items: center; min-height: 48px; padding: 12px 10px; border-radius: var(--r-small); }
.mobile-drawer a:hover, .mobile-drawer a[aria-current] { background: var(--bg-panel); color: var(--text); font-weight: var(--weight-semibold); }
.drawer-language-title { margin: 16px 10px 4px; padding-top: 16px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: var(--size-small); }
.menu-veil { position: fixed; inset: var(--header-height) 0 0; z-index: 1; border: 0; background: var(--veil); color: var(--text); cursor: default; }
.header-shell > .brand, .header-tools, .desktop-nav { position: relative; z-index: 4; }

.site-footer { padding-top: 48px; padding-bottom: 24px; border-top: 1px solid var(--border); background: var(--bg-panel); color: var(--text); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr 1fr; gap: 32px; }
.footer-grid > * { min-width: 0; }
.footer-brand p { max-width: 330px; margin-top: 16px; font-size: var(--size-small); color: var(--text-muted); }
.footer-heading { margin: 0 0 14px; font-size: 14px; font-weight: var(--weight-bold); }
.footer-list { list-style: none; padding: 0; margin: 0; }
.footer-list a { display: inline-block; padding-top: 5px; padding-bottom: 5px; font-size: var(--size-small); color: var(--text-muted); overflow-wrap: anywhere; }
.footer-list a:hover { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: var(--size-caption); }
.footer-bottom p { margin: 0; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 16px; margin-left: auto; }
.footer-legal a { padding-top: 4px; padding-bottom: 4px; }

.reveal { opacity: 1; transform: none; }
.reveal-ready .reveal:not(.shown) { opacity: 0; transform: translateY(16px); }
.reveal-ready .reveal { transition: opacity var(--duration-reveal) var(--ease-ui), transform var(--duration-reveal) var(--ease-ui); }
.reveal-ready .reveal.shown { opacity: 1; transform: none; }
.decorative-region, .hero { overflow-x: clip; }

@media (max-width: 1279px) {
  .desktop-nav { display: none; }
  .header-tools { margin-left: auto; }
  .menu-toggle { display: inline-flex; }
}
@media (max-width: 768px) {
  :root { --size-h1: 30px; --space-section: 48px; }
  .grid-two, .card-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; --size-h1: 28px; --size-h2: 21px; --space-card: 20px; }
  .header-shell { gap: 8px; }
  .header-tools { margin-left: auto; gap: 4px; }
  .brand { font-size: 13px; gap: 8px; }
  .language-full { display: none; }
  .language-short { display: inline; }
  .language-toggle { min-width: 44px; padding-left: 8px; justify-content: center; }
  .tilt, .decorative-tilt { transform: none; }
  .sec-head { gap: 12px; }
  .sec-title { text-align: center; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .footer-legal { margin-left: 0; }
  .panel-head, .panel-body { padding: 20px; }
}
@media (max-width: 380px) {
  .brand { font-size: 12px; }
  .header-shell > .brand span:not(.brand-placeholder) { max-width: 145px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal-ready .reveal:not(.shown) { opacity: 1; transform: none; }
}