/* Ezra v10 answer blocks (Agent B): verdict strip, TradePlan, LevelsLadder, ScenarioCards.
 * Tokens only (ezra-tokens.css), so dark and light themes come for free.
 * Level colours come from LEVEL_STYLE (lib/theme.js) via the --level-* tokens: the same
 * colour a level has on PriceChart / StrikeLadder / Payoff. Entry blue, stop and targets
 * red / green, spot yellow. Text wears text tokens; the colour sits on the swatch. */

ezra-trade-plan, ezra-levels, ezra-scenarios { display: block; min-width: 0; }

/* tone -> colour, shared by plan rows, ladder rows and the R/R bar. One class per
 * LEVEL_STYLE token (lib/theme.js), plus the plan's bull / bear / entry. */
:is(.ez-tp-row, .ez-lad-row).is-entry      { --tone: var(--level-entry); }
:is(.ez-tp-row, .ez-lad-row).is-stop,
:is(.ez-tp-row, .ez-lad-row).is-bear       { --tone: var(--level-stop); --tone-text: var(--bear-text); }
:is(.ez-tp-row, .ez-lad-row).is-target,
:is(.ez-tp-row, .ez-lad-row).is-bull       { --tone: var(--level-target); --tone-text: var(--bull-text); }
:is(.ez-tp-row, .ez-lad-row).is-call       { --tone: var(--level-call); }
:is(.ez-tp-row, .ez-lad-row).is-put        { --tone: var(--level-put); }
:is(.ez-tp-row, .ez-lad-row).is-flip       { --tone: var(--level-flip); }
:is(.ez-tp-row, .ez-lad-row).is-maxpain    { --tone: var(--level-maxpain); }
:is(.ez-tp-row, .ez-lad-row).is-maxpain-p  { --tone: var(--level-maxpain-p); }
:is(.ez-tp-row, .ez-lad-row).is-maxpain-v  { --tone: var(--level-maxpain-v); }
:is(.ez-tp-row, .ez-lad-row).is-support    { --tone: var(--level-support); }
:is(.ez-tp-row, .ez-lad-row).is-resistance { --tone: var(--level-resistance); }
:is(.ez-tp-row, .ez-lad-row).is-darkpool   { --tone: var(--level-darkpool); }
:is(.ez-tp-row, .ez-lad-row).is-vwap       { --tone: var(--level-vwap); }
:is(.ez-tp-row, .ez-lad-row).is-em         { --tone: var(--level-em); }
:is(.ez-tp-row, .ez-lad-row).is-spot       { --tone: var(--level-spot); }
:is(.ez-tp-row, .ez-lad-row):is(.is-custom, .is-muted) { --tone: var(--level-custom); }

.ez-vd-gap { flex: 1 1 auto; }

