/* ══════════════════════════════════════════════
   Pricing — shared design kit (matches home/market)
   Brand red is chrome only (edges, bars, CTAs, checks); the green
   "current plan" accent marks the viewer's own tier.
   Spacing: 16px between/inside cards, 32px between sections,
   48px table/FAQ rows, 28px pills.
══════════════════════════════════════════════ */

.pr {
    --pr-gap: 1rem;
    --pr-section: 2rem;
    --pr-r: 0.5rem;
    max-width: 100rem;
    padding: 1.5rem 1.5rem 2rem;
}

/* Notices (?canceled / ?error) */
.pr-notice {
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border-radius: var(--pr-r);
    border: 1px solid rgba(96, 165, 250, 0.3);
    background: rgba(96, 165, 250, 0.08);
    color: var(--text-secondary);
    font-size: 0.875rem;
}
.pr-notice--warn { border-color: rgba(250, 204, 21, 0.35); background: rgba(250, 204, 21, 0.07); }

/* Hero */
.pr-hero { text-align: center; padding: 1.5rem 0 2rem; }
.pr-hero h1 {
    margin: 0 0 0.5rem;
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}
.pr-hero p { margin: 0 auto; max-width: 40rem; color: var(--text-dim); }

/* ── Plans ── */
.pr-tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--pr-gap); align-items: stretch; }
.pr-tier,
.pr-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--surface-1);
    border: 1px solid var(--glass-border);
    border-radius: var(--pr-r);
    overflow: hidden;
}
.pr-tier::before,
.pr-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 2px;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(90deg,
        rgba(var(--primary-rgb), 1),
        rgba(var(--primary-rgb), 0.72) 25%,
        rgba(var(--primary-rgb), 0.5) 50%,
        rgba(var(--primary-rgb), 0.72) 75%,
        rgba(var(--primary-rgb), 1));
}
.pr-tier--popular {
    border-color: rgba(var(--primary-rgb), 0.55);
    box-shadow: 0 0 0 1px rgba(var(--primary-rgb), 0.35), 0 1.125rem 2.5rem rgba(var(--primary-rgb), 0.12);
}
.pr-tier--current { border-color: var(--positive-border); }
.pr-tier--current::before { background: linear-gradient(90deg, var(--positive), rgba(52, 211, 153, 0.5) 50%, var(--positive)); }

