/* ==========================================================================
   Pricing and account
   ========================================================================== */

/* --------------------------------------------------------------------------
   Billing cycle switch — shared by the pricing page and the account page
   -------------------------------------------------------------------------- */
.cycle-row {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.cycle {
  display: inline-flex;
  border: 1px solid var(--ink);
  padding: 3px;
  gap: 3px;
}
.cycle__option {
  padding: 10px 18px;
  font-size: var(--t-fine);
  font-weight: 600;
  color: var(--ink-body);
  white-space: nowrap;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.cycle__option:hover { color: var(--ink); }
.cycle__option.is-on { background: var(--ink); color: #fff; }

@media (max-width: 480px) {
  .cycle { width: 100%; }
  .cycle__option { flex: 1; padding-inline: 10px; text-align: center; }
}

/* --------------------------------------------------------------------------
   Plan cards
   -------------------------------------------------------------------------- */
.plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2vw, 24px);
  align-items: stretch;
}
@media (max-width: 1000px) { .plans { grid-template-columns: 1fr; max-width: 560px; } }

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(24px, 2.8vw, 36px);
  border: 1px solid var(--line-strong);
  background: var(--paper);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.plan:hover { border-color: var(--ink); box-shadow: var(--lift-card); }
.plan--featured { border-color: var(--ink); box-shadow: var(--lift-panel); }
.plan--current { border-color: var(--accent); }

.plan__flag {
  position: absolute;
  top: 0; right: clamp(20px, 2.4vw, 32px);
  transform: translateY(-50%);
  background: var(--ink);
  color: #fff;
  font-family: var(--font-label);
  font-size: .625rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 5px 12px;
}
.plan__flag--current { background: var(--accent); right: auto; left: clamp(20px, 2.4vw, 32px); }

.plan__price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.plan__figure {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.25rem, 1.8rem + 2vw, 3rem);
  line-height: 1;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.plan__custom {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.75rem;
  letter-spacing: -.02em;
}
.plan__unit { font-size: var(--t-fine); color: var(--ink-muted); }
/* Both rates, on every card, whatever the toggle says. The toggle decides which
   one leads — it should never be the only one you can see. */
.plan__compare {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0;
  font-size: var(--t-fine);
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}
.plan__compare b { font-weight: 600; }
.plan__compare .is-on { color: var(--ink); }
.plan__compare-sep { color: var(--line-control); }

.plan__saving {
  font-size: var(--t-fine);
  color: var(--accent);
  font-weight: 600;
  margin: 0;
  min-height: 1.2em;
}
.plan__saving--empty { color: var(--ink-muted); font-weight: 400; }

.plan__list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: var(--t-body);
  color: var(--ink-body);
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.plan__list li {
  position: relative;
  padding-left: 20px;
  line-height: 1.45;
}
.plan__list li::before {
  content: '';
  position: absolute;
  left: 2px; top: .52em;
  width: 8px; height: 1.5px;
  background: var(--accent);
}

/* --------------------------------------------------------------------------
   Product tabs
   --------------------------------------------------------------------------
   Six products is more than fits on a phone, so the row scrolls sideways
   rather than wrapping into a block of buttons that pushes the prices under
   the fold.
   -------------------------------------------------------------------------- */
.ptabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(28px, 3vw, 44px);
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.ptabs::-webkit-scrollbar { display: none; }

.ptab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  scroll-snap-align: start;
  padding: 14px 18px;
  font-size: var(--t-body);
  font-weight: 600;
  color: var(--ink-muted);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.ptab:hover { color: var(--ink); }
.ptab.is-on { color: var(--ink); border-bottom-color: var(--accent); }

.ptab__idx {
  font-family: var(--font-label);
  font-size: .6875rem;
  font-weight: 700;
  color: var(--accent);
}
.ptab.is-on .ptab__idx { color: var(--accent); }

@media (max-width: 700px) {
  .ptab { padding: 12px 14px; font-size: var(--t-meta); }
  .ptab__idx { display: none; }
}

/* --------------------------------------------------------------------------
   The board for the selected product
   -------------------------------------------------------------------------- */
.pboard { display: flex; flex-direction: column; gap: clamp(24px, 3vw, 36px); }

.pboard__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  flex-wrap: wrap;
}
.pboard__head > div { display: flex; flex-direction: column; gap: 12px; }
.pboard__basis { flex: none; }

