/*
 * VinylNext Executive, Commercial, Production OR & Layer B Analytics UI
 * Strictly aligned with «Маржа + FBS / unified» design system (`design-system.css`).
 * Uses ONLY --ds-* semantic tokens for full light/dark theme & profile parity.
 */

.ea-shell,
.ea-shell *,
.ea-shell *::before,
.ea-shell *::after,
.ea-drawer,
.ea-drawer *,
.ea-drawer *::before,
.ea-drawer *::after,
.ea-lb-shell,
.ea-lb-shell *,
.ea-lb-shell *::before,
.ea-lb-shell *::after {
  box-sizing: border-box;
}

.ea-shell,
.ea-lb-shell {
  display: grid;
  gap: var(--ds-space-4);
  margin-block-start: var(--ds-space-5);
  min-width: 0;
  max-width: 100%;
  color: var(--ds-text);
  font-family: var(--ds-font);
}

.ea-shell--flush {
  margin-block-start: 0;
}

.ea-section {
  display: grid;
  gap: var(--ds-space-4);
  min-width: 0;
  max-width: 100%;
}

.ea-card {
  display: grid;
  gap: var(--ds-space-3);
  min-width: 0;
  max-width: 100%;
  padding: var(--ds-space-5);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-panel);
  background: var(--ds-surface);
  color: var(--ds-text);
  box-shadow: var(--ds-shadow);
}

.ea-card--soft {
  background: var(--ds-surface-soft);
  box-shadow: none;
}

.ea-card--compact {
  padding: var(--ds-space-4);
}

.ea-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--ds-space-3);
  min-width: 0;
}

.ea-card-title {
  margin: 0;
  font-size: var(--ds-h2-size);
  line-height: var(--ds-h2-line-height);
  font-weight: var(--ds-h2-weight);
  letter-spacing: -0.015em;
  overflow-wrap: anywhere;
}

.ea-card-subtitle {
  margin: var(--ds-space-1) 0 0;
  font-size: var(--ds-caption-size);
  line-height: var(--ds-caption-line-height);
  color: var(--ds-text-muted);
  overflow-wrap: anywhere;
}

/* Header & Epistemic Trust Strip */
.ea-trust-strip {
  display: grid;
  gap: var(--ds-space-4);
  padding: var(--ds-space-5);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-panel);
  background: var(--ds-surface);
  box-shadow: var(--ds-shadow);
  min-width: 0;
}

.ea-trust-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--ds-space-4);
  min-width: 0;
}

.ea-trust-score-block {
  display: flex;
  align-items: center;
  gap: var(--ds-space-3);
  min-width: 0;
}

.ea-score-ring {
  display: grid;
  place-items: center;
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: var(--ds-radius-pill);
  border: 3px solid var(--ds-border);
  background: var(--ds-surface-soft);
  font-size: var(--ds-body-size);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.ea-score-ring--high {
  border-color: var(--ds-success);
  background: var(--ds-success-soft);
  color: var(--ds-success);
}

.ea-score-ring--medium {
  border-color: var(--ds-warning);
  background: var(--ds-warning-soft);
  color: var(--ds-warning);
}

.ea-score-ring--low {
  border-color: var(--ds-danger);
  background: var(--ds-danger-soft);
  color: var(--ds-danger);
}

.ea-trust-copy {
  display: grid;
  gap: var(--ds-space-1);
  min-width: 0;
}

.ea-trust-copy h2 {
  margin: 0;
  font-size: var(--ds-h2-size);
  line-height: var(--ds-h2-line-height);
  font-weight: var(--ds-h2-weight);
}

.ea-trust-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--ds-space-2);
  font-size: var(--ds-caption-size);
  color: var(--ds-text-muted);
}

.ea-trust-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--ds-space-2);
}

.ea-alert-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: var(--ds-space-2);
  padding-block-start: var(--ds-space-3);
  border-block-start: 1px solid var(--ds-border);
}

.ea-alert-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ds-space-2);
  padding: var(--ds-space-2) var(--ds-space-3);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-control);
  background: var(--ds-surface-soft);
  font-size: var(--ds-caption-size);
  min-width: 0;
}

.ea-alert-pill--red {
  border-color: var(--ds-danger);
  background: var(--ds-danger-soft);
  color: var(--ds-danger);
}

.ea-alert-pill--amber {
  border-color: var(--ds-warning);
  background: var(--ds-warning-soft);
  color: var(--ds-warning);
}

