/* =========================================================================
   calculator.css — the ROI calculator page.

   Inherits the Delvia system from base.css and adds nothing to it: the same
   near-black ground, hairlines, pill controls, one cyan accent. The accent
   keeps its base.css meaning, reserved for what is interactive or genuinely
   exceptional; here that is the primary button, the chosen answer in each
   question, and the months in which the machine has already paid for itself.

   Two states share one layout. `data-state="preview"`: questions on the
   left, the machine being priced on the right. `data-state="result"`: the
   machine shrinks to a row and the answer takes its place, while the
   questions stay pinned beside it so every edit is seen as it happens.
   ========================================================================= */

.calc-page {
  --calc-neg: #5D6675;   /* balance still negative: --faint, 3.3:1 on the ground */
  --calc-sticky: 96px;
  /* Native parts (the consent checkbox, the device list, the city
     suggestions) are drawn for a dark page instead of as white squares. */
  color-scheme: dark;
}
.calc-page input { caret-color: var(--accent); }
/* Several pieces here set their own display, which would beat the browser's
   rule for [hidden]; this puts the attribute back in charge. */
.calc-page [hidden] { display: none !important; }

/* ---------- Campaign header and footer ---------- */
.site-header--focus .site-header__inner { min-height: 72px; }
.site-header--focus .site-header__cta { gap: .55rem; }
.site-header--focus .btn .icon { width: 17px; height: 17px; flex: none; }
.site-header__call { display: none; }
/* base.css hides outline buttons in the header on small screens, to make room
   for the menu toggle; this header has no menu, so its two buttons stay. */
.site-header--focus .site-header__cta .btn--outline { display: inline-flex; }
.site-header--focus .site-header__cta .site-header__call { display: none; }
body.calc-focus { padding-bottom: 0; }

.site-footer--focus { padding-block: 2rem 2.2rem; }
.site-footer--focus__inner {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: .8rem 2.5rem; font-size: .8rem; color: var(--dim);
}
.site-footer--focus__who { margin: 0; max-width: 70ch; }
.site-footer--focus__who a { margin-left: .35rem; }
.site-footer--focus__links { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem 1.3rem; margin: 0; padding: 0; }
.site-footer--focus a { transition: color .25s var(--ease); }
.site-footer--focus a:hover { color: var(--text); }

/* ---------- Opening ---------- */
.calc-hero { padding-block: clamp(26px, 4vw, 60px) clamp(56px, 6vw, 96px); }
.calc-hero__head { margin-bottom: clamp(22px, 2.8vw, 40px); }
.calc-hero__title {
  font-size: clamp(2rem, 4.2vw, 3.5rem);
  letter-spacing: -0.04em;
  max-width: 15em;
  margin-bottom: .32em;
}
.calc-hero__sub { color: var(--dim); font-size: clamp(1rem, 1.2vw, 1.14rem); margin: 0; }

/* ---------- The instrument ---------- */
.calc {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(20px, 3.2vw, 56px);
  align-items: start;
}

.calc-form {
  display: grid; gap: 22px; gap: clamp(20px, 2vw, 26px);
  background: var(--plate);
  border-radius: var(--r-lg);
  box-shadow: inset 0 0 0 1px var(--rule);
  padding: 26px; padding: clamp(20px, 2.2vw, 32px);
}
.calc-field { border: 0; margin: 0; padding: 0; min-width: 0; }
.calc-field__label {
  display: block; padding: 0; margin: 0 0 .8rem;
  font-family: var(--font-display); font-size: .96rem; font-weight: 600;
  letter-spacing: -0.012em; line-height: 1.3; color: var(--text);
}
.calc-field__hint { margin: .6rem 0 0; font-size: .8rem; line-height: 1.45; color: var(--dim); }

/* Choices: real radio buttons under the pills, so arrow keys, screen readers
   and the no-JS form all work without help. */
