:root {
    --ground: #FAFAFA; --surface: #FFFFFF; --subtle: #F5F5F5;
    --ink: #171717; --muted: #737373; --rule: #E5E5E5;
    --action: #007AFF; --action-tint: #E6F2FF;
    --brand: #00BC71;  --brand-tint: #E6F8F1;
    --warn: #FF9500;   --warn-tint: #FFF4E6;
    --error: #FF3B30;  --error-tint: #FFEBEA;
    --gold: #FCD63A;   --gold-tint: #FFFBEB;
    --sky: #38B3E8;
    --on-brand: #008A53; --on-warn: #B25E00; --on-error: #D92D20; --on-action: #0062CC;
    --sans: "Noto Kufi Arabic", ui-sans-serif, system-ui, sans-serif;
    --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    --r: 8px;
    --topbar: 60px;
    --sidebar: 288px;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --ground: #171717; --surface: #262626; --subtle: #303030;
        --ink: #E5E5E5; --muted: #A3A3A3; --rule: #404040;
        --action-tint: #14304F; --brand-tint: #0F3A2A;
        --warn-tint: #3A2A0F; --error-tint: #3A1614; --gold-tint: #35300F;
        --on-brand: #3DDC9B; --on-warn: #FFB04D; --on-error: #FF7A70; --on-action: #6CB4FF;
        color-scheme: dark;
    }
}

:root[data-theme="dark"] {
    --ground: #171717; --surface: #262626; --subtle: #303030;
    --ink: #E5E5E5; --muted: #A3A3A3; --rule: #404040;
    --action-tint: #14304F; --brand-tint: #0F3A2A;
    --warn-tint: #3A2A0F; --error-tint: #3A1614; --gold-tint: #35300F;
    --on-brand: #3DDC9B; --on-warn: #FFB04D; --on-error: #FF7A70; --on-action: #6CB4FF;
    color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-padding-top: calc(var(--topbar) + 24px); -webkit-text-size-adjust: 100%; }

body {
    margin: 0; background: var(--ground); color: var(--ink);
    font-family: var(--sans); font-size: 16px; line-height: 1.75;
    font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}

::selection { background: var(--action-tint); }

a { color: var(--action); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { margin: 0; text-wrap: balance; }
p { margin: 0 0 12px; text-wrap: pretty; }
button, select, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; border-radius: 4px; }
mark { background: var(--gold-tint); color: inherit; border-radius: 3px; box-shadow: inset 0 -2px 0 var(--gold); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

code, pre, kbd { font-family: var(--mono); }
:not(pre) > code { font-size: .86em; background: var(--subtle); border-radius: 4px; padding: 1px 5px; word-break: break-word; }
a > code { color: inherit; }
td code { background: none; padding: 0; }

.logo { width: 28px; height: 28px; flex: none; }

.topbar {
    position: fixed; inset: 0 0 auto 0; height: var(--topbar); z-index: 30;
    display: flex; align-items: center; gap: 12px; padding: 0 20px;
    background: var(--surface); border-bottom: 1px solid var(--rule);
}
.progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--action); transform: scaleX(0); transform-origin: left; }

.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; font-size: 17px; width: calc(var(--sidebar) - 150px); min-width: max-content; }
.brand:hover { text-decoration: none; }
.brand-sub { font-weight: 400; color: var(--muted); font-size: 14px; padding-left: 10px; border-left: 1px solid var(--rule); }

.version select {
    height: 36px; padding: 0 28px 0 12px; border: 1px solid var(--rule); border-radius: var(--r);
    background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23737373' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 10px center;
    appearance: none; font-size: 14px; font-family: var(--mono); cursor: pointer;
}
.version select:hover { border-color: var(--action); }

.chip, .version-status, .method, .status, .change {
    display: inline-block; font-size: 13px; line-height: 1.6; border-radius: var(--r); padding: 3px 8px;
    background: var(--subtle); color: var(--ink); white-space: nowrap;
}
.version-status, .chip.ok { background: var(--brand-tint); color: var(--on-brand); text-transform: capitalize; }
.version-status.deprecated, .version-status.retired { background: var(--warn-tint); color: var(--on-warn); }
.version-status.beta { background: var(--action-tint); color: var(--on-action); }

