.plans-page {
    max-width: 1240px;
    margin: 0 auto;
    padding: 22px 22px 78px;
    color: #f8fafc;
}

.plans-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
    gap: 24px;
    align-items: stretch;
    margin-bottom: 24px;
}

.plans-hero-copy,
.plans-signal-panel,
.plan-card,
.plans-services,
.payment-return-card,
.checkout-dialog {
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(15,23,42,.78);
    box-shadow: 0 24px 80px rgba(0,0,0,.28);
    backdrop-filter: blur(18px);
}

.plans-hero-copy {
    min-height: 460px;
    padding: clamp(28px, 5vw, 58px);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background:
        linear-gradient(125deg, rgba(8,47,73,.92), rgba(15,23,42,.86)),
        url("/img/products/ai-start.png") right 30px bottom 24px / min(360px, 48%) auto no-repeat;
}

.plans-kicker {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(34,211,238,.28);
    background: rgba(8,145,178,.16);
    color: #a5f3fc;
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.plans-hero h1 {
    margin: 18px 0 16px;
    font-size: clamp(2.15rem, 4.8vw, 4.7rem);
    line-height: .98;
    font-weight: 950;
    letter-spacing: 0;
    max-width: 850px;
}

.plans-hero p,
.plans-services p,
.payment-return-card p,
.checkout-dialog p {
    color: rgba(226,232,240,.78);
    font-size: 1.04rem;
    max-width: 720px;
}

.plans-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

.plans-primary-link,
.plans-secondary-link,
.plan-cta,
.checkout-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 48px;
    border-radius: 8px;
    padding: 12px 16px;
    font-weight: 900;
    text-decoration: none;
    border: 1px solid transparent;
}

.plans-primary-link,
.plan-cta,
.checkout-submit {
    color: white;
    background: linear-gradient(135deg, #0891b2, #2563eb);
    box-shadow: 0 16px 38px rgba(37,99,235,.28);
}

.plans-primary-link:hover,
.plan-cta:hover,
.checkout-submit:hover {
    color: white;
    filter: brightness(1.06);
}

.plans-secondary-link {
    color: #e2e8f0;
    border-color: rgba(255,255,255,.14);
    background: rgba(255,255,255,.07);
}

.plans-secondary-link:hover {
    color: white;
    border-color: rgba(34,211,238,.38);
}

.plans-signal-panel {
    border-radius: 8px;
    padding: 22px;
    display: grid;
    gap: 14px;
    align-content: center;
}

.signal-row {
    display: grid;
    grid-template-columns: 46px 1fr;
    gap: 4px 12px;
    padding: 16px;
    border-radius: 8px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.10);
}

.signal-row .material-symbols-outlined {
    grid-row: span 2;
    width: 46px;
    height: 46px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: rgba(34,211,238,.13);
    color: #67e8f9;
}

.signal-row strong {
    font-size: 1rem;
}

.signal-row small {
    color: rgba(226,232,240,.66);
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.plan-card {
    position: relative;
    border-radius: 8px;
    padding: 22px;
    min-height: 610px;
    display: flex;
    flex-direction: column;
}

.plan-card.featured {
    border-color: rgba(34,211,238,.46);
    box-shadow: 0 26px 90px rgba(8,145,178,.20);
}

.plan-card:has(.plan-cta.free) {
    border-color: rgba(34,197,94,.38);
}

.plan-card-top {
    display: flex;
    align-items: center;
    gap: 14px;
}

.plan-icon {
    width: 54px;
    height: 54px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    color: #cffafe;
    background: linear-gradient(135deg, rgba(8,145,178,.38), rgba(37,99,235,.24));
}

.plan-highlight {
    color: #67e8f9;
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.plan-card h2 {
    margin: 2px 0 0;
    font-weight: 950;
    font-size: 1.45rem;
}

.plan-audience {
    color: rgba(226,232,240,.72);
    min-height: 72px;
    margin: 18px 0;
}

.plan-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 18px 0;
    border-top: 1px solid rgba(255,255,255,.10);
    border-bottom: 1px solid rgba(255,255,255,.10);
}

.plan-price strong {
    font-size: clamp(2rem, 4vw, 2.7rem);
    line-height: 1;
    font-weight: 950;
}

.plan-price span {
    color: rgba(226,232,240,.62);
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 18px 0;
    display: grid;
    gap: 10px;
}

.plan-features li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: rgba(248,250,252,.9);
}

.plan-features .material-symbols-outlined {
    color: #22c55e;
    font-size: 20px;
    margin-top: 1px;
}

.plan-best-for {
    margin-top: auto;
    padding-top: 8px;
}

.plan-best-for > span {
    color: rgba(226,232,240,.56);
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.plan-best-for div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.plan-best-for small {
    padding: 7px 9px;
    border-radius: 999px;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.10);
    color: rgba(226,232,240,.84);
}

.plan-cta {
    width: 100%;
    border: 0;
    margin-top: 18px;
}

