:root {
  --c-bg: #ffffff;
  --c-panel: #f4f5f5;
  --c-ink: #14191a;
  --c-border: #e3e6e6;
  --c-grid: #eceeee;
  --c-accent: #0f5560;
  --c-accent-dark: #0a3a42;
  --c-mist: #cfe0e1;
  --c-ochre: #c8963e;
  --c-text: #17191a;
  --c-muted: #5f6668;
  --c-success: #2f7d5b;
  --c-warn: #b7832f;
  --c-error: #b4483c;
  --c-code-key: #8cc2c8;
  --c-code-text: #d6dbdc;
  --c-code-dim: #6e797b;
  --c-code-muted: #9aa5a7;
  --c-hair-light: rgba(255, 255, 255, .14);
  --c-on-dark: #ffffff;
  --c-mask: #000000;
  --c-clear: transparent;
  --c-veil: rgba(20, 25, 26, .28);

  --f-display: "Inter", "Noto Sans SC", "PingFang SC", "Hiragino Sans", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --f-body: "Inter", "Noto Sans SC", "PingFang SC", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Apple SD Gothic Neo", "Malgun Gothic", -apple-system, system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --r-panel: 28px;
  --r-section: 32px;
  --r-card: 14px;
  --r-mark: 7px;
  --r-small: 4px;
  --r-shot: 10px;
  --r-pill: 999px;
  --r-circle: 50%;

  --w-max: 1296px;
  --w-header: 1296px;
  --w-reading: 780px;
  --gutter: 48px;
  --nav-h: 64px;
  --line: 1.5px;
  --hair: 1px;
  --focus: 2px;
  --space-section: 96px;
  --space-card: 32px;
  --gap-grid: 24px;

  --size-body: 16px;
  --size-small: 14px;
  --size-caption: 13px;
  --size-h1: clamp(34px, 3.4vw, 48px);
  --size-h2: clamp(26px, 2.8vw, 38px);
  --size-h3: 22px;
  --weight-regular: 400;
  --weight-medium: 500;
  --tracking-display: -.025em;
  --tracking-heading: -.02em;
  --tracking-brand: -.01em;

  --time-fast: .2s;
  --time-tab: .25s;
  --time-reveal: .6s;
  --ease-enter: cubic-bezier(.2, .7, .2, 1);
  --shadow-flat: none;
}

