:root {
    --bg: #ffffff;
    --surface: #f7f8fa;
    --surface-2: #eef1f5;
    --text: #111827;
    --muted: #667085;
    --line: #e5e7eb;
    --brand: #ef1b24;
    --brand-dark: #c91018;
    --code: #111827;
    --code-text: #f8fafc;
    --success: #087443;
    --warning: #9a6700;
    --purple: #6941c6;
    --shadow: 0 8px 30px rgba(15, 23, 42, .07);
}
html[data-theme="dark"] {
    --bg: #0b0f17;
    --surface: #111827;
    --surface-2: #1f2937;
    --text: #f8fafc;
    --muted: #a6b0c3;
    --line: #263244;
    --code: #030712;
    --code-text: #f8fafc;
    --shadow: 0 8px 30px rgba(0, 0, 0, .25);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.68;
}
a { color: inherit; }
.skip-link {
    position: fixed; left: 12px; top: -60px; z-index: 100;
    background: var(--brand); color: white; padding: 10px 14px; border-radius: 8px;
}
.skip-link:focus { top: 12px; }
.topbar {
    position: sticky; top: 0; z-index: 30;
    min-height: 72px; padding: 0 26px;
    display: flex; align-items: center; justify-content: space-between; gap: 20px;
    background: color-mix(in srgb, var(--bg) 94%, transparent);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
}
.brand {
    display: inline-flex; align-items: center; gap: 12px;
    text-decoration: none; min-width: 230px;
}
.brand-mark {
    width: 38px; height: 38px; display: grid; place-items: center;
    color: #fff; background: var(--brand); border-radius: 11px;
    font-weight: 900; font-size: 20px;
}
.brand strong, .brand small { display: block; }
.brand small { color: var(--muted); font-size: 12px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.topbar-actions a, .topbar-actions button {
    border: 0; background: transparent; color: var(--muted);
    padding: 9px 11px; text-decoration: none; font: inherit; cursor: pointer;
    border-radius: 8px;
}
.topbar-actions a:hover, .topbar-actions button:hover { color: var(--text); background: var(--surface); }
.mobile-menu { display: none; }
.docs-layout {
    width: min(1500px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 285px minmax(0, 900px);
    justify-content: center;
    gap: 64px;
    padding: 36px 28px 90px;
}
.sidebar {
    position: sticky; top: 104px; height: calc(100vh - 125px);
    overflow: auto; padding-right: 14px;
}
.search-box { margin-bottom: 30px; }
.search-box label { display: block; font-size: 12px; font-weight: 800; margin-bottom: 8px; }
.search-box input {
    width: 100%; border: 1px solid var(--line); background: var(--surface);
    color: var(--text); border-radius: 10px; padding: 12px 13px; outline: none;
}
.search-box input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(239,27,36,.10); }
.nav-section { margin-bottom: 28px; }
.nav-section h2 {
    margin: 0 0 9px; color: var(--muted); font-size: 12px;
    text-transform: uppercase; letter-spacing: .08em;
}
.nav-section a {
    display: block; padding: 7px 10px; margin: 2px 0;
    color: var(--muted); text-decoration: none; border-radius: 8px; font-size: 14px;
}
.nav-section a:hover { background: var(--surface); color: var(--text); }
.nav-section a.active { background: rgba(239,27,36,.09); color: var(--brand); font-weight: 700; }
.content { min-width: 0; padding-top: 8px; }
.page-heading { border-bottom: 1px solid var(--line); padding-bottom: 26px; margin-bottom: 34px; }
.eyebrow {
    color: var(--brand); text-transform: uppercase; letter-spacing: .1em;
    font-weight: 800; font-size: 12px; margin: 0 0 8px;
}
h1 { font-size: clamp(36px, 5vw, 58px); letter-spacing: -.045em; line-height: 1.08; margin: 0; }
h2 { margin: 42px 0 14px; font-size: 28px; letter-spacing: -.025em; line-height: 1.2; }
h3 { margin: 28px 0 10px; font-size: 19px; }
p { color: var(--muted); }
.lead { font-size: 20px; max-width: 760px; }
.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 24px 0; }
.card {
    border: 1px solid var(--line); background: var(--surface);
    border-radius: 15px; padding: 22px; text-decoration: none;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card h3 { margin-top: 8px; }
.card p { margin-bottom: 0; }
.status-badge {
    display: inline-flex; align-items: center; min-height: 25px;
    padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 800;
    background: var(--surface-2); color: var(--muted);
}
.status-badge--available { color: var(--success); background: rgba(8,116,67,.11); }
.status-badge--beta { color: var(--warning); background: rgba(154,103,0,.12); }
.status-badge--preview { color: var(--purple); background: rgba(105,65,198,.12); }
.status-badge--planned { color: var(--muted); background: var(--surface-2); }
.notice {
    border: 1px solid var(--line); border-left: 4px solid var(--brand);
    border-radius: 10px; padding: 16px 18px; margin: 22px 0; background: var(--surface);
}
.notice p { margin: 0; }
.endpoint {
    display: grid; grid-template-columns: 78px 1fr; align-items: center; gap: 12px;
    border: 1px solid var(--line); border-radius: 12px; padding: 13px 15px; margin: 10px 0;
}
.method { font-weight: 900; font-size: 13px; }
.method--get { color: #067647; }
.method--post { color: #175cd3; }
.method--put { color: #b54708; }
.method--delete { color: #b42318; }
.endpoint code, code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    overflow-wrap: anywhere;
}
.code-block {
    position: relative; margin: 18px 0 24px; background: var(--code);
    border-radius: 13px; overflow: hidden; box-shadow: var(--shadow);
}
.code-block pre { margin: 0; padding: 22px; overflow: auto; }
.code-block code { color: var(--code-text); font-size: 13px; }
.copy-code {
    position: absolute; right: 10px; top: 10px; border: 1px solid rgba(255,255,255,.18);
    color: #fff; background: rgba(255,255,255,.08); border-radius: 7px; padding: 6px 9px;
    cursor: pointer; font-size: 12px;
}
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; margin: 18px 0 26px; }
table { width: 100%; border-collapse: collapse; min-width: 620px; }
th, td { padding: 13px 15px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: var(--surface); font-size: 13px; }
td { color: var(--muted); font-size: 14px; }
tr:last-child td { border-bottom: 0; }
.steps { counter-reset: step; padding: 0; list-style: none; }
.steps li { position: relative; padding: 0 0 25px 48px; color: var(--muted); }
.steps li::before {
    counter-increment: step; content: counter(step);
    position: absolute; left: 0; top: -2px; width: 31px; height: 31px;
    display: grid; place-items: center; border-radius: 9px; background: var(--brand); color: #fff; font-weight: 900;
}
.footer {
    border-top: 1px solid var(--line); padding: 38px max(28px, calc((100vw - 1220px)/2));
    background: var(--surface); display: grid; gap: 14px;
}
.footer p { margin: 4px 0; }
.footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
.footer a { color: var(--muted); text-decoration: none; }
.footer small { color: var(--muted); }
@media (max-width: 980px) {
    .topbar { padding: 0 16px; }
    .topbar-actions a { display: none; }
    .mobile-menu { display: inline-flex; }
    .docs-layout { grid-template-columns: 1fr; padding: 24px 18px 70px; gap: 0; }
    .sidebar {
        display: none; position: fixed; inset: 72px 0 0 0; z-index: 25;
        height: auto; background: var(--bg); padding: 22px; overflow: auto;
    }
    .sidebar.open { display: block; }
}
@media (max-width: 680px) {
    .brand { min-width: 0; }
    .brand small { display: none; }
    .card-grid { grid-template-columns: 1fr; }
    h1 { font-size: 38px; }
    .endpoint { grid-template-columns: 64px 1fr; }
}


.breadcrumb{display:flex;gap:.5rem;align-items:center;font-size:.875rem;color:var(--muted);margin-bottom:1.5rem}
.breadcrumb a{color:inherit}
.search-trigger{border:1px solid var(--border);background:var(--surface);color:var(--text);padding:.55rem .8rem;border-radius:.65rem;cursor:pointer}
.search-trigger kbd{font:inherit;opacity:.65;margin-left:.4rem}
.search-modal{position:fixed;inset:0;background:rgba(15,23,42,.55);z-index:999;padding:8vh 1rem}
.search-panel{max-width:760px;margin:0 auto;background:var(--surface);border:1px solid var(--border);border-radius:1rem;box-shadow:0 24px 80px rgba(0,0,0,.25);overflow:hidden}
.search-header{display:flex;gap:.75rem;padding:1rem;border-bottom:1px solid var(--border)}
.search-header input{flex:1;border:1px solid var(--border);background:var(--bg);color:var(--text);padding:.85rem 1rem;border-radius:.65rem;font:inherit}
.search-close{border:0;background:transparent;color:var(--text);cursor:pointer}
.search-results{max-height:60vh;overflow:auto;padding:.5rem}
.search-results a{display:flex;flex-direction:column;gap:.25rem;padding:.85rem 1rem;border-radius:.65rem;color:var(--text);text-decoration:none}
.search-results a:hover{background:var(--bg)}
.search-results span,.search-empty{color:var(--muted)}
.skip-link{position:absolute;left:-9999px}
.skip-link:focus{left:1rem;top:1rem;z-index:1000;background:var(--surface);padding:.75rem;border-radius:.5rem}
