/* Sorted Studio — "Build your price" card (Prices page).
   Pattern borrowed, not copied: a calculator card (left: choices, right: the total), a quantity stepper,
   and a total whose changed digits roll. Uses the site tokens from site.css. No drop shadows: the selected choice gets an inset ink ring.
   Motion: 150 to 300 ms, ease-out, no bounce. Reduced motion shows every change instantly. */

.pb {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-2);   /* minmax: bigger text wraps instead of widening the card (14 Oct 2026) */
  padding: var(--space-2); border-radius: var(--r-card); background: var(--card);
  border: 1.5px solid var(--ink);
}
/* Without JavaScript the card stays hidden. It is shown from CSS, not by the script, so it holds its space from the first frame (no layout shift, 11 Oct 2026). */
html:not(.js) #build { display: none; }   /* the "Change" link from Start lands on #build; html scroll-padding-top keeps it clear of the sticky header */
.pb__controls { padding: clamp(var(--space-4), 3vw, var(--space-6)); --gap: var(--space-5); }
.pb__title { font-size: var(--fs-h3); line-height: 1.12; letter-spacing: -0.008em; font-weight: 600; }
.pb__intro { margin-top: var(--space-2); color: var(--ink-soft); max-width: 40ch; }

/* Package: two real radios, shown as cards */
.pb__group { border: 0; margin-inline: 0; margin-bottom: 0; padding: 0; min-width: 0; }
.pb__group legend, .pb__label { font-weight: 600; padding: 0; }
.pb__opts { display: grid; grid-template-columns: 1fr; gap: var(--space-3); margin-top: var(--space-3); }
@media (min-width: 601px) { .pb__opts { grid-template-columns: 1fr 1fr; } }
.pb__opt {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-1) var(--space-3); align-items: start;
  min-height: 44px; padding: var(--space-4) var(--space-4); border: 1.5px solid var(--ash); border-radius: var(--r-input);
  background: var(--paper); cursor: pointer; transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.pb__opt:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); background: var(--card); }
.pb__opt input { grid-row: 1 / span 3; width: 20px; height: 20px; margin: var(--space-1) 0 0; accent-color: var(--ink); }
.pb__opt input:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.pb__opt-name { font-weight: 600; line-height: 1.3; }
.pb__opt-price { font: 500 var(--step-2)/1.1 var(--font-display); letter-spacing: -0.015em; font-variant-numeric: lining-nums tabular-nums; }
.pb__opt-note { font-size: var(--fs-small); color: var(--ink-soft); line-height: 1.4; }

/* Rows: extra pages, care plan. The stepper sits beside its label and drops under it when the card is narrow
   (flex-wrap, no breakpoint; 11 Oct 2026, was a 359px query). */
.pb__row { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); align-items: center; padding-top: var(--space-5); border-top: 1px solid var(--ash); }
.pb__row > p, .pb__row > div:first-child { flex: 1 1 8rem; min-width: 0; }
.pb__hint { font-size: var(--fs-small); color: var(--ink-soft); margin-top: var(--space-1); }
.pb__row .pb__full { flex-basis: 100%; }
.pb__extra.is-off .pb__label { color: var(--ink-soft); }

/* Stepper: − n + */
.pb__stepper { display: inline-flex; align-items: center; gap: var(--space-1); padding: var(--space-1); border: 1.5px solid var(--ink); border-radius: var(--r-pill); background: var(--paper); }
.pb__stepper[hidden] { display: none; }
.pb__step {
  width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: var(--ink); cursor: pointer; transition: background-color 0.15s ease, transform 0.15s var(--ease-out);
}
.pb__step svg { width: 20px; height: 20px; }
.pb__step:active { transform: scale(0.92); }
.pb__step[aria-disabled="true"] { opacity: 0.35; cursor: default; }
.pb__step[aria-disabled="true"]:active { transform: none; }
@media (hover: hover) and (pointer: fine) { .pb__step:not([aria-disabled="true"]):hover { background: var(--lime); } }
.pb__count { display: inline-block; min-width: 2ch; text-align: center; font: 500 var(--step-2)/1 var(--font-display); font-variant-numeric: lining-nums tabular-nums; }