*, *::before, *::after { box-sizing: border-box; }
html { margin: 0; padding: 0; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 24px); }
body {
  margin: 0;
  padding: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--f-body);
  font-size: var(--size-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
html.nav-open, html:has(.preview-mobile[open]) { overflow: hidden; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, summary, a { -webkit-tap-highlight-color: var(--c-clear); }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible, input:focus-visible {
  outline: var(--focus) solid var(--c-accent);
  outline-offset: 3px;
  border-radius: var(--r-small);
}
svg { display: block; flex-shrink: 0; }
img { max-width: 100%; }
figure { margin: 0; }
h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: var(--weight-regular);
  text-wrap: balance;
}
h1 { font-size: var(--size-h1); line-height: 1.12; letter-spacing: var(--tracking-heading); }
h2 { font-size: var(--size-h2); line-height: 1.25; letter-spacing: var(--tracking-heading); }
h3 { font-size: var(--size-h3); line-height: 1.35; letter-spacing: var(--tracking-brand); }
p { margin-top: 0; }
strong { font-weight: var(--weight-medium); }
small { font-size: var(--size-caption); }
code, pre, kbd { font-family: var(--f-mono); }
code { overflow-wrap: anywhere; }
pre {
  max-width: 100%;
  min-width: 0;
  margin: 24px 0;
  padding: 24px;
  overflow-x: auto;
  background: var(--c-ink);
  color: var(--c-code-text);
  border-radius: var(--r-card);
  font-size: var(--size-small);
  line-height: 1.85;
  tab-size: 2;
}
pre code { white-space: pre; overflow-wrap: normal; word-break: normal; }
:where(section, article, aside, nav, div, figure) { min-width: 0; }
[id] { scroll-margin-top: calc(var(--nav-h) + 24px); }
.wrap {
  width: 100%;
  max-width: calc(var(--w-max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.reading { width: 100%; max-width: var(--w-reading); margin-inline: auto; }
.section { padding-top: var(--space-section); padding-bottom: var(--space-section); }
.section__intro { max-width: 720px; margin-bottom: 40px; }
.section__intro h2 { margin: 12px 0 24px; }
.muted, .eyebrow { color: var(--c-muted); }
.eyebrow { font-size: var(--size-caption); letter-spacing: .04em; }
.keep { white-space: nowrap; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  inset-inline-start: var(--gutter);
  top: 8px;
  z-index: 100;
  padding: 10px 16px;
  transform: translateY(-160%);
  background: var(--c-ink);
  color: var(--c-on-dark);
  border-radius: var(--r-small);
}
.skip-link:focus { transform: translateY(0); }
.prose { min-width: 0; overflow-wrap: break-word; }
.prose p, .prose li { line-height: 1.9; }
.prose h2 { margin-top: 64px; margin-bottom: 24px; }
.prose h3 { margin-top: 36px; margin-bottom: 16px; }
.prose a:not([class]) { color: var(--c-accent); text-decoration: underline; text-underline-offset: 4px; }
.prose :not(pre) > code {
  background: var(--c-panel);
  color: var(--c-accent-dark);
  padding: 2px 5px;
  border-radius: var(--r-small);
}
.prose ul, .prose ol { padding-inline-start: 24px; }
.prose li + li { margin-top: 10px; }

.button, .btn-store {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  max-width: 100%;
  padding: 10px 24px;
  border: var(--hair) solid var(--c-clear);
  border-radius: var(--r-pill);
  background: var(--c-text);
  color: var(--c-on-dark);
  font-size: var(--size-body);
  font-weight: var(--weight-medium);
  line-height: 1.5;
  text-align: center;
  transition: background-color var(--time-fast) ease, border-color var(--time-fast) ease;
}
.button:hover, .btn-store:hover, .button.is-hover { background: var(--c-accent-dark); color: var(--c-on-dark); }
.button:active, .btn-store:active { background: var(--c-accent); color: var(--c-on-dark); }
.button--outline { background: var(--c-bg); color: var(--c-text); border-color: var(--c-border); }
.button--outline:hover { background: var(--c-panel); color: var(--c-text); border-color: var(--c-muted); }
.button:disabled, .button[aria-disabled="true"] { background: var(--c-panel); color: var(--c-muted); border-color: var(--c-border); }
.button.is-focus { outline: var(--focus) solid var(--c-accent); outline-offset: 3px; }
.btn-store { height: 48px; padding: 0 26px 0 22px; letter-spacing: .005em; }
.btn-store svg { width: 17px; height: 17px; margin-top: -2px; }
.btn-text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 3px;
  border-bottom: var(--hair) solid var(--c-text);
  color: var(--c-text);
  font-size: var(--size-body);
}
.btn-text:hover { color: var(--c-accent); border-bottom-color: var(--c-accent); }
.btn-text svg { width: 14px; height: 14px; }
.btn-text path { fill: none; stroke: currentColor; stroke-width: var(--line); stroke-linecap: round; stroke-linejoin: round; }
.action-row { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--c-bg);
  color: var(--c-text);
  border-bottom: var(--hair) solid var(--c-border);
}
.topbar__row {
  position: relative;
  z-index: 4;
  width: 100%;
  max-width: min(100%, calc(var(--w-header) + var(--gutter) * 2));
  margin-inline: auto;
  padding-inline: var(--gutter);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  background: var(--c-bg);
  color: var(--c-text);
}
.brand { display: inline-flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand__mark { display: block; width: 30px; height: 30px; flex-shrink: 0; border-radius: var(--r-mark); }
.brand__placeholder { background: var(--c-panel); color: var(--c-text); border: var(--hair) solid var(--c-border); }
.brand__name {
  font-family: var(--f-display);
  font-size: var(--size-body);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-brand);
}
.desktop-nav { min-width: 0; height: 100%; margin-left: auto; }
.tabs {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  height: 100%;
  gap: 4px;
}
.tabs > li { display: flex; align-self: stretch; }
.tabs__item {
  position: relative;
  display: flex;
  align-items: center;
  padding-inline: 14px;
  font-size: 15px;
  white-space: nowrap;
  color: var(--c-muted);
  transition: color var(--time-fast) ease;
}
.tabs__item:hover { color: var(--c-text); }
.tabs__item::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: -1px;
  height: 2px;
  background: var(--c-accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--time-tab) ease;
}
.tabs__item:hover::after { transform: scaleX(.4); }
.tabs__item[aria-current="page"] { color: var(--c-text); }
.tabs__item[aria-current="page"]::after { transform: scaleX(1); }
.header-tools { display: flex; align-items: center; gap: 8px; flex-shrink: 0; height: 100%; }
.language-switch { position: relative; }
.lang {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 14px;
  border: var(--hair) solid var(--c-border);
  border-radius: var(--r-pill);
  background: var(--c-bg);
  color: var(--c-text);
  font: inherit;
  font-size: var(--size-small);
  cursor: pointer;
  list-style: none;
}
.lang::-webkit-details-marker { display: none; }
.lang:hover { border-color: var(--c-muted); }
.lang__short { display: none; }
.language-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  z-index: 6;
  width: 190px;
  margin: 0;
  padding: 8px;
  list-style: none;
  border: var(--hair) solid var(--c-border);
  border-radius: var(--r-card);
  background: var(--c-bg);
  color: var(--c-text);
}
.language-menu a { display: flex; align-items: center; min-height: 44px; padding: 8px 12px; border-radius: var(--r-small); }
.language-menu a:hover, .language-menu a[aria-current] { background: var(--c-panel); color: var(--c-accent-dark); }
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 10px;
  list-style: none;
  border: var(--hair) solid var(--c-border);
  border-radius: var(--r-pill);
  background: var(--c-bg);
  color: var(--c-text);
  cursor: pointer;
}
.menu-toggle::-webkit-details-marker { display: none; }
.menu-toggle svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: var(--line); }
.nav-drawer, .preview-drawer {
  position: fixed;
  z-index: 3;
  inset-inline: 0;
  top: var(--nav-h);
  max-height: calc(100dvh - var(--nav-h));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px var(--gutter) 32px;
  background: var(--c-bg);
  color: var(--c-text);
  border-bottom: var(--hair) solid var(--c-border);
}
.drawer-list, .drawer-languages { margin: 0; padding: 0; list-style: none; }
.drawer-list a, .drawer-languages a {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 48px;
  padding: 12px 8px;
  border-bottom: var(--hair) solid var(--c-border);
}
.drawer-list a[aria-current="page"] { color: var(--c-accent); }
.drawer-languages { margin-top: 20px; }
.drawer-languages a[aria-current] { color: var(--c-accent); }
.nav-veil { position: fixed; z-index: 1; inset: var(--nav-h) 0 0; border: 0; background: var(--c-veil); color: var(--c-text); cursor: pointer; }
.preview-mobile { display: none; }