.ea-alert-pill-label {
  overflow-wrap: anywhere;
  font-weight: 600;
}

.ea-alert-pill-val {
  flex: none;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* Sub-Tabs */
.ea-tablist {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--ds-space-2);
  padding: var(--ds-space-2);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-panel);
  background: var(--ds-surface-soft);
  min-width: 0;
  max-width: 100%;
}

.ea-tab {
  display: inline-flex;
  flex: 0 0 auto;
  width: auto;
  align-items: center;
  justify-content: center;
  gap: var(--ds-space-2);
  min-height: var(--ds-control-height-compact);
  padding: var(--ds-space-2) var(--ds-space-3);
  border: 1px solid transparent;
  border-radius: var(--ds-radius-control);
  background: transparent;
  color: var(--ds-text-muted);
  font-family: var(--ds-font);
  font-size: var(--ds-label-size);
  font-weight: var(--ds-label-weight);
  line-height: 1.3;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color var(--ds-motion-fast), color var(--ds-motion-fast), border-color var(--ds-motion-fast);
}

.ea-tab:hover {
  background: var(--ds-surface-hover);
  color: var(--ds-text);
}

.ea-tab[aria-selected="true"] {
  background: var(--ds-surface);
  color: var(--ds-accent);
  border-color: var(--ds-accent);
  box-shadow: var(--ds-shadow);
}

.ea-tab:focus-visible {
  outline: var(--ds-focus-width) solid var(--ds-focus);
  outline-offset: var(--ds-focus-offset);
}

.ea-tabpanel {
  display: grid;
  gap: var(--ds-space-4);
  min-width: 0;
  max-width: 100%;
}

/* Grids */
.ea-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 205px), 1fr));
  gap: var(--ds-space-3);
  min-width: 0;
}

.ea-kpi-card {
  display: grid;
  align-content: space-between;
  gap: var(--ds-space-2);
  min-width: 0;
  padding: var(--ds-space-4);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-panel);
  background: var(--ds-surface);
}

.ea-kpi-card--soft {
  background: var(--ds-surface-soft);
}

.ea-kpi-label {
  font-size: var(--ds-caption-size);
  line-height: var(--ds-caption-line-height);
  color: var(--ds-text-muted);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.ea-kpi-value {
  font-size: 20px;
  line-height: 1.25;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ds-text);
  overflow-wrap: anywhere;
}

.ea-kpi-value--pos {
  color: var(--ds-success);
}

.ea-kpi-value--neg {
  color: var(--ds-danger);
}

.ea-kpi-value--warn {
  color: var(--ds-warning);
}

.ea-kpi-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--ds-space-2);
  font-size: var(--ds-caption-size);
  color: var(--ds-text-muted);
}

.ea-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--ds-space-4);
  align-items: start;
  min-width: 0;
}

.ea-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--ds-space-3);
  align-items: stretch;
  min-width: 0;
}

/* Epistemic Badges & Inline Links */
.ea-epistemic-wrap {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--ds-space-2);
  max-width: 100%;
}

.ea-epistemic-link {
  font-size: var(--ds-caption-size);
  font-weight: 600;
  color: var(--ds-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}

.ea-epistemic-link:hover {
  color: var(--ds-action-hover);
}

/* Missing Inputs Action Checklist */
.ea-checklist {
  display: grid;
  gap: var(--ds-space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.ea-checklist-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--ds-space-3);
  padding: var(--ds-space-3) var(--ds-space-4);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-control);
  background: var(--ds-surface-soft);
  min-width: 0;
}

.ea-checklist-copy {
  display: grid;
  gap: var(--ds-space-1);
  min-width: 0;
  flex: 1 1 240px;
}

.ea-checklist-copy strong {
  font-size: var(--ds-label-size);
  color: var(--ds-text);
  overflow-wrap: anywhere;
}

.ea-checklist-copy span {
  font-size: var(--ds-caption-size);
  color: var(--ds-text-muted);
  overflow-wrap: anywhere;
}

/* Progress & Utilization Bars */
.ea-bar-group {
  display: grid;
  gap: var(--ds-space-2);
  min-width: 0;
}

.ea-bar-row {
  display: grid;
  gap: var(--ds-space-1);
  min-width: 0;
}

.ea-bar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ds-space-2);
  font-size: var(--ds-caption-size);
}

.ea-bar-track {
  position: relative;
  width: 100%;
  height: 10px;
  border-radius: var(--ds-radius-pill);
  background: var(--ds-surface-soft);
  border: 1px solid var(--ds-border);
  overflow: hidden;
}

