/* Onboarding (PLAN_FORUM.md §16A): price box, step strip, billing choice, trial acceptance, welcome notice.
   Uses the tokens of app.css. Desktop first: the price box sits beside the form from 900 px. */

/* ---- step strip: the real sequence account -> billing -> trial ---- */
.steps { display: flex; flex-wrap: wrap; gap: 0.5rem 1.75rem; list-style: none; margin: 0 auto 2rem; padding: 0; max-width: 62rem; color: var(--ink-2); font-size: 0.95rem; }
.steps li { display: flex; align-items: center; gap: 0.5rem; }
.steps-n { display: inline-grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; border: 1px solid var(--line); background: var(--paper); font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.steps .done .steps-n { background: var(--ground-2); }
.steps [aria-current="step"] { color: var(--ink); font-weight: 600; }
.steps [aria-current="step"] .steps-n { background: var(--orange); border-color: var(--orange); color: #222; }

/* ---- price box: the one memorable thing on the registration page ---- */
.onb-grid { display: grid; grid-template-columns: minmax(0, 32rem); gap: 1.5rem; justify-content: center; align-items: start; }
@media (min-width: 900px) { .onb-grid { grid-template-columns: minmax(0, 32rem) 22rem; gap: 2rem; } }
@media (min-width: 900px) { .onb-grid.onb-grid-solo { grid-template-columns: minmax(0, 32rem); } }
.onb-grid .form-card { margin-inline: 0; width: 100%; }
.plan-box { background: var(--paper); border: 1px solid var(--line); border-top: 6px solid var(--orange); border-radius: 16px; padding: 1.5rem 1.75rem 1.75rem; }
.plan-title { font-size: 1.15rem; margin: 0 0 0.5rem; color: var(--ink-2); font-family: var(--text); font-weight: 600; }
.plan-price { margin: 0 0 1rem; display: flex; align-items: baseline; gap: 0.6rem; color: var(--ink-2); }
.plan-price strong { font: 400 3.4rem/1 var(--display); color: var(--ink); }
.plan-points { list-style: none; margin: 0; padding: 0; }
.plan-points li { padding: 0.65rem 0; border-top: 1px solid var(--line); }
.plan-points li:first-child { font-weight: 600; color: var(--ink); }
@media (min-width: 900px) { .plan-box { position: sticky; top: 6rem; } }

/* ---- billing step: two equal choices ---- */
.onb-head { max-width: 62rem; margin: 0 auto 1.5rem; }
.onb-head h1 { font-size: clamp(1.8rem, 1.3rem + 1.8vw, 2.4rem); }
.onb-head .lead { max-width: 46rem; }
.onb-head + .form-error, .form-error + .choice-grid { max-width: 62rem; margin-inline: auto; }
.wrap > .form-error { max-width: 62rem; margin-inline: auto; }
.choice-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; max-width: 62rem; margin-inline: auto; align-items: stretch; }
@media (min-width: 900px) { .choice-grid { grid-template-columns: 1fr 1fr; } }
.choice { display: flex; flex-direction: column; }
.choice h2 { font-size: 1.5rem; }
.choice form { display: flex; flex-direction: column; flex: 1; }
.choice .form-actions { margin-top: auto; padding-top: 0.5rem; }
.field-row { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: 0 1rem; }
@media (max-width: 480px) { .field-row { grid-template-columns: minmax(0, 1fr); } }
.choice-country { margin: 0 0 0.5rem; display: flex; gap: 0.6rem; color: var(--ink-2); }
.choice-country strong { color: var(--ink); }

/* ---- trial acceptance ---- */
.trial-grid { max-width: 44rem; margin-inline: auto; }
.trial-h2 { font-size: 1.3rem; margin-top: 1.75rem; }
.trial-steps { margin: 0 0 1.5rem; padding-left: 1.2rem; }
.trial-steps li { margin-bottom: 0.6rem; max-width: 62ch; }
.trial-change { margin: 1rem 0 0; }
.link-button { background: none; border: 0; padding: 0.4rem 0; font: inherit; color: var(--blue); text-decoration: underline; text-underline-offset: 0.18em; cursor: pointer; touch-action: manipulation; }
.link-button:hover { color: var(--blue); }
@media (max-width: 760px), (pointer: coarse) { .link-button { min-height: 2.75rem; } }
.trial-grid .btn-red { width: 100%; }
@media (min-width: 480px) { .trial-grid .btn-red { width: auto; } }

/* ---- one-time welcome notice on /forum ---- */
.welcome-note { margin: 0 0 1.25rem; padding: 1rem 1.25rem; background: #fff7e8; border: 1px solid #f0cf94; border-left: 6px solid var(--orange); border-radius: 10px; }
.welcome-note h2 { font-size: 1.35rem; margin: 0 0 0.25rem; }
.welcome-note p { margin: 0; max-width: 80ch; }
@media (max-width: 480px) { .steps { gap: 0.4rem 1rem; font-size: 0.85rem; } .steps li { gap: 0.35rem; } }

/* ---- monthly or yearly (PLAN_FORUM.md §17) ---- */
.plan-alt { margin: -0.6rem 0 1rem; color: var(--ink-2); font-size: 1.1rem; }
.plan-switch { margin: 1.25rem 0 0; }
.plan-switch .muted { margin: 0 0 0.6rem; max-width: 60ch; }
.plan-choice { border: 0; margin: 1.25rem 0 1.5rem; padding: 0; min-width: 0; }
.plan-choice legend { padding: 0; margin-bottom: 0.6rem; font-weight: 600; color: var(--ink); }
.plan-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 520px) { .plan-cards { grid-template-columns: minmax(0, 1fr); } }
.plan-card { position: relative; display: block; cursor: pointer; background: var(--paper); border: 1px solid var(--line); border-top: 6px solid var(--line); border-radius: 14px; padding: 1rem 1.1rem 1.1rem 3rem; touch-action: manipulation; }
.plan-card input { position: absolute; left: 1rem; top: 1.15rem; width: 1.35rem; height: 1.35rem; margin: 0; accent-color: var(--orange); }
.plan-card-body { display: flex; flex-direction: column; gap: 0.15rem; }
.plan-card-name { font-weight: 600; color: var(--ink); }
.plan-card-price { font: 400 2.2rem/1.1 var(--display); color: var(--ink); }
.plan-card-note { color: var(--ink-2); font-size: 0.92rem; }
.plan-card:has(input:checked) { border-color: var(--orange); border-top-color: var(--orange); background: #fff7e8; box-shadow: 0 0 0 1px var(--orange); }
.plan-card:has(input:focus-visible) { outline: 3px solid var(--blue); outline-offset: 2px; }
/* only the chosen plan's wording is visible: data-plan is set by plan.js, :has() covers no-JS */
.plan-form[data-plan="month"] .v-year, .plan-form[data-plan="year"] .v-month { display: none; }
.plan-form:has(input[value="year"]:checked) .v-month { display: none; }
.plan-form:has(input[value="year"]:checked) .v-year { display: inline; }
.plan-form:has(input[value="month"]:checked) .v-year { display: none; }
.plan-form:has(input[value="month"]:checked) .v-month { display: inline; }
