/* ═══════════════════════════════════════════════════════════════
   Loom Mission Control — Premium Cinematic Dark UI
   Palette verified: all text pairs ≥4.5:1, components ≥3:1
   prefers-reduced-motion blocks on every keyframe
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── Tokens ───────────────────────────────────────────────────── */
:root {
  /* Backgrounds — deep obsidian with blue-black tint */
  --bg:       #070a10;
  --panel:    #0e1420;
  --panel-2:  #141c2e;
  --panel-3:  #1a2438;

  /* Borders */
  --line:     #1e2d4a;
  --line-2:   #253550;

  /* Text — verified ≥4.5:1 on all panel variants */
  --text:     #e8eef7;   /* 18:1 on --bg */
  --muted:    #7a96bc;   /* 5.9:1 on --bg; 5.3:1 on --panel */
  --faint:    #3d5470;   /* UI decoration only, never body text */

  /* Accent — electric blue */
  --accent:   #3d8ef8;   /* 6.6:1 on --bg (large text / UI) */
  --accent-2: #1a5fc7;
  --accent-ink: #001834;

  /* Status colors — all ≥3:1 as UI components, ≥4.5:1 as text */
  --ok:       #22d471;   /* 10.6:1 on --bg */
  --ok-dim:   #0d7a3e;
  --ok-ink:   #001f0f;
  --fail:     #ff3b5c;   /* 5.9:1 on --bg */
  --fail-dim: #7a0020;
  --fail-ink: #2a0010;

  /* Vision / AI tier — purple, 5.3:1 on --bg */
  --vision:   #a855f7;
  --vision-dim:#5a1a8f;
  --vision-ink:#1a0030;

  /* HEALED gold — 10.4:1 on --bg */
  --heal:     #f5a623;
  --heal-dim: #7a4c00;
  --heal-ink: #1a0c00;

  /* Focus ring — bright yellow, 14.6:1 on --bg */
  --focus:    #ffd700;

  /* Typography */
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Radii & spacing */
  --r-sm: 6px;
  --r:    10px;
  --r-lg: 14px;
  --r-xl: 18px;

  /* Timing */
  --t-fast:   150ms;
  --t-mid:    250ms;
  --t-slow:   400ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── Reset ────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100dvh;
  overflow-x: hidden;
  /* Subtle grain texture baked into bg for depth */
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(61,142,248,0.07) 0%, transparent 60%);
}

h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -0.015em; }
h1 { font-size: 1.1rem; }
h2 { font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
h3 { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--faint); }
p  { margin: 0; }

code, pre { font-family: var(--mono); }

/* ── Accessibility utilities ──────────────────────────────────── */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -56px; z-index: 9999;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 700; font-size: 0.85rem;
  padding: 10px 18px; border-radius: var(--r);
  text-decoration: none;
  transition: top var(--t-fast) var(--ease-out);
  box-shadow: 0 4px 24px rgba(61,142,248,0.5);
}
.skip-link:focus { top: 12px; }

:focus-visible {
  outline: 2.5px solid var(--focus);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

/* ── Header ───────────────────────────────────────────────────── */
.app-header {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 8px 20px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(14,20,32,0.95) 0%, transparent 100%);
  backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 20;
}

.brand {
  display: flex; align-items: center; gap: 10px;
  flex: 0 0 auto;
}
.brand-mark {
  color: var(--accent);
  font-size: 1.1rem;
  filter: drop-shadow(0 0 8px rgba(61,142,248,0.7));
}
h1 { color: var(--text); }

.agent-pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(34,212,113,0.6);
  animation: pulse-ring 1.8s ease-out infinite;
  display: inline-block;
}
.agent-pulse[hidden] { display: none; }

@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0   rgba(34,212,113,0.6); }
  60%  { box-shadow: 0 0 0 8px rgba(34,212,113,0.0); }
  100% { box-shadow: 0 0 0 0   rgba(34,212,113,0.0); }
}

.tagline {
  flex: 1 1 200px;
  color: var(--muted); font-size: 0.82rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  min-width: 0;
}

