/* Inkling site. Tokens follow apps/web/src/index.css (v0.9 corner scale, shadows, motion). */
:root {
  color-scheme: light;
  --app: #ffffff;
  --side: #f7f7f5;
  --line: #e9e9e7;
  --ink: #37352f;
  --strong: #1c1b18;
  --sub: #787774;
  --accent: #6366f1;
  --accent-ink: #4f46e5;
  --accent-soft: #eef0ff;
  --hover: rgba(55, 53, 47, 0.06);
  --code-bg: #f7f7f5;
  --code-ink: #37352f;
  --term-bg: #1f1f1d;
  --term-ink: #e6e6e4;
  --term-sub: #9b9b98;
  --term-accent: #a5b4fc;
  --sh-1: rgb(15 15 15 / 0.05);
  --sh-2: rgb(15 15 15 / 0.08);
  --sh-3: rgb(15 15 15 / 0.13);
  --ring: transparent;

  --r-sm: 7px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 18px;
  --shadow-sm: 0 1px 2px var(--sh-1);
  --shadow-md: 0 4px 12px -2px var(--sh-2), 0 1px 3px var(--sh-1);
  --shadow-lg: 0 10px 24px -6px var(--sh-2), 0 2px 6px -1px var(--sh-1);
  --shadow-xl: 0 16px 36px -8px var(--sh-3), 0 4px 10px -2px var(--sh-1), 0 0 0 0.5px var(--ring);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 120ms;
  --dur-base: 180ms;
  --dur-slow: 220ms;

  --font: -apple-system, BlinkMacSystemFont, system-ui, 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR',
    'Malgun Gothic', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'D2Coding', 'Liberation Mono', monospace;
  --wrap: 1120px;
  --gutter: 24px;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --app: #191919;
    --side: #202020;
    --line: #2e2e2e;
    --ink: #e6e6e4;
    --strong: #ffffff;
    --sub: #9b9b98;
    --accent: #818cf8;
    --accent-ink: #a5b4fc;
    --accent-soft: #26284a;
    --hover: rgba(255, 255, 255, 0.055);
    --code-bg: #202020;
    --code-ink: #e6e6e4;
    --term-bg: #111111;
    --sh-1: rgb(0 0 0 / 0.25);
    --sh-2: rgb(0 0 0 / 0.35);
    --sh-3: rgb(0 0 0 / 0.5);
    --ring: rgb(255 255 255 / 0.06);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* --stuck: height of whatever sticks under the header (the docs filter bar), set by scripts */
  scroll-padding-top: calc(76px + var(--stuck, 0px));
}

body {
  margin: 0;
  background: var(--app);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent-ink);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

code,
pre,
kbd {
  font-family: var(--mono);
  font-size: 0.875em;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 16px;
  top: 12px;
  z-index: 100;
  background: var(--app);
  padding: 6px 10px;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
}

/* Header */
.top {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--app) 86%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-base) var(--ease-out);
}
.top.scrolled,
.docs-body .top {
  border-bottom-color: var(--line);
}
.top .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 60px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 650;
  font-size: 17px;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}
.brand:hover {
  text-decoration: none;
}
.brand img {
  width: 28px;
  height: 28px;
  border-radius: var(--r-sm);
}
.nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  min-width: 0;
}
.nav a {
  color: var(--sub);
  font-size: 14.5px;
  padding: 6px 10px;
  border-radius: var(--r-md);
  white-space: nowrap;
  transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.nav a:hover {
  background: var(--hover);
  color: var(--ink);
  text-decoration: none;
}
.nav a[aria-current='page'] {
  color: var(--ink);
}
.nav .lang {
  border: 1px solid var(--line);
  margin-left: 6px;
}
@media (max-width: 760px) {
  .nav .hide-sm {
    display: none;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: var(--r-md);
  font-size: 15px;
  font-weight: 560;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--app);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-base) var(--ease-out),
    background-color var(--dur-fast) var(--ease-out);
}
.btn:hover {
  text-decoration: none;
  background: var(--side);
  box-shadow: var(--shadow-md);
}
.btn:active {
  transform: scale(0.98);
}
.btn.primary {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--app);
}
.btn.primary:hover {
  background: color-mix(in srgb, var(--ink) 88%, var(--app));
}
.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Hero */
.hero {
  padding: 72px 0 32px;
  text-align: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--sub);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 12px;
  margin-bottom: 22px;
  background: var(--app);
}
.eyebrow b {
  color: var(--ink);
  font-weight: 600;
}
.hero h1 {
  font-size: clamp(34px, 5.4vw, 56px);
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 720;
  margin: 0 auto 18px;
  max-width: 19ch;
  text-wrap: balance;
}
:lang(ko) .hero h1 {
  letter-spacing: -0.02em;
  max-width: 20ch;
  word-break: keep-all;
}
.hero .lede {
  font-size: clamp(17px, 2vw, 19px);
  color: var(--sub);
  max-width: 640px;
  margin: 0 auto 28px;
  text-wrap: pretty;
}
:lang(ko) .lede,
:lang(ko) .card p,
:lang(ko) .section-head p {
  word-break: keep-all;
}
.cta {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.quick {
  max-width: 720px;
  margin: 0 auto;
  text-align: left;
}
.quick-label {
  font-size: 13px;
  color: var(--sub);
  margin: 0 0 8px 4px;
}

/* Terminal-style code */
.term {
  position: relative;
  background: var(--term-bg);
  color: var(--term-ink);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.term pre {
  margin: 0;
  padding: 18px 20px;
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.7;
  font-family: var(--mono);
}
.term pre code {
  font-size: inherit;
}
.term .c {
  color: var(--term-sub);
}
.term .k {
  color: var(--term-accent);
}
.term .o {
  color: #86efac;
}
.term[data-copy] pre {
  padding-right: 76px;
}
.copy {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
  box-shadow: 0 0 0 6px var(--term-bg);
  height: 28px;
  padding: 0 10px;
  font: 500 12px var(--font);
  color: var(--term-sub);
  background: color-mix(in srgb, var(--term-bg) 90%, #fff);
  border: 1px solid rgb(255 255 255 / 0.1);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.copy:hover {
  background: color-mix(in srgb, var(--term-bg) 80%, #fff);
  color: var(--term-ink);
}

/* Screenshots */
.shot {
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xl);
  background: var(--side);
}
.shot img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top left;
}
.hero-shot {
  margin: 56px auto 0;
  max-width: 1080px;
  border-radius: var(--r-xl);
}

/* Sections */
section.block {
  padding: 88px 0 24px;
}
.section-head {
  max-width: 720px;
  margin-bottom: 36px;
}
.section-head .kicker {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-ink);
  letter-spacing: 0.02em;
  margin: 0 0 8px;
}
.section-head h2 {
  font-size: clamp(26px, 3.4vw, 36px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 0 0 12px;
  text-wrap: balance;
}
:lang(ko) .section-head h2 {
  word-break: keep-all;
}
.section-head p {
  color: var(--sub);
  margin: 0;
  font-size: 17px;
}

/* Feature rows */
.feature {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 48px;
  align-items: center;
  padding: 28px 0;
}
.feature.flip {
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
}
.feature.flip .feature-text {
  order: 2;
}
.feature h3 {
  font-size: 22px;
  letter-spacing: -0.015em;
  margin: 0 0 10px;
}
.feature p {
  color: var(--sub);
  margin: 0 0 12px;
}
:lang(ko) .feature p,
:lang(ko) .feature li {
  word-break: keep-all;
}
.feature ul {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
}
.feature li {
  position: relative;
  padding-left: 18px;
  margin: 6px 0;
}
.feature li::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 0.68em;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0.7;
}
.pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

/* Figures */
.fig {
  margin: 0;
}
.fig figcaption {
  color: var(--sub);
  font-size: 14px;
  margin: 10px 4px 0;
}
:lang(ko) .fig figcaption {
  word-break: keep-all;
}

/* Cards */
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.card {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
  background: var(--app);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out),
    border-color var(--dur-base) var(--ease-out);
}
a.card {
  display: block;
  color: inherit;
}
a.card:hover {
  text-decoration: none;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.card h3 {
  font-size: 16.5px;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.card h3 code {
  font-size: 0.92em;
  color: var(--accent-ink);
}
.card p {
  color: var(--sub);
  margin: 0;
  font-size: 15px;
}
.card .num {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 4px;
  font-variant-numeric: tabular-nums;
}
.card .num small {
  font-size: 15px;
  font-weight: 500;
  color: var(--sub);
}

/* Agent transcript tabs */
.agent {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 40px;
  align-items: start;
}
.tool-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tool {
  display: block;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  background: var(--app);
  cursor: pointer;
  transition: border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out),
    background-color var(--dur-fast) var(--ease-out);
}
.tool:hover {
  background: var(--side);
}
.tool .with {
  display: inline;
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--sub);
}
.tool[aria-selected='true'] {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent), var(--shadow-sm);
}
.tool b {
  display: block;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-ink);
  margin-bottom: 2px;
}
.tool span {
  display: block;
  color: var(--sub);
  font-size: 14.5px;
  line-height: 1.5;
}
:lang(ko) .tool span {
  word-break: keep-all;
}
.panel[hidden] {
  display: none;
}
.js .panel {
  animation: panel-in var(--dur-slow) var(--ease-out);
}
@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.panel .term pre {
  font-size: 12.8px;
  line-height: 1.65;
  white-space: pre;
}
.panel .note {
  color: var(--sub);
  font-size: 14px;
  margin: 10px 4px 0;
}
.no-js .panel + .panel {
  margin-top: 16px;
}

