/**
 * Route hub page — Apple-inspired SSR layout.
 * Desktop: inset grouped schedule table
 * Tablet: horizontal flight cards
 * Mobile: stacked flight cards
 */

body:has(.route-page) {
    margin: 0;
    background: #f5f5f7;
}

.seo-flight-shell:has(.route-page) {
    max-width: min(1120px, calc(100vw - 1.5rem));
}

.route-page.content-page {
    --rp-font:
        -apple-system, blinkmacsystemfont, "SF Pro Text", "SF Pro Display",
        system-ui, sans-serif;
    --rp-text: #1d1d1f;
    --rp-label: #86868b;
    --rp-fill: #f5f5f7;
    --rp-surface: #fff;
    --rp-separator: rgba(60, 60, 67, 0.12);
    --rp-separator-strong: rgba(60, 60, 67, 0.18);
    --rp-accent: #0dae9c;
    --rp-accent-hover: #0b9987;
    --rp-accent-soft: rgba(13, 174, 156, 0.1);
    --rp-radius: 22px;
    --rp-card-radius: 16px;
    --rp-row-radius: 12px;
    --rp-schedule-cols:
        7.25rem minmax(12rem, 2fr) minmax(9rem, 1.15fr) minmax(6.5rem, auto) 1.25rem;

    max-width: none;
    margin: 0;
    padding: clamp(0.875rem, 2vw, 1.25rem) clamp(0.875rem, 2.5vw, 1.5rem) 2rem;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    font-family: var(--rp-font);
    color: var(--rp-text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

@media (min-width: 1100px) {
    .contact-bar:has(+ .seo-flight-shell .route-page) {
        max-width: min(1120px, calc(100vw - 1.5rem));
    }

    .seo-flight-shell:has(.route-page) > .route-page.content-page {
        padding: 1.25rem clamp(1.125rem, 2vw, 1.5rem) 2.25rem;
        background: var(--rp-surface);
        border-radius: var(--rp-radius);
        box-shadow:
            0 2px 24px rgba(0, 0, 0, 0.05),
            0 0 0 0.5px rgba(0, 0, 0, 0.04);
    }
}

@media (max-width: 1099px) {
    .seo-flight-shell:has(.route-page) {
        padding-inline: clamp(0.5rem, 2vw, 0.875rem);
    }

    .seo-flight-shell:has(.route-page) > .route-page.content-page {
        padding: 0.75rem clamp(0.75rem, 2vw, 1rem) 1.5rem;
        background: var(--rp-surface);
        border-radius: 20px;
        box-shadow:
            0 2px 20px rgba(0, 0, 0, 0.05),
            0 0 0 0.5px rgba(0, 0, 0, 0.04);
    }
}

@media (max-width: 639px) {
    body:has(.route-page) {
        background: var(--rp-fill);
    }

    .seo-flight-shell:has(.route-page) {
        max-width: none;
        padding: 0;
    }

    html body .seo-flight-shell > .route-page.content-page,
    .seo-flight-shell:has(.route-page) > .route-page.content-page {
        padding: 0 0 1.25rem;
        background: transparent;
        border-radius: 0;
        box-shadow: none;
    }

    .rp-hero {
        padding: 0.75rem 1rem 1rem;
        margin-bottom: 0.5rem;
        background: var(--rp-surface);
        border-bottom: 0.5px solid var(--rp-separator);
    }

    .rp-panel--inventory {
        margin-bottom: 0.5rem;
        padding: 0;
        background: transparent;
        border: none;
        border-radius: 0;
        overflow: visible;
    }

    .rp-panel--inventory .rp-panel__title {
        padding: 0 1rem 0.625rem;
        margin-bottom: 0;
    }
}

/* ── Accessibility ── */

.rp-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ── Hero ── */

.rp-hero {
    margin-bottom: 1.25rem;
}

.rp-eyebrow {
    margin: 0 0 0.5rem;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--rp-label);
}

.rp-title {
    margin: 0 0 0.75rem;
    font-size: clamp(1.0625rem, 2.2vw, 1.3125rem);
    font-weight: 650;
    letter-spacing: -0.028em;
    line-height: 1.25;
    color: var(--rp-text);
}

.rp-page .rp-corridor {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4375rem 0.5625rem;
    max-width: 100%;
}

.rp-page .rp-endpoint {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    min-width: 0;
}

.rp-page .rp-endpoint__flag {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    line-height: 0;
}

.rp-page .rp-endpoint__flag .flag-icon {
    width: 1.0625rem;
    height: 0.74rem;
    border-radius: 1px;
    box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.08);
}