.calc-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.calc-chip { position: relative; display: inline-flex; }
.calc-chip input {
  position: absolute; inset: 0; width: 100%; height: 100%;
  margin: 0; opacity: 0; cursor: pointer;
}
.calc-chip span {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: .55rem 1.05rem;
  border: 1px solid var(--rule-lit); border-radius: 999px;
  color: var(--dim); font-size: .88rem; font-weight: 400; line-height: 1.2;
  transition: border-color .25s var(--ease), color .25s var(--ease), background-color .25s var(--ease);
}
.calc-chip input:checked + span {
  border-color: var(--accent); color: var(--text);
  background: color-mix(in srgb, var(--accent) 13%, transparent);
}
.calc-chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
.calc-chips--days { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.calc-chip--day { display: flex; }
.calc-chip--day span { width: 100%; padding-inline: .4rem; font-size: .95rem; font-variant-numeric: tabular-nums; }

.calc-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 20px); }
/* When one question wraps to two lines and its neighbour does not, the two
   controls still line up. */
.calc-pair > .calc-field { display: grid; grid-template-rows: auto auto 1fr; }
.calc-pair .calc-field__label { align-self: end; }

/* Steppers: the value is typed or nudged, and the whole control is the
   focus target, so the ring sits on the pill rather than inside it. */
.calc-stepper {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center;
  height: 54px; padding: 4px;
  border: 1px solid var(--rule-lit); border-radius: 999px;
  transition: border-color .25s var(--ease);
}
.calc-stepper:focus-within { border-color: var(--accent); }
.calc-stepper__btn {
  width: 44px; height: 44px; border: 0; border-radius: 50%; padding: 0;
  display: grid; place-items: center;
  background: transparent; color: var(--text); cursor: pointer;
  transition: background-color .2s var(--ease), transform .15s var(--ease);
}
.calc-stepper__btn .icon { width: 17px; height: 17px; }
.calc-stepper__btn:active { transform: scale(.92); }
.calc-stepper__btn:focus-visible { outline-offset: 0; border-radius: 50%; }
html:not(.js-enabled) .calc-stepper__btn { visibility: hidden; }
.calc-stepper__value { display: flex; align-items: baseline; justify-content: center; gap: .3rem; min-width: 0; }
.calc-stepper__input {
  width: 100%; min-width: 0; padding: 0; border: 0; background: transparent;
  color: var(--text); text-align: center;
  font-family: var(--font-display); font-size: 1.3rem; font-weight: 600;
  letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
  -moz-appearance: textfield; appearance: textfield;
}
.calc-stepper__input:focus { outline: none; }
.calc-stepper__input::-webkit-outer-spin-button,
.calc-stepper__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.calc-stepper__value--unit .calc-stepper__input { width: 3.3em; text-align: right; }
.calc-stepper__unit { color: var(--dim); font-size: .88rem; }

.calc-form__submit { width: 100%; --btn-pad: 1.12rem 1.7rem; font-size: 1rem; }

/* ---------- The stage: the machine, then the answer ---------- */
.calc-stage { min-width: 0; scroll-margin-top: var(--calc-sticky); }

.calc-device {
  display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  gap: clamp(20px, 2.6vw, 40px); align-items: center; position: relative;
}
/* The catalogue photographs machines on white; the plate is the one the
   product cards use, so the machine looks the same here as in the shop. */
.calc-device__media {
  display: block; position: relative; overflow: hidden;
  aspect-ratio: 1; border-radius: var(--r-lg);
  background: linear-gradient(180deg, #FFFFFF 0%, #F1F3F6 100%);
}
.calc-device__media::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .07); pointer-events: none;
}
.calc-device__media img {
  width: 100%; height: 100%; object-fit: contain; padding: 5%;
  transition: opacity .45s var(--ease), transform .9s var(--ease);
}
.calc-device__media img.is-swapping { opacity: 0; transform: scale(1.03); }
.calc-device__name {
  margin: 0 0 .55rem;
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.45rem, 2.3vw, 2.1rem); line-height: 1.08; letter-spacing: -0.035em;
}
.calc-device__name a { transition: color .25s var(--ease); }
.calc-device__meta { display: flex; flex-wrap: wrap; gap: .2rem .9rem; margin: 0 0 1.1rem; color: var(--dim); font-size: .95rem; }
.calc-device__meta span:empty { display: none; }
.calc-device__price { color: var(--text); font-weight: 400; font-variant-numeric: tabular-nums; }
.calc-device__note { margin: 0; max-width: 36ch; font-size: .86rem; line-height: 1.55; color: var(--dim); }
.calc-device__change { display: none; }