.search-trigger {
    margin-left: auto; display: flex; align-items: center; gap: 8px; height: 36px; width: 280px; padding: 0 10px 0 12px;
    border: 1px solid var(--rule); border-radius: var(--r); background: var(--ground); color: var(--muted); cursor: pointer; font-size: 14px;
}
.search-trigger span { flex: 1; text-align: left; }
.search-trigger:hover { border-color: var(--action); }

kbd { font-size: 11px; padding: 1px 6px; border: 1px solid var(--rule); border-radius: 4px; background: var(--surface); color: var(--muted); }

.segmented { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--rule); border-radius: var(--r); background: var(--subtle); }
.segmented button { border: 0; background: none; height: 28px; padding: 0 12px; border-radius: 6px; font-size: 13px; color: var(--muted); cursor: pointer; }
.segmented button:hover { color: var(--ink); }
.segmented button.on { background: var(--action); color: #fff; }

.tenant { display: flex; align-items: center; height: 36px; border: 1px solid var(--rule); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.tenant span { padding: 0 8px; font-size: 12px; color: var(--muted); background: var(--subtle); align-self: stretch; display: grid; place-items: center; border-right: 1px solid var(--rule); }
.tenant input { width: 116px; height: 100%; border: 0; background: none; padding: 0 10px; font-family: var(--mono); font-size: 13px; outline: none; }
.tenant:focus-within { border-color: var(--action); }
.tenant:has(input:disabled) { opacity: .5; }

.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--rule); border-radius: var(--r); background: var(--surface); cursor: pointer; color: var(--ink); }
.icon-btn:hover { border-color: var(--action); color: var(--action); }
.menu-btn { display: none; }
.moon { display: none; }
:root[data-theme="dark"] .sun { display: none; }
:root[data-theme="dark"] .moon { display: block; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .sun { display: none; }
    :root:not([data-theme="light"]) .moon { display: block; }
}