.ea-bar-track--slim {
  height: 7px;
  min-width: 72px;
}

.ea-bar-fill {
  height: 100%;
  border-radius: var(--ds-radius-pill);
  background: var(--ds-accent);
  transition: width var(--ds-motion-normal);
}

.ea-bar-fill--success {
  background: var(--ds-success);
}

.ea-bar-fill--warning {
  background: var(--ds-warning);
}

.ea-bar-fill--danger {
  background: var(--ds-danger);
}

.ea-bar-fill--info {
  background: var(--ds-info);
}

.ea-bar-fill--neutral {
  background: var(--ds-neutral);
}

/* CSP-safe Pure-SVG Progress Bars (zero inline style attributes) */
.ea-bar-svg {
  display: block;
  width: 100%;
  height: 10px;
}

.ea-bar-svg--slim {
  height: 7px;
  min-width: 72px;
}

.ea-bar-svg-track {
  fill: var(--ds-surface-soft);
  stroke: var(--ds-border);
  stroke-width: 1;
}

.ea-bar-svg-fill--accent { fill: var(--ds-accent); }
.ea-bar-svg-fill--success { fill: var(--ds-success); }
.ea-bar-svg-fill--warning { fill: var(--ds-warning); }
.ea-bar-svg-fill--danger { fill: var(--ds-danger); }
.ea-bar-svg-fill--info { fill: var(--ds-info); }
.ea-bar-svg-fill--neutral { fill: var(--ds-neutral); }

/* Layout & Typography Utility Classes (CSP style-src 'self' safe) */
.ea-notice-copy { margin: var(--ds-space-2) 0 var(--ds-space-3); }
.ea-notice-copy--tight { margin: 0 0 var(--ds-space-2); }
.ea-notice-copy--top { margin: var(--ds-space-2) 0 0; }
.ea-util-cell { display: grid; gap: var(--ds-space-1); min-width: 92px; }
.ea-badges-tight { display: flex; align-items: center; flex-wrap: wrap; gap: var(--ds-space-1); }
.ea-mono { font-family: var(--ds-font-mono); }
.ea-reasons-list { margin: var(--ds-space-1) 0 0; padding-inline-start: 18px; }
.ea-note-input { min-width: 150px; }

/* Pure SVG Chart Frames */
.ea-chart-frame {
  display: grid;
  gap: var(--ds-space-2);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: var(--ds-space-3);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-control);
  background: var(--ds-surface-soft);
  overflow: hidden;
}

.ea-svg {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

.ea-svg-grid {
  stroke: var(--ds-border);
  stroke-width: 1;
}

.ea-svg-axis {
  stroke: var(--ds-input-border);
  stroke-width: 1.25;
}

.ea-svg-label {
  fill: var(--ds-text-muted);
  font-family: var(--ds-font);
  font-size: 11px;
}

.ea-svg-val {
  fill: var(--ds-text);
  font-family: var(--ds-font);
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.ea-svg-pos {
  fill: var(--ds-success);
}

.ea-svg-neg {
  fill: var(--ds-danger);
}

.ea-svg-total {
  fill: var(--ds-accent);
}

.ea-svg-warn {
  fill: var(--ds-warning);
}

.ea-svg-muted {
  fill: var(--ds-neutral);
}

.ea-svg-band {
  fill: var(--ds-info);
  fill-opacity: 0.18;
}

.ea-svg-median {
  fill: none;
  stroke: var(--ds-accent);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ea-svg-p05 {
  fill: none;
  stroke: var(--ds-danger);
  stroke-width: 1.5;
  stroke-dasharray: 4 3;
}

.ea-svg-p95 {
  fill: none;
  stroke: var(--ds-success);
  stroke-width: 1.5;
  stroke-dasharray: 4 3;
}

.ea-svg-buffer {
  fill: none;
  stroke: var(--ds-warning);
  stroke-width: 1.75;
  stroke-dasharray: 6 4;
}

.ea-svg-zero {
  fill: none;
  stroke: var(--ds-danger);
  stroke-width: 1.25;
  stroke-opacity: 0.7;
}

.ea-svg-zone-green {
  fill: var(--ds-success-soft);
  fill-opacity: 0.7;
}

.ea-svg-zone-yellow {
  fill: var(--ds-warning-soft);
  fill-opacity: 0.7;
}

.ea-svg-zone-red {
  fill: var(--ds-danger-soft);
  fill-opacity: 0.7;
}

.ea-svg-dot-green {
  fill: var(--ds-success);
  stroke: var(--ds-surface);
  stroke-width: 1.5;
}

.ea-svg-dot-yellow {
  fill: var(--ds-warning);
  stroke: var(--ds-surface);
  stroke-width: 1.5;
}

.ea-svg-dot-red,
.ea-svg-dot-black {
  fill: var(--ds-danger);
  stroke: var(--ds-surface);
  stroke-width: 1.5;
}

.ea-svg-whisker {
  stroke: var(--ds-accent);
  stroke-width: 2;
  stroke-opacity: 0.55;
}

.ea-svg-bar-p50 {
  fill: var(--ds-accent);
  fill-opacity: 0.82;
}

.ea-chart-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--ds-space-3);
  font-size: var(--ds-caption-size);
  color: var(--ds-text-muted);
}

.ea-legend-item {
  display: inline-flex;
  align-items: center;
  gap: var(--ds-space-1);
}

.ea-legend-swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex: none;
}