/* Steps */
.steps {
  counter-reset: step;
  display: grid;
  gap: 18px;
  max-width: 820px;
}
.step {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 14px;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 14px;
  font-weight: 650;
  margin-top: 2px;
}
.step h3 {
  margin: 0 0 6px;
  font-size: 17px;
}
.step p {
  margin: 0 0 10px;
  color: var(--sub);
}
.step .term pre {
  padding: 14px 16px;
  font-size: 13px;
}
.step .term[data-copy] pre {
  padding-right: 76px;
}
.step .term[data-copy].copy-top pre {
  padding-top: 44px;
  padding-right: 16px;
}

.callout {
  border-radius: var(--r-md);
  background: var(--side);
  padding: 16px 18px;
  color: var(--sub);
  font-size: 15px;
  max-width: 820px;
}
.callout strong {
  color: var(--ink);
}
.honest {
  margin-top: 28px;
}
.honest ul {
  margin: 8px 0 0;
  padding-left: 20px;
}
.honest li {
  margin: 4px 0;
}

/* Footer */
.foot {
  margin-top: 96px;
  border-top: 1px solid var(--line);
  padding: 32px 0 48px;
  color: var(--sub);
  font-size: 14px;
}
.foot .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
  justify-content: space-between;
}
.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
}
.foot a {
  color: var(--sub);
}
.foot a:hover {
  color: var(--ink);
}

/* Responsive */
@media (max-width: 960px) {
  .grid,
  .grid.four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .feature,
  .feature.flip,
  .agent {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
  .feature.flip .feature-text {
    order: 0;
  }
}
@media (max-width: 600px) {
  :root {
    --gutter: 16px;
  }
  .hero {
    padding-top: 48px;
  }
  .hero-shot {
    margin-top: 36px;
    border-radius: var(--r-lg);
  }
  section.block {
    padding-top: 64px;
  }
  .grid,
  .grid.two,
  .grid.four,
  .pair {
    grid-template-columns: minmax(0, 1fr);
  }
  .term pre {
    font-size: 12.5px;
    padding: 16px;
  }
  .panel .term pre {
    font-size: 11.8px;
  }
  .nav a {
    padding: 6px 8px;
  }
}

/* ---------- Docs ---------- */
.wrap.wide {
  max-width: 1400px;
}
.docs-layout {
  display: grid;
  grid-template-columns: 212px minmax(0, 1fr) 204px;
  gap: 36px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.docs-side,
.docs-toc {
  position: sticky;
  top: 60px;
  align-self: start;
  max-height: calc(100vh - 60px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 28px 0 40px;
  font-size: 14px;
  scrollbar-width: thin;
}
.docs-side h2,
.docs-toc h2 {
  font-size: 12px;
  font-weight: 600;
  color: var(--sub);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 8px 10px;
}
.docs-side ul,
.docs-toc ul {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
}
.docs-side a {
  position: relative;
  display: block;
  color: var(--sub);
  padding: 5px 10px;
  border-radius: var(--r-md);
  transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.docs-side a:hover {
  background: var(--hover);
  color: var(--ink);
  text-decoration: none;
}
.docs-side a[aria-current='page'] {
  background: var(--accent-soft);
  color: var(--strong);
  font-weight: 600;
  box-shadow: inset 2px 0 0 var(--accent);
}

/* Table of contents: the section being read is marked by scripts with aria-current="location". */
.docs-toc ul {
  border-left: 1px solid var(--line);
}
.docs-toc a {
  display: block;
  color: var(--sub);
  padding: 4px 0 4px 12px;
  margin-left: -1px;
  border-left: 2px solid transparent;
  line-height: 1.45;
  transition: color var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out);
}
.docs-toc a:hover {
  color: var(--ink);
  text-decoration: none;
  border-left-color: var(--sub);
}
.docs-toc a[aria-current] {
  color: var(--strong);
  font-weight: 600;
  border-left-color: var(--accent);
}
.docs-toc a.is-dim {
  opacity: 0.4;
}
.toc-toggle {
  display: none;
}
.docs-pick {
  display: none;
}

/* Reading progress, drawn on the header's bottom edge. */
.progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
}

.prose {
  padding: 36px 0 40px;
  min-width: 0;
  max-width: 860px;
}
.prose > :first-child {
  margin-top: 0;
}

/* Page head */
.doc-head {
  position: relative;
  padding: 4px 0 22px;
  margin: 0 0 28px;
  border-bottom: 1px solid var(--line);
}
.doc-head::before {
  content: '';
  position: absolute;
  inset: -36px 0 0 35%;
  background-image: radial-gradient(color-mix(in srgb, var(--sub) 34%, transparent) 1px, transparent 1.4px);
  background-size: 18px 18px;
  -webkit-mask-image: linear-gradient(to left, #000, transparent 85%);
  mask-image: linear-gradient(to left, #000, transparent 85%);
  opacity: 0.55;
  pointer-events: none;
}
.doc-head > * {
  position: relative;
}
.doc-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin: 0 0 10px;
}
.doc-kicker::before {
  content: '';
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}
.prose h1 {
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 740;
  margin: 0 0 12px;
  color: var(--strong);
}
:lang(ko) .prose h1 {
  letter-spacing: -0.02em;
  word-break: keep-all;
}
.prose .doc-desc {
  font-size: 18px;
  line-height: 1.55;
  color: var(--sub);
  margin: 0 0 16px;
  max-width: 62ch;
}
.prose h2 {
  position: relative;
  font-size: 26px;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--strong);
  margin: 64px 0 14px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.prose h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: -1px;
  width: 44px;
  height: 2px;
  background: var(--accent);
}
.prose h3 {
  font-size: 19px;
  letter-spacing: -0.01em;
  margin: 36px 0 10px;
}
.prose h4 {
  font-size: 16px;
  margin: 24px 0 8px;
}
:lang(ko) .prose h2,
:lang(ko) .prose h3 {
  word-break: keep-all;
}
.prose :target {
  animation: target-flash 1.6s var(--ease-out);
}
@keyframes target-flash {
  0%,
  35% {
    background-color: var(--accent-soft);
    box-shadow: 0 0 0 6px var(--accent-soft);
  }
  100% {
    background-color: transparent;
    box-shadow: 0 0 0 6px transparent;
  }
}
.prose p,
.prose li {
  font-size: 16px;
}
:lang(ko) .prose p,
:lang(ko) .prose li,
:lang(ko) .prose td,
:lang(ko) .prose th {
  word-break: keep-all;
}
.prose ul,
.prose ol {
  padding-left: 24px;
}
.prose li {
  margin: 4px 0;
}
.prose li > p {
  margin: 4px 0;
}
.prose :not(pre) > code {
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.1em 0.35em;
  font-size: 0.86em;
  /* A piece of code wraps at its spaces and each line keeps a whole box. */
  overflow-wrap: break-word;
  word-break: normal;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.prose :not(pre) > code.long {
  overflow-wrap: anywhere;
}
.prose pre {
  background: var(--code-bg);
  color: var(--code-ink);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px 16px;
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.6;
}
.prose pre code {
  font-size: inherit;
}
.pre-wrap {
  position: relative;
}
.pre-wrap .copy {
  top: 8px;
  right: 8px;
  box-shadow: none;
  color: var(--sub);
  background: var(--app);
  border-color: var(--line);
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.pre-wrap:hover .copy,
.pre-wrap .copy:focus-visible,
.pre-wrap .copy.done {
  opacity: 1;
}
@media (hover: none) {
  .pre-wrap .copy {
    opacity: 1;
  }
}
.pre-wrap .copy:hover {
  background: var(--side);
  color: var(--ink);
}
.copy.done {
  color: var(--accent-ink);
}
.prose blockquote {
  margin: 16px 0;
  padding: 2px 16px;
  border-left: 3px solid var(--line);
  color: var(--sub);
}
.prose hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 32px 0;
}
.prose img {
  border-radius: var(--r-md);
  border: 1px solid var(--line);
}

/* Tables. build.mjs picks the class; see the comment there. */
.table-wrap {
  container-type: inline-size;
  overflow-x: auto;
  margin: 16px 0;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.prose table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14.5px;
}
.prose th,
.prose td {
  text-align: left;
  vertical-align: top;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  overflow-wrap: break-word;
  line-height: 1.65;
}
/* Short names in a first column (tools, variables, fields) stay on one line; the long column takes the rest. */
.prose td.c-name {
  white-space: nowrap;
}
:lang(ko) .prose :not(pre) > code {
  word-break: keep-all;
}
.prose th {
  background: var(--side);
  font-weight: 600;
  font-size: 13px;
  color: var(--sub);
}
.prose tr:last-child td {
  border-bottom: 0;
}
.prose td:first-child {
  color: var(--strong);
  font-weight: 560;
}
.prose table.t-short td,
.prose table.t-short th {
  font-variant-numeric: tabular-nums;
}
.prose table.t-auto.t-short td:first-child {
  white-space: nowrap;
}
.ba {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0 5px;
}
.ba-b {
  color: var(--sub);
  white-space: nowrap;
}
.ba-a {
  color: var(--strong);
  font-weight: 650;
}
.prose tbody tr {
  transition: background-color var(--dur-fast) var(--ease-out);
}
.prose table:not(.cards) tbody tr:hover {
  background: var(--hover);
}

/* One card per row */
.table-wrap.has-cards {
  overflow: visible;
  border: 0;
  border-radius: 0;
}
table.cards {
  position: relative;
  display: block;
}
table.cards tbody {
  display: block;
}
table.cards thead {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
table.cards tr.rec {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px 14px;
  padding: 16px 18px;
  margin: 0 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--app);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
table.cards tr.rec:hover {
  border-color: color-mix(in srgb, var(--sub) 45%, var(--line));
  box-shadow: var(--shadow-md);
}
table.cards td {
  display: block;
  min-width: 0;
  padding: 0;
  border: 0;
  font-weight: 400;
  color: var(--ink);
}
table.cards td.is-empty {
  display: none;
}
table.cards td[data-label]::before {
  content: attr(data-label);
  display: block;
  margin-bottom: 2px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: var(--sub);
}
table.cards td.c-title,
table.cards td.c-area {
  font-size: 16.5px;
  font-weight: 680;
  letter-spacing: -0.01em;
  color: var(--strong);
}
table.cards td.c-title::before,
table.cards td.c-area::before {
  display: none;
}
table.cards.t-recs tr.rec {
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
}
table.cards.t-recs td.c-title,
table.cards.t-recs td.c-wide {
  grid-column: 1 / -1;
}

/* Performance log: before and after side by side, the improvement as a band */
.t-perf.cards tr.rec {
  grid-template-columns: minmax(0, 1fr) 20px minmax(0, 1fr);
  grid-template-areas:
    'area area area'
    'change change change'
    'before arrow after'
    'gain gain gain'
    'cost cost cost'
    'method method method'
    'source source source';
  gap: 8px 14px;
  padding: 16px 18px 14px;
}
.t-perf.cards tr.rec::before {
  content: '→';
  grid-area: arrow;
  align-self: center;
  justify-self: center;
  color: var(--sub);
  font-size: 18px;
}
.t-perf.cards td.c-area {
  grid-area: area;
}
.t-perf.cards td.c-change {
  grid-area: change;
  color: var(--sub);
  font-size: 15px;
}
.t-perf.cards td.c-change::before {
  display: none;
}
.t-perf.cards td.c-before,
.t-perf.cards td.c-after {
  padding: 10px 12px 12px;
  border-radius: var(--r-md);
  background: var(--side);
  font-size: 14.5px;
  font-variant-numeric: tabular-nums;
}
.t-perf.cards td.c-before {
  grid-area: before;
}
.t-perf.cards td.c-after {
  grid-area: after;
  color: var(--strong);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 28%, transparent);
}
.t-perf.cards td.c-after::before {
  color: var(--accent-ink);
}
[data-tone='neutral'] .t-perf.cards td.c-after,
[data-tone='regress'] .t-perf.cards td.c-after {
  background: var(--side);
  box-shadow: inset 0 0 0 1px var(--line);
}
[data-tone='neutral'] .t-perf.cards td.c-after::before,
[data-tone='regress'] .t-perf.cards td.c-after::before {
  color: var(--sub);
}
.bar {
  position: relative;
  display: block;
  height: 4px;
  margin-top: 10px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--sub) 18%, transparent);
  overflow: hidden;
}
.bar::after {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--w);
  border-radius: 2px;
  background: var(--sub);
  transform-origin: 0 50%;
}
.c-after .bar::after {
  background: var(--accent);
}
[data-tone='neutral'] .c-after .bar::after,
[data-tone='regress'] .c-after .bar::after {
  background: var(--ink);
}
table:not(.cards) .bar {
  display: none;
}
.t-perf.cards td.c-gain {
  grid-area: gain;
  padding: 8px 12px 9px;
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--accent-soft) 55%, transparent);
  font-weight: 520;
  color: var(--strong);
}
.t-perf.cards td.c-gain::before {
  color: var(--accent-ink);
}
.t-perf.cards td.c-gain .num {
  font-size: 1.2em;
  font-weight: 760;
  letter-spacing: -0.01em;
  color: var(--accent-ink);
}
.t-perf.cards td.c-gain.is-flat {
  border-left-color: color-mix(in srgb, var(--sub) 55%, var(--line));
  background: none;
  font-weight: 400;
  color: var(--ink);
}
.t-perf.cards td.c-gain.is-flat::before {
  color: var(--sub);
}
.t-perf.cards td.c-cost,
.t-perf.cards td.c-source,
.t-perf.cards td.c-extra {
  position: relative;
  padding-left: 5.2em;
  font-size: 14.5px;
}
.t-perf.cards td.c-cost::before,
.t-perf.cards td.c-source::before,
.t-perf.cards td.c-extra::before {
  position: absolute;
  left: 0;
  top: 0.22em;
  width: 5em;
  margin: 0;
}
.t-perf.cards td.c-cost {
  grid-area: cost;
}
.t-perf.cards td.c-source {
  grid-area: source;
}
.t-perf.cards td.c-extra {
  grid-column: 1 / -1;
}
.t-perf.cards td.c-method {
  grid-area: method;
}
.t-perf.cards td.c-method::before {
  display: none;
}
.prose td details {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
}
.prose td summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--sub);
  list-style: none;
  border-radius: var(--r-sm);
  transition: color var(--dur-fast) var(--ease-out);
}
.prose td summary::-webkit-details-marker {
  display: none;
}
.prose td summary::before {
  content: '';
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  transition: transform var(--dur-base) var(--ease-out);
}
.prose td details[open] summary::before {
  transform: rotate(45deg);
}
.prose td summary:hover {
  color: var(--ink);
}
.prose td .fold {
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  background: var(--side);
  font-size: 14px;
  color: var(--ink);
}
table:not(.cards) td summary {
  display: none;
}
table:not(.cards) td .fold {
  margin: 0;
  padding: 0;
  background: none;
  font-size: inherit;
}