/* Empty state: the shape of the answer, drawn in the ground's own grey, so
   the reveal reads as the same chart coming to life. */
.calc-teaser { margin-top: clamp(20px, 2.4vw, 32px); padding-top: clamp(16px, 1.8vw, 22px); border-top: 1px solid var(--rule); }
.calc[data-state="result"] .calc-teaser { display: none; }
.calc-teaser__plot { min-height: 118px; }
.calc:not(.is-live) .calc-teaser__plot { display: none; }
.calc-teaser__text { margin: .9rem 0 0; max-width: 46ch; font-size: .88rem; line-height: 1.55; color: var(--dim); }
.calc-bars__ghost { fill: var(--rule-lit); }
.calc-bars--ghost .calc-bars__month { fill: var(--faint); }

/* Result state: the machine becomes the line that says what was priced. */
.calc[data-state="result"] .calc-device {
  grid-template-columns: 64px minmax(0, 1fr) auto; gap: 16px;
  padding-bottom: clamp(14px, 1.6vw, 20px); margin-bottom: clamp(18px, 2.2vw, 28px);
  border-bottom: 1px solid var(--rule);
}
.calc[data-state="result"] .calc-device__media { border-radius: var(--r); }
.calc[data-state="result"] .calc-device__media img { padding: 4%; }
.calc[data-state="result"] .calc-device__name { font-size: 1.1rem; letter-spacing: -0.02em; margin-bottom: .15rem; }
.calc[data-state="result"] .calc-device__meta { margin: 0; font-size: .86rem; }
.calc[data-state="result"] .calc-device__note { display: none; }
.calc.is-live[data-state="result"] .calc-device__change:not([hidden]) { display: inline-flex; }

/* ---------- The answer ---------- */
.calc-result { min-width: 0; }
.calc-result:not([hidden]) { animation: calc-rise .7s var(--ease) both; }
.calc-result__title { margin: 0 0 .9rem; scroll-margin-top: var(--calc-sticky); }
.calc-result__title:focus { outline: none; }
.calc-result__lead {
  display: block; margin-bottom: .4rem;
  font-size: clamp(1.05rem, 1.45vw, 1.28rem); font-weight: 400; letter-spacing: -0.012em;
  line-height: 1.35; color: var(--dim); text-wrap: pretty;
}
.calc-result__months {
  display: block;
  font-size: clamp(3.1rem, 6vw, 4.9rem); font-weight: 600;
  line-height: .98; letter-spacing: -0.04em; color: var(--text);
}
.calc-result__months:empty { display: none; }
.calc.is-negative .calc-result__lead { color: var(--text); font-size: clamp(1.3rem, 2vw, 1.7rem); }
.calc-result__profit {
  margin: 0 0 clamp(20px, 2.2vw, 28px);
  font-size: clamp(1.02rem, 1.35vw, 1.2rem); color: var(--dim);
}
.calc-result__profit strong { color: var(--text); font-weight: 600; white-space: nowrap; }

/* ---------- One bar per month ---------- */
.calc-chart { margin: 0 0 clamp(22px, 2.6vw, 32px); }
.calc:not(.is-live) .calc-chart { display: none; }
.calc-chart__caption {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: .35rem 1.4rem; margin-bottom: .9rem;
}
.calc-chart__title { font-size: .92rem; font-weight: 600; color: var(--text); }
.calc-chart__legend { display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; font-size: .8rem; color: var(--dim); }
.calc-chart__key::before {
  content: ""; display: inline-block; width: 10px; height: 10px; margin-right: .45rem;
  border-radius: 2px; vertical-align: -1px;
}
.calc-chart__key--neg::before { background: var(--calc-neg); }
.calc-chart__key--pos::before { background: var(--accent); }
.calc-chart__frame { position: relative; }
.calc-chart__plot { position: relative; min-height: 196px; border-radius: var(--r); touch-action: pan-y; }
.calc-chart__plot:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }

