/* solar.css — solar calculator page layout and section styles
 *
 * Editorial spread: the intro is the lede column, the form sits to the right
 * like a sidebar feature, the results section is a full-bleed pull-out below.
 */

/* ─── Page shell ─── */

.solar-page {
  max-width: var(--max-width-content);
  margin: 0 auto;
  padding: var(--space-16) var(--space-8) var(--space-8);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-12);
}

/* On desktop: intro + form side by side, results spans full width below */
@media (min-width: 900px) {
  .solar-page {
    grid-template-columns: 5fr 7fr;
    grid-template-rows: auto auto;
    align-items: start;
    column-gap: var(--space-16);
    padding-top: var(--space-20);
  }
  .solar-intro        { grid-column: 1; grid-row: 1; position: sticky; top: var(--space-8); }
  .solar-tabs-wrapper { grid-column: 2; grid-row: 1; display: grid; grid-template-rows: auto 1fr; align-items: start; }
  .solar-results      { grid-column: 1 / -1; grid-row: 2; }
}

/* ─── Intro section ─── */

.solar-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-body);
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--color-accent);
  margin: 0 0 var(--space-4);
  max-width: none;
}
.solar-eyebrow::before {
  content: "";
  width: var(--space-8);
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

.solar-intro h1 {
  font-size: clamp(var(--font-size-2xl), 5vw, var(--font-size-5xl));
  letter-spacing: -0.035em;
  margin-bottom: var(--space-6);
  line-height: 1.0;
}
.solar-intro h1 em {
  font-style: italic;
  color: var(--color-accent);
}

.solar-intro .lede {
  font-size: var(--font-size-lg);
  color: var(--color-text-muted);
  line-height: var(--line-height-loose);
  max-width: 38ch;
}

/* Architectural section drawing — a sun rising over a horizon, drawn fine */
.solar-decoration {
  margin-top: var(--space-8);
  width: 100%;
  max-width: 360px;
  height: auto;
  color: var(--color-accent);
  opacity: 0.85;
}
.solar-decoration .sun-disc {
  transform-origin: 50% 50%;
  animation: sun-breath 8s var(--ease-in-out) infinite;
}
.solar-decoration .ray {
  transform-origin: 180px 140px;
  stroke-dasharray: 12 6;
  animation: ray-pulse 4s var(--ease-in-out) infinite;
}
.solar-decoration .ray:nth-child(2) { animation-delay: 0.3s; }
.solar-decoration .ray:nth-child(3) { animation-delay: 0.6s; }
.solar-decoration .ray:nth-child(4) { animation-delay: 0.9s; }
.solar-decoration .ray:nth-child(5) { animation-delay: 1.2s; }
.solar-decoration .horizon {
  stroke-dasharray: 320;
  stroke-dashoffset: 0;
  animation: horizon-trace 1.6s var(--ease-out) both;
}
@keyframes sun-breath {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}
@keyframes ray-pulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}
@keyframes horizon-trace {
  from { stroke-dashoffset: 320; }
  to   { stroke-dashoffset: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .solar-decoration .sun-disc,
  .solar-decoration .ray,
  .solar-decoration .horizon {
    animation: none !important;
  }
}

/* ─── Form card ─── */

.solar-form {
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-12);
  box-shadow: var(--shadow-md);
  position: relative;
}
.solar-form::before {
  /* Pull-quote-style serial mark in the top-left corner */
  content: "Worksheet";
  position: absolute;
  top: var(--space-6);
  right: var(--space-6);
  font-family: var(--font-mono);
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--color-text-faint);
}

/* ─── Results section — editorial pull-out ─── */

.solar-results {
  position: relative;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-16) var(--space-12) var(--space-12);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  isolation: isolate;
}