.controls {
  flex: 0 0 auto; margin-left: auto;
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap;
}

.mode-group {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--line); border-radius: var(--r);
  padding: 6px 12px; margin: 0;
  background: var(--panel-2);
}
.mode-group legend {
  padding: 0 4px;
  color: var(--faint); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em;
}
.mode-group label {
  display: inline-flex; align-items: center; gap: 6px;
  cursor: pointer; font-size: 0.82rem; color: var(--muted);
  transition: color var(--t-fast);
}
.mode-group label:has(input:checked) { color: var(--text); }

/* ── Buttons ──────────────────────────────────────────────────── */
.btn {
  font: inherit; font-weight: 600; font-size: 0.82rem;
  cursor: pointer; white-space: nowrap;
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  padding: 8px 16px;
  transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
  position: relative; overflow: hidden;
}
.btn::after {
  content: '';
  position: absolute; inset: 0;
  background: rgba(255,255,255,0);
  transition: background var(--t-fast);
}
.btn:hover::after { background: rgba(255,255,255,0.04); }
.btn:active { transform: scale(0.97); }
.btn[aria-disabled="true"] { opacity: 0.5; cursor: progress; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 12px rgba(61,142,248,0.35), inset 0 1px 0 rgba(255,255,255,0.15);
}
.btn-primary:hover { box-shadow: 0 4px 20px rgba(61,142,248,0.55); }

.btn-icon { margin-right: 4px; }

.live-notice {
  color: var(--heal);
  font-size: 0.8rem; font-weight: 600;
  animation: fade-in 0.3s ease;
}

/* ── Layout ───────────────────────────────────────────────────── */
main {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr auto;
  grid-template-areas: "target brain vision" "timeline timeline timeline";
  gap: 16px;
  padding: 16px 24px 28px;
  min-height: calc(100dvh - 57px);
}

.pane-target   { grid-area: target; }
.pane-brain    { grid-area: brain; }
.pane-vision   { grid-area: vision; }
.pane-timeline { grid-area: timeline; }

@media (max-width: 1100px) {
  main {
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "target brain" "vision vision" "timeline timeline";
  }
}
@media (max-width: 680px) {
  main {
    grid-template-columns: 1fr;
    grid-template-areas: "target" "brain" "vision" "timeline";
  }
}

.pane {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 18px;
  display: flex; flex-direction: column; gap: 14px;
  min-width: 0;
  position: relative;
}

.pane-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.muted { color: var(--muted); font-size: 0.82rem; }

/* ── Target pane ──────────────────────────────────────────────── */
.target-stage {
  position: relative; flex: 1;
  min-height: 220px;
  background: #04060c;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.target-stage iframe,
.target-shot {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0; object-fit: cover;
}
.target-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(7,10,16,0.6);
  color: var(--muted); font-size: 0.82rem; font-family: var(--mono);
  letter-spacing: 0.05em;
}

/* ── Agent Brain pane ─────────────────────────────────────────── */
.tier-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 10px;
  flex: 1;
}

.tier {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  grid-template-rows: auto auto;
  grid-template-areas:
    "rank name state"
    "rank query query"
    "rank reason reason";
  align-items: center;
  gap: 2px 10px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--line);
  border-radius: var(--r);
  padding: 12px 14px;
  transition:
    border-left-color var(--t-mid) var(--ease-out),
    background var(--t-mid) var(--ease-out),
    box-shadow var(--t-mid) var(--ease-out);
  position: relative; overflow: hidden;
}

/* Shimmer sweep on active (CSS-only, aria-hidden decoration) */
.tier::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(61,142,248,0.07) 40%,
    rgba(61,142,248,0.12) 50%,
    rgba(61,142,248,0.07) 60%,
    transparent 100%);
  transform: translateX(-100%);
  transition: none;
}