/* API: one endpoint per card, the method as a badge */
.t-endpoint.cards tr.rec {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: 8px 12px;
  padding: 13px 16px 14px;
  margin-bottom: 10px;
}
.t-endpoint.cards td.c-method {
  justify-self: start;
  padding: 3px 8px;
  border-radius: 6px;
  font: 700 11.5px/1.5 var(--mono);
  letter-spacing: 0.05em;
  white-space: nowrap;
  color: var(--accent-ink);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px transparent;
}
.t-endpoint.cards td.c-method::before,
.t-endpoint.cards td.c-path::before {
  display: none;
}
.t-endpoint.cards [data-method='POST'] td.c-method {
  color: var(--app);
  background: var(--accent);
}
.t-endpoint.cards [data-method='PUT'] td.c-method,
.t-endpoint.cards [data-method='PATCH'] td.c-method {
  background: none;
  box-shadow: inset 0 0 0 1px var(--accent);
}
.t-endpoint.cards [data-method='DELETE'] td.c-method {
  color: var(--app);
  background: var(--ink);
}
.t-endpoint.cards [data-method='MULTI'] td.c-method {
  color: var(--sub);
  background: none;
  box-shadow: inset 0 0 0 1px var(--line);
}
.t-endpoint.cards td.c-path {
  font-weight: 600;
  color: var(--strong);
}
.t-endpoint.cards td.c-path code {
  padding: 0;
  border: 0;
  background: none;
  font-size: 14px;
}
.t-endpoint.cards td.c-field {
  grid-column: 1 / -1;
  position: relative;
  padding-left: 6.6em;
  font-size: 14.5px;
}
.t-endpoint.cards td.c-field::before {
  position: absolute;
  left: 0;
  top: 0.22em;
  width: 6.4em;
  margin: 0;
}
.t-endpoint.cards td.c-field:nth-child(3) {
  padding-top: 10px;
  margin-top: 2px;
  border-top: 1px dashed var(--line);
}
.t-endpoint.cards td.c-field:nth-child(3)::before {
  top: calc(10px + 0.22em);
}

@container (max-width: 520px) {
  .t-perf.cards tr.rec {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: 'area' 'change' 'before' 'arrow' 'after' 'gain' 'cost' 'method' 'source';
    padding: 16px;
  }
  .t-perf.cards tr.rec::before {
    content: '↓';
    margin: -6px 0;
  }
  .t-endpoint.cards td.c-field,
  .t-perf.cards td.c-cost,
  .t-perf.cards td.c-source,
  .t-perf.cards td.c-extra {
    padding-left: 0;
  }
  .t-endpoint.cards td.c-field::before,
  .t-perf.cards td.c-cost::before,
  .t-perf.cards td.c-source::before,
  .t-perf.cards td.c-extra::before {
    position: static;
    width: auto;
    margin-bottom: 2px;
  }
  .t-endpoint.cards td.c-field:nth-child(3)::before {
    top: auto;
  }
}