.solar-results::before {
  /* Editorial running header — appears above the H2 like a kicker */
  content: "Estimate · Malta · 2026";
  position: absolute;
  top: var(--space-6);
  left: var(--space-12);
  right: var(--space-12);
  font-family: var(--font-body);
  font-size: var(--font-size-xs);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  border-bottom: 1px solid var(--color-border);
  padding-bottom: var(--space-3);
  display: flex;
  justify-content: space-between;
}

.solar-results[hidden] { display: none; }

.solar-results h2 {
  font-size: clamp(var(--font-size-2xl), 3vw, var(--font-size-3xl));
  margin-bottom: var(--space-4);
  letter-spacing: -0.03em;
}

/* ─── Metrics headline — the moneyshot ─── */

.results-headline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
  margin: var(--space-12) 0;
  padding-bottom: var(--space-12);
  border-bottom: var(--rule);
  position: relative;
}

.results-headline::before {
  /* a small architectural mark above */
  content: "";
  position: absolute;
  top: -8px;
  left: 0;
  width: 32px;
  height: 16px;
  background: var(--color-accent);
  clip-path: polygon(0 100%, 50% 0, 100% 100%);
}

@media (max-width: 540px) {
  .results-headline {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
  }
  .results-headline .metric:last-child {
    grid-column: 1 / -1;
  }
}

.metric {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  position: relative;
  padding-left: var(--space-4);
  border-left: 1px solid var(--color-border);
}
.metric:first-child {
  border-left: none;
  padding-left: 0;
}

.metric-value {
  font-family: var(--font-display);
  font-size: clamp(var(--font-size-3xl), 5vw, var(--font-size-5xl));
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 0.95;
  color: var(--color-text);
  font-variant-numeric: tabular-nums lining-nums;
  /* Animate value changes with a subtle pulse */
  transition: opacity var(--duration-base) var(--ease-out);
}
.metric-value[data-counting="true"] {
  color: var(--color-accent-deep);
}

.metric-label {
  font-family: var(--font-body);
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--color-text-muted);
}

/* ─── Chart container ─── */

.chart-container {
  position: relative;
  margin: var(--space-12) 0;
  height: 320px;
  width: 100%;
  padding: var(--space-6);
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--color-bg) 50%, transparent) 0%,
    transparent 100%
  );
  border-radius: var(--radius-md);
}
.chart-container::before {
  /* Section caption above the chart */
  content: "Fig 1 — Cumulative cash flow, 25 years";
  display: block;
  font-family: var(--font-mono);
  font-size: var(--font-size-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  margin-bottom: var(--space-4);
}

@media (min-width: 600px) {
  .chart-container { height: 380px; }
}

/* ─── Assumptions / breakdown ─── */

.assumptions {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  margin-bottom: var(--space-8);
  /* No overflow:hidden — tooltips need to escape this container.
     Rounded-corner clipping is handled by per-child border-radius below.
     position:relative is required so z-index applies (the data-reveal
     animation already turns this element into a stacking context via
     transform/will-change; position lets us promote it on tooltip hover). */
  position: relative;
}
.assumptions:has(.info-tooltip:hover),
.assumptions:has(.info-tooltip:focus-within) {
  /* The .lead-capture sibling is also a stacking context due to data-reveal,
     and comes later in DOM order — so it paints on top by default. Lift the
     entire panel above the lead-capture while a tooltip is open. */
  z-index: 30;
}

.assumptions summary {
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--font-size-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: var(--space-4) var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  list-style: none;
  color: var(--color-text-muted);
  border-radius: var(--radius-md);
  transition: color var(--duration-fast) var(--ease-out),
              background var(--duration-fast) var(--ease-out);
}
.assumptions[open] summary {
  /* When the panel is open, the dl below paints the bottom corners; the summary
     should only round its top corners so the hover bg meets the dl flush. */
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
.assumptions summary::-webkit-details-marker { display: none; }
.assumptions summary::before {
  content: '';
  width: 12px;
  height: 12px;
  border-right: 1.5px solid var(--color-accent);
  border-bottom: 1.5px solid var(--color-accent);
  transform: rotate(-45deg);
  transition: transform var(--duration-base) var(--ease-out);
  display: inline-block;
  margin-top: -3px;
}
.assumptions[open] summary::before {
  transform: rotate(45deg);
  margin-top: 0;
}
.assumptions summary:hover {
  color: var(--color-text);
  background: var(--color-accent-soft);
}
.assumptions:focus-within summary {
  color: var(--color-text);
}

.assumptions dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: var(--space-3) var(--space-12);
  margin: 0;
  padding: var(--space-6);
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
  border-bottom-left-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
}

.assumptions dt {
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  letter-spacing: 0.02em;
}
.assumptions dd {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--font-size-sm);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  color: var(--color-text);
  text-align: right;
}

