:root {
    color-scheme: light;
    font-family: "Nunito Sans", "Segoe UI", sans-serif;
    background: #ffffff;
    color: #132238;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: #ffffff;
}

body, code, pre, button, input {
    font-family: inherit;
}

code, pre {
    font-family: "SFMono-Regular", "Menlo", monospace;
}

.page-shell {
    padding: 24px;
}

.docs-shell {
    max-width: 1100px;
    margin: 0 auto;
}

.docs-header,
.auth-box,
.examples-box,
.endpoints-box,
.endpoint-card {
    background: #ffffff;
    border: 1px solid #d9e2ec;
    border-radius: 20px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.05);
}

.docs-header,
.auth-box,
.examples-box,
.endpoints-box {
    padding: 24px;
    margin-bottom: 20px;
}

.docs-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.header-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.eyebrow {
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 12px;
    font-weight: 800;
    color: #2563eb;
}

h1, h2, h3, h4, p {
    margin: 0;
}

h1 {
    font-size: 32px;
    line-height: 1.15;
}

h2 {
    font-size: 20px;
    margin-bottom: 10px;
}

h3 {
    font-size: 16px;
}

h4 {
    font-size: 14px;
}

.description {
    max-width: 720px;
    margin-top: 10px;
    color: #516175;
    white-space: pre-line;
}

.auth-note,
.section-copy {
    color: #516175;
}

.auth-note {
    margin-top: 8px;
}

.section-copy {
    margin-bottom: 18px;
}

.spec-chip,
.response-chip,
.method-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.spec-chip {
    padding: 8px 12px;
    border: 1px solid #c9d6e5;
    background: #f8fbff;
    color: #34506d;
}

.section-head,
.snippet-head,
.endpoint-card summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.section-head {
    margin-bottom: 16px;
}

.section-head a {
    color: #2563eb;
    font-weight: 700;
    text-decoration: none;
}

.section-head a:hover {
    text-decoration: underline;
}

.language-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.language-tab,
.copy-button {
    border: 1px solid #d2dbea;
    background: #ffffff;
    color: #17324d;
    border-radius: 12px;
    cursor: pointer;
    transition: 160ms ease;
}

.language-tab {
    padding: 9px 14px;
    font-weight: 700;
}

.language-tab:hover,
.language-tab.active {
    background: #ffffff;
    color: #1976d2;
    border-color: #90b9f5;
}

.copy-button {
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 700;
}

.copy-button:hover {
    background: #eff6ff;
    color: #1454c4;
    border-color: #8fb5f2;
}

.copy-button:focus-visible,
.language-tab:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.snippet-card + .snippet-card,
.endpoint-card + .endpoint-card,
.error-card + .error-card,
.language-group + .language-group {
    margin-top: 16px;
}

.language-group {
    padding-top: 4px;
}

.js .language-group {
    display: none;
}

.js .language-group.active {
    display: block;
}

.language-heading {
    margin-bottom: 12px;
}

.dark-block,
.light-block {
    margin-top: 12px;
    padding: 18px;
    border-radius: 16px;
    overflow-x: auto;
    user-select: text;
    -webkit-user-select: text;
}

.dark-block {
    background: #0f172a;
    color: #e6eefc;
}

.light-block {
    background: #f8fafc;
    color: #1f2937;
    border: 1px solid #e5e7eb;
}

.endpoint-card {
    overflow: hidden;
}

.toc {
    margin-bottom: 20px;
    padding: 18px;
    border-radius: 16px;
    background: #f8fbff;
    border: 1px solid #d9e2ec;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 14px 0 0;
    display: grid;
    gap: 10px;
}

.toc-list li {
    margin: 0;
}

.toc-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #17324d;
    text-decoration: none;
}

.toc-list a:hover {
    color: #1454c4;
}

.endpoint-card-header {
    padding: 18px 20px;
    background: #fbfcfe;
}

.endpoint-card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.endpoint-content {
    padding: 0 20px 20px;
}

.endpoint-section + .endpoint-section {
    margin-top: 18px;
}

.method-chip {
    min-width: 56px;
    justify-content: center;
    padding: 8px 10px;
    text-transform: uppercase;
}

.method-post {
    background: #fff7ed;
    color: #c2410c;
}

.summary-text {
    color: #617181;
    margin-left: auto;
}

.endpoint-description {
    margin-top: 12px;
    color: #516175;
    white-space: pre-line;
    line-height: 1.55;
}

.response-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.response-chip {
    padding: 8px 12px;
    background: #f8fafc;
    color: #334155;
    border: 1px solid #d9e2ec;
}

.endpoint-divider {
    margin-top: 20px;
    border-top: 1px solid #e5edf5;
}

.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translate(-50%, -18px);
    background: #132238;
    color: #ffffff;
    padding: 10px 16px;
    border-radius: 999px;
    opacity: 0;
    pointer-events: none;
    transition: 160ms ease;
}

.toast.visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.load-error {
    border: 1px solid #fecaca;
    background: #fff1f2;
    color: #9f1239;
    border-radius: 16px;
    padding: 18px;
}

.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translate(-50%, -18px);
    background: #132238;
    color: #ffffff;
    padding: 10px 16px;
    border-radius: 999px;
    opacity: 0;
    pointer-events: none;
    transition: 160ms ease;
}

.toast.visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

@media (max-width: 900px) {
    .page-shell {
        padding: 12px;
    }

    .docs-header,
    .header-chips,
    .section-head,
    .snippet-head,
    .endpoint-card-header,
    .toc-list a {
        flex-direction: column;
        align-items: flex-start;
    }

    .summary-text {
        margin-left: 0;
    }
}