/* Tables that turn into cards only where they would not fit */
@container (max-width: 560px) {
  table.t-auto {
    position: relative;
    display: block;
  }
  table.t-auto tbody {
    display: block;
  }
  table.t-auto thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  table.t-auto tr.rec {
    display: grid;
    gap: 8px 14px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
  }
  table.t-auto tr.rec:last-child {
    border-bottom: 0;
  }
  table.t-auto td {
    display: block;
    min-width: 0;
    padding: 0;
    border: 0;
    text-align: left !important;
  }
  table.t-auto td.is-empty {
    display: none;
  }
  table.t-auto td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 1px;
    font-size: 12px;
    font-weight: 650;
    color: var(--sub);
  }
  table.t-auto td.c-title {
    font-weight: 660;
    color: var(--strong);
  }
  table.t-auto td.c-title::before {
    display: none;
  }
  table.t-auto tr.rec {
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  }
  table.t-auto td.c-title,
  table.t-auto td.c-wide {
    grid-column: 1 / -1;
  }
  .prose table.t-auto.t-short td:first-child {
    white-space: normal;
  }
}

/* Known issues: "- **Severity** (ID) text" */
.prose li.issue {
  list-style: none;
  margin: 0 0 8px -24px;
  padding: 10px 14px 11px 15px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--line);
  border-radius: var(--r-md);
  background: var(--app);
  font-size: 15px;
  transition: border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.prose li.issue:hover {
  box-shadow: var(--shadow-sm);
}
.prose li.issue > p {
  margin: 0;
  font-size: inherit;
}
.prose li.issue[data-sev='high'] {
  border-left-color: var(--strong);
}
.prose li.issue[data-sev='medium'] {
  border-left-color: var(--accent);
}
.prose li.issue[data-sev='low'] {
  border-left-color: color-mix(in srgb, var(--accent) 42%, var(--line));
}
.sev {
  display: inline-block;
  margin-right: 4px;
  padding: 1px 7px;
  border-radius: 5px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  vertical-align: 1px;
  color: var(--sub);
  box-shadow: inset 0 0 0 1px var(--line);
}
[data-sev='high'] .sev {
  color: var(--app);
  background: var(--strong);
  box-shadow: none;
}
[data-sev='medium'] .sev {
  color: var(--app);
  background: var(--accent);
  box-shadow: none;
}
[data-sev='low'] .sev {
  color: var(--accent-ink);
  background: var(--accent-soft);
  box-shadow: none;
}
.issue-id {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--sub);
}
.prose li.issue[data-fixed] {
  background: var(--side);
}
.prose li.issue del {
  color: var(--sub);
}

/* In-page filter (added by scripts; without them the page simply shows everything) */
.filterbar {
  position: sticky;
  top: 60px;
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin: 0 -12px 20px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: color-mix(in srgb, var(--app) 90%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  box-shadow: var(--shadow-md);
}
.filter-search {
  flex: 1 1 220px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--app);
  color: var(--sub);
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.filter-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.filter-search svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}
.filter-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: none;
  color: var(--ink);
  font: 14.5px var(--font);
}
.filter-search input::placeholder {
  color: var(--sub);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip,
.filter-btn {
  height: 30px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--app);
  color: var(--sub);
  font: 500 13px var(--font);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.chip:hover,
.filter-btn:hover {
  background: var(--side);
  color: var(--ink);
}
.chip:active,
.filter-btn:active {
  transform: scale(0.96);
}
.chip small {
  margin-left: 5px;
  font-size: 11.5px;
  opacity: 0.75;
  font-variant-numeric: tabular-nums;
}
.chip[aria-pressed='true'],
.filter-btn[aria-pressed='true'] {
  color: var(--app);
  background: var(--ink);
  border-color: var(--ink);
}
.filter-btn {
  border-radius: var(--r-md);
}
.filter-count {
  margin-left: auto;
  font-size: 13px;
  color: var(--sub);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.filter-empty {
  margin: 28px 0;
  padding: 28px 20px;
  border: 1px dashed var(--line);
  border-radius: var(--r-lg);
  text-align: center;
  color: var(--sub);
}
.filter-empty button {
  margin-left: 8px;
  border: 0;
  background: none;
  color: var(--accent-ink);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
/* Only inside a doc: is-out is what the filter puts on rows and sections it hides. */
.prose .is-out,
[hidden] {
  display: none !important;
}

.prose details {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 8px 14px;
  margin: 16px 0;
}
.prose summary {
  cursor: pointer;
  font-weight: 560;
}
.doc-meta {
  margin-top: 48px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--sub);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}
.prose .doc-meta-top {
  display: block;
  margin: 0;
  padding-top: 0;
  border-top: 0;
  font-size: 14px;
}
.doc-index {
  padding: 36px 0 40px;
  max-width: 920px;
}
.doc-index h1 {
  font-size: clamp(30px, 4vw, 42px);
  letter-spacing: -0.03em;
  color: var(--strong);
  margin: 0 0 8px;
}
.doc-index > p {
  color: var(--sub);
  margin: 0 0 28px;
  font-size: 17px;
}
.doc-index h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 650;
  color: var(--accent-ink);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 40px 0 14px;
}
.doc-index h2::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

@media (max-width: 1180px) {
  .toc-page {
    --stuck: 40px;
  }
  .docs-layout {
    grid-template-columns: 200px minmax(0, 1fr);
  }
  .docs-toc {
    display: none;
  }
  /* The table of contents becomes a bar under the header that names the section being read. */
  .js .docs-toc {
    display: block;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    z-index: 40;
    max-height: none;
    overflow: visible;
    padding: 0;
    background: color-mix(in srgb, var(--app) 90%, transparent);
    -webkit-backdrop-filter: saturate(160%) blur(12px);
    backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid var(--line);
  }
  .js .docs-toc h2 {
    display: none;
  }
  .js .toc-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    height: 40px;
    padding: 0 var(--gutter);
    border: 0;
    background: none;
    color: var(--sub);
    font: 13.5px var(--font);
    text-align: left;
    cursor: pointer;
  }
  .toc-toggle .toc-now {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--strong);
    font-weight: 600;
  }
  .toc-toggle .toc-now:not(:empty)::before {
    content: '';
    display: inline-block;
    width: 2px;
    height: 12px;
    margin-right: 8px;
    border-radius: 2px;
    background: var(--accent);
    vertical-align: -1px;
  }
  .toc-toggle svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    transition: transform var(--dur-base) var(--ease-out);
  }
  .docs-toc.open .toc-toggle svg {
    transform: rotate(180deg);
  }
  .js .docs-toc ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: min(60vh, 440px);
    overflow-y: auto;
    margin: 0;
    padding: 8px var(--gutter) 14px;
    border-left: 0;
    border-bottom: 1px solid var(--line);
    background: var(--app);
    box-shadow: var(--shadow-lg);
  }
  .js .docs-toc.open ul {
    display: block;
  }
  .js .docs-toc a {
    padding: 7px 0 7px 12px;
    font-size: 14.5px;
  }
  .js .has-toc.docs-layout {
    padding-top: 40px;
  }
  .js .has-toc .docs-side {
    top: 100px;
    max-height: calc(100vh - 100px);
  }
  .filterbar {
    position: static;
    margin-left: 0;
    margin-right: 0;
  }
}
@media (max-width: 820px) {
  .docs-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .docs-side {
    display: none;
  }
  .docs-pick {
    display: block;
    margin: 0 0 20px;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 8px 12px;
    font-size: 14px;
  }
  .docs-pick summary {
    cursor: pointer;
    color: var(--sub);
  }
  .docs-pick ul {
    list-style: none;
    padding: 0;
    margin: 8px 0 4px;
  }
  .docs-pick a {
    display: block;
    padding: 4px 0;
  }
  .prose {
    padding-top: 20px;
  }
  .prose h2 {
    font-size: 22px;
    margin-top: 48px;
  }
  .prose pre {
    font-size: 12.5px;
  }
  .prose .doc-desc {
    font-size: 16.5px;
  }
  .prose li.issue {
    padding: 10px 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  a.card:hover {
    transform: none;
  }
}

/* Promo video */
.promo-shot {
  max-width: 1080px;
  margin: 0 auto;
  border-radius: var(--r-xl);
  overflow: hidden;
  aspect-ratio: 16 / 9;
}
.promo-shot video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- 0.20: language switch, agent sections ---------- */
.langs {
  display: inline-flex;
  align-items: stretch;
  margin-left: 6px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  flex-shrink: 0;
}
.nav .langs a {
  border-radius: 0;
  padding: 5px 9px;
}
.nav .langs a + a {
  border-left: 1px solid var(--line);
}
.nav .langs a[aria-current='true'] {
  color: var(--ink);
  background: var(--hover);
  font-weight: 600;
}
.en-mark {
  color: var(--sub);
  font-weight: 400;
  font-size: 0.9em;
}
figure.shot {
  margin-left: auto;
  margin-right: auto;
}
.fig .shot {
  margin: 0;
}
ol.steps {
  list-style: none;
  margin: 0;
  padding: 0;
}
.step .after {
  margin: 10px 0 0;
  font-size: 15px;
}
:lang(ko) .step p {
  word-break: keep-all;
}
.split {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 32px;
  align-items: start;
}
.split .term pre {
  font-size: 12.8px;
  line-height: 1.65;
  white-space: pre;
}
.metrics {
  display: grid;
  gap: 12px;
}
.method {
  color: var(--sub);
  font-size: 14px;
  margin: 4px 4px 0;
  max-width: 820px;
}
:lang(ko) .method,
:lang(ko) .points li {
  word-break: keep-all;
}
.points {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  max-width: 820px;
  display: grid;
  gap: 10px;
}
.points li {
  position: relative;
  padding-left: 18px;
  color: var(--sub);
}
.points li b {
  color: var(--ink);
}
.points li::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 0.68em;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0.7;
}
.fit .section-head {
  margin-bottom: 0;
}
@media (max-width: 960px) {
  .split {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
}
@media (max-width: 600px) {
  .split .term pre {
    font-size: 11.8px;
  }
  .nav .langs a {
    padding: 5px 7px;
  }
}
.transcript .term pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.agent-links {
  font-size: 14px;
  color: var(--sub);
  margin: -16px auto 0;
  max-width: 720px;
}
:lang(ko) .agent-links {
  word-break: keep-all;
}
.start .section-head {
  margin-bottom: 24px;
}
.protocol {
  max-width: 820px;
  margin: 24px 0 0;
  color: var(--sub);
  font-size: 15px;
}
.protocol b {
  color: var(--ink);
}
.table-title {
  font-size: 17px;
  margin: 28px 0 10px;
}
.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  max-width: 980px;
}
table.tools {
  border-collapse: collapse;
  width: 100%;
  font-size: 14.5px;
}
table.tools th,
table.tools td {
  text-align: left;
  vertical-align: top;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
}
table.tools th {
  background: var(--side);
  font-weight: 600;
}
table.tools tr:last-child td {
  border-bottom: 0;
}
table.tools td:first-child code {
  white-space: nowrap;
  color: var(--accent-ink);
}
table.tools td:nth-child(2) {
  white-space: nowrap;
  color: var(--sub);
}
:lang(ko) table.tools td {
  word-break: keep-all;
}
.wide-shot {
  max-width: 1080px;
  margin: 0 auto 32px;
}
.term[data-copy] pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.video-scenes {
  margin-top: 24px;
}

