:root {
  --c-bg: #ffffff;
  --c-panel: #f6f6f7;
  --c-panel-2: #eeeef0;
  --c-border: #e4e4e7;
  --c-accent: #a0381f;
  --c-accent-dark: #7c2a16;
  --c-accent-ring: rgba(160, 56, 31, 0.14);
  --c-text: #1d1f24;
  --c-text-strong: #0f1013;
  --c-muted: #5e6270;
  --c-link: #2b5cb0;
  --c-success: #1e7a4f;
  --c-warn: #b7791f;
  --c-error: #c62828;
  --c-on-accent: #ffffff;
  --c-glass-1: rgba(255, 255, 255, 0.14);
  --c-glass-2: rgba(255, 255, 255, 0.17);
  --c-glass-3: rgba(255, 255, 255, 0.19);
  --c-glass-4: rgba(255, 255, 255, 0.22);
  --c-glass-line: rgba(255, 255, 255, 0.35);
  --c-glass-rule: rgba(255, 255, 255, 0.18);
  --c-glass-hi: rgba(255, 255, 255, 0.72);
  --c-ink-90: rgba(255, 255, 255, 0.95);
  --c-ink-70: rgba(255, 255, 255, 0.74);
  --c-ink-50: rgba(255, 255, 255, 0.54);
  --c-ink-30: rgba(255, 255, 255, 0.32);
  --c-grid-dot: rgba(255, 255, 255, 0.12);
  --c-sheen: rgba(255, 255, 255, 0.10);
  --c-mask-solid: #000000;
  --c-clear: rgba(255, 255, 255, 0);
  --c-veil: rgba(29, 31, 36, 0.32);
  --c-detail-glass: rgba(255, 255, 255, 0.92);
  --shadow-float: 0 8px 24px rgba(29, 31, 36, 0.16);
  --shadow-menu: 0 12px 32px rgba(29, 31, 36, 0.08);

  --font-display: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', sans-serif;
  --font-body: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --weight-regular: 400;
  --weight-medium: 500;
  --fs-h1: clamp(34px, 2.2vw + 16px, 48px);
  --fs-h2: clamp(26px, 2vw + 12px, 36px);
  --fs-h3: 22px;
  --fs-body: 16px;
  --fs-small: 14px;
  --fs-caption: 12.5px;
  --tracking-display: -0.02em;
  --tracking-brand: -0.01em;
  --r-xs: 6px;
  --r-sm: 8px;
  --r-shot: 10px;
  --r-md: 12px;
  --r-glass: 14px;
  --r-menu: 16px;
  --r-mobile-stage: 24px;
  --r-xl: 32px;
  --r-pill: 999px;
  --r-dot: 50%;
  --r-caret: 1px;
  --line: 1px;
  --line-button: 1.5px;
  --nav-h: 64px;
  --gutter: 64px;
  --container: 1312px;
  --reading: 800px;
  --section-gap: 140px;
  --duration-fast: 150ms;
  --duration-reveal: 560ms;
  --ease: cubic-bezier(0.2, 0.65, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 24px); }
html.nav-open { overflow: hidden; }
body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
[hidden] { display: none !important; }
img { max-width: 100%; }
svg { display: block; flex-shrink: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button {
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
button:disabled { cursor: not-allowed; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: var(--weight-regular);
  letter-spacing: var(--tracking-display);
  line-height: 1.25;
  text-wrap: balance;
  overflow-wrap: break-word;
}
h1 { font-size: var(--fs-h1); line-height: 1.15; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-body); }
p { margin: 0 0 1em; }
strong { font-weight: var(--weight-medium); }
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: var(--line) solid var(--c-border);
  border-radius: var(--r-md);
  background: var(--c-panel);
  color: var(--c-text);
  font-size: var(--fs-small);
  line-height: 1.8;
}
pre code { white-space: pre; overflow-wrap: normal; word-break: normal; }
:focus-visible {
  outline: 2px solid var(--c-link);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}
