:root {
  --bg: #0A2A29;
  --bg-panel: #0F3634;
  --bg-panel-2: #154542;
  --border: #2B5D59;
  --accent: #2FE0B4;
  --accent-dark: #16A883;
  --text: #EAF6F3;
  --text-muted: #9DC3BD;
  --success: #43D98F;
  --warn: #F2B84B;
  --error: #FF5468;
  --nav-surface: #FFFFFF;
  --nav-ink: #0A2A29;
  --nav-muted: #55736F;
  --nav-line: #E2EBE9;
  --nav-hover: #F0F6F4;
  --accent-2: #FF6FA5;
  --accent-3: #A35CFF;
  --band-a: #6B2BD6;
  --band-b: #C2306F;
  --band-c: #3A1250;
  --ink-on-accent: #052322;
  --h1-a: #A6F4DE;
  --h1-b: #FFC6DD;
  --h1-c: #D7BFFF;
  --fog: #EEF4F2;
  --fog-card: #FFFFFF;
  --fog-ink: #0A2A29;
  --fog-muted: #4E6965;
  --fog-line: #DCE7E4;
  --fog-track: #E1EBE8;
  --switch-off: #C3D3CF;
  --code-key: #6B2BD6;
  --code-val: #086F55;
  --tag-mint-bg: rgba(47, 224, 180, 0.18);
  --tag-mint-ink: #086F55;
  --tag-pink-bg: rgba(255, 111, 165, 0.16);
  --tag-pink-ink: #A32459;
  --tag-violet-bg: rgba(163, 92, 255, 0.15);
  --tag-violet-ink: #6124C0;
  --hit-row: rgba(47, 224, 180, 0.2);
  --line-soft: rgba(157, 195, 189, 0.16);
  --badge-bg: rgba(15, 54, 52, 0.72);
  --glow-mint: rgba(47, 224, 180, 0.32);
  --glow-mint-soft: rgba(47, 224, 180, 0.14);
  --glow-pink: rgba(255, 111, 165, 0.26);
  --beam-soft: rgba(255, 111, 165, 0.16);
  --tile-mint: rgba(47, 224, 180, 0.17);
  --tile-deep: rgba(21, 69, 66, 0.9);
  --mint-ring: rgba(47, 224, 180, 0.13);
  --shadow-deep: rgba(1, 12, 11, 0.6);
  --shadow-mid: rgba(1, 12, 11, 0.3);
  --shadow-light: rgba(10, 42, 41, 0.12);
  --card-line: rgba(10, 42, 41, 0.12);
  --mask-on: #000000;
  --veil: rgba(1, 12, 11, 0.66);
  --band-panel: rgba(255, 255, 255, 0.94);
  --band-shade: rgba(58, 18, 80, 0.36);
  --clear: transparent;

  --font-display: "Inter", "Noto Sans SC", "PingFang SC", "Hiragino Sans", "Microsoft YaHei", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --font-body: var(--font-display);
  --font-mono: "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  --type-h1: clamp(34px, 2.2vw + 16px, 48px);
  --type-h2: clamp(24px, 2vw + 8px, 38px);
  --type-h3: 20px;
  --type-body: 16px;
  --type-small: 14px;
  --type-micro: 12px;
  --type-mobile-title: 28px;
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 10px;
  --r-band: 12px;
  --r-screen: 34px;
  --r-phone: 42px;
  --r-pill: 999px;
  --nav-h: 72px;
  --peek: 40px;
  --gutter: 32px;
  --hero-gutter: 48px;
  --reading: 76ch;
  --section-space: clamp(56px, 8vw, 112px);
  --tab-cycle: 8000ms;
  --sh-float: 0 1px 2px var(--shadow-mid), 0 12px 26px -10px var(--shadow-mid), 0 30px 60px -24px var(--shadow-deep), 0 26px 70px -30px var(--glow-mint);
  --sh-menu: 0 2px 6px var(--shadow-light), 0 18px 40px -16px var(--shadow-light);
  --sh-cta: 0 12px 30px -12px var(--glow-mint), inset 0 -2px 0 var(--accent-dark);
  --sh-phone: 0 0 0 5px var(--mint-ring), 0 0 38px var(--glow-mint), 0 44px 90px -26px var(--shadow-deep);
}

*, *::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: var(--type-body)/1.6 var(--font-body); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
img, svg { max-inline-size: 100%; }
img { block-size: auto; }
svg, .brand-mark, .badge-dot, .cdot, .sw { flex-shrink: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: var(--r-sm); }
.topbar :focus-visible, .feature-panel :focus-visible { outline-color: var(--tag-mint-ink); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.2; margin: 0 0 .65em; text-wrap: balance; }
h1 { font-size: var(--type-h1); }
h2 { font-size: var(--type-h2); }
h3 { font-size: var(--type-h3); }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
.keep { white-space: nowrap; }
.muted { color: var(--text-muted); }
.lead { font-size: 20px; color: var(--text-muted); }
code, pre, kbd, samp { font-family: var(--font-mono); }
code { overflow-wrap: anywhere; }
pre { max-inline-size: 100%; min-width: 0; overflow-x: auto; margin: 0; padding: 16px; border-radius: var(--r-md); background: var(--bg); color: var(--text); font-size: var(--type-small); line-height: 1.65; }
pre code { white-space: pre; overflow-wrap: normal; }
:target { scroll-margin-block-start: 5rem; }

