/* ==========================================================================
   Margin & mix — the what-if page's own rules.
   Everything shared with the sales page (tiles, panels, movers, tables, the
   banner) comes from dashboard.css; this file only adds the controls, the
   verdict line, the pushed-row marking, and which sections each view hides.
   ========================================================================== */

/* -------------------------------------------------------------- controls */

.whatif-controls {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md) var(--space-lg);
  align-items: end;
  margin-bottom: var(--space-sm);
}

@container dash (min-width: 40rem) {
  .whatif-controls { grid-template-columns: minmax(16rem, 1.4fr) 1fr; }
}

.whatif-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  min-width: 0;
}

.whatif-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-sm);
  font-size: var(--text-xs);
  font-variant: small-caps;
  letter-spacing: 0.07em;
  color: var(--color-neutral);
}

.whatif-label output {
  font-family: var(--font-outlier);
  font-variant-numeric: tabular-nums;
  font-variant: normal;
  letter-spacing: 0;
  font-size: var(--text-sm);
  color: var(--color-ink-2);
}

/* Native controls, themed through the tokens rather than rebuilt: they keep
   their keyboard behaviour and their phone affordances for free. */
.whatif-field select {
  font: inherit;
  font-size: var(--text-sm);
  color: var(--color-ink);
  background: var(--color-paper);
  border: var(--rule-hair) solid var(--color-rule-strong);
  border-radius: var(--radius-sm);
  padding: var(--space-xs) var(--space-sm);
  min-height: 2.5rem;
  max-width: 100%;
}

.whatif-field input[type="range"] {
  inline-size: 100%;
  min-height: 2.5rem;
  margin: 0;
  accent-color: var(--color-accent);
  cursor: pointer;
}

.whatif-field select:focus-visible,
.whatif-field input[type="range"]:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

.whatif-rule {
  margin: var(--space-xs) 0 0;
  font-size: var(--text-xs);
  line-height: var(--leading-snug);
  color: var(--color-neutral);
}

.whatif-rule strong {
  font-family: var(--font-outlier);
  font-weight: 400;
  color: var(--color-ink);
}

/* ---------------------------------------------------------------- verdict */

.verdict-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2xs) var(--space-sm);
  margin: var(--space-md) 0 0;
  padding-top: var(--space-sm);
  border-top: var(--rule-hair) solid var(--color-rule);
  font-family: var(--font-display);
  font-size: var(--text-md);
  line-height: var(--leading-snug);
  color: var(--color-ink);
}

.verdict-hint {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-neutral);
}

.verdict-num {
  font-family: var(--font-outlier);
  font-variant-numeric: tabular-nums;
  font-size: var(--text-base);
  color: var(--sig-text, var(--color-ink));
}

.verdict-call {
  font-weight: 600;
  color: var(--color-ink-2);
}

.verdict-call.is-bad { color: var(--text-bad); }
.verdict-call.is-good { color: var(--text-good); }

/* ------------------------------------------------------------ pushed row */

.dtable tr.is-pushed th,
.dtable tr.is-pushed td {
  background: var(--color-paper-2);
}

.dtable tr.is-pushed th {
  box-shadow: inset var(--space-2xs) 0 0 var(--color-accent);
}

.mix-sku { display: inline; }

.tag-pushed {
  display: inline-block;
  margin-inline-start: var(--space-xs);
  font-family: var(--font-outlier);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
}

/* ------------------------------------------------------------------ views
   Which sections step aside in which view. The attribute lists the views a
   section is hidden in, so the markup reads as the decision. */

html[data-view="executive"] [data-view-hide~="executive"],
html[data-view="phone"]     [data-view-hide~="phone"] {
  display: none;
}

/* ------------------------------------------------------------- printing */

@media print {
  .whatif-controls { display: none; }
}