/* ─── Lead capture ─── */

.lead-capture {
  margin-top: var(--space-12);
  padding: var(--space-12);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(
      135deg,
      var(--color-accent-soft) 0%,
      color-mix(in srgb, var(--color-accent-soft) 70%, var(--color-bg-deep)) 100%
    );
  border: 1px solid color-mix(in srgb, var(--color-accent) 25%, transparent);
  position: relative;
  overflow: hidden;
}
.lead-capture::before {
  content: "";
  position: absolute;
  top: -80px;
  right: -80px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--color-accent) 30%, transparent);
  pointer-events: none;
}

.lead-capture h3 {
  margin-bottom: var(--space-3);
  font-size: var(--font-size-2xl);
  max-width: 18ch;
}

.lead-capture > p {
  font-size: var(--font-size-base);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
  max-width: 38ch;
}

.lead-row {
  display: flex;
  gap: var(--space-3);
  align-items: stretch;
  max-width: 520px;
  position: relative;
}

.lead-row input[type="email"] {
  flex: 1;
  min-width: 0;
  background: var(--color-surface);
}

@media (max-width: 480px) {
  .lead-row {
    flex-direction: column;
  }
}

/* ─── Upgrade card ─── */

.upgrade-card {
  margin-top: var(--space-8);
  padding: var(--space-12);
  border-radius: var(--radius-lg);
  border: 1.5px dashed var(--color-border-hover);
  background: var(--color-bg);
  position: relative;
}
.upgrade-card::before {
  content: "Optional";
  position: absolute;
  top: var(--space-4);
  right: var(--space-6);
  font-family: var(--font-mono);
  font-size: var(--font-size-xs);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-text-faint);
}

.upgrade-card h3 {
  margin-bottom: var(--space-3);
  font-size: var(--font-size-xl);
}

.upgrade-card p {
  font-size: var(--font-size-base);
  color: var(--color-text-muted);
  margin-bottom: 0;
  max-width: 50ch;
}

.upgrade-card form {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-6);
  align-items: stretch;
  max-width: 520px;
}

.upgrade-card input[type="email"] {
  flex: 1;
  min-width: 0;
}

@media (max-width: 480px) {
  .upgrade-card form {
    flex-direction: column;
  }
}

/* ─── Lead status ─── */

.lead-status {
  display: block;
  margin-top: var(--space-3);
  font-size: var(--font-size-sm);
  font-style: italic;
  color: var(--color-success);
  min-height: 1.2em;
}

.lead-status.error {
  color: #b83232;
}

/* ─── Upgrade back link ─── */

.upgrade-back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  margin-top: var(--space-8);
  transition: color var(--duration-fast) var(--ease-out);
}
.upgrade-back-link:hover {
  color: var(--color-accent);
}

/* Override chart caption for upgrade page */
.upgrade-chart-container::before {
  content: "Fig 1 — Cumulative savings uplift, 25 years";
}

/* ─── Disclaimer ─── */

.disclaimer {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-6);
  margin-top: var(--space-12);
  max-width: 70ch;
  line-height: var(--line-height-loose);
}