.ea-legend-swatch--accent { background: var(--ds-accent); }
.ea-legend-swatch--success { background: var(--ds-success); }
.ea-legend-swatch--danger { background: var(--ds-danger); }
.ea-legend-swatch--warning { background: var(--ds-warning); }
.ea-legend-swatch--info { background: var(--ds-info); opacity: 0.4; }

/* KRI Heat Grid */
.ea-kri-domain {
  display: grid;
  gap: var(--ds-space-3);
  min-width: 0;
}

.ea-kri-domain-title {
  margin: 0;
  font-size: var(--ds-label-size);
  font-weight: 700;
  color: var(--ds-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.ea-kri-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 245px), 1fr));
  gap: var(--ds-space-3);
  min-width: 0;
}

.ea-kri-tile {
  display: grid;
  align-content: space-between;
  gap: var(--ds-space-2);
  padding: var(--ds-space-3) var(--ds-space-4);
  border: 1px solid var(--ds-border);
  border-inline-start-width: 4px;
  border-radius: var(--ds-radius-control);
  background: var(--ds-surface);
  min-width: 0;
}

.ea-kri-tile--green { border-inline-start-color: var(--ds-success); }
.ea-kri-tile--amber { border-inline-start-color: var(--ds-warning); }
.ea-kri-tile--red { border-inline-start-color: var(--ds-danger); }
.ea-kri-tile--needs_data { border-inline-start-color: var(--ds-neutral); }

.ea-kri-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ds-space-2);
}

.ea-kri-code {
  font-family: var(--ds-font-mono);
  font-size: var(--ds-caption-size);
  font-weight: 700;
  color: var(--ds-text-muted);
}

.ea-kri-label {
  font-size: var(--ds-label-size);
  font-weight: 600;
  line-height: 1.35;
  color: var(--ds-text);
  overflow-wrap: anywhere;
}

.ea-kri-val {
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ds-text);
}

.ea-kri-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--ds-space-1);
  font-size: var(--ds-caption-size);
  color: var(--ds-text-muted);
}

/* What-If Slider Studio */
.ea-whatif-grid {
  display: grid;
  grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
  gap: var(--ds-space-4);
  align-items: start;
  min-width: 0;
}

.ea-whatif-sliders {
  display: grid;
  gap: var(--ds-space-3);
  padding: var(--ds-space-4);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-panel);
  background: var(--ds-surface-soft);
  min-width: 0;
}

.ea-slider-row {
  display: grid;
  gap: var(--ds-space-1);
  min-width: 0;
}

.ea-slider-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ds-space-2);
  font-size: var(--ds-label-size);
}

.ea-slider-val {
  font-family: var(--ds-font-mono);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ds-accent);
}

.ea-range {
  width: 100%;
  margin: 0;
  accent-color: var(--ds-accent);
  cursor: pointer;
}

.ea-whatif-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--ds-space-2);
  margin-block-start: var(--ds-space-2);
}

/* Collapsible Drawers (Pre-Promise & PLAN-04 Calendar Impact) */
.ea-drawer {
  margin-block-start: var(--ds-space-4);
  min-width: 0;
  max-width: 100%;
}

.ea-drawer > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--ds-space-2);
  font-size: var(--ds-body-size);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.ea-drawer > summary::marker,
.ea-drawer > summary::-webkit-details-marker {
  display: none;
}