.calc-bars { display: block; overflow: visible; }
.calc-bars__zero { stroke: var(--rule-lit); stroke-width: 1; shape-rendering: crispEdges; }
.calc-bars__bar.is-neg { fill: var(--calc-neg); }
.calc-bars__bar.is-pos { fill: var(--accent); }
.calc-bars__hover { fill: rgba(243, 245, 248, .05); opacity: 0; transition: opacity .15s var(--ease-soft); }
.calc-bars__hover.is-on { opacity: 1; }
.calc-bars__month { fill: var(--dim); font-family: var(--font-mono); font-size: 11px; font-variant-numeric: tabular-nums; }
.calc-bars__month.is-payback { fill: var(--text); font-weight: 600; }
.calc-bars__label { fill: var(--text); font-family: var(--font-mono); font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; }
.calc-bars__label.is-accent { font-weight: 600; }

@media (prefers-reduced-motion: no-preference) {
  .calc-bars.is-growing .calc-bars__bar { transform-box: fill-box; animation: calc-grow .75s var(--ease) both; }
  .calc-bars.is-growing .calc-bars__bar.is-neg { transform-origin: 50% 0%; }
  .calc-bars.is-growing .calc-bars__bar.is-pos { transform-origin: 50% 100%; }
  .calc-bars.is-growing .calc-bars__label.is-late { animation: calc-rise .55s var(--ease) both; }
}
@keyframes calc-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes calc-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.calc-chart__tip {
  position: absolute; z-index: 3; pointer-events: none;
  display: grid; gap: .12rem; min-width: 128px;
  padding: .5rem .7rem; border-radius: var(--r);
  background: var(--plate-2); box-shadow: inset 0 0 0 1px var(--rule-lit), 0 10px 28px rgba(0, 0, 0, .45);
}
.calc-chart__tip strong { font-size: .95rem; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.calc-chart__tip span { font-size: .74rem; color: var(--dim); white-space: nowrap; }

.calc-chart__table { margin-top: .8rem; }
.calc-chart__table summary {
  display: inline-flex; cursor: pointer; list-style: none;
  font-size: .82rem; color: var(--dim);
  text-decoration: underline; text-decoration-color: var(--rule-lit); text-underline-offset: 4px;
}
.calc-chart__table summary::-webkit-details-marker { display: none; }
.calc-months { margin-top: .8rem; max-width: 420px; font-size: .84rem; font-variant-numeric: tabular-nums; }
.calc-months th, .calc-months td { padding: .32rem 0; text-align: left; font-weight: 400; color: var(--dim); }
.calc-months thead th { color: var(--text); font-weight: 600; padding-bottom: .5rem; border-bottom: 1px solid var(--rule-lit); }
.calc-months td { text-align: right; color: var(--text); }
.calc-months thead th:last-child { text-align: right; }
.calc-months tr.is-pos td { color: var(--text); font-weight: 600; }

/* ---------- Receipt and adjustments ---------- */
.calc-receipt, .calc-adjust { border-top: 1px solid var(--rule); }
.calc-receipt summary, .calc-adjust summary {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1rem 0; cursor: pointer; list-style: none;
  font-family: var(--font-display); font-size: .96rem; font-weight: 600; letter-spacing: -0.01em;
}
.calc-receipt summary::-webkit-details-marker, .calc-adjust summary::-webkit-details-marker { display: none; }
.calc-receipt summary::after, .calc-adjust summary::after { content: "+"; color: var(--accent); font-size: 1.2rem; font-weight: 400; }
.calc-receipt[open] summary::after, .calc-adjust[open] summary::after { content: "\2212"; }

/* The sum is set as measurement, so it gets the mono face; one rule above
   the total, like a till receipt, instead of a hairline under every line. */
.calc-receipt__table { width: 100%; font-family: var(--font-mono); font-size: .82rem; font-variant-numeric: tabular-nums; }
.calc-receipt__table th { padding: .42rem 1.2rem .42rem 0; text-align: left; font-weight: 400; color: var(--dim); }
.calc-receipt__table td { padding: .42rem 0; text-align: right; color: var(--text); white-space: nowrap; }
.calc-receipt__table .is-sum > * { border-top: 1px solid var(--rule-lit); padding-top: .75rem; color: var(--text); font-weight: 600; }
.calc-receipt__table .is-answer > * { color: var(--text); }
.calc-receipt__table .is-answer td { font-weight: 600; }
.calc-receipt__note { margin: .9rem 0 1.3rem; font-size: .8rem; line-height: 1.5; color: var(--dim); }

.calc-adjust__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .2rem 1.4rem; }
.calc-adjust__device { grid-column: 1 / -1; }
.calc-adjust .field label, .calc-lead .field label { color: var(--dim); }
.calc-adjust .field select { color: var(--text); background: transparent; }
.calc-adjust .field select option { background: var(--plate); color: var(--text); }
.calc-adjust__apply { margin-bottom: 1.2rem; }
.calc.is-live .calc-adjust__apply { display: none; }

