/* ── Decision panels on the Indigo stage ──────────────────────────────────
 * The chat's decision panels (GIT-1607…1616) render inside
 * `.gr-chat-page .gr-chat-widget`, which is a deep Indigo panel. Their base
 * skin in app.css assumes a light surface (Deep Sea ink, lavender boxes,
 * cream cards, azure marks) — invisible or muddy on Indigo. This sheet
 * re-skins them for the stage only; nothing outside the chat page changes.
 *
 *   text      white serif headlines, #e4e5ff body, 65% muted, Lemon mono kickers
 *   boxes     translucent white + hairline, no shadows, no cream
 *   marks     Lemon = key / recommended / selected; lavender + white support;
 *             coral = negative / unfavourable / breach. Never azure/indigo.
 *   status    a labelled chip — never colour alone.
 *
 * Load after app.css. Every selector is scoped under the stage. */

.gr-chat-page .gr-chat-widget {
  --ps-ink: #ffffff;
  --ps-body: #e4e5ff;
  --ps-muted: rgba(228, 229, 255, 0.65);
  --ps-axis: rgba(228, 229, 255, 0.62);
  --ps-lemon: #ffde4c;
  --ps-lav: #c3c4f5;
  --ps-lav-2: #8f91e6;
  --ps-coral: #f0a07c;
  --ps-deep: #1b1f7b;
  --ps-box: rgba(255, 255, 255, 0.07);
  --ps-box-hover: rgba(255, 255, 255, 0.12);
  --ps-line: rgba(255, 255, 255, 0.12);
  --ps-rule: rgba(255, 255, 255, 0.1);
  --ps-grid: rgba(255, 255, 255, 0.13);
  --ps-control-line: rgba(255, 255, 255, 0.22);
}

/* ── Base text ─────────────────────────────────────────────────────────── */
.gr-chat-page .gr-chat-widget :is(.gr-pce, .gr-receipt, .gr-timeline, .gr-waterfall, .gr-lag, .gr-spt, .gr-dilution, .gr-board, .gr-crp) {
  color: var(--ps-body);
}
/* Every light-surface ink colour in app.css (#1f2937, #2f3366, #4b5563, …)
 * resets to the stage body colour; the rules below re-introduce hierarchy.
 * :where() keeps this at the panel's own specificity. ag-grid keeps its
 * own theme. */
.gr-chat-page .gr-chat-widget :is(.gr-pce, .gr-receipt, .gr-timeline, .gr-waterfall, .gr-lag, .gr-spt, .gr-dilution, .gr-board, .gr-crp)
  :where(:not(.ag-root-wrapper):not(.ag-root-wrapper *)) {
  color: var(--ps-body);
}

/* Headlines: white serif. */
.gr-chat-page .gr-chat-widget :is(.gr-pce-decision, .gr-receipt-decision, .gr-timeline-decision, .gr-waterfall-decision,
    .gr-lag-decision, .gr-spt-decision, .gr-dilution-decision, .gr-board-decision, .gr-crp-decision) {
  font-family: var(--gr-font-serif);
  color: var(--ps-ink);
}

/* Kickers + section labels: Lemon mono uppercase. */
.gr-chat-page .gr-chat-widget :is(.gr-pce, .gr-receipt, .gr-timeline, .gr-waterfall, .gr-lag, .gr-spt, .gr-dilution, .gr-board, .gr-crp) .gr-chat-widget-label,
.gr-chat-page .gr-chat-widget :is(.gr-receipt-h, .gr-waterfall-h, .gr-lag-h, .gr-dilution-h, .gr-board-h, .gr-crp-h,
    .gr-pce-col h4, .gr-pce-constraint-title, .gr-lag-table-caption),