.wrap { width: 100%; max-width: calc(1120px + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-space); }
.prose { max-inline-size: var(--reading); min-width: 0; width: 100%; overflow-wrap: break-word; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.35em; }
.prose a:not([class]) { color: var(--accent); text-decoration: underline; text-underline-offset: .2em; }
.prose li + li { margin-top: .35em; }
.prose pre, .prose .table-wrap { margin-block: 1.2em; }
.decor-scope { position: relative; overflow-x: clip; }
.cover-art { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: 20px; }
.card-grid > *, .hero-inner > *, .footer-grid > *, .feature-browser > * { min-width: 0; }
.card, .panel { min-width: 0; padding: clamp(18px, 3vw, 28px); border: 1px solid var(--line-soft); border-radius: var(--r-lg); background: var(--bg-panel); color: var(--text); box-shadow: var(--sh-float); overflow-wrap: break-word; }
.panel { background: var(--bg-panel-2); color: var(--text); }
.eyebrow { margin-bottom: 0; font: var(--type-micro)/1.6 var(--font-mono); letter-spacing: .16em; color: var(--accent); }
.chip-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }

.btn-primary, .button, .button-outline, .link-arrow { display: inline-flex; align-items: center; justify-content: center; gap: 10px; text-align: center; max-width: 100%; }
.btn-primary, .button { min-height: 52px; padding: 0 26px 0 22px; border: 0; border-radius: var(--r-md); background: var(--accent); color: var(--ink-on-accent); font-size: var(--type-body); font-weight: 600; box-shadow: var(--sh-cta); transition: transform .2s ease; }
.btn-primary svg, .button svg { width: 18px; height: 18px; }
.btn-primary:hover, .button:not(:disabled):hover, .button--hover { transform: translateY(-1px); }
.btn-primary:active, .button:not(:disabled):active, .button--pressed { transform: translateY(1px); box-shadow: inset 0 1px 3px var(--shadow-mid); }
.button:disabled { background: var(--bg-panel-2); color: var(--text-muted); box-shadow: none; }
.button--focus { outline: 2px solid var(--accent); outline-offset: 3px; }
.button-outline { min-height: 44px; padding: 6px 14px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg-panel); color: var(--text); }
.button-outline:hover { border-color: var(--accent); }
.link-arrow { gap: 6px; font-size: 15.5px; font-weight: 500; color: var(--accent); }
.link-arrow i { font-style: normal; display: inline-block; transition: transform .2s ease; }
.link-arrow:hover i { transform: translateX(3px); }

.topbar { position: relative; z-index: 30; height: var(--nav-h); background: var(--nav-surface); color: var(--nav-ink); border-bottom: 1px solid var(--nav-line); }
.topbar-inner { width: 100%; max-width: min(100%, calc(1280px + var(--gutter) * 2)); height: 100%; padding-inline: var(--gutter); margin-inline: auto; display: flex; align-items: center; gap: clamp(12px, 2.2vw, 32px); }
.brand { display: inline-flex; align-items: center; gap: 11px; flex-shrink: 0; }
.brand-mark { display: block; width: 34px; height: 34px; border-radius: var(--r-pill); box-shadow: 0 6px 14px -6px var(--glow-mint); }
.brand-name { font: 500 17px/1.3 var(--font-display); letter-spacing: .005em; white-space: nowrap; }
.brand-short, .lang-short { display: none; }
.mainnav { flex: 1; min-width: 0; display: flex; justify-content: center; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: clamp(2px, .5vw, 6px); }
.nav-list > li > a, .nav-more summary { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding-inline: clamp(8px, 1vw, 14px); border-radius: var(--r-sm); font-size: 15px; white-space: nowrap; cursor: pointer; }
.nav-list > li > a:hover, .nav-more summary:hover, .lang-toggle:hover, .drawer-toggle:hover { background: var(--nav-hover); color: var(--nav-ink); }
.nav-list > li > a.is-active::after, .nav-more summary.is-active::after { content: ""; position: absolute; inset: auto 14px 4px; height: 2px; border-radius: var(--r-pill); background: var(--accent-dark); }
.nav-more, .lang { position: relative; }
.topbar summary { list-style: none; }
.topbar summary::-webkit-details-marker { display: none; }
.nav-more summary svg { width: 12px; height: 12px; color: var(--nav-muted); transition: transform .2s ease; }
.nav-more details[open] summary svg { transform: rotate(180deg); }
.nav-menu, .lang-menu { position: absolute; top: calc(100% + 10px); list-style: none; margin: 0; padding: 6px; background: var(--nav-surface); color: var(--nav-ink); border: 1px solid var(--nav-line); border-radius: var(--r-lg); box-shadow: var(--sh-menu); }
.nav-menu { left: -6px; min-width: 232px; }
.nav-menu a, .lang-menu a { display: block; padding: 8px 12px; border-radius: var(--r-sm); font-size: var(--type-small); }
.nav-menu a:hover, .lang-menu a:hover, .topbar a[aria-current]:not(.nav-list > li > a) { background: var(--nav-hover); color: var(--nav-ink); }
.nav-menu strong, .nav-menu small { display: block; }
.nav-menu strong { font-weight: 500; }
.nav-menu small { font-size: var(--type-micro); color: var(--nav-muted); line-height: 1.5; }
.nav-tools { flex-shrink: 0; display: flex; align-items: center; gap: 8px; margin-left: auto; }
.lang-toggle, .drawer-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 14px; min-height: 38px; border: 1px solid var(--nav-line); border-radius: var(--r-md); background: var(--nav-surface); color: var(--nav-ink); font-size: var(--type-small); white-space: nowrap; cursor: pointer; }
.lang-toggle svg { width: 15px; height: 15px; color: var(--nav-muted); }
.lang-menu { right: 0; min-width: 150px; z-index: 2; }
.drawer-toggle { display: none; min-width: 44px; min-height: 44px; padding: 0; }
.drawer-toggle svg { width: 21px; height: 21px; }
.mobile-nav, .drawer-veil, .preview-drawer { display: none; }