.sidebar {
    position: fixed; top: var(--topbar); bottom: 0; left: 0; width: var(--sidebar); z-index: 20;
    overflow-y: auto; padding: 24px 16px 48px; background: var(--surface); border-right: 1px solid var(--rule); scrollbar-width: thin;
}
.nav-section { margin-bottom: 24px; }
.nav-section h4 { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 500; color: var(--muted); padding: 0 12px 8px; margin: 0; }
.nav-link { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 12px; border-radius: var(--r); color: var(--ink); font-size: 14px; }
.nav-link:hover { background: var(--subtle); text-decoration: none; }
.nav-link small { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.nav-link.on { color: var(--action); background: var(--action-tint); font-weight: 500; }
.nav-link.on small { color: var(--action); }
.nav-sub { margin: 6px 0 10px 18px; }
.nav-sub a { display: flex; align-items: center; gap: 8px; padding: 5px 0 5px 12px; color: var(--muted); font-size: 13px; border-left: 1px solid var(--rule); line-height: 1.5; }
.nav-sub a:hover, .nav-sub a.on { color: var(--ink); border-left-color: var(--action); text-decoration: none; }
.nav-sub a.on { color: var(--action); }
.nav-sub .method { min-width: 38px; font-size: 10px; padding: 0 4px; }

.main { --col: 1024px; margin-left: var(--sidebar); padding: calc(var(--topbar) + 48px) 48px 64px; outline: none; min-height: 100vh; }
.main.wide, .main.home { --col: 1160px; }
.main > * { max-width: var(--col); margin-left: auto; margin-right: auto; }
.main > .note, .main > .toc { max-width: min(760px, var(--col)); margin-left: max(0px, calc((100% - var(--col)) / 2)); margin-right: auto; }
.main > .layout { display: grid; grid-template-columns: minmax(0, 760px) 200px; gap: 64px; align-items: start; justify-content: center; }
.main.wide > .page-head > *, .main.wide > .prose > :not(.lifecycle):not(.sequence) { max-width: 760px; }

.loading { padding: 80px 0; color: var(--muted); text-align: center; }
.skeleton { max-width: 760px; display: grid; gap: 16px; padding-top: 16px; }
.skeleton i { display: block; height: 20px; border-radius: var(--r); background: var(--subtle); animation: pulse 1.2s ease-in-out infinite; }
.skeleton i:first-child { height: 44px; width: 55%; }
.skeleton i:nth-child(3) { width: 85%; }
.skeleton i:last-child { height: 180px; }
@keyframes pulse { 50% { opacity: .45; } }

.page-head { border-bottom: 1px solid var(--rule); padding-bottom: 24px; margin-bottom: 32px; }
.eyebrow { font-size: 13px; color: var(--action); font-weight: 500; margin: 0 0 8px; }
.page-head h1 { font-size: clamp(28px, 5vw, 36px); font-weight: 500; line-height: 1.3; margin: 0 0 12px; }
.lead { font-size: 17px; color: var(--muted); max-width: 68ch; margin: 0; }
.lead strong, .lead code { color: var(--ink); }

.prose h2 { font-size: 24px; font-weight: 500; line-height: 32px; margin: 48px 0 16px; padding-bottom: 10px; border-bottom: 1px solid var(--rule); }
.prose > h2:first-child { margin-top: 0; }
.prose h2 a, .col-doc h2 a { color: inherit; }
.prose h2 a:hover, .col-doc h2 a:hover { text-decoration: none; }
.prose h2 a:hover::after, .col-doc h2 a:hover::after { content: ' #'; color: var(--action); }
.prose p, .prose ul { max-width: 72ch; }
h3 { font-size: 16px; font-weight: 600; }
h4 { font-size: 16px; font-weight: 600; margin: 24px 0 8px; }
strong { font-weight: 600; }
ul { margin: 0 0 12px; padding-left: 22px; }
li { margin-bottom: 6px; }
li::marker { color: var(--muted); }

.note { background: var(--action-tint); border-radius: var(--r); border-inline-start: 3px solid var(--action); padding: 16px 18px; margin: 16px 0; max-width: 760px; }
.note.warn { background: var(--warn-tint); border-inline-start-color: var(--warn); }
.note > :last-child { margin-bottom: 0; }
.note .lab { font-size: 12px; font-weight: 600; color: var(--on-action); display: block; margin-bottom: 4px; text-transform: capitalize; }
.note.warn .lab { color: var(--on-warn); }
.note code { background: none; padding: 0; font-weight: 500; }

.hero {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center;
    padding: 40px; margin-bottom: 48px; border: 1px solid var(--rule); border-radius: 16px;
    background: linear-gradient(160deg, var(--action-tint) 0%, var(--surface) 45%, var(--brand-tint) 130%);
}
.hero .eyebrow { display: flex; align-items: center; gap: 10px; color: var(--ink); font-size: 14px; margin-bottom: 20px; }
.hero h1 { font-size: clamp(34px, 5vw, 48px); font-weight: 600; line-height: 1.2; letter-spacing: -.01em; margin: 0 0 14px; }
.hero .lead { font-size: 18px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 32px; }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: var(--r); border: 1px solid var(--rule); background: var(--surface); color: var(--ink); font-size: 14px; transition: transform .15s, border-color .15s; }
.btn:hover { border-color: var(--action); color: var(--action); text-decoration: none; }
.btn.primary { background: var(--action); border-color: var(--action); color: #fff; }
.btn.primary:hover { color: #fff; }
.btn.primary:hover svg { transform: translateX(3px); }
.btn svg { transition: transform .15s; }
.stats { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; margin: 0; }
.stats div { padding: 0 18px; border-left: 1px solid var(--rule); }
.stats div:first-child { padding-left: 0; border-left: 0; }
.stats dt { font-size: 17px; white-space: nowrap; font-weight: 600; line-height: 1.3; font-family: var(--mono); }
.stats dd { margin: 0; font-size: 12px; color: var(--muted); }
.hero-demo { display: grid; gap: 12px; min-width: 0; }
.hero-demo .code pre { max-height: 190px; }

.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 0 0 8px; }
.card { display: grid; gap: 14px; align-content: start; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); padding: 20px; color: var(--ink); transition: border-color .15s, transform .15s; }
a.card:hover { border-color: var(--action); text-decoration: none; transform: translateY(-2px); }
.card h3 { margin-bottom: 4px; }
.card p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.65; }
.tile { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: var(--r); background: var(--action-tint); color: var(--on-action); }
.tile.ok { background: var(--brand-tint); color: var(--on-brand); }
.tile.wait { background: var(--warn-tint); color: var(--on-warn); }
.tile.gold { background: var(--gold-tint); color: var(--on-warn); }