.gr-chat-page .gr-chat-widget :is(.gr-timeline-legend, .gr-lag-filters) legend {
  color: var(--ps-lemon);
  font-family: var(--gr-font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.gr-chat-page .gr-chat-widget :is(.gr-pce, .gr-receipt, .gr-timeline, .gr-waterfall, .gr-lag, .gr-spt, .gr-dilution, .gr-board, .gr-crp) .gr-chat-widget-label::before {
  display: none;
}

/* Inline keys ("Next", "Method", …): white, medium. */
.gr-chat-page .gr-chat-widget :is(.gr-receipt-k, .gr-timeline-k, .gr-waterfall-k, .gr-lag-k, .gr-spt-k,
    .gr-dilution-k, .gr-board-k, .gr-crp-k, .gr-pce-card-title, .gr-board-card-id) {
  color: var(--ps-ink);
  font-weight: 500;
}

/* Captions, meta, secondary numbers: muted. */
.gr-chat-page .gr-chat-widget :is(.gr-pce-meta, .gr-pce-constraint-values, .gr-pce-empty, .gr-pce-fallback-reason, .gr-pce-whatif,
    .gr-timeline-caption, .gr-timeline-unit, .gr-timeline-weight, .gr-waterfall-caption, .gr-lag-figcaption,
    .gr-dilution-caption, .gr-crp-caption, .gr-board-caption, .gr-receipt-scope, .gr-board-lane-meta,
    .gr-board-sort, .gr-spt-prob, .gr-spt-pay, .gr-pce-col label, .gr-lag-filter) {
  color: var(--ps-muted);
}
.gr-chat-page .gr-chat-widget .gr-board-card-stats dt { color: var(--ps-muted); }
.gr-chat-page .gr-chat-widget :is(.gr-board-card-ev, .gr-board-card-stats dd) { color: var(--ps-ink); }

/* ── Status chips (text label always kept) ─────────────────────────────── */
.gr-chat-page .gr-chat-widget :is(.gr-receipt-status-label, .gr-timeline-status-label, .gr-waterfall-status-label, .gr-lag-status-label,
    .gr-spt-status-label, .gr-dilution-status-label, .gr-board-status-label, .gr-crp-status-label) {
  background: rgba(255, 255, 255, 0.12);
  color: var(--ps-ink);
}
.gr-chat-page .gr-chat-widget :is(.gr-receipt--ready, .gr-timeline--ready, .gr-waterfall--ready, .gr-lag--ready,
    .gr-spt--ready, .gr-dilution--ready, .gr-board--ready, .gr-crp--ready)
  :is(.gr-receipt-status-label, .gr-timeline-status-label, .gr-waterfall-status-label, .gr-lag-status-label,
      .gr-spt-status-label, .gr-dilution-status-label, .gr-board-status-label, .gr-crp-status-label) {
  background: rgba(197, 239, 76, 0.18);
  color: #d6f39a;
}
.gr-chat-page .gr-chat-widget :is(.gr-receipt--conditional, .gr-timeline--conditional, .gr-lag--conditional, .gr-spt--conditional,
    .gr-board--conditional, .gr-crp--conditional, .gr-crp--withheld)
  :is(.gr-receipt-status-label, .gr-timeline-status-label, .gr-lag-status-label, .gr-spt-status-label,
      .gr-board-status-label, .gr-crp-status-label) {
  background: rgba(255, 222, 76, 0.18);
  color: var(--ps-lemon);
}
.gr-chat-page .gr-chat-widget :is(.gr-receipt--unavailable, .gr-receipt--failed, .gr-timeline--unavailable, .gr-timeline--failed,
    .gr-waterfall--unavailable, .gr-waterfall--failed, .gr-waterfall--conditional,
    .gr-lag--unavailable, .gr-lag--failed, .gr-spt--unavailable, .gr-spt--failed,
    .gr-dilution--unavailable, .gr-dilution--failed, .gr-dilution--conditional,
    .gr-board--unavailable, .gr-board--failed, .gr-crp--unavailable, .gr-crp--failed)
  :is(.gr-receipt-status-label, .gr-timeline-status-label, .gr-waterfall-status-label, .gr-lag-status-label,
      .gr-spt-status-label, .gr-dilution-status-label, .gr-board-status-label, .gr-crp-status-label) {
  background: rgba(240, 160, 124, 0.2);
  color: #ffc3a8;
}

/* Board lane titles + the scenario tree's "truncated" tag are chips too. */
.gr-chat-page .gr-chat-widget .gr-board-lane-title {
  background: rgba(255, 255, 255, 0.12);
  color: var(--ps-ink);
}
.gr-chat-page .gr-chat-widget .gr-board-lane--stop .gr-board-lane-title { background: rgba(240, 160, 124, 0.2); color: #ffc3a8; }
.gr-chat-page .gr-chat-widget .gr-board-lane--continue .gr-board-lane-title { background: rgba(255, 222, 76, 0.18); color: var(--ps-lemon); }
.gr-chat-page .gr-chat-widget .gr-board-lane--scale .gr-board-lane-title { background: rgba(197, 239, 76, 0.18); color: #d6f39a; }
.gr-chat-page .gr-chat-widget .gr-spt-cut { background: rgba(255, 222, 76, 0.18); color: var(--ps-lemon); }

/* ── Inner boxes: translucent white + hairline, no cream, no shadow ────── */
.gr-chat-page .gr-chat-widget :is(.gr-pce-col, .gr-board-lane, .gr-dilution-gate, .gr-crp-diagnostics, .gr-receipt-disclosure) {
  background: var(--ps-box);
  border: 1px solid var(--ps-line);
  border-radius: 14px;
  box-shadow: none;
}
.gr-chat-page .gr-chat-widget :is(.gr-pce-card, .gr-board-card) {
  background: var(--ps-box);
  border: 1px solid var(--ps-line);
  border-radius: 12px;
  box-shadow: none;
}
.gr-chat-page .gr-chat-widget .gr-pce-card.is-rejected {
  background: transparent;
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.2);
}
.gr-chat-page .gr-chat-widget .gr-pce-card.is-rejected,
.gr-chat-page .gr-chat-widget .gr-pce-card.is-rejected * { color: var(--ps-muted); }

/* Caution notes (pruned branches, insufficient evidence, "not causal"). */
.gr-chat-page .gr-chat-widget :is(.gr-spt-truncation, .gr-board-insufficient, .gr-lag-claim) {
  background: rgba(255, 222, 76, 0.1);
  border: 1px solid rgba(255, 222, 76, 0.35);
  border-radius: 12px;
  box-shadow: none;
}
.gr-chat-page .gr-chat-widget :is(.gr-spt-truncation, .gr-board-insufficient, .gr-lag-claim) {
  box-shadow: inset 3px 0 0 var(--ps-lemon);
}
.gr-chat-page .gr-chat-widget .gr-lag-claim { color: var(--ps-ink); }

/* Breach / failed / withheld boxes. */
.gr-chat-page .gr-chat-widget :is(.gr-dilution-gate.is-breached, .gr-crp-diagnostics.is-failed, .gr-crp-withheld) {
  background: rgba(240, 160, 124, 0.12);
  border: 1px solid rgba(240, 160, 124, 0.38);
  border-radius: 12px;
}

/* ── Lists + disclosures ───────────────────────────────────────────────── */
.gr-chat-page .gr-chat-widget :is(.gr-pce, .gr-receipt, .gr-timeline, .gr-waterfall, .gr-lag, .gr-spt, .gr-dilution, .gr-board, .gr-crp)
  ul:not(.gr-spt-tree):not([role]) > li::before {
  background: var(--ps-lav);
}
.gr-chat-page .gr-chat-widget :is(.gr-pce, .gr-receipt, .gr-timeline, .gr-waterfall, .gr-lag, .gr-spt, .gr-dilution, .gr-board, .gr-crp)
  ol:not(.gr-board-cards) > li::marker {
  color: var(--ps-lav);
}
.gr-chat-page .gr-chat-widget :is(.gr-pce, .gr-receipt, .gr-timeline, .gr-waterfall, .gr-lag, .gr-spt, .gr-dilution, .gr-board, .gr-crp) summary {
  color: var(--ps-ink);
}
.gr-chat-page .gr-chat-widget :is(.gr-pce, .gr-receipt, .gr-timeline, .gr-waterfall, .gr-lag, .gr-spt, .gr-dilution, .gr-board, .gr-crp) summary::marker {
  color: var(--ps-lemon);
}
.gr-chat-page .gr-chat-widget :is(.gr-spt-pre, .gr-pce, .gr-receipt, .gr-timeline, .gr-waterfall, .gr-lag, .gr-spt, .gr-dilution, .gr-board, .gr-crp) pre {
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid var(--ps-line);
  border-radius: 10px;
  color: var(--ps-body);
}
.gr-chat-page .gr-chat-widget :is(.gr-pce, .gr-receipt, .gr-timeline, .gr-waterfall, .gr-lag, .gr-spt, .gr-dilution, .gr-board, .gr-crp) a {
  color: var(--ps-lemon);
}

/* ── Plain tables (ag-grid tables are themed elsewhere) ────────────────── */
.gr-chat-page .gr-chat-widget :is(.gr-pce, .gr-receipt, .gr-timeline, .gr-waterfall, .gr-lag, .gr-spt, .gr-dilution, .gr-board, .gr-crp) table:not(.ag-root-wrapper table) {
  color: var(--ps-ink);
}
.gr-chat-page .gr-chat-widget :is(.gr-pce, .gr-receipt, .gr-timeline, .gr-waterfall, .gr-lag, .gr-spt, .gr-dilution, .gr-board, .gr-crp) table:not(.ag-root-wrapper table) thead th {
  color: var(--ps-lav);
  font-family: var(--gr-font-mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
.gr-chat-page .gr-chat-widget :is(.gr-pce, .gr-receipt, .gr-timeline, .gr-waterfall, .gr-lag, .gr-spt, .gr-dilution, .gr-board, .gr-crp) table:not(.ag-root-wrapper table) :is(td, tbody th) {
  color: var(--ps-ink);
  border-bottom: 1px solid var(--ps-rule);
}

/* ── Controls ──────────────────────────────────────────────────────────── */
.gr-chat-page .gr-chat-widget :is(.gr-pce, .gr-receipt, .gr-timeline, .gr-waterfall, .gr-lag, .gr-spt, .gr-dilution, .gr-board, .gr-crp) :is(.gr-btn-secondary, .gr-waterfall-period, .gr-dilution-scenario) {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--ps-control-line);
  border-radius: 8px;
  color: var(--ps-ink);
  box-shadow: none;
}
.gr-chat-page .gr-chat-widget :is(.gr-pce, .gr-receipt, .gr-timeline, .gr-waterfall, .gr-lag, .gr-spt, .gr-dilution, .gr-board, .gr-crp) :is(.gr-btn-secondary, .gr-waterfall-period, .gr-dilution-scenario):hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.42);
  color: var(--ps-ink);
}
.gr-chat-page .gr-chat-widget :is(.gr-pce, .gr-receipt, .gr-timeline, .gr-waterfall, .gr-lag, .gr-spt, .gr-dilution, .gr-board, .gr-crp)
  :is(.gr-btn-secondary[aria-pressed="true"], .gr-waterfall-period.is-selected, .gr-dilution-scenario.is-selected),
.gr-chat-page .gr-chat-widget :is(.gr-pce, .gr-receipt, .gr-timeline, .gr-waterfall, .gr-lag, .gr-spt, .gr-dilution, .gr-board, .gr-crp)
  :is(.gr-btn-secondary[aria-pressed="true"], .gr-waterfall-period.is-selected, .gr-dilution-scenario.is-selected) * {
  background: var(--ps-lemon);
  border-color: var(--ps-lemon);
  color: var(--ps-deep);
}
.gr-chat-page .gr-chat-widget :is(.gr-pce, .gr-receipt, .gr-timeline, .gr-waterfall, .gr-lag, .gr-spt, .gr-dilution, .gr-board, .gr-crp)
  :is(.gr-btn-secondary[aria-pressed="true"], .gr-waterfall-period.is-selected, .gr-dilution-scenario.is-selected) * {
  background: transparent;
}
.gr-chat-page .gr-chat-widget :is(.gr-pce, .gr-receipt, .gr-timeline, .gr-waterfall, .gr-lag, .gr-spt, .gr-dilution, .gr-board, .gr-crp)
  :is(button, select, input, summary):focus-visible {
  outline: 2px solid var(--ps-lemon);
  outline-offset: 2px;
}
.gr-chat-page .gr-chat-widget :is(.gr-pce, .gr-lag, .gr-board, .gr-receipt, .gr-timeline, .gr-waterfall, .gr-spt, .gr-dilution, .gr-crp)
  :is(select, input[type="search"], input[type="text"], input[type="number"]) {
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--ps-control-line);
  border-radius: 8px;
  color: var(--ps-ink);
}
.gr-chat-page .gr-chat-widget :is(.gr-pce, .gr-lag, .gr-board, .gr-receipt, .gr-timeline, .gr-waterfall, .gr-spt, .gr-dilution, .gr-crp) select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23ffffff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
}
.gr-chat-page .gr-chat-widget :is(.gr-pce, .gr-lag, .gr-board, .gr-receipt, .gr-timeline, .gr-waterfall, .gr-spt, .gr-dilution, .gr-crp)
  :is(select, input[type="search"], input[type="text"], input[type="number"]):hover {
  border-color: rgba(255, 255, 255, 0.42);
}
/* Native dropdown lists render on the OS surface: give options a solid
 * Indigo so the white option text stays readable. */
