/* Pricing page. Tokens and buttons come from site.css. */

.pricing-hero .toggle { margin-top: 26px; }
.toggle { display: inline-flex; gap: 2px; padding: 4px; border-radius: 999px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.toggle button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font-size: var(--t-small);
    font-weight: 700;
    cursor: pointer;
    transition: background-color .18s ease, color .18s ease;
}
.toggle button.is-on { background: var(--ink); color: var(--on-fill); }
.toggle small { font-size: 12px; font-weight: 600; opacity: .8; }

.pricing-page { padding: 14px 20px 0; }
.pricing-page > * + * { margin-top: 14px; }

/* Plans */
.pricing-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.pricing-card { position: relative; display: flex; flex-direction: column; padding: 26px 22px; border-radius: var(--radius-m); background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); min-width: 0; }
.pricing-card .plan-name { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.pricing-card .price { font-size: 40px; font-weight: 700; line-height: 1.05; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.pricing-card .period { font-size: var(--t-small); font-weight: 500; letter-spacing: 0; color: var(--muted); }
.pricing-card .plan-desc { min-height: 42px; margin: 10px 0 18px; color: var(--muted); font-size: var(--t-small); line-height: 1.45; }
.pricing-card .btn { width: 100%; }
.pricing-card .price-note { min-height: 18px; margin: 10px 0 18px; color: var(--muted); font-size: 13px; text-align: center; }
.feature-list { flex: 1; margin: 0; padding: 16px 0 0; border-top: 1px solid var(--line); list-style: none; }
.feature-list li { display: flex; align-items: flex-start; gap: 9px; padding: 5px 0; font-size: var(--t-small); line-height: 1.4; }
.feature-list .check { flex: 0 0 auto; font-weight: 700; }
.feature-list .x { flex: 0 0 auto; color: var(--subtle); font-weight: 700; }

/* The one line on workspaces, right under the plans */
.pricing-workspaces { max-width: 70ch; margin-left: auto; margin-right: auto; padding: 4px 12px 2px; color: var(--muted); font-size: 15px; line-height: 1.5; text-align: center; text-wrap: balance; }

.pricing-card.featured { --stack-ring: var(--slab); --focus: var(--on-ink); background: var(--slab); color: var(--on-ink); box-shadow: none; }
.pricing-card.featured .period, .pricing-card.featured .plan-desc, .pricing-card.featured .price-note { color: var(--on-ink-soft); }
.pricing-card.featured .feature-list { border-top-color: var(--on-ink-line); }
.pricing-card.featured .check { color: var(--lime); }
.pricing-card .badge { position: absolute; top: 76px; right: 22px; display: inline-flex; align-items: center; min-height: 24px; padding: 0 10px; border-radius: 999px; background: var(--lime); color: var(--accent-ink); font-size: 12px; font-weight: 700; }

/* Free */
.free-block-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px 28px; padding: clamp(24px, 3vw, 36px); border-radius: var(--radius-m); background: var(--soft); }
.free-block-text { flex: 1 1 420px; min-width: 0; max-width: 680px; }
.free-tag { display: block; margin-bottom: 8px; color: var(--muted); font-size: var(--t-micro); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.free-block h3 { margin: 0 0 8px; font-size: 22px; letter-spacing: -.025em; }
.free-block p { margin: 0; color: var(--muted); font-size: 15px; }

/* Engage: its own plan, in its own color, directly under the app plans. */
.engage-plan {
    --focus: var(--on-ink);
    --engage-soft: rgba(255, 255, 255, .86);
    position: relative;
    isolation: isolate;
    overflow: hidden;
    scroll-margin-top: 120px;
    margin-top: 12px !important;
    padding: clamp(24px, 3vw, 38px);
    border-radius: var(--radius-m);
    background: var(--engage);
    color: var(--on-ink);
}
.engage-plan-glyph { position: absolute; z-index: -1; left: 6%; top: 50%; width: 760px; aspect-ratio: 1; transform: translateY(-50%); fill: none; stroke: rgba(255, 255, 255, .07); pointer-events: none; }
.engage-plan-main { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); grid-template-rows: auto 1fr; grid-template-areas: "offer choose" "uses choose"; gap: 24px clamp(28px, 4vw, 56px); }
.engage-plan-offer { grid-area: offer; }
.engage-plan-choose { grid-area: choose; display: flex; flex-direction: column; min-width: 0; }
.engage-plan .plan-name { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0 0 18px; font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.engage-plan .plan-name .mark { box-shadow: 0 0 0 2px var(--on-ink); }
.engage-plan-tag { display: inline-flex; align-items: center; min-height: 24px; padding: 0 10px; border-radius: 999px; background: rgba(255, 255, 255, .18); font-size: 12px; font-weight: 700; letter-spacing: 0; }
.engage-plan .price { font-size: 40px; font-weight: 700; line-height: 1.05; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.engage-plan .price small, .engage-plan .period { font-size: var(--t-small); font-weight: 500; letter-spacing: 0; color: var(--engage-soft); }
.engage-plan-fee { margin: 6px 0 0; font-size: 14px; font-weight: 600; }
.engage-plan-desc { max-width: 46ch; margin: 10px 0 20px; color: var(--engage-soft); font-size: 15px; line-height: 1.5; }
.engage-plan-note { max-width: 46ch; margin: 12px 0 0; color: var(--engage-soft); font-size: 13px; line-height: 1.45; }
.engage-plan a:not(.btn) { color: var(--on-ink); font-weight: 600; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .55); text-underline-offset: 3px; }
.engage-tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 8px; margin: 0; padding: 0; list-style: none; }
.engage-tier { padding: 15px 16px 14px; border-radius: var(--radius-s); background: var(--paper); color: var(--ink); min-width: 0; }
.engage-tier h3 { margin: 0 0 8px; color: var(--muted); font-size: 13px; font-weight: 700; }
.engage-plan .engage-tier .price { font-size: 28px; }
.engage-plan .engage-tier .period { font-size: 13px; color: var(--muted); }
.engage-tier p { margin: 5px 0 0; color: var(--muted); font-size: 13px; line-height: 1.35; }
.engage-tier strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.engage-step { margin: 18px 0 8px; font-size: 14px; font-weight: 700; }
.engage-step:first-child { margin-top: 0; }
.engage-fee { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px 22px; padding: 15px 18px; border-radius: var(--radius-s); background: var(--paper); color: var(--ink); }
.engage-plan .engage-fee .price { font-size: 28px; white-space: nowrap; }
.engage-plan .engage-fee .period { font-size: 13px; color: var(--muted); }
.engage-fee p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.4; }
.engage-refill { display: flex; align-items: center; gap: 16px; margin-top: 12px; padding: 16px 18px; border-radius: var(--radius-s); background: rgba(255, 255, 255, .15); }
.engage-refill-icon { flex: 0 0 auto; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--lime); color: var(--accent-ink); }
.engage-refill-icon svg { width: 25px; height: 25px; }
.engage-refill h3 { margin: 0 0 3px; font-size: 16px; letter-spacing: -.015em; }
.engage-refill p { margin: 0; color: var(--engage-soft); font-size: 13.5px; line-height: 1.45; }
.engage-plan-uses { grid-area: uses; align-self: start; display: grid; gap: 14px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .24); }
.engage-plan-uses h3 { margin: 0 0 4px; font-size: 15px; letter-spacing: -.015em; }
.engage-plan-uses p { margin: 0; color: var(--engage-soft); font-size: 13.5px; line-height: 1.45; }
.engage-billing { scroll-margin-top: 120px; margin-top: 22px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .24); }
.engage-billing summary { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 20px; border-radius: 999px; background: rgba(255, 255, 255, .2); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .42); font-size: 14px; font-weight: 700; cursor: pointer; list-style: none; transition: background-color .18s ease; }
.engage-billing summary:hover { background: rgba(255, 255, 255, .3); }
.engage-billing[open] summary { margin-bottom: 8px; }
.engage-billing summary::-webkit-details-marker { display: none; }
.engage-billing summary svg { flex: 0 0 auto; width: 12px; height: 12px; transition: transform .2s ease; }
.engage-billing[open] summary svg { transform: rotate(180deg); }
.engage-billing p { max-width: 78ch; margin: 6px 0 0; color: var(--engage-soft); font-size: var(--t-small); line-height: 1.5; }
.engage-billing ul { max-width: 78ch; margin: 10px 0 0; padding-left: 18px; color: var(--engage-soft); font-size: var(--t-small); line-height: 1.5; }
.engage-billing li + li { margin-top: 6px; }
.engage-billing .engage-billing-terms { margin: 14px 0 8px; font-size: 13px; line-height: 1.6; }