.explore { margin-bottom: 24px; }
.explore h3 { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--muted); margin-bottom: 12px; }
.explore-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.explore-card { display: grid; gap: 6px; align-content: start; padding: 16px 18px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); color: var(--ink); transition: border-color .15s; }
.explore-card:hover { border-color: var(--action); text-decoration: none; }
.explore-card strong { font-weight: 600; }
.explore-card p { margin: 0; font-size: 13px; line-height: 1.6; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: none; }
.explore-foot { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.explore-foot .method { min-width: 0; font-size: 11px; padding: 1px 6px; }

.latest { display: grid; border: 1px solid var(--rule); border-radius: var(--r); background: var(--surface); overflow: hidden; max-width: 760px; }
.latest a { display: grid; grid-template-columns: 110px 96px 1fr; gap: 12px; align-items: center; padding: 12px 16px; color: var(--ink); font-size: 15px; }
.latest a + a { border-top: 1px solid var(--subtle); }
.latest a:hover { background: var(--subtle); text-decoration: none; }
.latest time { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.latest strong { font-weight: 500; }
.latest .change { justify-self: start; }

.steps { list-style: none; margin: 0 0 24px; padding: 0; counter-reset: step; max-width: 760px; }
.steps li { position: relative; margin: 0; padding: 0 0 28px 56px; counter-increment: step; }
.steps li::before {
    content: counter(step); position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%;
    display: grid; place-items: center; background: var(--surface); border: 1px solid var(--rule); color: var(--action); font-weight: 600; font-size: 14px; font-family: var(--mono);
}
.steps li:not(:last-child)::after { content: ''; position: absolute; left: 17.5px; top: 40px; bottom: 4px; width: 1px; background: var(--rule); }
.steps h3 { padding-top: 4px; margin-bottom: 4px; }
.steps p { margin: 0; color: var(--muted); }
.steps p code, .steps p strong { color: var(--ink); }

.scroll { overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--r); background: var(--surface); margin: 14px 0; max-width: 760px; }
.main.home .scroll { max-width: 760px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: start; padding: 12px 14px; border-bottom: 1px solid var(--subtle); vertical-align: top; }
thead th { background: var(--subtle); font-weight: 500; font-size: 13px; color: var(--muted); white-space: nowrap; }
thead th code { background: none; padding: 0; color: var(--ink); }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--ground); }

.hosts { display: grid; gap: 12px; margin: 14px 0; max-width: 760px; }
.host { display: grid; grid-template-columns: 120px 1fr; gap: 2px 12px; align-items: center; padding: 16px 18px; border: 1px solid var(--rule); border-radius: var(--r); background: var(--surface); }
.host span { font-weight: 600; }
.host code { background: none; padding: 0; font-size: 14px; color: var(--on-action); }
.host small { grid-column: 2; color: var(--muted); font-size: 13px; }

