/* The Pricing page (public/pricing.php). Builds on site.css's plan cards (.billing, .member, .pack, .plan); light and
   dark come from its variables. Small print is at least 12px in var(--muted) (4.5:1 on both themes). */

.pp-hero { padding-bottom: 8px; text-align: center; }
.pp-hero .lead { max-width: 680px; margin-inline: auto; }
.pp-jump { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 24px; }
.pp-jump a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; font-weight: 700; font-size: 0.92rem; color: var(--ink-2); text-decoration: none; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; }
.pp-jump a:hover { color: var(--ink); border-color: var(--line-strong); }
.pp-jump a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.pp-flash { display: flex; align-items: center; justify-content: center; gap: 10px; max-width: 680px; margin: 24px auto 0; padding: 12px 16px; font-weight: 600; color: var(--ink); background: var(--accent-soft); border-radius: 14px; }
.pp-flash svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--accent-text); }
.pp-flash.is-error { background: var(--amber-soft); }
.pp-flash.is-error svg { color: var(--amber); }

.pp-section { scroll-margin-top: 90px; }

/* Memberships: the price first, the trial under it */
.pp-member .member-name, .pack .member-name, .pp-api .plan-name { font-size: 0.85rem; }
.pp-price { display: flex; align-items: baseline; gap: 4px; margin: 14px 0 0; }
.pp-price b { font-size: 3.4rem; font-weight: 800; letter-spacing: -0.05em; line-height: 1; }
.pp-price span { font-size: 1.05rem; font-weight: 700; color: var(--muted); }
.pp-price-note { margin: 8px 0 0; font-size: 0.92rem; color: var(--ink-2); }
.pp-price-note .plan-save { display: inline-block; margin: 6px 0 0; }
.pp-trial { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; padding: 10px 12px; font-size: 0.92rem; color: var(--ink-2); background: var(--accent-soft); border-radius: 12px; }
.pp-trial svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--accent-text); }
.pp-trial b { color: var(--ink); }

/* Buttons and the small gray print right under them (operator pattern: ≥12px, 4.5:1) */
.pp-cta { width: 100%; min-height: 48px; justify-content: center; text-align: center; white-space: normal; overflow-wrap: anywhere; }
.pp-small { margin: 10px 0 0; font-size: 0.8125rem; line-height: 1.5; text-align: center; color: var(--muted); }
.pp-small a { color: inherit; text-decoration: underline; }
.pp-note { margin: 0; padding: 12px 14px; font-size: 0.875rem; line-height: 1.5; color: var(--ink-2); background: var(--surface-2); border-radius: 12px; }
.pp-yours { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 0 10px; }
.pp-yours-tag { display: inline-flex; align-items: center; padding: 4px 12px; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-ink); background: var(--accent-text); border-radius: 999px; }
.pp-yours-note { font-size: 0.85rem; font-weight: 700; color: var(--ink-2); }
.member.is-mine, .plan.is-mine { border: 2px solid var(--accent-text); }
.pack-cta .pp-cta, .member-cta .pp-cta { margin-top: 0; }
.plan .member-cta { margin-top: auto; }
.plan .member-cta .btn { margin-top: 0; }

/* What's in a report */
.pp-report { max-width: 1100px; margin: 40px auto 0; padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; }
.pp-report .h3 { margin: 0 0 16px; }
.pp-report-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 28px; margin: 0; padding: 0; list-style: none; }
.pp-report-list li { display: flex; align-items: center; gap: 12px; color: var(--ink-2); }
.pp-report-list b { color: var(--ink); }
.pp-report-list .icon-badge { width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px; }
@media (max-width: 760px) { .pp-report-list { grid-template-columns: 1fr; } }

/* API */
.pp-api .plan-price { font-size: 2.8rem; }
.pp-api .ticks { margin-bottom: 24px; }
.pp-api-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 24px; padding: 18px 22px; color: var(--ink-2); background: var(--surface-2); border-radius: 18px; }
.pp-api-foot p { flex: 1 1 420px; margin: 0; }
.pp-api-foot b { color: var(--ink); }
.pp-api-foot .btn { min-height: 44px; }
.pp-api-foot .btn svg { width: 18px; height: 18px; margin-left: 6px; }
.pp-api { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1000px) { .pp-api { grid-template-columns: minmax(0, 1fr); max-width: 520px; margin-inline: auto; } }

