:root {
  --ground: #f4f5f7; --panel: #fafbfc; --sunk: #eceef1; --rule: #e1e4e8; --rule-2: #cdd2d8;
  --ink: #0b0d10; --ink-2: #3a414a; --ink-3: #5c646e; --live: #0a7262; --risk: #b3261e;
  --sh: 0 0 0 1px rgb(11 13 16 / 0.06), 0 1px 2px rgb(16 24 40 / 0.04), 0 8px 18px -12px rgb(16 24 40 / 0.18);
  --r: 12px; color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #0b0d10; --panel: #15181c; --sunk: #1d2126; --rule: #252a30; --rule-2: #363c44;
    --ink: #e9ebee; --ink-2: #b5bbc3; --ink-3: #8b939d; --live: #3dbba4; --risk: #ef7268;
    --sh: 0 0 0 1px rgb(233 235 238 / 0.07), 0 10px 22px -14px rgb(0 0 0 / 0.8); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ground: #0b0d10; --panel: #15181c; --sunk: #1d2126; --rule: #252a30; --rule-2: #363c44;
  --ink: #e9ebee; --ink-2: #b5bbc3; --ink-3: #8b939d; --live: #3dbba4; --risk: #ef7268;
  --sh: 0 0 0 1px rgb(233 235 238 / 0.07), 0 10px 22px -14px rgb(0 0 0 / 0.8); color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--ground); }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 15px/24px "Geist", system-ui, sans-serif;
  letter-spacing: -0.003em; font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration-color: var(--rule-2); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink-2); }
code, pre { font: 400 13px/20px "Geist Mono", ui-monospace, monospace; }
.top { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 16px; height: 56px; padding: 0 24px;
  background: color-mix(in srgb, var(--ground) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule); }
