.integration-hero-card {
    background: var(--deep);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    color: #fff;
    overflow: hidden;
    padding: 28px;
    position: relative;
}

.integration-hero-card::after {
    background: var(--orange);
    border-radius: 50%;
    content: "";
    height: 170px;
    opacity: 0.16;
    position: absolute;
    right: -72px;
    top: -84px;
    width: 170px;
}

.integration-hero-card > * {
    position: relative;
    z-index: 1;
}

.integration-hero-card h2 {
    color: #fff;
    font-size: clamp(1.45rem, 2.7vw, 2.1rem);
    letter-spacing: -0.035em;
    margin: 10px 0 22px;
}

.hero-route {
    display: grid;
    gap: 8px;
}

.hero-route-step {
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    display: grid;
    gap: 12px;
    grid-template-columns: 32px 1fr;
    padding: 11px 13px;
}

.hero-route-step span {
    align-items: center;
    background: var(--teal);
    border-radius: 50%;
    color: #fff;
    display: inline-flex;
    font-size: 11px;
    font-weight: 900;
    height: 32px;
    justify-content: center;
    width: 32px;
}

.hero-route-step strong {
    color: #fff;
    font-size: 13px;
}

.hero-route-arrow {
    color: #a9d8d1;
    font-size: 15px;
    line-height: 1;
    padding-left: 9px;
}

.integration-summary {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 22px;
}

.lifecycle-rail {
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.lifecycle-rail + .callout {
    margin-top: 22px;
}

.content-section > .callout {
    margin-top: 22px;
}

.content-section > .callout:last-child {
    margin-bottom: 0;
}

.lifecycle-rail ~ .audience-grid {
    margin-top: 22px;
}

.summary-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 18px;
}

.summary-card span {
    color: var(--teal);
    display: block;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.summary-card strong {
    color: var(--navy);
    display: block;
    font-size: 14px;
    line-height: 1.35;
    margin-bottom: 5px;
}

.summary-card p {
    color: var(--ink-soft);
    font-size: 12px;
    margin: 0;
}

.diagram-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 10px 35px rgba(24, 54, 75, 0.045);
    margin-top: 22px;
    overflow: hidden;
}

.diagram-header {
    align-items: start;
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 20px;
    justify-content: space-between;
    padding: 20px 22px;
}

.diagram-header h3 {
    color: var(--navy);
    font-size: 1.13rem;
    margin-bottom: 5px;
}

.diagram-header p {
    color: var(--ink-soft);
    font-size: 13px;
    margin: 0;
    max-width: 760px;
}

.diagram-type {
    background: var(--teal-soft);
    border-radius: 999px;
    color: var(--teal);
    flex: 0 0 auto;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.08em;
    padding: 5px 9px;
    text-transform: uppercase;
}

.activity-flow {
    display: grid;
    gap: 34px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 24px 22px 26px;
}

.activity-step {
    background: var(--surface-strong);
    border: 1px solid var(--line-dark);
    border-radius: 13px;
    flex: 1 1 0;
    min-width: 0;
    overflow-wrap: anywhere;
    padding: 15px;
    position: relative;
}

.activity-step:not(:last-child)::after {
    color: var(--teal);
    content: "→";
    font-size: 19px;
    font-weight: 900;
    position: absolute;
    right: -27px;
    top: 50%;
    transform: translateY(-50%);
}

.activity-step:nth-child(4n):not(:last-child)::after {
    bottom: -29px;
    content: "↓";
    left: 50%;
    right: auto;
    top: auto;
    transform: translateX(-50%);
}

.activity-step:nth-child(5) {
    grid-column: 4;
    grid-row: 2;
}

.activity-step:nth-child(6) {
    grid-column: 3;
    grid-row: 2;
}

.activity-step:nth-child(7) {
    grid-column: 2;
    grid-row: 2;
}

.activity-step:nth-child(n + 5):not(:last-child)::after {
    content: "←";
    left: -27px;
    right: auto;
}

.activity-step.start,
.activity-step.end {
    border-color: var(--teal);
}

.activity-step.decision {
    border-color: var(--orange);
    box-shadow: inset 0 0 0 2px var(--orange-soft);
}

