/* ═══════════════════════════════════════════════════════════════════════════
   CASE LAYOUT — EDRM-aligned workspace for case-scoped pages
   Includes: case header, EDRM stage bar, breadcrumb, Lumen panel,
   workspace grid, severity indicators, evidence cards
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── EDRM Stage Colors (Gemstone Palette) ──────────────────────────────── */
:root {
  --edrm-upload: var(--color-sapphire, #1f3a99);
  --edrm-review: #2563eb;
  --edrm-analyze: var(--color-tanzanite, #4a2db5);
  --edrm-discover: var(--color-emerald, #0a6840);
  --edrm-prepare: var(--color-gold, #c88c00);
  --edrm-export: var(--color-labradorite, #2d3f6e);
  --severity-critical: #dc2626;
  --severity-high: #ea580c;
  --severity-moderate: #d97706;
  --severity-low: #2563eb;
  --severity-info: #64748b;
}

/* ── Case Header ───────────────────────────────────────────────────────── */

.case-header {
  position: sticky;
  top: var(--app-bar-height, 44px); /* sticks immediately below the app-bar */
  z-index: var(--z-case-bar, 2800);
  background: var(--surface-card-solid, #fff);
  border-bottom: 1px solid var(--border-subtle);
  padding-block: var(--space-md) var(--space-sm);
}

.case-header__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.case-header__identity {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.case-header__name-group {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
  min-width: 0;
}

.case-header__name {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 32ch;
}

.case-header__meta {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.case-header__stats {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.case-header__stat {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.case-header__stat-value {
  font-weight: 600;
  color: var(--color-text);
}

.case-header__shield {
  color: var(--color-emerald);
  flex-shrink: 0;
}

/* ── Status Dot ────────────────────────────────────────────────────────── */

.ev-status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.ev-status-dot--pending {
  background: var(--color-text-muted);
}

.ev-status-dot--processing {
  background: var(--color-sapphire);
  animation: pulse-dot 1.5s ease-in-out infinite;
}

.ev-status-dot--complete {
  background: var(--color-emerald);
}

.ev-status-dot--error {
  background: var(--severity-critical);
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }
}

/* ── EDRM Stage Progress Bar ──────────────────────────────────────────── */

.edrm-stages {
  padding-block: var(--space-xs);
  position: relative;
}

.edrm-stages__list {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
  z-index: 1;
}

.edrm-stages__item {
  flex: 1;
  text-align: center;
  position: relative;
}

.edrm-stages__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  text-decoration: none;
  color: var(--color-text-muted);
  font-size: 0.75rem;
  font-weight: 500;
  padding: var(--space-xs);
  border-radius: var(--radius-sm);
  transition: color 0.15s ease;
  cursor: pointer;
}

.edrm-stages__link:hover {
  color: var(--color-primary);
}

.edrm-stages__link:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.edrm-stages__number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 700;
  border: 2px solid var(--border-default);
  background: var(--surface-card-solid, #fff);
  transition: all 0.2s ease;
}

.edrm-stages__label {
  transition: color 0.15s ease;
}

/* Stage states */
.edrm-stages__item--complete .edrm-stages__number {
  background: var(--color-emerald);
  border-color: var(--color-emerald);
  color: #fff;
}

.edrm-stages__item--complete .edrm-stages__link {
  color: var(--color-emerald);
}

.edrm-stages__item--current .edrm-stages__number {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-primary) 16%, transparent);
}

.edrm-stages__item--current .edrm-stages__link {
  color: var(--color-primary);
  font-weight: 600;
}

.edrm-stages__item--available .edrm-stages__number {
  border-color: var(--border-strong);
  color: var(--color-text-muted);
}

.edrm-stages__item--locked .edrm-stages__number {
  border-color: var(--border-subtle);
  color: var(--color-text-muted);
  opacity: 0.45;
}

.edrm-stages__item--locked .edrm-stages__label {
  opacity: 0.45;
}

.edrm-stages__item--locked .edrm-stages__link {
  cursor: default;
}

.edrm-stages__lock {
  color: var(--color-text-muted);
  opacity: 0.4;
  margin-top: 2px;
}

/* Track + fill */
.edrm-stages__track {
  position: absolute;
  top: calc(var(--space-xs) + 1rem);
  left: calc(100% / 12);
  right: calc(100% / 12);
  height: 2px;
  background: var(--border-default);
  z-index: 0;
}

.edrm-stages__fill {
  height: 100%;
  background: var(--color-emerald);
  border-radius: 1px;
  transition: width 0.4s ease;
}

/* ── Breadcrumb ────────────────────────────────────────────────────────── */

.ev-breadcrumb {
  padding-block: var(--space-sm);
}

.ev-breadcrumb__list {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.ev-breadcrumb__item + .ev-breadcrumb__item::before {
  content: "/";
  margin-inline-end: var(--space-xs);
  color: var(--border-default);
}

.ev-breadcrumb__link {
  color: var(--color-text-muted);
  text-decoration: none;
}

.ev-breadcrumb__link:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

.ev-breadcrumb__current {
  color: var(--color-text);
  font-weight: 500;
}

/* ── Case Workspace Grid ──────────────────────────────────────────────── */

.case-workspace {
  display: grid;
  grid-template-columns: 1fr;
  min-height: calc(100vh - 16rem);
  position: relative;
}

.case-workspace.lumen-open {
  grid-template-columns: 1fr 340px;
}

.case-workspace__main {
  padding: var(--space-lg);
  overflow-y: auto;
}

/* ── Lumen Panel ──────────────────────────────────────────────────────── */

.lumen-panel {
  position: fixed;
  top: 0;
  right: -360px;
  width: 340px;
  height: 100vh;
  background: var(--surface-card-solid, #fff);
  border-left: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  z-index: 3000;
  transition: right 0.25s ease;
}

.lumen-panel[data-lumen-state="expanded"] {
  right: 0;
}

.lumen-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md);
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.lumen-panel__title-group {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.lumen-panel__icon {
  color: var(--color-tanzanite);
}

.lumen-panel__title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-text);
}

.lumen-panel__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background 0.15s;
}

.lumen-panel__close:hover {
  background: var(--surface-inset);
  color: var(--color-text);
}

/* ── Lumen Actions ─────────────────────────────────── */

.lumen-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.lumen-panel__action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  background: transparent;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.lumen-panel__action-btn:hover {
  border-color: var(--color-tanzanite);
  color: var(--color-tanzanite);
  background: color-mix(in srgb, var(--color-tanzanite) 6%, transparent);
}

.lumen-panel__action-btn[aria-pressed="true"] {
  border-color: var(--color-tanzanite);
  background: color-mix(in srgb, var(--color-tanzanite) 10%, transparent);
  color: var(--color-tanzanite);
  font-weight: 600;
}

.lumen-panel__action-btn[data-tier-locked] {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ── Lumen Body ────────────────────────────────────── */

.lumen-panel__body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-md);
}

.lumen-panel__empty {
  text-align: center;
  padding-block: var(--space-xl);
  color: var(--color-text-muted);
  font-size: 0.8125rem;
  line-height: 1.6;
}

.lumen-panel__disclaimer {
  margin-block-start: var(--space-md);
  font-size: 0.6875rem;
  color: var(--border-strong);
  font-style: italic;
}

.lumen-panel__loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  padding-block: var(--space-xl);
  color: var(--color-text-muted);
  font-size: 0.8125rem;
}

.lumen-panel__spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border-default);
  border-top-color: var(--color-tanzanite);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.lumen-panel__result {
  font-size: 0.8125rem;
  line-height: 1.7;
  color: var(--color-text);
}

.lumen-panel__result h3 {
  font-size: 0.875rem;
  font-weight: 700;
  margin-block: var(--space-md) var(--space-xs);
  color: var(--color-text);
}

.lumen-panel__result ul {
  padding-inline-start: 1.25rem;
  margin-block: var(--space-xs);
}

/* ── Lumen Input ───────────────────────────────────── */

.lumen-panel__input {
  display: flex;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  border-top: 1px solid var(--border-subtle);
  flex-shrink: 0;
  align-items: flex-end;
}

.lumen-panel__textarea {
  flex: 1;
  resize: none;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: var(--space-sm);
  font-size: 0.8125rem;
  font-family: inherit;
  line-height: 1.4;
  color: var(--color-text);
  background: var(--surface-card-solid, #fff);
  transition: border-color 0.15s;
}

.lumen-panel__textarea:focus {
  outline: none;
  border-color: var(--color-tanzanite);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-tanzanite) 12%, transparent);
}

.lumen-panel__send {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--color-tanzanite);
  color: #fff;
  cursor: pointer;
  transition: background 0.15s;
  flex-shrink: 0;
}

