:root {
  --bg: #ffffff;
  --bg-panel: #f6f6f7;
  --bg-panel-2: #2e3036;
  --border: #e6e6e9;
  --border-strong: #d6d6db;
  --accent: #1d5fe6;
  --accent-dark: #1546b5;
  --text: #26272b;
  --text-muted: #6b6d75;
  --text-faint: #a8aab1;
  --success: #3b78e7;
  --warn: #e9b53f;
  --error: #e0566b;
  --tag-purple: #9b7be8;
  --on-accent: #ffffff;
  --tag-blue-bg: #e3ebfd;
  --tag-blue-ink: #1546b5;
  --tag-blue-line: #a9c1f5;
  --tag-pink-bg: #fce4e8;
  --tag-pink-ink: #9e2a3d;
  --tag-pink-line: #efa7b2;
  --tag-yellow-bg: #fcf1d6;
  --tag-yellow-ink: #7a560c;
  --tag-yellow-line: #eccd85;
  --tag-purple-bg: #eee8fc;
  --tag-purple-ink: #5a3fae;
  --tag-purple-line: #c8b8f3;
  --device: #1c1d21;
  --device-edge: #3a3c42;
  --device-cam: #2b2d33;
  --device-cam-ring: #45474e;
  --screen: #fafafa;
  --gutter-bg: #f1f1f3;
  --window-dot: #dcdce0;
  --veil: rgba(28, 29, 33, 0.18);
  --clear: transparent;
  --shadow-device: 0 1px 2px rgba(22, 23, 27, 0.10), 0 30px 70px rgba(22, 23, 27, 0.16);
  --ring-accent: 0 0 0 3px var(--tag-blue-bg);
  --focus-ring: 0 0 0 3px var(--tag-blue-line);
  --font-display: "Iowan Old Style", "Charter", "Palatino Linotype", "Palatino", "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", "STSong", serif;
  --font-body: "Inter", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --r-xs: 6px;
  --r-mark: 7px;
  --r-btn: 10px;
  --r-shot: 10px;
  --r-md: 16px;
  --r-lg: 32px;
  --r-device: 36px;
  --r-screen: 14px;
  --r-pill: 999px;
  --r-dot: 2px;
  --gutter: 24px;
  --page-max: 1120px;
  --reading-max: 760px;
  --header-max: 1280px;
  --header-h: 64px;
  --panel-pad: 56px;
  --section-space: 96px;
  --bezel: 22px;
  --gutter-w: 40px;
  --doc-pad-l: 88px;
  --doc-pad-r: 40px;
  --row-h: 22px;
  --note-poke: 64px;
  --weight-body: 400;
  --weight-nav: 450;
  --weight-medium: 500;
  --weight-strong: 600;
  --weight-display: 700;
  --size-body: 16px;
  --size-small: 13px;
  --size-h1: clamp(34px, 2.2rem + 1.4vw, 48px);
  --size-h2: clamp(24px, 1.2rem + 1vw, 32px);
  --size-h3: 24px;
  --tracking-display: -0.02em;
  --tracking-brand: -0.01em;
  --tracking-button: -0.005em;
  --motion-fast: 160ms;
  --motion-reveal: 500ms;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}
