.integration-page {
    min-height: 100vh;
    background: var(--bg);
    overflow-x: hidden;
}

.integration-main {
    overflow: hidden;
}

.integration-hero {
    position: relative;
    padding: 92px 0 104px;
    background:
        radial-gradient(circle at 82% 20%, rgba(124, 58, 237, 0.16), transparent 30%),
        radial-gradient(circle at 4% 86%, rgba(59, 130, 246, 0.1), transparent 25%),
        var(--bg);
}

.integration-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(430px, 0.86fr);
    gap: 72px;
    align-items: center;
}

.integration-hero__copy h1 {
    max-width: 760px;
    margin: 20px 0 24px;
    font-size: clamp(45px, 5.2vw, 70px);
    overflow-wrap: anywhere;
}

.integration-hero__copy > p {
    max-width: 680px;
    margin-bottom: 30px;
    color: var(--muted);
    font-size: 19px;
    line-height: 1.7;
}

.integration-hero__actions,
.docs-cta__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.api-preview {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 26px;
    color: #e8e7ff;
    background: #17152b;
    box-shadow: 0 34px 90px rgba(37, 28, 112, 0.25);
    transform: rotate(1deg);
}

.api-preview__top {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 54px;
    padding: 0 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.035);
}

.api-preview__top span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #5d5a76;
}

.api-preview__top span:first-child { background: #f87171; }
.api-preview__top span:nth-child(2) { background: #fbbf24; }
.api-preview__top span:nth-child(3) { background: #34d399; }

.api-preview__top strong {
    margin-left: auto;
    color: #aaa6d7;
    font-family: Consolas, "Courier New", monospace;
    font-size: 12px;
    font-weight: 600;
}

.api-preview pre {
    margin: 0;
    padding: 30px;
    overflow-x: auto;
    color: #d9d7fb;
    font-size: 14px;
    line-height: 1.8;
}

.api-preview__status {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 16px 20px;
    color: #c8f7da;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(22, 163, 74, 0.1);
    font-size: 13px;
    font-weight: 750;
}

.api-preview__status span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.13);
}

.docs-section {
    padding: 96px 0;
}

.docs-section--soft {
    background: #f0f2f9;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.docs-heading {
    max-width: 760px;
    margin-bottom: 34px;
}

.docs-heading h2,
.docs-endpoint h2,
.docs-cta h2 {
    margin: 11px 0 0;
    font-size: clamp(32px, 4vw, 50px);
    line-height: 1.08;
    letter-spacing: -0.04em;
    overflow-wrap: anywhere;
}

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

.docs-step,
.docs-panel,
.docs-endpoint,
.docs-table {
    min-width: 0;
    border: 1px solid var(--line);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.docs-step {
    position: relative;
    padding: 30px;
    border-radius: var(--radius-md);
}

.docs-step__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    min-height: 34px;
    padding: 4px 10px;
    border-radius: 999px;
    color: var(--primary-dark);
    background: var(--primary-soft);
    font-size: 13px;
    font-weight: 850;
}

.docs-step h3 {
    margin: 22px 0 10px;
    font-size: 21px;
    line-height: 1.25;
}

.docs-step p,
.docs-endpoint p {
    margin: 0;
    color: var(--muted);
}

.integration-page p code,
.integration-page li code,
.docs-table code {
    padding: 2px 6px;
    border-radius: 6px;
    color: var(--primary-dark);
    background: var(--primary-soft);
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.92em;
    overflow-wrap: anywhere;
}

.docs-endpoint {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 42px;
    align-items: center;
    padding: 38px;
    border-radius: var(--radius-md);
}

.docs-endpoint p {
    margin-top: 14px;
}

.docs-endpoint__url {
    display: block;
    padding: 20px 22px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    color: #efefff;
    background: #17152b;
    font-family: Consolas, "Courier New", monospace;
    font-size: 14px;
    overflow-wrap: anywhere;
}

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

.docs-panel {
    padding: 30px;
    border-radius: var(--radius-md);
}

.docs-panel--success {
    border-color: rgba(22, 163, 74, 0.22);
    background: linear-gradient(145deg, #ffffff, #f1fbf5);
}

.docs-panel__title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.docs-panel__title span {
    display: grid;
    place-items: center;
    min-width: 38px;
    height: 34px;
    padding: 0 9px;
    border-radius: 10px;
    color: var(--primary-dark);
    background: var(--primary-soft);
    font-size: 12px;
    font-weight: 900;
}

.docs-panel--success .docs-panel__title span {
    color: #087934;
    background: #dcfce7;
}

.docs-panel__title h3 {
    margin: 0;
    font-size: 22px;
}

.docs-panel pre {
    max-width: 100%;
    margin: 0;
    padding: 22px;
    overflow-x: auto;
    border-radius: 15px;
    color: #e6e4ff;
    background: #17152b;
    font-size: 13px;
    line-height: 1.65;
}

.docs-panel pre code,
.api-preview pre code {
    font-family: Consolas, "Courier New", monospace;
}

.docs-table {
    overflow: hidden;
    border-radius: var(--radius-md);
}

.docs-table__row {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 24px;
    align-items: center;
    padding: 17px 24px;
    border-top: 1px solid var(--line);
}

.docs-table__row:first-child {
    border-top: 0;
}

.docs-table__row--head {
    color: #4b5563;
    background: var(--surface-soft);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.docs-table__row > code {
    width: max-content;
    font-weight: 750;
}

.docs-checklist {
    display: grid;
    gap: 13px;
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--muted);
}

.docs-checklist li {
    position: relative;
    padding-left: 29px;
}

.docs-checklist li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 1px;
    display: grid;
    place-items: center;
    width: 19px;
    height: 19px;
    border-radius: 50%;
    color: #ffffff;
    background: var(--primary);
    font-size: 11px;
    font-weight: 900;
}

.docs-cta {
    padding: 0 0 96px;
}

.docs-cta__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 42px;
    padding: 48px;
    border-radius: var(--radius-lg);
    color: #ffffff;
    background:
        radial-gradient(circle at 85% 0, rgba(255, 255, 255, 0.18), transparent 33%),
        linear-gradient(135deg, #4e43e8, #713fe7);
    box-shadow: var(--shadow-lg);
}

.docs-cta .section-kicker {
    color: rgba(255, 255, 255, 0.75);
}

.docs-cta h2 {
    max-width: 650px;
}

.docs-cta__actions {
    flex: 0 0 auto;
    justify-content: flex-end;
}

.docs-cta__secondary {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.08);
}

