:root {
    --bg: #f5f7f7;
    --surface: #ffffff;
    --surface-soft: #f0fdfa;
    --ink: #102a2a;
    --muted: #607171;
    --line: #dce6e5;
    --line-strong: #c5d4d2;
    --primary: #0f766e;
    --primary-dark: #115e59;
    --primary-bright: #14b8a6;
    --primary-soft: #ccfbf1;
    --blue: #2563eb;
    --amber: #b45309;
    --red: #c2413b;
    --code: #0d1f23;
    --radius: 18px;
    --shadow: 0 18px 55px rgba(16, 42, 42, 0.08);
}

* {
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}
body {
    margin: 0;
    color: var(--ink);
    background: var(--bg);
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}
a {
    color: inherit;
}
code,
pre {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}
code {
    font-size: 0.9em;
}
p code,
li code,
td code,
.notice code {
    color: var(--primary-dark);
    background: #e7f5f3;
    border: 1px solid #cde7e3;
    border-radius: 5px;
    padding: 2px 5px;
    overflow-wrap: anywhere;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 26px;
    min-height: 72px;
    padding: 12px clamp(18px, 4vw, 54px);
    border-bottom: 1px solid rgba(220, 230, 229, 0.9);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px);
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    margin-right: auto;
}
.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-bright));
    font-size: 21px;
    font-weight: 900;
    box-shadow: 0 10px 25px rgba(15, 118, 110, 0.24);
}
.brand strong,
.brand small {
    display: block;
    line-height: 1.2;
}
.brand small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
}
.top-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}
.top-nav a {
    padding: 8px 10px;
    color: #486060;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    border-radius: 8px;
}
.top-nav a:hover {
    color: var(--primary-dark);
    background: var(--surface-soft);
}
.header-cta {
    padding: 9px 13px;
    color: #fff;
    background: var(--primary);
    border-radius: 9px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
}

main {
    overflow: clip;
}
.hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 500px);
    gap: clamp(36px, 6vw, 82px);
    align-items: center;
    width: min(1220px, calc(100% - 36px));
    margin: 0 auto;
    padding: clamp(70px, 10vw, 130px) 0 74px;
}
.hero::before {
    content: "";
    position: absolute;
    z-index: -1;
    width: 700px;
    height: 700px;
    left: -420px;
    top: -270px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(20, 184, 166, 0.16),
        transparent 68%
    );
}
.eyebrow {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 20px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.eyebrow span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.12);
}
h1 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(45px, 6.3vw, 80px);
    line-height: 1.01;
    letter-spacing: -0.065em;
}
.lead {
    max-width: 720px;
    margin: 25px 0 0;
    color: var(--muted);
    font-size: clamp(17px, 2vw, 21px);
}
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 11px;
    margin-top: 32px;
}
.button {
    display: inline-flex;
    justify-content: center;
    padding: 12px 18px;
    border: 1px solid transparent;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 800;
}
.button.primary {
    color: #fff;
    background: var(--primary);
    box-shadow: 0 13px 28px rgba(15, 118, 110, 0.2);
}
.button.secondary {
    background: var(--surface);
    border-color: var(--line-strong);
}
.verified {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 25px;
    color: var(--muted);
    font-size: 13px;
}
.verified span {
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    color: var(--primary);
    background: var(--primary-soft);
    border-radius: 50%;
    font-weight: 900;
}

