/* =========================================================
   Pricing page — /pricing/, /upgrade/, /pricing/start/
   (onboarding/templates/onboarding/upgrade.html + pricing/*).
   Page-local, pr- prefix, built on main.css's tokens. Loaded after
   main.css from the template's extra_head.

   Motion is opt-in (prefers-reduced-motion: no-preference) and every
   animated thing is fully visible without it. Contrast: text ≥ 4.5:1,
   borders/focus ≥ 3:1 against what they sit on.
   ========================================================= */

.pr {
  --pr-deep:        #0F3550;   /* deep water: hero ground */
  --pr-mid:         #123F5E;
  --pr-ink:         var(--text);
  --pr-cta:         #1F6FA1;   /* = --brand-dark; white text 5.5:1 */
  --pr-cta-hover:   #195C86;
  --pr-warm:        #C47038;   /* the one warm accent: Riverside's border */
  --pr-warm-ink:    #7A5230;
  --pr-warm-wash:   #FFF4E8;
  --pr-line:        #E3EAF1;
  --pr-radius:      18px;
  --pr-shadow:      0 1px 2px rgba(16, 42, 67, .06), 0 14px 34px -14px rgba(16, 42, 67, .22);
  --pr-shadow-lift: 0 2px 4px rgba(16, 42, 67, .06), 0 24px 48px -18px rgba(16, 42, 67, .32);

  max-width: 1120px;
  margin: 0 auto;
  padding-bottom: 5rem;
}

