:root {
    --navy: #143f51;
    --navy-deep: #0e3040;
    --blue: #1f6685;
    --ink: #172433;
    --muted: #53636e;
    --paper: #f4f6f7;
    --surface: #fff;
    --line: #d6dde1;
    --code-bg: #122d3a;
    color-scheme: light;
    font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif;
    font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; background: var(--paper); }
body { margin: 0; color: var(--ink); background: var(--paper); font-size: 16px; line-height: 1.6; }
a { color: var(--blue); text-underline-offset: 3px; }
a:focus-visible, code:focus-visible { outline: 3px solid #b47710; outline-offset: 3px; }
::selection { color: #fff; background: var(--blue); }

.docs-header { position: sticky; top: 0; z-index: 5; min-height: 76px; padding: 0 clamp(20px, 4vw, 58px); display: flex; align-items: center; justify-content: space-between; gap: 24px; color: #fff; background: var(--navy-deep); border-bottom: 1px solid rgba(255,255,255,.18); }
.docs-brand { display: inline-flex; align-items: center; gap: 14px; color: inherit; text-decoration: none; }
.docs-brand strong { font-family: Georgia, serif; font-size: 1.4rem; letter-spacing: .02em; }
.docs-brand > span { width: 1px; height: 30px; background: rgba(255,255,255,.42); }
.docs-brand small { color: #e0e9ed; font-size: .8rem; }
.docs-header nav { display: flex; align-items: center; gap: 24px; }
.docs-header nav a { color: #e0e9ed; font-size: .875rem; font-weight: 650; text-decoration: none; }
.docs-header nav a:hover, .docs-header nav a.current { color: #fff; text-decoration: underline; text-decoration-color: #71bdca; text-decoration-thickness: 2px; text-underline-offset: 8px; }
.docs-header nav .admin-link { padding: 8px 12px; color: #fff; border: 1px solid rgba(255,255,255,.48); border-radius: 4px; }
.docs-header nav .admin-link:hover { background: rgba(255,255,255,.08); }

.docs-layout { width: min(1280px, calc(100% - 40px)); margin: 0 auto; display: grid; grid-template-columns: 235px minmax(0, 1fr); gap: 64px; align-items: start; }
.docs-sidebar { position: sticky; top: 105px; margin-top: 54px; padding: 0 0 20px 18px; display: grid; align-content: start; gap: 8px; border-left: 1px solid var(--line-dark, #b8c3ca); }
.docs-sidebar p { margin: 0 0 8px; color: var(--navy); font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.docs-sidebar a { padding: 5px 0; color: #465763; font-size: .875rem; text-decoration: none; }
.docs-sidebar a:hover { color: var(--blue); text-decoration: underline; }
.docs-content { min-width: 0; padding: 52px 0 70px; }
.docs-intro { padding-bottom: 42px; border-bottom: 1px solid var(--line); }
.version-label { margin: 0 0 12px; color: var(--blue); font-size: .78rem; font-weight: 800; letter-spacing: .08em; }
h1, h2 { font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif; color: #152c3a; }
h1 { max-width: 850px; margin: 0; font-size: clamp(2.5rem, 5vw, 4rem); line-height: 1.08; letter-spacing: -.025em; }
.lead { max-width: 760px; margin: 20px 0 26px; color: var(--muted); font-size: 1.125rem; line-height: 1.65; }
.base-url { padding: 15px 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 18px; background: #e8eff2; border: 1px solid #cbd7dc; }
.base-url span { color: var(--muted); font-size: .8rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.base-url code { color: var(--navy-deep); font-size: .95rem; }
.callout { margin: 18px 0 0; padding: 14px 17px; color: #273d49; background: #fff; border: 1px solid var(--line); font-size: .9rem; }
.doc-section { padding: 38px 0 40px; border-bottom: 1px solid var(--line); scroll-margin-top: 100px; }
.doc-section h2 { margin: 0 0 13px; font-size: 1.8rem; line-height: 1.2; }
.doc-section h3 { margin: 27px 0 9px; font-size: 1rem; }
.doc-section p { max-width: 900px; margin: 10px 0 16px; color: #364754; font-size: .94rem; }
.endpoint { min-height: 52px; margin: 12px 0; padding: 8px 13px; display: flex; align-items: center; gap: 15px; background: #fff; border: 1px solid var(--line); }
.method { min-width: 44px; padding: 4px 7px; color: #145a43; background: #e1f1e9; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .75rem; font-weight: 800; text-align: center; }
.endpoint > code { color: #143f51; font-size: .95rem; font-weight: 700; }
.endpoint-note { margin-left: auto; color: var(--muted); font-size: .8rem; text-align: right; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88em; }
pre { max-width: 100%; margin: 10px 0 15px; padding: 18px 20px; overflow-x: auto; color: #f4f7f8; background: var(--code-bg); border: 1px solid #244757; border-radius: 4px; tab-size: 2; }
pre code { color: inherit; font-size: .82rem; line-height: 1.65; white-space: pre; }
.note { color: var(--muted) !important; font-size: .82rem !important; }
.table-scroll { overflow-x: auto; margin: 18px 0; background: #fff; border: 1px solid var(--line); }
table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: .875rem; }
th, td { padding: 11px 13px; border-bottom: 1px solid #e2e7ea; text-align: left; vertical-align: top; }
th { color: #203744; background: #eaf0f3; font-size: .8rem; }
td:first-child { color: #174e68; font-weight: 700; }
td code { font-size: .82rem; }
tbody tr:last-child td { border-bottom: 0; }
.docs-footer { padding-top: 24px; display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-size: .82rem; }
.docs-footer a { font-weight: 700; }

@media (max-width: 850px) {
    .docs-layout { width: min(100% - 32px, 760px); grid-template-columns: 1fr; gap: 0; }
    .docs-sidebar { position: static; margin: 20px 0 0; padding: 12px 0; display: flex; overflow-x: auto; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); border-left: 0; }
    .docs-sidebar p { display: none; }
    .docs-sidebar a { flex: 0 0 auto; padding: 7px 10px; }
    .docs-content { padding-top: 32px; }
}
@media (max-width: 560px) {
    .docs-header { min-height: 68px; padding: 10px 14px; align-items: flex-start; flex-direction: column; gap: 8px; }
    .docs-brand small, .docs-brand > span { display: none; }
    .docs-header nav { width: 100%; justify-content: space-between; gap: 10px; }
    .docs-header nav a { font-size: .8rem; }
    .docs-layout { width: calc(100% - 28px); }
    .docs-sidebar { margin-top: 12px; }
    .docs-content { padding-top: 27px; }
    h1 { font-size: 2.5rem; }
    .lead { font-size: 1rem; }
    .doc-section { padding: 30px 0; }
    .doc-section h2 { font-size: 1.55rem; }
    .endpoint { flex-wrap: wrap; gap: 10px; }
    .endpoint-note { width: 100%; margin-left: 54px; text-align: left; }
    pre { padding: 14px; }
    pre code { font-size: .75rem; }
    .docs-footer { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
