/* Canonical plan cards: the pricing toggle + plan cards used by the landings AND the billing page.
   Single source: change the look here, nowhere else. The compact sizes come from the
   `.landing--public-compact` / `.landing--amazon-compact` ancestors the landing uses
   (billing wraps its plans in the same classes), so both render identically. */
.price-card,
.price-toggle-wrap,
.pricing-grid {
  --lp-fg: #16191e;
  --lp-muted: #655f71;
  --lp-border: #e6e5ed;
  --lp-border-strong: #ceccdb;
  --lp-primary: #2645c0;
  --lp-primary-strong: #253682;
  --lp-panel: #ffffff;
  --lp-card-shadow: 0 10px 28px rgba(34, 38, 58, 0.08);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 30px;
}
.price-card {
  border: 1px solid var(--lp-border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--lp-card-shadow);
}
.price-card {
  padding: 24px;
}
.price-card h3 {
  margin: 0;
  font-size: 1rem;
}
.price-card p {
  color: var(--lp-muted);
  line-height: 1.58;
}
.price-card p {
  margin: 8px 0 0;
  font-size: 0.91rem;
}
/* Shared pricing heading, switch and aurora stage (Billing and public plans). */
.price-toggle-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 32px; }
.pricing-plans-head { margin: 26px 0 24px; text-align: center; }
.pricing-plans-head h2 { font-size: clamp(32px, 4vw, 48px); font-weight: 700; letter-spacing: -.035em; line-height: 1.12; margin: 0; }
.pricing-plans-head p { color: #655f71; font-size: 15px; line-height: 1.5; margin: 10px auto 0; max-width: 650px; }
.landing--public-compact .pricing-plans-head h2 { font-size: clamp(32px, 4vw, 48px); }
.landing .pricing-plans { max-width: 1040px; margin-left: auto; margin-right: auto; }
.pricing-plan-stage { position: relative; isolation: isolate; }
.pricing-plan-stage > .hero-aurora { position: absolute; top: -40px; left: 50%; transform: translateX(-50%); width: min(1360px, calc(100vw - 24px)); height: calc(100% + 70px); z-index: -1; pointer-events: none; }
@media (max-width: 1120px) { .pricing-plan-stage .price-card__royal-badge { right: 8px; } }
.pricing-billing-switch { position: relative; top: 8px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; }
.pricing-billing-switch__label { border: 0; background: transparent; padding: 4px 0; color: #655f71; font-size: 13px; font-weight: 600; cursor: pointer; }
.pricing-billing-switch__label.is-active { color: #112040; font-weight: 800; }
.pricing-billing-switch__label:hover { color: #253682; }
.pricing-billing-switch__label:focus-visible, .pricing-billing-switch__track:focus-visible { outline: 2px solid #286fe7; outline-offset: 3px; }
.pricing-billing-switch__track { width: 42px; height: 24px; padding: 3px; border: 0; border-radius: 999px; background: #112040; cursor: pointer; display: inline-flex; align-items: center; }
.pricing-billing-switch__thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .22); transition: transform .18s ease; }
.pricing-billing-switch__track[aria-checked="true"] .pricing-billing-switch__thumb { transform: translateX(18px); }
.pricing-billing-switch__saving { border-radius: 999px; padding: 3px 7px; background: #dcfce7; color: #166534; font-size: 10px; font-weight: 750; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .pricing-billing-switch__thumb { transition: none; } }
/* ── Price card base ──────────────────────────────────────────────────── */
.price-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 28px 24px 24px;
}
.price-card--featured {
  border-width: 3px;
  border-color: var(--lp-primary);
  background:
    linear-gradient(180deg, rgba(38, 69, 192, 0.07), rgba(255, 255, 255, 0) 70%),
    var(--lp-panel);
}
/* "Most popular" badge — absolute, completely out of normal flow */
.price-card__badge {
  position: absolute;
  top: 20px;
  right: 20px;
  margin: 0;
  border-radius: 10px;
  background: #dcfce7;
  border: 1px solid #86efac;
  color: #166534;
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  padding: 4px 11px;
  text-transform: uppercase;
}
/* Corner flourish on the Royalty card, same absolute-corner pattern as
   .price-card__badge above -- deliberately no mobile media query hiding it,
   unlike the hero's flying-dollar decorations, since the card itself is
   full-width and visible on mobile with plenty of corner room. */
.price-card__royal-badge {
  position: absolute;
  top: -45px;
  right: -30px;
  width: 149px;
  height: auto;
  pointer-events: none;
  user-select: none;
}
/* ── Card head ───────────────────────────────────────────────────────── */
.price-card__head {
  min-height: 58px;
}
.price-card h3 {
  color: var(--lp-fg);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0;
}
/* room for the absolute badge on the featured card */
.price-card--featured h3 {
  padding-right: 100px;
}
/* room for the crown so "Todozavr Royalty" doesn't run under it */
.price-card[data-plan="royalty"] h3 {
  padding-right: 130px;
}
.price-card__tagline {
  margin: 4px 0 0;
  font-size: 0.84rem;
  color: var(--lp-muted);
  font-weight: 500;
}
/* ── Price block — always 2 rows, no reserved yearly space ────────── */
.price-card__price-block {
  margin-top: 18px;
}
.price-card__amount {
  display: flex;
  align-items: baseline;
  gap: 2px;
  line-height: 1;
}
.price-card__main-price {
  font-size: 2.2rem;
  font-weight: 850;
  color: var(--lp-fg);
  letter-spacing: -0.02em;
}
.price-card__period {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--lp-muted);
  margin-left: 2px;
}
/* Single 2nd-line note — monthly text or yearly annual+save inline */
.price-card__billing-note {
  margin: 6px 0 0;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--lp-muted);
  line-height: 1.4;
  min-height: 1.15em;
}
.price-card__save-highlight {
  color: #15803d;
  font-weight: 700;
}
/* ── Features list ───────────────────────────────────────────────────── */
.price-card__features {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.price-card__features li {
  font-size: 0.875rem;
  color: var(--lp-fg);
  padding-left: 22px;
  position: relative;
  line-height: 1.4;
}
.price-card__features li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 3px;
  width: 12px;
  height: 12px;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 6l3 3 5-5' stroke='%232645c0' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
}
/* ── Bonus block ─────────────────────────────────────────────────────── */
.price-card__bonus {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--lp-border);
}
.price-card__bonus-label {
  font-size: 0.72rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--lp-muted);
  margin: 0 0 6px;
}
.price-card__bonus-text {
  font-size: 0.82rem;
  color: var(--lp-muted);
  margin: 0;
  font-style: italic;
}
.price-card__bonus-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.price-card__bonus-list li {
  font-size: 0.82rem;
  color: var(--lp-muted);
  font-style: italic;
  padding-left: 14px;
  position: relative;
}
.price-card__bonus-list li::before {
  content: "·";
  position: absolute;
  left: 3px;
  font-style: normal;
}
/* ── CTA footer ──────────────────────────────────────────────────────── */
.price-card__footer {
  margin-top: auto;
  padding-top: 20px;
}
.price-card__footer .btn {
  width: 100%;
}
.price-card__cta-sub {
  margin: 8px 0 0;
  font-size: 0.78rem;
  color: var(--lp-muted);
  text-align: center;
}
@media (max-width: 980px) {
  .pricing-grid {
    grid-template-columns: 1fr;
  }
  /* Mobile card order: Waste Hunter first */
  .price-card[data-plan="hunter"] { order: 1;
  }
  .price-card[data-plan="hatchling"] { order: 2;
  }
  .price-card[data-plan="royalty"] { order: 3;
  }
  /* Shrunk, not hidden -- the saving badge is the whole point of the
     toggle and should survive on the device most visitors land on. */
  .price-toggle__btn { padding: 10px 16px; font-size: 0.88rem;
  }
  .price-toggle__yr-chip { font-size: 0.68rem; padding: 1px 6px;
  }
  /* ~22% smaller than desktop, offsets scaled the same amount so the
     overhang past the card's corner keeps the same proportions instead of
     just shrinking the image in place. */
  /* right is positive here (not negative like desktop) on purpose: the card
     fills the full mobile-grid column, so any negative right offset pushes
     the image past the card's own edge and into page-overflow/horizontal-
     scroll territory. Keeping it flush inside the card avoids that
     regardless of exact viewport width. */
  .price-card__royal-badge { top: -14px; right: 8px; width: 116px;
  }
}
.landing--public-compact .pricing-grid {
  gap: 12px;
  margin-top: 22px;
}
.landing--public-compact .price-card {
  border-radius: 16px;
  padding: 18px;
}
.landing--public-compact .price-card p {
  font-size: 0.84rem;
  line-height: 1.45;
}
.landing--public-compact .price-toggle-wrap {
  margin-bottom: 22px;
}
.landing--public-compact .price-card__head {
  min-height: 48px;
}
.landing--public-compact .price-card__badge {
  top: 16px;
  right: 16px;
}
.landing--public-compact .price-card h3 {
  font-size: 1.12rem;
}
.landing--public-compact .price-card__price-block {
  margin-top: 14px;
}
.landing--public-compact .price-card__main-price {
  font-size: 1.85rem;
}
.landing--public-compact .price-card__features {
  gap: 6px;
  margin-top: 18px;
}
.landing--public-compact .price-card__features li {
  font-size: 0.82rem;
  line-height: 1.32;
}
.landing--public-compact .price-card__footer {
  padding-top: 16px;
}
/* Pricing cards: CTA sits right under the price; the price has a small stacked
   column on its right ("/mo" on top, then "£290 billed annually" and the
   green "Save £58" under it). Free plan reads "£0 free forever". */