/* --------------------------------------------------------------------------
   Metered rates behind a product's plans
   -------------------------------------------------------------------------- */
.rates {
  display: flex;
  flex-direction: column;
  gap: 14px;
  border: 1px solid var(--line-strong);
  padding: clamp(20px, 2.4vw, 28px);
  background: var(--wash);
}
.rates__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(14px, 2vw, 24px);
}
.rate {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: 16px;
  border-right: 1px solid var(--line);
}
.rate:last-child { border-right: 0; padding-right: 0; }
.rate__label { font-size: var(--t-fine); color: var(--ink-muted); }
.rate__price {
  font-size: 1.0625rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.rate__suffix { font-size: var(--t-fine); font-weight: 400; color: var(--ink-muted); }
.rates__note { max-width: 46rem; }

@media (max-width: 700px) {
  .rates__grid { grid-template-columns: 1fr; gap: 0; }
  .rate {
    flex-direction: row;
    justify-content: space-between;
    align-items: baseline;
    padding: 12px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .rate:last-child { border-bottom: 0; padding-bottom: 0; }
}

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */
.faq { display: flex; flex-direction: column; }
.faq__item { border-top: 1px solid var(--line-strong); }
.faq__item:last-child { border-bottom: 1px solid var(--line-strong); }
.faq__q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 22px 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1rem, .94rem + .3vw, 1.1875rem);
  transition: color var(--dur) var(--ease);
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q:hover { color: var(--accent); }
.faq__cue {
  flex: none;
  font-family: var(--font-label);
  font-size: 1.125rem;
  color: var(--ink-muted);
  transition: transform var(--dur) var(--ease);
}
.faq__item[open] .faq__cue { transform: rotate(45deg); color: var(--accent); }
.faq__a { padding-bottom: 24px; max-width: 46rem; }

/* --------------------------------------------------------------------------
   Pilot band
   -------------------------------------------------------------------------- */
.trial {
  display: grid;
  grid-template-columns: 1.4fr auto;
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}
.trial__actions { display: flex; flex-direction: column; gap: 12px; min-width: 220px; }
@media (max-width: 860px) {
  .trial { grid-template-columns: 1fr; }
  .trial__actions { flex-direction: row; flex-wrap: wrap; min-width: 0; }
  .trial__actions .btn { flex: 1 1 200px; }
}

/* --------------------------------------------------------------------------
   Account
   -------------------------------------------------------------------------- */
.acct-lede {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
  padding-block: clamp(40px, 6vw, 72px) clamp(24px, 3vw, 36px);
}

.acct-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: clamp(24px, 3vw, 40px);
  align-items: start;
  padding-bottom: var(--band);
}
@media (max-width: 1000px) { .acct-grid { grid-template-columns: 1fr; } }

.acct-summary {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: clamp(20px, 2.4vw, 28px);
  border: 1px solid var(--ink);
  background: var(--paper);
  box-shadow: var(--lift-panel);
}
@media (max-width: 1000px) { .acct-summary { position: static; } }

.acct-summary__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.acct-figures {
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-block: 1px solid var(--line);
  padding-block: 18px;
}
.acct-figure { display: flex; flex-direction: column; gap: 3px; }
.acct-figure__value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1.05;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}

.acct-lines { display: flex; flex-direction: column; gap: 8px; }
.acct-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: var(--t-body);
  color: var(--ink-body);
  font-variant-numeric: tabular-nums;
}
.acct-line--total {
  border-top: 1px solid var(--line);
  padding-top: 10px;
  color: var(--ink);
  font-weight: 600;
}

.acct-main { display: flex; flex-direction: column; gap: clamp(20px, 2.4vw, 32px); }

.acct-block {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(20px, 2.4vw, 28px);
  border: 1px solid var(--line-strong);
  background: var(--paper);
}
.acct-block--danger { border-color: var(--line-alert); background: var(--tint-alert); }