/* Visually hidden, still announced. */
.pr-sr {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ── Hero ─────────────────────────────────────────────── */

.pr-hero {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: 3.5rem 1.5rem 7.5rem;
  text-align: center;
  color: #fff;
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(94, 195, 232, .28) 0%, rgba(94, 195, 232, 0) 55%),
    radial-gradient(70% 90% at 0% 100%, rgba(47, 136, 188, .35) 0%, rgba(47, 136, 188, 0) 60%),
    linear-gradient(160deg, var(--pr-deep) 0%, var(--pr-mid) 40%, var(--brand-dark) 100%);
  box-shadow: 0 18px 40px rgba(18, 63, 94, .22);
}
.pr-hero__ribbon {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  width: 100%;
  height: 48%;
  pointer-events: none;
}
.pr-hero__line { stroke-dasharray: 1; stroke-dashoffset: 0; opacity: .85; }
.pr-hero__content { position: relative; z-index: 1; max-width: 46rem; margin: 0 auto; }
.pr-hero__eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: #BFE6F6;
  margin-bottom: 1rem;
}
.pr-hero__eyebrow::before,
.pr-hero__eyebrow::after { content: ""; width: 1.4rem; height: 2px; border-radius: 2px; background: currentColor; opacity: .7; }
.pr-hero__title {
  color: #fff;
  font-size: clamp(2.1rem, 5vw, 3.35rem);
  font-weight: 800;
  letter-spacing: -.025em;
  line-height: 1.06;
  margin-bottom: 1rem;
  text-wrap: balance;
}
.pr-hero__lead {
  font-size: clamp(1.02rem, 1.6vw, 1.15rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, .88);
  max-width: 34rem;
  margin: 0 auto;
  text-wrap: pretty;
}
.pr-hero__chip {
  display: inline-block;
  margin-top: 1.1rem;
  padding: .3rem .85rem;
  border-radius: 999px;
  font-size: .85rem;
  background: rgba(255, 255, 255, .13);
  border: 1px solid rgba(255, 255, 255, .22);
  color: rgba(255, 255, 255, .92);
}
.pr-hero__chip strong { color: #fff; }

/* Notices inside the hero: a cancelled checkout, the ?feature= spotlight. */
.pr-notice {
  max-width: 34rem;
  margin: 1.1rem auto 0;
  padding: .7rem 1rem;
  border-radius: 12px;
  font-size: .9rem;
  line-height: 1.5;
  color: #fff;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .24);
}
.pr-notice--spot { text-align: left; border-left: 3px solid #BFE6F6; }
.pr-notice__head { margin: 0; }
.pr-notice__sub { margin: .3rem 0 0; color: rgba(255, 255, 255, .85); font-size: .85rem; }

/* ── Billing toggle: a real radio group, styled as a segmented control ── */

.pr-billing {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-top: 1.75rem;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  min-inline-size: 0;
}
.pr-billing__input {
  position: absolute;
  opacity: 0;
  width: 1px; height: 1px;
  margin: 0;
  pointer-events: none;
}
.pr-billing__opt {
  display: inline-flex; align-items: center; gap: .45rem;
  min-height: 40px;
  padding: .45rem 1.15rem;
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 600;
  color: rgba(255, 255, 255, .9);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.pr-billing__opt:hover { background: rgba(255, 255, 255, .08); }
.pr-billing__input:checked + .pr-billing__opt { background: #fff; color: var(--pr-mid); }
.pr-billing__input:focus-visible + .pr-billing__opt { outline: 2px solid #fff; outline-offset: 2px; }
.pr-billing__save {
  font-size: .7rem;
  font-weight: 700;
  padding: .12rem .5rem;
  border-radius: 999px;
  background: var(--pr-warm-wash);
  color: var(--pr-warm-ink);
}

/* Which billing interval is on show. The radios drive it with :has (no JS
   needed); pricing.ts mirrors the choice into data-interval for browsers
   without :has. The wrappers are display: contents so they never change
   the layout of what they wrap. */
.pr-when-month, .pr-when-year { display: contents; }
.pr:has(#pr-billing-year:checked) .pr-when-month { display: none; }
.pr:has(#pr-billing-month:checked) .pr-when-year { display: none; }
@supports not selector(:has(*)) {
  .pr[data-interval="year"] .pr-when-month { display: none; }
  .pr:not([data-interval="year"]) .pr-when-year { display: none; }
}
/* No toggle on the page at all (no yearly plans): monthly only. */
.pr:not(:has(.pr-billing)) .pr-when-year { display: none; }

/* ── The three cards ──────────────────────────────────── */

.pr-cards {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  align-items: stretch;
  margin: -4.25rem 1.25rem 0;
  padding: 0;
}
/* Faint topographic contours behind the cards. Sideways it reaches only as
   far as the cards' own margin (to .pr's edge, never past it): nothing above
   clips overflow, so a wider layer pans the whole page sideways on phones. */
.pr-cards::before {
  content: "";
  position: absolute;
  inset: 3rem -1.25rem -3rem;
  z-index: -1;
  pointer-events: none;
  background:
    repeating-radial-gradient(ellipse 60% 48% at 18% 70%, transparent 0 26px, rgba(31, 111, 161, .07) 26px 27px),
    repeating-radial-gradient(ellipse 52% 40% at 86% 30%, transparent 0 30px, rgba(31, 111, 161, .06) 30px 31px);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 25%, #000 70%, transparent 100%);
          mask-image: linear-gradient(180deg, transparent 0%, #000 25%, #000 70%, transparent 100%);
}
.pr-cards__item { display: flex; min-width: 0; }
.pr-cards__item > .pr-card { flex: 1; }
.pr-cards__item--popular { transform: translateY(-10px); }

.pr-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 2rem 1.75rem 1.75rem;
  border: 1px solid var(--border);
  border-radius: var(--pr-radius);
  background: var(--surface);
  box-shadow: var(--pr-shadow);
  scroll-margin-top: 1.5rem;
}
.pr-card--popular {
  border: 2px solid var(--pr-warm);
  box-shadow: var(--pr-shadow-lift);
}
.pr-card--spotlight { box-shadow: 0 0 0 4px rgba(94, 195, 232, .55), var(--pr-shadow-lift); }
.pr-card__flag {
  position: absolute;
  top: 0; left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  padding: .28rem .9rem;
  border: 1px solid #EBCBA9;
  border-radius: 999px;
  background: var(--pr-warm-wash);
  color: var(--pr-warm-ink);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.pr-card__intro { min-height: 7.25rem; }
.pr-card__head { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.pr-glyph { width: 42px; height: 28px; color: var(--brand-dark); flex: 0 0 auto; }
.pr-card--popular .pr-glyph { color: var(--pr-warm); }
.pr-card__name {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 750;
  letter-spacing: -.01em;
  color: var(--pr-ink);
}
.pr-card__badge {
  padding: .14rem .55rem;
  border-radius: 999px;
  background: var(--teal-wash);
  color: var(--brand-dark);
  font-size: .72rem;
  font-weight: 700;
}
.pr-card__pitch {
  margin: .7rem 0 0;
  font-size: .93rem;
  line-height: 1.5;
  color: var(--muted);
  text-wrap: pretty;
}
.pr-card__spot {
  display: inline-flex; align-items: center; gap: .4rem;
  margin: .55rem 0 0;
  font-size: .8rem;
  font-weight: 600;
  color: var(--brand-dark);
}
.pr-card__spot::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--teal); }

/* Price + CTA */
.pr-card__buy { margin-top: 1.4rem; }
.pr-price { margin-bottom: 1.1rem; }
.pr-price__amount {
  display: flex; align-items: baseline; gap: .2rem;
  margin: 0;
  line-height: 1;
  color: var(--pr-ink);
}
.pr-price__num {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -.035em;
  font-variant-numeric: tabular-nums;
}
.pr-price__unit { font-size: 1rem; font-weight: 500; color: var(--muted); }
.pr-price__billed { margin: .5rem 0 0; font-size: .84rem; color: var(--muted); min-height: 1.3em; }
.pr-price__billed strong { color: var(--success); font-weight: 700; }
.pr-price__alt { margin: .15rem 0 0; font-size: .78rem; color: var(--muted); }

.pr-cta {
  display: flex; align-items: center; justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: .7rem 1.1rem;
  border: 1.5px solid transparent;
  border-radius: 10px;
  font: inherit;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .15s;
}
.pr-cta:hover { text-decoration: none; }
.pr-cta:focus-visible { outline: 2px solid var(--pr-cta); outline-offset: 3px; }
.pr-cta--primary { background: var(--pr-cta); border-color: var(--pr-cta); color: #fff; box-shadow: 0 6px 16px -6px rgba(31, 111, 161, .55); }
.pr-cta--primary:hover { background: var(--pr-cta-hover); border-color: var(--pr-cta-hover); color: #fff; }
.pr-cta--secondary { background: var(--teal-wash); border-color: #BFE0F2; color: var(--pr-cta); }
.pr-cta--secondary:hover { background: #D7ECF8; border-color: var(--pr-cta); color: var(--pr-cta-hover); }
.pr-cta--outline { background: transparent; border-color: var(--border); color: var(--pr-cta); }
.pr-cta--outline:hover { border-color: var(--pr-cta); background: var(--bg); color: var(--pr-cta-hover); }
.pr-cta--quiet { background: transparent; border-color: var(--border); color: var(--muted); font-weight: 600; }
.pr-cta--quiet:hover { color: var(--pr-ink); border-color: var(--muted); }
.pr-cta--current,
.pr-cta--current:disabled { background: var(--bg); border: 1.5px dashed var(--border); color: var(--muted); cursor: default; box-shadow: none; }
@media (prefers-reduced-motion: no-preference) {
  .pr-cta--primary:hover, .pr-cta--secondary:hover { transform: translateY(-1px); }
}

.pr-terms {
  margin: .6rem 0 0;
  min-height: 1.3em;
  font-size: .8rem;
  line-height: 1.45;
  text-align: center;
  color: var(--muted);
}
.pr-terms--note { text-align: left; margin-top: .75rem; }

/* Benefits, each with a "what does this mean?" expander */
.pr-benefits {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--pr-line);
}
.pr-benefit { margin: 0 0 .5rem; font-size: .93rem; line-height: 1.45; }
.pr-benefit__row,
.pr-benefit__more > summary {
  display: grid;
  grid-template-columns: 1.1rem minmax(0, 1fr) auto;
  align-items: start;
  column-gap: .6rem;
  padding: .2rem 0;
}
.pr-benefit__more > summary {
  list-style: none;
  cursor: pointer;
  border-radius: 6px;
}
.pr-benefit__more > summary::-webkit-details-marker { display: none; }
.pr-benefit__more > summary:focus-visible { outline: 2px solid var(--pr-cta); outline-offset: 2px; }
.pr-benefit__icon { width: 1.1rem; height: 1.1rem; margin-top: .12rem; color: var(--accent-green); }
.pr-benefit__text { color: var(--pr-ink); }
.pr-benefit__info {
  display: inline-grid; place-items: center;
  width: 1.15rem; height: 1.15rem;
  margin-top: .1rem;
  border: 1.5px solid #9AAAB8;
  border-radius: 50%;
  font-size: .66rem;
  font-weight: 800;
  line-height: 1;
  color: var(--muted);
  transition: background .15s, border-color .15s, color .15s;
}
.pr-benefit__more > summary:hover .pr-benefit__info,
.pr-benefit__more[open] .pr-benefit__info { background: var(--pr-cta); border-color: var(--pr-cta); color: #fff; }
.pr-benefit__hint {
  margin: .35rem 0 .45rem 1.7rem;
  padding: .6rem .75rem;
  border-radius: 10px;
  background: var(--teal-wash);
  color: var(--pr-ink);
  font-size: .85rem;
  line-height: 1.5;
}

.pr-card__for {
  margin: auto 0 0;
  padding-top: 1.25rem;
  font-size: .82rem;
  line-height: 1.5;
  color: var(--muted);
}
.pr-card__for-label {
  display: block;
  margin-bottom: .15rem;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--brand-dark);
}

/* ── Compare link ─────────────────────────────────────── */

.pr-compare-link { margin: 2.5rem 0 0; text-align: center; }
.pr-compare-open {
  display: inline-flex; align-items: center; gap: .35rem;
  min-height: 44px;
  padding: .5rem 1.1rem;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-weight: 650;
  color: var(--pr-cta);
}
.pr-compare-open:hover { border-color: var(--pr-cta); text-decoration: none; color: var(--pr-cta-hover); }
.pr-compare-open:focus-visible { outline: 2px solid var(--pr-cta); outline-offset: 3px; }
.pr-compare-open svg { width: 1rem; height: 1rem; }

/* ── Research / Team row ──────────────────────────────── */

.pr-more { margin-top: 5rem; }
.pr-more__title {
  margin: 0 0 1.5rem;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--muted);
}
.pr-more__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 1.25rem;
}
.pr-card--compact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(200px, 240px);
  column-gap: 1.75rem;
  padding: 1.6rem 1.6rem 1.4rem;
  background: #FBFCFE;
  box-shadow: 0 1px 2px rgba(16, 42, 67, .05);
}
.pr-card--compact .pr-card__intro { min-height: 0; }
.pr-card--compact .pr-card__buy { margin-top: 0; grid-row: span 2; }
.pr-card--compact .pr-price__num { font-size: 2.1rem; }
.pr-card--compact .pr-benefits { margin-top: 1rem; padding-top: 1rem; }
.pr-card--compact .pr-benefit { font-size: .87rem; }
.pr-card--compact .pr-card__name { font-size: 1.2rem; }

/* ── Promises, FAQ ────────────────────────────────────── */

.pr-promises { margin-top: 5rem; }
.pr-promises__list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}
.pr-promises__list li { display: flex; gap: .85rem; align-items: flex-start; }
.pr-promises__list svg {
  flex: 0 0 auto;
  width: 2.5rem; height: 2.5rem;
  padding: .55rem;
  border-radius: 12px;
  background: var(--teal-wash);
  color: var(--brand-dark);
}
.pr-promises__list p { margin: 0; font-size: .9rem; line-height: 1.55; color: var(--muted); }
.pr-promises__list strong { display: block; color: var(--pr-ink); margin-bottom: .15rem; }
.pr-safety { margin: 2.25rem 0 0; text-align: center; font-size: .82rem; color: var(--muted); }
.pr-links { margin: .5rem 0 0; text-align: center; font-size: .85rem; color: var(--muted); }
.pr-links a { color: var(--pr-cta); text-decoration: underline; text-underline-offset: 2px; }

.pr-faq { max-width: 760px; margin: 5rem auto 0; scroll-margin-top: 1.5rem; }
.pr-faq__title {
  margin: 0 0 1.25rem;
  text-align: center;
  font-size: 1.6rem;
  font-weight: 750;
  letter-spacing: -.01em;
}
.pr-faq__list { border-top: 1px solid var(--border); }
.pr-faq__item { border-bottom: 1px solid var(--border); }
.pr-faq__q {
  position: relative;
  list-style: none;
  cursor: pointer;
  padding: 1.1rem 2.5rem 1.1rem .25rem;
  font-size: 1.02rem;
  font-weight: 650;
  color: var(--pr-ink);
  border-radius: 6px;
}
.pr-faq__q::-webkit-details-marker { display: none; }
.pr-faq__q::after {
  content: "";
  position: absolute;
  right: .6rem; top: 50%;
  width: .6rem; height: .6rem;
  border-right: 2px solid var(--brand-dark);
  border-bottom: 2px solid var(--brand-dark);
  transform: translateY(-70%) rotate(45deg);
  transition: transform .2s ease;
}
.pr-faq__item[open] > .pr-faq__q::after { transform: translateY(-30%) rotate(225deg); }
.pr-faq__q:hover { color: var(--brand-dark); }
.pr-faq__q:focus-visible { outline: 2px solid var(--pr-cta); outline-offset: 2px; }
.pr-faq__a {
  margin: 0;
  padding: 0 .25rem 1.25rem;
  max-width: 62ch;
  font-size: .95rem;
  line-height: 1.65;
  color: var(--muted);
}

/* ── Comparison: inline section (no JS) / <dialog> drawer ─ */

.pr-compare { margin-top: 5rem; }
.pr-compare__head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  margin-bottom: 1rem;
}
.pr-compare__title { margin: 0; font-size: 1.4rem; font-weight: 750; }
.pr-compare__title:focus { outline: none; }
.pr-compare__close {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--pr-ink);
  cursor: pointer;
}
.pr-compare__close svg { width: 1rem; height: 1rem; }
.pr-compare__close:hover { border-color: var(--pr-cta); color: var(--pr-cta); }
.pr-compare__close:focus-visible { outline: 2px solid var(--pr-cta); outline-offset: 2px; }
.pr-compare__scroll { overflow-x: auto; }

.pr-matrix {
  width: 100%;
  min-width: 680px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: .875rem;
}
.pr-matrix th, .pr-matrix td {
  padding: .8rem .75rem;
  border-bottom: 1px solid var(--pr-line);
  vertical-align: top;
}
.pr-matrix thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface);
  border-bottom: 2px solid var(--border);
  text-align: center;
  vertical-align: bottom;
}
.pr-matrix__plan-name { display: block; font-size: .95rem; font-weight: 750; color: var(--pr-ink); }
.pr-matrix__plan-price { display: block; font-size: .8rem; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.pr-matrix__plan-badge {
  display: inline-block; margin-top: .25rem;
  padding: .05rem .45rem; border-radius: 999px;
  background: var(--teal-wash); color: var(--brand-dark);
  font-size: .68rem; font-weight: 700;
}
.pr-matrix thead th.is-popular { box-shadow: inset 0 3px 0 var(--pr-warm); }
.pr-matrix td.pr-matrix__cell { text-align: center; color: var(--pr-ink); }
.pr-matrix td.is-popular { background: #FFFAF4; }
.pr-matrix__group th {
  padding-top: 1.6rem;
  text-align: left;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brand-dark);
  border-bottom: 1px solid var(--border);
}
.pr-matrix__feature { text-align: left; width: 38%; min-width: 220px; font-weight: 400; }
.pr-matrix__label { display: block; font-weight: 650; color: var(--pr-ink); }
.pr-matrix__explain { display: block; margin-top: .2rem; max-width: 46ch; font-size: .78rem; line-height: 1.45; color: var(--muted); }
.pr-matrix__yes { width: 1.15rem; height: 1.15rem; color: var(--accent-green); }
.pr-matrix__no { color: #9AAAB8; }
.pr-matrix__detail { display: block; margin-top: .15rem; font-size: .75rem; line-height: 1.35; color: var(--muted); }

/* The drawer (pricing.ts wraps the section in <dialog class="pr-drawer">). */
.pr-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(1000px, 100vw);
  max-width: 100vw;
  height: 100%;
  max-height: 100%;
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
  background: var(--surface);
  color: var(--text);
  box-shadow: -24px 0 60px rgba(15, 53, 80, .28);
  overscroll-behavior: contain;
}
.pr-drawer::backdrop { background: rgba(15, 53, 80, .5); backdrop-filter: blur(2px); }
.pr-compare--drawer {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin: 0;
}
.pr-compare--drawer .pr-compare__head {
  margin: 0;
  padding: 1rem 1.25rem 1rem 1.75rem;
  border-bottom: 1px solid var(--border);
}
.pr-compare--drawer .pr-compare__scroll { flex: 1; overflow: auto; padding: 0 1.75rem 2rem; }
html.pr-drawer-open { overflow: hidden; }

/* ── Sticky small-screen CTA ─────────────────────────── */

.pr-sticky {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: .7rem 1rem calc(.7rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 -8px 24px rgba(16, 42, 67, .12);
}
.pr-sticky__name { margin: 0; font-weight: 750; color: var(--pr-ink); }
.pr-sticky .pr-cta { flex: 1; min-height: 44px; font-size: .95rem; }

/* ── Hand-off page (/pricing/start/) ─────────────────── */

.pr-start { max-width: 480px; padding: 2.5rem 0 4rem; }
.pr-start__card {
  padding: 2.5rem 2rem 2rem;
  border: 1px solid var(--border);
  border-radius: var(--pr-radius);
  background: var(--surface);
  box-shadow: var(--pr-shadow);
  text-align: center;
}
.pr-start__card .pr-glyph { width: 56px; height: 36px; margin: 0 auto .75rem; display: block; }
.pr-start__eyebrow { color: var(--brand-dark); margin-bottom: .5rem; }
.pr-start__title { margin: 0 0 .6rem; font-size: 1.6rem; font-weight: 750; color: var(--pr-ink); }
.pr-start__terms { margin: 0 0 1.5rem; color: var(--muted); }
.pr-start__note { margin: 1rem 0 0; font-size: .9rem; color: var(--brand-dark); }
.pr-start__fine { margin: 1.25rem 0 0; font-size: .8rem; color: var(--muted); line-height: 1.55; }
.pr-start__fine a { color: var(--pr-cta); text-decoration: underline; text-underline-offset: 2px; margin-left: .25rem; }

/* ── Motion (opt-in) ──────────────────────────────────── */

@keyframes pr-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes pr-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pr-slide-in { from { transform: translateX(32px); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes pr-sheet-in { from { transform: translateY(32px); opacity: .4; } to { transform: none; opacity: 1; } }

@media (prefers-reduced-motion: no-preference) {
  .pr-hero__line { animation: pr-draw 1.4s cubic-bezier(.3, .7, .2, 1) .1s both; }
  .pr-hero__area { animation: pr-fade-in 1.4s ease-out .2s both; }
  /* Crossfade the price when the billing toggle swaps it in. */
  .pr-when-month > .pr-price, .pr-when-year > .pr-price { animation: pr-fade-in .18s ease-out; }
  .pr-drawer[open] { animation: pr-slide-in .22s ease-out; }
  .pr-benefit__more[open] .pr-benefit__hint,
  .pr-faq__item[open] .pr-faq__a { animation: pr-fade-in .18s ease-out; }

  /* Set only by pricing.ts, so without JS nothing ever starts hidden. */
  .pr--reveal [data-pr-reveal] {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .5s ease, transform .5s cubic-bezier(.2, .7, .2, 1);
  }
  .pr--reveal [data-pr-reveal].is-visible { opacity: 1; transform: none; }
  .pr--reveal .pr-cards__item:nth-child(2) [data-pr-reveal] { transition-delay: 80ms; }
  .pr--reveal .pr-cards__item:nth-child(3) [data-pr-reveal] { transition-delay: 160ms; }
}

/* ── Responsive ───────────────────────────────────────── */

@media (max-width: 960px) {
  .pr-cards { gap: 1rem; margin-inline: .5rem; }
  .pr-cards::before { inset-inline: -.5rem; }
  .pr-card { padding: 1.75rem 1.25rem 1.5rem; }
  .pr-price__num { font-size: 2.6rem; }
}

@media (max-width: 860px) {
  .pr-hero { padding: 2.75rem 1.25rem 6.5rem; border-radius: 20px; }
  .pr-cards {
    grid-template-columns: minmax(0, 1fr);
    max-width: 480px;
    margin: -3.75rem auto 0;
    gap: 1.75rem;
  }
  .pr-cards::before { inset-inline: 0; }
  /* Source order on one column too (no CSS `order`): moving Riverside up
     visually would leave tab and screen-reader order behind it. The sticky
     bar carries the recommended plan instead. */
  .pr-cards__item--popular { transform: none; }
  .pr-card__intro { min-height: 0; }
  .pr-promises__list { grid-template-columns: minmax(0, 1fr); max-width: 480px; margin: 0 auto; }
  .pr-more, .pr-promises, .pr-faq, .pr-compare { margin-top: 3.5rem; }
}

@media (max-width: 720px) {
  .pr-card--compact { grid-template-columns: minmax(0, 1fr); }
  .pr-card--compact .pr-card__buy { grid-row: auto; margin-top: 1.1rem; }
  .pr-drawer { width: 100vw; inset: 0; border-radius: 0; }
  .pr-compare--drawer .pr-compare__head { padding-left: 1rem; }
  .pr-compare--drawer .pr-compare__scroll { padding: 0 .5rem 1.5rem; }
  .pr-matrix__feature { min-width: 180px; }
  .pr { padding-bottom: 6.5rem; } /* room for the sticky bar */
}
@media (max-width: 720px) and (prefers-reduced-motion: no-preference) {
  .pr-drawer[open] { animation: pr-sheet-in .22s ease-out; }
}

@media (max-width: 420px) {
  .pr-hero__title { font-size: 2rem; }
  .pr-billing__opt { padding-inline: .85rem; }
  .pr-cards { margin-inline: 0; }
}

/* ── Forced colours (Windows High Contrast) ───────────── */

@media (forced-colors: active) {
  .pr-card--popular { border: 3px solid CanvasText; }
  .pr-billing__input:checked + .pr-billing__opt { outline: 2px solid Highlight; }
  .pr-cards::before, .pr-hero__ribbon { display: none; }
  .pr-cta { border: 1px solid ButtonText; }
}