/* ---------- 0.21: landing layout (bands, side-by-side sections, drawings) ---------- */
:root {
  --dots: radial-gradient(color-mix(in srgb, var(--sub) 30%, transparent) 1px, transparent 1.4px);
}
.landing {
  --wrap: 1200px;
  --stuck: 40px;
}
.landing .foot {
  margin-top: 0;
}

/* Section links under the header; scripts mark the section on screen */
.sections {
  border-top: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.top .sections .wrap {
  height: 40px;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.sections .wrap::-webkit-scrollbar {
  display: none;
}
.sections a {
  flex-shrink: 0;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 13.5px;
  color: var(--sub);
  white-space: nowrap;
  transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.sections a:hover {
  color: var(--ink);
  background: var(--hover);
  text-decoration: none;
}
.sections a[aria-current] {
  color: var(--strong);
  font-weight: 600;
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent);
}

/* Hero: text beside a moving example */
.hero {
  position: relative;
  padding: 64px 0 56px;
  text-align: left;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--dots);
  background-size: 20px 20px;
  -webkit-mask-image: radial-gradient(90% 80% at 85% 10%, #000 20%, transparent 75%);
  mask-image: radial-gradient(90% 80% at 85% 10%, #000 20%, transparent 75%);
  pointer-events: none;
}
.hero > .wrap {
  position: relative;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 11fr) minmax(0, 12fr);
  gap: 56px;
  align-items: center;
}
.hero-text {
  min-width: 0;
}
.hero h1 {
  font-size: clamp(36px, 4.5vw, 58px);
  line-height: 1.1;
  margin: 0 0 20px;
  max-width: none;
  color: var(--strong);
}
:lang(ko) .hero h1 {
  max-width: none;
  line-height: 1.16;
}
.hero .lede {
  margin: 0 0 28px;
  max-width: 34em;
}
.hero .cta {
  justify-content: flex-start;
  margin-bottom: 24px;
}
.hero .fine {
  font-size: 14px;
  color: var(--sub);
  margin: 0 0 8px;
  max-width: 34em;
}
.hero .dev-line {
  margin: -16px 0 24px;
}
:lang(ko) .hero .fine {
  word-break: keep-all;
}
#docs .agent-links {
  margin: 24px 0 0;
  max-width: none;
}
.eyebrow {
  box-shadow: var(--shadow-sm);
}
.eyebrow::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.btn.primary {
  box-shadow: var(--shadow-md);
}
.btn:hover {
  transform: translateY(-1px);
}
.btn:active {
  transform: scale(0.98);
}

/* Window frame shared by the demo and the drawings */
.win {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--app);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}
.win-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 13px;
  border-bottom: 1px solid var(--line);
  background: var(--side);
  font-size: 12px;
  color: var(--sub);
}
.win-bar i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--sub) 38%, transparent);
}
.win-bar span {
  margin-left: 8px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.win.term {
  border-color: rgb(255 255 255 / 0.1);
  background: var(--term-bg);
}
.win.term .win-bar {
  border-bottom-color: rgb(255 255 255 / 0.08);
  background: color-mix(in srgb, var(--term-bg) 90%, #fff);
  color: var(--term-sub);
}

.demo {
  margin: 0;
  min-width: 0;
}
.demo-stage {
  position: relative;
  padding-bottom: 132px;
}
.demo figcaption {
  margin-top: 14px;
  font-size: 13px;
  color: var(--sub);
}
.demo-note {
  margin-right: 9%;
}
.note {
  padding: 18px 24px 26px;
  font-size: 13.5px;
  line-height: 1.5;
}
.note-h1 {
  margin-bottom: 10px;
  font-size: 21px;
  font-weight: 720;
  letter-spacing: -0.02em;
  color: var(--strong);
}
.note-sec {
  position: relative;
  margin: 0 -10px;
  padding: 8px 10px 9px;
  border-radius: var(--r-md);
}
.note-h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
  font-size: 14px;
  font-weight: 660;
  color: var(--strong);
}
.note-ver {
  padding: 0 6px;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line));
  border-radius: 5px;
  font: 500 11px/1.6 var(--mono);
  color: var(--accent-ink);
  background: var(--app);
}
.note-line {
  height: 8px;
  margin: 8px 0;
  border-radius: 4px;
  background: var(--hover);
}
.note-item {
  position: relative;
  padding: 2px 0 2px 24px;
  color: var(--ink);
}
.note-item::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 6px;
  width: 13px;
  height: 13px;
  border: 1.5px solid color-mix(in srgb, var(--sub) 70%, transparent);
  border-radius: 4px;
}
.note-item.is-done {
  color: var(--sub);
}
.note-item.is-done::before {
  border-color: var(--accent);
  background: var(--accent) linear-gradient(135deg, transparent 0 100%);
  box-shadow: inset 0 0 0 2.5px var(--accent), inset 0 0 0 6px var(--app);
}
.note-item.is-new {
  margin: 3px -8px 0;
  padding: 4px 8px 4px 32px;
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--strong);
  font-weight: 560;
}
.note-item.is-new::before {
  left: 10px;
  top: 8px;
  border-color: var(--accent);
}
.note-by {
  margin-left: 8px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--accent-ink);
  white-space: nowrap;
}
.note-ring {
  position: absolute;
  inset: 0;
  border-radius: var(--r-md);
  box-shadow: 0 0 0 1.5px var(--accent), 0 0 0 6px color-mix(in srgb, var(--accent) 16%, transparent);
  pointer-events: none;
}
.demo-term {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 82%;
}
.demo-term pre {
  padding: 13px 16px 15px;
  font-size: 11.8px;
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.caret {
  display: inline-block;
  width: 7px;
  height: 13px;
  margin-left: 4px;
  vertical-align: -2px;
  background: var(--term-accent);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* Numbers under the hero */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 56px;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--app);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 22px 24px 20px;
  border-left: 1px solid var(--line);
  color: inherit;
  transition: background-color var(--dur-base) var(--ease-out);
}
.stat:first-child {
  border-left: 0;
}
.stat:hover {
  background: var(--side);
  text-decoration: none;
}
.stat-num {
  font-size: clamp(32px, 3.4vw, 44px);
  font-weight: 760;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--strong);
  font-variant-numeric: tabular-nums;
}
.stat-num small {
  margin-left: 3px;
  font-size: 0.45em;
  font-weight: 620;
  letter-spacing: 0;
  color: var(--accent-ink);
}
.stat-label {
  margin-top: 4px;
  font-size: 15px;
  font-weight: 620;
}
.stat-note {
  font-size: 13.5px;
  color: var(--sub);
}
:lang(ko) .stat-label,
:lang(ko) .stat-note {
  word-break: keep-all;
}