/* ---------- The offer ---------- */
.calc-lead {
  margin-top: 32px; margin-top: clamp(24px, 3vw, 40px);
  padding: 28px; padding: clamp(22px, 2.6vw, 36px);
  background: var(--plate); border-radius: var(--r-lg);
  box-shadow: inset 0 0 0 1px var(--rule);
  scroll-margin-top: var(--calc-sticky);
}
.calc-lead__title { font-size: clamp(1.3rem, 2vw, 1.7rem); letter-spacing: -0.03em; margin-bottom: .45rem; }
.calc-lead__text { max-width: 52ch; margin-bottom: 1.3rem; color: var(--dim); }
.calc-lead__fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.4rem; }
.calc-lead .field { margin-bottom: .9rem; }
/* Boxed fields here: on the plate an underline alone disappears, and a form
   nobody can see is a form nobody fills. Same 4px corner as the rest of the
   system's small parts. */
.calc-lead .field input:not([type="checkbox"]) {
  padding: .8rem .9rem; font-size: 1rem;
  background: var(--bg); border: 1px solid var(--rule-lit); border-radius: var(--r);
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.calc-lead .field input:not([type="checkbox"]):focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
.calc-lead .field.has-error input:not([type="checkbox"]) { border-color: var(--danger); }
.calc-adjust .field input, .calc-adjust .field select { border-bottom-color: var(--rule-lit); }
.field__optional { font-weight: 400; }
.field__error { margin: .15rem 0 0; font-size: .8rem; line-height: 1.4; color: var(--danger); }
.field.has-error input { border-bottom-color: var(--danger); }
.calc-lead .field--check { margin-top: .2rem; flex-wrap: wrap; }
.calc-lead .field--check input { width: 18px; height: 18px; flex: none; margin-top: .2rem; }
.calc-lead .field--check label { flex: 1; min-width: 0; font-size: .8rem; }
.calc-lead .field--check .field__error { flex-basis: 100%; padding-left: calc(18px + .65rem); }
.calc-lead .field--check a { color: var(--text); text-decoration: underline; text-decoration-color: var(--rule-lit); text-underline-offset: 3px; }
.calc-lead__actions { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem 1.4rem; margin-top: 1.3rem; }
.calc-lead__submit[aria-busy="true"] { opacity: .75; cursor: progress; }
.calc-lead__promise { margin: 0; font-size: .86rem; color: var(--dim); }
.calc-lead__fail { margin: 1rem 0 0; }
.calc-lead__alt { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; margin: 1.4rem 0 0; font-size: .9rem; color: var(--dim); }
.calc-lead__wa { display: inline-flex; align-items: center; gap: .45rem; color: var(--text); font-weight: 600; transition: color .25s var(--ease); }
.calc-lead__wa .icon { width: 20px; height: 20px; color: var(--accent); }
.calc-lead__done:focus { outline: none; }
.calc-lead__done-title {
  display: flex; align-items: center; gap: .6rem; margin-bottom: .6rem;
  font-family: var(--font-display); font-size: clamp(1.2rem, 1.8vw, 1.5rem); font-weight: 600; letter-spacing: -0.02em;
}
.calc-lead__done-title .icon { width: 28px; height: 28px; color: var(--accent); flex: none; }
.calc-lead__done p { color: var(--dim); }
.calc-lead__done .calc-lead__done-title { color: var(--text); }
.calc-lead__done-urgent a { color: var(--text); font-weight: 600; }
.calc-lead .form-alert { color: var(--text); }

/* ---------- How it is calculated ---------- */
.calc-method__grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 88px); align-items: start;
}
.calc-method__intro h2 { max-width: 15em; }
.calc-method__intro .lead { margin: 0; }
.calc-formula { list-style: none; margin: 0; padding: 0; }
.calc-formula li { display: grid; gap: .3rem; padding: 1.15rem 0; border-top: 1px solid var(--rule); }
.calc-formula li:last-child { border-bottom: 1px solid var(--rule); }
.calc-formula__term { font-size: .82rem; color: var(--dim); }
.calc-formula__expr { font-family: var(--font-display); font-size: clamp(1.02rem, 1.4vw, 1.2rem); font-weight: 400; letter-spacing: -0.015em; line-height: 1.35; }
.calc-method__lists {
  grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 64px);
}
.calc-method__lists h3 { margin-bottom: .8rem; }
.calc-method__lists ul { margin: 0; padding-left: 1.1em; color: var(--dim); }
.calc-method__lists li { margin-bottom: .45em; }
.calc-method__lists div:first-child li::marker { color: var(--dim); }
.calc-method__lists div:last-child li::marker { color: var(--faint); }

