:root {
    color-scheme: light;
    --text: #172026;
    --muted: #5d6b76;
    --border: #d9e2e8;
    --soft: #f7f9fa;
    --blue: #4285f4;
    --brand-light: #e6f4ff;
    --brand: #4285f4;
    --brand-dark: #3367d6;
    --green: #34a853;
    --post: #5b9cff;
    --warn: #fca130;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--text);
    background: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, "Noto Sans", sans-serif;
    line-height: 1.55;
    overflow-x: hidden;
}

a {
    color: inherit;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 64px;
    padding: 0 28px;
    border-bottom: 1px solid rgba(217, 226, 232, 0.9);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(10px);
    box-shadow: 0 6px 20px rgba(23, 32, 38, 0.06);
    color: var(--text);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0;
    font-size: 0;
    text-decoration: none;
}

.brand img {
    display: block;
}

.brand-wordmark {
    width: auto;
    height: 32px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.topnav {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 14px;
}

.topnav a {
    color: #5d6b76;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s ease;
}

.topnav a:hover {
    color: var(--brand-dark);
}

.api-shell {
    width: min(1460px, calc(100% - 40px));
    margin: 0 auto;
    padding: 34px 0 48px;
}

.api-info h1 {
    max-width: 100%;
    margin: 0 0 18px;
    font-size: clamp(21px, 1.75vw, 26px);
    line-height: 1.28;
    letter-spacing: 0;
    overflow-wrap: anywhere;
    word-break: normal;
}

.hero-title-line {
    display: block;
}

.hero-title-line + .hero-title-line {
    margin-top: 8px;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--blue);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.lead {
    max-width: 100%;
    margin: 0 0 26px;
    padding: 18px 20px;
    border: 1px solid #d9e8ff;
    border-left: 5px solid var(--brand);
    border-radius: 6px;
    background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
    box-shadow: 0 12px 28px rgba(66, 133, 244, 0.08);
    color: #35444e;
    font-size: 13px;
    line-height: 1.64;
    overflow-wrap: anywhere;
}

.lead p {
    margin: 0;
}

.lead p + p {
    margin-top: 8px;
}

.setup-panel {
    margin: 28px 0 0;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
}

.setup-panel h2,
.related-links h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px;
    color: #1b2832;
    font-size: 18px;
    line-height: 1.25;
    letter-spacing: 0;
}

.heading-icon,
.group-icon,
.setup-icon,
.action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.heading-icon,
.group-icon {
    width: 20px;
    height: 20px;
    color: var(--brand-dark);
}

.heading-icon svg,
.group-icon svg,
.setup-icon svg,
.action-icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.setup-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.setup-item {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 10px;
    min-width: 0;
    padding: 12px;
    border: 1px solid #d7e3ea;
    border-radius: 6px;
    background: #fbfdfe;
}

.setup-icon {
    width: 32px;
    height: 32px;
    border-radius: 7px;
    background: var(--brand-light);
    color: var(--brand-dark);
}

.setup-icon svg {
    width: 18px;
    height: 18px;
}

.setup-item h3 {
    margin: 0 0 5px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: 0;
    text-transform: uppercase;
}

.setup-item p {
    margin: 0;
    color: #172026;
    font-size: 13.5px;
    font-weight: 800;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

code {
    display: inline-block;
    padding: 3px 6px;
    border-radius: 4px;
    background: #f3f0ff;
    color: #6d28d9;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.95em;
    font-weight: 800;
}

code + code {
    margin-left: 6px;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin: 0 0 28px;
}

.actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 230px;
    min-height: 48px;
    padding: 0 22px;
    border: 1px solid #cfe0e8;
    border-radius: 8px;
    background: linear-gradient(180deg, #fff 0%, #f7fbfc 100%);
    color: #172026;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(14, 54, 63, 0.08);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.action-icon {
    width: 18px;
    height: 18px;
    color: currentColor;
}

.actions .primary-action {
    border-color: transparent;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
    color: #fff;
    box-shadow: 0 10px 24px rgba(66, 133, 244, 0.28);
}

.actions .docs-action {
    border-color: #cfe0ff;
    color: var(--brand-dark);
    background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.actions .dashboard-action {
    border-color: #172026;
    background: linear-gradient(135deg, #1b2832 0%, #31424e 100%);
    color: #fff;
}

.actions a:hover {
    border-color: #bfd4ff;
    color: var(--brand-dark);
    box-shadow: 0 12px 24px rgba(23, 32, 38, 0.12);
    transform: translateY(-1px);
}

.actions .primary-action:hover {
    color: #fff;
}

.actions .dashboard-action:hover {
    border-color: #172026;
    color: #fff;
}

.related-links {
    margin: 34px 0 0;
}

.related-link-groups {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.related-link-group {
    min-width: 0;
    padding: 18px 20px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
}

.related-link-group-wide {
    grid-column: 1 / -1;
}

.related-link-group h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    color: #26343e;
    font-size: 16px;
    line-height: 1.3;
    font-weight: 800;
    letter-spacing: 0;
}

.link-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.link-list-columns {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 18px;
}

.link-list a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #18323f;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
    text-decoration: none;
}

.link-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--brand);
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.14);
}