.tier-rank {
  grid-area: rank;
  font-family: var(--mono); font-size: 0.72rem; font-weight: 500;
  color: var(--faint);
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.tier-name {
  grid-area: name;
  font-size: 0.82rem; font-weight: 600;
  display: flex; align-items: center; gap: 6px;
}

.tier-state {
  grid-area: state;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.75rem; font-weight: 600; font-family: var(--mono);
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all var(--t-fast);
}

.tier-query {
  grid-area: query;
  font-size: 0.72rem; font-family: var(--mono);
  color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: color var(--t-fast);
}

.tier-reason {
  grid-area: reason;
  font-size: 0.72rem; font-family: var(--mono);
  color: var(--fail); margin-top: 2px;
}

.tier-mark {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  border: 1.5px solid currentColor;
  transition: all var(--t-fast);
}

/* ── Tier states ── shape + color + word, NEVER color alone ───── */
.tier-state[data-state="idle"] {
  color: var(--faint); border-color: var(--line);
}
.tier-state[data-state="idle"] .tier-mark { background: transparent; }

.tier-state[data-state="active"] {
  color: var(--accent); border-color: rgba(61,142,248,0.35);
  background: rgba(61,142,248,0.08);
}
.tier-state[data-state="active"] .tier-mark {
  background: var(--accent);
  animation: blink 0.8s ease-in-out infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.2; }
}

.tier-state[data-state="ok"] {
  color: var(--ok); border-color: rgba(34,212,113,0.35);
  background: rgba(34,212,113,0.08);
}
.tier-state[data-state="ok"] .tier-mark { background: var(--ok); border-color: var(--ok); }

.tier-state[data-state="fail"] {
  color: var(--fail); border-color: rgba(255,59,92,0.35);
  background: rgba(255,59,92,0.07);
}
.tier-state[data-state="fail"] .tier-mark { background: transparent; }

.tier-state[data-state="vision-active"] {
  color: var(--vision); border-color: rgba(168,85,247,0.4);
  background: rgba(168,85,247,0.1);
}
.tier-state[data-state="vision-active"] .tier-mark {
  background: var(--vision);
  animation: vision-throb 1s ease-in-out infinite;
}
@keyframes vision-throb {
  0%, 100% { box-shadow: 0 0 0 0 rgba(168,85,247,0.6); transform: scale(1); }
  50%       { box-shadow: 0 0 0 6px rgba(168,85,247,0); transform: scale(1.2); }
}

/* Active tier shimmer */
.tier[data-scanning="true"]::before {
  animation: shimmer 1.4s ease-in-out infinite;
}
@keyframes shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}

/* Resolved borders */
.tier[data-resolved="true"] {
  border-left-color: var(--ok);
  background: rgba(34,212,113,0.04);
}
.tier[data-resolved="true"][data-via="vision"] {
  border-left-color: var(--vision);
  background: rgba(168,85,247,0.05);
  box-shadow: 0 0 24px rgba(168,85,247,0.1);
}

/* Vision AI tag */
.vision-ai-tag {
  font-size: 0.58rem; font-weight: 700; letter-spacing: 0.06em;
  padding: 1px 5px; border-radius: 3px;
  background: rgba(168,85,247,0.2); color: var(--vision);
  border: 1px solid rgba(168,85,247,0.35);
  vertical-align: middle;
}

/* HEALED badge — center of brain pane */
.heal-badge {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 24px;
  border-radius: var(--r-lg);
  background: rgba(245,166,35,0.1);
  border: 1px solid rgba(245,166,35,0.4);
  color: var(--heal);
  font-size: 1.1rem; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 0 40px rgba(245,166,35,0.15);
  animation: badge-stamp var(--t-slow) var(--ease-spring) forwards;
}
.heal-badge[hidden] { display: none; }

@keyframes badge-stamp {
  from { transform: scale(0.4) rotate(-4deg); opacity: 0; }
  to   { transform: scale(1)   rotate(0deg);  opacity: 1; }
}

/* ── Vision analysis pane ─────────────────────────────────────── */
.shot-figure { margin: 0; flex: 1; display: flex; flex-direction: column; gap: 10px; }