.lifecycle { margin: 20px 0; padding: 24px; border: 1px solid var(--rule); border-radius: var(--r); background: var(--surface); max-width: 900px; }
.lc-track, .lc-branch { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 28px; }
.lc-node { position: relative; padding: 12px 14px; border: 1px solid var(--rule); border-radius: var(--r); background: var(--ground); display: grid; gap: 2px; }
.lc-node code { background: none; padding: 0; font-size: 14px; font-weight: 500; color: var(--on-action); }
.lc-node small { color: var(--muted); font-size: 12px; line-height: 1.5; }
.lc-step { position: absolute; top: -10px; left: 12px; width: 20px; height: 20px; border-radius: 50%; background: var(--action); color: #fff; font: 600 11px/20px var(--mono); text-align: center; }
.lc-track .lc-node:not(:last-child)::after { content: ''; position: absolute; left: 100%; top: 50%; width: 28px; height: 1px; background: var(--muted); }
.lc-track .lc-node:not(:last-child)::before { content: ''; position: absolute; left: calc(100% + 21px); top: calc(50% - 4px); border: 4px solid transparent; border-left-color: var(--muted); z-index: 1; }
.lc-node.final { border-color: var(--brand); background: var(--brand-tint); }
.lc-node.final code { color: var(--on-brand); }
.lc-node.final .lc-step { background: var(--brand); }
.lc-exit { display: grid; }
.lc-drops { display: flex; gap: 28px; height: 24px; }
.lc-drops i { flex: 1; position: relative; }
.lc-drops i::before { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; border-left: 1px dashed var(--muted); }
.lc-node.exit { border-color: var(--error); background: var(--error-tint); }
.lc-node.exit code { color: var(--on-error); }
.shot { margin: 16px 0 24px; max-width: 760px; border: 1px solid var(--rule); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.shot a { display: block; background: #fff; padding: 16px; text-align: center; }
.shot img { max-width: 100%; max-height: 420px; height: auto; border-radius: 4px; vertical-align: middle; }
.shot figcaption { padding: 10px 16px; border-top: 1px solid var(--rule); background: var(--subtle); font-size: 13px; color: var(--muted); }

.sequence { margin: 20px 0; border: 1px solid var(--rule); border-radius: var(--r); background: var(--surface); max-width: 900px; overflow: hidden; }
.seq-actors { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); background: var(--subtle); border-bottom: 1px solid var(--rule); }
.seq-actors span { padding: 12px 8px; text-align: center; font-size: 14px; font-weight: 600; }
.seq-body { position: relative; padding: 12px 0 20px; }
.seq-line { position: absolute; top: 0; bottom: 0; border-left: 1px dashed var(--rule); }
.seq-step { position: relative; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); padding-top: 14px; }
.seq-arrow { margin: 0 calc(50% / var(--span)); display: grid; gap: 4px; }
.seq-label { justify-self: center; text-align: center; font-size: 13px; line-height: 1.5; background: var(--surface); padding: 0 8px; color: var(--ink); }
.seq-label code { font-size: 12px; }
.seq-label b { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 6px; border-radius: 50%; background: var(--action-tint); color: var(--on-action); font: 600 10px/1 var(--mono); vertical-align: 1px; }
.seq-bar { position: relative; height: 1px; background: var(--action); }
.seq-bar::after { content: ''; position: absolute; top: -4px; border: 4.5px solid transparent; }
.seq-arrow.right .seq-bar::after { right: -1px; border-left-color: var(--action); border-right-width: 0; }
.seq-arrow.left .seq-bar::after { left: -1px; border-right-color: var(--action); border-left-width: 0; }
.seq-arrow.reply .seq-bar { background: none; border-top: 1px dashed var(--muted); }
.seq-arrow.reply.right .seq-bar::after { border-left-color: var(--muted); }
.seq-arrow.reply.left .seq-bar::after { border-right-color: var(--muted); }
.seq-arrow.reply b { background: var(--subtle); color: var(--muted); }

.toc { margin: 8px 0 0; border: 1px solid var(--rule); border-radius: var(--r); background: var(--surface); overflow: hidden; max-width: 760px; }
.toc a { display: grid; grid-template-columns: 64px minmax(0, 1.2fr) minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px 14px; color: var(--ink); font-size: 14px; }
.toc a + a { border-top: 1px solid var(--subtle); }
.toc a:hover { background: var(--subtle); text-decoration: none; }
.toc code { background: none; padding: 0; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toc a > span:last-child { color: var(--muted); text-align: right; }

.method { min-width: 52px; font-family: var(--mono); font-size: 11px; font-weight: 500; text-align: center; padding: 2px 6px; letter-spacing: .02em; }
.method.get { background: var(--brand-tint); color: var(--on-brand); }
.method.post { background: var(--action-tint); color: var(--on-action); }
.method.put, .method.patch { background: var(--warn-tint); color: var(--on-warn); }
.method.delete { background: var(--error-tint); color: var(--on-error); }
.method.hook { background: var(--gold-tint); color: var(--on-warn); }
.method.kind { background: var(--subtle); color: var(--muted); }

.endpoint { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 500px); gap: 48px; padding: 56px 0 0; margin-top: 56px; border-top: 1px solid var(--rule); }
.col-doc h2 { font-size: 24px; font-weight: 500; line-height: 32px; }
.col-doc h3 { margin: 36px 0 0; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: .02em; }
.col-doc h3 + p { margin-top: 10px; }
.route { display: flex; align-items: center; gap: 10px; margin: 14px 0; padding: 6px 6px 6px 10px; border: 1px solid var(--rule); border-radius: var(--r); background: var(--surface); }
.route code { flex: 1; background: none; padding: 0; font-size: 14px; white-space: nowrap; overflow-x: auto; scrollbar-width: none; }
.route em { font-style: normal; color: var(--on-warn); }
.summary { font-size: 17px; color: var(--muted); }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.meta div { display: flex; align-items: center; gap: 8px; padding: 4px 10px; border: 1px solid var(--rule); border-radius: var(--r); background: var(--surface); font-size: 13px; }
.meta dt { color: var(--muted); }
.meta dd { margin: 0; }
.meta code { background: none; padding: 0; font-size: 13px; }
.meta .limit { border-color: transparent; background: var(--warn-tint); }
.meta .limit dt, .meta .limit dd { color: var(--on-warn); }

.fields { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); margin: 10px 0 0; }
.field { padding: 14px 16px; border-bottom: 1px solid var(--subtle); }
.fields > .field:last-child { border-bottom: 0; }
.field-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
code.field-name { font-weight: 500; font-size: 14px; background: none; padding: 0; }
.field-type { font-size: 12px; color: var(--muted); font-family: var(--mono); }
.req { font-size: 11px; color: var(--on-warn); background: var(--warn-tint); border-radius: 4px; padding: 0 6px; line-height: 1.7; }
.field p { margin: 4px 0 0; font-size: 14px; line-height: 1.65; color: var(--muted); max-width: none; }
.field p code, .field p strong { color: var(--ink); }
.fields.nested { margin: 0; border: 0; border-radius: 0; background: var(--ground); border-left: 2px solid var(--action-tint); }