.gr-chat-page .gr-chat-widget :is(.gr-pce, .gr-lag, .gr-board, .gr-receipt, .gr-timeline, .gr-waterfall, .gr-spt, .gr-dilution, .gr-crp) :is(option, optgroup) {
  background-color: #22229f;
  color: #ffffff;
}
.gr-chat-page .gr-chat-widget :is(.gr-pce, .gr-lag, .gr-board, .gr-receipt, .gr-timeline, .gr-waterfall, .gr-spt, .gr-dilution, .gr-crp) input::placeholder {
  color: var(--ps-muted);
}
.gr-chat-page .gr-chat-widget :is(.gr-pce, .gr-receipt, .gr-timeline, .gr-waterfall, .gr-lag, .gr-spt, .gr-dilution, .gr-board, .gr-crp)
  input:is([type="range"], [type="checkbox"], [type="radio"]) {
  accent-color: var(--ps-lemon);
}

/* ── Portfolio / cascade bars ──────────────────────────────────────────── */
.gr-chat-page .gr-chat-widget .gr-pce-bar { background: rgba(255, 255, 255, 0.12); }
.gr-chat-page .gr-chat-widget .gr-pce-fill { background: var(--ps-lav); }
.gr-chat-page .gr-chat-widget .gr-pce-fill.is-binding { background: var(--ps-coral); }