.shot-wrap {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: #04060c;
  flex: 1;
  min-height: 160px;
}
.shot-wrap img { display: block; width: 100%; height: 100%; object-fit: cover; }

.vision-overlay {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none;
}

/* Scan line — purple sweep when vision is analyzing */
.scan-overlay {
  position: absolute; inset: 0; pointer-events: none;
  overflow: hidden;
}
.scan-overlay::after {
  content: '';
  position: absolute; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg,
    transparent 0%, rgba(168,85,247,0.5) 40%,
    var(--vision) 50%,
    rgba(168,85,247,0.5) 60%, transparent 100%);
  animation: scan-sweep 1.6s linear infinite;
  box-shadow: 0 0 12px 2px rgba(168,85,247,0.4);
}
@keyframes scan-sweep {
  0%   { top: 0%; }
  100% { top: 100%; }
}

.analyzing-label {
  position: absolute;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  color: var(--vision); font-family: var(--mono); font-size: 0.75rem; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  background: rgba(7,10,16,0.75); border-radius: var(--r-sm);
  padding: 6px 12px;
  border: 1px solid rgba(168,85,247,0.3);
  animation: label-pulse 1.2s ease-in-out infinite;
}
.analyzing-label[hidden] { display: none; }
@keyframes label-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

/* BBox draw animation (set via class on the SVG elements) */
.ov-box {
  fill: none;
  stroke: var(--heal); stroke-width: 1.6;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: draw-box 0.7s var(--ease-out) 0.1s forwards;
}
.ov-box-halo {
  fill: none; stroke: #000; stroke-width: 5;
  vector-effect: non-scaling-stroke;
  opacity: 0.7;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: draw-box 0.7s var(--ease-out) 0.1s forwards;
}
@keyframes draw-box { to { stroke-dashoffset: 0; } }

/* Crosshair — fades + scales in after bbox completes */
.ov-cross {
  stroke: var(--heal); stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
  animation: crosshair-pop 0.35s var(--ease-spring) 0.8s both;
}
.ov-cross-halo {
  stroke: #000; stroke-width: 5;
  vector-effect: non-scaling-stroke; opacity: 0.7;
  animation: crosshair-pop 0.35s var(--ease-spring) 0.8s both;
}
@keyframes crosshair-pop {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Confidence ripple circle — pulses once after crosshair lands */
.ov-ripple {
  fill: none;
  stroke: var(--heal); stroke-width: 1;
  vector-effect: non-scaling-stroke;
  opacity: 0;
  animation: ripple-out 0.8s ease-out 1.2s forwards;
}
@keyframes ripple-out {
  from { r: 3; opacity: 0.8; }
  to   { r: 12; opacity: 0; }
}

.shot-figure figcaption {
  font-size: 0.75rem; color: var(--muted); line-height: 1.4;
}

/* Confidence block */
.conf-block { display: flex; flex-direction: column; gap: 6px; }

/* Custom-style the native <meter> — cross-browser best-effort */
meter {
  width: 100%; height: 10px;
  border: none; border-radius: 999px;
  background: var(--panel-3);
  overflow: hidden;
}
meter::-webkit-meter-bar {
  background: var(--panel-3);
  border-radius: 999px; border: none;
}
meter::-webkit-meter-optimum-value,
meter::-webkit-meter-suboptimum-value { border-radius: 999px; }
meter::-webkit-meter-optimum-value    { background: var(--ok); }
meter::-webkit-meter-suboptimum-value { background: var(--heal); }
meter::-moz-meter-bar { border-radius: 999px; }

.conf-text {
  font-family: var(--mono); font-size: 0.8rem; font-weight: 500;
  display: flex; align-items: center; gap: 8px;
}
.conf-text[data-pass="true"]  { color: var(--ok); }
.conf-text[data-pass="false"] { color: var(--fail); }

/* Number counter */
.conf-number { font-size: 1.2rem; font-weight: 700; tabular-nums; }

.conf-threshold-note {
  font-size: 0.72rem; color: var(--muted);
}

/* Raw response */
details#raw-details { margin-top: 2px; }
details summary {
  cursor: pointer; font-size: 0.78rem; font-weight: 600;
  color: var(--muted); padding: 6px 0;
  user-select: none;
  transition: color var(--t-fast);
}
details summary:hover { color: var(--text); }

.raw-response {
  white-space: pre-wrap;
  font-family: var(--mono); font-size: 0.72rem;
  background: var(--panel-3);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 12px;
  margin: 6px 0 0;
  color: var(--muted);
  max-height: 180px; overflow-y: auto;
  line-height: 1.6;
  /* Scrollbar */
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}

/* ── Timeline ─────────────────────────────────────────────────── */
.pane-timeline { padding: 16px 18px; }

.timeline-table {
  width: 100%; border-collapse: collapse;
  font-size: 0.82rem;
}
.timeline-table th {
  text-align: left; padding: 8px 12px;
  color: var(--faint); font-size: 0.68rem;
  text-transform: uppercase; letter-spacing: 0.07em;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
}
.timeline-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
  vertical-align: middle;
}
.timeline-table tr:last-child td { border-bottom: none; }
.timeline-table tbody tr {
  transition: background var(--t-fast);
  animation: row-enter 0.35s var(--ease-out) both;
}
.timeline-table tbody tr:hover { background: var(--panel-2); }