.site-footer { border-top: 1px solid var(--line-soft); padding-block: 54px 24px; background: var(--bg-panel); color: var(--text); }
.footer-grid { display: grid; grid-template-columns: 1.35fr 1fr 1.25fr .75fr; gap: 32px; }
.footer-intro p { margin-top: 14px; color: var(--text-muted); }
.site-footer h2 { font-size: 17px; margin: 0 0 14px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; column-gap: 16px; row-gap: 5px; }
.footer-links a, .footer-tail a { font-size: var(--type-small); color: var(--text-muted); }
.footer-links a:hover, .footer-tail a:hover { color: var(--accent); text-decoration: underline; }
.footer-tail { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-top: 32px; border-top: 1px solid var(--line-soft); padding-top: 18px; font-size: var(--type-small); color: var(--text-muted); }

@media (prefers-reduced-motion: no-preference) {
  .reveal-watch .reveal:not(.shown):not(:focus-within) { opacity: 0; transform: translateY(12px); }
  .reveal-watch .reveal { transition: opacity .45s ease, transform .45s ease; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn-primary, .button, .link-arrow i, .nav-more svg { transition: none; }
}
@media (max-width: 1100px) {
  .mainnav { display: none; }
  .drawer-toggle { display: inline-flex; }
  .preview-drawer { display: block; }
  .drawer-veil:not([hidden]) { display: block; position: fixed; z-index: 0; inset: var(--nav-h) 0 0; border: 0; padding: 0; background: var(--veil); color: var(--text); }
  .mobile-nav:not([hidden]), .preview-drawer[open] .mobile-nav { display: block; position: absolute; z-index: 1; inset: 100% 0 auto; max-height: calc(100vh - var(--nav-h)); max-height: calc(100dvh - var(--nav-h)); overflow-y: auto; overscroll-behavior: contain; padding: 12px var(--gutter) 20px; border-bottom: 1px solid var(--nav-line); background: var(--nav-surface); color: var(--nav-ink); box-shadow: var(--sh-menu); }
  .mobile-nav ul { list-style: none; margin: 0; padding: 0; }
  .mobile-nav a { display: flex; align-items: center; min-height: 44px; width: 100%; padding: 8px 12px; border-radius: var(--r-sm); }
  .mobile-nav a:hover { background: var(--nav-hover); color: var(--nav-ink); }
  .mobile-nav p { margin: 10px 0 4px; padding: 10px 12px 0; border-top: 1px solid var(--nav-line); font-size: var(--type-micro); color: var(--nav-muted); }
}
@media (max-width: 768px) {
  :root { --gutter: 24px; --type-h1: var(--type-mobile-title); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  :root { --gutter: 20px; --hero-gutter: var(--gutter); }
  .tilt, .decor-tilt { transform: none; }
  .chip-row { justify-content: center; }
}
@media (max-width: 390px) {
  .topbar-inner { gap: 8px; }
  .topbar .brand { gap: 7px; }
  .topbar .brand-full, .lang-full { display: none; }
  .topbar .brand-short, .lang-short { display: inline; }
  .lang-toggle { padding-inline: 9px; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 22px; }
}