/* ── Scenario & policy tree ────────────────────────────────────────────── */
.gr-chat-page .gr-chat-widget .gr-spt-row { background: transparent; box-shadow: none; }
.gr-chat-page .gr-chat-widget .gr-spt-node.is-recommended > .gr-spt-row {
  background: rgba(255, 222, 76, 0.1);
  box-shadow: inset 3px 0 0 var(--ps-lemon), inset 0 0 0 1px rgba(255, 222, 76, 0.32);
  border-radius: 8px;
}
.gr-chat-page .gr-chat-widget .gr-spt-node.is-recommended > .gr-spt-row .gr-spt-label { color: var(--ps-ink); }
.gr-chat-page .gr-chat-widget .gr-spt-type { color: var(--ps-muted); }
.gr-chat-page .gr-chat-widget .gr-spt-node--decision .gr-spt-type { color: var(--ps-lav); }
.gr-chat-page .gr-chat-widget .gr-spt-node--terminal .gr-spt-type { color: var(--ps-ink); }
.gr-chat-page .gr-chat-widget .gr-spt-node.is-recommended > .gr-spt-row .gr-spt-type { color: var(--ps-lemon); }
.gr-chat-page .gr-chat-widget .gr-spt-toggle:not(.gr-spt-toggle--leaf) { color: var(--ps-ink); }
.gr-chat-page .gr-chat-widget .gr-spt-toggle--leaf { color: var(--ps-lav-2); }
.gr-chat-page .gr-chat-widget .gr-spt-policies .is-recommended,
.gr-chat-page .gr-chat-widget .gr-spt-policies .is-recommended * { color: var(--ps-lemon); }