/* ─── Section spacing for results internals ─── */
.solar-results [data-reveal] { transition-delay: var(--reveal-delay, 0ms); }

/* ─── Mobile adjustments ─── */

@media (max-width: 600px) {
  .solar-page {
    padding: var(--space-8) var(--space-4);
    gap: var(--space-12);
  }

  .solar-form {
    padding: var(--space-8) var(--space-6);
    border-radius: var(--radius-lg);
  }
  .solar-form::before { top: var(--space-4); right: var(--space-4); }

  .solar-results {
    padding: var(--space-12) var(--space-6) var(--space-8);
    border-radius: var(--radius-lg);
  }
  .solar-results::before {
    left: var(--space-6);
    right: var(--space-6);
  }

  .solar-results h2 {
    font-size: var(--font-size-xl);
  }

  .results-headline {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
  .metric {
    border-left: none;
    border-top: 1px solid var(--color-border);
    padding-left: 0;
    padding-top: var(--space-4);
  }
  .metric:first-child {
    border-top: none;
    padding-top: 0;
  }

  .metric-value {
    font-size: var(--font-size-3xl);
  }

  .lead-row {
    flex-direction: column;
  }

  .upgrade-card form {
    flex-direction: column;
  }

  .chart-container {
    height: 260px;
    padding: var(--space-3);
  }

  .assumptions dl {
    grid-template-columns: auto 1fr;
    gap: var(--space-2) var(--space-4);
  }
  .assumptions dd { text-align: right; }

  .lead-capture,
  .upgrade-card {
    padding: var(--space-8) var(--space-6);
  }
}

/* On desktop, allow the sticky intro to release once results expand below */
@media (min-width: 900px) and (max-height: 800px) {
  .solar-intro { position: static; }
}

/* Slider styles moved to components.css to be shared across all calculators */

/* ─── Tab strip ─── */

.solar-tab-strip {
  display: inline-flex;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--space-6);
  width: 100%;
}

.solar-tab {
  /* Reset button styles */
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  /* Tab appearance */
  flex: 1;
  text-align: center;
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-body);
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition:
    color var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out);
  white-space: nowrap;
}

.solar-tab:hover {
  color: var(--color-text);
}

.solar-tab[aria-selected="true"] {
  color: var(--color-accent);
  font-weight: 600;
  border-bottom-color: var(--color-accent);
}

.solar-tab:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm, 2px);
}

/* Panel transitions */
.solar-tab-panel {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity var(--duration-base, 200ms) var(--ease-out, ease),
    transform var(--duration-base, 200ms) var(--ease-out, ease);
}

.solar-tab-panel[hidden] {
  display: none;
}

/* Mobile: keep tabs inline, smaller text */
@media (max-width: 599px) {
  .solar-tab {
    font-size: var(--font-size-xs);
    padding: var(--space-2) var(--space-3);
  }
  /* Hide the "Worksheet" editorial mark on mobile — its top-right
     position overlaps the right-most tab label below 600px. */
  .solar-form::before {
    display: none;
  }
}

/* ─── Results panels (inside the shared results section) ─── */

.results-panel[hidden] {
  display: none;
}

/* ─── Map picker ─── */

.map-picker-svg:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

.map-picker {
  display: flex;
  justify-content: center;
  align-items: center;
  /* Span the full input column width; aspect-ratio keeps the
     rectangle shape regardless of how wide the form gets. */
  width: 100%;
  aspect-ratio: 7 / 5;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  cursor: crosshair;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
}

.map-picker-svg {
  display: block;
  width: 100%;
  height: 100%;
  flex-shrink: 0;
}