.pb__note { padding: var(--space-3) var(--space-4); border-radius: var(--r-input); background: var(--tone); font-size: var(--fs-small); }
.pb__note[hidden] { display: none; }
.pb__note:not([hidden]) { animation: pb-in 0.24s var(--ease-out); }
@keyframes pb-in { from { opacity: 0; transform: translateY(-4px); } }

/* Care plan switch: a real checkbox with role="switch" */
.pb__switch { display: flex; flex-basis: 100%; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: 48px; cursor: pointer; }
.pb__switch input {
  appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 56px; height: 32px; margin: 0;
  border-radius: var(--r-pill); background: var(--ash); cursor: pointer; transition: background-color 0.2s ease;
  box-shadow: inset 0 0 0 1.5px var(--ink);   /* the off track has a visible edge (11 Oct 2026); ash alone was 1.48:1 on the card */
}
.pb__switch input::before {
  content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--card); transition: transform 0.22s var(--ease-out), background-color 0.2s ease;
}
.pb__switch input:checked { background: var(--ink); }
.pb__switch input:checked::before { transform: translateX(24px); background: var(--lime); }
.pb__switch input:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.pb__care { margin: 0; padding: 0; list-style: none; font-size: var(--fs-small); color: var(--ink-soft); }
.pb__row:has(#pb-care:not(:checked)) .pb__care { display: none; }   /* shown once the care plan is on; the Care plan card below explains it (13 Oct 2026) */
.pb__care li + li { margin-top: var(--space-2); }
.pb__care strong { color: var(--ink); font-weight: 600; }

/* The total: a soft tone panel with a hairline, nested radius (13 Oct 2026, was a lime block) */
.pb__total { display: flex; flex-direction: column; align-items: flex-start; padding: clamp(var(--space-4), 3vw, var(--space-6)); border-radius: calc(var(--r-card) - 8px); background: var(--tone); box-shadow: inset 0 0 0 1px var(--ash); color: var(--ink); }
.pb__total .tag { background: var(--lime); }
.pb__total .pb__label { margin-top: var(--space-4); }
.pb__sum { margin-top: var(--space-1); font: 500 clamp(var(--step-6), 5vw + 1rem, var(--step-9))/1 var(--font-display); letter-spacing: -0.03em; font-variant-numeric: lining-nums tabular-nums; }
.pb__digits { display: inline-flex; }
.pb__d { display: inline-block; height: 1.08em; overflow: hidden; }
.pb__strip { display: block; transition: transform 0.26s var(--ease-out); will-change: transform; }
.pb__strip > span { display: block; height: 1.08em; line-height: 1.08; }
.pb__c { display: inline-block; line-height: 1.08; }

.pb__monthly { margin-top: var(--space-2); font: 500 var(--step-1)/1.2 var(--font-display); min-height: 1.2em; opacity: 0; transform: translateY(-6px); transition: opacity 0.2s ease, transform 0.24s var(--ease-out); }
.pb__monthly.is-on { opacity: 1; transform: none; }

.pb__lines { width: 100%; margin: var(--space-4) 0 0; padding: 0; list-style: none; border-top: 1.5px solid var(--ink); font-size: var(--fs-small); }
.pb__lines li { display: flex; justify-content: space-between; gap: var(--space-3); padding-block: var(--space-2); border-bottom: 1px solid var(--rule); }
.pb__lines li span:last-child { font-weight: 600; white-space: nowrap; }
.pb__later, .pb__small { margin-top: var(--space-3); font-size: var(--fs-small); color: var(--ink-soft); }
.pb__small .link { display: inline; min-height: 0; }   /* in the sentence, so it does not push its line down (14 Oct 2026) */
.pb__go { margin-top: var(--space-5); width: 100%; }
@media (min-width: 601px) { .pb__go { width: auto; } }
.pb__total .pb__small { margin-top: var(--space-4); }

/* Small sticky total: phones and narrow screens only, where the big total sits below the choices.
   It rides at the bottom of the screen while the choices are in view, above the WhatsApp bar. */
.pb__mini {
  position: sticky; bottom: 12px; z-index: 2; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 0.4em;
  margin-inline: 0; padding: var(--space-3) var(--space-4); border-radius: var(--r-pill); background: var(--card); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 8px 18px -12px color-mix(in srgb, var(--ink) 35%, transparent);
  font-size: var(--fs-small); font-weight: 600;
}
.pb__mini .pb__digits { font: 500 var(--step-2)/1 var(--font-display); letter-spacing: -0.02em; font-variant-numeric: lining-nums tabular-nums; }
.pb__mini-care { display: none; color: var(--ink-soft); }
.pb__mini.is-care .pb__mini-care { display: inline; }
/* It appears once the visitor starts choosing, so the first screen stays calm. */
.pb__mini:not(.is-used) { display: none; }
.pb__mini.is-used { animation: pb-in 0.24s var(--ease-out); }
@media (max-width: 860px) { .js .pb__mini { bottom: calc(72px + env(safe-area-inset-bottom, 0px)); } }
/* Side by side from 961px: the choices on the left, the big total on the right, no small total. */
@media (min-width: 961px) {
  .pb { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .pb__mini { display: none; }
}

/* Prices page, round 2 (10 Oct 2026): the three prices at a glance, the "What's included" lists,
   the after-year-one comparison and the smaller tool row. Same tokens, no shadows. */
.psum { margin: clamp(var(--space-5), 3vw, var(--space-6)) 0 0; padding: 0; list-style: none; border-top: 1.5px solid var(--ink); display: grid; grid-template-columns: 1fr; }
.psum li + li { border-top: 1px solid var(--ash); }
.psum a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-1) var(--space-4); align-items: baseline; height: 100%; padding: var(--space-3) 0; text-decoration: none; color: inherit; }
.psum a:hover .psum__name { text-decoration: underline; }
.psum__name { font-weight: 600; text-wrap: balance; }
.psum__price { grid-column: 2; grid-row: 1 / span 2; text-align: right; font: 500 var(--step-3)/1.05 var(--font-display); letter-spacing: -0.019em; font-variant-numeric: lining-nums tabular-nums; }
.psum__price small { font: 500 var(--step-0)/1 var(--font-text); letter-spacing: 0; }
.psum__later { font-size: var(--fs-small); color: var(--ink-soft); }
.psum__year { margin-top: var(--space-4); max-width: 50ch; }   /* the year-one line under the three prices (10 Oct 2026); 50ch since 11 Oct, about 65 characters */
/* Three across from 861px; stacked, each price on the right of its name, below that. */
@media (min-width: 861px) {
  .psum { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .psum li + li { border-top: 0; border-left: 1px solid var(--ash); }
  .psum a { grid-template-columns: minmax(0, 1fr); gap: var(--space-1); align-items: stretch; padding: var(--space-4) var(--space-4) var(--space-4); }
  .psum li:first-child a { padding-left: 0; }
  .psum__price { grid-column: auto; grid-row: auto; text-align: left; font-size: clamp(var(--step-3), 0.5rem + 1.9vw, var(--step-4)); }
}

.offer__more summary { list-style: none; display: inline-flex; align-items: center; gap: var(--space-2); min-height: 44px; margin-top: var(--space-2); font-weight: 600; cursor: pointer; }
.offer__more summary::-webkit-details-marker { display: none; }
.offer__more summary svg { width: 18px; height: 18px; clip-path: inset(0 0); transition: clip-path 0.3s var(--ease-out); }
.offer__more[open] summary svg { clip-path: inset(45% 0); }   /* open shows a minus */
.offer__more ul { margin-top: var(--space-1); }

.after1 { margin-block: var(--space-2); padding: clamp(var(--space-5), 3vw, var(--space-6)) clamp(var(--space-5), 3vw, var(--space-6)); border: 1px solid var(--ash); border-radius: var(--r-card); background: var(--card); }
.after1__title { font: 600 var(--fs-h3)/1.12 var(--font-display); letter-spacing: -0.008em; }
.after1__intro { margin-top: var(--space-2); color: var(--ink-soft); }
.after1__grid { display: grid; grid-template-columns: 1fr; gap: var(--space-3); margin-top: var(--space-4); }
@media (min-width: 861px) { .after1__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.after1__col { padding: var(--space-4) var(--space-5) var(--space-5); border: 1.5px solid var(--ash); border-radius: var(--r-input); background: var(--paper); }
.after1__col--care { border-color: var(--ink); background: var(--card); }
.after1__head { font-weight: 600; }
.after1__price { margin-top: var(--space-1); font: 500 var(--step-3)/1.1 var(--font-display); letter-spacing: -0.017em; font-variant-numeric: lining-nums tabular-nums; }
.after1__price small { font: 500 var(--step-0)/1 var(--font-text); letter-spacing: 0; }
.after1__col ul { margin: var(--space-3) 0 0; padding: 0 0 0 1.1em; font-size: var(--fs-small); color: var(--ink-soft); }
.after1__col li + li { margin-top: var(--space-1); }
.after1 + .offer { border-top-color: transparent; }

.offer__then strong { color: var(--ink); font-weight: 600; }

.offer--small { padding-block: clamp(var(--space-5), 2.6vw, var(--space-6)); }
.offer--small .offer__title { font-size: var(--step-1); letter-spacing: -0.008em; line-height: 1.15; }
.offer--small .offer__price { font-size: clamp(var(--step-2), 0.5rem + 1.5vw, var(--step-3)); }
.offer--small .offer__body { font-size: var(--fs-small); color: var(--ink-soft); }
.offer--small .offer__cta { margin-top: var(--space-3); }

@media (prefers-reduced-motion: reduce) {
  .offer__more summary svg { transition: none; }
  .pb__strip, .pb__monthly, .pb__switch input, .pb__switch input::before, .pb__step, .pb__opt { transition: none; }
  .pb__note:not([hidden]), .pb__mini.is-used { animation: none; }
  .pb__monthly { transform: none; }
}

/* "Will it pay for itself?" card (29 Oct 2026). Same card frame as the builder; hidden without JavaScript like #build. */
html:not(.js) #payback { display: none; }
.payback { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-5); padding: clamp(var(--space-4), 3vw, var(--space-6)); border-radius: var(--r-card); background: var(--card); border: 1.5px solid var(--ink); }
.payback__fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
@media (min-width: 601px) { .payback__fields { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; } }
.payback__field { display: grid; gap: var(--space-2); min-width: 0; }
.payback__input { display: flex; align-items: center; gap: var(--space-2); min-height: 52px; padding: 0 var(--space-4); border: 1.5px solid var(--ink); border-radius: var(--r-input); background: var(--paper); font: 500 var(--step-2)/1 var(--font-display); }
.payback__input:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; }
.payback__input input { flex: 1 1 auto; width: 100%; min-width: 0;   /* width: a number box's own size widened the card at 200% text */ min-height: 48px; border: 0; padding: 0; background: transparent; color: var(--ink); font: inherit; font-variant-numeric: lining-nums tabular-nums; }
.payback__input input:focus-visible { outline: none; }
.payback__result { padding: var(--space-4); border-radius: var(--r-input); background: var(--tone); font-size: var(--step-1); line-height: 1.5; }
.payback .pb__small { margin-top: 0; }