.acct-plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 620px) { .acct-plans { grid-template-columns: 1fr; } }

.acct-plan {
  display: flex;
  flex-direction: column;
  gap: 5px;
  text-align: left;
  padding: 16px;
  border: 1px solid var(--line-strong);
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.acct-plan:hover { border-color: var(--ink); }
.acct-plan.is-on { border-color: var(--ink); background: var(--wash); }
.acct-plan__name { font-family: var(--font-display); font-weight: 700; font-size: 1rem; letter-spacing: -.01em; }
.acct-plan__price { font-size: var(--t-body); font-weight: 600; font-variant-numeric: tabular-nums; }

.acct-addons { display: flex; flex-direction: column; gap: 10px; }
.acct-addon {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.acct-addon.is-on { border-color: var(--ink); background: var(--wash); }
.acct-addon__end { display: flex; align-items: center; gap: 12px; flex: none; }
.acct-addon__price { font-size: var(--t-fine); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }

@media (max-width: 560px) {
  .acct-addon { flex-direction: column; align-items: flex-start; gap: 10px; }
  .acct-addon__end { width: 100%; justify-content: space-between; }
}

.acct-usage {
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 14px;
}

.acct-invoices { display: flex; flex-direction: column; }
.acct-invoice {
  display: grid;
  grid-template-columns: 1fr 1fr auto auto auto;
  gap: 12px;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--t-body);
  font-variant-numeric: tabular-nums;
}
.acct-invoice:last-child { border-bottom: 0; }
.acct-invoice__id { font-family: var(--font-label); font-size: var(--t-fine); }

@media (max-width: 620px) {
  .acct-invoice { grid-template-columns: 1fr auto auto; row-gap: 6px; }
  .acct-invoice__id { grid-column: 1 / -1; color: var(--ink-muted); }
}

/* ==========================================================================
   Cart
   ========================================================================== */

.site-head__cart { display: flex; align-items: center; }

.cart-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--t-fine);
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  transition: color var(--dur) var(--ease);
}
.cart-button:hover { color: var(--accent); }
.cart-button__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 99px;
  background: var(--accent);
  color: #fff;
  font-size: .625rem;
  font-variant-numeric: tabular-nums;
}

/* The cart sits above the demo drawer, since opening one closes the other and
   whichever was asked for last should be the one on top. */
.drawer--cart { z-index: 102; }
.scrim--cart { z-index: 101; }

.cart__empty {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
}