.terminal {
    overflow: hidden;
    color: #d5e8e6;
    background: var(--code);
    border: 1px solid #1b3b3f;
    border-radius: 20px;
    box-shadow: 0 28px 80px rgba(9, 29, 33, 0.25);
    transform: rotate(1deg);
}
.terminal-bar {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 14px 17px;
    color: #78979a;
    background: #11272c;
    border-bottom: 1px solid #1b3b3f;
    font-size: 12px;
}
.terminal-bar i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #e36d68;
}
.terminal-bar i:nth-child(2) {
    background: #e9b85d;
}
.terminal-bar i:nth-child(3) {
    background: #58b88d;
}
.terminal-bar span {
    margin-left: 7px;
}
.terminal pre {
    margin: 0;
    padding: 25px;
    overflow: auto;
    font-size: 12.5px;
    line-height: 1.7;
}
.terminal code {
    color: #d7e7e5;
}
.code-muted {
    color: #67e8f9;
}
.code-key {
    color: #5eead4;
}
.code-string {
    color: #fcd34d;
}
.code-success {
    color: #86efac;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    width: min(1220px, calc(100% - 36px));
    margin: 0 auto 74px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.feature-grid article {
    min-width: 0;
    padding: 25px;
    border-right: 1px solid var(--line);
}
.feature-grid article:last-child {
    border-right: 0;
}
.feature-grid article > span {
    color: var(--primary);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
}
.feature-grid strong {
    display: block;
    margin: 6px 0 5px;
    font-size: 15px;
}
.feature-grid p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.docs-layout {
    display: grid;
    grid-template-columns: 230px minmax(0, 890px);
    gap: clamp(38px, 6vw, 80px);
    justify-content: center;
    width: min(1220px, calc(100% - 36px));
    margin: 0 auto 100px;
}
.sidebar {
    position: relative;
}
.sidebar-inner {
    position: sticky;
    top: 96px;
    max-height: calc(100vh - 120px);
    overflow: auto;
    padding: 4px 10px 20px 0;
}
.sidebar p {
    margin: 0 0 10px;
    color: #879696;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}
.sidebar a {
    position: relative;
    display: block;
    padding: 6px 10px;
    color: #607171;
    border-left: 2px solid var(--line);
    text-decoration: none;
    font-size: 13px;
}
.sidebar a:hover,
.sidebar a.active {
    color: var(--primary-dark);
    border-color: var(--primary-bright);
    background: linear-gradient(90deg, rgba(20, 184, 166, 0.07), transparent);
}
.sidebar a.active {
    font-weight: 750;
}
.docs-content {
    min-width: 0;
}
.doc-section {
    padding: 0 0 74px;
    margin: 0 0 74px;
    border-bottom: 1px solid var(--line);
}
.doc-section:last-child {
    border-bottom: 0;
}
.section-kicker {
    margin-bottom: 10px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
h2 {
    margin: 0 0 18px;
    font-size: clamp(29px, 4vw, 43px);
    line-height: 1.12;
    letter-spacing: -0.035em;
}
h3 {
    margin: 38px 0 13px;
    font-size: 19px;
    letter-spacing: -0.015em;
}
.doc-section > p {
    color: var(--muted);
    font-size: 16px;
}
.endpoint-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}
.endpoint-heading h2 {
    margin: 0;
    overflow-wrap: anywhere;
}
.method {
    flex: 0 0 auto;
    display: inline-grid;
    place-items: center;
    min-width: 48px;
    padding: 5px 7px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.05em;
}
.method.post {
    color: #075e54;
    background: #ccfbf1;
    border: 1px solid #99f6e4;
}
.method.get {
    color: #1d4ed8;
    background: #dbeafe;
    border: 1px solid #bfdbfe;
}

.flow {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin-top: 30px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
}
.flow > div {
    display: flex;
    gap: 11px;
    padding: 19px 14px;
    border-right: 1px solid var(--line);
}
.flow > div:last-child {
    border-right: 0;
}
.flow b {
    display: grid;
    place-items: center;
    flex: 0 0 25px;
    height: 25px;
    color: var(--primary);
    background: var(--primary-soft);
    border-radius: 50%;
    font-size: 11px;
}
.flow strong,
.flow small {
    display: block;
}
.flow strong {
    font-size: 13px;
}
.flow small {
    margin-top: 3px;
    color: var(--muted);
    line-height: 1.35;
}
.notice {
    margin-top: 22px;
    padding: 16px 18px;
    color: #425a59;
    background: #f8fbfb;
    border: 1px solid var(--line);
    border-left: 4px solid #8ea5a3;
    border-radius: 9px;
    font-size: 14px;
}
.notice.info {
    background: #effcf9;
    border-color: #b9e9df;
    border-left-color: var(--primary-bright);
}
.notice.warning {
    background: #fffbeb;
    border-color: #fde68a;
    border-left-color: #f59e0b;
}

.code-card {
    margin: 16px 0;
    overflow: hidden;
    color: #d9e7e6;
    background: var(--code);
    border: 1px solid #1b3b3f;
    border-radius: 13px;
    box-shadow: 0 10px 30px rgba(13, 31, 35, 0.08);
}
.code-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    color: #8aa3a4;
    background: #122a2e;
    border-bottom: 1px solid #1b3b3f;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.code-title button,
.base-url button {
    color: #a7f3d0;
    background: transparent;
    border: 0;
    cursor: pointer;
    font: inherit;
    text-transform: none;
}
.code-card pre {
    margin: 0;
    padding: 19px;
    overflow: auto;
    font-size: 12.5px;
    line-height: 1.65;
}
.code-card code {
    color: inherit;
}
.code-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}
.base-url {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 16px;
    margin: 22px 0;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 11px;
    box-shadow: var(--shadow);
}
.base-url span {
    padding: 4px 7px;
    color: #166534;
    background: #dcfce7;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}
.base-url code {
    min-width: 0;
    overflow-wrap: anywhere;
}
.base-url button {
    margin-left: auto;
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
}

.table-wrap {
    margin: 20px 0;
    overflow-x: auto;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
}
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}
th,
td {
    padding: 13px 15px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}
th {
    color: #536968;
    background: #f7fafa;
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
tr:last-child td {
    border-bottom: 0;
}
.wide-table table {
    min-width: 760px;
}
.endpoint-list {
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 13px;
}
.endpoint-list a {
    display: grid;
    grid-template-columns: 55px minmax(0, 1fr) minmax(160px, 0.9fr);
    gap: 13px;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid var(--line);
    text-decoration: none;
}
.endpoint-list a:last-child {
    border-bottom: 0;
}
.endpoint-list a:hover {
    background: #f8fbfb;
}
.endpoint-list small {
    color: var(--muted);
}
.format-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 22px 0;
}
.format-grid div {
    padding: 15px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
}
.format-grid code,
.format-grid span {
    display: block;
}
.format-grid code {
    color: var(--primary-dark);
    font-size: 14px;
    font-weight: 800;
}
.format-grid span {
    color: var(--muted);
    font-size: 12px;
}
.comparison {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 25px 0;
}
.comparison article {
    position: relative;
    padding: 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 11px;
}
.comparison article strong {
    display: block;
    padding-right: 42px;
    font-size: 13px;
}
.comparison article p {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 13px;
}
.status-pill {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 3px 6px;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 900;
}
.status-pill.accepted {
    color: #075e54;
    background: #ccfbf1;
}
.status-pill.ok {
    color: #166534;
    background: #dcfce7;
}
.status-pill.conflict {
    color: #991b1b;
    background: #fee2e2;
}
.status-flow {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 24px 0 10px;
}
.status-flow span {
    padding: 7px 11px;
    border-radius: 999px;
    font-family: monospace;
    font-size: 12px;
    font-weight: 800;
}
.status-flow .processing {
    color: #92400e;
    background: #fef3c7;
}
.status-flow .completed {
    color: #166534;
    background: #dcfce7;
}
.status-flow b {
    color: var(--muted);
}
.dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 7px;
    border-radius: 50%;
}
.dot.pending {
    background: #f59e0b;
}
.dot.sent {
    background: #3b82f6;
}
.dot.delivered {
    background: #22c55e;
}
.dot.failed {
    background: #ef4444;
}
.callback-meta,
.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 22px 0;
}
.callback-meta div,
.metric-grid div {
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
}
.callback-meta strong,
.callback-meta code,
.metric-grid strong,
.metric-grid span {
    display: block;
}
.callback-meta strong {
    color: var(--muted);
    font-size: 10px;
    text-transform: uppercase;
}
.callback-meta code {
    margin-top: 5px;
    color: var(--primary-dark);
}
.metric-grid {
    grid-template-columns: repeat(3, 1fr);
}
.metric-grid strong {
    font-size: 21px;
}
.metric-grid span {
    color: var(--muted);
    font-size: 12px;
}
.test-list {
    padding: 0;
    margin: 25px 0;
    list-style: none;
}
.test-list li {
    display: flex;
    gap: 16px;
    padding: 17px 0;
    border-bottom: 1px solid var(--line);
}
.test-list li > span {
    display: grid;
    place-items: center;
    flex: 0 0 30px;
    height: 30px;
    color: #fff;
    background: var(--primary);
    border-radius: 50%;
    font-size: 11px;
    font-weight: 900;
}
.test-list strong {
    display: block;
}
.test-list p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 13px;
}
.download-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 17px;
    color: var(--ink);
    background: var(--surface-soft);
    border: 1px solid #a7e8dc;
    border-radius: 12px;
    text-decoration: none;
}
.download-card > span {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: #fff;
    background: var(--primary);
    border-radius: 9px;
    font-size: 20px;
}
.download-card strong,
.download-card small {
    display: block;
}
.download-card small {
    color: var(--muted);
}
.checklist {
    display: grid;
    gap: 9px;
    margin-top: 25px;
}
.checklist label {
    display: flex;
    gap: 11px;
    align-items: flex-start;
    padding: 13px 15px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 9px;
    font-size: 14px;
}
.checklist input {
    width: 17px;
    height: 17px;
    margin-top: 2px;
    accent-color: var(--primary);
}

