/* File Convert — /pricing.

   Layered over stylesheets/theme.css, which is the shared visual vocabulary:
   .vhero for the dark head, .band / .band__grid / .banlist / .minilabel for the
   sections below it, .extchip for the numbers list. Nothing here redefines a
   theme token — every colour resolves through --t-*, --primary-*, --n-* or the
   --hero-* set, so light and dark both come out right.

   theme.css loads after this file, so anywhere a theme class is adjusted the
   selector is doubled (e.g. .pricing-hero.vhero) to win on specificity rather
   than on order.

   Selectors stay namespaced (pricing-, plan-, cmp-, addon-, meter-, trust-,
   worked-, pband) so they cannot collide with any other page's stylesheet. */

/* ------------------------------------------------------------------ Hero */

/* Slightly deeper than the stock .vhero: the plan row is lifted into the
   bottom of it and needs the room. */
.pricing-hero.vhero {
    padding: 72px 0 200px;
}

/* Single centred column — the stock hero splits into two at 1024px. */
.pricing-hero__inner.vhero__inner {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 0;
}

.pricing-hero__copy.vhero__copy {
    max-width: 46rem;
    text-align: center;
}

.pricing-hero__kicker {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 18px;
    padding: 5px 13px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary-200);
    background: rgba(229, 50, 45, 0.16);
    border: 1px solid rgba(229, 50, 45, 0.34);
    border-radius: 999px;
}

.pricing-hero__meta.vhero__meta {
    justify-content: center;
    margin-top: 22px;
    gap: 8px 22px;
}

/* -------------------------------------------------- Monthly/yearly toggle */

/* The switch lives on the dark hero, so it reads against --hero-*, which is
   the same in both themes by design. */
.pricing-toggle {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    justify-content: center;
    margin-top: 32px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--hero-faint);
}

.pricing-toggle__side {
    display: inline-flex;
    gap: 9px;
    align-items: center;
    transition: color 0.15s ease;
}

/* The active side takes the hero ink. */
#pricing-bill-monthly {
    color: var(--hero-ink);
}

.pricing-top.is-yearly #pricing-bill-monthly {
    color: var(--hero-faint);
}

.pricing-top.is-yearly #pricing-bill-yearly {
    color: var(--hero-ink);
}

.pricing-switch {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

/* The real control stays in the accessibility tree; the track is decoration. */
.pricing-switch__input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.pricing-switch__track {
    position: relative;
    display: block;
    width: 50px;
    height: 28px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.pricing-switch__thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 22px;
    height: 22px;
    background: var(--hero-ink);
    border-radius: 50%;
    box-shadow: var(--shadow-lift);
    transition: transform 0.15s ease;
}

.pricing-switch__input:checked + .pricing-switch__track {
    background: var(--primary-500);
    border-color: var(--primary-400);
}

.pricing-switch__input:checked + .pricing-switch__track .pricing-switch__thumb {
    transform: translateX(22px);
}

.pricing-switch__input:focus-visible + .pricing-switch__track {
    outline: 2px solid var(--primary-300);
    outline-offset: 3px;
}

.pricing-badge {
    padding: 3px 9px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--primary-200);
    background: rgba(229, 50, 45, 0.18);
    border: 1px solid rgba(229, 50, 45, 0.38);
    border-radius: 999px;
}

/* ------------------------------------------------------------ Plan cards */

/* Same overlap trick as .liftcard on the home page, widened to carry the whole
   row. The top padding leaves room for the "Most popular" ribbon. */
.plan-lift {
    position: relative;
    z-index: 10;
    width: min(100% - 32px, 1240px);
    margin: -140px auto 0;
    padding-top: 14px;
}

@media (min-width: 700px) {
    .plan-lift {
        width: min(100% - 48px, 1240px);
    }
}

.plan-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    align-items: stretch;
}