/* FAQ and early access */
.faq-section { scroll-margin-top: 120px; max-width: 800px; margin: clamp(44px, 6vw, 72px) auto 0 !important; padding: 0 8px; }
.faq-section > h2 { margin: 0 0 24px; font-size: clamp(26px, 2.8vw, 36px); letter-spacing: -.035em; }
.early { scroll-margin-top: 120px; margin: clamp(44px, 6vw, 72px) 0 0 !important; padding: clamp(36px, 5vw, 60px) clamp(24px, 4vw, 48px); border-radius: var(--radius-l); background: var(--slab); color: var(--on-ink); --focus: var(--on-ink); }
.early h2 { margin: 0 0 12px; max-width: 18ch; font-size: var(--t-h2); line-height: 1.02; letter-spacing: -.04em; }
.early p { max-width: 62ch; margin: 0 0 22px; color: var(--on-ink-soft); }
.early .cta-row { display: flex; flex-wrap: wrap; gap: 10px; }
.early .btn-ink { --btn-bg: var(--lime); --btn-fg: var(--accent-ink); --btn-ring: var(--lime); }
.early .btn:not(.btn-ink) { --btn-bg: transparent; --btn-fg: var(--on-ink); --btn-ring: rgba(255, 255, 255, .34); }

@media (max-width: 1160px) {
    .pricing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .engage-plan-main { grid-template-columns: 1fr; grid-template-rows: none; grid-template-areas: "offer" "choose" "uses"; }
    .engage-plan-uses { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 840px) {
    .pricing-page { padding: 10px 10px 0; }
    .engage-plan-uses { grid-template-columns: 1fr; }
    .faq-section { padding: 0 14px; }
}
@media (max-width: 600px) {
    .pricing-grid { grid-template-columns: 1fr; }
    .pricing-card.featured { order: -1; }
    .pricing-card .plan-desc { min-height: 0; }
    .engage-tiers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .engage-tier strong { display: block; }
    .engage-fee { grid-template-columns: 1fr; }
    .toggle button { padding: 0 14px; }
}