footer {
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 35px clamp(18px, 4vw, 54px);
    color: #b8cfcd;
    background: #0d1f23;
}
footer div {
    margin-right: auto;
}
footer strong,
footer span {
    display: block;
}
footer span {
    color: #6f8f90;
    font-size: 12px;
}
footer p {
    color: #789596;
    font-size: 12px;
}
footer a {
    color: #99f6e4;
    font-size: 12px;
    text-decoration: none;
}
.toast {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 50;
    padding: 10px 14px;
    color: #fff;
    background: #102a2a;
    border-radius: 8px;
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: 0.2s ease;
    font-size: 12px;
}
.toast.show {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 1040px) {
    .top-nav {
        display: none;
    }
    .hero {
        grid-template-columns: 1fr;
    }
    .terminal {
        max-width: 680px;
        transform: none;
    }
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .feature-grid article:nth-child(2) {
        border-right: 0;
    }
    .feature-grid article:nth-child(-n + 2) {
        border-bottom: 1px solid var(--line);
    }
    .docs-layout {
        grid-template-columns: 190px minmax(0, 1fr);
        gap: 36px;
    }
    .flow {
        grid-template-columns: repeat(2, 1fr);
    }
    .flow > div:nth-child(2) {
        border-right: 0;
    }
    .flow > div:nth-child(-n + 2) {
        border-bottom: 1px solid var(--line);
    }
}
@media (max-width: 760px) {
    html {
        scroll-padding-top: 76px;
    }
    .site-header {
        min-height: 64px;
    }
    .brand small,
    .header-cta {
        display: none;
    }
    .hero {
        padding: 58px 0;
    }
    .hero h1 {
        font-size: clamp(42px, 13vw, 62px);
    }
    .feature-grid {
        grid-template-columns: 1fr;
    }
    .feature-grid article {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }
    .feature-grid article:last-child {
        border-bottom: 0;
    }
    .docs-layout {
        display: block;
    }
    .sidebar {
        display: none;
    }
    .doc-section {
        padding-bottom: 55px;
        margin-bottom: 55px;
    }
    .flow,
    .code-grid,
    .comparison,
    .callback-meta,
    .metric-grid,
    .format-grid {
        grid-template-columns: 1fr;
    }
    .flow > div {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }
    .flow > div:last-child {
        border-bottom: 0;
    }
    .endpoint-list a {
        grid-template-columns: 52px minmax(0, 1fr);
    }
    .endpoint-list small {
        display: none;
    }
    .base-url {
        align-items: flex-start;
        flex-wrap: wrap;
    }
    .base-url button {
        margin-left: 0;
    }
    footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }
    footer div {
        margin: 0;
    }
}
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *,
    *::before,
    *::after {
        transition: none !important;
    }
}
