/* Design Your System — wizard styles. Deliberately minimal; the parent frame
   controls the outer chrome. Everything scopes under #app so a Shopify theme
   with aggressive resets won't collide. */
:root {
  --bg: #ffffff;
  --fg: #111418;
  --muted: #5a6270;
  --accent: #1350a8;
  --accent-fg: #ffffff;
  --border: #d8dde3;
  --border-strong: #a4adb7;
  --warn: #b45309;
  --ok: #15803d;
  --bad: #b91c1c;
  --card: #f7f8fa;
  --radius: 6px;
  --gap: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--fg);
  background: var(--bg);
}

#app {
  /* L6: widened from 780 → 1040 so the summary line row (title / qty / price)
     stops truncating title text and the multi-zone editor rows breathe. */
  max-width: 1040px;
  margin: 0 auto;
  /* N4: content-adaptive. Body no longer stretches to fill the viewport —
     footer sits directly after content. Prior L4 behavior (`height: 100vh` +
     `flex: 1` on body) left dead whitespace above the footer on short screens
     like Configure with a compact Trim row. Natural document flow handles
     tall content via normal page scroll. */
  display: flex;
  flex-direction: column;
  padding: 12px 20px;
}

.wiz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
/* P2: "Design Your System" is the heaviest, largest thing on screen. Step
   sizes: title (22/700) > step h2 (16/600) = audience question (16/600). */
.wiz-title { font-weight: 700; font-size: 22px; letter-spacing: -0.005em; }
/* N2: subtle text-button style for Restart. Not a primary CTA — small, muted,
   underline on hover. Confirm dialog fires before any wipe. */
.wiz-restart {
  height: auto;
  min-width: 0;
  padding: 4px 8px;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}
.wiz-restart:hover:not(:disabled) {
  background: none;
  color: var(--bad);
  text-decoration: underline;
}
/* Z5: "Need help?" — top-right, near Restart. Quiet, muted, opens the
   existing HVO chat widget via postMessage. Not a CTA. Never auto-opens. */
.wiz-help {
  height: auto;
  min-width: 0;
  padding: 4px 8px;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}
.wiz-help:hover:not(:disabled) {
  background: none;
  color: var(--accent);
  text-decoration: underline;
}
/* W4: bubble-dot progress track. Compact header cue — dots + connectors +
   labels sit inline on one line. Filled dot = completed, emphasised dot =
   current, muted outline = upcoming. Visited steps stay clickable. */
.wiz-crumbs { display: inline-flex; align-items: center; gap: 0; font-size: 12px; }
.wiz-step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  background: none;
  border: 0;
  color: var(--muted);
  font: inherit;
  cursor: default;
  line-height: 1.2;
}
.wiz-step-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: transparent;
  flex-shrink: 0;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.wiz-step-label { line-height: 1.2; }
.wiz-step.done { color: var(--fg); }
.wiz-step.done .wiz-step-dot {
  background: var(--accent);
  border-color: var(--accent);
}
.wiz-step.active { color: var(--fg); font-weight: 600; }
.wiz-step.active .wiz-step-dot {
  background: var(--fg);
  border-color: var(--fg);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}
.wiz-step.clickable {
  cursor: pointer;
  color: var(--accent);
}
.wiz-step.clickable:hover .wiz-step-label { text-decoration: underline; }
.wiz-step-connector {
  height: 2px;
  width: 20px;
  background: var(--border);
  flex-shrink: 0;
  transition: background .15s;
}
.wiz-step-connector.done { background: var(--accent); }
@media (max-width: 520px) {
  .wiz-step-label { display: none; }
  .wiz-step.active .wiz-step-label { display: inline; }
  .wiz-step-connector { width: 12px; }
}

.wiz-body {
  /* N4: content-height, no forced grow. Body sizes to its content so short
     screens (Configure with the compact Trim row) don't leave a screen of
     dead whitespace above the footer. Tall content (Summary) scrolls the
     page naturally. */
  flex: 0 1 auto;
  padding: 12px 0;
}
.wiz-loading { color: var(--muted); }

.wiz-footer {
  border-top: 1px solid var(--border);
  padding-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: #fff;      /* opaque so it never looks bled-through when body scrolls */
  flex-shrink: 0;
}
.wiz-verify { color: var(--muted); font-size: 13px; font-style: italic; }