.activity-owner {
    color: var(--teal);
    display: block;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.activity-step[data-owner="browser"] .activity-owner {
    color: var(--warning);
}

.activity-step[data-owner="hub"] .activity-owner {
    color: var(--navy-2);
}

.activity-step strong {
    color: var(--navy);
    display: block;
    font-size: 13px;
    line-height: 1.35;
    margin-bottom: 6px;
}

.activity-step small {
    color: var(--ink-soft);
    display: block;
    font-size: 11px;
    line-height: 1.5;
}

.activity-step code {
    overflow-wrap: anywhere;
}

.diagram-note {
    align-items: start;
    background: var(--blue-soft);
    border-top: 1px solid var(--line);
    color: var(--ink-soft);
    display: grid;
    font-size: 12px;
    gap: 10px;
    grid-template-columns: auto 1fr;
    padding: 14px 22px;
}

.diagram-note strong {
    color: var(--navy);
}

.diagram-note > span:last-child {
    min-width: 0;
    overflow-wrap: anywhere;
}

.diagram-note-symbol {
    align-items: center;
    background: var(--deep);
    border-radius: 50%;
    color: #fff;
    display: inline-flex;
    font-size: 10px;
    font-weight: 900;
    height: 22px;
    justify-content: center;
    width: 22px;
}

.provider-overview {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 22px;
}

.provider-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.provider-card header {
    border-bottom: 1px solid var(--line);
    padding: 20px;
}

.provider-number {
    align-items: center;
    background: var(--deep);
    border-radius: 10px;
    color: #fff;
    display: inline-flex;
    font-size: 14px;
    font-weight: 900;
    height: 38px;
    justify-content: center;
    margin-bottom: 13px;
    width: 38px;
}

.provider-card h3 {
    color: var(--navy);
    font-size: 1.08rem;
    margin-bottom: 7px;
}

.provider-card header p {
    color: var(--ink-soft);
    font-size: 12px;
    margin: 0;
}

.provider-flow {
    display: grid;
    flex: 1;
    gap: 0;
    padding: 0 20px;
}

.provider-step {
    border-left: 2px solid var(--line-dark);
    padding: 16px 0 16px 20px;
    position: relative;
}

.provider-step::before {
    background: var(--surface-strong);
    border: 2px solid var(--teal);
    border-radius: 50%;
    content: "";
    height: 10px;
    left: -7px;
    position: absolute;
    top: 21px;
    width: 10px;
}

.provider-step strong {
    color: var(--navy);
    display: block;
    font-size: 13px;
    margin-bottom: 4px;
}

.provider-step p {
    color: var(--ink-soft);
    font-size: 11px;
    margin: 0;
}

.provider-result {
    background: var(--teal-soft);
    border-top: 1px solid var(--line);
    color: var(--ink-soft);
    font-size: 12px;
    margin-top: auto;
    padding: 15px 20px;
}

.provider-result strong {
    color: var(--teal);
}

.scan-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 22px;
}

.scan-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 21px;
}

.scan-card h3 {
    color: var(--navy);
    font-size: 1.05rem;
    margin-bottom: 7px;
}

.scan-card > p {
    color: var(--ink-soft);
    font-size: 12px;
    margin-bottom: 15px;
}

.mini-flow {
    display: grid;
    gap: 7px;
}

.mini-step {
    background: var(--surface-strong);
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--ink-soft);
    font-size: 11px;
    padding: 10px 11px;
    position: relative;
}

.mini-step:not(:last-child)::after {
    bottom: -12px;
    color: var(--teal);
    content: "↓";
    font-weight: 900;
    left: 50%;
    position: absolute;
    transform: translateX(-50%);
    z-index: 2;
}

.mini-step strong {
    color: var(--navy);
}

.implementation-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: 1fr 1fr;
    margin-top: 22px;
}

.implementation-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
}

.implementation-card h3 {
    color: var(--navy);
    font-size: 1.08rem;
    margin-bottom: 7px;
}

.implementation-card > p {
    color: var(--ink-soft);
    font-size: 12px;
    margin-bottom: 14px;
}

.implementation-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.implementation-list li {
    border-top: 1px solid var(--line);
    color: var(--ink-soft);
    font-size: 13px;
    padding: 11px 0 11px 26px;
    position: relative;
}

.implementation-list li::before {
    color: var(--success);
    content: "✓";
    font-weight: 900;
    left: 2px;
    position: absolute;
}

@media (max-width: 1050px) {
    .lifecycle-rail {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .lifecycle-rail .phase-card:nth-child(3)::after {
        display: flex;
    }

    .lifecycle-rail .phase-card:nth-child(4)::after {
        display: none;
    }

    .integration-summary,
    .provider-overview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .activity-step:nth-child(4) {
        grid-column: 3;
        grid-row: 2;
    }

    .activity-step:nth-child(5) {
        grid-column: 2;
        grid-row: 2;
    }

    .activity-step:nth-child(6) {
        grid-column: 1;
        grid-row: 2;
    }

    .activity-step:nth-child(7) {
        grid-column: 1;
        grid-row: 3;
    }

    .activity-step:nth-child(3n):not(:last-child)::after {
        bottom: -25px;
        content: "↓";
        left: 50%;
        right: auto;
        top: auto;
        transform: translateX(-50%);
    }

    .activity-step:nth-child(4):not(:last-child)::after,
    .activity-step:nth-child(5):not(:last-child)::after {
        bottom: auto;
        content: "←";
        left: -24px;
        right: auto;
        top: 50%;
        transform: translateY(-50%);
    }
}

@media (max-width: 760px) {
    .header-actions {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .integration-summary,
    .provider-overview,
    .scan-grid,
    .implementation-grid,
    .activity-flow {
        grid-template-columns: 1fr;
    }

    .lifecycle-rail {
        grid-template-columns: 1fr;
    }

    .lifecycle-rail .phase-card:not(:last-child)::after,
    .lifecycle-rail .phase-card:nth-child(4)::after {
        bottom: -20px;
        content: "↓";
        display: flex;
        left: calc(50% - 13px);
        right: auto;
        top: auto;
    }

    .diagram-header {
        display: grid;
    }

    .diagram-type {
        justify-self: start;
    }

    .activity-step,
    .activity-step:nth-child(n) {
        grid-column: auto;
        grid-row: auto;
    }

    .activity-flow .activity-step:not(:last-child)::after {
        bottom: -26px;
        content: "↓";
        left: 50%;
        right: auto;
        top: auto;
        transform: translateX(-50%);
    }
}

@media print {
    .diagram-card,
    .provider-card,
    .scan-card,
    .implementation-card,
    .summary-card {
        break-inside: avoid;
        box-shadow: none;
    }

    .activity-flow {
        gap: 24px;
    }
}