.plan-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 28px 24px 26px;
    background: var(--t-surface);
    border: 1px solid var(--t-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.plan-card:hover {
    border-color: var(--t-border-strong);
    transform: translateY(-2px);
}

.plan-card--popular {
    border-color: var(--primary-500);
    box-shadow: var(--shadow-xl), 0 0 0 1px var(--primary-500);
}

.plan-card--popular:hover {
    border-color: var(--primary-500);
}

.plan-card__ribbon {
    position: absolute;
    top: -13px;
    left: 24px;
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--n-50);
    background: var(--primary-500);
    border-radius: 999px;
    box-shadow: var(--shadow-lift);
}

.plan-card__name {
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--t-highlighted);
}

.plan-card__positioning {
    min-height: 3em;
    margin-top: 6px;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--t-muted);
}

.plan-card__price {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    margin-top: 18px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--t-highlighted);
}

.plan-card__currency {
    margin-top: 6px;
    font-size: 1.25rem;
    color: var(--t-muted);
}

.plan-card__amount {
    font-size: 2.75rem;
    line-height: 1.05;
}

.plan-card__suffix {
    margin-top: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--t-default);
}

.plan-card__billed {
    margin-top: 4px;
    font-size: 0.75rem;
    color: var(--t-dimmed);
}

/* Without JS the monthly note is the one that shows; the shared script adds
   .is-yearly to [data-pricing] when the switch flips. */
.plan-card__billed--yearly {
    display: none;
}

.pricing-top.is-yearly .plan-card__billed--monthly {
    display: none;
}

.pricing-top.is-yearly .plan-card__billed--yearly {
    display: block;
}

.plan-card__features {
    display: grid;
    gap: 10px;
    margin-top: 22px;
    padding-top: 20px;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--t-default);
    border-top: 1px solid var(--t-border);
}

.plan-card__feature {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.plan-card__tick {
    flex: none;
    margin-top: 3px;
    font-size: 0.75rem;
    color: var(--primary-500);
}

/* Pins the CTA to the bottom so every card in the row ends level. */
.plan-card__action {
    margin-top: auto;
    padding-top: 24px;
}

.plan-card__cta {
    width: 100%;
}

.plan-lift__foot {
    margin-top: 26px;
    font-size: 0.8125rem;
    color: var(--t-muted);
    text-align: center;
}

.plan-lift__foot a {
    font-weight: 600;
    color: var(--t-highlighted);
    border-bottom: 1px solid var(--t-border-strong);
}

.plan-lift__foot a:hover {
    color: var(--primary-500);
    border-bottom-color: var(--primary-500);
}

/* ------------------------------------------------------- Section rhythm */

.pband {
    padding: 56px 0;
}

/* First band after the lifted plan row already has that row's margin above. */
.pricing-top + .pband {
    padding-top: 72px;
}

/* .band__rule carries 48px of its own margin, so bands either side sit tighter
   against it than they do against each other. */
.band__rule + .pband {
    padding-top: 24px;
}

.pband:has(+ .band__rule) {
    padding-bottom: 24px;
}

/* -------------------------------------------- Conversion minutes explainer */

.meter-list li {
    align-items: flex-start;
}

.meter-list__kicker {
    display: block;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary-500);
}

.meter-list strong {
    display: block;
    margin-top: 2px;
    font-size: 0.9375rem;
    font-weight: 600;
}

.meter-list__text {
    display: block;
    margin-top: 4px;
    color: var(--t-muted);
}

.worked {
    display: grid;
    gap: 16px;
    counter-reset: worked;
}

.worked__item {
    position: relative;
    padding: 18px 18px 18px 52px;
    background: var(--t-elevated);
    border: 1px solid var(--t-border);
    border-radius: var(--radius-xl);
    counter-increment: worked;
}

.worked__item::before {
    position: absolute;
    top: 18px;
    left: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary-500);
    background: var(--brand-tint);
    border-radius: 50%;
    content: counter(worked);
}

.worked__head {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--t-highlighted);
}

