.pricing-head {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: calc(76px + 64px) var(--gutter) 64px;
    text-align: center;
}

.pricing-head__inner {
    max-width: 760px;
    margin: 0 auto;
}

.pricing-head__eyebrow {
    display: inline-block;
    margin-bottom: 16px;
    padding: 5px 16px;
    border-radius: 999px;
    background: var(--accent);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.pricing-head__title {
    font-size: 40px;
    margin-bottom: 14px;
}

.pricing-head__lead {
    font-size: 17px;
    line-height: 1.7;
    color: var(--ink-soft);
}

.pricing-plans {
    padding: 72px var(--gutter) 40px;
}

.pricing-plans__inner {
    max-width: var(--wrap);
    margin: 0 auto;
}

/*
| Flex rather than grid, and capped rather than stretched.
|
| auto-fit gave every card an equal share of the row, which is right for four
| and wrong for two: with the lifetime tiers switched off, two cards each took
| half the page and read as a layout with something missing. Flex lets them
| take what they need up to 340px and centres what is left over, so two, three
| or five plans all look deliberate.
*/
.pricing-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
    align-items: stretch;
}

.pricing-card {
    flex: 1 1 255px;
    max-width: 340px;
}

.pricing-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 30px 26px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--page);
    box-shadow: 0 2px 14px rgba(23, 32, 58, 0.05);
}

.pricing-card--featured {
    border-color: var(--accent);
    box-shadow: 0 14px 36px rgba(47, 107, 255, 0.16);
}

.pricing-card__flag {
    position: absolute;
    top: -12px;
    left: 26px;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--accent);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.pricing-card__name {
    display: block;
    margin-bottom: 10px;
    color: var(--ink);
    font-size: 19px;
    font-weight: 700;
}

.pricing-card__price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
}

.pricing-card__amount {
    color: var(--ink);
    font-size: 34px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.pricing-card__interval {
    color: var(--muted);
    font-size: 14px;
}

/* Its own line under the price: the flex row wraps, and 100% width is what
   makes it wrap rather than sit in the gap after "per month". */
.pricing-card__tax {
    width: 100%;
    margin-top: -6px;
    color: var(--muted);
    font-size: 13px;
}

.pricing-features {
    margin: 0 0 26px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
}

.pricing-features__row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 15px;
    line-height: 1.45;
}

.pricing-features__row--on {
    color: var(--ink);
}

.pricing-features__row--off {
    color: var(--muted);
}

.pricing-features__icon {
    flex: none;
    margin-top: 2px;
}

.pricing-features__icon svg {
    width: 17px;
    height: 17px;
}

.pricing-features__icon--yes {
    color: var(--success);
}

.pricing-features__icon--no {
    color: var(--danger);
    opacity: 0.7;
}

.pricing-cta {
    margin-top: auto;
    display: block;
    padding: 12px 18px;
    border-radius: 999px;
    border: 1px solid transparent;
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.pricing-cta--solid {
    background: var(--accent);
    border-color: var(--accent);
    color: #ffffff;
}

.pricing-cta--solid:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
}

.pricing-cta--ghost {
    background: transparent;
    border-color: var(--ink);
    color: var(--ink);
}

.pricing-cta--ghost:hover {
    background: var(--ink);
    color: #ffffff;
}

.pricing-empty {
    max-width: 640px;
    margin: 0 auto;
    padding: 44px 32px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--page);
    box-shadow: 0 2px 14px rgba(23, 32, 58, 0.05);
    text-align: center;
}

.pricing-empty__title {
    font-size: 24px;
    margin-bottom: 10px;
}

.pricing-empty__text {
    color: var(--ink-soft);
}

.pricing-note {
    margin-top: 32px;
    text-align: center;
    font-size: 16px;
    color: var(--ink-soft);
}

.pricing-link {
    color: var(--ink);
    font-weight: 700;
    border-bottom: 1px solid var(--accent);
}

.pricing-link:hover {
    color: var(--accent);
}

.pricing-includes {
    padding: 0 var(--gutter) 80px;
}

.pricing-includes__panel {
    max-width: 900px;
    margin: 0 auto;
    padding: 34px 36px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
}

.pricing-includes__title {
    font-size: 24px;
    margin-bottom: 10px;
}

.pricing-includes__text {
    color: var(--ink-soft);
    line-height: 1.7;
}

@media (max-width: 960px) {
    .pricing-head {
        padding: calc(64px + 48px) var(--gutter) 48px;
    }

    .pricing-head__title {
        font-size: 32px;
    }

    .pricing-plans {
        padding: 56px var(--gutter) 32px;
    }

    .pricing-includes {
        padding: 0 var(--gutter) 64px;
    }

    .pricing-includes__panel {
        padding: 28px 24px;
    }
}

@media (max-width: 640px) {
    .pricing-head__title {
        font-size: 28px;
    }

    .pricing-head__lead {
        font-size: 16px;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

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

    .pricing-empty {
        padding: 32px 22px;
    }
}

/*
| The feature list, folded.
|
| Thirty-three rows on every card is a wall, and it pushed the button that
| matters below the fold. The whole list stays in the page — this is a height,
| not a different set of facts, so a screen reader and a browser with no
| JavaScript still get all of it.
*/
.pricing-features__wrap {
    position: relative;
    max-height: 332px;
    overflow: hidden;
    transition: max-height 0.28s ease;
}

.pricing-features__wrap::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 64px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--page));
    pointer-events: none;
}

/* Open: no cap, no fade. The max-height is a large number rather than none,
   because auto cannot be transitioned to. */
.pricing-card--open .pricing-features__wrap {
    max-height: 1600px;
}

.pricing-card--open .pricing-features__wrap::after {
    opacity: 0;
}

.pricing-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin: 0 0 22px;
    padding: 8px 0;
    border: 0;
    background: none;
    color: var(--accent);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.pricing-more:hover {
    text-decoration: underline;
}

.pricing-more__chevron {
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    transition: transform 0.2s ease;
}

.pricing-card--open .pricing-more__chevron {
    transform: translateY(1px) rotate(-135deg);
}
