/* ─── Pricing / purchase portal ───────────────────────────────────────
   Loaded ONLY by pricing.html and thank-you.html. The plan cards
   themselves reuse .price-card from main.css so the standalone page and
   the homepage section can never drift apart visually — this file adds
   only what those two pages need on top: the comparison table, the
   waitlist-state block, and the licence receipt.
   Nothing here is loaded by any other page. */

/* ── Plan cards on the standalone page ── */
.pricing-page { background: var(--paper); padding: 72px var(--side-pad) 8px; }
.pricing-page__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  max-width: 840px;
  margin: 0 auto;
}

/* The money block. Hidden in HTML; commerce.js reveals it only in a
   selling phase — so a failed script shows no price, never a broken one. */
.price-card__money[hidden] { display: none !important; }

/* Waitlist stand-in that occupies the price slot before launch. */
.price-card__soon {
  font-family: var(--font-head);
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.15;
}
.price-card__soon-sub {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-top: 10px;
  letter-spacing: -0.01em;
}

/* ── Comparison table ── */
.compare { background: var(--paper); padding: 76px var(--side-pad) 96px; }
.compare__head { max-width: 640px; margin: 0 auto 40px; text-align: center; }
.compare__head .eyebrow { justify-content: center; }
.compare__head h2 {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.032em;
  line-height: 1.1;
  margin: 0 0 14px;
}
.compare__head p {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink2);
  margin: 0;
}

/* Wide content scrolls inside its own box — the page body never does.
   `contain: paint` is load-bearing, not decoration: without it the table's
   min-width below propagates out through this box and widens the whole
   document on narrow screens (measured 522px against a 375px viewport),
   which in turn drags every position:fixed element off-screen. overflow-x
   alone does NOT stop that. Verified at 375px. */
.compare__scroll {
  max-width: 880px;
  margin: 0 auto;
  overflow-x: auto;
  overflow-y: hidden;
  contain: paint;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.compare__table {
  width: 100%;
  min-width: 540px;
  border-collapse: collapse;
  font-size: 15px;
}

.compare__table th,
.compare__table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--rule2);
  vertical-align: middle;
}
.compare__table tr:last-child th,
.compare__table tr:last-child td { border-bottom: 0; }

/* Column head.
   Deliberately NOT position:sticky — this box scrolls horizontally only, so a
   top-stuck header never engages, and asking for it forces overflow-y to
   compute as auto and adds a phantom vertical scrollport. */
.compare__table thead th {
  background: var(--tint);
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink);
}
.compare__table thead th:first-child { color: var(--muted); font-weight: 600; }
.compare__col { width: 21%; text-align: center !important; }
.compare__col--paid { background: rgba(245, 158, 11, 0.09); }

/* Group rows */
.compare__group th {
  background: var(--paper2);
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 11px;
  padding-bottom: 11px;
}

/* Feature rows */
.compare__table tbody th {
  font-family: var(--font-ui);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.compare__table tbody td {
  text-align: center;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink2);
  letter-spacing: -0.01em;
}
.compare__table tbody td.is-paid { background: rgba(245, 158, 11, 0.06); }

.compare__note {
  display: block;
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 400;
  color: var(--muted);
  margin-top: 3px;
  letter-spacing: 0;
}

/* Yes / no marks — the glyph carries meaning, so it needs a text label
   for screen readers rather than a bare tick. */
.mark-yes,
.mark-no { display: inline-flex; align-items: center; justify-content: center; }
.mark-yes { color: var(--beat-green); }
.mark-no { color: var(--muted); opacity: 0.5; }

.compare__foot {
  max-width: 880px;
  margin: 26px auto 0;
  text-align: center;
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.6;
}
.compare__foot a {
  color: var(--orange-text);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(217, 99, 58, 0.3);
}
.compare__foot a:hover { border-bottom-color: var(--orange-text); }

/* ── Reassurance strip ── */
.assure { background: var(--tint); border-top: 1px solid var(--rule); padding: 64px var(--side-pad); }
.assure__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  max-width: 1000px;
  margin: 0 auto;
}
.assure__item h3 {
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 12px 0 8px;
  color: var(--ink);
}
.assure__item p {
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink2);
  margin: 0;
}
.assure__icon { color: var(--amber-text); }

/* ── Licence receipt (thank-you.html) ── */
.receipt { background: var(--paper); padding: 72px var(--side-pad) 96px; }
.receipt__inner { max-width: 640px; margin: 0 auto; }

.receipt__key-box {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
  padding: 26px;
  margin: 0 0 32px;
}
.receipt__key-label {
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 12px;
}
.receipt__key-row { display: flex; gap: 12px; align-items: stretch; flex-wrap: wrap; }
.receipt__key {
  flex: 1 1 260px;
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  letter-spacing: 0.02em;
  color: var(--ink);
  background: var(--paper2);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  overflow-x: auto;
  white-space: nowrap;
  line-height: 1.4;
}
.receipt__copy { flex: 0 0 auto; }
.receipt__copied {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  color: var(--beat-green);
  margin: 12px 0 0;
}

.receipt__steps { counter-reset: step; margin: 0 0 36px; padding: 0; list-style: none; }
.receipt__steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 20px 46px;
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--ink2);
}
.receipt__steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--cta);
  color: var(--cta-text);
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.receipt__steps strong { color: var(--ink); font-weight: 700; }

.receipt__downloads { display: flex; gap: 12px; flex-wrap: wrap; margin: 0 0 12px; }
.receipt__version { font-size: 13px; color: var(--muted); margin: 0; }

/* ── Responsive ── */
@media (max-width: 860px) {
  .assure__grid { grid-template-columns: 1fr; gap: 24px; max-width: 460px; }
}

@media (max-width: 760px) {
  .pricing-page { padding-top: 52px; }
  .pricing-page__grid { grid-template-columns: 1fr; max-width: 420px; }
  .compare { padding: 56px var(--side-pad) 72px; }
  .compare__head h2 { font-size: 28px; }
  .compare__table th,
  .compare__table td { padding: 12px 14px; }
  .receipt { padding: 52px var(--side-pad) 72px; }
  .receipt__key-box { padding: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .receipt__copied { transition: none; }
}