.worked__body {
    margin-top: 6px;
    font-size: 0.8125rem;
    line-height: 1.6;
    color: var(--t-muted);
}

.worked__body strong {
    font-weight: 600;
    color: var(--t-highlighted);
}

/* ------------------------------------------------------ Comparison table */

.cmp-code {
    padding: 1px 5px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.8125rem;
    color: var(--t-highlighted);
    background: var(--t-elevated);
    border: 1px solid var(--t-border);
    border-radius: var(--radius-sm);
}

.cmp-hint {
    margin-top: 28px;
}

.cmp-hint__swipe {
    display: none;
}

/* The table is the one thing wide enough to overflow; it scrolls inside this
   container so the page body never scrolls sideways. */
.cmp-scroll {
    overflow-x: auto;
    background: var(--t-surface);
    border: 1px solid var(--t-border);
    border-radius: var(--radius-xl);
    -webkit-overflow-scrolling: touch;
}

.cmp-scroll:focus-visible {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
}

.cmp-table {
    width: 100%;
    min-width: 760px;
    font-size: 0.875rem;
    border-collapse: collapse;
    background: transparent;
}

.cmp-table th,
.cmp-table td {
    padding: 14px 16px;
    text-align: center;
    vertical-align: middle;
    border-bottom: 1px solid var(--t-border);
}

.cmp-table thead th {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--t-highlighted);
    background: var(--t-elevated);
    white-space: nowrap;
}

/* Zebra striping through tokens, so it inverts with the theme. */
.cmp-table tbody tr:nth-child(even) th,
.cmp-table tbody tr:nth-child(even) td {
    background: var(--surface-tint);
}

.cmp-table tbody tr:last-child th,
.cmp-table tbody tr:last-child td {
    border-bottom: 0;
}

.cmp-table tbody tr:hover th,
.cmp-table tbody tr:hover td {
    background: var(--t-accented);
}

.cmp-table__rowhead {
    min-width: 190px;
    font-weight: 600;
    color: var(--t-highlighted);
    text-align: left;
}

.cmp-table__note {
    display: block;
    margin-top: 2px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.6875rem;
    font-weight: 400;
    color: var(--t-dimmed);
}

.cmp-table tbody td {
    color: var(--t-default);
}

/* The highlighted column has to beat the zebra rule, hence the extra class. */
.cmp-table tbody tr td.cmp-table__col--popular,
.cmp-table tbody tr:nth-child(even) td.cmp-table__col--popular,
.cmp-table thead th.cmp-table__col--popular {
    background: var(--brand-tint);
}

.cmp-table thead th.cmp-table__col--popular {
    color: var(--primary-600);
    box-shadow: inset 0 -2px 0 var(--primary-500);
}

:root[data-theme="dark"] .cmp-table thead th.cmp-table__col--popular {
    color: var(--primary-300);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .cmp-table thead th.cmp-table__col--popular {
        color: var(--primary-300);
    }
}

.cmp-yes {
    font-size: 0.9375rem;
    color: var(--primary-500);
}

.cmp-no {
    font-size: 0.9375rem;
    color: var(--t-dimmed);
}

/* ---------------------------------------------------------------- Add-ons */

.addon-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 28px;
}

.addon {
    padding: 22px;
    background: var(--t-surface);
    border: 1px solid var(--t-border);
    border-radius: var(--radius-xl);
    transition: border-color 0.15s ease;
}

.addon:hover {
    border-color: var(--t-border-strong);
}

.addon__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    font-size: 0.9375rem;
    color: var(--primary-500);
    background: var(--brand-tint);
    border-radius: var(--radius);
}

.addon__title {
    margin-top: 14px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--t-highlighted);
}

.addon__text {
    margin-top: 6px;
    font-size: 0.875rem;
    line-height: 1.55;
    color: var(--t-muted);
}

/* ------------------------------------------------------------ Trust band */

.trust-list li {
    align-items: flex-start;
}

.trust-list strong {
    display: block;
    font-size: 0.9375rem;
    font-weight: 600;
}