/* ── SVG: shared ──────────────────────────────────────────────────────── */
.gr-chat-page .gr-chat-widget :is(.gr-timeline, .gr-waterfall, .gr-lag, .gr-dilution, .gr-crp) svg text { fill: var(--ps-axis); }

/* Uncertainty threshold timeline */
.gr-chat-page .gr-chat-widget .gr-timeline-danger { fill: rgba(240, 160, 124, 0.14); }
.gr-chat-page .gr-chat-widget .gr-timeline-safe { fill: rgba(255, 255, 255, 0.04); }
.gr-chat-page .gr-chat-widget .gr-timeline-ribbon { fill: rgba(255, 222, 76, 0.13); }
.gr-chat-page .gr-chat-widget .gr-timeline-line--base { stroke: var(--ps-lemon); stroke-width: 2.5; }
.gr-chat-page .gr-chat-widget .gr-timeline-line--downside { stroke: var(--ps-coral); }
.gr-chat-page .gr-chat-widget .gr-timeline-line--upside { stroke: var(--ps-lav); }
.gr-chat-page .gr-chat-widget .gr-timeline-line--scenario { stroke: rgba(255, 255, 255, 0.55); }
.gr-chat-page .gr-chat-widget .gr-timeline-threshold { stroke: rgba(255, 255, 255, 0.8); }
.gr-chat-page .gr-chat-widget .gr-timeline svg .gr-timeline-threshold-label { fill: var(--ps-ink); }
.gr-chat-page .gr-chat-widget .gr-timeline-crossing-line { stroke: var(--ps-coral); }
.gr-chat-page .gr-chat-widget .gr-timeline-swatch { background: rgba(255, 255, 255, 0.55); }
.gr-chat-page .gr-chat-widget .gr-timeline-swatch--base { background: var(--ps-lemon); }
.gr-chat-page .gr-chat-widget .gr-timeline-swatch--downside { background: var(--ps-coral); }
.gr-chat-page .gr-chat-widget .gr-timeline-swatch--upside { background: var(--ps-lav); }

