/* ReSurge Academy billing: plan page, return page, receipt, account subscription, paywall bits. Tokens only. */

#view > .billing { max-width: 40rem; }
#view > .billing--receipt { max-width: 46rem; }

.billing__lede { font-family: var(--font-serif); font-size: var(--fs-20); line-height: 1.5; color: var(--ink-2); margin-top: var(--sp-5); }
.billing__action { margin-top: var(--sp-6); }
.billing .banner { margin-top: var(--sp-5); }
.billing .page-head { margin-bottom: var(--sp-6); }

/* ---------- plan page ---------- */
.plan-form { margin-top: var(--sp-6); padding: var(--sp-6); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-4); display: grid; gap: var(--sp-4); }
.plan-form .field + .field { margin-top: 0; }
.plan-form .banner { margin-top: 0; }
.plan-form__alt { text-align: center; margin-top: calc(-1 * var(--sp-1)); }
.plan-link {
  min-height: var(--tap); padding: 0 var(--sp-3); background: none; border: 0; cursor: pointer;
  font: inherit; font-size: var(--fs-14); color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px;
}
.plan-link:hover { color: var(--ink); }
.plan-link:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--r-2); }
.plan-facts { margin-top: var(--sp-8); }
.plan-facts h2 { font-size: var(--fs-20); margin-bottom: var(--sp-4); }
.plan-facts__list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--sp-3); color: var(--ink-2); font-size: var(--fs-16); line-height: var(--lh-ui); }
.plan-facts__list li { padding-left: var(--sp-4); border-left: 2px solid var(--line); }
.plan-facts__list strong { color: var(--ink); }

/* ---------- return page ---------- */
.content-wait { display: grid; justify-items: center; gap: var(--sp-3); padding: var(--sp-12) var(--sp-4); }
.billing--return .content-wait { justify-items: start; padding-left: 0; }

/* ---------- receipt ---------- */
.receipt { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-4); padding: var(--sp-6); }
.receipt__nav { margin-bottom: var(--sp-4); }
.receipt__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--sp-3); align-items: flex-start; }
.receipt__head h1 { font-size: var(--fs-24); }
.receipt__parties { display: grid; gap: var(--sp-5); margin: var(--sp-6) 0; }
.receipt__parties h2 { font-size: var(--fs-13); font-family: var(--font-sans); letter-spacing: var(--tr-label); text-transform: uppercase; color: var(--ink-3); margin-bottom: var(--sp-1); }
.receipt__parties p { line-height: var(--lh-ui); overflow-wrap: anywhere; }
.receipt__table { margin-top: var(--sp-4); }
.receipt__amt { text-align: right; white-space: nowrap; }
.receipt__total td { font-weight: var(--fw-semi); border-top: 2px solid var(--line-strong); }
.receipt__ref { margin-top: var(--sp-5); overflow-wrap: anywhere; }
.receipt__actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-5); }
@media (min-width: 640px) { .receipt__parties { grid-template-columns: 1fr 1fr; } }

@media print {
  #rail, #topbar, #tabbar, #offline, #toasts, .receipt__actions, .receipt__nav, .skip { display: none !important; }
  body { background: #fff !important; background-image: none !important; }
  #app, #view { display: block !important; padding: 0 !important; }
  #view > .billing--receipt { max-width: none; }
  .receipt { border: 0; padding: 0; background: #fff; color: #000; }
}

/* ---------- account: subscription ---------- */
.sub-status { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sp-2) var(--sp-3); color: var(--ink-2); line-height: var(--lh-ui); }
.sub-receipts__h { margin-top: var(--sp-6); font-size: var(--fs-16); }
.sub-receipts { list-style: none; padding: 0; margin: var(--sp-2) 0 0; border-top: 1px solid var(--line); }
.sub-receipts a {
  display: grid; grid-template-columns: 1fr auto; gap: 0 var(--sp-4); align-items: center;
  min-height: var(--tap); padding: var(--sp-2) 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none;
}
.sub-receipts a:hover { background: var(--bg-tint); }
.sub-receipts .t-small { grid-column: 1; }
.sub-receipts .num:last-of-type { grid-column: 2; grid-row: 1 / span 2; }
.sub-receipts .chip { grid-column: 1; justify-self: start; }

/* ---------- paywall ---------- */
.gate { display: grid; gap: var(--sp-3); justify-items: start; padding: var(--sp-5); margin-bottom: var(--sp-5); background: var(--bg-tint); border: 1px solid var(--line); border-radius: var(--r-4); }
.gate__text { color: var(--ink-2); line-height: var(--lh-ui); }
.gate__soon { margin: 0; }
.learn-ladder__row.is-gated { cursor: pointer; }

/* ---------- legal links and public page back link ---------- */
.legal-links { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-4); margin-top: var(--sp-8); font-size: var(--fs-13); }
.legal-links a { color: var(--ink-3); text-decoration: underline; text-underline-offset: 3px; min-height: 32px; display: inline-flex; align-items: center; }
.legal-links a:hover { color: var(--ink); }
.pub-back { padding: var(--sp-4) var(--sp-5); }
@media (min-width: 1024px) { .pub-back { padding: var(--sp-6) var(--sp-10) 0; } }