.brand { font-weight: 600; text-decoration: none; margin-right: auto; }
.brand span { color: var(--ink-3); font-weight: 500; }
.md { font-size: 13px; color: var(--ink-2); text-decoration: none; }
.theme { width: 32px; height: 32px; border: 0; border-radius: 8px; background: var(--sunk); cursor: pointer; position: relative; }
.theme::after { content: ""; position: absolute; inset: 9px; border-radius: 50%; box-shadow: inset -5px -2px 0 0 var(--ink-2); }
.wrap { display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: 40px; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.side { padding: 24px 0 48px; font-size: 14px; line-height: 20px; }
.side.wide { position: sticky; top: 56px; align-self: start; max-height: calc(100vh - 56px); overflow-y: auto; }
.side p { margin: 20px 0 6px; font-size: 12px; font-weight: 500; color: var(--ink-3); }
.side p:first-child { margin-top: 0; }
.side ul { list-style: none; margin: 0; padding: 0; }
.side a { display: block; padding: 5px 10px; border-radius: 8px; color: var(--ink-2); text-decoration: none; }
.side a.sub { padding-left: 22px; font-size: 13px; }
.side a:hover { background: var(--sunk); color: var(--ink); }
.side a[aria-current] { background: var(--panel); color: var(--ink); box-shadow: var(--sh); font-weight: 500; }
.menu { display: none; }
main { min-width: 0; padding: 32px 0 64px; max-width: 760px; }
h1 { font-size: 30px; line-height: 36px; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 16px; }
h2 { font-size: 19px; line-height: 26px; font-weight: 600; margin: 40px 0 12px; letter-spacing: -0.01em; }
h3 { font-size: 15px; line-height: 22px; font-weight: 600; margin: 28px 0 8px; }
p, ul, ol { margin: 0 0 12px; color: var(--ink-2); }
li { margin: 3px 0; }
li::marker { color: var(--ink-3); }
:not(pre) > code { padding: 1px 5px; border-radius: 5px; background: var(--sunk); color: var(--ink); font-size: 12.5px; }
pre { margin: 0 0 16px; padding: 14px 16px; border-radius: 10px; background: var(--panel); box-shadow: var(--sh); overflow-x: auto; }
.tw { margin: 0 0 16px; overflow-x: auto; border-radius: 10px; background: var(--panel); box-shadow: var(--sh); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; line-height: 20px; }
th, td { text-align: left; vertical-align: top; padding: 8px 12px; border-bottom: 1px solid var(--rule); }
th { font-weight: 500; color: var(--ink-3); font-size: 12.5px; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td { color: var(--ink-2); }
.agents { margin: 0 0 24px; padding: 10px 14px; border-radius: 10px; background: var(--sunk); font-size: 13.5px; }
.agents summary { cursor: pointer; font-weight: 500; color: var(--ink-2); }
.agents ul { margin: 8px 0 2px; }
.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--rule); font-size: 14px; }
.pager a { text-decoration: none; color: var(--ink-2); }
.pager .prev::before { content: "← "; color: var(--ink-3); }
.pager .next::after { content: " →"; color: var(--ink-3); }
.fig { position: relative; margin: 8px 0 24px; padding: 20px; border-radius: var(--r); background: var(--sunk); overflow: hidden; }
.fig figcaption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.flow { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px 0; }
.step { flex: 1 1 0; min-width: 116px; padding: 10px 12px; border-radius: 10px; background: var(--panel); box-shadow: var(--sh); font-size: 13px; line-height: 18px; }
.step b { display: block; font-weight: 500; color: var(--ink); }
.step span { display: block; margin-top: 2px; color: var(--ink-3); }
.step.live b { color: var(--live); }
.step.live { box-shadow: var(--sh), inset 0 0 0 1.5px var(--live); }
.step.risk b { color: var(--risk); }
.step.risk { box-shadow: var(--sh), inset 0 0 0 1.5px var(--risk); }
.step.you { background: var(--ink); }
.step.you b, .step.you span { color: var(--panel); }
.flow.tall { flex-direction: column; gap: 0; }
.tall .step { flex: none; display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 12px; align-items: baseline; }
.tall .step span { margin: 0; }
.tall .link { flex-basis: 12px; width: 2px; height: 12px; margin: 0 0 0 22px; align-self: flex-start; }
.tall .link i { transform-origin: 50% 0; }
.link { flex: 0 0 14px; align-self: center; height: 2px; margin: 0 2px; background: var(--rule-2); border-radius: 1px; }
.link i { display: block; height: 100%; background: var(--ink-3); border-radius: 1px; transform-origin: 0 50%; }
.fig-engine { display: grid; grid-template-columns: minmax(0, 1fr) 150px minmax(0, 1fr); gap: 14px; align-items: center; }
.ins, .outs { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.in, .out { margin: 0; padding: 8px 12px; border-radius: 10px; background: var(--panel); box-shadow: var(--sh); font-size: 13px; line-height: 18px; color: var(--ink); }
.in span { display: block; font-size: 12px; color: var(--ink-3); }
.out { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.out code { font-size: 12px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.out b { font-weight: 500; white-space: nowrap; }
.out em { font-style: normal; }
.bar { position: relative; display: grid; place-items: center; height: 44px; border-radius: 12px; background: var(--panel); box-shadow: var(--sh); overflow: hidden; }
.bar i { position: absolute; inset: 0; background: color-mix(in srgb, var(--ink) 9%, transparent); transform-origin: 0 50%; }
.bar span { position: relative; font-size: 12.5px; font-weight: 500; color: var(--ink-2); text-align: center; }
.fig-dots .claim { margin: 0 0 14px; font-size: 16px; line-height: 24px; color: var(--ink); }
.fig-dots .claim b { font-weight: 600; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cases { display: flex; gap: 6px; flex-wrap: wrap; }
.cases i { width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.cases i.y { background: var(--ink-2); box-shadow: none; }
.seal { position: relative; padding: 3px 10px; border-radius: 6px; background: var(--panel); box-shadow: var(--sh); font-size: 12px; color: var(--ink-2); overflow: hidden; }
.years { display: flex; justify-content: space-between; max-width: 280px; margin: 8px 0 0; font-size: 12px; color: var(--ink-3); }
@media (max-width: 860px) {
  .wrap { display: block; padding: 0 16px; }
  .side.wide { display: none; }
  .menu { display: block; margin: 12px 0 0; }
  .menu summary { cursor: pointer; font-size: 14px; font-weight: 500; padding: 8px 12px; border-radius: 8px; background: var(--sunk); list-style: none; }
  .menu .side { padding: 8px 0 0; }
  .top { padding: 0 16px; }
  main { padding-top: 20px; }
  h1 { font-size: 26px; line-height: 32px; }
  .flow { flex-direction: column; gap: 0; }
  .link { flex-basis: 12px; width: 2px; height: 12px; margin: 0 0 0 20px; align-self: flex-start; }
  .link i { transform-origin: 50% 0; }
  .step { flex: none; }
  .tall .step { grid-template-columns: 1fr; gap: 0; }
  .tall .step span { margin-top: 2px; }
  .fig-engine { grid-template-columns: 1fr; }
  .fig { padding: 16px; }
}
