/* =========================================================
   AI Automation Toolbox V3
   RESPONSIVE / MOBILE
   ========================================================= */

@media (max-width: 1100px) {
    .feature-grid,
    .audience-grid,
    .depth-grid,
    .card-grid,
    .grid-3,
    .grid-4,
    .aat-grid-3,
    .aat-grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero-grid,
    .aat-hero-grid,
    .overview,
    .real-product,
    .operations-band,
    .split-layout,
    .two-column {
        grid-template-columns: 1fr;
        gap: 38px;
    }

    .steps,
    .aat-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .step:nth-child(2),
    .aat-step:nth-child(2) {
        border-right: 0;
    }

    .step:nth-child(-n + 2),
    .aat-step:nth-child(-n + 2) {
        border-bottom: 1px solid var(--aat-border);
    }
}

@media (max-width: 760px) {
    .shell,
    .container,
    .aat-page {
        width: calc(100% - 28px);
    }

    .section,
    .aat-section {
        padding: 58px 0;
    }

    .nav,
    .aat-nav {
        min-height: 64px;
        grid-template-columns: 1fr auto;
        gap: 10px;
    }

    .ui-site-name,
    .aat-site-name {
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: .88rem;
    }

    .menu-toggle,
    .aat-menu-toggle {
        width: 42px;
        height: 42px;
        display: grid;
        place-items: center;
        justify-self: end;
        padding: 0;
        border: 1px solid var(--aat-border-strong);
        border-radius: 9px;
        background: var(--aat-bg-panel);
        color: var(--aat-orange);
        font-size: 1.2rem;
    }

    .nav-login {
        display: none;
    }

    .nav-links {
        grid-column: 1 / -1;
        display: none;
        width: 100%;
        padding: 8px 0 4px;
        border-top: 1px solid var(--aat-border);
    }

    .nav-links.is-open {
        display: grid;
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .nav-links a {
        width: 100%;
        justify-content: flex-start;
        padding: 11px 12px;
        border: 1px solid var(--aat-border);
        background: var(--aat-bg-panel);
    }

    .provider-menu,
    .aat-provider-menu {
        flex-direction: column;
        align-items: stretch;
    }

    .provider-menu a,
    .aat-provider-menu a,
    .tab,
    .aat-tab {
        width: 100%;
    }

    .hero,
    .aat-hero {
        padding: 66px 0 58px;
    }

    .hero h1,
    .aat-hero h1 {
        font-size: clamp(2.5rem, 13vw, 4.2rem);
    }

    .hero-product-grid,
    .panel-grid,
    .aat-panel-grid,
    .grid-2,
    .grid-3,
    .grid-4,
    .aat-grid-2,
    .aat-grid-3,
    .aat-grid-4,
    .feature-grid,
    .audience-grid,
    .depth-grid,
    .card-grid,
    .form-row,
    .aat-form-row,
    .operations-list,
    .aat-operations-list,
    .why-list,
    .aat-why-list,
    .steps,
    .aat-steps {
        grid-template-columns: 1fr;
    }

    .step,
    .aat-step {
        min-height: 0;
        border-right: 0;
        border-bottom: 1px solid var(--aat-border);
    }

    .comparison,
    .aat-comparison {
        grid-template-columns: 1fr;
    }

    .comparison-arrow,
    .aat-comparison-arrow {
        min-height: 28px;
        transform: rotate(90deg);
    }

    .pricing-callout,
    .callout,
    .aat-callout {
        flex-direction: column;
        align-items: flex-start;
        padding: 24px;
    }

    .pricing-callout .button,
    .callout .button,
    .aat-callout .aat-btn {
        width: 100%;
    }

    .footer-row,
    .aat-footer-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .footer-links,
    .aat-footer-links {
        justify-content: flex-start;
    }

    .page-header-row,
    .aat-page-header-row {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .shell,
    .container,
    .aat-page {
        width: calc(100% - 22px);
    }

    .brand-mark,
    .aat-brand-mark {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
    }

    .hero-actions,
    .aat-hero-actions,
    .form-actions,
    .aat-form-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .hero-actions .button,
    .hero-actions .btn,
    .hero-actions .aat-btn,
    .aat-hero-actions .button,
    .aat-hero-actions .btn,
    .aat-hero-actions .aat-btn,
    .form-actions .button,
    .form-actions .btn,
    .form-actions .aat-btn {
        width: 100%;
    }

    .card,
    .panel,
    .aat-card,
    .aat-panel {
        padding: 18px;
    }
}


@media (max-width: 760px) {
    .pricing-callout,
    .callout,
    .aat-callout {
        width: 100%;
        max-width: none;
        padding: 20px;
        gap: 16px;
    }
}


@media (max-width: 760px) {
    .pricing-callout,
    .callout,
    .aat-callout {
        width: min(92%, 560px);
        grid-template-columns: 1fr;
        padding: 18px;
        text-align: left;
    }

    .pricing-callout .button,
    .pricing-callout .btn,
    .pricing-callout .aat-btn,
    .callout .button,
    .callout .btn,
    .callout .aat-btn,
    .aat-callout .button,
    .aat-callout .btn,
    .aat-callout .aat-btn {
        width: auto;
        justify-self: start;
    }
}


@media (max-width: 1100px) {
    .pricing-cards {
        width: min(760px, 100%);
        grid-template-columns: repeat(2, minmax(0,1fr));
    }

    .pricing-plan-card.is-popular {
        transform: none;
    }
}

@media (max-width: 760px) {
    .pricing-page-hero {
        padding: 54px 0 26px;
    }

    .pricing-page-hero h1 {
        font-size: clamp(2.2rem, 11vw, 3.6rem);
    }

    .pricing-highlight-row {
        gap: 7px 16px;
    }

    .pricing-term-switch {
        width: min(100%, 520px);
    }

    .pricing-term-btn {
        min-height: 48px;
        padding: 7px 6px;
    }

    .pricing-term-btn span {
        font-size: .82rem;
    }

    .pricing-term-btn small {
        font-size: .58rem;
    }

    .pricing-cards {
        width: min(520px, 100%);
        grid-template-columns: 1fr;
    }

    .pricing-plan-card {
        padding: 20px;
    }

    .pricing-plan-head {
        min-height: 0;
    }

    .pricing-plan-price {
        min-height: 0;
        margin-top: 16px;
    }

    .pricing-included-grid {
        width: min(520px, 100%);
        grid-template-columns: 1fr;
    }

    .pricing-bottom-cta-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 430px) {
    .pricing-term-switch {
        gap: 3px;
        padding: 4px;
    }

    .pricing-term-btn {
        min-height: 44px;
        padding: 6px 4px;
    }

    .pricing-term-btn small {
        display: none;
    }
}


@media (max-width: 760px) {
    .pricing-brand-bar {
        min-height: 64px;
    }

    .pricing-brand-badge {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
    }

    .pricing-brand-name {
        font-size: 1rem;
        font-weight: 950;
    }
}


@media (max-width: 700px) {
    .pricing-footer-row {
        min-height: 104px;
        gap: 18px;
    }

    .pricing-footer-links {
        gap: 14px;
    }

    .pricing-footer-links a {
        font-size: .8rem;
    }
}

@media (max-width: 520px) {
    .pricing-footer-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .pricing-footer-links {
        width: 100%;
        justify-content: flex-end;
    }
}


/* Homepage top-spacing cleanup */
@media (max-width: 760px) {
    .hero,
    .aat-hero {
        padding-top: 28px;
        padding-bottom: 44px;
    }

    .hero-grid,
    .aat-hero-grid {
        gap: 28px;
    }

    .hero h1,
    .aat-hero h1 {
        margin-top: 4px;
    }

    .hero-copy,
    .aat-hero-copy {
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .hero,
    .aat-hero {
        padding-top: 22px;
        padding-bottom: 38px;
    }
}


@media (max-width: 900px) {
    .ai-choice-grid {
        width: min(720px, 100%);
        grid-template-columns: 1fr;
    }

    .ai-choice-card {
        width: min(520px, 100%);
        margin-inline: auto;
    }

    .ai-choice-card.is-featured {
        transform: none;
    }
}

@media (max-width: 760px) {
    .ai-choice-hero {
        padding: 30px 0 20px;
    }

    .ai-choice-section {
        padding-top: 42px;
    }

    .ai-selected-plan {
        padding: 12px 14px;
    }

    .ai-choice-card {
        padding: 20px;
    }
}


@media (max-width: 900px) {
    .signup-layout {
        width: min(680px, calc(100% - 28px));
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .signup-hero {
        padding: 28px 0 18px;
    }

    .signup-section {
        padding-top: 30px;
    }

    .signup-card {
        padding: 20px;
    }

    .signup-submit {
        width: auto;
    }
}

@media (max-width: 520px) {
    .signup-layout {
        width: calc(100% - 22px);
    }

    .signup-card {
        padding: 18px;
    }

    .signup-submit {
        width: 100%;
    }
}

@media (max-width: 900px) {
    .purchase-layout {
        width: min(680px, calc(100% - 28px));
        grid-template-columns: 1fr;
    }
}
@media (max-width: 760px) {
    .purchase-hero { padding: 28px 0 18px; }
    .purchase-section { padding-top: 30px; }
    .purchase-card { padding: 20px; }
}
@media (max-width: 520px) {
    .purchase-layout { width: calc(100% - 22px); }
    .purchase-card { padding: 18px; }
    .purchase-detail-row,
    .purchase-summary-line,
    .purchase-choice-top { align-items: flex-start; }
    .purchase-checkout-btn { width: 100%; min-width: 0; }
}

@media(max-width:900px){.checkout-layout{width:min(680px,calc(100% - 28px));grid-template-columns:1fr}}
@media(max-width:760px){.checkout-hero{padding:28px 0 18px}.checkout-section{padding-top:30px}.checkout-card,.checkout-summary{padding:20px}.checkout-methods{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){.checkout-layout{width:calc(100% - 22px)}.checkout-card,.checkout-summary{padding:18px}.checkout-card-head{flex-direction:column}.checkout-button{width:100%;min-width:0}.checkout-methods{grid-template-columns:1fr 1fr}}


/* Pricing cards: compact centered cards on tablets/phones. */
@media (max-width: 760px) {
    .pricing-cards {
        width: 100%;
        gap: 14px;
    }

    .pricing-plan-card {
        width: fit-content;
        min-width: 0;
        max-width: calc(100vw - 44px);
        margin-left: auto;
        margin-right: auto;
        padding-left: 20px;
        padding-right: 20px;
    }

    .pricing-plan-head p,
    .pricing-feature-list {
        max-width: 290px;
    }
}

@media (max-width: 420px) {
    .pricing-plan-card {
        max-width: calc(100vw - 36px);
    }
}
