:root {
    color-scheme: dark;
    --background: #070a10;
    --surface: #101722;
    --surface-raised: #151e2b;
    --surface-soft: #0d1420;
    --border: #273449;
    --border-subtle: #1b2637;
    --text: #f1f5fb;
    --text-secondary: #bdc8d8;
    --text-muted: #96a5ba;
    --blue: #7cacff;
    --green: #45d9a7;
    --warning: #ffca74;
    --sidebar-width: 18rem;
    --content-width: 66rem;
    --radius-small: 0.5rem;
    --radius: 0.875rem;
    --shadow: 0 1.5rem 4rem rgb(0 0 0 / 0.24);
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 2rem;
}

body {
    margin: 0;
    min-width: 20rem;
    background: radial-gradient(circle at 78% -8%, rgb(78 141 255 / 0.09), transparent 29rem), var(--background);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.7;
    text-rendering: optimizeLegibility;
}

body.nav-open { overflow: hidden; }
a { color: var(--blue); text-decoration-thickness: 0.08em; text-underline-offset: 0.2em; }
a:hover { color: #a9c8ff; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
:focus-visible { outline: 0.2rem solid #9bc0ff; outline-offset: 0.2rem; }
::selection { background: rgb(78 141 255 / 0.35); color: #fff; }

.skip-link {
    position: fixed;
    z-index: 1000;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.65rem 0.9rem;
    transform: translateY(-160%);
    border-radius: var(--radius-small);
    background: var(--text);
    color: var(--background);
    font-weight: 700;
    text-decoration: none;
    transition: transform 140ms ease;
}

.skip-link:focus { transform: translateY(0); }
.mobile-header { display: none; }

.sidebar {
    position: fixed;
    z-index: 30;
    inset: 0 auto 0 0;
    display: flex;
    width: var(--sidebar-width);
    flex-direction: column;
    overflow-y: auto;
    border-right: 1px solid var(--border-subtle);
    background: rgb(8 12 19 / 0.96);
    padding: 1.5rem 1.25rem;
    scrollbar-width: thin;
}

.sidebar-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; }
.brand, .mobile-brand { display: inline-flex; align-items: center; gap: 0.75rem; color: var(--text); text-decoration: none; }
.brand:hover, .mobile-brand:hover { color: var(--text); }
.brand-mark { display: block; width: 2.25rem; height: 2.25rem; flex: 0 0 2.25rem; }

.brand-copy { display: flex; flex-direction: column; line-height: 1.25; }
.brand-copy strong { font-size: 1.06rem; letter-spacing: -0.015em; }
.brand-copy span { margin-top: 0.15rem; color: var(--text-muted); font-size: 0.75rem; }
.sidebar-close { display: none; }

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    align-self: flex-start;
    margin-top: 1.15rem;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 650;
    text-decoration: none;
}

.back-link::before { color: var(--green); content: "←"; }
.docs-search { position: relative; min-width: 0; }
.docs-search--sidebar { margin-top: 1rem; }
.docs-search--mobile { display: none; }
.docs-search input {
    width: 100%;
    min-height: 2.55rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
    background: #0b111b;
    padding: 0.55rem 0.75rem;
    color: var(--text);
    font-size: 0.82rem;
}
.docs-search input::placeholder { color: var(--text-muted); opacity: 1; }
.docs-search input:focus { border-color: rgb(124 172 255 / 0.65); }
.search-results { position: absolute; z-index: 60; top: calc(100% + 0.45rem); left: 0; width: min(25rem, calc(100vw - 2rem)); overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: #0b111b; box-shadow: var(--shadow); }
.search-status { margin: 0; border-bottom: 1px solid var(--border-subtle); padding: 0.55rem 0.7rem; color: var(--text-muted); font-size: 0.72rem; }
.search-results ul { display: grid; max-height: min(25rem, 55vh); margin: 0; padding: 0.35rem; overflow-y: auto; list-style: none; }
.search-results a { display: flex; flex-direction: column; border-radius: 0.42rem; padding: 0.55rem 0.65rem; color: var(--text); text-decoration: none; }
.search-results a:hover, .search-results a:focus-visible { background: rgb(124 172 255 / 0.1); }
.search-results strong { font-size: 0.82rem; line-height: 1.35; }
.search-results span { margin-top: 0.15rem; color: var(--text-muted); font-size: 0.7rem; }
.docs-search--sidebar .search-results { width: 100%; }
.sidebar-nav { display: flex; flex: 1; flex-direction: column; gap: 1.15rem; margin-top: 2rem; }
.nav-group h2 { margin: 0 0 0.35rem 0.7rem; color: var(--text-muted); font-size: 0.68rem; font-weight: 750; letter-spacing: 0.1em; line-height: 1.4; text-transform: uppercase; }
.nav-group ul { display: grid; gap: 0.15rem; margin: 0; padding: 0; list-style: none; }

.nav-group a {
    display: flex;
    min-height: 2.15rem;
    align-items: center;
    border: 1px solid transparent;
    border-radius: 0.55rem;
    padding: 0.35rem 0.7rem;
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 580;
    text-decoration: none;
    transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.nav-group a:hover { background: rgb(124 172 255 / 0.07); color: var(--text); }
.nav-group a[aria-current="page"] { border-color: rgb(124 172 255 / 0.2); background: linear-gradient(90deg, rgb(78 141 255 / 0.16), rgb(69 217 167 / 0.06)); color: #edf5ff; }
.nav-group a[aria-current="location"] { color: var(--green); }
.sidebar-meta { margin: 1.5rem 0 0; border-top: 1px solid var(--border-subtle); padding-top: 1rem; color: var(--text-muted); font-size: 0.75rem; }
.sidebar-overlay { position: fixed; z-index: 20; inset: 0; background: rgb(0 0 0 / 0.68); backdrop-filter: blur(0.15rem); }

.docs-main { min-height: 100vh; margin-left: var(--sidebar-width); }
.content-wrap { width: min(100%, calc(var(--content-width) + 5rem)); margin: 0 auto; padding: 4.5rem 2.5rem 2rem; }
.page-header { position: relative; margin-bottom: 3.75rem; padding-bottom: 2.25rem; border-bottom: 1px solid var(--border-subtle); }
.page-header::after { position: absolute; bottom: -1px; left: 0; width: 8rem; height: 1px; background: linear-gradient(90deg, #4e8dff, var(--green)); content: ""; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0 0 1.8rem; padding: 0; color: var(--text-muted); font-size: 0.82rem; list-style: none; }
.breadcrumb li + li::before { margin-right: 0.35rem; color: #72819a; content: "/"; }
.breadcrumb a { color: var(--text-secondary); text-decoration: none; }
.eyebrow, .section-kicker { margin: 0 0 0.6rem; color: var(--green); font-size: 0.74rem; font-weight: 780; letter-spacing: 0.1em; text-transform: uppercase; }
h1, h2, h3 { color: var(--text); font-weight: 720; letter-spacing: -0.025em; line-height: 1.2; }
h1 { max-width: 50rem; margin: 0; font-size: clamp(2.35rem, 6vw, 4.35rem); }
h2 { margin: 0; font-size: clamp(1.55rem, 3vw, 2.1rem); }
h3 { margin: 0; font-size: 1.08rem; }
h4 { margin: 0; color: var(--text); font-size: 0.96rem; line-height: 1.35; }
.page-summary { max-width: 48rem; margin: 1.25rem 0 0; color: var(--text-secondary); font-size: clamp(1.06rem, 2vw, 1.25rem); line-height: 1.65; }

.content-status {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 1.5rem 0 0;
    border: 1px solid rgb(69 217 167 / 0.2);
    border-radius: 999px;
    background: rgb(69 217 167 / 0.06);
    padding: 0.38rem 0.75rem;
    color: #a9ddcc;
    font-size: 0.76rem;
    font-weight: 650;
}

.section-block { margin-top: 4.5rem; scroll-margin-top: 2rem; }
.section-heading { max-width: 47rem; margin-bottom: 1.7rem; }
.section-heading > p:last-child, .section-block > p, .feature-card p, .endpoint-card p, .placeholder-section p { color: var(--text-secondary); }
.section-heading > p:last-child, .section-block > p { margin: 0.85rem 0 0; }
.placeholder-section { border-top: 1px solid var(--border-subtle); padding-top: 2rem; }
.placeholder-section h2 code { font-size: 0.82em; }

.local-toc { border: 1px solid var(--border-subtle); border-radius: var(--radius); background: linear-gradient(135deg, rgb(16 23 34 / 0.9), rgb(11 16 25 / 0.9)); padding: 1rem 1.15rem; }
.local-toc strong { color: var(--text); font-size: 0.82rem; }
.local-toc ul { display: flex; flex-wrap: wrap; gap: 0.35rem 1.25rem; margin: 0.55rem 0 0; padding: 0; list-style: none; }
.local-toc a { color: var(--text-secondary); font-size: 0.86rem; text-decoration: none; }
.local-toc a:hover, .local-toc a[aria-current="location"] { color: var(--green); }

.card-grid { display: grid; gap: 1rem; }
.card-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card-grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.feature-card { position: relative; min-width: 0; border: 1px solid var(--border); border-radius: var(--radius); background: linear-gradient(145deg, rgb(21 30 43 / 0.82), rgb(11 16 25 / 0.9)); padding: 1.35rem; }
.feature-card.placeholder-section { margin-top: 0; padding-top: 1.35rem; }
.feature-card p { margin: 0.65rem 0 0; font-size: 0.94rem; }
.step-number { display: block; margin-bottom: 1.25rem; color: var(--green); font-family: var(--font-mono); font-size: 0.78rem; font-weight: 750; }

.definition-grid { display: grid; gap: 1rem; }
.definition-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.definition-grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.definition-card { min-width: 0; border: 1px solid var(--border); border-radius: var(--radius); background: linear-gradient(145deg, rgb(21 30 43 / 0.82), rgb(11 16 25 / 0.9)); padding: 1.25rem; }
.definition-card > code { display: inline-block; margin-bottom: 0.7rem; }
.definition-card p { margin: 0.5rem 0 0; color: var(--text-secondary); font-size: 0.92rem; }

.quick-steps { display: grid; gap: 2.75rem; margin: 2rem 0 0; padding: 0; list-style: none; }
.quick-step { display: grid; grid-template-columns: 2.65rem minmax(0, 1fr); gap: 1rem; }
.quick-step-marker { display: grid; width: 2.4rem; height: 2.4rem; place-items: center; border: 1px solid rgb(124 172 255 / 0.42); border-radius: 50%; background: linear-gradient(135deg, rgb(78 141 255 / 0.18), rgb(69 217 167 / 0.1)); color: #d7e7ff; font-family: var(--font-mono); font-size: 0.76rem; font-weight: 800; }
.quick-step-content { min-width: 0; }
.quick-step-content > h3 { margin-top: 0.35rem; }
.quick-step-content > p { margin: 0.65rem 0 0; color: var(--text-secondary); }
.callback-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.85rem; margin: 1.5rem 0 0; padding: 0; list-style: none; }
.callback-steps li { display: flex; min-width: 0; gap: 0.75rem; border: 1px solid var(--border-subtle); border-radius: var(--radius); background: rgb(13 20 32 / 0.62); padding: 1rem; }
.callback-steps li > span { display: grid; width: 1.75rem; height: 1.75rem; flex: 0 0 auto; place-items: center; border: 1px solid rgb(124 172 255 / 0.4); border-radius: 50%; color: var(--blue); font-family: var(--font-mono); font-size: 0.72rem; font-weight: 800; }
.callback-steps p { margin: 0.3rem 0 0; color: var(--text-secondary); font-size: 0.82rem; line-height: 1.5; }
.required-inputs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; margin-top: 1rem; }
.required-inputs > div { border: 1px solid var(--border-subtle); border-radius: var(--radius-small); background: rgb(13 20 32 / 0.7); padding: 0.85rem; }
.required-inputs strong { display: block; color: var(--text); font-size: 0.88rem; }
.required-inputs span { display: block; margin-top: 0.25rem; color: var(--text-secondary); font-size: 0.82rem; }
.required-inputs p { margin: 0.45rem 0 0; color: var(--text-secondary); font-size: 0.82rem; }
.example-label { margin: 1.25rem 0 -0.65rem !important; color: var(--green) !important; font-size: 0.74rem; font-weight: 750; letter-spacing: 0.07em; text-transform: uppercase; }
.example-note { color: var(--text-muted) !important; font-size: 0.82rem; }
.callout-stack { display: grid; gap: 0.9rem; margin-top: 1.5rem; }
.callout-stack .callout { margin: 0; }
.family-grid, .link-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.family-grid > div, .link-grid a { min-width: 0; border: 1px solid var(--border-subtle); border-radius: var(--radius); background: rgb(16 23 34 / 0.55); padding: 1rem; }
.family-grid strong, .family-grid span { display: block; }
.family-grid span { margin-top: 0.3rem; color: var(--text-secondary); font-size: 0.86rem; }
.family-grid + .endpoint-card { margin-top: 1rem; }
.family-grid p { margin: 0.45rem 0 0; color: var(--text-secondary); font-size: 0.9rem; }
.currency-catalog { margin-bottom: 1rem; }
.catalog-status { display: flex; align-items: flex-start; gap: 0.65rem; border: 1px solid var(--border-subtle); border-radius: var(--radius-small); background: rgb(13 20 32 / 0.62); padding: 0.75rem 0.85rem; color: var(--text-secondary); font-size: 0.84rem; }
.catalog-status-indicator { width: 0.65rem; height: 0.65rem; flex: 0 0 auto; margin-top: 0.35rem; border: 2px solid var(--blue); border-right-color: transparent; border-radius: 50%; animation: catalog-spin 900ms linear infinite; }
.catalog-status[data-state="success"] .catalog-status-indicator { border: 0; background: var(--green); animation: none; }
.catalog-status[data-state="empty"] .catalog-status-indicator { border: 0; background: var(--warning); animation: none; }
.catalog-status[data-state="error"] .catalog-status-indicator { border: 0; background: #ff8f91; animation: none; }
.catalog-fallback { border: 1px solid var(--border-subtle); border-radius: var(--radius-small); background: rgb(13 20 32 / 0.62); padding: 0.75rem 0.85rem; color: var(--text-secondary); }
.catalog-table-scroll { margin-bottom: 1rem; }
.catalog-table { min-width: 52rem; }
.catalog-ticker, .catalog-minimum { font-family: var(--font-mono); font-size: 0.82rem; }
.catalog-action { border: 1px solid #34445d; border-radius: 0.42rem; background: #151e2b; padding: 0.34rem 0.65rem; color: var(--text-secondary); cursor: pointer; font-size: 0.76rem; font-weight: 680; white-space: nowrap; }
.catalog-action:hover { border-color: #55729a; color: var(--text); }
.catalog-details-row > td { background: #0b111b; padding: 1rem; }
.asset-info { min-width: 0; }
.asset-info-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.75rem; margin: 0; }
.asset-info-grid > div { min-width: 0; border: 1px solid var(--border-subtle); border-radius: var(--radius-small); background: rgb(16 23 34 / 0.65); padding: 0.7rem; }
.asset-info-grid dt { color: var(--text-muted); font-size: 0.66rem; font-weight: 750; letter-spacing: 0.06em; text-transform: uppercase; }
.asset-info-grid dd { margin: 0.3rem 0 0; overflow-wrap: anywhere; color: var(--text); font-family: var(--font-mono); font-size: 0.78rem; }
.asset-info-note, .asset-info-error, .asset-info-loading { margin: 0.75rem 0 0; color: var(--text-secondary); font-size: 0.8rem; }
.asset-info-error + .catalog-action { margin-top: 0.65rem; }
.link-grid a { display: flex; flex-direction: column; color: var(--text); text-decoration: none; transition: border-color 140ms ease, background 140ms ease, transform 140ms ease; }
.link-grid a:hover { border-color: rgb(124 172 255 / 0.38); background: var(--surface); color: var(--text); transform: translateY(-0.1rem); }
.link-grid span { margin-top: 0.3rem; color: var(--text-muted); font-size: 0.82rem; }

.subsection-title { margin-top: 2.25rem; }
.subsection-title + p { margin: 0.65rem 0 0; color: var(--text-secondary); }
.scenario-card { border: 1px solid rgb(124 172 255 / 0.28); border-radius: var(--radius); background: linear-gradient(135deg, rgb(78 141 255 / 0.1), rgb(69 217 167 / 0.05)); padding: 1.25rem; }
.scenario-card p { margin: 0; color: var(--text-secondary); }
.scenario-label { margin-bottom: 0.5rem !important; color: var(--green) !important; font-size: 0.72rem; font-weight: 750; letter-spacing: 0.08em; text-transform: uppercase; }
.independent-flows { display: grid; gap: 0.65rem; margin: 1rem 0; }
.independent-flows > div { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; border: 1px solid var(--border-subtle); border-radius: var(--radius-small); background: rgb(13 20 32 / 0.62); padding: 0.75rem 0.9rem; color: var(--text-secondary); font-size: 0.86rem; }
.independent-flows strong { color: var(--text); }
.independent-flows [aria-hidden="true"] { color: var(--green); }
.check-list { display: grid; gap: 0.7rem; margin: 1.2rem 0 0; padding: 0; list-style: none; }
.check-list li { position: relative; padding-left: 1.65rem; color: var(--text-secondary); }
.check-list li::before { position: absolute; top: 0; left: 0; color: var(--green); content: "✓"; font-weight: 800; }
.comparison-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1rem; }
.comparison-grid article { border: 1px solid var(--border-subtle); border-radius: var(--radius); background: rgb(13 20 32 / 0.62); padding: 1rem; }
.comparison-grid p { margin: 0.5rem 0 0; color: var(--text-secondary); font-size: 0.9rem; }
.rule-list { display: grid; gap: 0.65rem; }
.rule-list > div { display: grid; grid-template-columns: minmax(8.5rem, 0.35fr) minmax(0, 1fr); gap: 1rem; border-bottom: 1px solid var(--border-subtle); padding: 0.7rem 0; }
.rule-list strong { color: var(--text); }
.rule-list span { color: var(--text-secondary); }
.status-chip { display: inline-flex; align-items: center; border-radius: 999px; padding: 0.15rem 0.5rem; font-size: 0.72rem; font-weight: 750; }
.status-chip--success { background: rgb(69 217 167 / 0.12); color: #86e9c8; }
.status-chip--warning { background: rgb(255 202 116 / 0.12); color: #ffd894; }
.equation { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.75rem; margin: 1.5rem 0; border: 1px solid var(--border); border-radius: var(--radius); background: #080c13; padding: 1.25rem; color: var(--text-secondary); }
.equation span { color: var(--green); font-weight: 800; }
.accounting-example { display: grid; grid-template-columns: minmax(14rem, 0.7fr) minmax(0, 1.3fr); gap: 1rem; margin-top: 1rem; }
.accounting-example dl { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-content: start; margin: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.accounting-example dt, .accounting-example dd { border-bottom: 1px solid var(--border-subtle); padding: 0.75rem 1rem; }
.accounting-example dt { color: var(--text-secondary); font-size: 0.82rem; }
.accounting-example dd { margin: 0; color: var(--text); font-family: var(--font-mono); font-size: 0.82rem; text-align: right; }
.accounting-example dt:last-of-type, .accounting-example dd:last-of-type { border-bottom: 0; }
.accounting-example .code-example { margin-top: 0; }

.endpoint-card { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.endpoint-stack { display: grid; gap: 0.85rem; }
.endpoint-stack + p { margin-top: 1rem; }
.endpoint-heading { display: flex; min-width: 0; align-items: center; gap: 0.85rem; border-bottom: 1px solid var(--border-subtle); background: var(--surface-raised); padding: 0.9rem 1rem; }
.endpoint-heading code { overflow-wrap: anywhere; color: #e5edf9; font-family: var(--font-mono); font-size: 0.92rem; }
.endpoint-card p { margin: 0; padding: 1rem; }
.method-badge { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; border-radius: 0.35rem; padding: 0.25rem 0.48rem; font-family: var(--font-mono); font-size: 0.68rem; font-weight: 800; letter-spacing: 0.035em; }
.method-badge--get { background: rgb(69 217 167 / 0.14); color: #76e8c1; }
.method-badge--post { background: rgb(78 141 255 / 0.16); color: #9ec2ff; }
.method-badge--dual { background: linear-gradient(90deg, rgb(69 217 167 / 0.14), rgb(78 141 255 / 0.16)); color: #b7d9ff; }

.transport-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.85rem; margin-top: 1rem; }
.transport-grid article { min-width: 0; border: 1px solid var(--border-subtle); border-radius: var(--radius); background: rgb(13 20 32 / 0.62); padding: 1rem; }
.transport-grid p { margin: 0.5rem 0 0; color: var(--text-secondary); font-size: 0.88rem; }

.endpoint-reference .endpoint-body { padding: 1rem; }
.endpoint-reference .endpoint-body h2 { font-size: clamp(1.35rem, 2.5vw, 1.8rem); }
.endpoint-reference .endpoint-body p { margin: 0.45rem 0 0; padding: 0; }
.reference-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1.25rem; }
.reference-grid > div { min-width: 0; }
.reference-grid h3 { margin-bottom: 0.65rem; }
.reference-grid .code-example { height: calc(100% - 1.75rem); margin-top: 0; }
.endpoint-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 1rem 0 0; border: 1px solid var(--border-subtle); border-radius: var(--radius); background: rgb(13 20 32 / 0.62); }
.endpoint-meta dl { margin: 0; padding: 0.85rem 1rem; }
.endpoint-meta dl + dl { border-left: 1px solid var(--border-subtle); }
.endpoint-meta dt { color: var(--text-muted); font-size: 0.7rem; font-weight: 750; letter-spacing: 0.07em; text-transform: uppercase; }
.endpoint-meta dd { margin: 0.3rem 0 0; color: var(--text-secondary); font-size: 0.9rem; }
.range-list { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.25rem; }
.range-list span { border: 1px solid var(--border-subtle); border-radius: 999px; background: rgb(13 20 32 / 0.62); padding: 0.38rem 0.65rem; color: var(--text-secondary); font-size: 0.76rem; }

.table-scroll { max-width: 100%; margin-top: 1.25rem; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overscroll-behavior-inline: contain; }
table { width: 100%; min-width: 48rem; border-collapse: collapse; text-align: left; }
caption { padding: 0.85rem 1rem; border-bottom: 1px solid var(--border); color: var(--text-secondary); font-size: 0.82rem; font-weight: 650; text-align: left; }
th, td { padding: 0.8rem 1rem; border-bottom: 1px solid var(--border-subtle); vertical-align: top; }
thead th { background: var(--surface-raised); color: var(--text-muted); font-size: 0.69rem; font-weight: 750; letter-spacing: 0.07em; text-transform: uppercase; }
tbody th { color: var(--text); font-weight: 650; }
tbody td { color: var(--text-secondary); font-size: 0.9rem; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }

code, pre { font-family: var(--font-mono); }
:not(pre) > code { border: 1px solid var(--border); border-radius: 0.35rem; background: rgb(124 172 255 / 0.07); padding: 0.08em 0.34em; color: #cfe1ff; font-size: 0.88em; }
.code-example { margin-top: 1.25rem; overflow: hidden; border: 1px solid #26354a; border-radius: var(--radius); background: #080c13; box-shadow: var(--shadow); }
.code-toolbar { display: flex; min-height: 2.75rem; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid #1c2a3d; background: #0d131e; padding: 0.45rem 0.65rem 0.45rem 1rem; }
.code-language { color: var(--text-muted); font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.copy-button { border: 1px solid #34445d; border-radius: 0.42rem; background: #151e2b; padding: 0.32rem 0.65rem; color: var(--text-secondary); cursor: pointer; font-size: 0.74rem; font-weight: 680; }
.copy-button:hover { border-color: #55729a; color: var(--text); }
.copy-button[data-copy-state="copied"] { border-color: rgb(69 217 167 / 0.45); color: var(--green); }
.code-example pre { margin: 0; overflow-x: auto; padding: 1.15rem; color: #dce6f4; font-size: 0.87rem; line-height: 1.65; tab-size: 4; white-space: pre; }
.code-example code { font: inherit; }
.copy-feedback { position: fixed; z-index: 100; right: 1rem; bottom: 1rem; max-width: min(22rem, calc(100vw - 2rem)); border: 1px solid rgb(69 217 167 / 0.3); border-radius: var(--radius-small); background: #111d1b; padding: 0.6rem 0.8rem; color: #c8f6e6; box-shadow: var(--shadow); font-size: 0.8rem; opacity: 0; pointer-events: none; transform: translateY(0.5rem); transition: opacity 140ms ease, transform 140ms ease; }
.copy-feedback[data-visible="true"] { opacity: 1; transform: translateY(0); }

.callout { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.85rem; margin: 1.5rem 0; border: 1px solid var(--border); border-left-width: 0.22rem; border-radius: var(--radius); background: var(--surface-soft); padding: 1rem; }
.callout--info { border-left-color: var(--blue); }
.callout--warning { border-left-color: var(--warning); }
.callout--success { border-left-color: var(--green); }
.callout-icon { display: grid; width: 1.6rem; height: 1.6rem; place-items: center; border: 1px solid currentColor; border-radius: 50%; color: var(--blue); font-family: var(--font-mono); font-size: 0.73rem; font-weight: 800; }
.callout--warning .callout-icon { color: var(--warning); }
.callout--success .callout-icon { color: var(--green); }
.callout h2, .callout h3 { margin: 0; font-size: 0.98rem; letter-spacing: -0.01em; }
.callout p { margin: 0.3rem 0 0; color: var(--text-secondary); font-size: 0.9rem; }

.lifecycle { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin: 2rem 0 0; padding: 0; list-style: none; }
.lifecycle li { position: relative; display: flex; min-width: 0; align-items: center; flex-direction: column; padding: 0 0.35rem; text-align: center; }
.lifecycle li:not(:last-child)::after { position: absolute; z-index: -1; top: 1.1rem; left: calc(50% + 1.1rem); width: calc(100% - 2.2rem); height: 1px; background: linear-gradient(90deg, rgb(124 172 255 / 0.6), rgb(69 217 167 / 0.45)); content: ""; }
.lifecycle-marker { display: grid; width: 2.2rem; height: 2.2rem; place-items: center; border: 1px solid rgb(124 172 255 / 0.45); border-radius: 50%; background: var(--surface-raised); color: #cfe1ff; font-family: var(--font-mono); font-size: 0.72rem; font-weight: 800; }
.lifecycle strong { margin-top: 0.7rem; font-size: 0.85rem; }
.lifecycle li > span:last-child { margin-top: 0.15rem; color: var(--text-muted); font-size: 0.72rem; line-height: 1.4; }
.lifecycle--seven { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.lifecycle-details article { scroll-margin-top: 2rem; }
.lifecycle-details article > p:last-child { margin-top: 0.9rem; }

.ack-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; margin-top: 1.25rem; }
.ack-grid > div { border: 1px solid rgb(69 217 167 / 0.25); border-radius: var(--radius); background: rgb(69 217 167 / 0.06); padding: 0.9rem 1rem; }
.ack-grid__failure { border-color: rgb(255 202 116 / 0.28) !important; background: rgb(255 202 116 / 0.06) !important; }
.ack-grid strong, .ack-grid span { display: block; }
.ack-grid span { margin-top: 0.25rem; color: var(--text-secondary); font-size: 0.82rem; }

.retry-timeline { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.75rem; margin: 1.5rem 0 0; padding: 0; list-style: none; }
.retry-timeline li { min-width: 0; border: 1px solid var(--border-subtle); border-radius: var(--radius); background: rgb(13 20 32 / 0.62); padding: 0.85rem; }
.retry-timeline li > span { display: grid; width: 1.7rem; height: 1.7rem; place-items: center; border-radius: 50%; background: rgb(78 141 255 / 0.14); color: var(--blue); font-family: var(--font-mono); font-size: 0.7rem; font-weight: 800; }
.retry-timeline strong, .retry-timeline small { display: block; }
.retry-timeline strong { margin-top: 0.7rem; font-size: 0.86rem; }
.retry-timeline small { margin-top: 0.2rem; color: var(--text-muted); font-size: 0.72rem; line-height: 1.4; }

.canonical-structure { display: grid; margin-top: 1.25rem; overflow: hidden; border: 1px solid #26354a; border-radius: var(--radius); background: #080c13; box-shadow: var(--shadow); }
.canonical-structure code { border-bottom: 1px solid #1c2a3d; padding: 0.58rem 1rem; color: #dce6f4; font-size: 0.86rem; }
.canonical-structure code:last-child { border-bottom: 0; }
.canonical-structure code::before { display: inline-block; width: 1.5rem; color: var(--text-muted); content: counter(line); counter-increment: line; font-size: 0.7rem; }
.canonical-structure { counter-reset: line; }

.security-checklist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.65rem 1rem; margin: 1.25rem 0 0; padding: 0; list-style: none; }
.security-checklist li { position: relative; border: 1px solid var(--border-subtle); border-radius: var(--radius-small); background: rgb(13 20 32 / 0.62); padding: 0.75rem 0.85rem 0.75rem 2.35rem; color: var(--text-secondary); font-size: 0.9rem; }
.security-checklist li::before { position: absolute; top: 0.75rem; left: 0.85rem; color: var(--green); content: "□"; font-family: var(--font-mono); font-weight: 800; }

.troubleshooting-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.troubleshooting-card { min-width: 0; border: 1px solid var(--border); border-radius: var(--radius); background: linear-gradient(145deg, rgb(21 30 43 / 0.82), rgb(11 16 25 / 0.9)); padding: 1.25rem; }
.troubleshooting-card h3 { margin-top: 0.8rem; }
.troubleshooting-card > p:last-child { margin: 1rem 0 0; color: var(--text-secondary); }
.troubleshooting-card dl { display: grid; gap: 0.8rem; margin: 0.9rem 0 0; }
.troubleshooting-card dt { border-top: 1px solid var(--border-subtle); padding-top: 0.75rem; color: var(--text); font-size: 0.78rem; font-weight: 750; letter-spacing: 0.05em; text-transform: uppercase; }
.troubleshooting-card dd { margin: -0.6rem 0 0; color: var(--text-secondary); font-size: 0.9rem; }
.diagnostic-steps { display: grid; gap: 0.75rem; margin: 1.25rem 0 0; padding: 0; list-style: none; counter-reset: diagnostic-step; }
.diagnostic-steps li { position: relative; min-width: 0; border: 1px solid var(--border-subtle); border-radius: var(--radius-small); background: rgb(13 20 32 / 0.62); padding: 0.8rem 0.9rem 0.8rem 3.1rem; counter-increment: diagnostic-step; }
.diagnostic-steps li::before { position: absolute; top: 0.75rem; left: 0.85rem; display: grid; width: 1.55rem; height: 1.55rem; place-items: center; border: 1px solid rgb(124 172 255 / 0.4); border-radius: 50%; color: var(--blue); content: counter(diagnostic-step); font-family: var(--font-mono); font-size: 0.68rem; font-weight: 800; }
.diagnostic-steps strong, .diagnostic-steps span { display: block; }
.diagnostic-steps span { margin-top: 0.2rem; color: var(--text-secondary); font-size: 0.88rem; }
.danger-list { display: grid; gap: 0.7rem; margin: 1.2rem 0 0; padding: 0; list-style: none; }
.danger-list li { position: relative; padding-left: 1.65rem; color: var(--text-secondary); }
.danger-list li::before { position: absolute; top: 0; left: 0; color: var(--warning); content: "×"; font-weight: 800; }

.page-navigation { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 5.5rem; border-top: 1px solid var(--border-subtle); padding-top: 1.25rem; }
.page-navigation-link { display: flex; min-width: 0; flex-direction: column; border: 1px solid var(--border-subtle); border-radius: var(--radius); background: rgb(16 23 34 / 0.55); padding: 0.85rem 1rem; color: var(--text); text-decoration: none; transition: border-color 140ms ease, background 140ms ease, transform 140ms ease; }
.page-navigation-link:hover { border-color: rgb(124 172 255 / 0.38); background: var(--surface); color: var(--text); transform: translateY(-0.1rem); }
.page-navigation-link--next { align-items: flex-end; text-align: right; }
.page-navigation-link span { color: var(--text-muted); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.page-navigation-link strong { margin-top: 0.15rem; font-size: 0.92rem; }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 3rem; border-top: 1px solid var(--border-subtle); padding-top: 1.5rem; color: var(--text-muted); font-size: 0.78rem; }
.site-footer p { margin: 0; }
.site-footer a { color: var(--text-secondary); text-decoration: none; }

@media (max-width: 68rem) {
    .card-grid--three { grid-template-columns: 1fr; }
    .callback-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lifecycle { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem 0; }
    .lifecycle li:nth-child(3)::after { display: none; }
    .lifecycle--seven { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .lifecycle--seven li:nth-child(3)::after { display: block; }
    .lifecycle--seven li:nth-child(4)::after { display: none; }
    .retry-timeline { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .asset-info-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 56rem) {
    html { scroll-padding-top: 5.5rem; }
    .js .mobile-header { position: sticky; z-index: 19; top: 0; display: flex; min-height: 4rem; align-items: center; justify-content: space-between; gap: 0.65rem; border-bottom: 1px solid var(--border-subtle); background: rgb(7 10 16 / 0.94); padding: 0.65rem 1rem; backdrop-filter: blur(0.8rem); }
    .mobile-brand { font-size: 0.9rem; font-weight: 700; }
    .mobile-brand .brand-mark { width: 1.9rem; height: 1.9rem; flex-basis: 1.9rem; }
    .menu-toggle, .sidebar-close { display: inline-flex; min-height: 2.4rem; align-items: center; justify-content: center; gap: 0.55rem; border: 1px solid var(--border); border-radius: var(--radius-small); background: var(--surface); padding: 0.4rem 0.7rem; color: var(--text-secondary); cursor: pointer; font-size: 0.8rem; font-weight: 680; }
    .menu-toggle-icon, .menu-toggle-icon::before, .menu-toggle-icon::after { display: block; width: 0.95rem; height: 1px; background: currentColor; content: ""; }
    .menu-toggle-icon { position: relative; }
    .menu-toggle-icon::before { position: absolute; top: -0.3rem; }
    .menu-toggle-icon::after { position: absolute; top: 0.3rem; }
    .js .sidebar { width: min(21rem, calc(100vw - 2rem)); transform: translateX(-105%); visibility: hidden; transition: transform 180ms ease, visibility 180ms ease; }
    .js .sidebar[data-open="true"] { transform: translateX(0); visibility: visible; }
    .docs-search--sidebar { display: none; }
    .docs-search--mobile { display: block; width: min(19rem, 45vw); margin-left: auto; }
    .docs-search--mobile .search-results { right: 0; left: auto; }
    .no-js .sidebar { position: static; width: 100%; height: auto; border-right: 0; border-bottom: 1px solid var(--border-subtle); }
    .no-js .sidebar-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .no-js .sidebar-close { display: none; }
    .docs-main { margin-left: 0; }
    .content-wrap { padding: 3rem 1.25rem 1.5rem; }
    .page-header { margin-bottom: 2.75rem; }
    .section-block { margin-top: 3.5rem; }
    .card-grid--two, .definition-grid--two, .definition-grid--three, .family-grid, .link-grid, .comparison-grid, .accounting-example, .transport-grid, .reference-grid, .ack-grid, .troubleshooting-grid { grid-template-columns: 1fr; }
}

@media (max-width: 40rem) {
    html { scroll-padding-top: 8rem; }
    .content-wrap { padding-inline: 1rem; }
    h1 { font-size: clamp(2.1rem, 12vw, 3rem); }
    .content-status { border-radius: var(--radius-small); }
    .js .mobile-header { flex-wrap: wrap; }
    .docs-search--mobile { order: 3; width: 100%; }
    .docs-search--mobile .search-results { right: auto; left: 0; width: 100%; }
    .no-js .sidebar-nav { grid-template-columns: 1fr; }
    .local-toc ul { display: grid; gap: 0.45rem; }
    .required-inputs { grid-template-columns: 1fr; }
    .quick-step { grid-template-columns: 2.25rem minmax(0, 1fr); gap: 0.75rem; }
    .quick-step-marker { width: 2rem; height: 2rem; }
    .callback-steps, .retry-timeline, .security-checklist { grid-template-columns: 1fr; }
    .rule-list > div { grid-template-columns: 1fr; gap: 0.2rem; }
    .equation { align-items: flex-start; flex-direction: column; }
    .endpoint-heading { align-items: flex-start; flex-direction: column; }
    .endpoint-meta { grid-template-columns: 1fr; }
    .endpoint-meta dl + dl { border-top: 1px solid var(--border-subtle); border-left: 0; }
    .lifecycle { grid-template-columns: 1fr; gap: 0; }
    .lifecycle li { min-height: 4.75rem; align-items: flex-start; padding: 0 0 1.25rem 3rem; text-align: left; }
    .lifecycle li:not(:last-child)::after { top: 2.2rem; left: 1.08rem; width: 1px; height: calc(100% - 2.2rem); background: linear-gradient(180deg, rgb(124 172 255 / 0.6), rgb(69 217 167 / 0.45)); }
    .lifecycle li:nth-child(3)::after { display: block; }
    .lifecycle--seven li:nth-child(4)::after { display: block; }
    .lifecycle-marker { position: absolute; top: 0; left: 0; }
    .lifecycle strong { margin-top: 0; }
    .page-navigation { grid-template-columns: 1fr; }
    .page-navigation-spacer { display: none; }
    .page-navigation-link--next { align-items: flex-start; text-align: left; }
    .site-footer { align-items: flex-start; flex-direction: column; }
    .asset-info-grid { grid-template-columns: 1fr; }
}

@keyframes catalog-spin { to { transform: rotate(360deg); } }

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

@media print {
    body { background: #fff; color: #111; }
    .mobile-header, .sidebar, .sidebar-overlay, .copy-button, .page-navigation, .site-footer, .docs-search { display: none !important; }
    .docs-main { margin: 0; }
    .content-wrap { width: 100%; padding: 0; }
}