.lumen-panel__send:hover {
  background: color-mix(in srgb, var(--color-tanzanite) 85%, black);
}

/* ── Lumen FAB ─────────────────────────────────────── */

.lumen-fab {
  position: fixed;
  bottom: var(--space-lg);
  right: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.75rem 1.25rem;
  border: none;
  border-radius: var(--radius-full);
  background: var(--color-tanzanite);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  z-index: 2999;
}

.lumen-fab:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.lumen-fab:active {
  transform: translateY(0);
}

/* ── Severity Indicators ──────────────────────────────────────────────── */

.ev-severity {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.ev-severity__shape {
  flex-shrink: 0;
}

.ev-severity--critical {
  color: var(--severity-critical);
}

.ev-severity--high {
  color: var(--severity-high);
}

.ev-severity--moderate {
  color: var(--severity-moderate);
}

.ev-severity--low {
  color: var(--severity-low);
}

.ev-severity--info {
  color: var(--severity-info);
}

/* ── Evidence Card ─────────────────────────────────────────────────────── */

.ev-card {
  background: var(--surface-card-solid, #fff);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  transition:
    box-shadow 0.15s ease,
    border-color 0.15s ease;
}

.ev-card:hover {
  border-color: var(--border-default);
  box-shadow: var(--shadow-sm);
}

.ev-card--severity {
  border-left: 3px solid;
}

.ev-card--critical {
  border-left-color: var(--severity-critical);
}

.ev-card--high {
  border-left-color: var(--severity-high);
}

.ev-card--moderate {
  border-left-color: var(--severity-moderate);
}

.ev-card--low {
  border-left-color: var(--severity-low);
}

.ev-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.ev-card__title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0;
}

.ev-card__body {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.ev-card__footer {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* ── Tier Gate Overlay ─────────────────────────────────────────────────── */

.ev-tier-gate {
  position: relative;
}

.ev-tier-gate__content {
  filter: blur(2px);
  opacity: 0.5;
  pointer-events: none;
}

.ev-tier-gate[inert] .ev-tier-gate__content {
  user-select: none;
}

.ev-tier-gate__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  background: color-mix(in srgb, var(--surface-card-solid) 80%, transparent);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  text-align: center;
  z-index: 10;
}

.ev-tier-gate__label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
}

.ev-tier-gate__desc {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  max-width: 28ch;
}

.ev-tier-gate__upgrade {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0.5rem 1rem;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--color-primary);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
}

