/* The project configurator ("Tell us your idea"): src/partials/start.html, assets/js/start.js.
 *
 * A calm, focused flow: one question per screen in large type, on its own centred column (it does not depend on the
 * width of the panel around it). Big tiles only where the visitor chooses; optional questions fold away in
 * <details class="cfg-more">. A thin progress line and a compact "Steps" menu replace a step rail, and the price
 * stays in view as one quiet line at the bottom; its breakdown opens in the page flow, under the question. With JavaScript the section carries
 * .is-ready; without it every screen shows, one after another, as a plain form. Colours come only from the tokens
 * in site.css. */

.page--start main { padding-top: calc(var(--header-h) + 8px); }
.cfg [hidden] { display: none !important; }
.cfg dl, .cfg dd { margin: 0; }
.cfg fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.cfg legend { padding: 0; }
/* Whatever gets focus or is scrolled to stays clear of the header and of the price line at the bottom. */
.cfg input, .cfg textarea, .cfg button, .cfg summary { scroll-margin-top: calc(var(--header-h) + 120px); scroll-margin-bottom: 120px; }

.cfg__frame { max-width: 760px; margin-inline: auto; }

/* --------------------------------------------------------------- top row */

.cfg__top { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; }
.cfg__title { font-size: 1.125rem; font-weight: 640; line-height: 1.3; letter-spacing: -0.012em; }
.cfg__lead { max-width: 52ch; margin-top: 10px; color: var(--text-2); text-wrap: pretty; }
.cfg-progress { margin-top: 28px; }
.cfg-progress__text { font-size: 0.875rem; font-weight: 560; color: var(--text-2); font-variant-numeric: tabular-nums; }
.cfg-progress__bar { height: 2px; margin-top: 10px; overflow: hidden; border-radius: 2px; background: var(--line-strong); }
.cfg-progress__bar span { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; transition: transform 520ms var(--ease); }
.cfg__notice {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 20px; padding: 8px 8px 8px 16px;
  border: 1px solid var(--accent-line); border-radius: var(--r-m); background: var(--accent-soft); font-size: 0.9375rem;
}
.cfg__notice:empty { display: none; }
.cfg__notice-text { flex: 1 1 180px; }

/* A quiet pill button, shared by the steps menu, the notice and the price line. */
.cfg-steps__toggle, .cfg__notice-action, .cfg-price__toggle {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex: none; min-width: 44px; min-height: 44px; padding: 0 16px;
  border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--text);
  font-size: 0.9375rem; font-weight: 560; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background-color var(--fast) var(--ease), border-color var(--fast) var(--ease), transform 160ms var(--ease);
}
.cfg-steps__toggle:hover, .cfg__notice-action:hover, .cfg-price__toggle:hover { background: var(--surface-2); border-color: var(--field-border); }
.cfg-steps__toggle:active, .cfg__notice-action:active, .cfg-price__toggle:active { transform: translateY(1px); }
.cfg-steps__toggle:focus-visible, .cfg__notice-action:focus-visible, .cfg-price__toggle:focus-visible { border-radius: 999px; }
.cfg-steps__toggle .icon, .cfg-price__toggle .icon { width: 18px; height: 18px; }
.cfg-steps__toggle[aria-expanded='true'] { background: var(--surface-2); border-color: var(--field-border); }

/* ------------------------------------------------------------ steps menu */