.plan-cta.enterprise {
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.14);
    box-shadow: none;
}

.plan-cta.free {
    background: linear-gradient(135deg, #16a34a, #0891b2);
    box-shadow: 0 16px 38px rgba(22,163,74,.24);
}

.plans-services {
    margin-top: 24px;
    border-radius: 8px;
    padding: 28px;
    display: grid;
    grid-template-columns: .85fr 1.15fr;
    gap: 26px;
}

.plans-services h2,
.payment-return-card h1,
.checkout-dialog h2 {
    margin: 14px 0 10px;
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 950;
    line-height: 1;
}

.services-table {
    display: grid;
    gap: 10px;
}

.services-table div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 8px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.10);
}

.services-table span {
    color: #a5f3fc;
    font-weight: 900;
    text-align: right;
}

.checkout-modal {
    position: fixed;
    inset: 0;
    z-index: 7000;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(2,6,23,.74);
    backdrop-filter: blur(10px);
}

.checkout-modal[hidden] {
    display: none;
}

.plans-modal-open {
    overflow: hidden;
}

.checkout-dialog {
    position: relative;
    width: min(560px, 100%);
    border-radius: 8px;
    padding: 26px;
}

.checkout-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 8px;
    color: white;
    background: rgba(255,255,255,.08);
}

.checkout-form {
    display: grid;
    gap: 13px;
    margin-top: 18px;
}

.checkout-form label {
    display: grid;
    gap: 7px;
    color: rgba(226,232,240,.82);
    font-weight: 800;
}

.checkout-form input {
    height: 48px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(2,6,23,.72);
    color: white;
    padding: 0 13px;
    outline: none;
}

.checkout-form input:focus {
    border-color: rgba(34,211,238,.58);
    box-shadow: 0 0 0 3px rgba(34,211,238,.12);
}

.checkout-submit {
    border: 0;
    margin-top: 4px;
}

.checkout-submit:disabled {
    opacity: .72;
    cursor: wait;
}

.checkout-status {
    min-height: 22px;
    color: #a5f3fc;
    font-weight: 800;
}

.payment-return-card {
    max-width: 760px;
    margin: 30px auto 0;
    border-radius: 8px;
    padding: clamp(28px, 5vw, 56px);
    text-align: center;
}

.payment-return-card .plans-hero-actions {
    justify-content: center;
}

.payment-return-icon {
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
    margin: 0 auto 18px;
    border-radius: 999px;
    background: rgba(255,255,255,.08);
    font-size: 42px;
}

.payment-return-icon.success {
    color: #22c55e;
}

.payment-return-icon.pending {
    color: #facc15;
}

.payment-return-icon.neutral {
    color: #67e8f9;
}

body.front-theme-light .plans-page {
    color: #0f172a;
}

body.front-theme-light .plans-hero-copy,
body.front-theme-light .plans-signal-panel,
body.front-theme-light .plan-card,
body.front-theme-light .plans-services,
body.front-theme-light .payment-return-card,
body.front-theme-light .checkout-dialog {
    background: #ffffff !important;
    color: #0f172a;
    border-color: rgba(15,23,42,.12);
    box-shadow: 0 18px 55px rgba(15,23,42,.10);
}

body.front-theme-light .plans-hero p,
body.front-theme-light .plans-services p,
body.front-theme-light .payment-return-card p,
body.front-theme-light .checkout-dialog p,
body.front-theme-light .plan-audience,
body.front-theme-light .signal-row small {
    color: #475569;
}

body.front-theme-light .plans-hero-copy {
    background:
        linear-gradient(125deg, rgba(240,249,255,.95), rgba(255,255,255,.90)),
        url("/img/products/ai-start.png") right 30px bottom 24px / min(360px, 48%) auto no-repeat !important;
}

body.front-theme-light .signal-row,
body.front-theme-light .services-table div,
body.front-theme-light .plan-best-for small {
    background: #f8fafc;
    border-color: rgba(15,23,42,.10);
    color: #0f172a;
}

body.front-theme-light .checkout-form input {
    background: #f8fafc;
    color: #0f172a;
    border-color: rgba(15,23,42,.14);
}

@media (max-width: 1050px) {
    .plans-hero,
    .plans-services {
        grid-template-columns: 1fr;
    }

    .plans-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .plan-card {
        min-height: 0;
    }
}

@media (max-width: 820px) {
    .plans-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .plans-page {
        padding: 14px 12px 58px;
    }

    .plans-hero-copy,
    .plans-signal-panel,
    .plan-card,
    .plans-services,
    .checkout-dialog {
        padding: 18px;
    }

    .plans-hero-copy {
        min-height: 0;
        background:
            linear-gradient(125deg, rgba(8,47,73,.92), rgba(15,23,42,.86)) !important;
    }

    .services-table div {
        flex-direction: column;
    }

    .services-table span {
        text-align: left;
    }
}