.price-card__amount { align-items: flex-start; min-height: 3.5rem; gap: 8px;
}
.price-card__side { display: flex; flex-direction: column; gap: 1px; padding-top: 3px;
}
.price-card__side .price-card__period { margin-left: 0; line-height: 1.15;
}
.price-card__side .price-card__billing-note { margin: 0; min-height: 0; font-size: 0.74rem; line-height: 1.3;
}
.price-card__side .price-card__save-highlight { display: block;
}
.price-card__cta { margin-top: 14px;
}
.price-card__cta .btn { width: 100%;
}
/* Pricing, round 2: price vertically centred against its side column; the
   side shows "£290/year · Save £58" on one line; the active billing toggle
   is the CTA's dark navy (plain colour, no effects). */
.price-card__amount { align-items: center;
}
.price-card__side { padding-top: 0;
}
.price-card__side .price-card__save-highlight { display: inline;
}
.price-toggle__btn.is-active { background: #112040; color: #fff;
}
@media (max-width: 640px) {
  .landing--amazon-compact .price-toggle-wrap { align-items: center; text-align: center;
  }
}
/* Canonical CTA size, shared by the landing's <a class="btn"> and billing's <a class="pf-btn">
   (the colour comes from the shiny .btn--primary / .btn-action-landing canon in brand.css) */