.ev-tier-gate__upgrade:hover {
  background: var(--color-primary-dark);
}

/* ── Tier Badge ────────────────────────────────────────────────────────── */

.ev-tier-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ev-tier-badge[data-tier="free"] {
  background: #e2e8f0;
  color: #475569;
}

.ev-tier-badge[data-tier="starter"] {
  background: #dbeafe;
  color: #1e40af;
}

.ev-tier-badge[data-tier="core"] {
  background: color-mix(in srgb, var(--color-sapphire) 14%, white);
  color: var(--color-sapphire);
}

.ev-tier-badge[data-tier="complete"] {
  background: color-mix(in srgb, var(--color-tanzanite) 12%, white);
  color: var(--color-tanzanite);
}

.ev-tier-badge[data-tier="team"] {
  background: color-mix(in srgb, var(--color-emerald) 12%, white);
  color: var(--color-emerald);
}

.ev-tier-badge[data-tier="department"] {
  background: color-mix(in srgb, var(--color-gold) 14%, white);
  color: var(--color-accent-contrast);
}

.ev-tier-badge[data-tier="enterprise"] {
  background: var(--color-obsidian);
  color: var(--color-accent-light);
}

/* ── Accordion (reusable) ──────────────────────────────────────────────── */

.ev-accordion {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.ev-accordion + .ev-accordion {
  margin-top: var(--space-sm);
}

.ev-accordion__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--space-md);
  border: none;
  background: var(--surface-card-solid, #fff);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
  font-family: inherit;
}

.ev-accordion__trigger:hover {
  background: var(--surface-inset);
}

.ev-accordion__trigger:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: -2px;
}