.ea-drawer-body {
  display: grid;
  gap: var(--ds-space-4);
  margin-block-start: var(--ds-space-4);
  padding-block-start: var(--ds-space-4);
  border-block-start: 1px solid var(--ds-border);
  min-width: 0;
}

/* Tables inside Analytics */
.ea-table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-panel);
  background: var(--ds-surface);
  scrollbar-width: thin;
}

.ea-table-wrap .ds-table {
  width: 100%;
  min-width: 0;
}

.ea-table-wrap .ds-table th {
  white-space: nowrap;
}

.ea-table-wrap .ds-table td {
  overflow-wrap: anywhere;
}

.ea-row-highlight td {
  background: var(--ds-surface-soft);
  font-weight: 700;
}

.ea-num-pos { color: var(--ds-success); font-weight: 600; }
.ea-num-neg { color: var(--ds-danger); font-weight: 600; }
.ea-num-warn { color: var(--ds-warning); font-weight: 600; }

/* Layer B Financial Input Studio */
.ea-progress-card {
  display: grid;
  gap: var(--ds-space-3);
  padding: var(--ds-space-5);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-panel);
  background: var(--ds-surface);
  box-shadow: var(--ds-shadow);
}

.ea-missing-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ds-space-2);
}

.ea-missing-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--ds-space-1);
  padding: var(--ds-space-1) var(--ds-space-3);
  min-height: var(--ds-control-height-compact);
  border: 1px solid var(--ds-warning);
  border-radius: var(--ds-radius-pill);
  background: var(--ds-warning-soft);
  color: var(--ds-warning);
  font-family: var(--ds-font);
  font-size: var(--ds-caption-size);
  font-weight: 600;
  cursor: pointer;
}

.ea-missing-pill:hover {
  background: var(--ds-surface-hover);
  border-color: var(--ds-accent);
  color: var(--ds-accent);
}

.ea-lb-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: var(--ds-space-3);
  align-items: end;
  padding: var(--ds-space-4);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-control);
  background: var(--ds-surface-soft);
  min-width: 0;
}

.ea-lb-field {
  display: grid;
  gap: var(--ds-space-1);
  min-width: 0;
  font-size: var(--ds-label-size);
  font-weight: 600;
}

.ea-lb-field--check {
  display: flex;
  align-items: center;
  gap: var(--ds-space-2);
  min-height: var(--ds-control-height);
  font-weight: 500;
}

.ea-lb-field--check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--ds-accent);
}

.ea-lb-form-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--ds-space-2);
}

.ea-inline-actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--ds-space-2);
}

.ea-inline-confirm {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--ds-space-1);
  padding: var(--ds-space-1) var(--ds-space-2);
  border: 1px solid var(--ds-danger);
  border-radius: var(--ds-radius-control);
  background: var(--ds-danger-soft);
}

.ea-inline-confirm-text {
  font-size: var(--ds-caption-size);
  font-weight: 600;
  color: var(--ds-danger);
  margin-inline-end: var(--ds-space-1);
}

.ea-status-msg {
  margin: 0;
  font-size: var(--ds-label-size);
  color: var(--ds-text-muted);
}

.ea-status-msg--error {
  color: var(--ds-danger);
  font-weight: 600;
}

.ea-status-msg--success {
  color: var(--ds-success);
  font-weight: 600;
}

/* Responsive Breakpoints (1440px -> 820px -> 390px) */
@media (max-width: 960px) {
  .ea-whatif-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 820px) {
  .ea-grid-2,
  .ea-grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }

  .ea-card,
  .ea-trust-strip,
  .ea-progress-card {
    padding: var(--ds-space-4);
  }

  .ea-tablist {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .ea-tab {
    flex: 0 0 auto;
    min-width: max-content;
  }
}

@media (max-width: 520px) {
  .ea-kpi-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .ea-lb-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .ea-trust-top {
    flex-direction: column;
    align-items: stretch;
  }

  .ea-trust-actions .ds-button {
    width: 100%;
  }

  .ea-kpi-value {
    font-size: 18px;
  }
}

@media (pointer: coarse) {
  .ea-tab,
  .ea-missing-pill {
    min-height: var(--ds-control-height-touch);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ea-shell *,
  .ea-drawer *,
  .ea-lb-shell * {
    transition: none !important;
    animation: none !important;
  }
}

@media (forced-colors: active) {
  .ea-card,
  .ea-trust-strip,
  .ea-kpi-card,
  .ea-kri-tile,
  .ea-tab[aria-selected="true"] {
    border-color: CanvasText;
  }
}