/* ---------- Starting values ---------- */
.calc-defaults__head { max-width: 64ch; margin-bottom: clamp(24px, 3vw, 40px); }
.calc-defaults__head .lead { margin: 0; }
.calc-table-wrap { overflow-x: auto; scrollbar-color: var(--rule-lit) transparent; }
.calc-table { font-size: .9rem; min-width: 880px; }
.calc-table thead th {
  padding: 0 1.2rem .8rem 0; text-align: left; vertical-align: bottom;
  font-size: .76rem; font-weight: 400; color: var(--dim);
  border-bottom: 1px solid var(--rule-lit);
}
.calc-table tbody th, .calc-table tbody td {
  padding: 1.05rem 1.2rem 1.05rem 0; text-align: left; vertical-align: top;
  border-bottom: 1px solid var(--rule); color: var(--dim); font-weight: 400;
}
.calc-table tbody th { color: var(--text); font-weight: 600; }
.calc-table .is-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.calc-table tbody td.is-num { color: var(--text); }
.calc-table a { transition: color .25s var(--ease); }
.calc-table tbody th a { text-decoration: underline; text-decoration-color: var(--rule-lit); text-underline-offset: 4px; }
.calc-table__device { color: var(--text); }
.calc-table__note { margin: 1.2rem 0 0; max-width: 92ch; font-size: .8rem; line-height: 1.55; color: var(--dim); }

/* ---------- Questions ---------- */
.calc-faq__grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(24px, 4vw, 72px); align-items: start; }
.calc-faq__grid h2 { max-width: 10em; }
.calc-faq .faq-item:first-child { padding-top: 0; }
.calc-faq .faq-item p { max-width: 62ch; margin: .8rem 0 0; color: var(--dim); }
.calc-faq .faq-item .link-line { color: var(--text); font-size: .92rem; }
.calc-faq__close { margin: 1.6rem 0 0; color: var(--dim); }
.calc-faq__close a { color: var(--text); text-decoration: underline; text-decoration-color: var(--rule-lit); text-underline-offset: 4px; }