/* Sections: numbered labels, larger titles, alternating bands */
.landing main {
  counter-reset: sec;
}
.landing section.block {
  counter-increment: sec;
  padding: 92px 0;
}
.landing .section-head {
  margin-bottom: 40px;
}
.landing .section-head .kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.landing .section-head .kicker::before {
  content: counter(sec, decimal-leading-zero);
  padding: 1px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--app);
  font: 500 11.5px/1.6 var(--mono);
  letter-spacing: 0;
  color: var(--sub);
}
.landing .section-head h2 {
  font-size: clamp(28px, 3.5vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.028em;
  font-weight: 730;
  margin-bottom: 14px;
  color: var(--strong);
}
:lang(ko).landing .section-head h2 {
  letter-spacing: -0.02em;
  line-height: 1.22;
}
.band {
  position: relative;
  background: var(--side);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.band-dark {
  background: var(--term-bg);
  color: var(--term-ink);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.band-dark::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgb(255 255 255 / 0.1) 1px, transparent 1.4px);
  background-size: 20px 20px;
  -webkit-mask-image: linear-gradient(#000, transparent 55%);
  mask-image: linear-gradient(#000, transparent 55%);
  pointer-events: none;
}
.band-dark {
  position: relative;
}
.band-dark > .wrap {
  position: relative;
}
.landing .band-dark .section-head h2 {
  color: #fff;
}
.band-dark .section-head p {
  color: var(--term-sub);
}
.landing .band-dark .section-head .kicker {
  color: var(--term-accent);
}
.landing .band-dark .section-head .kicker::before {
  border-color: rgb(255 255 255 / 0.16);
  background: transparent;
  color: var(--term-sub);
}
.band-dark .promo-shot {
  border-color: rgb(255 255 255 / 0.12);
  background: #000;
  box-shadow: 0 30px 70px -20px rgb(0 0 0 / 0.7), 0 0 0 1px rgb(255 255 255 / 0.04);
}
.scenes {
  list-style: none;
  counter-reset: scene;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  max-width: 1080px;
  margin: 36px auto 0;
  padding: 0;
}
.scene {
  counter-increment: scene;
  padding-top: 14px;
  border-top: 1px solid rgb(255 255 255 / 0.16);
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--term-sub);
}
:lang(ko) .scene {
  word-break: keep-all;
}
.scene::before {
  content: counter(scene, decimal-leading-zero);
  display: block;
  margin-bottom: 6px;
  font: 500 12px var(--mono);
  color: var(--term-accent);
}
.scene b {
  display: block;
  margin-bottom: 4px;
  color: #fff;
  font-size: 15.5px;
}
.scene code {
  color: var(--term-ink);
}
.scene a {
  color: var(--term-accent);
}

/* A section whose title stays beside its steps */
.side-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 64px;
  align-items: start;
}
.side-head {
  position: sticky;
  top: calc(92px + var(--stuck, 0px));
  min-width: 0;
}
.landing .side-head .section-head {
  margin-bottom: 24px;
}
.side-body {
  min-width: 0;
}
.side-body .steps,
.side-body .points,
.side-body .callout,
.side-body .protocol,
.side-body .method {
  max-width: none;
}
.side .wrap + .wrap {
  margin-top: 48px;
}
.side .table-scroll {
  max-width: none;
}

/* Steps as a timeline */
.landing .steps {
  gap: 0;
}
.landing .step {
  position: relative;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 18px;
  padding-bottom: 30px;
}
.landing .step:last-child {
  padding-bottom: 0;
}
.landing .step::before {
  position: relative;
  z-index: 1;
  width: 34px;
  height: 34px;
  margin-top: -4px;
  border: 1px solid var(--line);
  background: var(--app);
  color: var(--strong);
  box-shadow: var(--shadow-sm);
  font-family: var(--mono);
  font-size: 13px;
  transition: border-color var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out), background-color var(--dur-base) var(--ease-out);
}
.landing .step:hover::before {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-ink);
}
.landing .step::after {
  content: '';
  position: absolute;
  left: 17px;
  top: 30px;
  bottom: 4px;
  width: 1px;
  background: var(--line);
}
.landing .step:last-child::after {
  display: none;
}
.landing .step h3 {
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--strong);
}

/* Transcript beside metrics, sides swapped on every other section */
.split.flip {
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
}
.split.flip .transcript {
  order: 2;
}
.card {
  box-shadow: var(--shadow-sm);
}
.card:hover {
  border-color: color-mix(in srgb, var(--sub) 40%, var(--line));
  box-shadow: var(--shadow-md);
}
.landing .grid > .card:hover {
  transform: translateY(-2px);
}
.card .num {
  font-size: 30px;
  letter-spacing: -0.03em;
  color: var(--strong);
}
.vs {
  display: grid;
  gap: 5px;
  margin: 8px 0 12px;
}
.vs .bar {
  height: 6px;
  margin: 0;
  border-radius: 3px;
}
.bar.is-after::after {
  background: var(--accent);
}
.card-icon {
  display: block;
  width: 38px;
  height: 38px;
  margin-bottom: 14px;
  padding: 9px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent);
  transition: transform var(--dur-slow) var(--ease-out);
}
.card:hover .card-icon {
  transform: translateY(-2px) rotate(-4deg);
}

/* Screenshots: a window bar and a little lift */
.shot:not(.promo-shot)::before {
  content: '';
  display: block;
  height: 28px;
  border-bottom: 1px solid var(--line);
  background: radial-gradient(circle at 16px 50%, color-mix(in srgb, var(--sub) 40%, transparent) 4px, transparent 4.6px),
    radial-gradient(circle at 31px 50%, color-mix(in srgb, var(--sub) 40%, transparent) 4px, transparent 4.6px),
    radial-gradient(circle at 46px 50%, color-mix(in srgb, var(--sub) 40%, transparent) 4px, transparent 4.6px), var(--side);
}
.landing .shot {
  transition: transform 320ms var(--ease-out), box-shadow 320ms var(--ease-out);
}
.landing .shot:not(.promo-shot):hover {
  transform: translateY(-4px);
}
.band .card,
.band .shot {
  background: var(--app);
}

/* Bulleted points as rows with a marker */
.landing .points {
  gap: 10px;
}
.landing .points li {
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--app);
  box-shadow: var(--shadow-sm);
}
/* no marker on a boxed row: the box and the bold lead-in already set it apart */
.landing .points li::before {
  content: none;
}

/* A plain statement on a band */
.fit .section-head {
  max-width: 880px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.landing .fit .section-head {
  margin-bottom: 0;
}
.fit .section-head p {
  font-size: 18px;
}
.landing .callout {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

/* Drawings (figures.mjs) */
.ill {
  position: relative;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--dots) 0 0 / 18px 18px, var(--app);
  box-shadow: var(--shadow-sm);
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--sub);
}
:lang(ko) .ill {
  word-break: keep-all;
}
.ill b {
  font-weight: 650;
  color: var(--strong);
}
.ill small {
  display: block;
  font-size: 11.5px;
}
.ill-arrow {
  flex-shrink: 0;
  width: 24px;
  height: 12px;
  color: var(--sub);
}
.ill-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--app);
  font-size: 12.5px;
  color: var(--ink);
}
.ill-chip.is-code {
  font-family: var(--mono);
  color: var(--accent-ink);
}
.ill-chip.is-on {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--app);
}

.ill-connect {
  display: grid;
  grid-template-columns: auto 22px auto 24px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}
.ill-people {
  display: grid;
  gap: 8px;
}
.ill-person {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--app);
}
.ill-avatar {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 700;
}
.ill-name {
  font-size: 12.5px;
  font-weight: 620;
  line-height: 1.25;
  color: var(--strong);
  white-space: nowrap;
}
.ill-name small {
  font-weight: 400;
  color: var(--sub);
}
.ill-wires {
  display: grid;
  align-self: stretch;
  gap: 8px;
}
.ill-wires i {
  align-self: center;
  border-top: 1.5px dashed color-mix(in srgb, var(--sub) 55%, transparent);
}
.ill-hub {
  padding: 12px 12px;
  border-radius: var(--r-md);
  background: var(--ink);
  color: var(--app);
  text-align: center;
  box-shadow: var(--shadow-md);
}
.ill-hub code {
  display: block;
  margin: 1px 0;
  font-size: 16px;
  font-weight: 700;
}
.ill-hub small {
  opacity: 0.72;
  white-space: nowrap;
}
.ill-app {
  padding: 12px;
  border: 1px solid var(--accent);
  border-radius: var(--r-md);
  background: var(--accent-soft);
}
.ill-app b {
  display: block;
  margin-bottom: 2px;
  font-size: 15px;
}