details { margin-top: 10px; border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; }
summary { cursor: pointer; padding: 7px 12px; font-size: 13px; color: var(--action); list-style: none; user-select: none; background: var(--surface); display: flex; align-items: center; gap: 6px; }
summary::-webkit-details-marker { display: none; }
summary::before { content: ''; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform .15s; margin-right: 4px; }
details[open] > summary::before { transform: rotate(45deg); }
summary span { font-family: var(--mono); font-size: 11px; color: var(--muted); background: var(--subtle); border-radius: 4px; padding: 0 5px; }
summary:hover { background: var(--subtle); }
details[open] > summary { border-bottom: 1px solid var(--rule); }
details.schema > .fields { margin: 0; border: 0; border-radius: 0; }

.status { font-family: var(--mono); font-size: 11px; font-weight: 500; padding: 1px 6px; }
.status.ok { background: var(--brand-tint); color: var(--on-brand); }
.status.err { background: var(--error-tint); color: var(--on-error); }
.errors { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); margin: 10px 0 0; }
.error-row { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: start; padding: 12px 16px; border-bottom: 1px solid var(--subtle); }
.error-row:last-child { border-bottom: 0; }
.error-row p { margin: 0; font-size: 14px; line-height: 1.65; }
.col-doc .scroll { margin-top: 10px; }
.common-errors { margin: 10px 0 0; font-size: 13px; line-height: 1.7; color: var(--muted); }
.common-errors code { color: var(--ink); }

.sticky { position: sticky; top: calc(var(--topbar) + 24px); display: grid; gap: 14px; max-height: calc(100vh - var(--topbar) - 48px); overflow-y: auto; scrollbar-width: none; }