.cfg-steps { position: relative; }
.cfg-steps__menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 20; width: min(300px, calc(100vw - 2 * var(--gutter)));
  padding: 6px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); box-shadow: var(--shadow-l);
  animation: cfg-pop 220ms var(--ease);
}
@keyframes cfg-pop { from { opacity: 0; transform: translateY(-6px); } }
.cfg-steps__item {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 0 10px; border: 0; border-radius: 10px;
  background: transparent; color: var(--text-2); font-size: 0.9375rem; font-weight: 520; text-align: left; cursor: pointer;
  transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease);
}
.cfg-steps__item:hover:not([aria-disabled='true']) { background: var(--surface-2); color: var(--text); }
.cfg-steps__item[aria-current='step'] { background: var(--accent-soft); color: var(--text); font-weight: 620; }
.cfg-steps__item[aria-disabled='true'] { cursor: default; }
.cfg-steps__item[aria-disabled='true'] .cfg-steps__name { opacity: 0.7; }
.cfg-steps__num {
  position: relative; display: inline-grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%;
  border: 1px solid var(--line-strong); font-size: 0.75rem; font-weight: 640; font-variant-numeric: tabular-nums;
}
.cfg-steps__item[aria-current='step'] .cfg-steps__num { border-color: transparent; background: var(--btn-bg); color: var(--btn-fg); }
.cfg-steps__item.is-done .cfg-steps__num { border-color: var(--accent-line); color: transparent; }
.cfg-steps__item.is-done .cfg-steps__num::after {
  content: ''; position: absolute; left: 50%; top: 50%; width: 9px; height: 5px; margin: -4px 0 0 -4.5px;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg);
}
.cfg-steps__foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px;
  margin-top: 6px; padding: 6px 4px 0 10px; border-top: 1px solid var(--line);
}
.cfg-steps__saved { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8125rem; color: var(--text-2); }
.cfg-steps__saved .icon { width: 15px; height: 15px; color: var(--ok); stroke-width: 2.2; }
.cfg-steps__reset {
  min-height: 44px; padding: 0 10px; border: 0; border-radius: 999px; background: transparent; color: var(--link);
  font-size: 0.875rem; font-weight: 600; cursor: pointer; transition: background-color var(--fast) var(--ease);
}
.cfg-steps__reset:hover { background: var(--accent-soft); }
.cfg-steps__reset:focus-visible { border-radius: 999px; }

/* ----------------------------------------------------------------- steps */

.cfg-form { margin-top: clamp(32px, 5vw, 56px); }
.cfg-step { --cfg-gap: clamp(24px, 3vw, 32px); display: flex; flex-direction: column; gap: var(--cfg-gap); min-width: 0; }
.cfg:not(.is-ready) .cfg-step + .cfg-step { margin-top: 56px; padding-top: 56px; border-top: 1px solid var(--line-strong); }
.cfg.is-ready .cfg-step:not([hidden]) { animation: cfg-step-in 480ms var(--ease) both; }
@keyframes cfg-step-in { from { opacity: 0; transform: translateY(12px); } }
.cfg-step__title {
  max-width: 18ch; font-size: clamp(1.875rem, 1.3rem + 2vw, 2.75rem); font-weight: 650; line-height: 1.08; letter-spacing: -0.032em;
  text-wrap: balance;
}
.cfg-step__title:focus { outline: none; }
.cfg-step__lead { max-width: 46ch; margin-top: 12px; font-size: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem); line-height: 1.5; color: var(--text-2); text-wrap: pretty; }
.cfg-step .form-summary { margin: 0; }
.cfg-step .field + .field { margin-top: 0; }

/* -------------------------------------------------------------- questions */

.cfg-q { min-width: 0; }
.cfg-q__label { display: block; margin-bottom: 12px; font-size: 0.9375rem; font-weight: 620; line-height: 1.4; color: var(--text); }
.field.cfg-q .cfg-q__label { margin-bottom: 8px; }
.cfg-q__label + .field__hint { margin-top: -6px; }
.field.cfg-q .cfg-q__label + .field__hint { margin-top: -2px; }
.cfg-q__after { margin: 14px 0 0; }
.cfg-q__req {
  display: inline-block; margin-left: 4px; padding: 1px 8px; border-radius: 999px; background: var(--surface-2);
  font-size: 0.75rem; font-weight: 600; color: var(--text-2); vertical-align: 1px;
}
.cfg-q--big .field__input--area { min-height: 196px; font-size: 1.125rem; line-height: 1.55; }
.field__hint:empty { display: none; }
.cfg-q > .field__error { margin-top: 10px; }
.cfg-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 24px 20px; }
.cfg-note {
  padding: 12px 14px; border: 1px solid var(--accent-line); border-radius: var(--r-s); background: var(--accent-soft);
  font-size: 0.9375rem; line-height: 1.5; color: var(--text);
}
.cfg-q > .cfg-note { margin-top: 14px; }
.cfg-note:empty { display: none; }
.cfg-usual { margin-bottom: 12px; font-size: 0.9375rem; color: var(--text-2); }
.cfg-usual:empty { display: none; }
.cfg:not(.is-ready) .cfg-usual { display: none; }