/* Y6: lightning sweep across "Powered by ship2user AI" every ~7s. Same
   treatment as the Chat-Widget: a diagonal white highlight passes through
   the text once per cycle, brief and low-key. Uses background-clip:text so
   the shine appears through the letters, not on a rectangle behind them. */
.wiz-verify-text {
  display: inline-block;
  position: relative;
  color: var(--muted);
  background-image: linear-gradient(
    100deg,
    var(--muted) 0%, var(--muted) 40%,
    #ffffff 50%,
    var(--muted) 60%, var(--muted) 100%
  );
  background-size: 300% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: verify-sweep 7s ease-in-out infinite;
}
@keyframes verify-sweep {
  /* Long dwell in the neutral state; a fast shine passes through in the
     final ~800ms of each 7s cycle. Feels like a periodic accent, not a
     constant motion. */
  0%, 88%   { background-position: 100% 0; }
  100%      { background-position: 0 0; }
}
/* W5: "ship2user" is a hyperlink inside the swept text. Duplicate the sweep
   on the anchor so the shine crosses through it as one continuous motion —
   background-clip:text on the parent doesn't cascade to child elements. */
.wiz-verify-link {
  text-decoration: none;
  cursor: pointer;
  background-image: linear-gradient(
    100deg,
    var(--muted) 0%, var(--muted) 40%,
    #ffffff 50%,
    var(--muted) 60%, var(--muted) 100%
  );
  background-size: 300% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: verify-sweep 7s ease-in-out infinite;
}
.wiz-verify-link:hover { text-decoration: underline; }
@media (prefers-reduced-motion: reduce) {
  .wiz-verify-text { animation: none; color: var(--muted); -webkit-text-fill-color: currentColor; }
}
/* L7: buttons match the s2u portfolio look — solid primary, outline
   secondary, consistent 36px height, never wrap onto two lines. Long labels
   ("Produce formal quote / invoice · 3% code") stay single-line by
   preventing wrap; the container widens on desktop and buttons scroll on
   very narrow viewports rather than stacking mid-word.
   Q8: min-width is scoped to the footer action row (.wiz-actions button),
   NOT cascaded globally. A cascaded min-width bit us three times — L7
   button-wrap, Q1 qty-stepper, Q3 remove-btn — because chips, icon buttons,
   and inline controls all silently ballooned to 100px wide. */
button {
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  height: 36px;
  padding: 0 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: #fff;
  color: var(--fg);
  white-space: nowrap;
  transition: background 0.12s, border-color 0.12s;
}
button:hover:not(:disabled) { background: var(--card); border-color: var(--fg); }
button.primary {
  background: var(--accent);
  color: var(--accent-fg);
  border-color: var(--accent);
}
button.primary:hover:not(:disabled) { background: #0e3f88; border-color: #0e3f88; }
button:disabled { opacity: 0.5; cursor: not-allowed; }
/* Q8: the ONE place min-width belongs — real action buttons in the footer
   action row. Keeps Back / Continue / Add to cart visually consistent
   (short labels don't shrink smaller than the long ones next to them). */
.wiz-actions button { min-width: 100px; }
.wiz-actions button.link { min-width: 0; }
button.link {
  height: auto;
  min-width: 0;
  border: none; background: none;
  padding: 4px 6px;
  color: var(--accent);
  font-weight: 500;
}
button.link:hover:not(:disabled) { background: none; text-decoration: underline; }
/* Footer action row: allow horizontal scroll rather than stacking wrap. */
.wiz-actions { display: flex; gap: 8px; flex-wrap: nowrap; overflow-x: auto; }

/* P2/P8: step headings sit UNDER the wizard title in the hierarchy. Same
   weight/size as the audience question so those two read as peers on the
   sizing step. */
.step h2 { margin: 0 0 6px 0; font-size: 16px; font-weight: 600; }
.hint { color: var(--muted); margin: 0 0 16px 0; }

/* TASK 4 density pass: tighter step spacing where the step has enough
   structure that the default margins would push the footer offscreen. */
.step-tight h2   { margin-bottom: 2px; }
.step-tight .hint { margin-bottom: 10px; font-size: 13px; }

/* P4/Q4: sizing rows are flex, content-sized inputs. Labels and inputs each
   sit on their own baseline row — align-items: flex-start pins every label
   at the top and every input directly under it, so a field with a hint
   underneath doesn't push its neighbours out of line. */
.q-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-bottom: 4px;
  align-items: flex-start;
}
.q-grid label {
  font-size: 12px;
  gap: 4px;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
}
.q-grid input, .q-grid select { padding: 6px 8px; width: auto; }
.q-grid #country { width: auto; min-width: 8em; }
.q-grid #postal { width: 11ch; }
/* R3: number inputs need room for content + browser-native spinner (~15px).
   sqft: up to 5 digits (10000); cooling_tons: 4 chars (12.0) plus spinner. */