.code { margin: 0; border-radius: var(--r); background: var(--surface); border: 1px solid var(--rule); overflow: hidden; min-width: 0; }
.code.inline { margin: 14px 0; max-width: 760px; }
.code figcaption { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 6px 0 14px; min-height: 42px; background: var(--subtle); border-bottom: 1px solid var(--rule); color: var(--muted); font-size: 13px; }
.code figcaption > span { display: flex; align-items: center; gap: 8px; min-width: 0; }
.code figcaption code { background: none; color: var(--ink); padding: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.code pre { margin: 0; padding: 16px 18px; overflow: auto; max-height: 460px; font-size: 13px; line-height: 1.7; tab-size: 2; scrollbar-width: thin; }
.copy { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--muted); font-size: 12px; padding: 6px 10px; border-radius: 6px; cursor: pointer; }
.copy:hover { background: var(--action-tint); color: var(--action); }
.copy.bare { padding: 8px; }
.tabs { gap: 0 !important; margin-left: -8px; align-self: stretch; overflow-x: auto; scrollbar-width: none; }
.tab { flex: none; }
.tabs-label { padding: 0 8px; }
.tab { align-self: stretch; border: 0; background: none; color: var(--muted); font-size: 13px; padding: 0 10px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab:hover { color: var(--ink); }
.tab.on { color: var(--action); border-bottom-color: var(--action); }
.status-tab { font-family: var(--mono); font-size: 12px; }
.status-tab.ok.on { color: var(--on-brand); border-bottom-color: var(--brand); }
.status-tab.err.on { color: var(--on-error); border-bottom-color: var(--error); }
.t-key { color: var(--on-action); }
.t-str { color: var(--on-brand); }
.t-num { color: var(--on-warn); }
.t-lit { color: var(--on-error); }

.changelog { list-style: none; margin: 0; padding: 0; max-width: 860px; }
.changelog li { position: relative; display: grid; grid-template-columns: 124px 1fr; gap: 28px; margin: 0; padding-bottom: 20px; }
.changelog time { font-family: var(--mono); font-size: 13px; color: var(--muted); padding-top: 22px; text-align: right; }
.changelog li::before { content: ''; position: absolute; left: 137px; top: 0; bottom: 0; width: 1px; background: var(--rule); }
.changelog li::after { content: ''; position: absolute; left: 133px; top: 28px; width: 9px; height: 9px; border-radius: 50%; background: var(--surface); border: 2px solid var(--action); }
.change-card { padding: 20px 24px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); }
.changelog h3 { margin: 10px 0 6px; font-size: 17px; }
.changelog p { margin: 0; color: var(--muted); max-width: none; }
.changelog p code { color: var(--ink); }
.change { text-transform: capitalize; font-size: 12px; }
.change.added { background: var(--brand-tint); color: var(--on-brand); }
.change.changed, .change.fixed, .change.deprecated { background: var(--warn-tint); color: var(--on-warn); }
.change.breaking, .change.removed { background: var(--error-tint); color: var(--on-error); }

.rail { position: sticky; top: calc(var(--topbar) + 48px); font-size: 13px; }
.rail p { font-size: 12px; color: var(--muted); margin: 0 0 10px; font-weight: 500; }
.rail a { display: block; color: var(--muted); padding: 5px 0 5px 12px; border-left: 1px solid var(--rule); line-height: 1.5; }
.rail a:hover, .rail a.on { color: var(--action); border-left-color: var(--action); text-decoration: none; }

.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 72px; padding-top: 24px; border-top: 1px solid var(--rule); }
.pager a { display: grid; padding: 12px 16px; border: 1px solid var(--rule); border-radius: var(--r); background: var(--surface); color: var(--ink); min-width: 200px; font-weight: 500; transition: border-color .15s; }
.pager a:hover { border-color: var(--action); color: var(--action); text-decoration: none; }
.pager small { color: var(--muted); font-size: 12px; font-weight: 400; }
.pager .next { text-align: right; }
.updated { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 28px; font-size: 12px; color: var(--muted); }
.updated .logo { width: 18px; height: 18px; }
.updated .links { margin-left: auto; display: flex; flex-wrap: wrap; gap: 6px 16px; }