.ill-budget {
  display: grid;
  gap: 12px;
}
.ill-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ill-pack {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ill-fit {
  flex: 11;
  display: flex;
  gap: 4px;
  min-width: 0;
  padding: 4px;
  border: 1.5px solid var(--accent);
  border-radius: 10px;
  background: var(--accent-soft);
}
.ill-seg {
  display: grid;
  place-items: center;
  min-width: 0;
  height: 34px;
  overflow: hidden;
  border-radius: 6px;
  background: var(--accent);
  font-size: 11.5px;
  white-space: nowrap;
}
.ill-seg b {
  font-weight: 600;
  color: var(--app);
}
.ill-seg:nth-child(2) {
  background: color-mix(in srgb, var(--accent) 80%, var(--app));
}
.ill-seg:nth-child(3) {
  background: color-mix(in srgb, var(--accent) 62%, var(--app));
}
.ill-free {
  border-radius: 6px;
  background: repeating-linear-gradient(-45deg, transparent 0 5px, color-mix(in srgb, var(--accent) 22%, transparent) 5px 6px);
}
.ill-seg.is-over {
  height: 44px;
  border: 1.5px dashed color-mix(in srgb, var(--sub) 50%, transparent);
  background: none;
}
.ill-seg.is-over b {
  color: var(--sub);
}
.ill-legend {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 11.5px;
}

.ill-patch {
  display: grid;
  gap: 6px;
}
.ill-sec {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px 12px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: var(--r-md);
}
.ill-sec-name {
  font-size: 12.5px;
  font-weight: 620;
  color: var(--ink);
}
.ill-lines {
  display: grid;
  gap: 5px;
}
.ill-lines i {
  height: 6px;
  border-radius: 3px;
  background: var(--hover);
}
.ill-lines i.is-new {
  background: var(--accent);
}
.ill-tag {
  font-size: 11.5px;
}
.ill-tag.is-accent {
  font-weight: 650;
  color: var(--accent-ink);
}
.ill-sec.is-hit {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent);
}
.ill-vers {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ill-vers code {
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--app);
  font-size: 11.5px;
  color: var(--ink);
}

.ill-flow {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin: 0 0 36px;
}
.ill-flow .ill-arrow {
  align-self: center;
}
.ill-step {
  flex: 1;
  min-width: 0;
  padding: 12px 14px 13px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--app);
}
.ill-step small {
  margin-bottom: 3px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.ill-step b {
  display: block;
  font-size: 14px;
  line-height: 1.35;
}
.ill-step.is-accent {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.ill-step.is-accent small {
  color: var(--accent-ink);
}

.ill-ring {
  padding: 10px 12px 12px;
  border: 1.5px dashed color-mix(in srgb, var(--sub) 50%, transparent);
  border-radius: 14px;
  background: color-mix(in srgb, var(--app) 70%, transparent);
}
.ill-ring > span {
  display: block;
  margin-bottom: 8px;
  font-size: 12.5px;
  color: var(--ink);
}
.ill-ring.is-accent {
  border-style: solid;
  border-color: var(--accent);
  background: var(--accent-soft);
}
.ill-ring.is-accent > span {
  margin: 0;
  font-weight: 620;
  color: var(--strong);
}
.ill-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.ill-stack {
  display: grid;
}
.ill-box {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 12px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--app);
}
.ill-box b {
  font-size: 13.5px;
}
.ill-box.is-plain {
  border-style: dashed;
  background: none;
}
.ill-box.is-accent {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.ill-down {
  justify-self: center;
  width: 1.5px;
  height: 14px;
  background: color-mix(in srgb, var(--sub) 55%, transparent);
}
.ill-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}

/* Docs index cards */
.doc-index a.card h3 {
  color: var(--strong);
}
.doc-index a.card:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}

