/* ═══════════════════════════════════════
   WOBAZI — /pricing (views/pages/pricing.ejs)
   Site tokens only (--gold, --text, --bg-card, --border, --m*), so light mode follows.
   Bump ?v= in pricing.ejs on every change.
═══════════════════════════════════════ */

.pr-page .seo-main.pr { max-width: 1040px; }

.pr .sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ── Hero ── */
.pr-hero { text-align: center; max-width: 640px; margin: 8px auto 28px; }
.pr-eyebrow {
  color: var(--gold);
  font-size: 13px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  margin: 0 0 10px;
}
.pr-hero h1 { color: var(--text); font-size: clamp(26px, 5vw, 38px); line-height: 1.15; margin: 0 0 12px; text-wrap: balance; }
.pr-sub { color: var(--m7); font-size: 16px; line-height: 1.55; margin: 0 0 20px; text-wrap: pretty; }
.pr-hero-cta { text-decoration: none; justify-content: center; max-width: 100%; }
.pr-fine { color: var(--m5); font-size: 13px; line-height: 1.5; margin: 12px auto 0; max-width: 34em; }
.pr-state { color: var(--m8); font-size: 15px; margin: 4px 0 0; }
.pr-state a, .pr-legal a { color: var(--gold); }
.pr-notice {
  display: inline-block;
  background: var(--gold-dim); color: var(--text);
  border-radius: var(--radius-sm); padding: 8px 14px; font-size: 14px; margin: 0 0 16px;
}
.pr-notice-muted { background: var(--w08, rgba(255,255,255,0.06)); color: var(--m7); }

/* ── Currency toggle ── */
.pr-toggle {
  display: flex; width: max-content; margin: 0 auto 24px;
  border: 1px solid var(--border); border-radius: 100px; padding: 4px; gap: 4px;
}
.pr-toggle-btn {
  font: inherit; font-size: 14px; font-weight: 600;
  min-height: 40px; padding: 0 18px; border-radius: 100px;
  border: 0; background: transparent; color: var(--m6); cursor: pointer;
}
.pr-toggle-btn[aria-pressed="true"] { background: var(--gold); color: #07070f; }
.pr-toggle-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Both currencies are in the markup; body[data-currency] shows one. */
.pr-page[data-currency="thb"] .pr-amt[data-cur="usd"],
.pr-page[data-currency="usd"] .pr-amt[data-cur="thb"] { display: none; }

/* ── Cards ── */
.pr-cards { display: grid; gap: 16px; grid-template-columns: 1fr; align-items: stretch; }
@media (min-width: 820px) { .pr-cards { grid-template-columns: repeat(3, 1fr); } }

.pr-card {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 22px 22px;
  scroll-margin-top: 90px;
}
.pr-card-featured { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold-dim), 0 12px 40px rgba(240,192,64,0.08); }
.pr-card-picked { outline: 2px solid var(--gold); outline-offset: 3px; }
.pr-badge {
  position: absolute; top: -12px; left: 22px; margin: 0;
  background: var(--gold); color: #07070f;
  font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 100px;
}
.pr-card-name { color: var(--text); font-size: 18px; font-weight: 600; margin: 0 0 12px; }
.pr-price { color: var(--text); font-size: 38px; font-weight: 700; line-height: 1; margin: 0 0 6px; font-variant-numeric: tabular-nums; }
.pr-card-featured .pr-price { color: var(--gold); }
.pr-period { color: var(--m5); font-size: 13px; margin: 0 0 18px; min-height: 1.4em; }
.pr-list { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 10px; flex: 1; }
.pr-list li { position: relative; padding-left: 22px; color: var(--m82); font-size: 14px; line-height: 1.45; }
.pr-list li::before { content: '✓'; position: absolute; left: 0; top: 0; color: var(--gold); font-weight: 700; }