.panel, .card {
  padding: var(--space-card);
  background: var(--c-panel);
  color: var(--c-text);
  border-radius: var(--r-panel);
  box-shadow: var(--shadow-flat);
}
.card--line { background: var(--c-bg); color: var(--c-text); border: var(--hair) solid var(--c-border); }
.panel--dark { background: var(--c-ink); color: var(--c-code-text); }
.panel--dark h2, .panel--dark h3 { color: var(--c-on-dark); }
.panel--dark .muted { color: var(--c-code-muted); }
.grid-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap-grid); }
.grid-three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap-grid); }
.grid-two > *, .grid-three > * { min-width: 0; }
.decorated { position: relative; overflow-x: clip; }
.reveal { opacity: 1; transform: none; }
.reveal.reveal-pending:not(.shown) { opacity: 0; transform: translateY(18px); }
.reveal.reveal-pending { transition: opacity var(--time-reveal) ease, transform var(--time-reveal) var(--ease-enter); }
.reveal.shown { opacity: 1; transform: none; }

.site-footer {
  padding-top: 64px;
  padding-bottom: 112px;
  background: var(--c-panel);
  color: var(--c-text);
  border-top: var(--hair) solid var(--c-border);
}
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1.4fr 1fr; gap: 40px; }
.footer-brand p { max-width: 30em; margin: 20px 0 0; color: var(--c-muted); font-size: var(--size-small); }
.footer-heading { margin: 0 0 16px; font-size: var(--size-small); font-weight: var(--weight-medium); }
.footer-list { padding: 0; margin: 0; list-style: none; }
.footer-list a { display: inline-flex; padding-block: 6px; font-size: var(--size-small); color: var(--c-muted); overflow-wrap: anywhere; }
.footer-list a:hover { color: var(--c-accent); text-decoration: underline; text-underline-offset: 4px; }
.footer-bottom { margin-top: 48px; padding-top: 24px; border-top: var(--hair) solid var(--c-border); font-size: var(--size-caption); color: var(--c-muted); }
.footer-bottom p { margin-bottom: 8px; }

@media (max-width: 1279px) {
  .desktop-nav { display: none; }
  .header-tools { margin-left: auto; }
  .menu-toggle { display: inline-flex; }
  .preview-mobile { display: block; }
}
@media (min-width: 1280px) {
  .nav-drawer, .nav-veil { display: none !important; }
}
@media (max-width: 980px) {
  :root { --gutter: 24px; --space-section: 72px; }
  .topbar__row { gap: 16px; }
  .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 { --size-h1: clamp(24px, 4vw, 30px); }
}
@media (max-width: 640px) {
  :root { --gutter: 20px; --space-section: 56px; --space-card: 24px; --gap-grid: 16px; }
  .brand__name { display: none; }
  .lang__full { display: none; }
  .lang__short { display: inline; }
  .lang { min-height: 44px; }
  .grid-two, .grid-three, .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .tilt, [class*="tilt--"] { transform: none !important; }
  pre { padding: 18px; font-size: 12px; }
  .section__intro { margin-bottom: 28px; }
}
@media (max-width: 360px) {
  :root { --gutter: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal.reveal-pending:not(.shown) { opacity: 1; transform: none; }
  .reveal, .tabs__item, .tabs__item::after, .button, .btn-store { transition: none; }
}