.docs-cta__secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.integration-footer__links {
    display: flex;
    gap: 22px;
}

.integration-footer__links a:hover {
    color: #ffffff;
}

@media (max-width: 980px) {
    .integration-hero__grid {
        grid-template-columns: 1fr;
        gap: 46px;
    }

    .api-preview {
        width: min(100%, 680px);
        transform: none;
    }

    .docs-steps {
        grid-template-columns: 1fr;
    }

    .docs-cta__inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .docs-cta__actions {
        justify-content: flex-start;
    }
}

@media (max-width: 760px) {
    .integration-hero {
        padding: 58px 0 72px;
    }

    .integration-hero__copy h1 {
        font-size: clamp(39px, 12vw, 54px);
    }

    .integration-hero__copy > p {
        font-size: 17px;
    }

    .docs-section {
        padding: 74px 0;
    }

    .docs-grid,
    .docs-endpoint {
        grid-template-columns: 1fr;
    }

    .docs-endpoint {
        gap: 24px;
        padding: 27px;
    }

    .docs-panel,
    .docs-step {
        padding: 24px;
    }

    .docs-cta {
        padding-bottom: 74px;
    }

    .docs-cta__inner {
        padding: 32px 26px;
        border-radius: 24px;
    }

    .docs-cta__actions,
    .docs-cta__actions .button,
    .integration-hero__actions .button {
        width: 100%;
    }
}

@media (max-width: 560px) {
    .api-preview pre {
        padding: 22px 18px;
        font-size: 12px;
    }

    .api-preview__top strong {
        display: none;
    }

    .docs-table__row {
        grid-template-columns: 1fr;
        gap: 7px;
        padding: 16px 18px;
    }

    .docs-table__row--head {
        display: none;
    }

    .docs-panel pre {
        margin: 0 -10px;
        padding: 18px;
        font-size: 12px;
    }

    .integration-footer__links {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }
}