.pr-btn {
  display: flex; align-items: center; justify-content: center; text-align: center;
  width: 100%; min-height: 48px; padding: 10px 18px;
  font: inherit; font-size: 15px; font-weight: 700; text-decoration: none;
  border-radius: 100px; border: 0; cursor: pointer;
  background: linear-gradient(135deg, #f0c040, #e08020); color: #1a0a00;
}
.pr-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.pr-btn[disabled] { opacity: 0.6; cursor: progress; }
.pr-btn-ghost { background: transparent; color: var(--gold); border: 1px solid var(--gold); }
.pr-btn-current { background: transparent; color: var(--m6); border: 1px solid var(--border); cursor: default; }
.pr-btn-quiet { color: var(--m45); }

.pr-error { color: #ef4444; text-align: center; font-size: 14px; margin: 16px 0 0; }

/* ── Comparison table ── */
.pr-compare { margin: 48px 0 0; }
.pr-compare h2, .pr-redeem h2 { color: var(--text); font-size: 20px; margin: 0 0 14px; text-align: center; }
.pr-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); }
.pr-table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 14px; }
.pr-table th, .pr-table td { padding: 12px 10px; border-bottom: 1px solid var(--border); text-align: center; color: var(--m82); }
.pr-table tbody tr:last-child th, .pr-table tbody tr:last-child td { border-bottom: 0; }
.pr-table thead th { color: var(--text); font-weight: 600; font-size: 13px; background: var(--gold-dim); }
.pr-table tbody th { text-align: left; font-weight: 500; color: var(--text); position: sticky; left: 0; background: var(--bg-card); min-width: 150px; }
.pr-table thead th:first-child { position: sticky; left: 0; background: var(--bg-card); }
.pr-yes { color: var(--gold); font-weight: 700; }
.pr-no { color: var(--m3); }

/* Below ~600px a wide table can't fit without horizontal scroll — shrink and wrap instead of scrolling. */
@media (max-width: 599px) {
  .pr-table-wrap { overflow-x: hidden; }
  .pr-table { min-width: 0; width: 100%; table-layout: fixed; font-size: 11px; }
  .pr-table th, .pr-table td { padding: 8px 4px; word-break: break-word; }
  .pr-table thead th { font-size: 10px; padding: 8px 3px; }
  .pr-table tbody th, .pr-table thead th:first-child {
    position: static; width: 30%; min-width: 0; padding-left: 4px;
  }
}

.pr-rules {
  color: var(--gold); text-align: center; font-size: 13px; font-weight: 600; letter-spacing: 0.02em;
  margin: 16px auto 0; max-width: 40em; line-height: 1.6;
}
.pr-compare .pr-fine { text-align: center; }

/* ── Invite code ── */
.pr-redeem { margin: 40px auto 0; max-width: 420px; }
.pr-redeem-form { display: flex; gap: 8px; }
.pr-redeem-form input {
  flex: 1; min-width: 0; min-height: 48px; padding: 0 16px;
  font: inherit; font-size: 16px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text); background: var(--bg-card);
  border: 1px solid var(--border); border-radius: 100px;
}
.pr-redeem-form input:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.pr-redeem-form .pr-btn { width: auto; flex: 0 0 auto; }
.pr-redeem-msg { text-align: center; font-size: 14px; color: var(--m8); margin: 10px 0 0; }
.pr-redeem-msg.is-error { color: #ef4444; }

.pr-legal { text-align: center; margin-top: 40px; }

/* ── /billing (views/pages/billing.ejs) ── */
.bl-page .seo-main.bl { max-width: 560px; }
.bl-hero { margin-bottom: 20px; }
.bl-notice { display: block; text-align: center; }
.bl-card { padding-top: 28px; }
.bl-badge { left: 22px; }
.bl-facts { margin: 4px 0 18px; display: grid; gap: 0; }
.bl-facts > div {
  display: flex; justify-content: space-between; gap: 16px; align-items: baseline;
  padding: 11px 0; border-bottom: 1px solid var(--border);
}
.bl-facts > div:last-child { border-bottom: 0; }
.bl-facts dt { color: var(--m6); font-size: 14px; }
.bl-facts dd { margin: 0; color: var(--text); font-size: 15px; font-weight: 600; text-align: right; }
.bl-cancel dd { color: var(--gold); }
.bl-note { color: var(--m8); font-size: 14px; line-height: 1.55; margin: 0 0 18px; }
.bl-warn { color: #ef4444; }
.bl-actions { margin: 0; }
.bl-fine { text-align: center; margin-top: 10px; }

/* "Most popular" (Yearly): the Premium purple → pink, on the badge and as the card's outline
   (a gradient border via padding-box / border-box, same trick as the tier badges). */
.pr-card-featured {
  border: 2px solid transparent;
  background:
    linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
    linear-gradient(135deg, #a855f7, #ec4899) border-box;
  box-shadow: 0 12px 44px rgba(168, 85, 247, 0.18), 0 0 0 1px rgba(236, 72, 153, 0.15);
}
.pr-card-featured .pr-badge { background: linear-gradient(90deg, #a855f7, #ec4899); color: #fff; }
.pr-card-picked.pr-card-featured { outline-color: #ec4899; }