.cart__cycle {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.cart__lines { display: flex; flex-direction: column; }
.cart__line {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.cart__line-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cart__line-name { font-size: var(--t-body); font-weight: 600; }
.cart__line-amount {
  font-size: var(--t-body);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.cart__remove {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.125rem;
  color: var(--ink-muted);
  border-radius: 50%;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.cart__remove:hover { background: var(--tint-alert); color: var(--accent); }

.cart__totals {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 0;
}

.cart__schedule {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  background: var(--wash);
  margin-bottom: 20px;
}
.cart__dates {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: var(--t-fine);
  color: var(--ink-body);
}
.cart__dates li {
  padding-left: 14px;
  position: relative;
  line-height: 1.5;
}
.cart__dates li::before {
  content: '';
  position: absolute;
  left: 0; top: .55em;
  width: 6px; height: 1.5px;
  background: var(--accent);
}
.cart__dates b { color: var(--ink); }

.cart__note { margin-top: 14px; }

/* add-on cards gain an action row once they are addable */
.card--on { border-color: var(--ink); background: var(--wash); }
.card__actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 10px;
}
.card__actions .card__foot { margin-top: 0; }

@media (max-width: 700px) {
  .cart-button span:first-child { display: none; }
  .cart__line { grid-template-columns: 1fr auto; row-gap: 6px; }
  .cart__remove { grid-row: 1; grid-column: 2; }
  .cart__line-amount { grid-column: 1 / -1; text-align: left; }
}

/* ==========================================================================
   Checkout page
   ==========================================================================
   Two columns: how you want to pay, and what you are paying for. On a phone the
   summary comes first — "what am I about to be charged" is the question you want
   answered before you reach for a card.
   ========================================================================== */

.checkout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 420px);
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
  padding-block: clamp(40px, 6vw, 80px) var(--band);
}
.checkout__pay { display: flex; flex-direction: column; gap: clamp(20px, 2.4vw, 28px); }

.checkout__sum {
  position: sticky;
  top: calc(var(--header-h) + 20px);
}

@media (max-width: 1000px) {
  .checkout { grid-template-columns: 1fr; }
  .checkout__sum { position: static; order: -1; }
}

/* --- payment blocks ------------------------------------------------------- */
.pay-block { display: flex; flex-direction: column; gap: 12px; }
.pay-block__title {
  font-family: var(--font-label);
  font-size: var(--t-eyebrow);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0;
}

.pay-or {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: var(--t-fine);
  color: var(--ink-muted);
}
.pay-or::before, .pay-or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* --- wallets -------------------------------------------------------------
   Neutral buttons, not redrawn Apple Pay / Google Pay marks: both brands
   require their own supplied assets and forbid recreating them. Stripe's
   PaymentRequestButton renders the compliant marks once a key is configured. */
.wallets { display: flex; flex-direction: column; gap: 10px; }
.wallets:empty { display: none; }

.wallet {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  border-radius: 8px;
  font-size: var(--t-body);
  font-weight: 600;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.wallet:active { transform: translateY(1px); }
.wallet:hover { opacity: .88; }
.wallet--apple  { background: #000; color: #fff; }
/* Google's own button colours, not ours — the brand palette does not apply to
   somebody else's mark. */
.wallet--google { background: #fff; color: #3c4043; border: 1px solid #dadce0; }
.wallet__glyph { font-size: 1.05rem; line-height: 1; }

/* --- card ---------------------------------------------------------------- */
.pay-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid var(--line-strong);
  padding: 16px;
  background: var(--paper);
}
.pay-card__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

/* Stripe mounts its iframe here. Unconfigured, it holds inert placeholders —
   never real inputs, so nobody can type a live card number into a demo. */
.pay-card__mount {
  min-height: 46px;
  border: 1px solid var(--line-control);
  padding: 13px 12px;
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--paper);
}
.pay-card__placeholder {
  font-family: var(--font-label);
  font-size: .8125rem;
  color: var(--ink-faint);
  letter-spacing: .06em;
  user-select: none;
}
.pay-card__placeholder:first-child { flex: 1; }

.pay-card__notice {
  font-size: var(--t-fine);
  line-height: 1.5;
  color: var(--ink-body);
  background: var(--tint-info);
  border-left: 2px solid var(--status-info);
  padding: 10px 12px;
  margin: 0;
}

.pay-submit { width: 100%; min-height: 52px; }
.pay-legal { line-height: 1.55; }

.pay-trust {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

/* --- order summary ------------------------------------------------------- */
.sum {
  display: flex;
  flex-direction: column;
  gap: 18px;
  border: 1px solid var(--ink);
  padding: clamp(20px, 2.4vw, 28px);
  background: var(--paper);
  box-shadow: var(--lift-panel);
}
.sum__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.sum__lines { display: flex; flex-direction: column; }
.sum__line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--t-body);
}
.sum__amount { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sum__totals { display: flex; flex-direction: column; gap: 8px; }
.sum__when {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--wash);
  padding: 14px;
}
.sum__foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

@media (max-width: 700px) {
  .checkout { padding-block: 28px var(--band-sm); }
  /* 52px is already a comfortable target; on a phone the pay button is the one
     control that must not be missed. */
  .wallet, .pay-submit { min-height: 54px; }
  .sum { padding: 18px; }
  .sum__when { padding: 12px; }
}

@media (max-width: 560px) {
  .pay-card__mount { flex-wrap: wrap; gap: 8px 14px; }
  .pay-card__placeholder:first-child { flex: 1 0 100%; }
  .pay-trust { gap: 10px 14px; }
  .sum__line { flex-wrap: wrap; row-gap: 2px; }
  .sum__amount { width: 100%; }
  .sum__foot { flex-direction: column; align-items: flex-start; gap: 10px; }
  .ptabs { margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
}
