:root {
  color-scheme: dark;
  --bg: #161616;
  --bg-panel: #1E1E1E;
  --bg-panel-2: #262626;
  --border: #2F2F2F;
  --accent: #A8CDBD;
  --accent-dark: #6E9A88;
  --accent-deep: #557A6B;
  --accent-mid: #4A5F58;
  --text: #EDEDEA;
  --text-muted: #9A9A96;
  --success: #7FBF9A;
  --warn: #D6B77A;
  --error: #D98A84;
  --mist: #E6E7E3;
  --mist-hi: #F1F2EE;
  --mist-lo: #D8DAD4;
  --ink: var(--bg-panel);
  --ink-muted: #5F615C;
  --ink-faint: #8A8C86;
  --solid: #000;
  --clear: transparent;
  --white: #FFF;

  --accent-rgb: 168 205 189;
  --accent-dark-rgb: 110 154 136;
  --mid-rgb: 74 95 88;
  --text-rgb: 237 237 234;
  --mist-rgb: 230 231 227;
  --ink-rgb: 30 30 30;
  --bg-rgb: 22 22 22;
  --panel-rgb: var(--ink-rgb);
  --shade-rgb: 0 0 0;
  --white-rgb: 255 255 255;

  --section-base: var(--bg);
  --section-tint: var(--bg-panel-2);
  --section-ink: #FAFCFB;
  --section-ink-text: var(--ink);
  --section-ink-muted: var(--ink-muted);
  --section-ink-link: var(--accent-mid);
  --color-primary: var(--accent-mid);
  --color-accent: var(--accent);
  --color-text: var(--text);
  --color-bg: var(--bg);

  --font-display: "Inter", "Noto Sans SC", "Noto Sans JP", "Noto Sans KR", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "Inter", "Noto Sans SC", "Noto Sans JP", "Noto Sans KR", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --size-body: 15px;
  --size-small: 13px;
  --size-nav: 14.5px;
  --size-brand: 17px;
  --size-display: clamp(34px, 3.35vw, 48px);
  --size-h2: clamp(26px, 3vw, 38px);
  --size-h3: clamp(19px, 2vw, 24px);
  --size-lead: clamp(16px, 2vw, 20px);
  --weight-regular: 400;
  --weight-medium: 500;
  --r-container: 32px;
  --r-device: 24px;
  --r-card: 20px;
  --r-note: 16px;
  --r-key: 6px;
  --r-pill: 999px;
  --r-round: 50%;
  --r-none: 0;
  --gutter: clamp(16px, 4vw, 48px);
  --wrap-max: 1120px;
  --read-max: 74ch;
  --section-space: clamp(44px, 6vw, 88px);
  --gap: 16px;
  --nav-h: 72px;
  --hit: 44px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --quick: .2s;
  --focus: var(--accent);
  --z-fab: 50;
  --z-veil: 60;
  --z-header: 61;
  --soft-shadow: 0 14px 36px -24px rgb(var(--shade-rgb) / .7);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html.nav-open { overflow: hidden; }
body {
  background: var(--bg);
  color: var(--text);
  font: var(--weight-regular) var(--size-body)/1.6 var(--font-body);
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
a:hover { text-underline-offset: .2em; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
button, summary { cursor: pointer; }
button:disabled { cursor: default; }
img, video { max-inline-size: 100%; height: auto; }
svg, .icon, .dot, .brand img, .app-icon { flex-shrink: 0; }
.icon { inline-size: 1em; block-size: 1em; }
h1, h2, h3 { margin: 0 0 .55em; font-family: var(--font-display); font-weight: var(--weight-regular); }
h1 { font-size: var(--size-display); line-height: 1.12; letter-spacing: -.02em; text-wrap: pretty; }
h2 { font-size: var(--size-h2); line-height: 1.18; text-wrap: balance; }
h3 { font-size: var(--size-h3); line-height: 1.3; text-wrap: balance; }
:lang(ja):is(h1, h2, h3, .lead, .hero-desc) { word-break: auto-phrase; }
:lang(ko):is(h1, h2) { word-break: keep-all; }
.keep { white-space: nowrap; }
p { margin: 0 0 1em; }
strong, b { font-weight: var(--weight-medium); }
code, pre, kbd, samp { font-family: var(--font-mono); }
code { overflow-wrap: anywhere; }
pre {
  max-width: 100%;
  min-width: 0;
  margin: 0 0 1em;
  padding: 16px;
  overflow-x: auto;
  white-space: pre;
  border: 1px solid var(--border);
  border-radius: var(--r-note);
  background: var(--bg-panel);
  color: var(--text);
}
pre code { overflow-wrap: normal; }
hr { border: 0; border-top: 1px solid var(--border); }
section[id], .prose [id] { scroll-margin-top: 6rem; }

.wrap { width: 100%; max-width: var(--wrap-max); margin-inline: auto; padding-inline: var(--gutter); }
.section-space { padding-block: var(--section-space); }
.prose { min-width: 0; max-width: var(--read-max); line-height: 1.8; }
.prose > :where(h2, h3):not(:first-child) { margin-top: 1.6em; }
.prose a:not(.btn), .text-link { color: var(--local-link, var(--accent)); text-decoration: underline; text-underline-offset: .2em; }
.lead { font-size: var(--size-lead); color: var(--local-muted, var(--text-muted)); }
.muted { color: var(--local-muted, var(--text-muted)); }
.eyebrow { color: var(--local-muted, var(--text-muted)); font: var(--size-small)/1.5 var(--font-mono); }
.section-base { background: var(--section-base); color: var(--text); }
.section-tint { background: var(--section-tint); color: var(--text); }
.section-ink {
  --local-muted: var(--section-ink-muted);
  --local-link: var(--section-ink-link);
  --focus: var(--section-ink-link);
  color-scheme: light;
  background: var(--section-ink);
  color: var(--section-ink-text);
}
.section-ink :is(.card, .panel, pre) { --local-muted: var(--text-muted); --local-link: var(--accent); --focus: var(--accent); }
.decor-clip { position: relative; overflow-x: clip; }
.decor-full { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.grid, .card-grid { display: grid; gap: var(--gap); }
:where(.grid, .card-grid, .cluster) > *, :where(.topbar, .footer-grid, .prose) > * { min-width: 0; }
.card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.fact-row { justify-content: center; }
.card, .panel {
  min-width: 0;
  padding: clamp(16px, 3vw, 28px);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--bg-panel);
  color: var(--text);
}
.panel { border-radius: var(--r-container); box-shadow: var(--soft-shadow); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  max-width: 100%;
  padding: 8px 24px;
  border: 1px solid var(--clear);
  border-radius: var(--r-pill);
  background: var(--bg-panel-2);
  color: var(--text);
  font-size: var(--size-body);
  font-weight: var(--weight-medium);
  line-height: 1.4;
  letter-spacing: .005em;
  text-align: center;
  transition: transform var(--quick) var(--ease), box-shadow var(--quick) var(--ease), background-color var(--quick) var(--ease);
}
.btn svg { width: 16px; height: 16px; }
.btn-primary {
  background: linear-gradient(180deg, var(--accent), var(--accent-dark));
  color: var(--bg);
  box-shadow: 0 12px 30px -10px rgb(var(--accent-rgb) / .55), 0 2px 6px -2px rgb(var(--accent-dark-rgb) / .6), inset 0 1px 0 rgb(var(--white-rgb) / .45);
}
.btn-primary:is(:hover, .sample-hover):not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 16px 36px -10px rgb(var(--accent-rgb) / .65), 0 2px 6px -2px rgb(var(--accent-dark-rgb) / .6), inset 0 1px 0 rgb(var(--white-rgb) / .5);
}
.btn-ghost {
  background: rgb(var(--white-rgb) / .06);
  border-color: rgb(var(--white-rgb) / .16);
  color: var(--text);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.btn-ghost:hover { background-color: rgb(var(--white-rgb) / .10); }
.btn:active:not(:disabled), .btn.sample-pressed { transform: translateY(1px); box-shadow: none; }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--bg-panel-2); color: var(--text-muted); box-shadow: none; }
.sample-focus { outline: 2px solid var(--focus); outline-offset: 3px; }

.site-header { position: relative; z-index: var(--z-header); }
.topbar {
  width: 100%;
  max-width: min(100%, calc(1280px + var(--gutter) * 2));
  margin-inline: auto;
  height: var(--nav-h);
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  gap: 40px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  font: var(--weight-medium) var(--size-brand)/1.25 var(--font-display);
  letter-spacing: -.01em;
  color: var(--text);
}
.brand img { width: 28px; height: 28px; display: block; }
.brand:hover span { text-decoration: underline; }
.desktop-nav { min-width: 0; }
.tabs {
  display: flex;
  align-items: center;
  gap: 0;
  height: var(--nav-h);
  list-style: none;
  margin: 0;
  padding: 0;
}
.tabs li { height: 100%; }
.tabs a {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
  padding-inline: 14px;
  font-size: var(--size-nav);
  color: var(--text-muted);
  white-space: nowrap;
  transition: color var(--quick) var(--ease);
}
.tabs a::after {
  content: "";
  position: absolute;
  inset-inline: 14px;
  bottom: 15px;
  height: 2px;
  border-radius: var(--r-pill);
  background: var(--accent);
  transform: scaleX(0);
  opacity: 0;
  transition: transform .25s var(--ease), opacity .25s var(--ease);
}
.tabs a:hover, .tabs a[aria-current="page"] { color: var(--text); }
.tabs a:hover::after { transform: scaleX(.4); opacity: .5; }
.tabs a[aria-current="page"]::after { transform: scaleX(1); opacity: 1; }
.header-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.lang-wrap, .preview-lang { position: relative; }
.lang {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 16px 0 13px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  list-style: none;
  transition: border-color var(--quick) var(--ease), background-color var(--quick) var(--ease);
}
.lang:hover { border-color: rgb(var(--white-rgb) / .22); background-color: var(--bg-panel); }
.lang svg { width: 15px; height: 15px; color: var(--text-muted); }
.lang::-webkit-details-marker { display: none; }
.lang-short { display: none; }
.caret-down { color: var(--text-muted); font-size: 11px; }
.lang-list, .drawer ul, .footer-list { list-style: none; margin: 0; padding: 0; }
.lang-list {
  position: absolute;
  z-index: 2;
  inset-inline-end: 0;
  top: calc(100% + 8px);
  width: max-content;
  min-width: 152px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: var(--r-note);
  background: var(--bg-panel);
  color: var(--text);
  box-shadow: var(--soft-shadow);
}
.lang-list a, .drawer a {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: var(--hit);
  padding: 8px 12px;
  border-radius: var(--r-key);
}
:is(.lang-list, .drawer) a:hover { background: var(--bg-panel-2); color: var(--text); text-decoration: underline; }
:is(.lang-list, .drawer) a[aria-current] { color: var(--accent); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .25em; }
.hamburger {
  display: none;
  place-items: center;
  min-width: var(--hit);
  min-height: var(--hit);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--bg);
  color: var(--text);
}
.hamburger svg { width: 20px; height: 20px; }
.drawer {
  display: none;
  position: absolute;
  inset-inline: 0;
  top: 100%;
  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-block: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--text);
}
.drawer .lang-heading { margin: 14px 12px 4px; color: var(--text-muted); }
.nav-veil { position: fixed; inset: 0; z-index: var(--z-veil); background: rgb(var(--shade-rgb) / .66); color: var(--text); }

