/* Hallmark · macrostructure: tool workspace (inputs left, one result panel right, asymmetric 5/7) · genre: editorial-utility · theme: site tokens (site.css) */
/* Demo page only. Tokens (--color-*, --font-*, --space-*) come from site.css; the calculator keeps its own roi.css
   and is re-coloured only through its --roi-* variables. */
.back { margin-top: var(--space-2xs); }
main.wrap h1 { margin-top: var(--space-xs); max-width: 18em; }

/* The calculator is the page: no card, no frame. Inputs sit on the paper, the result is one dark panel. */
.roi-est {
  --roi-ink: var(--color-ink);
  --roi-muted: var(--color-ink-2);
  --roi-line: var(--color-rule);
  --roi-bg: transparent;
  --roi-card: var(--color-surface);
  --roi-accent: var(--color-accent);
  --roi-warn: #8a5a00;
  --roi-error: #a8231b;
  max-width: none;
  border: 0;
  border-radius: 0;
  padding: 0;
  font-family: var(--font-body);
  margin: var(--space-md) 0 var(--space-xl);
}
.roi-est__title { font: 700 18px/1.2 var(--font-display); letter-spacing: 0; margin: 0 0 var(--space-sm); padding-top: var(--space-sm); border-top: 2px solid var(--color-ink); }
.roi-est__field { font-size: 15px; }
.roi-est__control { border-radius: var(--radius-sm); border-color: #8a8272; }
.roi-est__control input { font-family: var(--font-mono); font-weight: 500; font-size: 17px; }
.roi-est__unit { font-family: var(--font-mono); font-size: 13px; }
.roi-est__field-error { font-size: 14px; }

/* Result panel: dark, one surface, type does the work. Variables re-set here so roi.css (chart, stats) follows. */
.roi-est__results {
  --roi-ink: #f5f2ea;
  --roi-muted: #c9d1d8;
  --roi-line: #3f4d5a;
  --roi-accent: #86dba8;
  --roi-warn: #f0b255;
  --roi-error: #ffb3a8;
  background: var(--color-ink);
  color: var(--roi-ink);
  border: 0;
  border-radius: var(--radius-sm);
  padding: var(--space-md);
}
.roi-est__big { font: 800 clamp(52px, 8cqi, 92px)/.95 var(--font-display); letter-spacing: -.02em; margin-bottom: var(--space-md); }
.roi-est__big > span { overflow-wrap: anywhere; }
.roi-est__big small { font: 400 16px/1.3 var(--font-body); letter-spacing: 0; }
.roi-est__stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-sm) var(--space-md); margin-bottom: var(--space-md); }
.roi-est__stats dt { font-size: 14px; }
.roi-est__stats dd { font: 500 17px/1.3 var(--font-mono); overflow-wrap: anywhere; }
.roi-est__paused { font-size: 15px; }
.roi-est__chart figcaption { font-size: 14px; }
.roi-est__chart svg { max-height: 300px; }
.roi-est__chart text { font-size: 10px; font-family: var(--font-mono); }

/* Calculator layout follows the space it gets (roi.css container queries): narrow column left, result right on wide. */
@container (min-width: 861px) {
  .roi-est__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-xl); align-items: start; }
}
@container (max-width: 700px) {
  .roi-est__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container (max-width: 420px) {
  .roi-est__stats { grid-template-columns: minmax(0, 1fr); }
}

/* Lead form: shown so the visitor sees the feature, but off in the demo. */
.roi-est__lead { margin-top: var(--space-xl); }
.roi-est__lead h3 { font: 700 18px/1.2 var(--font-display); }
.roi-est__off { max-width: 40em; margin: 0 0 var(--space-sm); font-weight: 700; color: var(--color-ink); }
.roi-est__lead--off .roi-est__lead-row, .roi-est__lead--off .roi-est__consent { opacity: .6; }
.roi-est__lead button:disabled { cursor: not-allowed; }
.roi-est__lead button:not(:disabled):active { transform: translateY(1px); }
.roi-est__lead button { background: var(--color-accent); border-radius: var(--radius-md); font-family: var(--font-body); }
.roi-est__lead input:not([type=checkbox]) { border-radius: var(--radius-sm); }

.demo-facts { max-width: 44em; margin-bottom: var(--space-xl); }
.demo-facts h2 { margin-top: 0; }
.roi-est button:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.roi-est__control:focus-within { outline: 3px solid var(--color-focus); border-color: var(--color-focus); }
/* Stale state: dim the figures harder than the plugin does (.65 here, .9 in roi.css) and keep the 'paused' line at full strength. */
.roi-est__results.is-stale { opacity: 1; }
.roi-est__results.is-stale > :not(.roi-est__paused) { opacity: .65; }
