/*
 * Aira Approved UI — final integration corrections.
 * Source of truth: UI System v4 + approved homepage/header artifacts.
 * Loaded after the normal theme cascade so legacy CSS cannot override these
 * narrow integration fixes while older pages remain on app.css.
 */

/* Header and Footer use the same canonical content rail as the rest of the site. */
.aira-approved-header__shell,
.aira-approved-footer__inner {
    width: min(calc(100% - (var(--aira-ui-gutter-desktop) * 2)), var(--aira-ui-container)) !important;
}

/* Stage 04: compact beta status sits below the Site Identity logo without
 * changing the approved Header composition or introducing another brand asset. */
.aira-approved-header__brand {
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 2px;
}

.aira-approved-header__beta {
    display: block;
    width: 100%;
    min-height: 10px;
    color: #6b7f94;
    font-family: var(--aira-ui-font);
    font-size: 9px;
    font-weight: 650;
    line-height: 10px;
    letter-spacing: .11em;
    text-align: center;
    text-transform: none;
    white-space: nowrap;
}

/* Footer external-link icon mirrors the approved footer SVG exactly. */
.aira-approved-footer__external > span {
    transform: none !important;
    transition: none !important;
}

.aira-approved-footer__external svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform var(--aira-ui-motion-standard) var(--aira-ui-ease);
}

.aira-approved-footer__external:hover svg,
.aira-approved-footer__external:focus-visible svg {
    transform: translate(2px, -2px);
}

/* Homepage Hero uses the same canonical desktop rail, but keeps a restrained
 * inner inset so copy never sits directly on the rail edge. Mobile keeps the
 * exact frozen Hero v5 layout. */
@media (min-width: 1261px) {
    .aira-homepage-v15 .aira-home-hero__inner {
        width: min(calc(100% - (var(--aira-ui-gutter-desktop) * 2)), var(--aira-ui-container)) !important;
        padding-left: 18px !important;
        padding-right: 18px !important;
    }
}

@media (min-width: 768px) and (max-width: 1260px) {
    .aira-homepage-v15 .aira-home-hero__inner {
        width: min(calc(100% - (var(--aira-ui-gutter-tablet) * 2)), var(--aira-ui-container)) !important;
        padding-left: 18px !important;
        padding-right: 18px !important;
    }
}

/* Homepage Hero: preserve the approved spacing below CTA controls. */
.aira-homepage-v15 .aira-home-hero .hero-note {
    display: block !important;
    margin: 18px 0 0 !important;
    padding: 0 !important;
    line-height: 1.45 !important;
}

/* Journey labels are one shared typographic component across Homepage sections. */
.aira-homepage-v15 .section-journey-line,
.aira-homepage-v15 .market-answer-v2 .section-journey {
    font-family: Inter, "Segoe UI", Arial, sans-serif !important;
    font-size: 10.5px !important;
    font-weight: 720 !important;
    line-height: 1 !important;
}

/* --------------------------------------------------------------------------
   Homepage background fidelity
   --------------------------------------------------------------------------
   Dark sections stay clean. Light sections use their approved local route
   treatment; there is no page-wide texture crossing section boundaries. */

/* Disable the old page-wide v14/v15 route texture. */
.aira-homepage-v15::before {
    content: none !important;
    display: none !important;
    background: none !important;
}

/* Hero owns its original route SVG. */
.aira-homepage-v15 > .aira-home-hero > .aira-home-hero__routes {
    display: block !important;
    visibility: visible !important;
}

/* How Aira Helps uses the same light paper + route texture treatment as
 * Action Plan. The old standalone curved line artwork must never be visible
 * in the integrated Homepage. */
.aira-homepage-v15 .aira-how {
    isolation: isolate !important;
    background: #fafdff !important;
}

.aira-homepage-v15 .aira-how::before,
.aira-homepage-v15 .action-plan::before {
    content: "" !important;
    position: absolute !important;
    inset: 0 !important;
    z-index: 1 !important;
    display: block !important;
    pointer-events: none !important;
    user-select: none !important;
    background-image: url("../images/aira-homepage-route-texture-v15.svg") !important;
    background-repeat: repeat !important;
    background-position: 50% 24px !important;
    background-size: 920px auto !important;
    opacity: .574 !important;
}