/* ── verdict strip ─────────────────────────────────────────────────────── */
.ez-verdict {
  --vd-accent: var(--border2);
  display: flex; flex-direction: column; gap: 6px; padding: var(--sp-3) 14px;   /* the .ez-card shell */
  background: var(--card); border: 1px solid var(--border); border-left: 3px solid var(--vd-accent);
  border-radius: var(--r);
  /* the answer's lead: the one soft purple glow in an answer (Visual direction: glow only on the composer focus and the lead) */
  box-shadow: var(--shadow), 0 0 0 1px var(--p1), 0 8px 28px var(--p1);
}
.ez-verdict[data-bias="bullish"] { --vd-accent: var(--bull); }
.ez-verdict[data-bias="bearish"] { --vd-accent: var(--bear); }
.ez-verdict[data-bias="neutral"] { --vd-accent: var(--amber); }
.ez-vd-top { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; min-height: 28px; }
.ez-vd-quote { display: inline-flex; align-items: baseline; gap: 8px; min-width: 0; }
.ez-vd-ticker {
  border: 0; background: transparent; padding: 0; cursor: pointer;
  font: 700 var(--fs-metric)/var(--lh-tight) var(--mono); letter-spacing: .01em; color: var(--bright);
  text-decoration: underline transparent 1px; text-underline-offset: 4px; transition: text-decoration-color var(--dur-fast) var(--ease);
}
.ez-vd-ticker:hover { text-decoration-color: var(--p-text); }
.ez-vd-price { font: 600 var(--fs-metric)/var(--lh-tight) var(--mono); font-variant-numeric: tabular-nums; color: var(--text); }
.ez-vd-chg { font: 600 var(--fs-label) var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
/* bias badge = .ez-chip.is-caps + .is-bull / .is-bear / .is-amber (css/ezra-ui.css) */
.ez-vd-arrow { font-size: .75em; }
.ez-vd-conv { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-caption); font-weight: 600; color: var(--muted); white-space: nowrap; }
.ez-vd-meter { display: inline-flex; gap: 2px; align-items: flex-end; height: 12px; }
.ez-vd-meter > span { width: 4px; border-radius: 1px; background: var(--border2); }
.ez-vd-meter > span:nth-child(1) { height: 5px; }
.ez-vd-meter > span:nth-child(2) { height: 8px; }
.ez-vd-meter > span:nth-child(3) { height: 12px; }
.ez-vd-meter > span.is-on { background: var(--p-text); }
.ez-vd-alts { display: inline-flex; gap: 4px; flex-wrap: wrap; }
/* other tickers: <button class="ez-chip is-ticker ez-vd-alt"> */
.ez-vd-alt { position: relative; cursor: pointer; transition: border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease); }
.ez-vd-alt::after { content: ''; position: absolute; inset: -4px -2px; }   /* 32px+ touch target, same look */
.ez-vd-alt:hover { color: var(--bright); border-color: var(--border2); }
.ez-vd-thesis { margin: 0; font-size: var(--fs-body); font-weight: 500; line-height: var(--lh-snug); color: var(--bright); }

/* ── shared block head + draw button ───────────────────────────────────── */
.ez-tp-head { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; margin: 2px 0 8px; }
/* long / short = .ez-chip.is-caps + .is-bull / .is-bear; .is-sm is the compact "Other side" chip */
.ez-tp-side.is-sm { height: 20px; font-size: var(--fs-caption); }
.ez-tp-side > span:first-child { font-size: .75em; }
.ez-tp-rr, .ez-tp-spot { display: inline-flex; align-items: baseline; gap: 4px; font-size: var(--fs-caption); color: var(--faint); }
.ez-tp-rr b, .ez-tp-spot b { font-size: var(--fs-label); font-weight: 600; color: var(--text); }
/* "Draw on chart" = .ez-btn.is-sm; sent state: */
.ez-btn.ez-draw-btn.is-sent, .ez-btn.ez-draw-btn.is-sent:hover { color: var(--p-text); border-color: var(--p-text); }

/* ── TradePlan rows ────────────────────────────────────────────────────── */
.ez-tp-rows { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-13); }
.ez-tp-rows th {
  padding: 0 8px 6px; --ez-tfs: var(--fs-caption); font-weight: 600; color: var(--faint); text-align: left;
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
.ez-tp-rows td { padding: 8px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; color: var(--text); }
.ez-tp-rows tr:last-child td { border-bottom: 0; }
.ez-tp-rows .is-num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.ez-tp-row { cursor: pointer; transition: background var(--dur-fast); }
.ez-tp-row:hover { background: var(--bg3); }
.ez-tp-row:focus-visible { outline: 2px solid var(--ring); outline-offset: -2px; }
.ez-tp-row td:first-child { box-shadow: inset 3px 0 0 var(--tone); }
.ez-tp-sw { display: none; }
.ez-tp-label { font-weight: 600; color: var(--tone-text, var(--bright)); }
.ez-tp-note { margin-left: 8px; font-size: var(--fs-caption); color: var(--muted); white-space: normal; }
.ez-tp-rows .ez-tp-price { font-weight: 600; color: var(--bright); }
.ez-tp-r { font-weight: 600; }

/* risk / reward bar: stop (left) -> entry -> last target (right) */
.ez-rr { margin: 14px 2px 4px; }
.ez-rr-track { position: relative; height: 8px; border-radius: 4px; background: var(--bg4); margin-bottom: 18px; }
.ez-rr-risk, .ez-rr-reward { position: absolute; top: 0; height: 100%; }
.ez-rr-risk { left: 0; background: var(--bear); opacity: .75; border-radius: 4px 0 0 4px; }
.ez-rr-reward { background: var(--bull); opacity: .75; border-radius: 0 4px 4px 0; }
.ez-rr-entry { position: absolute; top: -4px; width: 3px; height: 16px; margin-left: -1.5px; border-radius: 2px; background: var(--level-entry); }
.ez-rr-tick { position: absolute; top: 0; height: 8px; width: 1px; background: var(--card); }
.ez-rr-tick > span {
  position: absolute; top: 11px; transform: translateX(-50%);
  font: 600 var(--fs-11) var(--mono); color: var(--bull-text); white-space: nowrap;
}
.ez-rr-tick.is-end > span { transform: translateX(-100%); }
.ez-rr-tick.is-start > span { transform: none; }
.ez-rr-spot {
  position: absolute; top: -6px; width: 0; height: 0; margin-left: -5px;   /* optical: centres the 10px triangle */
  border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 6px solid var(--level-spot);
}
.ez-rr-legend { display: flex; justify-content: space-between; gap: 8px; font-size: var(--fs-caption); font-weight: 600; }

.ez-tp-inval { display: flex; gap: 8px; align-items: baseline; margin: 10px 0 0; font-size: var(--fs-13); color: var(--text); line-height: var(--lh-snug); }
.ez-tp-inval-k {
  flex-shrink: 0; font-size: var(--fs-caption); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--bear-text);
}
.ez-tp-alt {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; padding: 8px 10px;
  border-radius: var(--r-sm); background: var(--bg3); font-size: var(--fs-13); color: var(--muted); line-height: var(--lh-snug);
}

