:root {
    color-scheme: light;
    --bg: #eef2f6;
    --bg-2: #f8fafc;
    --surface: #ffffff;
    --surface-soft: #f4f7fb;
    --surface-strong: #ecf3f1;
    --text: #121722;
    --muted: #657286;
    --line: #d8e0ea;
    --line-strong: #bbc7d6;
    --accent: #0f7a5d;
    --accent-2: #315fd6;
    --accent-3: #b7791f;
    --bad: #b42318;
    --good: #087443;
    --code-bg: #121826;
    --code-text: #e7edf5;
    --radius: 8px;
    --shadow: 0 18px 44px rgba(17, 24, 39, 0.12);
    --shadow-soft: 0 10px 26px rgba(17, 24, 39, 0.08);
    --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        linear-gradient(180deg, #f8fafc 0, #eef2f6 380px, #f6f8fb 100%),
        var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.55;
}

a {
    color: inherit;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 68px;
    padding: 0 max(20px, calc((100vw - 1180px) / 2));
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(216, 224, 234, 0.9);
    backdrop-filter: blur(14px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: #0f172a;
    font-weight: 800;
    text-decoration: none;
}

.mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(15, 122, 93, 0.3);
    border-radius: 8px;
    background: linear-gradient(135deg, #e9f7f1, #edf3ff);
    color: var(--accent);
    font-size: 12px;
    font-weight: 900;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.nav a,
.button,
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    padding: 0 13px;
    background: #fff;
    color: #182230;
    font: 750 13px/1 var(--sans);
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
}

.nav a:hover,
.button:hover,
button:hover {
    border-color: #9fb0c4;
    background: #f9fbfd;
}

.button.primary,
button.primary {
    border-color: #0f7a5d;
    background: #0f7a5d;
    color: #fff;
    box-shadow: 0 10px 20px rgba(15, 122, 93, 0.22);
}

.button.ghost,
button.ghost {
    background: var(--surface-soft);
}

button.danger,
.button.danger {
    border-color: #f4b8b3;
    background: #fff4f3;
    color: var(--bad);
}

.shell {
    width: min(1180px, calc(100% - 34px));
    margin: 0 auto;
    padding: 34px 0 70px;
}

.hero {
    display: grid;
    gap: 18px;
    padding: 22px 0 30px;
}

.product-hero {
    grid-template-columns: minmax(0, 0.92fr) minmax(360px, 0.78fr);
    align-items: center;
    gap: 32px;
    min-height: 520px;
}

.hero-copy {
    display: grid;
    gap: 18px;
}

.hero-art {
    position: relative;
    min-height: 360px;
    overflow: hidden;
    border: 1px solid rgba(187, 199, 214, 0.7);
    border-radius: 8px;
    background: #101826;
    box-shadow: var(--shadow);
}

.hero-art img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 360px;
    object-fit: cover;
}

.hero-art::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    pointer-events: none;
}

.eyebrow {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 5px 9px;
    border: 1px solid rgba(15, 122, 93, 0.22);
    border-radius: 8px;
    background: #edf8f3;
    color: #0d6b51;
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
}

h1,
h2,
h3 {
    margin: 0;
    line-height: 1.18;
    letter-spacing: 0;
}

h1 {
    max-width: 820px;
    font-size: clamp(34px, 5vw, 60px);
}

h2 {
    font-size: 23px;
}

h3 {
    font-size: 16px;
}

p {
    margin: 0 0 12px;
}

.lede {
    max-width: 790px;
    color: var(--muted);
    font-size: 17px;
}

.band {
    padding: 30px 0;
    border-top: 1px solid rgba(216, 224, 234, 0.9);
}

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

.grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.endpoint-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.endpoint-tile {
    min-height: 142px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}

.endpoint-tile code {
    display: inline-block;
    margin-bottom: 10px;
}

.panel,
.metric,
.notice,
.table-wrap {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-soft);
}

.panel {
    padding: 20px;
}

.metric {
    padding: 16px;
}

.metric span,
.muted {
    color: var(--muted);
}

.metric strong {
    display: block;
    margin-top: 5px;
    color: #111827;
    font-family: var(--mono);
    font-size: 14px;
    overflow-wrap: anywhere;
}

.status-line {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 8px;
}

.chip {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: #475467;
    font-size: 12px;
    font-weight: 800;
}

.chip.good {
    border-color: #9ce5c4;
    background: #ecfdf3;
    color: #087443;
}

.chip.blue {
    border-color: #bccaff;
    background: #eef3ff;
    color: #315fd6;
}

.chip.warn {
    border-color: #f8d48d;
    background: #fff8e8;
    color: #8a570d;
}

.notice {
    margin: 0 0 18px;
    padding: 13px 15px;
}

.notice.good {
    border-color: #a6f4c5;
    background: #ecfdf3;
    color: var(--good);
}

.notice.bad {
    border-color: #fecdca;
    background: #fef3f2;
    color: var(--bad);
}

.notice.warn {
    border-color: #fedf89;
    background: #fffaeb;
    color: #9a5b00;
}

label {
    display: block;
    margin: 11px 0 6px;
    color: #344054;
    font-size: 13px;
    font-weight: 820;
}

input,
select,
textarea {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    padding: 9px 11px;
    background: #fff;
    color: var(--text);
    font: inherit;
    outline: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(15, 122, 93, 0.65);
    box-shadow: 0 0 0 3px rgba(15, 122, 93, 0.12);
}

textarea {
    min-height: 130px;
    font-family: var(--mono);
    font-size: 13px;
}

.checks {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 10px 0 14px;
}

.checks label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    margin: 0;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
    color: #344054;
    font-weight: 750;
}

.checks input {
    width: auto;
    min-height: auto;
}

code,
pre {
    font-family: var(--mono);
}

code {
    padding: 2px 6px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #f4f7fb;
    color: #172033;
    overflow-wrap: anywhere;
}

pre {
    margin: 12px 0 0;
    padding: 15px;
    overflow-x: auto;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: var(--code-bg);
    color: var(--code-text);
    font-size: 13px;
    line-height: 1.55;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

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

th {
    background: #f4f7fb;
    color: #5b6778;
    font-size: 12px;
    text-transform: uppercase;
}

tbody tr:hover td {
    background: #fbfcfe;
}

tr:last-child td {
    border-bottom: 0;
}

.table-wrap {
    overflow-x: auto;
}

.actions {
    display: flex;
    gap: 9px;
    flex-wrap: wrap;
    align-items: center;
}

.stack {
    display: grid;
    gap: 15px;
}

.split {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 20px;
}

.sidebar {
    position: sticky;
    top: 88px;
    display: grid;
    gap: 6px;
    align-content: start;
    height: fit-content;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-soft);
}

.sidebar a {
    padding: 8px 10px;
    border-radius: 7px;
    text-decoration: none;
    color: var(--muted);
    font-weight: 780;
}

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

.admin-shell .band {
    padding: 24px 0;
}

.admin-shell .hero {
    padding-bottom: 20px;
}

.admin-shell h1 {
    font-size: clamp(30px, 4vw, 46px);
}

@media (max-width: 1050px) {
    .product-hero {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .endpoint-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 840px) {
    .topbar {
        align-items: flex-start;
        flex-direction: column;
        padding: 12px 16px;
    }

    .grid,
    .grid.two,
    .split {
        grid-template-columns: 1fr;
    }

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

    .sidebar {
        position: static;
    }

    table {
        min-width: 780px;
    }
}

@media (max-width: 560px) {
    .endpoint-grid {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 32px;
    }

    .hero-art,
    .hero-art img {
        min-height: 250px;
    }
}
