:root {
    --background: #f5f7fa;
    --surface: #ffffff;
    --surface-soft: #eef2f6;
    --text: #18212b;
    --text-soft: #5f6b78;
    --border: #dce3ea;
    --primary: #20364d;
    --primary-hover: #16283a;
    --accent: #4c8d6b;
    --warning: #fff5d8;
    --warning-border: #e7c663;
    --code: #111827;
    --code-text: #e5edf5;
    --shadow: 0 12px 30px rgba(20, 35, 50, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--background);
    color: var(--text);
    font-family:
        Inter,
        Segoe UI,
        Arial,
        sans-serif;
    line-height: 1.6;
}

a {
    color: inherit;
}

code {
    font-family:
        Consolas,
        Monaco,
        monospace;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    min-height: 72px;
    padding: 12px 32px;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: var(--primary);
    color: #ffffff;
    display: grid;
    place-items: center;
    font-size: 13px;
    font-weight: 800;
}

.brand strong,
.brand span {
    display: block;
}

.brand span {
    color: var(--text-soft);
    font-size: 13px;
}

.topbar nav {
    display: flex;
    align-items: center;
    gap: 18px;
}

.topbar nav a {
    text-decoration: none;
    font-size: 14px;
}

.layout {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    max-width: 1500px;
    margin: 0 auto;
}

.sidebar {
    position: sticky;
    top: 72px;
    height: calc(100vh - 72px);
    overflow-y: auto;
    padding: 32px 24px;
    background: var(--surface);
    border-right: 1px solid var(--border);
}

.sidebar-title {
    margin-top: 0;
    color: var(--text-soft);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.sidebar a {
    display: block;
    padding: 7px 10px;
    border-radius: 7px;
    color: var(--text-soft);
    text-decoration: none;
    font-size: 14px;
}

.sidebar a:hover {
    background: var(--surface-soft);
    color: var(--text);
}

.sidebar hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 20px 0;
}

.content {
    width: min(100%, 1050px);
    padding: 54px 64px;
}

.hero {
    padding: 54px;
    border-radius: 22px;
    background:
        linear-gradient(
            135deg,
            #20364d,
            #304f69
        );
    color: #ffffff;
    box-shadow: var(--shadow);
}

.hero h1 {
    max-width: 760px;
    margin: 18px 0;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.05;
}

.hero p {
    max-width: 740px;
    margin-bottom: 28px;
    color: #dbe7f2;
    font-size: 18px;
}

.badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border-radius: 9px;
    background: var(--accent);
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
}

.button:hover {
    filter: brightness(0.94);
}

.button-secondary {
    background: transparent;
    border: 1px solid currentColor;
}

section {
    margin-bottom: 74px;
    scroll-margin-top: 105px;
}

section:not(.hero) {
    padding-top: 18px;
}

h2 {
    margin-bottom: 14px;
    font-size: 30px;
}

h3 {
    margin-top: 0;
}

p {
    color: var(--text-soft);
}

.endpoint {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    padding: 15px 18px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--surface);
}

.method {
    min-width: 54px;
    padding: 4px 8px;
    border-radius: 6px;
    color: #ffffff;
    text-align: center;
    font-size: 12px;
    font-weight: 800;
}

.method-get {
    background: #2772aa;
}

.method-post {
    background: #2d8a5c;
}

.code-card {
    position: relative;
    margin: 20px 0;
    border-radius: 13px;
    overflow: hidden;
    background: var(--code);
    box-shadow: var(--shadow);
}

.code-card pre {
    margin: 0;
    padding: 24px;
    overflow-x: auto;
    color: var(--code-text);
    line-height: 1.55;
}

.copy-button {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 6px 10px;
    border: 1px solid #435268;
    border-radius: 7px;
    background: #1e293b;
    color: #ffffff;
    cursor: pointer;
}

.callout {
    margin: 22px 0;
    padding: 18px;
    border-radius: 10px;
}

.callout-warning {
    background: var(--warning);
    border-left: 4px solid var(--warning-border);
}

.cards {
    display: grid;
    grid-template-columns:
        repeat(
            auto-fit,
            minmax(210px, 1fr)
        );
    gap: 18px;
    margin-top: 24px;
}

.feature-card {
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 22px 0;
    background: var(--surface);
    box-shadow: var(--shadow);
}

th,
td {
    padding: 14px;
    border: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

th {
    background: var(--surface-soft);
}

.step-list {
    display: grid;
    gap: 12px;
    margin-top: 20px;
}

.step-list div {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
}

.step-list span {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border-radius: 50%;
    background: var(--primary);
    color: #ffffff;
    display: grid;
    place-items: center;
    font-weight: 800;
}

.step-list p {
    margin: 3px 0 0;
}

footer {
    margin-top: 100px;
    padding-top: 30px;
    border-top: 1px solid var(--border);
    color: var(--text-soft);
    font-size: 13px;
}

@media (max-width: 980px) {

    .topbar nav a:not(.button) {
        display: none;
    }

    .layout {
        display: block;
    }

    .sidebar {
        display: none;
    }

    .content {
        padding: 35px 20px;
    }

    .hero {
        padding: 34px 24px;
    }
}

@media (max-width: 600px) {

    .topbar {
        padding: 10px 14px;
    }

    .brand span {
        display: none;
    }

    .content {
        padding: 24px 14px;
    }

    h2 {
        font-size: 25px;
    }

    th,
    td {
        padding: 10px;
        font-size: 13px;
    }
}