.rp-page .rp-endpoint__city {
    font: inherit;
    letter-spacing: inherit;
    line-height: inherit;
    color: inherit;
    overflow-wrap: anywhere;
}

.rp-page .ej-corridor__sep {
    flex-shrink: 0;
    padding: 0 0.0625rem;
    color: var(--rp-label);
    font-size: 0.8125rem;
    font-weight: 400;
    line-height: 1;
    opacity: 0.65;
}

.rp-lede {
    margin: 0 0 1rem;
    max-width: 52ch;
    font-size: 0.875rem;
    line-height: 1.55;
    letter-spacing: -0.01em;
    color: var(--rp-label);
}

.rp-metrics {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 0.125rem;
    border-radius: 12px;
    background: var(--rp-fill);
    border: 0.5px solid var(--rp-separator);
}

.rp-metrics__item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.1875rem;
    padding: 0.625rem 0.875rem;
    min-width: 0;
}

.rp-metrics__divider {
    align-self: stretch;
    width: 0.5px;
    background: var(--rp-separator);
}

.rp-metrics__label {
    margin: 0;
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--rp-label);
}

.rp-metrics__value {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 650;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    line-height: 1.25;
    color: var(--rp-text);
}

.rp-metrics__item:first-child .rp-metrics__value {
    font-size: 1.0625rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.rp-metrics__item--pricing {
    gap: 0.3125rem;
}

.rp-metrics__value--pricing {
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
}

.rp-price-stats {
    display: block;
    min-width: 0;
}

.rp-price-stats--empty {
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: -0.01em;
    color: var(--rp-label);
}

.rp-price-stats__row {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.25rem 0.375rem;
    min-width: 0;
}

.rp-price-stats__label {
    flex-shrink: 0;
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--rp-label);
}

.rp-price-stats__amount {
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
    color: var(--rp-text);
    white-space: nowrap;
}

.rp-price-stats__amount--avg {
    font-size: 0.8125rem;
    font-weight: 650;
    letter-spacing: -0.02em;
    color: var(--rp-label);
}

.rp-price-stats__sep,
.rp-price-stats__divider {
    flex-shrink: 0;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1;
    color: var(--rp-label);
    opacity: 0.72;
}

