/* Unit 38.4-4: split from results.css so every file stays ≤300 lines.
   Method link + print line, "Not sure" comparison rows, action-button group. */

.method-link {
  margin: 1.5rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--ec-slate-200);
  font-size: 0.8125rem;
  color: var(--ec-slate-500);
}

.method-link a { color: var(--ec-accent); text-decoration: underline; }
.print-only { display: none; }

.timing-compare { margin-top: 1.25rem; border: 1px solid var(--ec-slate-200); border-radius: 12px; padding: 0.75rem 0.875rem; background: var(--ec-slate-50); }
.timing-compare-title { margin: 0; font-size: 0.875rem; font-weight: 700; color: var(--ec-slate-900); }
.timing-compare-grid { display: grid; grid-template-columns: 1fr; gap: 0.5rem; margin-top: 0.625rem; }
@media (min-width: 768px) { .timing-compare-grid { grid-template-columns: repeat(3, 1fr); } }
.timing-compare-row { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; background: var(--ec-card); border: 1px solid var(--ec-slate-200); border-radius: 10px; padding: 0.5rem 0.625rem; }
.timing-compare-row.is-current { border-color: var(--ec-accent); box-shadow: inset 0 0 0 1px var(--ec-accent); }
.tc-label { font-size: 0.8125rem; color: var(--ec-slate-500); }
.tc-total { font-size: 0.9375rem; font-weight: 700; color: var(--ec-accent); white-space: nowrap; }

/* Unit 37.3: period timing note on the solar STC rebate row (rules stcNote). */
.scheme-timing { margin: 0.25rem 0 0; font-size: 0.8125rem; color: var(--ec-slate-600); }

/* Unit 38.4-1: the three action buttons sit in one row only when the results column is
   wide enough for each label on a single line; otherwise they stack full width. */