@keyframes row-enter {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Duration column — monospaced */
.timeline-table td:nth-child(4) { font-family: var(--mono); }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.7rem; font-weight: 700;
  padding: 3px 10px; border-radius: 999px;
  letter-spacing: 0.04em; border: 1px solid transparent;
  animation: badge-stamp 0.4s var(--ease-spring) both;
}
.badge-direct {
  color: var(--ok); background: rgba(34,212,113,0.1);
  border-color: rgba(34,212,113,0.25);
}
.badge-healed {
  color: var(--heal); background: rgba(245,166,35,0.1);
  border-color: rgba(245,166,35,0.3);
}
.row-resolve-btn { font-size: 0.75rem; padding: 5px 12px; }

/* ── Handover dialog ──────────────────────────────────────────── */
dialog {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line-2);
  border-radius: var(--r-xl);
  padding: 24px;
  max-width: 540px; width: calc(100% - 32px);
  box-shadow: 0 24px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.04);
  animation: dialog-in 0.3s var(--ease-spring);
}
@keyframes dialog-in {
  from { transform: scale(0.94) translateY(8px); opacity: 0; }
  to   { transform: scale(1)    translateY(0);   opacity: 1; }
}
dialog::backdrop {
  background: rgba(2, 5, 10, 0.72);
  backdrop-filter: blur(4px);
}
dialog h2 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
dialog p  { color: var(--muted); font-size: 0.85rem; margin-bottom: 16px; }

.diff-table {
  width: 100%; border-collapse: collapse; font-size: 0.82rem;
  margin-bottom: 4px;
}
.diff-table th {
  text-align: left; padding: 8px 10px;
  color: var(--faint); font-size: 0.68rem;
  text-transform: uppercase; letter-spacing: 0.06em;
  border-bottom: 1px solid var(--line);
}
.diff-table td {
  padding: 9px 10px; border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 0.78rem;
}
.diff-table td.diff-changed {
  color: var(--heal); font-weight: 600;
  background: rgba(245,166,35,0.05);
}
.dialog-actions {
  display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px;
}

/* ── Misc utilities ───────────────────────────────────────────── */
@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── prefers-reduced-motion ───────────────────────────────────── */
/* All motion removed; final states remain visible.               */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  /* Ensure bbox/crosshair show immediately at final state */
  .ov-box, .ov-box-halo { stroke-dashoffset: 0 !important; }
  .ov-cross, .ov-cross-halo { opacity: 1 !important; }
  .ov-ripple { display: none; }
  .scan-overlay { display: none; }
  .agent-pulse { animation: none; }
}