.pr-tier-top { padding: 1.5rem 1rem 1rem; border-bottom: 1px solid var(--glass-border); }
.pr-tier-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 1.75rem;
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 600;
}
.pr-badge {
    margin-left: auto;
    font-family: var(--font-body);
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.125rem 0.5rem;
    border-radius: 0.625rem;
}
.pr-badge--red { background: rgba(var(--primary-rgb), 0.16); color: var(--primary-light); }
.pr-badge--green { background: var(--positive-bg); color: var(--positive); }
.pr-price { display: flex; align-items: baseline; gap: 0.25rem; margin: 0.75rem 0 0.25rem; }
.pr-price b { font-family: var(--font-display); font-size: 2.5rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.pr-price span { color: var(--text-muted); }
.pr-tag { margin: 0; min-height: 2.5rem; color: var(--text-muted); font-size: 0.8125rem; line-height: 1.5; }
.pr-cta { width: 100%; justify-content: center; height: 2.5rem; margin-top: 1rem; font-size: 0.875rem; }
.pr-cta:disabled { opacity: 0.6; cursor: default; }

.pr-tier-body { display: flex; flex-direction: column; gap: 1rem; padding: 1rem; }
.pr-inherit {
    padding: 0.5rem 0.75rem;
    border: 1px dashed var(--border-strong);
    border-radius: 0.375rem;
    font-size: 0.75rem;
    color: var(--text-dim);
}
.pr-group h5 {
    margin: 0 0 0.5rem;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.pr-group ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.pr-group li { display: grid; grid-template-columns: 1rem minmax(0, 1fr); gap: 0.5rem; font-size: 0.8125rem; line-height: 1.45; color: var(--text-secondary); }
.pr-check { color: var(--primary-light); padding-top: 0.0625rem; }
.pr-group b { color: var(--text); font-weight: 600; }
.pr-cmds { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-top: 0.25rem; }
.pr-cmd {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    padding: 0.0625rem 0.375rem;
    border-radius: 0.25rem;
    background: rgba(var(--primary-rgb), 0.12);
    color: var(--primary-light);
}
.pr-new {
    font-size: 0.625rem;
    font-weight: 700;
    padding: 0 0.3125rem;
    border-radius: 0.25rem;
    background: rgba(var(--primary-rgb), 0.2);
    color: var(--primary-light);
}
.pr-swipe-hint { display: none; text-align: center; color: var(--text-muted); font-size: 0.75rem; margin-bottom: 0.5rem; }

/* ── Sections ── */
.pr-section { margin-top: var(--pr-section); }
.pr-sec-head { display: flex; align-items: center; gap: 0.75rem; min-height: 2.25rem; margin-bottom: 0.75rem; }
.pr-sec-title {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.375rem;
    font-weight: 600;
    letter-spacing: -0.015em;
}
.pr-sec-title::before { content: ''; width: 0.25rem; height: 1.25rem; border-radius: 2px; background: var(--primary); }
.pr-sec-sub { color: var(--text-muted); font-size: 0.8125rem; }

/* Comparison table */
.pr-table-wrap { overflow-x: auto; }
.pr-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.pr-table th {
    height: 3.25rem;
    padding: 0 1rem;
    text-align: center;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--glass-border);
    background: var(--surface-1);
}
.pr-th-sub { display: block; margin-top: 0.125rem; font-weight: 400; color: var(--text-muted); text-transform: none; letter-spacing: 0; }
th.pr-col-current .pr-th-sub { color: var(--positive); }
.pr-table td { height: 2.75rem; padding: 0 1rem; text-align: center; border-bottom: 1px solid var(--border-subtle); font-size: 0.8125rem; }
.pr-table th:first-child, .pr-table td:first-child {
    text-align: left;
    position: sticky;
    left: 0;
    z-index: 1;
    min-width: 16rem;
    background: var(--surface-1);
}
.pr-table tr:last-child td { border-bottom: 0; }
.pr-table tbody tr:not(.pr-cat):hover td { background: var(--glass-bg-hover); }
.pr-cat td {
    height: 2.25rem;
    background: var(--surface-2) !important;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.pr-col-current { background: rgba(52, 211, 153, 0.06) !important; }
.pr-yes { color: var(--primary-light); font-weight: 700; }
.pr-no { color: var(--text-muted); }

/* FAQ */
.pr-faq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--pr-gap); align-items: start; }
.pr-faq-item summary {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 3.25rem;
    padding: 0 1rem;
    font-weight: 600;
    cursor: pointer;
}
.pr-faq-item summary::-webkit-details-marker { display: none; }
.pr-faq-item summary::after { content: '+'; margin-left: auto; color: var(--primary-light); font-size: 1.125rem; }
.pr-faq-item[open] summary::after { content: '−'; }
.pr-faq-item summary:focus-visible { outline: 2px solid var(--primary-light); outline-offset: -2px; }
.pr-faq-item p { margin: 0; padding: 0 1rem 1rem; color: var(--text-dim); font-size: 0.8125rem; line-height: 1.6; }

.pr-cta-band {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    margin-top: var(--pr-section);
    padding: 1rem;
    border: 1px solid rgba(var(--primary-rgb), 0.4);
    border-radius: var(--pr-r);
    background: linear-gradient(90deg,
        rgba(var(--primary-rgb), 0.18), rgba(var(--primary-rgb), 0.13) 25%,
        rgba(var(--primary-rgb), 0.09) 50%, rgba(var(--primary-rgb), 0.13) 75%,
        rgba(var(--primary-rgb), 0.18));
    color: var(--text-dim);
    font-size: 0.875rem;
}
.pr-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    height: 1.75rem;
    padding: 0 0.625rem;
    border: 1px solid var(--border-medium);
    border-radius: 999px;
    background: var(--glass-bg-strong);
    color: var(--text-dim);
    font-size: 0.75rem;
    font-weight: 600;
}
.pr-pill::after { content: '›'; font-size: 1rem; line-height: 1; }
.pr-pill:hover { color: var(--text); border-color: rgba(var(--primary-rgb), 0.6); background: rgba(var(--primary-rgb), 0.14); }

/* ── Responsive ── */
@media (max-width: 62rem) {
    /* stack rather than leave a 3rd card orphaned on a 2-column row */
    .pr-tiers { grid-template-columns: minmax(0, 1fr); max-width: 36rem; margin-left: auto; margin-right: auto; }
}
@media (max-width: 48rem) {
    .pr { padding: 1rem 1rem 2rem; }
    .pr-hero h1 { font-size: 1.875rem; }
    /* plans become a swipe carousel */
    .pr-tiers {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 0.75rem;
        max-width: none;
        margin: 0 -1rem;
        padding: 0 1rem 0.5rem;
        scrollbar-width: none;
    }
    .pr-tiers::-webkit-scrollbar { display: none; }
    .pr-tier { flex: 0 0 85%; scroll-snap-align: center; }
    .pr-faq { grid-template-columns: minmax(0, 1fr); }
    .pr-table th:first-child, .pr-table td:first-child { min-width: 10rem; box-shadow: 2px 0 6px rgba(0, 0, 0, 0.25); }
}