/* Reconciliation waterfall */
.gr-chat-page .gr-chat-widget .gr-waterfall-zero { stroke: rgba(255, 255, 255, 0.3); }
.gr-chat-page .gr-chat-widget .gr-waterfall-in { fill: var(--ps-lemon); }
.gr-chat-page .gr-chat-widget .gr-waterfall-out { fill: var(--ps-coral); }
.gr-chat-page .gr-chat-widget :is(.gr-waterfall-close, .gr-waterfall-in[data-step="opening"]) { fill: var(--ps-lav); }
.gr-chat-page .gr-chat-widget .gr-waterfall-residual {
  fill: rgba(240, 160, 124, 0.16);
  stroke: var(--ps-coral);
}
.gr-chat-page .gr-chat-widget .gr-waterfall svg .gr-waterfall-open-label { fill: #ffc3a8; }

/* Lagged influence graph */
.gr-chat-page .gr-chat-widget .gr-lag-node { fill: rgba(255, 255, 255, 0.1); stroke: var(--ps-lav); }
.gr-chat-page .gr-chat-widget :is(.gr-lag-node--negative_control, .gr-lag-node--failed_validation) {
  fill: rgba(255, 255, 255, 0.03);
  stroke: rgba(228, 229, 255, 0.45);
}
.gr-chat-page .gr-chat-widget .gr-lag svg .gr-lag-node-label { fill: var(--ps-ink); }
.gr-chat-page .gr-chat-widget .gr-lag-edge { stroke: rgba(255, 255, 255, 0.45); }
.gr-chat-page .gr-chat-widget .gr-lag-edge--positive { stroke: var(--ps-lemon); }
.gr-chat-page .gr-chat-widget .gr-lag-edge--negative { stroke: var(--ps-coral); }
.gr-chat-page .gr-chat-widget .gr-lag-arrow { fill: rgba(255, 255, 255, 0.45); }
.gr-chat-page .gr-chat-widget .gr-lag-arrow--positive { fill: var(--ps-lemon); }
.gr-chat-page .gr-chat-widget .gr-lag-arrow--negative { fill: var(--ps-coral); }

/* Dilution ribbon: the palette is inline in the JSX, so map each slot by
 * its fill attribute (CSS fill beats the presentation attribute). Holder
 * slices are categories, not good/bad, so no coral: Lemon leads, then the
 * lavender ramp, with an Indigo hairline between adjacent slices. */
.gr-chat-page .gr-chat-widget .gr-dilution-slice { stroke: #2525b4; stroke-width: 2; }
.gr-chat-page .gr-chat-widget .gr-dilution-slice[fill="#3b3bd6"] { fill: var(--ps-lemon); }
.gr-chat-page .gr-chat-widget .gr-dilution-slice[fill="#c2532d"] { fill: var(--ps-lav); }
.gr-chat-page .gr-chat-widget .gr-dilution-slice[fill="#d9a400"] { fill: var(--ps-lav-2); }
.gr-chat-page .gr-chat-widget .gr-dilution-slice[fill="#8f91e6"] { fill: rgba(255, 255, 255, 0.42); }
.gr-chat-page .gr-chat-widget .gr-dilution svg .gr-dilution-slice-label { fill: var(--ps-deep); font-weight: 600; }

/* Calibration & robustness */
.gr-chat-page .gr-chat-widget .gr-crp-diagonal { stroke: rgba(255, 255, 255, 0.45); stroke-opacity: 1; }
.gr-chat-page .gr-chat-widget :is(.gr-crp-axis, .gr-crp-zero) { stroke: rgba(255, 255, 255, 0.3); }
.gr-chat-page .gr-chat-widget .gr-crp-ece-band { fill: var(--ps-lav); fill-opacity: 0.16; }
.gr-chat-page .gr-chat-widget .gr-crp-bin { fill: var(--ps-lemon); }
.gr-chat-page .gr-chat-widget .gr-crp-interval { stroke: var(--ps-lav); }
.gr-chat-page .gr-chat-widget .gr-crp-point { fill: var(--ps-lemon); }
.gr-chat-page .gr-chat-widget :is(.gr-crp-interval.is-withheld, .gr-crp-point.is-withheld) {
  stroke: rgba(228, 229, 255, 0.35);
  fill: rgba(228, 229, 255, 0.35);
}
.gr-chat-page .gr-chat-widget .gr-crp svg .gr-crp-forest-label { fill: var(--ps-body); }

/* Recommended-path list: the step's spans sit flush in the markup; space
 * them, and mark the path itself in Lemon (it IS the recommended path). */
.gr-chat-page .gr-chat-widget .gr-spt-path-step > span + span { margin-left: 0.55rem; }
.gr-chat-page .gr-chat-widget .gr-spt-path > li::marker { color: var(--ps-lemon); }
.gr-chat-page .gr-chat-widget .gr-spt-path-step .gr-spt-type { color: var(--ps-lemon); }
.gr-chat-page .gr-chat-widget .gr-spt-path-step .gr-spt-label { color: var(--ps-ink); }

/* Receipt disclosures are boxes now: give the summary room. */
.gr-chat-page .gr-chat-widget .gr-receipt-disclosure { padding: 0.5rem 0.85rem; }
.gr-chat-page .gr-chat-widget .gr-receipt-disclosure[open] > summary { margin-bottom: 0.25rem; }