#results-card { container: ec-results / inline-size; }
#action-bar { grid-template-columns: 1fr; }
@container ec-results (min-width: 700px) { #action-bar { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.timing-compare-empty { margin: 0; font-size: 0.875rem; color: var(--ec-slate-600); }
.timing-compare-empty { margin: 0; font-size: 0.875rem; color: var(--ec-slate-600); }

/* Print chrome (also split from results.css). */
@media print {
  #site-nav, #hero, #quickstart, #programs, #how-strip, #sticky-total,
  .no-print, #calculator aside > p { display: none !important; }
  /* Unit 41.5: print always includes the folded breakdown. */
  details { display: block !important; }
  details > summary { display: none !important; }

  #footer-links { display: none !important; }
  #site-footer { border-top: 1px solid #d4d4d8; }
  #site-footer, #site-footer p { color: #000 !important; background: #fff !important; }

  body { background: #ffffff; color: #000000; }

  #results-card {
    background: #ffffff !important;
    color: #000000 !important;
    box-shadow: none !important;
    border: 1px solid #d4d4d8;
    padding: 0 !important;
  }

  #results, #results * { color: #000000 !important; }

  .scheme-check { color: var(--ec-accent) !important; }

  .scheme-card, .cost-section { border-color: #d4d4d8 !important; }
  .print-only { display: inline !important; }
}

/* Unit 37.2: "Not sure" — side-by-side federal totals per install period (mobile-first:
   one column stacks at 390px; three columns at 768px+). */

/* Unit 39.2: three headline numbers at the top of the results card — stacked on phones.
   Unit 41.7: side-by-side only when the RESULTS COLUMN is wide enough (container query —
   at ≥1024px the column is ~420px even though the viewport is wide, so the old 640px media
   query squeezed 3 numbers into ~105px columns and wrapped them mid-value). The font scales
   with the column; each value stays on one line (nowrap). The federal number (id total-2027)
   keeps the accent colour. Unit 61: the trio threshold below was corrected (700px was too low). */
.ec-headline {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.875rem;
  margin: 0.75rem 0 0;
}
/* Unit 61 FIX (owner report: with the desktop layout open on a phone the money value and the
   payback value overlap): the trio above is 3 x 1fr, and the results card content is only 700-927px
   wide in that band (the calculator grid is single-column below lg/1024px, so viewport 796-1023px),
   which gives 226-295px columns. A nowrap money range such as "$15,640 - $27,650" measures ~300-315px
   at the 36px cap of .ec-hl-num's clamp(); it cannot wrap (Unit 41.7), .ec-hl min-width:0 lets the
   column shrink, and the text then paints over the payback phrase's first line (measured overlap
   18x42px at 900px and 12x45px at 980px, light + dark - see tmp/u61_overlap_before.txt). Three
   columns need ~360px per column at 36px, so the threshold is a container width where that holds;
   below it the Unit 39.2 phone stack is used and every value sits on its own line. Unit 48 phone
   wrapping (.ec-hl-num-phrase) and the wide-desktop layout (the lg aside keeps the card at 356px of
   content, one value per row) are unchanged. */
@container ec-results (min-width: 1120px) {
  .ec-headline { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
}
.ec-hl { min-width: 0; }
.ec-hl-label {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  /* Unit 40.4: sentence case (the labels in results.js are already "Federal rebates" etc.). */
  text-transform: none;
  color: var(--ec-slate-500);
}
.ec-hl-num {
  margin: 0.25rem 0 0;
  font-family: "Plus Jakarta Sans", Inter, system-ui, sans-serif;
  font-size: clamp(28px, 4.2cqi, 36px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ec-slate-900);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.ec-hl:first-child .ec-hl-num { color: var(--ec-accent); }
/* Unit 48: payback phrases ("about 10.6 years or more", "more than 15 years") are longer than
   money values; on narrow phone columns they may wrap at word boundaries instead of clipping.
   Money headline values keep nowrap. */
.ec-hl-num-phrase { white-space: normal; }
.ec-hl-why { margin: 0.25rem 0 0; font-size: 0.75rem; color: var(--ec-slate-500); }
.ec-hl-note { margin: 0.625rem 0 0; font-size: 0.75rem; color: var(--ec-slate-500); }

/* Unit 47b: the two-line eligible/conditional split under the headline numbers. Line 1 repeats
   the federal figure; line 2 is the sourced "up to" conditional sum (display-only). Token
   colours flip in dark; slate-700 on the card matches the hero text (AA in both themes). */
.ec-est-split { margin: 0.625rem 0 0; display: grid; gap: 0.3125rem; }
.ec-est-line { margin: 0; font-size: 0.9375rem; font-weight: 600; line-height: 1.35; color: var(--ec-slate-700); }
.ec-est-line .ec-info-btn { margin-left: 0.375rem; }

/* Unit 60b (owner request, point 8) + Unit 62 (owner restructure): the savings rows live in the
   full breakdown under a "Running savings" heading (never in a total, payload or email — see
   results-model.js), and the results-card summary carries ONE range line above the fold.
   Existing tokens only: the heading mirrors .extras-heading (slate-500 on the card fill — AA in
   light + dark, as sampled by CONTRAST_STATES); label slate-900 + text slate-700 match the
   .ec-est-line AA pair; the summary line reuses that same pair. No green .scheme-check tick —
   these are running-cost estimates, not rebate rows. */
.other-savings-line { margin-top: 0.875rem; }
.other-savings-line-text {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ec-slate-700);
}
.other-savings-line .ec-info-btn { margin-left: 0.375rem; }
.running-savings { margin-top: 1.5rem; }
.running-savings-heading {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0.04em;
  color: var(--ec-slate-500);
}
.running-savings-list { margin: 0.625rem 0 0; padding: 0; list-style: none; display: grid; gap: 0.5rem; }
.running-savings-list li { padding: 0.5rem 0; border-top: 1px solid var(--ec-slate-200); font-size: 0.875rem; line-height: 1.4; }
.running-savings-label { font-weight: 700; color: var(--ec-slate-900); }
.running-savings-text { color: var(--ec-slate-700); }

/* Unit 41.8 (41.6) / 43.3: "when it's worth it" lines. The upgrade-grid standalone hints were
   removed (41.8) and the results' Next steps no longer renders them (Unit 53) — the same hint
   data now lives ONLY inside each upgrade's (i) panel. Unit 53 deleted the dead
   "#do-first .ec-hint" colour rule; the note + source styles below stay (panel use). */
.ec-hint-note { color: var(--ec-slate-500); font-style: italic; }
/* Unit 42.7: small "Source" link after a sourced hint. Colour inherits the hint text (same AA
   contrast in light + dark); the underline is the link affordance. */
.ec-hint-src { color: inherit; font-size: 0.8125rem; text-decoration: underline; text-underline-offset: 2px; }
.ec-hint-src:hover { color: var(--ec-accent); }

/* Unit 39.3: plain two-line intro above the headline numbers (no ALL-CAPS). */
.ec-hl-intro { margin: 0.75rem 0 0; font-size: 1.0625rem; font-weight: 600; color: var(--ec-slate-800); }
.ec-hl-rules { margin: 0.25rem 0 0; font-size: 0.75rem; color: var(--ec-slate-500); }

/* Unit 41.2: the suggestion card above the headline numbers + a 1.5 s soft fade on the
   headline numbers that changed after "Suggest best value for me". Unit 42.5: card-specific
   tokens so dark mode is a dark emerald fill with light-green text (was dark-on-dark). */
.ec-suggest-card {
  margin: 0.75rem 0 0;
  padding: 0.625rem 0.875rem;
  border-radius: 0.75rem;
  border: 1px solid rgb(var(--ec-t-suggest-border));
  background: rgb(var(--ec-t-suggest-bg));
  color: rgb(var(--ec-t-suggest-fg));
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.35;
}
.ec-hl-flash { animation: ec-hl-fade 1.5s ease-out 1; border-radius: 0.5rem; }
@keyframes ec-hl-fade {
  0% { background: rgb(var(--ec-t-hl-flash-start)); }
  100% { background: transparent; }
}
@media (prefers-reduced-motion: reduce) { .ec-hl-flash { animation: none; } }

/* Unit 41.3: the (i) info buttons + inline explanation panels (index only). Tokens flip in dark. */
.ec-info-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 9999px; flex: 0 0 auto;
  border: 1px solid rgb(var(--ec-t-slate-300)); color: rgb(var(--ec-t-slate-500));
  background: transparent; cursor: pointer; vertical-align: middle;
}
.ec-info-btn:hover { color: rgb(var(--ec-t-emerald-700)); border-color: rgb(var(--ec-t-emerald-400)); }
.ec-info-panel {
  margin: 0.5rem 0 0.25rem; padding: 0.625rem 0.875rem;
  border-radius: 0.75rem; border: 1px solid rgb(var(--ec-t-slate-200));
  background: rgb(var(--ec-t-slate-50)); color: rgb(var(--ec-t-slate-700));
  font-size: 0.8125rem; line-height: 1.45;
}
.ec-info-panel .ec-info-more { color: rgb(var(--ec-t-emerald-700)); font-weight: 600; text-decoration: underline; }
.ec-info-hint { margin-top: 0.625rem; padding-top: 0.5rem; border-top: 1px solid rgb(var(--ec-t-slate-200)); }
.ec-info-hint-title { margin: 0 0 0.25rem; font-weight: 700; color: rgb(var(--ec-t-slate-900)); }
.ec-info-hint-text { margin: 0; }
/* Unit 57b (owner request, point 7): the state-aware "no rebate for this" note inside an upgrade's
   (i) panel. Existing tokens only — slate-600 on the slate-50 panel fill is AA in light
   (7.2:1) and dark (11.5:1); CONTRAST_STATES samples it with the hint block. */
.ec-info-note { margin-top: 0.625rem; padding-top: 0.5rem; border-top: 1px solid rgb(var(--ec-t-slate-200)); color: rgb(var(--ec-t-slate-600)); }
/* Unit 71 C (owner report: at 390px cards in one row measured 72 vs 94px tall): the grid items
   STRETCH so both cards in a row match size. The old align-items:start / align-self:start only ever
   shrank the shorter card; it was NOT load-bearing for the absolute (i) panels — placeUpgradePanel
   (info.js) anchors every panel to the GRID (position:relative below) with a top computed from the
   real row bottoms, so equal-height stretch cannot move a panel (verified: the Unit 43.2 INFO block
   still finds panel.parentElement === the grid and 0 card movement at 390 + 1280). */
.upgrade-grid { position: relative; }
.ec-info-panel-row {
  position: absolute; left: 0; right: 0; z-index: 30; margin: 0;
  box-shadow: 0 18px 40px -24px rgba(15, 23, 42, .45);
}
.ec-info-panel-row::before {
  content: ""; position: absolute; top: -6px; left: 1.25rem; width: 12px; height: 12px;
  background: rgb(var(--ec-t-slate-50)); border-left: 1px solid rgb(var(--ec-t-slate-200));
  border-top: 1px solid rgb(var(--ec-t-slate-200)); transform: rotate(45deg);
}
/* align-self:start removed with the grid rule above (Unit 71 C) so wraps match row height. */
.upgrade-wrap { display: flex; flex-direction: column; align-items: flex-end; }
.upgrade-wrap .upgrade-card { flex: 1 1 auto; width: 100%; }
/* Unit 71 A: the VPP (i) button left the <label> (drawer.js .vpp-row-wrap), so the old
   `label.check-row .ec-info-btn` margin rule had nothing to match; wrap spacing lives in drawer.css. */
label.check-row .toggle-text { flex: 1 1 auto; }
.ec-info-fieldset { position: relative; }
/* Unit 71 B (owner report: the timing (i) sat buried under the "Jan-Jun 2027" pill): timing is the
   ONLY LEGEND-host fieldset (info.js FIELD_HOSTS), and the old absolute top:0 right:0 pin landed on
   the pill row. The button is now a static LAST CHILD of the fieldset, right-aligned below the pill
   grid (measured right edge on the grid's right edge, top below the last pill row at 390 AND 1280);
   bottom:0 was NOT used - the segmented grid already fills the fieldset, so it re-overlapped. */
.ec-info-fieldset > .ec-info-btn { position: static; display: flex; margin: 8px 0 0 auto; }

/* Unit 42.2: "Advanced options" — the Fine-tune <details> styled as a clear full-width button
   (chevron rotates when open; "(optional)" + a skip-this sentence). Closed by default at every
   width; Suggest no longer opens it. All colours are tokens → light + dark. */
.ec-details { border: 1px solid rgb(var(--ec-t-slate-200)); border-radius: 1rem; padding: 0; background: rgb(var(--ec-t-card)); }
.ec-details > .ec-details-summary {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.125rem 0.75rem;
  min-height: 44px; padding: 0.625rem 1rem; border-radius: 1rem;
  font-size: 0.9375rem; font-weight: 600; color: rgb(var(--ec-t-slate-800));
  cursor: pointer; list-style: none;
}
.ec-details > .ec-details-summary:hover { background: rgb(var(--ec-t-slate-50)); }
.ec-details > .ec-details-summary:focus-visible { outline: 2px solid rgb(var(--ec-t-emerald-500)); outline-offset: 2px; }
.ec-details > .ec-details-summary::-webkit-details-marker { display: none; }
.ec-details > .ec-details-summary::after {
  content: ""; width: 0.5rem; height: 0.5rem; flex: 0 0 auto; order: 1;
  border-right: 2px solid rgb(var(--ec-t-slate-500)); border-bottom: 2px solid rgb(var(--ec-t-slate-500));
  transform: rotate(45deg); transition: transform 0.15s ease-out;
}
.ec-details[open] > .ec-details-summary::after { transform: rotate(-135deg); }
.ec-details .ec-adv-label { order: 0; flex: 1 1 auto; }
.ec-details .ec-adv-opt { font-weight: 400; color: rgb(var(--ec-t-slate-500)); }
.ec-details .ec-adv-sub {
  order: 2; flex: 1 0 100%; font-weight: 400; font-size: 0.8125rem; line-height: 1.35;
  color: rgb(var(--ec-t-slate-500));
}
.ec-details-body { padding: 0.25rem 1rem 1rem; }
/* Unit 42.3 (Unit 70: the household select left with it; Unit 84: the "About your home" sub-heading
   went too — it had been left grouping a single control, and sat empty above "Calculate my rebates"
   whenever the state has no eligibility questions): the group is now just the state ticks, which carry
   their own <legend>. It must not paint its separator as an orphan rule when that fieldset is hidden
   (:has is already an established pattern here — components.css .upgrade-card:has(input:checked));
   with a real row present (VIC/WA/ACT) the separator still divides the sliders from the questions. */
.ec-home-group { display: grid; gap: 1.25rem; border-top: 1px solid rgb(var(--ec-t-slate-200)); padding-top: 1.25rem; }
.ec-home-group:has(> #state-toggles[hidden]) { display: none; }
@media (prefers-reduced-motion: reduce) { .ec-details > .ec-details-summary::after { transition: none; } }