/* SVG background — matches page parchment */
.map-bg {
  fill: var(--color-bg, #FAF8F3);
}

/* Island outlines — thin charcoal stroke, very faint fill */
.map-islands .map-island {
  fill: var(--color-accent-soft, #F5E6D8);
  stroke: var(--color-text, #1C1917);
  stroke-width: 2.8;       /* 2.8 in original coords → ~1.06px at our scale */
  stroke-linejoin: round;
  stroke-linecap: round;
  paint-order: stroke fill;
}

/* Comino: tiny filled dot */
.map-island-dot {
  fill: var(--color-accent-soft, #F5E6D8);
  stroke: var(--color-text, #1C1917);
  stroke-width: 2.8;
}

/* Marker group — hidden until first click */
.map-marker-group {
  display: none;
}
.map-marker-group--visible {
  display: block;
}

/* Ripple animation — pure CSS, expands from 0 → 30px radius, fades out */
.map-ripple {
  fill: none;
  stroke: var(--color-accent, #C4622D);
  stroke-width: 1.5;
  opacity: 0;
  r: 0;
}

.map-ripple--active {
  animation: map-ripple-expand 600ms var(--ease-out, cubic-bezier(0.16, 1, 0.3, 1)) forwards;
}

@keyframes map-ripple-expand {
  0%   { r: 0;  opacity: 0.9; stroke-width: 2; }
  100% { r: 30; opacity: 0;   stroke-width: 0.5; }
}

/* Pin marker — sienna filled circle, scales in with spring overshoot */
.map-pin {
  fill: var(--color-accent, #C4622D);
  stroke: var(--color-surface, #FFFFFF);
  stroke-width: 1.5;
  r: 6;
  transform-origin: center center;
  transform: scale(0);
  opacity: 0;
  transition: none;
}

.map-pin--in {
  animation: map-pin-spring 380ms var(--ease-spring, cubic-bezier(0.34, 1.56, 0.64, 1)) forwards;
}

@keyframes map-pin-spring {
  0%   { transform: scale(0); opacity: 0; }
  60%  { opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .map-ripple--active {
    animation: none !important;
    opacity: 0 !important;
  }
  .map-pin--in {
    animation: none !important;
    transform: scale(1) !important;
    opacity: 1 !important;
  }
}

/* ─── Bill before/after callout ─── */

.bill-callout {
  margin: var(--space-8) 0 var(--space-12);
  padding: var(--space-6) var(--space-8);
  background: linear-gradient(
    135deg,
    var(--color-accent-soft) 0%,
    color-mix(in srgb, var(--color-accent-soft) 50%, var(--color-bg)) 100%
  );
  border: 1px solid color-mix(in srgb, var(--color-accent) 22%, transparent);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  text-align: center;
}

.bill-callout-line {
  font-family: var(--font-display);
  font-size: clamp(var(--font-size-xl), 3.5vw, var(--font-size-3xl));
  letter-spacing: -0.02em;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: var(--space-3);
  font-variant-numeric: tabular-nums;
}

.bill-callout-was {
  color: var(--color-text-muted);
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
  text-decoration-color: color-mix(in srgb, var(--color-text-muted) 60%, transparent);
}

.bill-callout-arrow {
  color: var(--color-accent);
  font-family: var(--font-body);
  font-size: var(--font-size-xl);
}

.bill-callout-now {
  color: var(--color-accent-deep, var(--color-accent));
  font-weight: 500;
}

.bill-callout-hint {
  font-family: var(--font-body);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  max-width: 60ch;
  margin: 0 auto;
}

@media (max-width: 600px) {
  .bill-callout-line { flex-direction: column; gap: var(--space-1); }
  .bill-callout-arrow { transform: rotate(90deg); }
}

/* ─────────────────────────────────────────────
 * Scenario comparison — grant route vs no-grant route
 *
 * Lives inside #results-new (new-install tab only — Option B retrofit is
 * grant-only). Two cards side-by-side on desktop; whichever has the higher
 * 25-year net benefit gets .is-recommended (sienna accent + "Recommended"
 * badge). Caveat block under no-grant flags the 12.8 GWh national cap.
 */
.scenario-compare {
  margin-block: var(--space-8) var(--space-6);
}

.scenario-compare > h3 {
  font-family: var(--font-display);
  font-size: clamp(var(--font-size-xl), 2.6vw, var(--font-size-2xl));
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 var(--space-2);
  color: var(--color-text);
}

.scenario-compare-lede {
  color: var(--color-text-muted);
  max-width: 58ch;
  margin: 0 0 var(--space-6);
  line-height: var(--line-height-loose);
}
.scenario-compare-lede em {
  font-style: italic;
  color: var(--color-text);
}

.scenario-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
}
@media (max-width: 720px) {
  /* Stacked cards: bump the gap so the .scenario-badge (which floats 12px
     above each card) doesn't overlap the bottom of the card above it. */
  .scenario-grid { grid-template-columns: 1fr; gap: var(--space-8); }
}

/* Tie-state copy that appears above the cards when neither route wins by
   more than the €200 dead-zone. Sits below the lede, above the grid. */
.scenario-compare-tie {
  margin: 0 0 var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-left: 3px solid var(--color-text-faint);
  background: var(--color-bg-deep);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  line-height: var(--line-height-loose);
  max-width: 65ch;
}

.scenario-card {
  position: relative;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  background: var(--color-surface);
  transition:
    border-color var(--duration-base) var(--ease-out),
    box-shadow   var(--duration-base) var(--ease-out);
}
.scenario-card.is-recommended {
  border-color: var(--color-accent);
  box-shadow:
    0 0 0 1px var(--color-accent),
    0 8px 24px -12px rgba(196, 98, 45, 0.25);
}

.scenario-badge {
  display: none;
  position: absolute;
  top: -12px;
  left: var(--space-6);
  background: var(--color-accent);
  color: #fff;
  font-family: var(--font-body);
  font-size: var(--font-size-xs);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
}
.scenario-card.is-recommended .scenario-badge { display: inline-block; }

.scenario-card > header {
  margin: 0 0 var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border);
}
.scenario-card > header h4 {
  font-family: var(--font-display);
  font-size: var(--font-size-lg);
  letter-spacing: -0.015em;
  margin: 0 0 var(--space-2);
  color: var(--color-text);
}
.scenario-card > header p {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin: 0;
  line-height: var(--line-height-loose);
}

.scenario-card dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-2) var(--space-6);
  margin: 0;
  align-items: baseline;
}
.scenario-card dt {
  font-family: var(--font-body);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin: 0;
}
.scenario-card dd {
  font-family: var(--font-mono);
  font-size: var(--font-size-sm);
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--color-text);
  text-align: right;
  margin: 0;
}
/* Net benefit gets headline weight — it's the number that drives the
   recommendation, so the eye should land on it. */
.scenario-card dd[data-result-grant="netBenefit25y"],
.scenario-card dd[data-result-nogrant="netBenefit25y"] {
  font-weight: 600;
  font-size: var(--font-size-base);
  color: var(--color-text);
}
.scenario-card.is-recommended dd[data-result-grant="netBenefit25y"],
.scenario-card.is-recommended dd[data-result-nogrant="netBenefit25y"] {
  color: var(--color-accent-deep);
}

/* Reusable caveat block. Lives in solar.css for now; promote to components.css
   if any other calculator adopts the pattern. */
.result-caveat {
  margin-block-start: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-left: 3px solid var(--color-accent);
  background: var(--color-bg-deep);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  line-height: var(--line-height-loose);
  max-width: none;
}
.result-caveat strong { color: var(--color-text); font-weight: 600; }

.scenario-compare-hint {
  margin-block: var(--space-4) 0;
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  max-width: 65ch;
  line-height: var(--line-height-loose);
}
.scenario-compare-hint a {
  color: var(--color-accent-deep);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.scenario-compare-hint a:hover { color: var(--color-accent); }