*, *::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: var(--weight-body) var(--size-body)/1.5 var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
[hidden] { display: none !important; }
a { color: var(--accent-dark); text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { color: var(--accent); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button, a { -webkit-tap-highlight-color: var(--clear); }
button:disabled { cursor: not-allowed; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; box-shadow: var(--focus-ring); }
img, svg { max-width: 100%; }
img { height: auto; }
svg { flex-shrink: 0; }
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  letter-spacing: var(--tracking-display);
  text-wrap: balance;
  overflow-wrap: break-word;
}
h1 { font-size: var(--size-h1); line-height: 1.12; }
h2 { font-size: var(--size-h2); line-height: 1.2; }
h3 { font-size: var(--size-h3); line-height: 1.3; }
p { margin-top: 0; }
strong { font-weight: var(--weight-strong); }
code { font-family: var(--font-mono); overflow-wrap: anywhere; }
pre {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg-panel);
  color: var(--text);
  font: 14px/1.8 var(--font-mono);
  tab-size: 2;
}
pre code { white-space: pre; overflow-wrap: normal; word-break: normal; }
blockquote { margin-inline: 0; }
:where(main, section, article, aside, nav, div) { min-width: 0; }
.wrap {
  width: 100%;
  max-width: calc(var(--page-max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.reading { max-width: calc(var(--reading-max) + var(--gutter) * 2); }
.section { padding-top: var(--section-space); padding-bottom: var(--section-space); }
.stack > * + * { margin-top: 24px; }
.grid-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.grid-two > *, .footer-grid > * { min-width: 0; }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.center { text-align: center; }
.muted { color: var(--text-muted); }
.keep { white-space: nowrap; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: absolute;
  top: 8px;
  left: var(--gutter);
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--r-xs);
  background: var(--bg);
  color: var(--accent-dark);
}
.skip-link:not(:focus) {
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 22px;
  border: 1px solid var(--clear);
  border-radius: var(--r-btn);
  font: var(--weight-strong) 15px/1.5 var(--font-body);
  letter-spacing: var(--tracking-button);
  text-decoration: none;
  text-align: center;
  transition: background var(--motion-fast), border-color var(--motion-fast);
}
.btn svg { width: 17px; height: 17px; }
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover, .btn--primary.is-hover { background: var(--accent-dark); color: var(--on-accent); }
.btn--ghost {
  background: var(--bg-panel);
  color: var(--text);
  border-color: var(--border);
  padding-right: 18px;
}
.btn--ghost:hover { border-color: var(--border-strong); color: var(--text); }
.btn--ghost svg { width: 14px; height: 14px; color: var(--text-muted); }
.btn.is-focus { box-shadow: var(--focus-ring); }
.btn:disabled { background: var(--bg-panel); color: var(--text-muted); border-color: var(--border); }
.card, .panel {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}
.card { border-radius: var(--r-md); padding: 28px; }
.panel { border-radius: var(--r-lg); padding: var(--panel-pad); }
.card h3, .panel h2 { margin-top: 0; }
.panel__bar {
  margin: 40px calc(-1 * var(--panel-pad)) calc(-1 * var(--panel-pad));
  padding: 24px var(--panel-pad);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
  background: var(--bg-panel-2);
  color: var(--on-accent);
  text-align: center;
}
.prose { line-height: 1.85; overflow-wrap: break-word; }
.prose h2 { margin-top: 56px; margin-bottom: 20px; }
.prose h3 { margin-top: 32px; margin-bottom: 16px; }
.prose p, .prose ul, .prose ol { margin-bottom: 24px; }
.prose li + li { margin-top: 8px; }
.prose :not(pre) > code {
  padding: 2px 5px;
  border-radius: var(--r-xs);
  background: var(--bg-panel);
  color: var(--text);
  font-size: 0.9em;
}
.prose > :first-child { margin-top: 0; }
.reveal { opacity: 1; transform: none; }
.reveal-ready .reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--motion-reveal) var(--ease), transform var(--motion-reveal) var(--ease);
}
.reveal-ready .reveal.shown { opacity: 1; transform: none; }
.decorated, [data-hero-visual] { overflow-x: clip; }
.masthead {
  position: relative;
  z-index: 50;
  height: var(--header-h);
  background: var(--bg);
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.masthead__inner {
  max-width: min(100%, calc(var(--header-max) + var(--gutter) * 2));
  height: 100%;
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  flex-shrink: 0;
  color: var(--text);
  text-decoration: none;
}
.brand:hover { color: var(--text); }
.brand__mark {
  display: block;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: var(--r-mark);
}
.brand__mark--placeholder { background: var(--bg-panel); color: var(--text); border: 1px solid var(--border); }
.brand__name { font-size: 15.5px; font-weight: var(--weight-strong); letter-spacing: var(--tracking-brand); }
.primary { min-width: 0; }
.primary ul {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.primary a {
  display: block;
  padding-block: 12px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: var(--weight-nav);
  text-decoration: none;
  white-space: nowrap;
}
.primary a:hover, .primary a[aria-current="page"] { color: var(--text); }
.primary a[aria-current="page"] { font-weight: var(--weight-strong); }
.header-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: 44px;
  padding: 0 0 0 22px;
  border: 0;
  border-left: 1px solid var(--border);
  background: var(--clear);
  color: var(--text);
  font-size: 14px;
  white-space: nowrap;
}
.lang__short { display: none; }
.lang__caret { font-size: 10px; color: var(--text-muted); }
.language-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 55;
  width: 192px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg);
  color: var(--text);
}
.language-menu a { display: flex; align-items: center; min-height: 44px; padding: 10px 14px; text-decoration: none; color: var(--text); border-radius: var(--r-xs); }
.language-menu a:hover, .language-menu a[aria-current="true"] { 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: 8px;
  border: 0;
  border-radius: var(--r-xs);
  background: var(--clear);
  color: var(--text);
}
.menu-toggle svg { width: 22px; height: 22px; }
.mobile-nav { display: none; }
.nav-veil {
  position: fixed;
  inset: var(--header-h) 0 0;
  z-index: 30;
  border: 0;
  background: var(--veil);
  color: var(--text);
}
.site-footer {
  background: var(--bg-panel-2);
  color: var(--on-accent);
  padding-top: 64px;
  padding-bottom: 32px;
}
.site-footer a { color: var(--on-accent); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 0.8fr 1.3fr 0.7fr; gap: 48px; }
.site-footer .brand { color: var(--on-accent); margin-bottom: 20px; }
.site-footer h2 { margin-top: 0; font: var(--weight-strong) 14px/1.5 var(--font-body); letter-spacing: 0; }
.site-footer p { font-size: 14px; line-height: 1.85; }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li a { display: inline-block; padding-block: 6px; font-size: 14px; }
.footer-bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--text-muted); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; font-size: 13px; }
.footer-bottom p { margin: 0; font-size: inherit; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 20px; }
@media (max-width: 1024px) {
  .primary { display: none; }
  .header-tools { margin-left: auto; }
  .menu-toggle { display: inline-flex; }
  .mobile-nav {
    display: block;
    position: absolute;
    z-index: 40;
    top: var(--header-h);
    left: 0;
    right: 0;
    max-height: calc(100vh - var(--header-h));
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 16px var(--gutter) 24px;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
  }
  .mobile-nav ul { margin: 0; padding: 0; list-style: none; }
  .mobile-nav a { display: flex; align-items: center; width: 100%; min-height: 48px; padding: 12px 16px; border-radius: var(--r-xs); color: var(--text); text-decoration: none; }
  .mobile-nav a:hover, .mobile-nav a[aria-current] { background: var(--bg-panel); color: var(--accent-dark); }
  .mobile-nav__languages { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
}
@media (max-width: 800px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
}
@media (max-width: 768px) {
  :root { --size-h1: clamp(24px, 7.2vw, 30px); --panel-pad: 24px; --section-space: 64px; }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .grid-two { grid-template-columns: minmax(0, 1fr); }
  .tilt, [data-tilt] { transform: none !important; }
  .card { padding: 24px; }
  pre { padding: 16px; }
  .masthead__inner { gap: 12px; }
  .lang { padding-left: 12px; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .brand { gap: 8px; }
  .brand__name { font-size: 12px; }
  .header-tools { gap: 4px; }
  .lang__full { display: none; }
  .lang__short { display: inline; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal-ready .reveal { opacity: 1; transform: none; }
}