/* The feature table: scrolls sideways on phones (a focusable region, so keyboards can scroll it) */
.pp-table-wrap { position: relative; overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; }
.pp-table-wrap:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.pp-table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 0.92rem; }
.pp-table th, .pp-table td { padding: 14px 16px; text-align: center; vertical-align: middle; border-bottom: 1px solid var(--line); }
.pp-table thead th { position: sticky; top: 0; font-size: 0.82rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); background: var(--surface-2); }
.pp-table thead th.is-featured { color: var(--accent-text); }
.pp-table tbody th { text-align: left; font-weight: 700; color: var(--ink); }
.pp-table td { color: var(--ink-2); }
.pp-table tbody tr:last-child th, .pp-table tbody tr:last-child td { border-bottom: 0; }
.pp-table th:first-child { position: sticky; left: 0; z-index: 1; min-width: 180px; background: var(--surface); }
.pp-table thead th:first-child { background: var(--surface-2); }
.pp-yes svg { width: 20px; height: 20px; color: var(--accent-text); vertical-align: middle; }
.pp-no { color: var(--muted); }

.pp-more { margin-top: 20px; color: var(--ink-2); }
.pp-more a { color: var(--accent-text); font-weight: 700; }

/* Dialogs: rendered open (a card on the page) until pricing.js makes them modal */
.pp-dialog { width: min(480px, calc(100% - 24px)); max-height: calc(100dvh - 24px); overflow: auto; }
.pp-dialog:not([open]), .pp-pay:not([open]) { display: none; }
.pp-dialog[open]:not(:modal), .pp-pay[open]:not(:modal) { position: static; margin: 0 auto 40px; }
.pp-dialog-body { padding: 24px 26px 26px; }
.pp-dialog .promo-modal form, .pp-dialog form { padding: 0; }
.pp-dialog .promo-lead b { color: var(--ink); }
.pp-dialog .form-error { margin: 12px 0 0; }
.pp-join-form { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.pp-field { display: flex; flex-direction: column; gap: 6px; }
.pp-field[hidden] { display: none; }
.pp-field label { font-weight: 700; color: var(--ink); }
.pp-field input { min-height: 52px; padding: 10px 14px; font: inherit; font-size: 1.1rem; color: var(--ink); background: var(--bg); border: 1.5px solid var(--line-strong); border-radius: 12px; }
.pp-field input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-color: var(--accent); }
.pp-switch { margin: 4px 0 0; text-align: center; }
.pp-switch .link-button { min-height: 44px; padding: 0 8px; font-weight: 700; color: var(--accent-text); }
.pp-login { margin: 16px 0 0; padding-top: 14px; font-size: 0.875rem; text-align: center; color: var(--ink-2); border-top: 1px solid var(--line); }
.pp-login a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; color: var(--accent-text); }

.pp-pay { width: min(560px, calc(100% - 24px)); }
.pp-pay-form { display: flex; flex-direction: column; gap: 14px; padding: 18px 26px 6px; }
.pp-pay-total { display: flex; align-items: baseline; justify-content: space-between; margin: 0; padding-bottom: 12px; font-weight: 700; color: var(--ink-2); border-bottom: 1px dashed var(--line-strong); }
.pp-pay-total b { font-size: 1.8rem; font-weight: 800; letter-spacing: -0.03em; color: var(--ink); }
.pp-pay-how { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; border: 0; }
.pp-pay-choice { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 10px 14px; color: var(--ink-2); border: 1px solid var(--line); border-radius: 14px; cursor: pointer; }
.pp-pay-choice input { width: 20px; height: 20px; flex-shrink: 0; margin: 0; accent-color: var(--accent); }
.pp-pay-choice:has(input:checked) { color: var(--ink); background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.pp-pay-choice:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.pp-stripe[hidden] { display: none; }
.pp-stripe { min-height: 120px; }
.pp-samples { display: grid; gap: 10px; }
.pp-pay .pay-foot { margin: 0; padding: 12px 26px 22px; }

@media (max-width: 520px) {
    .pp-price b { font-size: 2.8rem; }
    .pp-dialog-body, .pp-pay-form { padding-inline: 18px; }
}
@media (prefers-reduced-motion: reduce) {
    .pp-dialog[open], .pp-pay[open] { animation: none; }
}