.trust-list__text {
    display: block;
    margin-top: 4px;
    color: var(--t-muted);
}

.extgrid {
    gap: 8px;
}

.extgrid li {
    display: flex;
}

.trust-note {
    margin-top: 20px;
    padding-top: 16px;
    font-size: 0.8125rem;
    line-height: 1.65;
    color: var(--t-muted);
    border-top: 1px solid var(--t-border);
}

/* ---------------------------------------------------------- FAQ accordion */

.pricing-faq {
    max-width: 52rem;
    margin-top: 28px;
    overflow: hidden;
    background: var(--t-surface);
    border: 1px solid var(--t-border);
    border-radius: var(--radius-xl);
}

.pricing-faq__item + .pricing-faq__item {
    border-top: 1px solid var(--t-border);
}

.pricing-faq__heading {
    font-size: inherit;
    font-weight: inherit;
}

.pricing-faq__trigger {
    display: flex;
    gap: 18px;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 18px 22px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--t-highlighted);
    text-align: left;
    background: none;
    border: 0;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.pricing-faq__trigger:hover {
    color: var(--primary-500);
    background: var(--t-elevated);
}

.pricing-faq__trigger:focus-visible {
    outline: 2px solid var(--primary-500);
    outline-offset: -2px;
}

.pricing-faq__trigger[aria-expanded="true"] {
    color: var(--t-highlighted);
    background: var(--t-elevated);
}

.pricing-faq__chevron {
    flex: none;
    font-size: 0.8125rem;
    color: var(--t-dimmed);
    transition: transform 0.15s ease, color 0.15s ease;
}

.pricing-faq__trigger[aria-expanded="true"] .pricing-faq__chevron {
    color: var(--primary-500);
    transform: rotate(180deg);
}

.pricing-faq__panel {
    padding: 0 22px 20px;
    background: var(--t-elevated);
}

.pricing-faq__a {
    max-width: 66ch;
    padding-top: 2px;
    font-size: 0.9375rem;
    line-height: 1.65;
    color: var(--t-muted);
}

/* ------------------------------------------------------------ Closing CTA */

.pricing-cta {
    padding-bottom: 84px;
}

.pricing-cta__inner {
    max-width: 700px;
    margin: 0 auto;
    padding: 40px 28px;
    text-align: center;
    background: var(--t-elevated);
    border: 1px solid var(--t-border);
    border-radius: var(--radius-2xl);
}

.pricing-cta__title {
    font-size: clamp(1.5rem, 3vw, 1.875rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--t-highlighted);
}

.pricing-cta__text {
    margin-top: 12px;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--t-muted);
}

.pricing-cta__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 26px;
}

/* ------------------------------------------------------------ Responsive */

@media (max-width: 1040px) {
    .plan-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px 20px;
    }

    .plan-card__positioning {
        min-height: 0;
    }
}

@media (max-width: 900px) {
    .addon-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .cmp-hint__swipe {
        display: inline;
    }
}

@media (max-width: 640px) {
    .pricing-hero.vhero {
        padding: 52px 0 176px;
    }

    .plan-lift {
        margin-top: -130px;
    }

    .plan-grid,
    .addon-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .pband {
        padding: 40px 0;
    }

    .plan-card {
        padding: 26px 20px 24px;
    }

    .pricing-faq__trigger {
        padding: 16px 18px;
    }

    .pricing-faq__panel {
        padding: 0 18px 18px;
    }

    .pricing-cta__inner {
        padding: 30px 20px;
    }

    .pricing-cta__actions .btn {
        width: 100%;
    }
}

@media (max-width: 400px) {
    .plan-card__amount {
        font-size: 2.375rem;
    }

    .pricing-toggle {
        gap: 10px;
        font-size: 0.875rem;
    }

    .pricing-hero__kicker {
        font-size: 0.6875rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pricing-switch__thumb,
    .pricing-faq__chevron,
    .plan-card {
        transition: none;
    }
}