/* "What you pay, and when" table above the calculator (Astra first-time-buyer review, 18 Nov 2026) */
.costs { padding: clamp(var(--space-5), 3vw, var(--space-6)); border: 1px solid var(--ash); border-radius: var(--r-card); background: var(--card); }
.costs__title { font: 600 var(--fs-h3)/1.12 var(--font-display); letter-spacing: -0.008em; margin-bottom: var(--space-4); }
.costs__table { width: 100%; border-collapse: collapse; }
.costs__table th, .costs__table td { padding: var(--space-3) var(--space-3) var(--space-3) 0; border-top: 1px solid var(--ash); text-align: left; vertical-align: top; line-height: 1.45; }
.costs__table thead th { border-top: 0; font-size: 0.875rem; font-weight: 600; color: var(--ink-soft); }
.costs__table tbody th { font-weight: 600; width: 26%; }
.costs__table td:last-child { color: var(--ink-soft); }
@media (max-width: 700px) {   /* phones: one block per row, the question on top */
  .costs__table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .costs__table tr { display: block; padding: var(--space-3) 0; border-top: 1px solid var(--ash); }
  .costs__table th, .costs__table td { display: block; width: auto; padding: 0; border: 0; }
  .costs__table tbody th { width: auto; margin-bottom: var(--space-1); }
  .costs__table td + td { margin-top: var(--space-2); }
}