.site-footer {
  padding-top: 48px;
  padding-bottom: 90px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 28px;
}
.footer-grid .brand { margin-bottom: 12px; }
.footer-grid h2 { font-size: var(--size-body); color: var(--text); }
.footer-list { display: grid; gap: 6px; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }
.footer-legal { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border); font-size: var(--size-small); }

.reveal { transition: opacity .42s var(--ease), transform .42s var(--ease); }
.reveal-ready .reveal:not(.shown):not(:focus-within) { opacity: 0; transform: translateY(10px); }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 1360px) and (max-width: 1440px) {
  .topbar { padding-inline: calc(var(--gutter) - (100vw - 1280px - var(--gutter) * 2) / 2); }
}
@media (max-width: 1180px) {
  .topbar { gap: 24px; padding-inline: 28px; }
  .tabs a { padding-inline: 10px; font-size: 14px; }
  .tabs a::after { inset-inline: 10px; }
}
@media (max-width: 1280px) {
  html:not(:lang(zh-CN)) .desktop-nav { display: none; }
  html:not(:lang(zh-CN)) .hamburger { display: grid; }
  html:not(:lang(zh-CN)) .drawer:not([hidden]) { display: block; }
}
@media (max-width: 960px) {
  .desktop-nav { display: none; }
  .hamburger { display: grid; }
  .drawer:not([hidden]), .preview-mobile[open] > .drawer { display: block; }
  .header-tools { margin-left: auto; }
  .footer-grid, .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  :root { --size-display: clamp(24px, 4.5vw, 30px); }
}
@media (max-width: 640px) {
  :root { --gutter: clamp(16px, 4vw, 24px); }
  .topbar { padding-inline: 18px; gap: 8px; }
  .topbar .brand { gap: 7px; max-width: min(16.5rem, calc(100vw - 128px)); text-wrap: balance; }
  .lang { padding-inline: 10px; gap: 5px; min-height: var(--hit); }
  .lang-full { display: none; }
  .lang-short { display: inline; }
  .card-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-grid > :first-child { grid-column: 1 / -1; }
  .tilt, [data-tilt] { transform: none !important; rotate: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .reveal-ready .reveal:not(.shown) { opacity: 1; transform: none; }
}
@media (forced-colors: active) {
  :root { --focus: Highlight; }
  .tabs a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; }
}