/* ══════════════════════════════════════════════════════════════════════
   /pricing · Signal redesign
   Styles the shared plan-card markup (_plan_tiers.html) for this page only,
   scoped under .pr-page so the app's setup step (plan-tiers.css) is untouched.
   ══════════════════════════════════════════════════════════════════════ */

/* ── Hero + billing toggle ─────────────────────────────────────────── */
.pr-hero { position: relative; overflow: hidden; outline: none; padding: clamp(120px, 15vh, 164px) 0 clamp(40px, 5vw, 64px); text-align: center; }
.pr-hero-glow {
    position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background:
        radial-gradient(50% 60% at 50% 0%, rgba(91, 80, 232, .14), transparent 70%),
        linear-gradient(180deg, var(--ds-bg-2), var(--ds-bg) 80%);
}
.pr-hero .ds-lead { margin-inline: auto; text-align: center; }
.pr-page .term-toggle {
    position: relative; isolation: isolate;
    display: inline-grid; grid-auto-flow: column; grid-auto-columns: auto;
    margin-top: 10px; padding: 5px;
    border: 1px solid var(--ds-line); border-radius: 999px;
    background: var(--ds-bg-3);
}
.pr-page .term-ink {
    position: absolute; z-index: -1; top: 5px; bottom: 5px; left: 5px;
    width: var(--ink-w, 50%); translate: var(--ink-x, 0) 0;
    border-radius: 999px; background: var(--ds-surface);
    box-shadow: var(--ds-shadow-2);
    transition: translate .55s var(--ds-ease-out), width .55s var(--ds-ease-out);
}
.pr-page .term-toggle button {
    display: inline-flex; align-items: center; gap: 8px;
    min-height: 42px; padding: 0 20px;
    border: 0; border-radius: 999px; background: transparent;
    font: 650 .9375rem var(--ds-font-text); color: var(--ds-ink-3);
    cursor: pointer; transition: color .3s ease;
}
.pr-page .term-toggle button[aria-checked="true"] { color: var(--ds-ink); }
.pr-page .term-toggle .save { padding: 3px 8px; border-radius: 999px; background: #e5f7f0; color: #08734e; font-size: .6875rem; font-weight: 700; }
.pr-page:not([data-interval="annual"]) .p-annual { display: none; }
.pr-page[data-interval="annual"] .p-monthly { display: none; }

/* ── Plan cards ────────────────────────────────────────────────────── */
.pr-grid {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px;
    align-items: stretch;
    padding-top: 28px; padding-bottom: clamp(48px, 6vw, 80px);
}
.pr-page .tier {
    position: relative; isolation: isolate;
    display: flex; flex-direction: column;
    padding: 28px 24px 24px;
    border: 1px solid var(--ds-line); border-radius: 26px;
    background: var(--ds-surface);
    box-shadow: var(--ds-shadow-1);
    transition: border-color .3s ease, box-shadow .5s var(--ds-ease-out), transform .5s var(--ds-ease-out);
}
.pr-page .tier:hover { border-color: var(--ds-line-2); box-shadow: var(--ds-shadow-2); transform: translateY(-4px); }
.pr-page .tier.featured {
    border-color: color-mix(in srgb, var(--ds-accent) 55%, transparent);
    background: linear-gradient(180deg, var(--ds-accent-soft), var(--ds-surface) 38%);
    box-shadow: var(--ds-glow);
}
.pr-page .tier h2 { margin: 0; font-family: var(--ds-font-display); font-size: 1.375rem; font-weight: 700; letter-spacing: -.03em; color: var(--ds-ink); }
.pr-page .badge,
.pr-page .tier-badge {
    align-self: flex-start;
    display: inline-flex; align-items: center; height: 24px; padding: 0 10px; margin-bottom: 12px;
    border-radius: 999px; background: var(--ds-accent-soft); color: var(--ds-accent-ink);
    font: 600 .75rem/1 var(--ds-font-text);
}
.pr-page .tier.featured .badge { background: var(--ds-violet-600); color: #fff; }
.pr-page .badge.alt { background: var(--ds-mint-soft); color: var(--ds-mint); }
.pr-page .price {
    margin: 14px 0 2px;
    font-family: var(--ds-font-display); font-size: 2.5rem; font-weight: 700; letter-spacing: -.045em; line-height: 1;
    color: var(--ds-ink); font-variant-numeric: tabular-nums;
}
.pr-page .price small { font-size: .9375rem; font-weight: 600; letter-spacing: 0; color: var(--ds-ink-3); }
.pr-page .annual-note { margin-top: 6px; font-size: .75rem; font-weight: 700; color: var(--ds-ink-2); }
.pr-page .tier .who { margin: 8px 0 0; font-size: .875rem; color: var(--ds-ink-3); }
.pr-page .tier .tagline { margin: 16px 0 18px; padding-top: 16px; border-top: 1px solid var(--ds-line); font-size: .9375rem; font-weight: 600; line-height: 1.5; color: var(--ds-ink); }
.pr-page ul.feats { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 11px; align-content: start; flex: 1; }
.pr-page ul.feats li { position: relative; padding-left: 28px; font-size: .875rem; line-height: 1.5; color: var(--ds-ink-2); }
.pr-page ul.feats li strong { color: var(--ds-ink); font-weight: 650; }
.pr-page ul.feats li::before {
    content: ''; position: absolute; left: 0; top: 1px;
    width: 18px; height: 18px; border-radius: 50%;
    background: var(--ds-mint-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f9f6e' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") no-repeat center / 11px;
}
.pr-page .cta {
    margin-top: auto;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; min-height: 50px; padding: 0 18px;
    border: 1px solid transparent; border-radius: 14px;
    font: 650 1rem var(--ds-font-text); text-decoration: none; cursor: pointer;
    transition: background-color .25s ease, border-color .25s ease, transform .3s var(--ds-ease-out), box-shadow .3s ease;
}
.pr-page .cta:active { transform: scale(.98); }
.pr-page .cta.primary { background: var(--ds-violet-600); color: #fff; box-shadow: 0 1px 2px rgba(14, 18, 32, .16); }
.pr-page .cta.primary:hover { background: #5046e0; }
.pr-page .cta.ghost { background: transparent; border-color: var(--ds-line-2); color: var(--ds-ink); }
.pr-page .cta.ghost:hover { border-color: var(--ds-accent); background: var(--ds-accent-soft); }
.pr-page .cta:disabled { opacity: .6; cursor: progress; }
.pr-page .wait { display: flex; gap: 8px; margin-top: auto; }
.pr-page .wait input {
    flex: 1; min-width: 0; min-height: 48px; padding: 0 14px;
    border: 1px solid var(--ds-line-2); border-radius: 12px;
    background: var(--ds-bg-2); color: var(--ds-ink); font: 500 .9375rem var(--ds-font-text);
}
.pr-page .wait input:focus { outline: none; border-color: var(--ds-accent); box-shadow: 0 0 0 4px var(--ds-accent-soft); }
.pr-page .wait .cta { width: auto; margin: 0; }
.pr-page .msg { min-height: 18px; margin-top: 10px; font-size: .8125rem; font-weight: 650; color: var(--ds-mint); }

/* The Student card sits in a flip wrapper. No preserve-3d and no
   backface-visibility: that pair is what WebKit drops, painting the whole
   card as an empty slot on a real iPhone. Each face carries its own rotation
   and its own opacity instead, and touch devices get no 3D at all. */
.flip { display: grid; grid-template-columns: minmax(0, 1fr); }
.flip-inner { display: grid; grid-template-columns: minmax(0, 1fr); perspective: 1600px; }
.flip-face { grid-area: 1 / 1; transition: transform .8s var(--ds-ease-out), opacity .35s ease; }
.flip .flip-front { transform: rotateY(0deg); opacity: 1; }
.flip .flip-back { transform: rotateY(180deg); opacity: 0; pointer-events: none; }
.flip[data-flipped] .flip-front { transform: rotateY(-180deg); opacity: 0; pointer-events: none; }
.flip[data-flipped] .flip-back { transform: rotateY(0deg); opacity: 1; pointer-events: auto; }
@media (hover: none) {
    .flip-inner { perspective: none; }
}
.pr-page .flip-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; padding: 6px 10px; border: 0; border-radius: 10px; background: transparent; color: var(--ds-accent-ink); font: 650 .8125rem var(--ds-font-text); cursor: pointer; }
.pr-page .flip-link:hover { background: var(--ds-accent-soft); }

@media (max-width: 1120px) { .pr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 820px; } }
@media (max-width: 620px) { .pr-grid { grid-template-columns: minmax(0, 1fr); max-width: 480px; } }

/* ── Every plan includes ───────────────────────────────────────────── */
.pr-every { padding-bottom: clamp(24px, 4vw, 48px); }
.pr-every-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); gap: 24px 40px; align-items: center; padding: clamp(22px, 3vw, 36px); border-radius: 26px; background: var(--ds-bg-2); box-shadow: none; }
.pr-every-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.pr-every-list li { display: grid; gap: 10px; align-content: start; }
.pr-every-list .ds-ico { width: 36px; height: 36px; padding: 8px; border-radius: 11px; background: var(--ds-surface); border: 1px solid var(--ds-line); color: var(--ds-accent-ink); }
.pr-every-list span { font-size: .875rem; line-height: 1.5; color: var(--ds-ink-2); }
.pr-every-list b { display: block; color: var(--ds-ink); font-weight: 650; }
@media (max-width: 980px) { .pr-every-card { grid-template-columns: minmax(0, 1fr); } .pr-every-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .pr-every-list { grid-template-columns: minmax(0, 1fr); } }

/* ── FAQ ───────────────────────────────────────────────────────────── */
.pr-faq-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.pr-faq-head { position: sticky; top: 112px; }
.pr-page .faq-body strong { color: var(--ds-ink); }
.pr-page .faq-body a { color: var(--ds-accent-ink); }
@media (max-width: 860px) { .pr-faq-grid { grid-template-columns: minmax(0, 1fr); } .pr-faq-head { position: static; } }

/* ── Closing CTA ───────────────────────────────────────────────────── */
.pr-cta { padding-bottom: clamp(64px, 8vw, 112px); }
.pr-cta-card { display: grid; justify-items: center; gap: 20px; text-align: center; padding: clamp(48px, 7vw, 96px) 24px; border-radius: clamp(26px, 3vw, 40px); overflow: hidden; }
.pr-cta-card .ds-lead { text-align: center; }
.pr-cta-card .ds-actions { justify-content: center; }
[data-dark] .pr-cta-card { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07); }
.pr-hero .ds-heading-block { max-width: 980px; }

/* Approved artwork and its accents stay as signed off (Oct 2026 palette
   change): the charcoal neutrals and marking colours apply here, the purple
   accents keep their original values. */
.pr-page {
    --ds-accent: #5b50e8;
    --ds-accent-ink: #4a3fd0;
    --ds-accent-soft: #efedfe;
    --ds-focus: #5b50e8;
}
[data-dark] .pr-page {
    --ds-accent: #6d62f5;
    --ds-accent-ink: #a99dff;
    --ds-accent-soft: rgba(109, 98, 245, .14);
    --ds-focus: #a99dff;
}