/* ---------- Pointer-only hovers ---------- */
@media (hover: hover) and (pointer: fine) {
  .calc-chip:hover span { color: var(--text); border-color: #3A4556; }
  .calc-chip input:checked + span:hover { border-color: var(--accent); }
  .calc-stepper__btn:hover { background: var(--plate-2); }
  .calc-device__name a:hover, .calc-table a:hover, .calc-lead__wa:hover, .calc-faq__close a:hover { color: var(--accent); }
  .calc-receipt summary:hover, .calc-adjust summary:hover, .calc-chart__table summary:hover { color: var(--text); }
}

/* ---------- Layout breakpoints ---------- */
@media (min-width: 1024px) {
  .calc[data-state="result"] .calc-form { position: sticky; top: var(--calc-sticky); }
}

@media (max-width: 1023px) {
  .calc { grid-template-columns: 1fr; }
  .calc-teaser { display: none; }
  .calc-device { grid-template-columns: 96px minmax(0, 1fr); gap: 16px; }
  .calc-device__media { border-radius: var(--r); }
  .calc-device__name { font-size: 1.2rem; letter-spacing: -0.02em; margin-bottom: .2rem; }
  .calc-device__meta { margin-bottom: .4rem; font-size: .9rem; }
  .calc-device__note { font-size: .8rem; }
  .calc-method__grid, .calc-faq__grid { grid-template-columns: 1fr; }
}

@media (max-width: 920px) {
  .site-header--focus .site-header__cta .site-header__call { display: inline-flex; }
}

@media (max-width: 860px) {
  /* The starting-values table becomes one block per treatment. */
  .calc-table { min-width: 0; }
  .calc-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .calc-table, .calc-table tbody, .calc-table tr { display: block; }
  .calc-table tbody tr { padding: 1rem 0; border-bottom: 1px solid var(--rule); }
  .calc-table tbody th, .calc-table tbody td {
    display: flex; justify-content: space-between; gap: 1rem;
    padding: .28rem 0; border: 0; text-align: right;
  }
  .calc-table tbody th { font-size: 1.05rem; padding-bottom: .5rem; text-align: left; }
  .calc-table tbody td::before { content: attr(data-label); color: var(--dim); text-align: left; font-weight: 400; }
  .calc-table tbody td { color: var(--text); }
}

@media (max-width: 560px) {
  /* Five treatments in one swipeable row instead of four stacked rows: the
     cut-off chip at the edge says there is more. */
  .calc-chips:not(.calc-chips--days) {
    flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x proximity; scrollbar-width: none;
    margin-inline: calc(-1 * clamp(20px, 2.2vw, 32px)); padding-inline: clamp(20px, 2.2vw, 32px);
    scroll-padding-inline: clamp(20px, 2.2vw, 32px);
  }
  .calc-chips:not(.calc-chips--days)::-webkit-scrollbar { display: none; }
  .calc-chips:not(.calc-chips--days) .calc-chip { flex: none; scroll-snap-align: start; }
  .calc-hero { padding-top: 20px; }
  .calc-hero__head { margin-bottom: 20px; }
  .calc-form { gap: 20px; }
  .calc[data-state="result"] .calc-device { grid-template-columns: 56px minmax(0, 1fr); gap: 4px 14px; }
  .calc[data-state="result"] .calc-device__media { grid-row: span 2; }
  .calc.is-live[data-state="result"] .calc-device__change:not([hidden]) { justify-self: start; grid-column: 2; }
}

@media (max-width: 640px) {
  .calc-method__lists, .calc-adjust__grid, .calc-lead__fields { grid-template-columns: 1fr; }
  .calc-lead { margin-inline: calc(var(--gutter) * -0.5); }
  .calc-receipt__table { font-size: .76rem; }
  .calc-receipt__table th { padding-right: .8rem; }
  .site-header--focus .site-header__cta { gap: .4rem; }
  .site-header--focus .btn--sm { --btn-pad: .6rem .85rem; }
}

@media (max-width: 400px) {
  .calc-pair { grid-template-columns: 1fr; }
  .calc-chip span { padding-inline: .85rem; font-size: .85rem; }
  .site-header--focus .site-header__call span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}

@media (prefers-reduced-motion: reduce) {
  .calc-result:not([hidden]) { animation: none; }
  .calc-device__media img.is-swapping { opacity: 1; transform: none; }
}