.aira-homepage-v15 .aira-how__bg-lines,
.aira-homepage-v15 .aira-how__mobile-top-decor,
.aira-homepage-v15 .aira-how__mobile-mid-decor,
.aira-homepage-v15 .aira-how__mobile-bottom-decor {
    display: none !important;
}

.aira-homepage-v15 .aira-how__container,
.aira-homepage-v15 .action-plan > .section-inner {
    position: relative !important;
    z-index: 2 !important;
}

/* Legacy/Tailwind list resets remove the visible numbering from the approved
 * AI answer. Restore the native ordered-list semantics explicitly. */
.aira-homepage-v15 .market-answer-v2 .ai-demo__mentions {
    list-style: decimal outside !important;
    padding-left: 23px !important;
}

.aira-homepage-v15 .market-answer-v2 .ai-demo__mentions > li {
    display: list-item !important;
    list-style-position: outside !important;
}

.aira-homepage-v15 .market-answer-v2 .ai-demo__mentions > li::marker {
    color: #61788a;
    font-size: .86em;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* Desktop/tablet Action Plan: the rail runs only between endpoint marker
 * centers. The marker fill masks the line inside each circle, so no tail can
 * protrude above 01 or below 03. */
@media (min-width: 768px) {
    .aira-homepage-v15 .action-plan .outcome-path__line {
        top: 38px !important;
        bottom: 38px !important;
    }
}

/* Mobile Action Plan: the rail spans the open semantic content. */
@media (max-width: 767px) {
    .aira-homepage-v15 .aira-how::before,
    .aira-homepage-v15 .action-plan::before {
        background-position: 50% 16px !important;
        background-size: 680px auto !important;
        opacity: .532 !important;
    }

    .aira-homepage-v15 .action-plan .mobile-progress__line {
        top: var(--rail-top, 0px) !important;
        height: calc(var(--rail-bottom, 370px) - var(--rail-top, 0px)) !important;
    }

    .aira-homepage-v15 .aira-home-hero .hero-note {
        margin-top: 16px !important;
    }
}

@media (max-width: 1260px) {
    .aira-approved-header__shell,
    .aira-approved-footer__inner {
        width: min(calc(100% - (var(--aira-ui-gutter-tablet) * 2)), var(--aira-ui-container)) !important;
    }
}

@media (max-width: 760px) {
    .aira-approved-header__shell,
    .aira-approved-footer__inner {
        width: calc(100% - (var(--aira-ui-gutter-mobile) * 2)) !important;
    }
}

/* Approved mobile type and spacing in the integrated Homepage. */
@media (max-width: 767px) {
    .aira-homepage-v15 .section-journey-line,
    .aira-homepage-v15 .market-answer-v2 .section-journey {
        font-size: 9px !important;
        font-weight: 720 !important;
        line-height: 1 !important;
    }

    .aira-homepage-v15 .search-changed .section-journey-line {
        letter-spacing: .09em !important;
    }

    .aira-homepage-v15 .aira-how {
        padding-bottom: 58px !important;
    }

    .aira-homepage-v15 .aira-how__header {
        margin-bottom: 34px !important;
    }

    .aira-homepage-v15 .aira-how__title {
        margin-bottom: 12px !important;
    }

    .aira-homepage-v15 .aira-how__grid {
        row-gap: 40px !important;
    }

    .aira-homepage-v15 .aira-step__num {
        font-size: 42px !important;
        font-weight: 800 !important;
        line-height: 1 !important;
    }

    .aira-homepage-v15 .aira-step__heading {
        font-size: 20.5px !important;
        font-weight: 700 !important;
    }

    .aira-homepage-v15 .aira-step__text {
        font-size: 14.5px !important;
        line-height: 1.56 !important;
    }

    .aira-homepage-v15 .market-answer-v2 .section-journey {
        gap: 9px !important;
        letter-spacing: .07em !important;
    }

    .aira-approved-header__beta {
        min-height: 9px;
        font-size: 8px;
        line-height: 9px;
        letter-spacing: .1em;
    }
}

@media (max-width: 390px) {
    .aira-homepage-v15 .aira-step__heading { font-size: 19.5px !important; }
    .aira-homepage-v15 .aira-step__text { font-size: 14px !important; }
}