.q-grid input[name="sqft"] { width: 12ch; }
.q-grid select[name="stories"] { width: auto; min-width: 4em; }
.q-grid select[name="insulation"] { width: auto; min-width: 8em; }
.q-grid #cooling_tons { width: 10ch; }
@media (max-width: 620px) {
  .q-grid { gap: 10px 12px; }
}
/* Slim "optional" row — sits under the main q-grid. One field, no grid,
   subdued affordance for contractor inputs (e.g. heating_load_btuh).
   Q5: label above input (flex column) — display: block let the input flow
   inline next to the label text and collide with it. */
/* R6: label wraps input + hint, but max-width applies to INPUT only so the
   hint below can flow to its natural width and stay on one line. */
.q-optional { margin: 4px 0 6px; }
.q-optional label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 12px;
  color: var(--muted);
}
.q-optional input { padding: 6px 8px; max-width: 240px; }

/* V2: when audience is contractor/builder, heating-load and design-CFM come
   out of `.q-optional` into a normal-weight row — full label, standard font,
   not muted. Same input size; different affordance. */
.q-pro { margin: 4px 0 6px; }
.q-pro label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 13px;
  color: var(--fg);
  font-weight: 500;
}
.q-pro input { padding: 6px 8px; max-width: 240px; }
.q-pro .field-hint {
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.q-optional .field-hint {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* V1/R6: audience question — first thing on the sizing step. Compact
   vertical rhythm so the audience block, sizing row, and heating-load row
   read as one continuous form. */
.audience-block { margin: 2px 0 10px; }
/* P2: peer of the step h2 — same size + weight so the sizing step reads as
   two equal questions under the (heaviest) wizard title. */
.audience-q {
  font-size: 16px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 8px;
}
.audience-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.audience-chip {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--fg);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  transition: background .12s, border-color .12s, color .12s;
}
/* P5: same 4-state matrix as .chip (Y3). Default white; hover grey;
   selected blue; selected+hover darker blue. Never blank. Order matters —
   selected+hover has to win over selected AND over the generic hover rule
   above (matching specificity does the trick since both are one-class). */
.audience-chip:hover:not(:disabled):not(.selected) {
  background: var(--card);
  color: var(--fg);
  border-color: var(--fg);
}
.audience-chip.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.audience-chip.selected:hover:not(:disabled) {
  background: #0e3f88;
  border-color: #0e3f88;
  color: #fff;
}

/* V2: contractor-referral callout for homeowners. Subtle, one line,
   accent-tinted so it reads as a helpful next step, not an ad. */
.contractor-callout {
  margin-top: 10px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  background: var(--card);
  font-size: 13px;
  color: var(--fg);
  line-height: 1.35;
}
.contractor-callout .callout-link {
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
  font-weight: 500;
}
.contractor-callout .callout-link:hover { text-decoration: underline; }

/* V4: design-responsibility disclaimer on the summary. Muted, small,
   sits under the honesty badges. Copy comes from state.cfg.disclaimers. */
.summary-disclaimer {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
.field-hint {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  display: block;
  margin-top: 2px;
}
/* Y2: Total Tonnage colours differently when the value overrides the
   suggestion. Reads as "you've broken from the recommendation on purpose"
   without a warning tone (this is a designer input, not an error). */
#cooling_tons.is-custom {
  color: var(--accent);
  font-weight: 600;
  border-color: var(--accent);
}
.override-note {
  margin-top: 4px;
  padding: 4px 8px;
  font-size: 12px;
  color: var(--accent);
  background: #eaf0fa;
  border-left: 2px solid var(--accent);
  border-radius: 3px;
}
.suggestion .headline.custom { color: var(--accent); }
.suggestion-tight {
  margin: 8px 0 0;
  padding: 8px 10px;
  font-size: 13px;
}
.suggestion-tight .headline { margin-bottom: 2px; }
.suggestion-tight .rationale { font-size: 12px; }
/* R6: suppress the suggestion card while it has no content — an empty
   box was adding ~24px of dead space between the sizing row and the
   heating-load row on first paint. */
.suggestion:empty { display: none; }

.brand-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.brand-card {
  text-align: left;
  padding: 20px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--card);
  min-height: 90px;
}
.brand-card:hover { border-color: var(--accent); background: #fff; }
.brand-name { font-weight: 600; font-size: 16px; margin-bottom: 4px; }
.brand-sub { color: var(--muted); font-size: 13px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: var(--muted);
}
input, select {
  font: inherit;
  padding: 8px 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: #fff;
  color: var(--fg);
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }

.suggestion {
  margin: 16px 0;
  padding: 12px;
  background: var(--card);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  font-size: 14px;
}
.suggestion .headline { font-weight: 600; margin-bottom: 4px; }
.suggestion .rationale { color: var(--muted); font-size: 13px; }

.ton-override { margin-top: 16px; }

.field-list { display: flex; flex-direction: column; gap: 16px; }

/* TASK 4: two-column field grid. Fields with `.field-wide` span both columns
   (used for high-chip-count questions like heating_type / hvac_system). */
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
@media (max-width: 620px) {
  .field-grid { grid-template-columns: 1fr; }
}
.field-grid .field-wide { grid-column: 1 / -1; }

.field {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.field-label { font-weight: 600; margin-bottom: 3px; font-size: 13px; }
.field-help { color: var(--muted); font-size: 12px; margin-bottom: 6px; }
/* N1: forward-guidance pill on the current unanswered field. Reads as an
   invitation ("NEXT — choose your cooling system"), not a rebuke. Moves down
   the list as answers land. Kept subtle so it doesn't overpower the label. */
/* Y5: NEXT pill in high-contrast black — separates it visually from the
   selected-chip blue. Field border uses the same fg-black so the "focus on
   me" cue reads as its own layer, not the chip layer. */
.field.field-next { border-color: var(--fg); }
.field-next .field-label { color: var(--fg); }
.next-pill {
  display: inline-block;
  padding: 1px 6px;
  margin-right: 4px;
  border-radius: 3px;
  background: var(--fg);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  vertical-align: 1px;
}
.chip-row { display: flex; flex-wrap: wrap; gap: 4px; }

/* Section wrappers on the config step — primary choices (Fitment) and
   finishing details (Trim). P9: plain-language labels, no ALL-CAPS jargon. */
.config-section { margin-bottom: 12px; }
.config-section-title {
  font-size: 13px; font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
  padding: 0 2px;
}
/* P3: Trim & Finish — always-open block, no chevron. P4: 1×4 row (all 4
   trim questions side by side) so the section reads at a glance instead of
   wasting the right half of the container. */
.config-trim {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 10px;
}
.config-trim .config-section-title { margin-bottom: 6px; }
.trim-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
@media (max-width: 720px) {
  .trim-row { grid-template-columns: 1fr 1fr; }
}
.trim-row .field { border: none; padding: 0; }
.trim-row .field-label { font-size: 12px; margin-bottom: 4px; }
.trim-row .chip-row { flex-wrap: nowrap; }
.trim-row .field-help { font-size: 11px; margin-top: 4px; }
/* D3: chip density. Portfolio-wide bar per CONVENTIONS.md → keep pills
   compact. Font 11-12px, padding no more than 4px vertical / 10px horiz. */
.chip {
  padding: 3px 9px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: #fff;
  color: var(--fg);
  font-size: 12px;
  line-height: 1.3;
  cursor: pointer;
}
/* Y3: explicit chip states. The global `button:hover` rule was flipping a
   selected chip to the card colour on hover (looked "blanked"). Order:
   default:white, hover:grey, selected:blue, selected+hover:slightly-darker-blue.
   These override the generic button:hover with matching specificity. */
.chip:hover:not(:disabled):not(.selected):not(.illegal) {
  background: var(--card);
  color: var(--fg);
  border-color: var(--fg);
}
.chip.selected {
  background: var(--accent);
  color: var(--accent-fg);
  border-color: var(--accent);
}
.chip.selected:hover:not(:disabled) {
  background: #0e3f88;      /* darker accent — matches primary button hover */
  color: var(--accent-fg);
  border-color: #0e3f88;
}
.chip.illegal {
  background: #fdf2ef;
  color: var(--muted);
  border-style: dashed;
  cursor: help;
  position: relative;
}
.chip.illegal[data-reason]:hover::after {
  content: attr(data-reason);
  position: absolute;
  bottom: 110%;
  left: 0;
  background: #24303f;
  color: #fff;
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 12px;
  white-space: normal;
  min-width: 220px;
  max-width: 320px;
  z-index: 5;
}

/* P10: single meta block on the summary. Headline sentence + per-zone lines
   + assumptions all live inside one card — no separate "Per-zone breakdown"
   box. Reads top-to-bottom as one paragraph. */
.summary-meta {
  padding: 10px 12px;
  background: var(--card);
  border-radius: var(--radius);
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--muted);
}
.summary-meta strong { color: var(--fg); }
.summary-meta .meta-headline { color: var(--fg); font-size: 14px; margin-bottom: 4px; }
.summary-meta .meta-zones { margin-top: 4px; padding-top: 4px; border-top: 1px dotted var(--border); }
.summary-meta .meta-zone { padding: 2px 0; }
.summary-meta .meta-assumptions {
  margin: 6px 0 0; padding: 6px 0 0 18px;
  border-top: 1px dotted var(--border);
  color: var(--muted); font-size: 12px;
}
.summary-meta .meta-assumptions li { margin: 2px 0; }
.summary-lines { display: flex; flex-direction: column; }
/* Fitment-first section headers (see CONVENTIONS.md). Muted so they help the
   eye scan without pulling weight off the line items themselves. */
.line-section {
  padding: 8px 4px 4px;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.03em; text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.line-section:first-child { padding-top: 4px; }
/* Z7/Z8/P1: four numeric columns after the title. Quantity (stepper +
   unit-as-caption) · Price/Unit · Total Price · Remove. Fixed widths so
   every row's stepper starts at the same x — no float based on content.
   Title column is 1fr and never crossed by the numeric block.
   Q1: qty column widened to 100px (fits 28+22+28 stepper with a bit of
   breathing room); Q3: remove column tight at 18px, pulled adjacent to
   Total Price with a smaller trailing gap. */
.line, .line-header {
  display: grid;
  grid-template-columns: 1fr 100px 76px 76px 18px;
  gap: 8px;
  align-items: center;
  padding: 4px 4px;
}
.line { border-bottom: 1px dotted var(--border); }
.line-header {
  border-bottom: 1px solid var(--border);
  padding: 6px 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.line-header .h-num { text-align: right; }
.line .title { font-size: 13px; line-height: 1.25; }
.line .sku-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 1px;
}
.line .sku { color: var(--muted); font-size: 11px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; flex-shrink: 0; }
/* Z6/P1/Q1: quantity cell = stepper on top row, unit word as caption below.
   Column layout stops the unit word from competing for horizontal space
   with the stepper — a long unit ("assemblies") never clips the − button. */
.line .qty {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--fg);
  white-space: nowrap;
  min-width: 0;
}
.line .qty-plain { color: var(--muted); justify-content: center; }
.line .qty-stepper { display: inline-flex; align-items: center; gap: 2px; flex-shrink: 0; }
.line .qty-btn {
  width: 28px; height: 28px;
  padding: 0;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--fg);
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.line .qty-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.line .qty-btn:disabled { color: var(--muted); cursor: not-allowed; opacity: 0.5; }
.line .qty-num {
  min-width: 22px;
  text-align: center;
  font-weight: 500;
  padding: 0 2px;
  flex-shrink: 0;
}
.line .qty-unit {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.1;
  text-align: right;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* X2: truth-set-sourced typical qty rider. Muted italics, hover-shows-source
   via native title attribute so triage can see WHICH fixtures back it. */
.line .qty-typical {
  color: var(--muted);
  font-size: 10px;
  font-style: italic;
  margin-left: 6px;
  cursor: help;
}
.line .qty.adjusted .qty-num { color: var(--accent); }
/* Q2: price columns one step below the title (13→12) so they support the
   line, don't compete with it for visual weight. */
.line .price-unit,
.line .price-total {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  white-space: nowrap;
}
.line .price-unit.unavail,
.line .price-total.unavail { color: var(--muted); font-style: italic; font-size: 11px; }
.line .remove-btn {
  width: 20px; height: 20px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.line .remove-btn:hover { color: var(--bad); background: var(--card); }
.line.removed { opacity: 0.4; }
.line.removed .title { text-decoration: line-through; }

/* Z2 / Batch 3: alternates expander sits under a line. Compact, muted —
   doesn't shout for attention. Opens on click; the picker lets the customer
   pick a sibling catalog SKU for that slot. */
.line-alt {
  margin: 2px 4px 8px;
  padding: 2px 8px;
  border-left: 2px solid var(--border);
  font-size: 12px;
}
.line-alt-summary {
  color: var(--muted);
  cursor: pointer;
  padding: 2px 0;
  list-style: none;
  user-select: none;
}
.line-alt-summary::-webkit-details-marker { display: none; }
.line-alt-summary::before {
  content: "▸ ";
  display: inline-block;
  transition: transform .12s;
}
.line-alt[open] .line-alt-summary::before {
  transform: rotate(90deg);
}
.line-alt-summary:hover { color: var(--fg); }
.alt-selected-tag { color: var(--accent); font-style: italic; }
.line-alt-list {
  list-style: none;
  padding: 4px 0 0 14px;
  margin: 0;
}
.line-alt-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 3px 0;
}
/* H1: alternate item = human "why" first, SKU tucked below in muted mono.
   The customer reads what makes it different; the code is there for the
   installer / triage. */
.alt-desc { display: flex; flex-direction: column; min-width: 0; }
.alt-why { color: var(--fg); font-size: 12px; line-height: 1.25; }
.alt-sku {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  color: var(--muted);
  margin-top: 1px;
}
.alt-pick {
  padding: 3px 10px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--accent);
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  line-height: 1.1;
  height: auto;
  flex-shrink: 0;
}
.alt-pick:hover { border-color: var(--accent); background: var(--card); }

/* H2: homeowner / just_looking hide the alternates by default. A quiet
   "Show technical options" toggle at the bottom of the summary opens
   them (sets .show-tech on the summary section). Pro audiences see them
   uncollapsed and have no toggle. */
.dys-audience-homeowner .line-alt { display: none; }
.dys-audience-homeowner.show-tech .line-alt { display: block; }
.summary-tech-toggle { margin: 8px 0 4px; }
.show-tech-btn {
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
  font-weight: normal;
  height: auto;
  line-height: 1;
}
.show-tech-btn:hover { color: var(--accent); }
/* Y4: note inline to the right of the SKU, red italic, hard-capped at 2 lines
   via -webkit-line-clamp. Ellipsis if it runs long — full text lives on the
   internal spec + email. */
.line .line-note {
  color: var(--bad);
  font-style: italic;
  font-size: 11px;
  line-height: 1.25;
  min-width: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 11px;
  margin-left: 4px;
  vertical-align: 1px;
}
.badge-firm { background: #e6f4ea; color: var(--ok); }
.badge-est { background: #fff4e6; color: var(--warn); }
.badge-manual { background: #f0eef7; color: #5b3a86; }

.summary-total {
  display: flex;
  justify-content: space-between;
  padding: 12px 4px;
  font-size: 18px;
  font-weight: 600;
  border-top: 1px solid var(--border-strong);
  margin-top: 4px;
}
.summary-total .note { font-weight: 400; font-size: 12px; color: var(--muted); }
/* F1 interim: subtotal reads "confirmed at cart" for CA customers — muted +
   italic so it visually matches the per-line "we'll confirm" cells. */
.summary-total .subtotal-deferred {
  color: var(--muted);
  font-style: italic;
  font-size: 15px;
}
.summary-honesty { margin-top: 12px; font-size: 12px; color: var(--muted); }
/* N3: verification line beneath the estimate badges — reinforces "estimated"
   and "manual" by promising a human check before ship. Italic + muted so it
   reads as a footnote to the badge legend, not a headline. */
.summary-verify {
  margin-top: 6px;
  font-style: italic;
  color: var(--muted);
  font-size: 12px;
}

.err { color: var(--bad); font-size: 13px; margin-top: 6px; }

/* Inline notice shown above the Build button when buildStatus().ready is false.
   Deliberately visible — the whole point is that no silently-disabled button
   is acceptable. TASK 4: fits inside the viewport (max-height + internal
   scroll) so it never pushes the footer offscreen. Amber, not red — this is
   a "one more thing", not "something broke". */
.block-notice {
  margin-top: 8px;
  padding: 8px 10px;
  border-left: 3px solid var(--warn);
  background: #fff8ea;
  border-radius: 4px;
  font-size: 12px;
  max-height: 30vh;
  overflow-y: auto;
}
.block-notice-title { font-weight: 600; color: var(--warn); margin-bottom: 2px; font-size: 13px; }
.block-notice-body  { color: var(--fg); }
.block-notice-field { color: var(--muted); font-size: 11px; margin-top: 3px; }
.block-notice-field code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }
/* V1: exit paths under a validation block. Each fix is a link-styled button —
   either "Adjust sizing" (jumps back a step) or an in-place answer swap
   ("Switch to Normal 40 CFM outlets"). Never a dead-end validation. */
.block-notice-fixes {
  margin-top: 6px;
  display: flex; flex-wrap: wrap; gap: 4px;
}
.block-notice-fixes .link { font-size: 12px; padding: 2px 6px; }

/* Multi-system → zone-plan proposal. No red — this is a normal outcome, not
   an error. Tone matches .suggestion so oversized homes read as "here's the
   plan" rather than "you did something wrong". TASK 4: max-height + scroll
   so a long zone list never pushes the footer offscreen. */
.zone-plan {
  margin: 8px 0 0;
  padding: 10px;
  border-left: 3px solid var(--accent);
  background: var(--card);
  border-radius: 4px;
  font-size: 13px;
  max-height: 40vh;
  overflow-y: auto;
}
.zone-plan .headline { font-weight: 600; margin-bottom: 4px; }
.zone-plan .body { color: var(--muted); margin-bottom: 8px; }
.zone-plan .assumptions {
  margin-top: 8px; padding-top: 8px; border-top: 1px dotted var(--border);
  color: var(--muted); font-size: 12px;
}
.zone-plan .assumptions li { margin: 2px 0; }
.zone-plan .assumptions code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }

.zone-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
/* Q6: align-items: start so inputs sit on one baseline (top of each cell)
   and helper lines sit on the next baseline underneath. Every column carries
   the same two-row structure — input on top, hint under — so no cell centers
   itself against a taller neighbour. */
.zone-row {
  display: grid;
  grid-template-columns: 1.4fr 0.7fr 1.2fr 1.4fr auto;
  gap: 6px;
  align-items: start;
  padding: 6px 8px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
/* P6: header row above the zone editor. Left-aligned to match the inputs
   below (default left, so headers just need padding-left tuned to inputs). */
.zone-row-header {
  background: transparent;
  border: none;
  padding: 0 8px;
}
.zone-row-header .zh {
  font-size: 11px; font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em; text-transform: uppercase;
  text-align: left;
  padding-left: 2px;    /* aligns with input padding-left below */
}
/* Q6: every zone-row cell wraps input + hint in a vertical stack — Zone
   name, Tons, CFM, and Orientation all use the same structure so hints line
   up across the row. */
.label-cell, .tons-cell, .cfm-cell, .orient-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.zone-hint {
  font-size: 10px;
  color: var(--muted);
  padding: 0 4px;
  line-height: 1.3;
}
/* Legacy alias — kept while other surfaces might still reference it. */
.tons-range { font-size: 10px; color: var(--muted); padding: 0 4px; }
.cfm-marker { font-size: 10px; padding: 0 4px; }
.cfm-marker.cfm-derived { color: var(--muted); }
.cfm-marker.cfm-entered { color: var(--accent); }
.zone-row input, .zone-row select { padding: 6px 8px; font-size: 13px; width: 100%; }
.zone-row .zone-drop {
  border: none; background: none; color: var(--bad); cursor: pointer;
  font-size: 18px; padding: 2px 6px;
  height: auto;
  line-height: 1;
}
.zone-row.blocked { border-color: var(--warn); background: #fff8ea; }
.zone-row .zone-reason { grid-column: 1 / -1; color: var(--warn); font-size: 12px; }
.zone-add { margin-top: 8px; }

/* Below-ceiling zoning offer. Persistent, low-key, always available so real
   multi-AH designs (like D705 at 4.4t or D775 at 5.0t — designer-split for
   structural reasons, not capacity) have a discoverable path. */
.zone-offer {
  margin: 8px 0 0;
  padding: 8px 10px;
  background: var(--card);
  border-radius: 4px;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.zone-offer .link { padding: 2px 4px; font-size: 13px; }
.zone-offer-text { flex: 1; min-width: 240px; }

/* Talk-to-us block (over MAX_ZONES). Warm-brown, not alarming red. */
.zone-blocked {
  margin: 12px 0 0;
  padding: 12px;
  border-left: 3px solid var(--warn);
  background: #fff8ea;
  border-radius: 4px;
  font-size: 13px;
}
.zone-blocked .headline { font-weight: 600; color: var(--warn); margin-bottom: 4px; }
.zone-blocked .body { color: var(--fg); }

/* Session 9: per-input inline error text (postal on sizing). */
.field-error {
  display: block;
  color: var(--bad);
  font-size: 12px;
  margin-top: 4px;
  min-height: 1em;
}

/* R4: fields that block Continue on the sizing step get a QUIET amber pill
   next to the label — not-yet-answered is a nudge, not an error. Red is
   reserved for something that is actively wrong. The audience block gets a
   subtle amber left-border for scannability; the postal input carries no
   red outline. */
.needed-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #fff8ea;
  color: var(--warn);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  vertical-align: 1px;
}
.audience-block.needs-answer {
  border-left: 2px solid var(--warn);
  padding-left: 8px;
  margin-left: -10px;
}

/* R5: subtext beside the disabled Continue button. Small, muted-amber. */
.action-subtext {
  align-self: center;
  color: var(--warn);
  font-size: 12px;
  padding: 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 40ch;
}

/* Contact form (TASK 2): appears inline on the quote step. Reuses .grid-2
   with a spanning cell for the address line. */
.span-2 { grid-column: 1 / -1; }

/* B2: country line on the quote contact form. Stamps the auto-detected
   country + currency above the form fields so a Canadian sees the system is
   treating them correctly (no "US" default with an Ontario address). */
.contact-country-line {
  margin: 0 0 12px;
  padding: 6px 10px;
  background: var(--card);
  border-radius: 4px;
  font-size: 13px;
}
.contact-country-line .muted { color: var(--muted); }

/* TASK 2: rebate confirmation card shown after /quote succeeds. Emphasises
   the code + expiry without being loud. */
.rebate-card {
  margin: 16px 0 0;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rebate-line { font-size: 14px; }
.rebate-label { display: inline-block; min-width: 110px; color: var(--muted); }
.rebate-code {
  font: 15px ui-monospace, SFMono-Regular, Menlo, monospace;
  padding: 2px 6px;
  background: #fff;
  border: 1px dashed var(--border-strong);
  border-radius: 4px;
}
.rebate-note { color: var(--muted); font-size: 12px; margin-top: 6px; }

/* Session 9: summary answer recap. Deliberately understated — no persuasive
   copy, no color chrome, just the facts. */
.summary-recap {
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.summary-recap h3 { margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
/* D2: 3-column grid so 19 short values pack into ~7 rows rather than 19. */
.recap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px 12px;
}
@media (max-width: 620px) { .recap-grid { grid-template-columns: 1fr 1fr; } }
.recap-item {
  display: flex; justify-content: space-between; gap: 6px;
  padding: 3px 6px;
  border-bottom: 1px dotted var(--border);
  font-size: 12px;
}
.recap-item .rk { color: var(--muted); }
.recap-item .rv { color: var(--fg); text-align: right; }