.ev-accordion__trigger-left {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.ev-accordion__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.5rem;
  padding-inline: 0.35rem;
  border-radius: var(--radius-full);
  background: color-mix(in srgb, var(--color-primary) 10%, transparent);
  color: var(--color-primary);
  font-size: 0.75rem;
  font-weight: 700;
}

.ev-accordion__chevron {
  transition: transform 0.2s ease;
  flex-shrink: 0;
  color: var(--color-text-muted);
}

.ev-accordion__trigger[aria-expanded="true"] .ev-accordion__chevron {
  transform: rotate(180deg);
}

.ev-accordion__panel {
  padding: 0 var(--space-md) var(--space-md);
}

.ev-accordion__panel[hidden] {
  display: none;
}

/* ── Guidance Banner (pro se mode) ─────────────────────────────────────── */

.ev-guidance {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-md);
  background: color-mix(in srgb, var(--color-sapphire) 5%, white);
  border: 1px solid color-mix(in srgb, var(--color-sapphire) 16%, white);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-lg);
}

.ev-guidance__icon {
  flex-shrink: 0;
  color: var(--color-sapphire);
  margin-top: 2px;
}

.ev-guidance__body {
  flex: 1;
}

.ev-guidance__title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 var(--space-xs);
}

.ev-guidance__text {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin: 0;
}

.ev-guidance__action {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--color-sapphire);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-sapphire);
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
}

.ev-guidance__action:hover {
  background: color-mix(in srgb, var(--color-sapphire) 8%, transparent);
}

.ev-guidance__dismiss {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ev-guidance__dismiss:hover {
  background: var(--surface-inset);
}

/* ── Section Header (used in case pages) ───────────────────────────────── */

.case-section {
  margin-bottom: var(--space-xl);
}

.case-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.case-section__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.case-section__count {
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--color-text-muted);
}

/* ── Stat Grid (summary cards at top of pages) ─────────────────────────── */

.ev-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.ev-stat {
  background: var(--surface-card-solid, #fff);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-md);
}

.ev-stat__label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: var(--space-xs);
}

.ev-stat__value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.2;
}

.ev-stat__sub {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: var(--space-xs);
}

/* ── Empty State ───────────────────────────────────────────────────────── */

.ev-empty {
  text-align: center;
  padding: var(--space-3xl) var(--space-lg);
  color: var(--color-text-muted);
}

.ev-empty__icon {
  margin-bottom: var(--space-md);
  opacity: 0.4;
}

.ev-empty__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-xs);
}

.ev-empty__text {
  font-size: 0.875rem;
  max-width: 36ch;
  margin-inline: auto;
  line-height: 1.6;
}

/* ── Mobile Responsive ─────────────────────────────────────────────────── */

@media (width <= 768px) {
  .case-header__identity {
    flex-direction: column;
    align-items: flex-start;
  }

  .case-header__name {
    font-size: 1rem;
    max-width: 100%;
  }

  .edrm-stages__list {
    gap: var(--space-xs);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: var(--space-sm);
  }

  .edrm-stages__item {
    flex: 0 0 auto;
    min-width: 3.5rem;
    scroll-snap-align: center;
  }

  .edrm-stages__track {
    display: none;
  }

  .case-workspace {
    grid-template-columns: 1fr;
  }

  .case-workspace__main {
    padding: var(--space-md);
  }

  .lumen-panel {
    inset: auto 0 0;
    width: 100%;
    height: 60vh;
    border-left: none;
    border-top: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    transform: translateY(100%);
    transition: transform 0.25s ease;
  }

  .lumen-panel[data-lumen-state="expanded"] {
    right: 0;
    transform: translateY(0);
  }

  .ev-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (width <= 480px) {
  .ev-stats {
    grid-template-columns: 1fr;
  }

  .edrm-stages__label {
    font-size: 0.6875rem;
  }

  .edrm-stages__number {
    width: 1.75rem;
    height: 1.75rem;
    font-size: 0.75rem;
  }
}

/* ── Reduced Motion ────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .edrm-stages__fill,
  .edrm-stages__number,
  .edrm-stages__link,
  .lumen-panel,
  .lumen-fab,
  .ev-accordion__chevron,
  .ev-status-dot--processing {
    transition: none;
    animation: none;
  }
}