::selection { background: var(--c-accent-ring); color: var(--c-text); }
.wrap {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.reading { max-width: calc(var(--reading) + var(--gutter) * 2); }
.section { margin-top: var(--section-gap); }
.section__head { max-width: 760px; margin-bottom: 40px; }
.section__head h2 { margin: 0 0 18px; }
.section__head p { color: var(--c-muted); }
.stack-flow > * + * { margin-top: 24px; }
.grid-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.grid-three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.grid-two > *, .grid-three > *, .wrap > *, .panel > *, .card > * { min-width: 0; }
.keep { white-space: nowrap; }
.muted { color: var(--c-muted); }
.text-link, .prose a { color: var(--c-link); text-decoration: underline; text-underline-offset: 4px; }
.text-link:hover, .prose a:hover { text-decoration-thickness: 2px; }
.eyebrow { font-size: var(--fs-small); color: var(--c-muted); }
.skip {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 60;
  padding: 8px 14px;
  background: var(--c-text);
  color: var(--c-bg);
  border-radius: var(--r-sm);
  font-size: var(--fs-small);
}
.skip:focus { top: 12px; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 18px;
  border: var(--line-button) solid var(--c-clear);
  border-radius: var(--r-md);
  font-size: 14.5px;
  font-weight: var(--weight-medium);
  line-height: 1.3;
  text-align: center;
  transition: background-color var(--duration-fast), color var(--duration-fast), border-color var(--duration-fast);
}
.btn svg { width: 16px; height: 16px; }
.btn--solid { background: var(--c-text); color: var(--c-bg); border-color: var(--c-text); }
.btn--solid:hover, .btn--solid.is-hover { background: var(--c-text-strong); color: var(--c-bg); border-color: var(--c-text-strong); }
.btn--line { background: var(--c-bg); color: var(--c-text); border-color: var(--c-text); }
.btn--line:hover, .btn--line.is-hover { background: var(--c-panel); color: var(--c-text); }
.btn--lg { min-height: 50px; padding: 12px 26px; font-size: var(--fs-body); }
.btn--lg svg { width: 18px; height: 18px; }
.btn:disabled, .btn[aria-disabled="true"] {
  background: var(--c-panel-2);
  color: var(--c-muted);
  border-color: var(--c-border);
  cursor: not-allowed;
}
.btn.is-focus { outline: 2px solid var(--c-link); outline-offset: 3px; }
.button-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: var(--nav-h);
  background: var(--c-bg);
  color: var(--c-text);
  border-bottom: var(--line) solid var(--c-border);
}
.topbar__inner {
  max-width: min(100%, calc(1280px + var(--gutter) * 2));
  min-height: var(--nav-h);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  font-size: 15px;
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-brand);
}
.brand__mark {
  display: block;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: var(--r-sm);
}
.brand__placeholder {
  background: linear-gradient(160deg, var(--c-bg), var(--c-panel-2));
  color: var(--c-text);
  border: var(--line) solid var(--c-border);
}
.brand__short { display: none; }
.mainnav { min-width: 0; }
.mainnav__list {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2px;
}
.navlink {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: var(--r-sm);
  font-size: 15px;
  white-space: nowrap;
  transition: background-color var(--duration-fast);
}
.navlink:hover, .navlink[aria-current="page"], .navmore__item[aria-current="page"] {
  background: var(--c-panel);
  color: var(--c-text);
}
.navlink svg { width: 12px; height: 12px; }
.navmore, .language { position: relative; }
.navmore__menu, .language__menu {
  position: absolute;
  top: calc(100% + 10px);
  z-index: 5;
  width: 280px;
  padding: 8px;
  border: var(--line) solid var(--c-border);
  border-radius: var(--r-menu);
  background: var(--c-bg);
  color: var(--c-text);
  box-shadow: var(--shadow-menu);
}
.navmore__menu { left: 50%; transform: translateX(-50%); }
.language__menu { right: 0; width: 190px; }
.navmore__group {
  margin: 6px 10px 4px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--c-muted);
}
.navmore__item {
  display: grid;
  gap: 2px;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: var(--r-md);
}
.navmore__item:hover, .language__menu a:hover { background: var(--c-panel); color: var(--c-text); }
.navmore__name { font-size: var(--fs-small); }
.navmore__desc { font-size: var(--fs-caption); color: var(--c-muted); }
.topbar__actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.lang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 10px;
  font-size: var(--fs-small);
  color: var(--c-muted);
  border-radius: var(--r-sm);
  white-space: nowrap;
}
.lang:hover { background: var(--c-panel); color: var(--c-text); }
.lang svg { width: 12px; height: 12px; }
.language__menu a { display: flex; align-items: center; min-height: 44px; padding: 10px 12px; border-radius: var(--r-sm); }
.language__menu a[aria-current="true"] { color: var(--c-accent); }
.lang__short { display: none; }
.hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  border: var(--line) solid var(--c-border);
  border-radius: var(--r-sm);
  background: var(--c-bg);
  color: var(--c-text);
}
.hamburger svg { width: 20px; height: 20px; }
.nav-drawer {
  position: fixed;
  z-index: 3;
  top: var(--nav-h);
  right: 0;
  left: 0;
  max-height: calc(100dvh - var(--nav-h));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px var(--gutter) 28px;
  background: var(--c-bg);
  color: var(--c-text);
  border-bottom: var(--line) solid var(--c-border);
}
.nav-drawer ul { list-style: none; margin: 0; padding: 0; }
.nav-drawer a {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
}
.nav-drawer a:hover, .nav-drawer a[aria-current] { background: var(--c-panel); color: var(--c-text); }
.nav-drawer__label { margin: 20px 14px 8px; font-size: var(--fs-small); color: var(--c-muted); }
.nav-veil {
  position: fixed;
  z-index: 1;
  inset: var(--nav-h) 0 0;
  background: var(--c-veil);
  color: var(--c-text);
  cursor: default;
}
details.navmore > summary, details.language > summary, .preview-menu > summary { list-style: none; }
details.navmore > summary::-webkit-details-marker, details.language > summary::-webkit-details-marker, .preview-menu > summary::-webkit-details-marker { display: none; }
.preview-menu { display: none; }