@media (max-width: 639px) {
    .rp-metrics {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .rp-metrics__divider {
        width: auto;
        height: 0.5px;
    }
}

/* ── Panels ── */

.rp-panel {
    margin-bottom: 1rem;
    padding: 1.125rem 1.25rem;
    border-radius: var(--rp-card-radius);
    background: var(--rp-fill);
    border: 0.5px solid var(--rp-separator);
}

.rp-panel--inventory {
    padding: 1rem 0 0.5rem;
    background: var(--rp-surface);
    border-color: var(--rp-separator);
    overflow: hidden;
}

.rp-panel--inventory .rp-panel__title {
    padding-inline: 1.25rem;
    margin-bottom: 0.875rem;
}

.rp-panel--faq {
    background: var(--rp-surface);
}

.rp-panel__title {
    margin: 0 0 0.875rem;
    font-size: 1.0625rem;
    font-weight: 650;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

/* ── Schedule table (desktop) ── */

.rp-schedule {
    --rp-schedule-pad: 1.25rem;
}

.rp-schedule__head {
    display: grid;
    grid-template-columns: var(--rp-schedule-cols);
    gap: 0 1rem;
    align-items: end;
    padding: 0 var(--rp-schedule-pad) 0.6875rem;
    border-bottom: 0.5px solid var(--rp-separator-strong);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--rp-label);
}

.rp-schedule__col--offer {
    justify-self: end;
    text-align: right;
}

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

.rp-schedule__item {
    border-bottom: 0.5px solid var(--rp-separator);
}

.rp-schedule__item:last-child {
    border-bottom: none;
}

.rp-schedule__link {
    display: grid;
    grid-template-columns: var(--rp-schedule-cols);
    gap: 0 1rem;
    align-items: start;
    padding: 0.9375rem var(--rp-schedule-pad);
    color: inherit;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.rp-schedule__link:hover {
    background: var(--rp-accent-soft);
}

.rp-schedule__link:active {
    background: rgba(13, 174, 156, 0.14);
}

.rp-schedule__link:focus-visible {
    outline: 2px solid var(--rp-accent);
    outline-offset: -2px;
    border-radius: 2px;
}

/* Departure cell */

.rp-departure {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.rp-departure__date {
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.rp-departure__time {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--rp-label);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* Route cell */

.rp-route {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 0.375rem 0.625rem;
    align-items: start;
    width: 100%;
    min-width: 0;
}

.rp-route__leg {
    display: flex;
    flex-direction: column;
    min-width: 0;
    text-align: left;
}

.rp-route__endpoint--compact {
    display: none;
}

.rp-route__endpoint--desktop {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.125rem;
    min-width: 0;
}

.rp-route__city-row {
    display: inline-flex !important;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    font-weight: 650;
    letter-spacing: -0.02em;
    line-height: 1.3;
    color: var(--rp-text);
}

.rp-route__city-row .fc-city-text {
    overflow-wrap: anywhere;
}

.rp-route__flag {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    line-height: 0;
}

.rp-route__flag .flag-icon {
    width: 1.0625rem;
    height: 0.74rem;
    border-radius: 1px;
    box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.08);
}

.rp-route__endpoint--desktop .airport-district,
.rp-route__endpoint--desktop .airport-name {
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.35;
    color: var(--rp-label);
    overflow-wrap: anywhere;
}

.rp-route__code {
    display: inline-flex;
    align-items: center;
    margin-top: 0.125rem;
    padding: 0.125rem 0.4375rem;
    border: 0.5px solid rgba(60, 60, 67, 0.14);
    border-radius: 6px;
    background: rgba(245, 245, 247, 0.95);
    font-family: ui-monospace, "SF Mono", "Roboto Mono", monospace;
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--rp-text);
    line-height: 1.2;
}

.rp-route__endpoint--compact .rp-route__city {
    font-size: 0.9375rem;
    font-weight: 650;
    letter-spacing: -0.02em;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.rp-route__endpoint--compact .rp-route__airport {
    font-size: 0.75rem;
    line-height: 1.4;
    color: var(--rp-label);
    overflow-wrap: anywhere;
}

.rp-route__arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    align-self: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: var(--rp-fill);
    color: var(--rp-label);
}

.rp-schedule__link:hover .rp-route__arrow {
    color: var(--rp-accent);
    background: rgba(13, 174, 156, 0.12);
}

/* Aircraft cell */

.rp-aircraft__model {
    display: block;
    font-size: 0.875rem;
    font-weight: 550;
    letter-spacing: -0.015em;
    line-height: 1.3;
}

.rp-aircraft__class {
    display: block;
    margin-top: 0.125rem;
    font-size: 0.75rem;
    color: var(--rp-label);
    line-height: 1.3;
}

/* Offer cell */

.rp-schedule__cell--offer {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.3125rem;
    justify-self: end;
}

.rp-price {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.rp-score {
    display: inline-flex;
    align-items: baseline;
    gap: 0.0625rem;
    padding: 0.1875rem 0.5rem;
    border-radius: 980px;
    font-size: 0.75rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.rp-score__value {
    font-size: 0.8125rem;
}

.rp-score__suffix {
    font-size: 0.625rem;
    font-weight: 600;
    opacity: 0.85;
}

.rp-score--black {
    background: rgba(28, 28, 30, 0.1);
    color: #1c1c1e;
}

.rp-score--red {
    background: rgba(255, 59, 48, 0.12);
    color: #d70015;
}

.rp-score--yellow {
    background: rgba(255, 149, 0, 0.14);
    color: #c93400;
}

.rp-score--green {
    background: rgba(52, 199, 89, 0.14);
    color: #248a3d;
}

.rp-score--neutral {
    background: var(--rp-accent-soft);
    color: var(--rp-accent);
}

.rp-schedule__action {
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    color: var(--rp-label);
    opacity: 0.4;
    transition:
        opacity 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.rp-schedule__link:hover .rp-schedule__action {
    opacity: 1;
    color: var(--rp-accent);
    transform: translateX(2px);
}

/* ── Tablet: card rows ── */

@media (max-width: 1099px) {
    .rp-schedule {
        --rp-schedule-pad: 1rem;
    }

    .rp-route__endpoint--desktop {
        display: none;
    }

    .rp-route__endpoint--compact {
        display: flex;
        flex-direction: column;
        gap: 0.125rem;
    }

    .rp-schedule__head {
        display: none;
    }

    .rp-schedule__body {
        display: flex;
        flex-direction: column;
        gap: 0.625rem;
        padding: 0 var(--rp-schedule-pad) 0.375rem;
    }

    .rp-schedule__item {
        border: 0.5px solid var(--rp-separator);
        border-radius: var(--rp-row-radius);
        background: var(--rp-fill);
        overflow: hidden;
    }

    .rp-schedule__item:last-child {
        border-bottom: 0.5px solid var(--rp-separator);
    }

    .rp-schedule__link {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "route action"
            "aircraft action"
            "offer offer"
            "dep dep";
        gap: 0.5rem 0.75rem;
        padding: 0.9375rem 1rem;
        align-items: start;
    }

    .rp-schedule__cell--dep {
        grid-area: dep;
        padding-top: 0.5rem;
        border-top: 0.5px solid var(--rp-separator);
    }

    .rp-schedule__cell--route {
        grid-area: route;
    }

    .rp-schedule__cell--aircraft {
        grid-area: aircraft;
    }

    .rp-schedule__cell--offer {
        grid-area: offer;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        justify-self: stretch;
        width: 100%;
    }

    .rp-schedule__action {
        grid-area: action;
        align-self: center;
        width: 1.75rem;
        height: 1.75rem;
        border-radius: 50%;
        background: var(--rp-surface);
        border: 0.5px solid var(--rp-separator);
        opacity: 1;
    }

    .rp-schedule__link:hover .rp-schedule__action {
        background: var(--rp-accent-soft);
        border-color: rgba(13, 174, 156, 0.25);
        transform: none;
    }

    .rp-departure {
        flex-direction: row;
        align-items: baseline;
        gap: 0.5rem;
    }

    .rp-departure__time::before {
        content: "·";
        margin-right: 0.5rem;
        opacity: 0.45;
    }

    .rp-price {
        font-size: 1.0625rem;
    }
}

/* ── Mobile: full-width flight rows ── */

@media (max-width: 639px) {
    .rp-panel--inventory .rp-panel__title {
        font-size: 1rem;
        padding-bottom: 0.75rem;
    }

    .rp-schedule {
        --rp-schedule-pad: 1rem;
    }

    .rp-schedule__body {
        display: flex;
        flex-direction: column;
        gap: 0.625rem;
        padding: 0 0.75rem 0.25rem;
    }

    .rp-schedule__item {
        border: 0.5px solid var(--rp-separator);
        border-radius: var(--rp-row-radius);
        background: var(--rp-surface);
        overflow: hidden;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    }

    .rp-schedule__item:last-child {
        border-bottom: 0.5px solid var(--rp-separator);
    }

    .rp-schedule__link {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "dep action"
            "route route"
            "aircraft aircraft"
            "offer offer";
        gap: 0.5rem 0.75rem;
        padding: 1rem var(--rp-schedule-pad);
        background: transparent;
        transition: none;
        -webkit-tap-highlight-color: transparent;
    }

    .rp-schedule__link:hover,
    .rp-schedule__link:active {
        background: transparent;
    }

    .rp-schedule__link:hover .rp-route__arrow,
    .rp-schedule__link:active .rp-route__arrow {
        color: var(--rp-label);
        background: transparent;
    }

    .rp-schedule__link:hover .rp-schedule__action,
    .rp-schedule__link:active .rp-schedule__action {
        background: var(--rp-accent-soft);
        border-color: rgba(13, 174, 156, 0.25);
        color: var(--rp-accent);
        opacity: 1;
        transform: none;
    }

    .rp-schedule__cell--dep {
        border-top: none;
        padding-top: 0;
        padding-bottom: 0.125rem;
    }

    .rp-schedule__cell--offer {
        padding-top: 0.75rem;
        margin-top: 0.125rem;
        border-top: 0.5px solid var(--rp-separator);
    }

    .rp-schedule__cell--route {
        padding: 0.125rem 0 0.75rem;
        margin: 0;
        border-bottom: 0.5px solid var(--rp-separator);
    }

    .rp-schedule__cell--aircraft {
        padding-top: 0.625rem;
    }

    .rp-route {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .rp-route__arrow {
        justify-content: flex-start;
        width: auto;
        height: auto;
        border-radius: 0;
        background: transparent;
        padding: 0;
    }

    .rp-route__arrow svg {
        transform: rotate(90deg);
    }

    .rp-route__endpoint--compact .rp-route__city {
        font-size: 0.875rem;
    }

    .rp-metrics__item {
        padding: 0.6875rem 0.875rem;
    }

    .rp-panel:not(.rp-panel--inventory) {
        margin-inline: 1rem;
        padding: 1rem;
    }

    .rp-cta {
        padding-inline: 1rem;
    }

    .rp-btn--route-search {
        width: 100%;
        max-width: 100%;
        padding-inline: 1rem;
    }

    .rp-btn__lead {
        white-space: normal;
        text-align: center;
    }

    .rp-empty {
        margin-inline: 1rem;
    }
}

/* ── Empty state ── */

.rp-empty {
    margin: 0 1.25rem 0.5rem;
    padding: 1.125rem 1rem;
    border-radius: var(--rp-row-radius);
    background: var(--rp-fill);
    border: 0.5px solid var(--rp-separator);
    font-size: 0.875rem;
    line-height: 1.55;
    color: var(--rp-label);
}

.rp-empty p {
    margin: 0;
}

/* ── FAQ ── */

.rp-faq {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.rp-faq__item {
    padding: 0.875rem 0;
    border-bottom: 0.5px solid var(--rp-separator);
}

.rp-faq__item:first-child {
    padding-top: 0;
}

.rp-faq__item:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.rp-faq__item h3 {
    margin: 0 0 0.375rem;
    font-size: 0.9375rem;
    font-weight: 650;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.rp-faq__item p {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.58;
    letter-spacing: -0.01em;
    color: var(--rp-label);
}

/* ── Related routes ── */

.rp-related {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rp-related__link {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem;
    padding: 0.5rem 0.875rem;
    border-radius: 980px;
    background: var(--rp-surface);
    border: 0.5px solid var(--rp-separator);
    color: var(--rp-text);
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    text-decoration: none;
    transition:
        border-color 0.2s ease,
        background-color 0.2s ease,
        color 0.2s ease;
}

.rp-related__link:hover {
    border-color: rgba(13, 174, 156, 0.3);
    background: var(--rp-accent-soft);
    color: var(--rp-accent);
}

.rp-related__link .rp-related-corridor {
    display: inline-flex;
    align-items: center;
    gap: 0.3125rem 0.5rem;
    flex-wrap: wrap;
}

.rp-page .rp-related-endpoint {
    display: inline-flex;
    align-items: center;
    gap: 0.4375rem;
    min-width: 0;
}

.rp-page .rp-related-endpoint__flag {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    line-height: 0;
}

.rp-page .rp-related-endpoint__flag .flag-icon {
    width: 0.9375rem;
    height: 0.66rem;
    border-radius: 1px;
    box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.08);
}

.rp-page .rp-related-endpoint__city {
    font: inherit;
    letter-spacing: inherit;
    line-height: inherit;
    color: inherit;
}

.rp-page .rp-related-corridor .ej-corridor__sep {
    flex-shrink: 0;
    padding: 0 0.0625rem;
    color: currentColor;
    font-size: inherit;
    font-weight: 400;
    line-height: 1;
    opacity: 0.65;
}

.rp-btn .rp-related-corridor,
.rp-btn .rp-related-endpoint {
    color: inherit;
}

.rp-btn--route-search {
    flex-direction: column;
    gap: 0;
    padding: 0.8125rem 1.125rem;
    min-height: 3.625rem;
}

.rp-btn__stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4375rem;
    min-width: 0;
    max-width: 100%;
}

.rp-btn__lead {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    white-space: nowrap;
}

.rp-btn__route {
    display: flex;
    justify-content: center;
    max-width: 100%;
}

.rp-btn-corridor {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.3125rem 0.5rem;
    max-width: 100%;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    line-height: 1.25;
    color: rgba(255, 255, 255, 0.94);
}

.rp-btn-endpoint {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    min-width: 0;
}

.rp-btn-endpoint__flag {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    line-height: 0;
}

.rp-btn-endpoint__flag .flag-icon {
    width: 1rem;
    height: 0.6875rem;
    border-radius: 1px;
    box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.14);
}

.rp-btn-endpoint__city {
    overflow-wrap: anywhere;
}

.rp-btn-corridor .ej-corridor__sep {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    margin: 0 0.125rem;
    padding: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1;
    opacity: 1;
    box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.22);
}

/* ── CTA ── */

.rp-cta {
    display: flex;
    justify-content: center;
    padding: 1rem 0.75rem 0.75rem;
}

.rp-btn,
.route-page a.rp-btn,
.route-page a.rp-btn:link,
.route-page a.rp-btn:visited,
.city-page a.rp-btn,
.city-page a.rp-btn:link,
.city-page a.rp-btn:visited {
    --rp-btn-top: #14c9b5;
    --rp-btn-mid: #0dae9c;
    --rp-btn-bottom: #0a8b7d;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 28rem;
    min-height: 3rem;
    padding: 0.875rem 1.75rem;
    border: none;
    border-radius: 980px;
    background: linear-gradient(
        180deg,
        var(--rp-btn-top) 0%,
        var(--rp-btn-mid) 46%,
        var(--rp-btn-bottom) 100%
    );
    color: #fff;
    font-family: var(--rp-font);
    font-size: 1.0625rem;
    font-weight: 650;
    letter-spacing: -0.022em;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    -webkit-font-smoothing: antialiased;
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.08),
        0 4px 14px rgba(13, 174, 156, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.24);
    transition:
        background 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.15s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.route-page a.rp-btn:hover,
.route-page a.rp-btn:focus-visible,
.city-page a.rp-btn:hover,
.city-page a.rp-btn:focus-visible {
    --rp-btn-top: #16d4bf;
    --rp-btn-mid: #0b9987;
    --rp-btn-bottom: #098f7f;

    background: linear-gradient(
        180deg,
        var(--rp-btn-top) 0%,
        var(--rp-btn-mid) 46%,
        var(--rp-btn-bottom) 100%
    );
    color: #fff;
    text-decoration: none;
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.1),
        0 6px 18px rgba(13, 174, 156, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.route-page a.rp-btn:active,
.city-page a.rp-btn:active {
    --rp-btn-top: #0dae9c;
    --rp-btn-mid: #0a8777;
    --rp-btn-bottom: #087a6c;

    color: #fff;
    transform: scale(0.98);
    box-shadow:
        inset 0 1px 2px rgba(0, 0, 0, 0.14),
        0 1px 2px rgba(13, 174, 156, 0.2);
}

@media (min-width: 640px) {
    .rp-btn,
    .route-page a.rp-btn,
    .city-page a.rp-btn {
        width: auto;
        min-width: 18rem;
        padding: 0.875rem 2rem;
    }

    .rp-btn--route-search {
        min-width: 20rem;
        padding: 0.9375rem 2rem;
    }

    .rp-btn__lead {
        font-size: 1.0625rem;
    }

    .rp-btn-corridor {
        font-size: 0.875rem;
    }
}