/* ── LevelsLadder ──────────────────────────────────────────────────────── */
.ez-lad-sum { font-size: var(--fs-caption); color: var(--faint); }
.ez-lad { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ez-lad-row {
  display: grid; grid-template-columns: 4px minmax(0, 1fr) auto 64px; align-items: center; gap: 10px;
  min-height: 34px; padding: 4px 8px 4px 0; border-bottom: 1px solid var(--border); cursor: pointer; transition: background var(--dur-fast);
}
.ez-lad-row:last-child { border-bottom: 0; }
.ez-lad-row:hover { background: var(--bg3); }
.ez-lad-row:focus-visible { outline: 2px solid var(--ring); outline-offset: -2px; }
.ez-lad-sw { align-self: stretch; border-radius: 2px; background: var(--tone); }
.ez-lad-name { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.ez-lad-label { font-size: var(--fs-13); font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ez-lad-kind { font-size: var(--fs-caption); color: var(--tone-text, var(--muted)); white-space: nowrap; }
.ez-lad-price { font-size: var(--fs-13); font-weight: 600; color: var(--bright); text-align: right; }
.ez-lad-dist { font-size: var(--fs-caption); text-align: right; }
.ez-lad-spot { position: relative; display: flex; align-items: center; height: 26px; }
/* spot: the same solid yellow line as the charts' spot / last-price line */
.ez-lad-spot-line { position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid var(--level-spot); }
/* .ez-chip on the line: --card fill so the line stops at it, spot-yellow edge */
.ez-lad-spot-tag { position: relative; gap: 6px; margin-left: var(--sp-3); background: var(--card); border-color: var(--level-spot); color: var(--muted); }
.ez-lad-spot-tag b { font-family: var(--mono); color: var(--bright); }

/* ── ScenarioCards ─────────────────────────────────────────────────────── */
.ez-scn { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 10px; }
.ez-scn-card {
  --tone: var(--faint);
  display: flex; flex-direction: column; gap: 8px; padding: var(--sp-3); min-width: 0; cursor: pointer;
  border-radius: var(--r); background: var(--card); border: 1px solid var(--border); border-top: 3px solid var(--tone);   /* .ez-card.is-flat */
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.ez-scn-card:hover { background: var(--card-2); border-color: var(--border2); border-top-color: var(--tone); }
.ez-scn-card.is-bull { --tone: var(--bull); --tone-text: var(--bull-text); }
.ez-scn-card.is-bear { --tone: var(--bear); --tone-text: var(--bear-text); }
.ez-scn-card.is-base { --tone: var(--amber); }
.ez-scn-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ez-scn-name { display: inline-flex; align-items: center; gap: 6px; color: var(--tone-text, var(--tone)); }   /* + .ez-eyebrow */
.ez-scn-name > span { font-size: .75em; }
.ez-scn-prob { font-size: var(--fs-title); font-weight: 600; color: var(--bright); }
.ez-scn-meter { height: 4px; border-radius: 2px; background: var(--bg4); overflow: hidden; }
.ez-scn-meter > span { display: block; height: 100%; background: var(--tone); }
.ez-scn-trigger { margin: 0; font-size: var(--fs-13); line-height: var(--lh-snug); color: var(--text); }
.ez-scn-stats { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; margin: 0; font-size: var(--fs-12); }
.ez-scn-stat { display: contents; }
.ez-scn-stats dt { color: var(--faint); }
.ez-scn-stats dd { margin: 0; display: flex; gap: 6px; align-items: baseline; justify-content: flex-end; }
.ez-scn-stats b { font-weight: 600; color: var(--bright); }
.ez-scn-stats b.ez-up { color: var(--bull-text); }
.ez-scn-stats b.ez-down { color: var(--bear-text); }
.ez-scn-dist { font-size: var(--fs-caption); color: var(--faint); }
.ez-scn-note { margin: 0; font-size: var(--fs-12); line-height: var(--lh-snug); color: var(--muted); }

/* narrow cards (span <= 6 in the grid, or a phone) */
@supports (container-type: inline-size) {
  ezra-trade-plan .ez-card-body, ezra-scenarios .ez-card-body, ezra-levels .ez-card-body { container-type: inline-size; }
  @container (max-width: 520px) {
    .ez-scn { grid-template-columns: minmax(0, 1fr); }
  }
  @container (max-width: 380px) {
    .ez-tp-note { display: none; }
    .ez-tp-rows td, .ez-tp-rows th { padding-left: 6px; padding-right: 6px; }
  }
}
@media (max-width: 720px) {
  .ez-verdict { padding: 10px var(--sp-3); }
  .ez-vd-conv-label { display: none; }
  .ez-scn { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .ez-vd-ticker, .ez-vd-alt, .ez-tp-row, .ez-lad-row, .ez-scn-card { transition: none; }
}
@media (forced-colors: active) {
  .ez-rr-risk, .ez-rr-reward, .ez-lad-sw, .ez-vd-meter > span.is-on { forced-color-adjust: none; }
}

/* ── shared card chrome (charts, KPI, callout) ─────────────────────────── */
/* "Showing N of M" under a chart card's title when the server thinned the data */
.ez-card-rows { margin: 2px 0 0; font-size: var(--fs-caption); color: var(--faint); font-variant-numeric: tabular-nums; }
/* one empty / error / unavailable panel (chart-frame.js statePanel): .ez-empty-state held at the
 * card body's height (--h) so nothing shifts; the error kind holds an .ez-error line */
.ez-state-panel { height: var(--h, 300px); padding: var(--sp-4); border: 1px dashed var(--border2); border-radius: var(--r-sm); }
.ez-state-panel > .ez-error { max-width: 52ch; text-align: left; }
.ez-state-panel > .ez-error p { margin: 0; }
.ez-state-panel > .ez-error b { margin-right: 4px; font-weight: 600; }
/* chips inside dense rows (table cells; news rows have their own in ezra.css): the row keeps its height */
.ez-table .ez-chip { height: 20px; padding: 0 6px; font-size: var(--fs-11); }
/* segmented controls in a card's controls row scroll sideways instead of overflowing on phones */
.ez-card-ctrl .ez-seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.ez-card-ctrl .ez-seg::-webkit-scrollbar { display: none; }
/* KPI + Callout wear the same chrome as chart cards: --card surface, border, radius, shadow */
ezra-callout .ez-callout:not([data-variant="note"]) { background: var(--card); box-shadow: var(--shadow); }
.ez-kpi-label .ez-kpi-fresh { margin-left: auto; font-weight: 600; }
/* the one sparkline size (lib/sparkline.js SPARK_W x SPARK_H, preserveAspectRatio none).
 * A KPI card narrower than 420px (<ezra-kpi> is the container) moves it to its own full-width row,
 * so the value keeps the whole width and is never clipped. */
.ez-kpi .ez-kpi-spark { grid-row: 2 / 4; grid-column: 2; align-self: end; width: 96px; height: 32px; }
@container (max-width: 420px) {
  .ez-kpi { grid-template-columns: minmax(0, 1fr); }
  .ez-kpi .ez-kpi-spark { grid-row: auto; grid-column: 1; width: 100%; height: 28px; margin-top: 4px; }
}
/* in-card controls row (lib/controls.js) sits on the card's grid, above the plot */
.ez-card-ctrl:empty { display: none; }
.ez-bc { display: flex; align-items: center; gap: var(--sp-1) var(--sp-2); flex-wrap: wrap; width: 100%; }
.ez-bc-f { display: inline-flex; align-items: center; gap: var(--sp-1); font: 500 var(--fs-12) var(--sans); color: var(--faint); }
/* fields are .ez-select / .ez-input, buttons .ez-iconbtn.is-sm, switches .ez-toggle (css/ezra-ui.css);
 * here they only take the row's 28px height (32px and 16px text on phones, below) */
.ez-bc :is(.ez-select, .ez-input) { height: var(--ctl-h-sm); font-size: var(--fs-12); }
.ez-bc input[type="number"] { width: 52px; padding: 0 var(--sp-1); text-align: center; font-family: var(--mono); -moz-appearance: textfield; }
.ez-bc input[type="number"]::-webkit-inner-spin-button, .ez-bc input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.ez-bc input[type="text"] { width: 72px; text-transform: uppercase; font-family: var(--mono); }
.ez-bc input[type="text"].ez-bc-wide { width: 112px; text-transform: none; font-family: var(--sans); }
.ez-bc-step { display: inline-flex; align-items: center; gap: 2px; }
.ez-bc-step .ez-iconbtn { font: 600 var(--fs-14)/1 var(--sans); }
.ez-bc input[type="range"]:disabled { opacity: .5; cursor: not-allowed; }
.ez-bc-end { margin-left: auto; display: inline-flex; align-items: center; gap: var(--sp-2); }
.ez-bc-asof { font: 500 var(--fs-12) var(--sans); color: var(--faint); white-space: nowrap; }
.ez-bc-asof[data-stale] { color: var(--amber-text); }
.ez-bc-time { display: inline-flex; align-items: center; gap: var(--sp-2); }
.ez-bc input[type="range"] { width: 152px; height: 28px; padding: 0; border: 0; background: transparent; }
.ez-bc-tval { min-width: 64px; font: 600 var(--fs-12) var(--mono); color: var(--bright); white-space: nowrap; font-variant-numeric: tabular-nums; }
/* error line: the .ez-error text colour and size, no panel (it sits in the row) */
.ez-bc-msg { flex-basis: 100%; font: 500 var(--fs-12) var(--sans); color: var(--bear-text); }
.ez-bc-msg:empty { display: none; }
.ez-card[data-refreshing] .ez-card-body { opacity: .55; transition: opacity var(--dur-slow); }
.ez-card[data-refreshing] .ez-bc-ref svg { animation: ez-spin .9s linear infinite; }   /* keyframe: css/ezra-ui.css */
@media (max-width: 720px) {
  .ez-bc :is(.ez-select, .ez-input) { font-size: 16px; height: var(--ctl-h); }   /* 16px: iOS zooms below it */
  .ez-bc-time { flex: 1 1 100%; }
  .ez-bc input[type="range"] { flex: 1; width: auto; min-width: 120px; }
  .ez-bc-tval { font-size: 16px; }
  .ez-bc .ez-iconbtn.is-sm { width: var(--ctl-h); height: var(--ctl-h); }
  .ez-bc .ez-toggle { height: var(--ctl-h); }
  .ez-bc-end { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .ez-card[data-refreshing] .ez-card-body { transition: none; }
  .ez-card[data-refreshing] .ez-bc-ref svg { animation: none; }
}
@media (forced-colors: active) {
  .ez-lad-spot-line, .ez-lad-spot-tag, .ez-rr-entry { forced-color-adjust: none; }
}

/* ── Callout card chrome (ezra-callout.js extends CardBlock) ───────────── */
/* the aside stays the visible surface; the card only carries the badge + pin, in the kicker row */
.ez-card.ez-card-callout { background: transparent; border: 0; box-shadow: none; }
.ez-card-callout > .ez-card-body { padding: 0; }
.ez-callout-top { display: flex; align-items: center; gap: 8px; min-height: 22px; }
.ez-callout-top .ez-callout-kicker { flex: 1; min-width: 0; margin-bottom: 0; }
.ez-callout-top .ez-card-tools { margin: -4px -8px 0 0; }

/* ── Drill-down cards (ezra-canvas.js openDrill) ───────────────────────── */
.ez-cv-drills { display: flex; flex-direction: column; gap: 12px; }
.ez-cv-drills:empty { display: none; }
.ez-drill { display: block; min-width: 0; border-radius: var(--r); }
.ez-drill[data-inline="1"] { margin-top: 10px; padding: 10px; border: 1px dashed var(--border2); background: var(--bg2); }
.ez-drill:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.ez-drill-bar { display: flex; align-items: center; gap: 8px; padding: 0 0 8px; min-height: 30px; }
.ez-drill-icon { flex-shrink: 0; width: 24px; height: 24px; border-radius: var(--r-xs); display: grid; place-items: center; background: var(--p1); color: var(--p-text); }
.ez-drill-titles { flex: 1; min-width: 0; }
.ez-drill-title { margin: 0; font-size: var(--fs-14); font-weight: 600; --ez-h: var(--bright); line-height: var(--lh-snug); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ez-drill-ask { flex-shrink: 0; white-space: nowrap; }
@media (max-width: 720px) { .ez-drill-ask { height: 32px; } }
.ez-drill-body { display: flex; flex-direction: column; gap: 10px; min-width: 0; container-type: inline-size; }

/* a table cell that opens a drill-down: looks like the value, reads as a link */
.ez-drill-cell { all: unset; box-sizing: border-box; cursor: pointer; border-radius: var(--r-xs); font: inherit; color: inherit; text-decoration: underline dotted var(--faint); text-underline-offset: 3px; }
.ez-drill-cell:hover { color: var(--bright); text-decoration-color: currentColor; }
.ez-drill-cell:hover .ez-chip { border-color: var(--border2); }
.ez-drill-cell:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }

/* ── Payoff what-if (ezra-payoff.js) ───────────────────────────────────── */
.ez-whatif { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 16px; align-items: center; padding: 0 14px 12px; }
.ez-wi-row { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: var(--fs-12); color: var(--faint); }
.ez-wi-row label { flex-shrink: 0; width: 34px; font-weight: 600; }
/* track / thumb / focus ring: the shared range style in ezra.css */
.ez-wi-row input[type="range"] { flex: 1; min-width: 80px; height: 24px; margin: 0; }
.ez-wi-val { flex-shrink: 0; min-width: 96px; text-align: right; font: 600 var(--fs-12) var(--mono); color: var(--bright); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ez-wi-end { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ez-wi-read { flex: 1; margin: 0; font-size: var(--fs-13); color: var(--muted); font-variant-numeric: tabular-nums; }
.ez-wi-read b { color: var(--bright); font-family: var(--mono); }
.ez-wi-read b.ez-up { color: var(--bull-text); }
.ez-wi-read b.ez-down { color: var(--bear-text); }
@media (max-width: 720px) {
  .ez-whatif { grid-template-columns: minmax(0, 1fr); }
  .ez-wi-row, .ez-wi-read { font-size: var(--fs-15); }
  .ez-wi-row label { width: 44px; }
  .ez-wi-row input[type="range"] { height: 32px; }
  .ez-wi-val { font-size: var(--fs-15); min-width: 0; }
}

/* canvas level chips for Finn's draw kinds (spec-adapters DRAW_KIND): pin = call wall, wall = put wall */
.ez-cv-level[data-kind="pin"] .ez-dot { color: var(--level-call); }
.ez-cv-level[data-kind="wall"] .ez-dot { color: var(--level-put); }
.ez-cv-level[data-kind="level"] .ez-dot { color: var(--level-flip); }

@media (prefers-reduced-motion: reduce) {
  .ez-drill-cell, .ez-drill { transition: none; }
}

/* ── Inline visuals: answer blocks in the prose (`[[ui:<id>]]` lines; lib/inline-ui.js, ezra-message.js) ──
 * The slot reserves the block's room with a skeleton (--h) while it streams, so text below never jumps.
 * It sits inside .ez-prose, so it puts back the dashboard's text size and leading, and the card parts the
 * prose rules (headings, paragraphs, ticker links) would otherwise restyle. */
.ez-prose .ez-inline-slot {
  --h: 240px; --fs-prose: var(--fs-body);
  margin: var(--sp-5) 0; container-type: inline-size;
  font-size: var(--fs-body); line-height: var(--lh-normal); overflow-wrap: normal;
}
.ez-prose > .ez-inline-slot:first-child { margin-top: 0; }
.ez-prose > .ez-inline-slot:last-child { margin-bottom: 0; }
.ez-prose .ez-inline-slot .ez-card-title { margin: 0; font-size: var(--fs-title); font-weight: 600; letter-spacing: normal; line-height: var(--lh-snug); }
.ez-prose .ez-inline-slot .ez-card-sub { margin: 2px 0 0; }
/* a table's ticker chip stays a chip (ezra-ui.css .ez-chip.is-ticker), not a prose ticker link */
.ez-prose .ez-inline-slot .ez-chip.is-ticker.ez-tk {
  display: inline-flex; height: 24px; padding: 0 var(--sp-2); margin: 0; border: 1px solid var(--border); border-radius: var(--r-full);
  background: var(--bg3); font-size: var(--fs-12); color: var(--bright); text-decoration: none; cursor: default;
}
.ez-prose .ez-inline-slot .ez-chip.is-ticker.is-sm.ez-tk { height: 20px; padding: 0 6px; font-size: var(--fs-11); }
.ez-prose .ez-inline-slot button.ez-chip.is-ticker.ez-tk { cursor: pointer; }

/* ── Freeform Visual (components/ezra-visual.js, lib/visual-runtime.js) ──────────────────────────────────
 * The model's view runs in an iframe sandboxed to scripts only. The stage reserves the element's height (--h,
 * px: the spec's height, then the frame's own size), capped by the viewport like chart cards. Until the frame
 * posts its first resize (it has its data and has drawn) the stage shows "Drawing view…" (.ez-drawing, the same
 * placeholder rich inline slots use, css/ezra-parts.css) over a hidden frame; then the view fades in and the
 * placeholder fades out (both instant under reduced motion). The frame paints its own --card in either theme. */
.ez-visual-chip { align-self: flex-start; margin-top: var(--sp-1); padding: 0 var(--sp-2); cursor: default; }   /* .ez-chip.is-sm */
.ez-visual-chip > span { display: inline-flex; }
.ez-visual-chip svg { width: 12px; height: 12px; }
.ez-visual-stage {
  position: relative; overflow: hidden; border-radius: var(--r-sm);
  height: max(160px, min(var(--h, 320px), var(--ez-chart-cap, 100vh)));   /* the Visual height floor */
  transition: height var(--dur) var(--ease);
}
.ez-visual-stage > .ez-visual-drawing {
  position: absolute; inset: 0; z-index: 1; height: auto;
  transition: opacity var(--dur-slow) var(--ease), visibility 0s linear var(--dur-slow);
}
.ez-visual-stage.is-drawn > .ez-visual-drawing { opacity: 0; visibility: hidden; pointer-events: none; }
.ez-visual-frame {
  display: block; width: 100%; height: 100%; border: 0; background: var(--card);
  opacity: 0; transition: opacity var(--dur-slow) var(--ease);
}
.ez-visual-stage.is-drawn > .ez-visual-frame { opacity: 1; }
.ez-visual-frame:focus-visible { outline-offset: -2px; }
.ez-card:fullscreen .ez-visual-stage { height: calc(100vh - 150px); }
/* a frame `send` waits here for the member: "Ask EZRA: <text>" (one line, full text in the title) + Ask + Dismiss */
.ez-visual-offer { display: flex; align-items: center; gap: var(--sp-2); margin-top: var(--sp-2); min-width: 0; }
.ez-visual-offer-label { flex: none; color: var(--muted); font-size: var(--fs-12); }
.ez-visual-offer-text { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-12); }
.ez-visual-offer > .ez-btn, .ez-visual-offer > .ez-iconbtn { flex: none; }
.ez-visual-data + .ez-visual-data { margin-top: var(--sp-4); }
.ez-visual-data-label { margin: 0 0 var(--sp-2); font-weight: 600; }
@media (prefers-reduced-motion: reduce) {
  .ez-visual-stage, .ez-visual-frame, .ez-visual-stage > .ez-visual-drawing { transition: none; }
}