.card, .panel {
  min-width: 0;
  padding: 32px;
  border: var(--line) solid var(--c-border);
  border-radius: var(--r-xl);
  background: var(--c-bg);
  color: var(--c-text);
}
.card h3, .panel h3 { margin-top: 0; }
.card p:last-child, .panel p:last-child { margin-bottom: 0; }
.panel--soft { background: var(--c-panel); color: var(--c-text); }
.fact-canvas {
  padding: 56px;
  border-radius: var(--r-xl);
  background: var(--c-accent);
  color: var(--c-on-accent);
}
.fact-canvas h2 { margin-top: 0; }
.fact-canvas a:not(.btn) { color: var(--c-on-accent); text-decoration: underline; text-underline-offset: 4px; }
.prose { min-width: 0; line-height: 1.9; }
.prose h2 { margin-top: 64px; margin-bottom: 24px; scroll-margin-top: calc(var(--nav-h) + 24px); }
.prose h3 { margin-top: 36px; margin-bottom: 16px; }
.prose li + li { margin-top: 10px; }
.prose ul, .prose ol { padding-left: 1.5em; }
.prose :not(pre) > code { font-size: 0.9em; }
.prose > :first-child { margin-top: 0; }
.prose img { max-width: 100%; }

.site-footer { margin-top: var(--section-gap); padding-top: 64px; padding-bottom: 100px; background: var(--c-panel); color: var(--c-text); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 0.8fr 1.3fr 0.7fr; gap: 48px; }
.footer-grid > * { min-width: 0; }
.footer-brand p { max-width: 340px; margin-top: 20px; color: var(--c-muted); font-size: var(--fs-small); }
.footer-heading { margin: 0 0 16px; font-size: var(--fs-small); font-weight: var(--weight-medium); }
.footer-list { list-style: none; margin: 0; padding: 0; }
.footer-list li + li { margin-top: 6px; }
.footer-list a { display: inline-block; padding-block: 5px; font-size: var(--fs-small); overflow-wrap: anywhere; }
.footer-list a:hover { color: var(--c-link); text-decoration: underline; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px 32px; margin-top: 56px; font-size: var(--fs-caption); color: var(--c-muted); }
.footer-bottom p { margin: 0; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 20px; }

.reveal { opacity: 1; transform: none; }
.reveal.reveal-pending:not(.shown) { opacity: 0; transform: translateY(18px); }
.reveal.reveal-pending { transition: opacity var(--duration-reveal) var(--ease), transform var(--duration-reveal) var(--ease); }
.reveal.shown { opacity: 1; transform: none; }
.decorated, .hero, .stage, [data-hero-visual] { overflow-x: clip; }

@media (max-width: 1200px) {
  .mainnav, .topbar__actions > .btn { display: none; }
  .topbar__actions { margin-left: auto; }
  .hamburger { display: inline-flex; }
  .preview-menu { display: block; }
  .preview-menu .hamburger { display: flex; }
}
@media (max-width: 960px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  :root { --fs-h1: clamp(24px, 4vw, 30px); --gutter: 24px; }
  .brand__full { display: none; }
  .brand__short { display: inline; }
  .fact-canvas { padding: 32px; }
}
@media (max-width: 640px) {
  :root { --gutter: 20px; }
  .topbar__inner { gap: 8px; }
  .brand { gap: 8px; font-size: var(--fs-small); }
  .topbar__actions { gap: 4px; margin-left: auto; }
  .lang__full { display: none; }
  .lang__short { display: inline; }
  .grid-two, .grid-three { grid-template-columns: minmax(0, 1fr); }
  .card, .panel { padding: 24px; }
  .footer-grid { gap: 32px 24px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { display: block; }
  .footer-legal { margin-top: 20px; }
  .tilt, [data-tilt] { transform: none !important; }
  .section__head { margin-bottom: 28px; }
}
@media (max-width: 360px) {
  :root { --gutter: 16px; }
  .brand { font-size: var(--fs-caption); gap: 6px; }
  .brand__mark { width: 28px; height: 28px; }
  .lang { padding-inline: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .reveal.reveal-pending:not(.shown) { opacity: 1; transform: none; }
}