/* Counts for what is priced per unit, right under the choice that needs them. */
.cfg-counts { display: flex; flex-direction: column; gap: 20px; padding: 20px; border-radius: var(--r-m); background: var(--surface-2); }
.cfg-counts__row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px 28px; }
.cfg-counts__row > .field { flex: 1 1 220px; }
.cfg-counts__row > .cfg-q--stepper { flex: 0 1 auto; }

/* ------------------------------------------------------------------ tiles */
/* A real radio or checkbox stretched over each tile, invisible: the tile draws its state. */

.cfg-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.cfg-tiles--types { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .cfg-tiles--types { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* Seven products: Custom, the open-ended one, spans two columns, so both layouts end on a full row (4 + 4, or 2 + 2 + 2 + 2). */
.cfg-tiles--types .choice--span { grid-column: span 2; }
.cfg-tiles--scope, .cfg-tiles--care { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.cfg-tiles--style { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 560px) { .cfg-tiles--style { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.choice { position: relative; display: block; min-width: 0; }
.choice__input {
  position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer;
  -webkit-appearance: none; appearance: none;
}
.choice__input:disabled { cursor: not-allowed; }
.choice__box {
  position: relative; display: flex; height: 100%;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
  transition: border-color var(--fast) var(--ease), background-color var(--fast) var(--ease), box-shadow 240ms var(--ease), transform 220ms var(--ease);
}
.choice__input:hover + .choice__box { border-color: var(--field-border); }
.choice__input:checked + .choice__box { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.choice__input:focus-visible + .choice__box { outline: 2px solid var(--ring); outline-offset: 3px; }
.choice__input:disabled + .choice__box { opacity: 0.5; box-shadow: none; transform: none; }
.choice__input[aria-invalid='true'] + .choice__box { border-color: var(--error); }

.choice__mark {
  position: absolute; top: 16px; right: 16px; width: 20px; height: 20px; flex: none;
  border: 1.5px solid var(--field-border); border-radius: 6px; background: var(--surface);
  transition: background-color var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
.choice__input[type='radio'] + .choice__box .choice__mark { border-radius: 50%; }
.choice__input:checked + .choice__box .choice__mark { border-color: var(--accent); background: var(--accent); }
.choice__input[type='checkbox']:checked + .choice__box .choice__mark::after {
  content: ''; position: absolute; left: 50%; top: 50%; width: 9px; height: 5px; margin: -4px 0 0 -4.5px;
  border-left: 2px solid var(--btn-fg); border-bottom: 2px solid var(--btn-fg); transform: rotate(-45deg);
}
.choice__input[type='radio']:checked + .choice__box .choice__mark::after {
  content: ''; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: var(--surface);
}

/* Tiles: an icon, a name, and what it adds to the estimate, quietly at the foot. */
.choice--tile .choice__box { flex-direction: column; align-items: flex-start; gap: 12px; min-height: 44px; padding: 18px 46px 16px 18px; border-radius: var(--r-m); }
.choice--tile .choice__input:hover:not(:disabled) + .choice__box,
.choice--style .choice__input:hover:not(:disabled) + .choice__box { transform: translateY(-2px); box-shadow: var(--shadow-m); }
.choice--tile .choice__input:checked:hover + .choice__box,
.choice--style .choice__input:checked:hover + .choice__box { box-shadow: inset 0 0 0 1px var(--accent), var(--shadow-m); }
.choice--tile .choice__input:active:not(:disabled) + .choice__box,
.choice--style .choice__input:active:not(:disabled) + .choice__box { transform: translateY(0); }
.choice--wide .choice__box { padding: 22px 48px 20px 22px; }
/* Product tiles: the mark sits beside the icon, so the name can use the full width on narrow screens. */
.cfg-tiles--types .choice__box { min-height: 128px; padding: 16px 16px 14px; }
.cfg-tiles--types .choice__mark { top: 14px; right: 14px; }
.choice--compact .choice__box { gap: 8px; padding: 14px 42px 14px 16px; }
.choice--compact .choice__mark { top: 14px; right: 14px; }
.choice--toggle .choice__box { gap: 6px; }
.choice__icon { width: 26px; height: 26px; color: var(--accent); stroke-width: 1.6; }
.choice__text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.choice__title { font-size: 1rem; font-weight: 620; line-height: 1.3; letter-spacing: -0.006em; overflow-wrap: break-word; hyphens: auto; }
.choice--wide .choice__title { font-size: 1.125rem; }
.choice__body { font-size: 0.875rem; line-height: 1.45; color: var(--text-2); }
.choice--compact .choice__body { font-size: 0.8125rem; }
.choice__short { font-size: 0.875rem; font-weight: 600; color: var(--accent); }
.choice__meta { margin-top: auto; font-size: 0.8125rem; font-weight: 520; line-height: 1.4; color: var(--text-2); font-variant-numeric: tabular-nums; }
.choice__meta span:empty { display: none; }
.choice__meta .is-included { font-weight: 600; color: var(--ok); }
.choice__badge {
  align-self: flex-start; margin: 2px 0; padding: 1px 9px; border: 1px solid var(--accent-line); border-radius: 999px;
  background: var(--accent-soft); color: var(--text); font-size: 0.75rem; font-weight: 620;
}

/* Chips: shorter answers, in a wrapping row. */
.cfg-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.choice--chip { max-width: 100%; }
.choice--chip .choice__box { align-items: center; gap: 10px; min-height: 44px; padding: 10px 16px 10px 12px; border-radius: 22px; }
.choice--chip .choice__input:hover + .choice__box { background: var(--surface-2); }
.choice--chip .choice__input:checked + .choice__box { background: var(--accent-soft); }
.choice--chip .choice__input:active + .choice__box { transform: scale(0.98); }
.choice--chip .choice__mark { position: relative; top: auto; right: auto; width: 18px; height: 18px; border-radius: 5px; }
.choice--chip .choice__input[type='checkbox']:checked + .choice__box .choice__mark::after { width: 8px; height: 4px; margin: -3px 0 0 -4px; }
.choice--chip .choice__input[type='radio']:checked + .choice__box .choice__mark::after { width: 6px; height: 6px; margin: -3px 0 0 -3px; }
.choice--chip .choice__title { font-size: 0.9375rem; font-weight: 540; line-height: 1.35; }

/* Style direction: a small picture of each mood, drawn only with the brand tokens. */
.choice--style .choice__box { flex-direction: column; gap: 10px; padding: 10px 10px 14px; border-radius: var(--r-m); }
.choice--style .choice__text { padding: 0 30px 0 4px; }
.choice--style .choice__title { font-size: 0.9375rem; }
.choice--style .choice__mark { top: auto; bottom: 14px; right: 10px; }
.style-preview { position: relative; display: block; width: 100%; aspect-ratio: 16 / 10; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; }
.style-preview i { position: absolute; display: block; }
.style-preview--minimal { background: var(--snow); }
.style-preview--minimal i:nth-child(1) { left: 14%; top: 26%; width: 42%; height: 7%; border-radius: 2px; background: var(--graphite); }
.style-preview--minimal i:nth-child(2) { left: 14%; top: 42%; width: 60%; height: 4%; border-radius: 2px; background: var(--mist); }
.style-preview--minimal i:nth-child(3) { left: 14%; top: 64%; width: 22%; height: 12%; border-radius: 999px; border: 1px solid var(--graphite); }
.style-preview--bold { background: var(--deep); }
.style-preview--bold i:nth-child(1) { left: 10%; top: 18%; width: 70%; height: 22%; background: var(--snow); }
.style-preview--bold i:nth-child(2) { left: 10%; top: 48%; width: 46%; height: 12%; background: var(--glacier); }
.style-preview--bold i:nth-child(3) { right: -10%; bottom: -24%; width: 44%; aspect-ratio: 1; border-radius: 50%; background: var(--carbon); }
.style-preview--warm { background: color-mix(in srgb, var(--warning) 14%, var(--snow)); }
.style-preview--warm i:nth-child(1) { left: 10%; top: 16%; width: 38%; height: 68%; border-radius: 18px; background: color-mix(in srgb, var(--warning) 55%, var(--snow)); }
.style-preview--warm i:nth-child(2) { left: 56%; top: 24%; width: 32%; height: 9%; border-radius: 999px; background: var(--warning); }
.style-preview--warm i:nth-child(3) { left: 56%; top: 44%; width: 24%; height: 16%; border-radius: 999px; background: var(--graphite); }
.style-preview--premium { background: var(--carbon); }
.style-preview--premium i:nth-child(1) { left: 50%; top: 30%; width: 30%; height: 5%; margin-left: -15%; background: var(--snow); }
.style-preview--premium i:nth-child(2) { left: 50%; top: 46%; width: 50%; height: 1px; margin-left: -25%; background: var(--glacier); }
.style-preview--premium i:nth-child(3) { left: 50%; top: 58%; width: 20%; height: 12%; margin-left: -10%; border: 1px solid var(--glacier); }
.style-preview--technical {
  background-color: var(--surface-2);
  background-image: linear-gradient(var(--line-strong) 1px, transparent 1px), linear-gradient(90deg, var(--line-strong) 1px, transparent 1px);
  background-size: 12px 12px;
}
.style-preview--technical i { bottom: 16%; width: 14%; border-radius: 2px 2px 0 0; }
.style-preview--technical i:nth-child(1) { left: 18%; height: 34%; background: var(--layer-ui); }
.style-preview--technical i:nth-child(2) { left: 40%; height: 56%; background: var(--layer-api); }
.style-preview--technical i:nth-child(3) { left: 62%; height: 44%; background: var(--layer-data); }
.style-preview--playful { background: var(--ice); }
.style-preview--playful i { aspect-ratio: 1; border-radius: 50%; }
.style-preview--playful i:nth-child(1) { left: 12%; top: 20%; width: 30%; background: var(--layer-brand); }
.style-preview--playful i:nth-child(2) { left: 46%; top: 38%; width: 22%; background: var(--warning); border-radius: 8px; transform: rotate(14deg); }
.style-preview--playful i:nth-child(3) { left: 70%; top: 14%; width: 16%; background: var(--success); }

/* ------------------------------------------------- optional, folded away */

.cfg-more { border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); }
.cfg-more + .cfg-more { margin-top: calc(-1 * var(--cfg-gap)); border-top: 0; }
.cfg-more__summary {
  display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 8px 0; list-style: none; cursor: pointer;
  font-size: 1rem; font-weight: 580; color: var(--text); -webkit-tap-highlight-color: transparent;
}
.cfg-more__summary::-webkit-details-marker { display: none; }
.cfg-more__summary:focus-visible { outline-offset: 2px; border-radius: 8px; }
.cfg-more__summary:hover .cfg-more__title { color: var(--accent); }
.cfg-more__icon {
  position: relative; flex: none; width: 28px; height: 28px; border: 1px solid var(--line-strong); border-radius: 50%;
  transition: background-color 260ms var(--ease), border-color 260ms var(--ease), transform 360ms var(--ease);
}
.cfg-more__icon::before, .cfg-more__icon::after {
  content: ''; position: absolute; left: 50%; top: 50%; width: 10px; height: 1.6px; margin: -0.8px 0 0 -5px; border-radius: 2px;
  background: currentColor; transition: transform 360ms var(--ease);
}
.cfg-more__icon::after { transform: rotate(90deg); }
.cfg-more[open] .cfg-more__icon { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.cfg-more[open] .cfg-more__icon::after { transform: rotate(180deg); }
.cfg-more__title { flex: 1 1 auto; min-width: 0; transition: color var(--fast) var(--ease); }
.cfg-more__tag { flex: none; font-size: 0.8125rem; font-weight: 520; color: var(--text-2); }
.cfg-more__body { display: flex; flex-direction: column; gap: 28px; padding: 8px 0 32px; }
.cfg-more[open] .cfg-more__body { animation: cfg-more-in 320ms var(--ease); }
@keyframes cfg-more-in { from { opacity: 0; transform: translateY(-4px); } }

/* "Add it to the features" suggestions under an answer. */
.cfg-suggest { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: -16px; }
.cfg-suggest__text { font-size: 0.9375rem; color: var(--text-2); }
.cfg-suggest__add {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px;
  border: 1px dashed var(--accent-line); background: transparent; color: var(--link); font-size: 0.9375rem; font-weight: 600; cursor: pointer;
  transition: background-color var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
.cfg-suggest__add .icon { width: 18px; height: 18px; }
.cfg-suggest__add:hover { background: var(--accent-soft); border-color: var(--accent); }
.cfg-suggest__add:focus-visible { border-radius: 999px; }
.cfg-suggest__done { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: 0.9375rem; font-weight: 600; color: var(--ok); }
.cfg-suggest__done .icon { width: 18px; height: 18px; stroke-width: 2.2; }
.cfg-suggest__done:focus { outline: none; }
.cfg:not(.is-ready) .cfg-suggest { display: none; }

/* Counts: a number between − and + buttons. */
.stepper { display: inline-flex; align-items: center; gap: 8px; }
.stepper__button {
  display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0; border-radius: 50%;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background-color var(--fast) var(--ease), border-color var(--fast) var(--ease), transform 160ms var(--ease);
}
.stepper__button:hover { background: var(--surface-2); border-color: var(--field-border); }
.stepper__button:active { transform: scale(0.94); }
.stepper__button:focus-visible { border-radius: 50%; }
.stepper__input { width: 84px; text-align: center; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.stepper__input::-webkit-inner-spin-button, .stepper__input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.cfg:not(.is-ready) .stepper__button { display: none; }

/* Consent: a plain checkbox beside its sentence. */
.cfg-consent__label { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; font-weight: 560; line-height: 1.45; cursor: pointer; }
.cfg-consent__input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--accent); cursor: pointer; }
.cfg-consent__input[aria-invalid='true'] { outline: 2px solid var(--error); outline-offset: 2px; }
.cfg-consent__hint { margin: 0 0 0 34px; }
.cfg-consent .field__error { margin-left: 34px; }

/* ------------------------------------------------------------ navigation */
/* Back always sits on the left, Continue on the right. */

.cfg-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: clamp(36px, 5vw, 56px); }
.cfg-nav__back, .cfg-nav__review {
  display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: 0 16px 0 10px; border: 0; border-radius: 999px;
  background: transparent; color: var(--text-2); font-size: 1rem; font-weight: 560; cursor: pointer;
  transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease);
}
.cfg-nav__review { padding: 0 16px; border: 1px solid var(--line-strong); color: var(--text); }
.cfg-nav__back:hover, .cfg-nav__review:hover { background: var(--surface-2); color: var(--text); }
.cfg-nav__back:focus-visible, .cfg-nav__review:focus-visible { border-radius: 999px; }
.cfg-nav__back .icon { width: 18px; height: 18px; transition: transform 260ms var(--ease); }
.cfg-nav__back:hover .icon { transform: translateX(-2px); }
.cfg-nav__hint { margin-left: auto; font-size: 0.8125rem; color: var(--text-2); }
.cfg-nav__next { padding-right: 20px; }
.cfg-nav__next .icon { width: 18px; height: 18px; }
.cfg-nav__next:hover .icon { transform: translateX(2px); }
@media (hover: none), (max-width: 559px) {
  .cfg-nav__hint { display: none; }
  .cfg-nav__next { margin-left: auto; }
}
@media (max-width: 479px) {
  .cfg-nav__next { flex: 1 1 auto; }
  .cfg-nav__review { order: 3; width: 100%; justify-content: center; }
}

/* ---------------------------------------------------------------- review */

.cfg-review { display: flex; flex-direction: column; }
.cfg-review:empty { display: none; }
.cfg-review__group { padding: 18px 0 20px; border-top: 1px solid var(--line-strong); }
.cfg-review__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cfg-review__title { font-size: 1rem; font-weight: 640; }
.cfg-review__edit {
  flex: none; min-height: 44px; margin-right: -10px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent;
  color: var(--link); font-size: 0.9375rem; font-weight: 600; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px;
  cursor: pointer; transition: background-color var(--fast) var(--ease), text-decoration-thickness var(--fast) var(--ease);
}
.cfg-review__edit:hover { background: var(--accent-soft); text-decoration-thickness: 2.5px; }
.cfg-review__edit:focus-visible { border-radius: 999px; }
.cfg-review__list { display: grid; gap: 8px; margin-top: 6px; }
.cfg-review__row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 2px 20px; font-size: 0.9375rem; line-height: 1.5; }
.cfg-review__row dt { color: var(--text-2); }
.cfg-review__row dd { font-weight: 540; white-space: pre-line; overflow-wrap: anywhere; }
.cfg-review__none { margin-top: 4px; font-size: 0.9375rem; color: var(--text-2); }
@media (max-width: 559px) { .cfg-review__row { grid-template-columns: minmax(0, 1fr); } }
.cfg-review__estimate { margin-top: 8px; padding: 24px; border: 1px solid var(--accent-line); border-radius: var(--r-l); background: var(--accent-soft); }
.cfg-review__estimate-label { font-size: 0.875rem; font-weight: 600; color: var(--text-2); }
.cfg-review__estimate-value { margin-top: 4px; font-size: clamp(1.75rem, 1.3rem + 1.4vw, 2.25rem); font-weight: 660; line-height: 1.15; letter-spacing: -0.024em; font-variant-numeric: tabular-nums; }
.cfg-review__facts { display: flex; flex-wrap: wrap; gap: 8px 32px; margin-top: 12px; font-size: 0.9375rem; }
.cfg-review__facts dt { color: var(--text-2); }
.cfg-review__facts dd { font-weight: 600; }
.cfg-review__more { margin-top: 16px; border-top: 1px solid var(--accent-line); }
.cfg-review__more-toggle {
  display: inline-flex; align-items: center; min-height: 44px; margin-top: 6px; list-style: none; cursor: pointer;
  color: var(--link); font-size: 0.9375rem; font-weight: 600; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px;
}
.cfg-review__more-toggle::-webkit-details-marker { display: none; }
.cfg-review__more-toggle:focus-visible { border-radius: 6px; }
.cfg-review__subhead { margin-top: 16px; font-size: 0.875rem; font-weight: 640; color: var(--text-2); }
.cfg-review__note { margin-top: 14px; font-size: 0.875rem; line-height: 1.5; color: var(--text-2); }
.cfg-review__nojs { color: var(--text-2); }
.cfg.is-ready .cfg-review__nojs { display: none; }
.cfg-send { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 8px; }
.cfg-send__submit[aria-disabled='true'] { opacity: 0.75; cursor: progress; }
.cfg-send__copy {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 16px; border: 0; border-radius: 999px;
  background: transparent; color: var(--text); font-size: 0.9375rem; font-weight: 560; cursor: pointer;
  transition: background-color var(--fast) var(--ease);
}
.cfg-send__copy:hover { background: var(--surface-2); }
.cfg-send__copy:focus-visible { border-radius: 999px; }
.cfg-send__copy .icon { width: 18px; height: 18px; }
.cfg-send__hint { flex: 1 1 100%; font-size: 0.875rem; line-height: 1.5; color: var(--text-2); }
.cfg-send__copied { flex: 1 1 100%; font-size: 0.875rem; font-weight: 600; color: var(--text); }
.cfg-send__copied:empty { display: none; }
.cfg-step .form-status { margin-top: -8px; }
@media (max-width: 559px) { .cfg-send .button { width: 100%; } }

/* ------------------------------------------------------------ price line */
/* One slim line that stays in view at the bottom while the flow is on screen. Its breakdown opens in the page flow,
   under the current question (.cfg-price__sheet sits in the form, before Back and Continue), so it never covers a tile. */

.cfg-price { position: sticky; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 10; margin-top: 40px; }
.cfg-price__bar {
  display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 8px 8px 22px;
  border: 1px solid var(--line-strong); border-radius: 30px; background: var(--surface); box-shadow: var(--shadow-l);
}
.cfg-price__line { display: flex; flex: 1 1 auto; flex-wrap: wrap; align-items: baseline; gap: 0 10px; min-width: 0; line-height: 1.35; }
.cfg-price__label { font-size: 0.8125rem; font-weight: 560; color: var(--text-2); }
.cfg-price__value { font-size: 1.0625rem; font-weight: 660; letter-spacing: -0.01em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cfg-price__weeks { font-size: 0.875rem; color: var(--text-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cfg-price__weeks:empty { display: none; }
.cfg-price__weeks::before { content: '·'; margin-right: 10px; }
.cfg-price.is-empty .cfg-price__label { display: none; }
.cfg-price.is-empty .cfg-price__value { font-size: 0.9375rem; font-weight: 520; letter-spacing: 0; white-space: normal; color: var(--text-2); }
.cfg-price__toggle .icon { transition: transform 300ms var(--ease); }
.cfg-price.is-open .cfg-price__toggle .icon { transform: rotate(180deg); }
@media (max-width: 479px) {
  .cfg-price__bar { padding-left: 18px; }
  .cfg-price__toggle { width: 44px; padding: 0; }
  .cfg-price__toggle span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
.cfg-price__sheet {
  margin-top: clamp(32px, 4vw, 44px); padding: 22px 24px;
  border: 1px solid var(--line-strong); border-radius: var(--r-l); background: var(--surface);
  /* Brought into view clear of the header above and the price line below. */
  scroll-margin-top: calc(var(--header-h) + 24px); scroll-margin-bottom: 112px;
  animation: cfg-sheet-in 320ms var(--ease);
}
@keyframes cfg-sheet-in { from { opacity: 0; transform: translateY(-6px); } }
@media (max-width: 479px) { .cfg-price__sheet { padding: 18px 16px; } }
.cfg-price__title { font-size: 1rem; font-weight: 640; }
.cfg-price__moved { margin-top: 8px; font-size: 0.875rem; font-weight: 560; line-height: 1.45; }
.cfg-price__facts { display: grid; gap: 6px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-strong); font-size: 0.875rem; }
.cfg-price__facts div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; }
.cfg-price__facts dt { color: var(--text-2); }
.cfg-price__facts dd { font-weight: 600; }
.cfg-price__facts dd:empty, .cfg-price__facts div:has(dd:empty) { display: none; }
.cfg-price__subtitle { margin-top: 16px; font-size: 0.8125rem; font-weight: 640; color: var(--text-2); }
.cfg-price__note { margin-top: 14px; font-size: 0.8125rem; line-height: 1.45; color: var(--text-2); }

/* The estimate line by line: what, why (smaller), and the amount on the right. */
.cfg-breakdown { display: grid; margin-top: 6px; }
.cfg-breakdown__line {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px;
  padding: 8px 0; border-top: 1px solid var(--line); font-size: 0.875rem; line-height: 1.4;
}
.cfg-breakdown__line:first-child { border-top: 0; }
.cfg-breakdown__what { display: flex; flex: 1 1 9em; flex-direction: column; min-width: 0; }
.cfg-breakdown__label { font-weight: 560; }
.cfg-breakdown__detail { font-size: 0.8125rem; color: var(--text-2); }
.cfg-breakdown__amount { margin-left: auto; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cfg-breakdown__amount.is-included { color: var(--ok); }
.cfg-breakdown__line--total { margin-top: 2px; border-top: 1px solid var(--line-strong); font-size: 0.9375rem; }
.cfg-breakdown__line--total .cfg-breakdown__label, .cfg-breakdown__line--total .cfg-breakdown__amount { font-weight: 680; }
.cfg-breakdown--review .cfg-breakdown__line { border-color: var(--accent-line); }

/* ---------------------------------------------------------------- motion */
@media (prefers-reduced-motion: reduce) {
  .choice__input + .choice__box { transform: none !important; }
}

@media (forced-colors: active) {
  .choice__input:checked + .choice__box { border: 2px solid Highlight; }
  .choice__input:checked + .choice__box .choice__mark { background: Highlight; border-color: Highlight; }
  .cfg-steps__item[aria-current='step'] { outline: 2px solid Highlight; }
  .cfg-progress__bar span { background: Highlight; }
}