.price-card__cta .btn,
.price-card__cta .pf-btn {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 38px;
  border-radius: 10px;
  padding: 0 15px;
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
}

/* Canonical glass plan cards from the Billing comparison. */
.price-card {
  --mx: 50%; --my: 50%; --mh-glare: 0;
  isolation: isolate;
  background-color: rgba(255, 255, 255, .55);
  -webkit-backdrop-filter: blur(6px) saturate(1.2);
  backdrop-filter: blur(6px) saturate(1.2);
  box-shadow: 0 12px 40px rgba(31, 41, 80, .10), inset 0 1px 0 rgba(255, 255, 255, .9);
  transition: background-color .35s ease, -webkit-backdrop-filter .35s ease, backdrop-filter .35s ease, box-shadow 320ms ease;
}
.price-card:not(.price-card--featured) { border-color: rgba(255, 255, 255, .85); }
.price-card--featured { background: rgba(255, 255, 255, .55); }
.price-card:hover {
  --mh-glare: 1;
  background-color: rgba(255, 255, 255, .40);
  -webkit-backdrop-filter: blur(24px) saturate(1.3);
  backdrop-filter: blur(24px) saturate(1.3);
  box-shadow: 0 15px 44px rgba(31, 41, 80, .16), inset 0 1px 0 rgba(255, 255, 255, .9);
}
.price-card::before,
.price-card::after { position: absolute; content: ""; pointer-events: none; opacity: var(--mh-glare); transition: opacity 320ms ease; }
.price-card::before {
  background: radial-gradient(150px circle at var(--mx) var(--my), #fff, transparent 72%);
  inset: 0; padding: 1.5px; border-radius: inherit; z-index: 2;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.price-card::after {
  background: radial-gradient(260px circle at var(--mx) var(--my), rgba(255, 255, 255, .65), transparent 70%);
  inset: 0; border-radius: inherit; z-index: -1;
}
.price-card h3, .price-card .price-card__main-price { font-weight: 700; }
.price-card .price-card__tagline { margin-top: 2px; }
.pricing-plan-stage .price-card__cta .btn,
.pricing-plan-stage .price-card__cta .btn:visited {
  background: #fff; border: 1px solid #d8dce6; color: #1e2535; box-shadow: none; transform: none;
}
.pricing-plan-stage .price-card__cta .btn:hover,
.pricing-plan-stage .price-card__cta .btn:focus-visible {
  background: #f1f3f8; border-color: #c4cad8; color: #1e2535; box-shadow: none; transform: none;
}
.club-modal__pricing .price-card__royal-badge { top: -24px; right: 8px; width: 96px; }
@media (prefers-reduced-motion: reduce) {
  .price-card, .price-card::before, .price-card::after { transition: none; }
}