.search { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .5); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 0; }
.search[hidden] { display: none; }
.search-box { width: 100%; max-width: 640px; background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; animation: pop .14s ease-out; }
@keyframes pop { from { transform: translateY(-6px) scale(.99); opacity: 0; } }
.search-box input { width: 100%; height: 56px; padding: 0 20px; border: 0; border-bottom: 1px solid var(--rule); background: none; font-size: 16px; outline: none; }
.search-box ul { list-style: none; margin: 0; padding: 8px; max-height: 52vh; overflow-y: auto; scrollbar-width: thin; }
.search-box li { margin: 0; }
.search-box li.group { padding: 6px 12px; font-size: 12px; color: var(--muted); }
.search-box li a { display: grid; grid-template-columns: 62px minmax(0, auto) minmax(0, 1fr); align-items: center; gap: 12px; padding: 8px 12px; border-radius: var(--r); color: var(--ink); font-size: 15px; }
.search-box li a.on, .search-box li a:hover { background: var(--action-tint); text-decoration: none; }
.search-box li strong { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-box li small { font-family: var(--mono); font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; }
.search-box .empty { padding: 20px 12px; color: var(--muted); }
.search-hint { display: flex; gap: 6px; align-items: center; padding: 8px 16px; border-top: 1px solid var(--rule); font-size: 12px; color: var(--muted); background: var(--ground); }

.toast { position: fixed; left: 50%; bottom: 28px; z-index: 60; transform: translate(-50%, 12px); opacity: 0; pointer-events: none; padding: 8px 16px; border-radius: var(--r); background: var(--ink); color: var(--ground); font-size: 14px; transition: opacity .15s, transform .15s; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

.scrim { display: none; }

@media (max-width: 1360px) {
    .hero { grid-template-columns: minmax(0, 1fr); gap: 32px; }
    .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tenant { display: none; }
}

@media (max-width: 1280px) {
    .endpoint { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .sticky { position: static; max-height: none; }
    .main, .main.wide { --col: 760px; }
    .main.home { --col: 900px; }
    .main > .layout { grid-template-columns: minmax(0, 760px); }
    .rail { display: none; }
}

@media (max-width: 900px) {
    .menu-btn { display: grid; }
    .sidebar { transform: translateX(-100%); transition: transform .2s; width: min(86vw, 300px); }
    .nav-open .sidebar { transform: none; }
    .nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 15; background: rgba(0, 0, 0, .5); }
    .main { margin-left: 0; padding: calc(var(--topbar) + 24px) 16px 48px; }
    .topbar { padding: 0 12px; gap: 8px; }
    .brand { width: auto; }
    .brand-sub, .version-status, .search-trigger span, .search-trigger kbd, .env { display: none; }
    .search-trigger { width: 36px; padding: 0; justify-content: center; }
    .hero { padding: 24px 20px; margin-bottom: 32px; }
    .stats { grid-template-columns: repeat(2, auto); gap: 12px 0; }
    .stats div { padding: 0 14px; }
    .stats div:nth-child(3) { padding-left: 0; border-left: 0; }
    .cards { grid-template-columns: 1fr; }
    .card { grid-template-columns: 44px 1fr; }
    .toc a { grid-template-columns: 64px 1fr; }
    .toc a > span:last-child { display: none; }
    .latest a { grid-template-columns: 1fr auto; }
    .latest time { display: none; }
    .changelog li { grid-template-columns: 1fr; gap: 6px; padding-bottom: 16px; }
    .changelog li::before, .changelog li::after { display: none; }
    .changelog time { padding: 0; text-align: left; }
    .host { grid-template-columns: 1fr; }
    .host small { grid-column: 1; }
    .lifecycle { padding: 20px 16px; }
    .lc-track, .lc-branch { grid-template-columns: 1fr; gap: 20px; }
    .lc-track .lc-node:not(:last-child)::after { left: 24px; top: 100%; width: 1px; height: 20px; }
    .lc-track .lc-node:not(:last-child)::before { left: 20.5px; top: calc(100% + 13px); border: 4px solid transparent; border-top-color: var(--muted); }
    .lc-exit { grid-column: 1 !important; }
    .lc-drops { display: none; }
    .lc-branch { margin-top: 12px; }
    .seq-actors span, .seq-label { font-size: 12px; }
    .seq-label code { font-size: 11px; }
    .search-box li a { grid-template-columns: 62px 1fr; }
    .search-box li small { display: none; }
    table { min-width: 520px; }
}

@media (prefers-reduced-motion: reduce) {
    * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
