/* money-plans.css: the pricing page (pricing.html), rebuilt in place on 25 Sep 2026 (the site plan, section 7; round
 * 13, S1-3): the four products in the first screen, the three plans, the one comparison table, the two reports, the
 * questions and the checkout card.
 *
 * This file is page-scoped and loads LAST, after instrument.css, so it may only ADD rules: tokens.css stays law and
 * instrument.css stays the override. Every colour here is a token; every figure on the page comes from the catalogues
 * (pricing-plan.mjs, plan-catalog.js, report-catalog.js) and is guarded by tests/unit/money-plans.test.js.
 *
 * CSP: style-src 'self'. Classes only; no page carries an inline style attribute.
 */

/* ============================ The first screen: the four products ============================ */
.money-hero { min-height: auto; padding-top: 128px; padding-bottom: 40px; }
.money-hero .eyebrow { margin-bottom: var(--s-3); }
.money-hero h1 { max-width: 22ch; }
.money-hero .hero-copy { color: var(--muted); max-width: 58ch; }
.price-four { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: var(--s-5); }
.p4 {
  display: flex; flex-direction: column; gap: 8px; padding: 18px 18px 16px;
  border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface);
}
.p4.p4-plans { border-color: color-mix(in srgb, var(--pin) 45%, transparent); }
.p4 .p4-name { margin: 0; font-family: var(--font-display); font-size: 1.25rem; line-height: 1.1; color: var(--ink); }
.p4 .p4-price { margin: 0; font-family: var(--font-display); font-size: 1.9rem; line-height: 1; color: var(--ink); }
.p4 .p4-price small { margin-left: 6px; font-family: var(--font-body); font-size: .82rem; font-weight: 600; color: var(--faint); }
.p4 .p4-line { margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.5; }
.p4 .btn { margin-top: auto; width: 100%; }
@media (max-width: 1000px) {
  .price-four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .money-hero { padding-top: 110px; }
}
@media (max-width: 560px) {
  .price-four { grid-template-columns: 1fr; }
}

/* The gate line under the four: one of the two is visible at a time (plan-buy.js reads the gate). */
.gate-line { margin-top: 18px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: .95rem; }
.gate-line b { color: var(--ink); font-weight: 600; }
.gate-line.is-open { border-color: rgba(67, 213, 151, .45); color: var(--ink); }
.gate-line .gate-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); margin-right: 8px; vertical-align: 1px; }
.gate-line.is-open .gate-dot { background: var(--pin); box-shadow: 0 0 8px rgba(67, 213, 151, .5); }

/* ============================ The three plans ============================ */
.tiers { gap: 18px; }
.tier { padding: 0; overflow: hidden; }
.tier-head { padding: 18px 20px 12px; border-bottom: 1px solid var(--line); }
.tier .tn { font-size: 1.05rem; }
.tier .tp { font-size: 2.1rem; }
.tier .tf { margin-bottom: 0; }
.tier ul { padding: 12px 20px 0; margin-bottom: 12px; font-size: .92rem; }
.tier .btn { margin: 0 20px 20px; }
.tier .btn.btn-secondary { background: transparent; }
.tier.hot .tier-head { background: rgba(67, 213, 151, .05); }
@media (max-width: 860px) {
  .tiers { grid-template-columns: 1fr; gap: 14px; }
}

/* ============================ The comparison table in a window ============================ */
.cmp-window { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); overflow: hidden; }
.cmp-window .cmp-table th, .cmp-window .cmp-table td { padding: 12px 16px; font-size: .92rem; }
.cmp-window .cmp-table thead th { background: var(--surface-3); }
.cmp-window .cmp-table tbody tr:last-child td { border-bottom: 0; }
.cmp-window .cmp-table td.real { font-weight: 500; }
.cmp-window .cmp-stack { padding: 6px 12px 10px; }
.cmp-window .cmp-stack details { background: var(--surface-2); }
.cmp-legend { margin: 12px 4px 0; font-size: .85rem; color: var(--faint); max-width: 72ch; }

/* ============================ The two reports ============================ */
.report-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5); }
.rp-card { display: flex; flex-direction: column; gap: 10px; padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.rp-card h3 { margin: 0; font-size: 1.3rem; }
.rp-card .rp-price { margin: 0; font-family: var(--font-display); font-size: 1.9rem; line-height: 1; color: var(--ink); }
.rp-card .rp-price small { margin-left: 6px; font-family: var(--font-body); font-size: .82rem; font-weight: 600; color: var(--faint); }
.rp-card p { margin: 0; color: var(--muted); font-size: .95rem; }
.rp-card .btn { margin-top: auto; align-self: flex-start; }
@media (max-width: 760px) {
  .report-pair { grid-template-columns: 1fr; }
  .rp-card .btn { align-self: stretch; }
}

/* ============================ The questions, folded ============================ */
.pricing-questions { display: grid; gap: 10px; max-width: 820px; margin: 0 auto; }

/* ============================ The start card: the closed state, and the checkout for when it opens ============================ */
.start-card { max-width: 680px; padding: clamp(20px, 3vw, 30px); }
.start-card .pickgrid { margin-bottom: 8px; }
.start-card .ptile .pln { color: var(--muted); }
.start-card .steplab { color: var(--faint); margin-top: 18px; }
.start-card .steplab:first-child { margin-top: 0; }
/* once open, the checkout half's step label is its half's first child but not the card's: it keeps the 18 px below the
   charge note (whose own margin base.css zeroes, a last paragraph) */
.start-card .plan-checkout > .steplab:first-child { margin-top: 18px; }
.market-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.market-note { margin: -6px 0 6px; font-size: .84rem; color: var(--faint); }
/* the place the City field was read as, "86004 → Flagstaff, AZ" (the owner, 29 Sep; place-line.js): a neutral line under it */
.start-card .fplace { margin: 0; font-size: .8rem; line-height: 1.4; color: var(--faint); }
.who-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.start-card .totalline { margin: 10px 0 4px; }
.totalnote { margin: 0 0 14px; font-size: .82rem; color: var(--faint); }
/* The two doors while the plans are closed: the truth, and somewhere to go. */
.plan-doors { margin-top: 6px; padding: 16px 18px; border: 1px solid rgba(224, 166, 60, .45); border-radius: 12px; background: rgba(224, 166, 60, .06); }
/* the card's words; its step label keeps the step-label size and spacing (the site plan's section 10: it ran at 15 px) */
.plan-doors p:not(.steplab) { margin: 0; color: var(--muted); font-size: .95rem; }
.plan-doors p strong { color: var(--ink); font-weight: 600; }
.plan-doors .hero-actions { margin-top: 14px; }
.plan-doors .hero-actions .btn { width: auto; flex: 1 1 200px; }
/* the credit, the closed card's last line, under the two report buttons */
.plan-doors p.plan-doors-credit { margin-top: 12px; font-size: .88rem; color: var(--faint); }
.plan-checkout .field { margin-bottom: 12px; }
@media (max-width: 560px) {
  .market-grid, .who-grid { grid-template-columns: 1fr; }
  .plan-doors .hero-actions .btn { flex-basis: 100%; }
}

/* The sections a link jumps to (the four products' "See the plans", the plan buttons' start card, the site's
   /pricing#plans and /pricing#reports) clear the fixed header when they are jumped to. */
#plans, #compare, #reports, #questions, #start { scroll-margin-top: 4.5rem; }