@media (max-width: 960px) {
  .hero-grid,
  .side-grid,
  .split.flip {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }
  .split.flip .transcript {
    order: 0;
  }
  .side-head {
    position: static;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stat:nth-child(odd) {
    border-left: 0;
  }
  .stat:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
  .scenes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .landing section.block {
    padding: 72px 0;
  }
}
@media (max-width: 720px) {
  .ill-flow {
    flex-direction: column;
    align-items: stretch;
  }
  .ill-flow .ill-arrow {
    transform: rotate(90deg);
  }
}
@media (max-width: 600px) {
  .hero {
    padding: 40px 0 44px;
  }
  .demo-stage {
    padding-bottom: 0;
  }
  .demo-note {
    margin-right: 0;
  }
  .demo-term {
    position: relative;
    width: auto;
    margin: -18px 0 0 18px;
  }
  .note {
    padding: 14px 18px 30px;
  }
  .stats {
    margin-top: 40px;
  }
  .stat {
    padding: 16px 16px 14px;
  }
  .scenes {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
  .landing section.block {
    padding: 56px 0;
  }
  .landing .step {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 14px;
  }
  .landing .step::before {
    width: 30px;
    height: 30px;
  }
  .landing .step::after {
    left: 15px;
  }
  .ill-connect {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
  }
  .ill-connect .ill-wires {
    display: none;
  }
  .ill-connect .ill-arrow {
    transform: rotate(90deg);
  }
  .ill-people {
    grid-auto-flow: row;
    justify-self: stretch;
  }
  .ill-hub,
  .ill-app {
    justify-self: stretch;
    text-align: center;
  }
  .ill-sec {
    grid-template-columns: 64px minmax(0, 1fr) auto;
    gap: 6px 8px;
  }
}
@media (max-width: 600px) {
  /* The copy button gets its own row so a command is not squeezed into half the width. */
  .js .step .term[data-copy] pre {
    padding-top: 44px;
    padding-right: 16px;
  }
}

/* Reduced motion also stops the hover movements added above (the earlier block only covered a.card). */
@media (prefers-reduced-motion: reduce) {
  .btn:hover,
  .landing .grid > .card:hover,
  .landing .shot:not(.promo-shot):hover,
  .card:hover .card-icon,
  .chip:active,
  .filter-btn:active {
    transform: none;
  }
  .caret {
    animation: none;
  }
}

/* Performance cards: the source sits on the title row, which keeps a long page a little shorter. */
.t-perf.cards tr.rec {
  grid-template-areas:
    'area area source'
    'change change change'
    'before arrow after'
    'gain gain gain'
    'cost cost cost'
    'method method method';
}
.t-perf.cards td.c-source {
  align-self: start;
  padding-left: 0;
  text-align: right;
  font-size: 13px;
}
.t-perf.cards td.c-source::before {
  position: static;
  display: inline;
  width: auto;
  margin: 0 6px 0 0;
}
@container (max-width: 520px) {
  .t-perf.cards tr.rec {
    grid-template-areas: 'area' 'change' 'before' 'arrow' 'after' 'gain' 'cost' 'method' 'source';
  }
  .t-perf.cards td.c-source {
    text-align: left;
  }
}

/* Name, kind, long description (the MCP tool list): the name is the title, short cells are badges. */
table.cards.t-doc tr.rec {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 8px;
  padding: 14px 18px 16px;
}
table.cards.t-doc td.c-title {
  margin-right: 4px;
  font-size: 16px;
}
table.cards.t-doc td.c-title code {
  padding: 2px 8px;
  font-size: 14.5px;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 25%, transparent);
}
table.cards.t-doc td.c-field:not(.c-body) {
  padding: 1px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 560;
  line-height: 1.6;
  color: var(--sub);
  white-space: nowrap;
}
table.cards.t-doc td.c-field:not(.c-body)::before,
table.cards.t-doc td.c-body::before {
  display: none;
}
table.cards.t-doc td.c-body {
  flex: 0 0 100%;
  font-size: 15px;
  line-height: 1.75;
}

/* Cards on a narrow column: the path gets its own line, a long source goes under the card. */
.t-perf.cards td.c-source.is-long {
  grid-area: auto;
  grid-column: 1 / -1;
  text-align: left;
}
@container (max-width: 520px) {
  .t-endpoint.cards td.c-path {
    grid-column: 1 / -1;
  }
}

/* ---------- Tour (tour/index.html): static text first, the stage is put on top by assets/tour.js ---------- */
.tour {
  padding: 28px 0 0;
}
.tour > .wrap {
  max-width: 1260px;
}
.tour-notice {
  margin: 0 0 30px;
  padding: 12px 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--line));
  border-radius: var(--r-md);
  background: var(--accent-soft);
  color: var(--strong);
  font-size: 15px;
  font-weight: 580;
}
.tour-head h1 {
  max-width: 22em;
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.14;
  letter-spacing: -0.03em;
  font-weight: 740;
  color: var(--strong);
}
.tour-head .lede {
  max-width: 46em;
  margin: 0 0 12px;
  font-size: 18px;
  color: var(--sub);
}
.tour-made {
  max-width: 60em;
  margin: 0;
  font-size: 14px;
  color: var(--sub);
}
:lang(ko) .tour-head h1,
:lang(ko) .tour p {
  word-break: keep-all;
}
.tour h2 {
  margin: 0 0 10px;
  font-size: 22px;
  letter-spacing: -0.015em;
  color: var(--strong);
}
.tour-start,
.tour-sc {
  margin: 36px 0 0;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.tour-start p,
.tour-sc p {
  max-width: 62em;
  margin: 0 0 12px;
}
.tour-n {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font: 650 14px var(--mono);
  vertical-align: 2px;
}
.tour pre {
  margin: 0 0 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--code-bg);
  color: var(--code-ink);
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.tour p code {
  padding: 0.1em 0.35em;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--code-bg);
  font-size: 0.86em;
}
.tour-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--sub);
}
.tour-real {
  font-size: 15px;
  color: var(--sub);
}
.tour-next {
  margin: 56px 0 0;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.tour-page .foot {
  margin-top: 64px;
}

/* With scripts: one scene at a time above the stage */
.tour-on .tour-start,
.tour-on .tour-script,
.tour-on .tour-label {
  display: none;
}
.tour-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin: 30px 0 14px;
}
.tour-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tour-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px 0 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--app);
  color: var(--sub);
  font: 540 14px var(--font);
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.tour-tab b {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--side);
  font: 600 12px var(--mono);
}
.tour-tab:hover {
  color: var(--ink);
  background: var(--side);
}
.tour-tab[aria-pressed='true'] {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--app);
}
.tour-tab[aria-pressed='true'] b {
  background: color-mix(in srgb, var(--app) 22%, transparent);
  color: var(--app);
}
.tour-reset {
  height: 36px;
}
.tour-on .tour-sc {
  margin: 0;
  padding: 18px 20px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--app);
  box-shadow: var(--shadow-sm);
}
.tour-on .tour-sc h2 {
  font-size: 20px;
}
.tour-on .tour-sc p {
  margin-bottom: 8px;
}
.tour-run {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin-top: 14px;
}
.tour-run .btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.tour-hint {
  font-size: 14px;
  font-weight: 560;
  color: var(--accent-ink);
}
.tour-result p {
  margin: 14px 0 0;
  padding: 10px 13px;
  border-radius: var(--r-md);
  background: var(--accent-soft);
  color: var(--strong);
  font-size: 15px;
}
.tour-result .vs {
  max-width: 420px;
}
.tour-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.tour-stage {
  display: grid;
  grid-template-columns: 318px minmax(0, 1fr) minmax(0, 352px);
  gap: 14px;
  align-items: start;
}
.tour-side {
  position: sticky;
  top: 76px;
  min-width: 0;
}
.tour-on .tour-head h1 {
  font-size: clamp(26px, 3vw, 34px);
}
.tour-on .tour-head .lede {
  font-size: 16.5px;
}
.tour-app {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
}
.tour-tree {
  padding: 12px 8px;
  border-right: 1px solid var(--line);
  background: var(--side);
  font-size: 13px;
}
.tour-tree b {
  display: block;
  margin: 0 8px 8px;
  font-size: 12px;
  letter-spacing: 0.03em;
  color: var(--sub);
}
.tour-tree ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.tour-tree li {
  padding: 5px 8px;
  border-radius: var(--r-sm);
  color: var(--sub);
}
.tour-tree li[aria-current] {
  background: var(--accent-soft);
  color: var(--strong);
  font-weight: 600;
  box-shadow: inset 2px 0 0 var(--accent);
}
.tour-note {
  box-shadow: var(--shadow-lg);
}
.tour-note-body {
  padding: 16px 22px 18px;
}
.tour-note-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-bottom: 8px;
}
.tour-note-head h3 {
  margin: 0 auto 0 0;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--strong);
}
.tour-lock {
  padding: 2px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--sub);
}
.tour-lock:not([data-lock='none']) {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 600;
}
.tour-lockbtn {
  height: 30px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--app);
  color: var(--ink);
  font: 500 13px var(--font);
  cursor: pointer;
}
.tour-lockbtn:hover {
  background: var(--side);
}
.tour-lockbtn[aria-pressed='true'] {
  border-color: var(--ink);
}
.tour-sec {
  margin: 0 -10px;
  padding: 8px 10px 10px;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  transition: border-color var(--dur-slow) var(--ease-out), box-shadow var(--dur-slow) var(--ease-out);
}
.tour-sec.is-hit {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent);
}
.tour-sec-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
  margin-bottom: 4px;
}
.tour-sec-head h4 {
  margin: 0;
  font-size: 15px;
  color: var(--strong);
}
.tour-ver {
  padding: 0 6px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  border-radius: 5px;
  font-size: 11.5px;
  color: var(--accent-ink);
}
.tour-by {
  font-size: 12px;
  color: var(--sub);
}
.tour-lines {
  font-size: 14px;
  line-height: 1.6;
}
.tl-line,
.tl-item {
  position: relative;
  padding-left: 20px;
}
.tl-line::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 0.68em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--sub);
}
.tour-edit {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--side);
  color: var(--ink);
  font: 14px/1.65 var(--font);
  resize: vertical;
}
.tour-edit:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.tour .tour-edit-hint {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--sub);
}
.tour-sug {
  margin-top: 10px;
  border: 1px solid var(--accent);
  border-radius: var(--r-md);
  background: var(--app);
  overflow: hidden;
}
.tour-sug-head {
  padding: 8px 12px;
  background: var(--accent-soft);
  font-size: 13px;
  color: var(--ink);
}
.tour-sug-head b {
  margin-right: 6px;
  color: var(--accent-ink);
}
.tour-diff {
  padding: 8px 12px;
  font: 12.5px/1.7 var(--mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.d-ctx {
  color: var(--sub);
}
.d-add {
  margin: 0 -6px;
  padding: 0 6px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--strong);
  font-weight: 600;
}
.tour-sug-actions {
  display: flex;
  gap: 8px;
  padding: 2px 12px 12px;
}
.tour-sug-actions .btn {
  height: 34px;
}
.tour-hist {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
.tour-hist h4 {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sub);
}
.tour-hist ol {
  list-style: none;
  margin: 0;
  padding: 0;
}
.tour-hist li {
  position: relative;
  padding: 2px 0 2px 16px;
  color: var(--ink);
}
.tour-hist li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.72em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--sub) 60%, transparent);
}
.tour-hist li[data-kind='ai']::before {
  background: var(--accent);
}
.tour-hist li.is-empty {
  padding-left: 0;
  color: var(--sub);
}
.tour-hist li.is-empty::before {
  display: none;
}
.tour-agent {
  position: sticky;
  top: 76px;
}
.tour .tour-log {
  /* short enough that the last line (the answer) is on screen before any scrolling */
  height: clamp(280px, calc(100vh - 480px), 540px);
  margin: 0;
  padding: 14px 16px;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--term-ink);
  font-size: 12px;
  line-height: 1.65;
  overflow-y: auto;
}
.tl-call {
  color: var(--term-accent);
  font-weight: 600;
}
.tl-ok {
  color: #86efac;
}
.tl-err,
.tl-held {
  color: #fff;
  font-weight: 600;
}
.tl-note {
  color: var(--term-sub);
}
.tl-rule {
  display: block;
  margin: 6px 0;
  border-top: 1px dashed rgb(255 255 255 / 0.18);
}
@media (max-width: 1100px) {
  .tour-stage,
  .tour-app {
    grid-template-columns: minmax(0, 1fr);
  }
  .tour-tree {
    display: none;
  }
  .tour-side,
  .tour-agent {
    position: static;
  }
  .tour-note {
    scroll-margin-top: 72px;
  }
  .tour .tour-log {
    height: 300px;
  }
}
@media (max-width: 600px) {
  .tour-note-body {
    padding: 14px 16px 16px;
  }
  .tour-on .tour-sc {
    padding: 16px;
  }
  .tour-tab {
    height: 34px;
    padding-right: 11px;
    font-size: 13.5px;
  }
}
.tour-on .tour {
  padding-top: 18px;
}
.tour-on .tour-notice {
  margin-bottom: 20px;
}
.tour-on .tour-bar {
  margin-top: 20px;
}

/* Prompts and the outcome inside the note, shown only where the scene panel is stacked above it */
.tour-inline,
.tour-wait {
  display: none;
}
@media (max-width: 1100px) {
  .tour-inline:not(:empty),
  .tour-wait {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    margin: 8px 0;
    padding: 10px 12px;
    border-radius: var(--r-md);
    background: var(--accent-soft);
    color: var(--strong);
    font-size: 14px;
    font-weight: 560;
  }
  .tour-inline span,
  .tour-wait span {
    flex: 1 1 100%;
  }
  .tour-inline .btn,
  .tour-wait .btn {
    height: 34px;
  }
  .tour-inline .btn:disabled,
  .tour-wait .btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
  }
}
.tour-hint {
  flex: 1 1 100%;
}
.tour-hint:empty {
  display: none;
}
.tour-on .tour-sc .tour-real {
  margin: 14px 0 0;
}

/* ---------- 0.22: page not found (404.html), one-off measurement under the find_context example ---------- */
.notfound {
  padding: clamp(48px, 9vw, 112px) 0 clamp(56px, 10vw, 128px);
}
.notfound .nf {
  max-width: 640px;
}
.notfound .nf + .nf {
  margin-top: 44px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.notfound h1 {
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.15;
  margin: 0 0 12px;
}
.notfound h2 {
  font-size: clamp(22px, 3vw, 28px);
  line-height: 1.2;
  margin: 0 0 10px;
}
.notfound p {
  color: var(--sub);
  margin: 0 0 20px;
}
.notfound .cta {
  justify-content: flex-start;
  margin: 0;
}
.transcript .read-one {
  margin-top: 12px;
}