.link-list a:hover {
    color: var(--blue);
    text-decoration: underline;
}

.inline-link-list a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 32px;
    margin: 0 8px 8px 0;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--soft);
    color: #18323f;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.inline-link-list a::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--brand);
}

.inline-link-list a:hover {
    border-color: var(--blue);
    color: var(--blue);
}

.inline-link-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
}

.operations {
    margin-top: 34px;
}

.operations h2 {
    margin: 0 0 8px;
    font-size: 25px;
    letter-spacing: 0;
}

.operations-header p {
    margin: 0;
    color: var(--muted);
}

.operations-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.search-box {
    display: grid;
    gap: 6px;
    width: min(420px, 100%);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.search-box input {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    font-size: 15px;
    outline: none;
}

.search-box input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(15, 106, 180, 0.14);
}

.platform-section {
    margin: 0 0 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
}

.platform-summary {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    min-height: 58px;
    padding: 0 18px;
    cursor: pointer;
    list-style: none;
}

.platform-summary::-webkit-details-marker {
    display: none;
}

.platform-summary::before {
    content: ">";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-right: 8px;
    color: var(--muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    transform: rotate(0deg);
    transition: transform 0.15s ease;
}

.platform-section[open] .platform-summary::before {
    transform: rotate(90deg);
}

.platform-name {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 19px;
    font-weight: 700;
}

.platform-count {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.doc-link-group,
.endpoint-doc-links {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.doc-link {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--soft);
    color: #18323f;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.doc-link:hover {
    border-color: var(--blue);
    color: var(--blue);
}

.endpoint-list {
    display: grid;
    border-top: 1px solid var(--border);
}

.endpoint-row {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 14px;
    padding: 12px 16px;
    border-top: 1px solid #edf2f5;
}

.endpoint-row:first-child {
    border-top: 0;
}

.endpoint-row:hover {
    background: #fafcff;
}

.method {
    align-self: start;
    display: inline-flex;
    justify-content: center;
    width: 82px;
    padding: 6px 8px;
    border-radius: 4px;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
}

.method-get {
    background: var(--green);
}

.method-post {
    background: var(--post);
}

.method-put {
    background: var(--warn);
}

.method-delete {
    background: #f93e3e;
}

.endpoint-main {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.endpoint-path {
    color: #25313b;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 15px;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.endpoint-title {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.version,
.deprecated {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 800;
}

.version {
    background: #e8f2fb;
    color: var(--blue);
}

.deprecated {
    background: #fff0df;
    color: #9f5700;
}

.endpoint-description {
    color: #485761;
    font-size: 14px;
}

.endpoint-doc-links {
    margin-top: 4px;
}

.empty-state {
    margin-bottom: 16px;
    padding: 18px;
    border: 1px dashed var(--border);
    border-radius: 6px;
    color: var(--muted);
    text-align: center;
}

.footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 28px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 13px;
}

@media (max-width: 820px) {
    .topbar,
    .operations-header,
    .footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .topnav {
        flex-wrap: wrap;
    }

    .api-shell {
        width: min(100% - 24px, 1460px);
        padding-top: 24px;
    }

    .related-link-groups {
        grid-template-columns: 1fr;
    }

    .link-list-columns {
        grid-template-columns: 1fr;
    }

    .related-link-group-wide {
        grid-column: auto;
    }

    .setup-grid {
        grid-template-columns: 1fr;
    }

    .actions a {
        width: 100%;
    }

    .platform-summary {
        flex-wrap: wrap;
        padding: 14px;
    }

    .endpoint-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}
