/* Marktguru Data Quality Investigation — Light Premium Business Theme
   Inspired by Notion/Linear/Stripe dashboard aesthetics.
   Clean, authoritative, professional. Real data, light canvas. */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Light premium palette */
  --bg:       #f7f8fb;
  --surface:  #ffffff;
  --surface2: #f0f2f7;
  --surface3: #e8ebf2;
  --border:   #e2e5ef;
  --border-h: #cdd2e0;

  /* Text hierarchy */
  --text:     #1a1f36;
  --text-2:   #4a5078;
  --muted:    #8891b0;

  /* Accents — deep indigo with warm touches */
  --accent:   #4f46e5;
  --accent-h: #6366f1;
  --accent-g: linear-gradient(135deg, #4f46e5, #7c3aed);
  --green:    #059669;
  --green-bg: rgba(5,150,105,.06);
  --orange:   #d97706;
  --orange-bg:rgba(217,119,6,.06);
  --red:      #dc2626;
  --red-bg:   rgba(220,38,38,.06);
  --cyan:     #0891b2;

  /* Layout */
  --sidebar-w: 252px;
  --radius:    8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.04), 0 1px 2px rgba(0,0,0,.02);
  --shadow-md: 0 4px 12px rgba(0,0,0,.06), 0 1px 4px rgba(0,0,0,.04);

  /* Fonts */
  --font:      'DM Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
}

html {
  scroll-behavior: smooth;
  font-size: 14.5px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-h) transparent;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-h); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

code {
  font-family: var(--font-mono);
  font-size: .85em;
  background: var(--surface2);
  padding: 2px 7px;
  border-radius: 4px;
  color: var(--accent);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SIDEBAR
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.sidebar {
  position: fixed; top: 0; left: 0;
  width: var(--sidebar-w); height: 100vh;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 0;
  overflow-y: auto;
  z-index: 100;
  display: flex;
  flex-direction: column;
  box-shadow: 1px 0 8px rgba(0,0,0,.03);
}

.sidebar h2 {
  font-family: var(--font-mono);
  font-size: .95rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: .04em;
  padding: 24px 20px 4px;
}

.sidebar .logo {
  font-size: .68rem;
  color: var(--muted);
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 0 20px 20px;
  border-bottom: 1px solid var(--border);
}

.sidebar nav {
  padding: 12px 8px;
  flex: 1;
}

.sidebar nav a {
  display: flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 6px;
  color: var(--muted);
  text-decoration: none;
  font-size: .8rem;
  font-weight: 400;
  transition: all .15s ease;
  border-left: 2px solid transparent;
  margin: 1px 0;
}

.sidebar nav a:hover {
  color: var(--text-2);
  background: var(--surface2);
}

.sidebar nav a.active {
  color: var(--accent);
  background: rgba(79,70,229,.06);
  border-left-color: var(--accent);
  font-weight: 500;
}

.sidebar nav .section-group { margin-bottom: 8px; }

.sidebar nav .section-group-title {
  font-family: var(--font-mono);
  font-size: .6rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--muted);
  padding: 12px 14px 4px;
  opacity: .7;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   MAIN CONTENT
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.main {
  margin-left: var(--sidebar-w);
  padding: 40px 56px 100px;
  max-width: 1240px;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SECTIONS
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

section {
  margin-bottom: 72px;
  padding-top: 20px;
  animation: fadeUp .5s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

section h2 {
  font-size: 1.65rem;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -.01em;
  color: var(--text);
}

section h3 {
  font-family: var(--font-mono);
  font-size: .82rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin: 40px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

section h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-2);
  margin: 28px 0 12px;
}

.section-desc {
  color: var(--text-2);
  margin-bottom: 24px;
  font-size: .92rem;
  max-width: 680px;
  line-height: 1.7;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   METRIC CARDS
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 36px;
}

.metric-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 24px 20px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
}

.metric-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent-g);
}

.metric-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.metric-card .value {
  font-family: var(--font-mono);
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.02em;
  line-height: 1.1;
}

.metric-row {
  margin-bottom: 24px;
}
.metric-row .metrics {
  margin-bottom: 0;
}
.metric-row-title {
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 10px;
  padding-left: 2px;
}

.metric-card .label {
  font-size: .72rem;
  color: var(--muted);
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   TABLES
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.table-controls {
  padding: 10px 16px;
  display: flex;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
}

.table-controls input,
.table-controls select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  padding: 7px 12px;
  font-size: .8rem;
  font-family: var(--font);
  transition: border-color .15s;
}

.table-controls input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(79,70,229,.1);
}

.table-controls input { flex: 1; max-width: 320px; }

.table-controls .count {
  font-family: var(--font-mono);
  color: var(--muted);
  font-size: .72rem;
  margin-left: auto;
  letter-spacing: .02em;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: .78rem;
}

thead th {
  background: var(--surface2);
  padding: 9px 12px;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: .68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  white-space: nowrap;
  user-select: none;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 2;
  transition: color .15s;
}

thead th:hover { color: var(--text-2); }
thead th.sorted-asc::after  { content: ' \25B2'; font-size: .55em; color: var(--accent); }
thead th.sorted-desc::after { content: ' \25BC'; font-size: .55em; color: var(--accent); }

tbody tr {
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background .1s;
}

tbody tr:hover { background: rgba(79,70,229,.03); }

tbody tr.selected {
  background: rgba(79,70,229,.07);
  box-shadow: inset 3px 0 0 var(--accent);
}

tbody td {
  padding: 7px 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
  font-family: var(--font-mono);
  font-size: .75rem;
  color: var(--text-2);
}

.table-scroll {
  max-height: 440px;
  overflow-y: auto;
}

/* Price color coding */
.price-green  { color: var(--green); font-weight: 600; }
.price-orange { color: var(--orange); font-weight: 600; }
.price-red    { color: var(--red); font-weight: 600; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   PROCESSING PANEL
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.process-panel {
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin: 24px 0;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(79,70,229,.08);
}

.process-panel::before {
  content: '';
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(135deg, rgba(79,70,229,.03) 0%, transparent 40%);
  pointer-events: none;
}

.process-panel h4 {
  font-family: var(--font-mono);
  font-size: .82rem;
  color: var(--accent);
  margin-bottom: 20px;
  position: relative;
}

.step-item {
  background: var(--surface2);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 8px;
  border-left: 3px solid var(--border);
  position: relative;
  transition: border-color .2s, background .2s;
}

.step-item.active {
  border-left-color: var(--accent);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.step-item .step-num {
  font-family: var(--font-mono);
  font-size: .6rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .1em;
}

.step-item .step-title {
  font-weight: 600;
  font-size: .88rem;
  margin: 3px 0;
  color: var(--text);
}

.step-item .step-detail {
  font-size: .8rem;
  color: var(--muted);
  font-family: var(--font-mono);
}

.step-item .step-result {
  font-family: var(--font-mono);
  font-size: .82rem;
  color: var(--green);
  margin-top: 8px;
  font-weight: 600;
}

.step-item .step-matches { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 4px; }

.match-tag {
  display: inline-block;
  background: rgba(79,70,229,.08);
  color: var(--accent);
  padding: 3px 10px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 500;
  border: 1px solid rgba(79,70,229,.15);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   DETECTIVE INPUT
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* Preset chips */
.preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.preset-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 14px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--text-2);
  transition: all .15s;
  line-height: 1.4;
}

.preset-chip:hover {
  border-color: var(--accent);
  background: rgba(79,70,229,.04);
  color: var(--text);
}

.preset-chip.active {
  border-color: var(--accent);
  background: rgba(79,70,229,.08);
  color: var(--accent);
  box-shadow: 0 0 0 2px rgba(79,70,229,.1);
}

.preset-chip .chip-price {
  color: var(--muted);
  font-weight: 500;
}

.preset-chip .chip-label {
  font-family: var(--font);
  font-size: .65rem;
  color: var(--accent);
  background: rgba(79,70,229,.1);
  padding: 1px 6px;
  border-radius: 3px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.detective-input {
  display: flex;
  gap: 10px;
  margin: 20px 0;
}

.detective-input input {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 11px 16px;
  font-size: .88rem;
  font-family: var(--font-mono);
  flex: 1;
  transition: border-color .15s, box-shadow .15s;
}

.detective-input input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79,70,229,.08);
}

.detective-input button {
  background: var(--accent-g);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 11px 28px;
  font-family: var(--font-mono);
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: opacity .15s, transform .1s;
  box-shadow: 0 2px 8px rgba(79,70,229,.25);
}

.detective-input button:hover { opacity: .9; transform: translateY(-1px); }
.detective-input button:active { transform: translateY(0); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   CHARTS
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.chart-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin: 16px 0;
  box-shadow: var(--shadow-sm);
}

.chart-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.chart-row .chart-container { margin: 0; }
canvas { max-height: 320px; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   IMAGES
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.image-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 20px 0;
}

.image-compare .img-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s;
}

.image-compare .img-card:hover { box-shadow: var(--shadow-md); }

.image-compare .img-card img {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  background: #fafbfc;
  display: block;
}

.image-compare .img-card .img-label {
  padding: 14px 18px;
  font-size: .8rem;
  color: var(--text-2);
  border-top: 1px solid var(--border);
  line-height: 1.5;
}

.image-compare .img-card .img-label strong {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: .75rem;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SLIDER
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.slider-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 20px 0;
  padding: 14px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  font-size: .82rem;
  color: var(--text-2);
  box-shadow: var(--shadow-sm);
}

.slider-row input[type=range] { flex: 1; accent-color: var(--accent); height: 4px; }

.slider-row .slider-val {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  min-width: 72px;
  text-align: right;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   DECISION MATRIX
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.matrix-table { margin: 16px 0; width: 100%; }
.matrix-table td,
.matrix-table th { padding: 12px 18px; text-align: center; font-size: .82rem; }
.matrix-table th {
  font-family: var(--font-mono);
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}
.matrix-table td { font-family: var(--font-mono); color: var(--text-2); }
.matrix-table td:last-child { text-align: left; font-family: var(--font); }
.matrix-table .yes { color: var(--green); font-size: 1.1em; font-weight: 700; }
.matrix-table .no  { color: var(--red); font-size: 1.1em; font-weight: 700; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   PAGINATION
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.pagination {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 14px;
}

.pagination button {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-2);
  padding: 6px 14px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: .78rem;
  transition: all .15s;
}

.pagination button:disabled { opacity: .3; cursor: default; }
.pagination button:hover:not(:disabled) { background: var(--accent); color: #fff; border-color: var(--accent); }

.pagination .page-info {
  font-family: var(--font-mono);
  color: var(--muted);
  font-size: .75rem;
  padding: 0 8px;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   BAR CHART
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.bar-chart-inline {
  margin: 20px 0;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.bar-row {
  display: flex;
  align-items: center;
  margin: 5px 0;
  gap: 10px;
}

.bar-row .bar-label {
  width: 170px;
  font-family: var(--font-mono);
  font-size: .72rem;
  text-align: right;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}

.bar-row .bar {
  height: 20px;
  border-radius: 3px;
  background: var(--accent);
  transition: width .4s cubic-bezier(.23,1,.32,1);
  min-width: 2px;
}

.bar-row .bar-val {
  font-family: var(--font-mono);
  font-size: .75rem;
  color: var(--text);
  min-width: 72px;
  font-weight: 500;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   INSIGHT BOX
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.insight {
  background: rgba(79,70,229,.04);
  border: 1px solid rgba(79,70,229,.12);
  border-left: 3px solid var(--accent);
  border-radius: 2px var(--radius) var(--radius) 2px;
  padding: 18px 22px;
  margin: 20px 0;
  font-size: .9rem;
  line-height: 1.7;
  color: var(--text-2);
}

.insight strong { color: var(--text); }

/* Challenge statement boxes */
.challenge-statement {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--red);
  border-radius: 2px var(--radius-lg) var(--radius-lg) 2px;
  padding: 20px 24px;
  margin: 12px 0 32px;
  box-shadow: var(--shadow-sm);
}

.challenge-quote {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--red);
  line-height: 1.5;
  margin-bottom: 10px;
  font-style: italic;
}

.challenge-real {
  font-size: .88rem;
  color: var(--text-2);
  line-height: 1.65;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   LOADING
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.loading {
  text-align: center;
  padding: 48px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: .82rem;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   TRANSPARENT STEP TABLES
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.step-subtable {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0 4px;
  font-size: .72rem;
}

.step-subtable th {
  background: var(--surface2);
  padding: 5px 10px;
  text-align: left;
  font-family: var(--font-mono);
  font-size: .62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}

.step-subtable td {
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: .7rem;
  color: var(--text-2);
  border-bottom: 1px solid rgba(0,0,0,.03);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}

.step-row-hit {
  background: var(--green-bg) !important;
}

.step-row-hit td { color: var(--text) !important; }

.step-caption {
  font-family: var(--font-mono);
  font-size: .62rem;
  color: var(--muted);
  margin-top: 8px;
  letter-spacing: .02em;
}

.step-explanation {
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(79,70,229,.04);
  border-left: 2px solid var(--accent);
  border-radius: 2px 4px 4px 2px;
  font-size: .78rem;
  color: var(--text-2);
  line-height: 1.5;
}

.step-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 8px;
  font-family: var(--font-mono);
  font-size: .68rem;
}

.stat-pill .stat-label {
  color: var(--muted);
  margin-right: 6px;
  text-transform: uppercase;
  font-size: .58rem;
  letter-spacing: .04em;
}

.stat-pill .stat-value {
  color: var(--text);
  font-weight: 600;
}

.color-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 16px;
  font-size: .78rem;
  color: var(--text-2);
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-left: 8px;
}

.match-hit {
  background: rgba(5,150,105,.1) !important;
  border-color: rgba(5,150,105,.3) !important;
  color: var(--green) !important;
}

.match-miss {
  background: var(--surface2) !important;
  border-color: var(--border) !important;
  color: var(--muted) !important;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   METHOD LEGEND
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.method-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0 24px;
}

.legend-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.legend-badge {
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 700;
  min-width: 110px;
  flex-shrink: 0;
}

.legend-text {
  font-size: .82rem;
  color: var(--text-2);
  line-height: 1.5;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   VISION TEST
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.prompt-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 16px 0;
}

.prompt-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.prompt-label {
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 10px 16px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}

.prompt-theirs .prompt-label { color: var(--red); }
.prompt-ours .prompt-label   { color: var(--green); }

.vision-pre {
  font-family: var(--font-mono);
  font-size: .72rem;
  line-height: 1.6;
  padding: 16px;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text-2);
  max-height: 320px;
  overflow-y: auto;
  background: transparent;
}

.vision-controls {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}

.vision-control-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.vision-control-row label:first-child {
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  min-width: 64px;
}

.vision-control-row select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: .78rem;
  flex: 1;
  max-width: 420px;
}

.vision-control-row select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(79,70,229,.1);
}

.vision-radio-group {
  display: flex;
  gap: 16px;
}

.vision-radio-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font);
  font-size: .82rem;
  color: var(--text-2);
  cursor: pointer;
  min-width: auto !important;
}

.vision-radio-group input[type="radio"] {
  accent-color: var(--accent);
}

.vision-controls button {
  background: var(--accent-g);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 11px 28px;
  font-family: var(--font-mono);
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: opacity .15s, transform .1s;
  box-shadow: 0 2px 8px rgba(79,70,229,.25);
  align-self: flex-start;
  margin-top: 4px;
}

.vision-controls button:hover { opacity: .9; transform: translateY(-1px); }
.vision-controls button:active { transform: translateY(0); }
.vision-controls button:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.vision-response {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 12px 0;
  box-shadow: var(--shadow-sm);
}

.vision-response .step-num {
  background: var(--surface2);
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   RESPONSIVE
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   VISION COMPARISON (side-by-side)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.vision-comparison { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 0; }
.vision-panel { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.vision-panel-theirs { border: 2px solid var(--red); }
.vision-panel-ours { border: 2px solid var(--green); }
.vision-panel-header { padding: 12px 16px; font-weight: 700; text-transform: uppercase; font-size: .72rem; letter-spacing: .08em; }
.vision-panel-theirs .vision-panel-header { background: rgba(220,38,38,.08); color: var(--red); }
.vision-panel-ours .vision-panel-header { background: rgba(5,150,105,.08); color: var(--green); }
.vision-panel-body { padding: 16px; }
.vision-panel-body pre { font-family: var(--font-mono); font-size: .72rem; line-height: 1.6; white-space: pre-wrap; word-break: break-word; color: var(--text-2); max-height: 320px; overflow-y: auto; margin: 0; }
.hallucination-badge { display: inline-flex; padding: 4px 12px; border-radius: 6px; font-size: .72rem; font-weight: 700; }
.hallucination-yes { background: rgba(220,38,38,.12); color: var(--red); }
.hallucination-no { background: rgba(5,150,105,.12); color: var(--green); }
.verdict-box { border: 2px solid var(--accent); border-radius: var(--radius-lg); padding: 20px; margin: 16px 0; background: rgba(79,70,229,.03); }
.verdict-box strong { color: var(--text); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   AWS DETECTION / BRIEFING
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.correction-arrow { color: var(--green); font-weight: 700; margin: 0 8px; }
.spread-reduced { text-decoration: line-through; color: var(--muted); }
.briefing-quote { border-left: 4px solid var(--orange); padding: 12px 16px; margin: 12px 0; background: rgba(217,119,6,.05); font-style: italic; color: var(--text-2); font-size: .88rem; line-height: 1.65; }
.sql-block { background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; padding: 12px 16px; font-family: var(--font-mono); font-size: .78rem; margin: 12px 0; color: var(--text-2); line-height: 1.6; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   CHALLENGE 3: SOLUTION APPROACH CARDS
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.c3-approach-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 20px 0;
}

.c3-approach-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
}

.c3-approach-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.c3-approach-num {
  position: absolute;
  top: 14px;
  right: 16px;
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 800;
  color: var(--border);
  line-height: 1;
}

.c3-approach-title {
  font-family: var(--font-mono);
  font-size: .82rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.c3-approach-desc {
  font-size: .84rem;
  color: var(--text-2);
  line-height: 1.6;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   CHALLENGE 3: KEY DIFFERENCES LIST
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.c3-key-diffs {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 16px 0 24px;
}

.c3-diff-item {
  padding: 10px 16px;
  border-radius: var(--radius);
  font-size: .84rem;
  line-height: 1.5;
  border-left: 3px solid;
  font-family: var(--font);
}

.c3-diff-bad {
  background: var(--red-bg);
  border-left-color: var(--red);
  color: var(--text-2);
}

.c3-diff-good {
  background: var(--green-bg);
  border-left-color: var(--green);
  color: var(--text-2);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   CHALLENGE 3: PIPELINE VISUALIZATION
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.pipeline-vis {
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin: 24px 0;
  padding: 24px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}

.pipeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 100px;
  flex: 1;
}

.pipeline-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-g);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: .82rem;
  margin-bottom: 8px;
  box-shadow: 0 2px 8px rgba(79,70,229,.3);
}

.pipeline-label {
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 600;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 4px;
}

.pipeline-detail {
  font-size: .7rem;
  color: var(--muted);
  line-height: 1.4;
}

.pipeline-arrow {
  color: var(--border-h);
  font-size: 1.4rem;
  padding: 8px 4px 0;
  flex-shrink: 0;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   CHALLENGE 3: ASSEMBLED PROMPT
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.market-context-controls {
  display: flex;
  gap: 16px;
  align-items: center;
  margin: 16px 0;
  padding: 14px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.assembled-prompt-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 16px 0;
  box-shadow: var(--shadow-sm);
}

.assembled-prompt-label {
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 600;
  padding: 10px 16px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.assembled-prompt-label .hl-base {
  color: var(--muted);
  background: var(--surface2);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: .65rem;
}

.assembled-prompt-label .hl-market {
  color: var(--accent);
  background: rgba(79,70,229,.1);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: .65rem;
}

.assembled-context-box {
  background: rgba(79,70,229,.04);
  border: 2px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 0;
  margin-bottom: 12px;
  box-shadow: 0 0 12px rgba(79,70,229,.08);
  transition: box-shadow .3s ease;
}
.assembled-context-box.flash {
  box-shadow: 0 0 24px rgba(79,70,229,.3);
}
.assembled-context-pre {
  max-height: 220px;
  color: var(--accent);
  font-size: .82rem;
  line-height: 1.6;
  background: rgba(79,70,229,.03);
  border: none;
  margin: 0;
}
.assembled-prompt-details {
  margin-top: 4px;
}
.assembled-prompt-toggle {
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  cursor: pointer;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  list-style: none;
  user-select: none;
  transition: color .2s, border-color .2s;
}
.assembled-prompt-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.assembled-prompt-toggle::-webkit-details-marker { display: none; }
.assembled-prompt-toggle::before {
  content: '\25B6';
  display: inline-block;
  margin-right: 6px;
  font-size: .6rem;
  transition: transform .2s;
}
details[open] > .assembled-prompt-toggle::before {
  transform: rotate(90deg);
}
.assembled-prompt-pre {
  max-height: 400px;
}

.assembled-prompt-pre .ctx-highlight {
  background: rgba(79,70,229,.08);
  border-left: 2px solid var(--accent);
  display: inline;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   CHALLENGE 3: 3-COLUMN COMPARISON
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.vision-3col {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin: 20px 0;
}

.vision-3col-panel {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.vision-3col-panel.col-theirs { border: 2px solid var(--red); }
.vision-3col-panel.col-ours   { border: 2px solid var(--green); }
.vision-3col-panel.col-truth  { border: 2px solid var(--accent); }

.vision-3col-header {
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.col-theirs .vision-3col-header { background: rgba(220,38,38,.06); color: var(--red); }
.col-ours .vision-3col-header   { background: rgba(5,150,105,.06); color: var(--green); }
.col-truth .vision-3col-header  { background: rgba(79,70,229,.06); color: var(--accent); }

.vision-field-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 14px;
  font-size: .78rem;
  border-bottom: 1px solid var(--border);
  gap: 8px;
}

.vision-field-row:last-child { border-bottom: none; }

.vision-field-key {
  font-family: var(--font-mono);
  font-size: .68rem;
  color: var(--muted);
  flex-shrink: 0;
  min-width: 90px;
}

.vision-field-val {
  font-family: var(--font-mono);
  font-size: .75rem;
  text-align: right;
  word-break: break-word;
}

.field-pass { color: var(--green); font-weight: 600; }
.field-fail { color: var(--red); font-weight: 600; }
.field-partial { color: var(--orange); font-weight: 600; }
.field-neutral { color: var(--text-2); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   CHALLENGE 3: VERDICT & POST-PROCESS PANELS
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.verdict-side-by-side {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0;
}

.verdict-card {
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}

.verdict-card.verdict-pass { background: var(--green-bg); border: 1px solid rgba(5,150,105,.2); }
.verdict-card.verdict-fail { background: var(--red-bg); border: 1px solid rgba(220,38,38,.2); }
.verdict-card.verdict-partial { background: var(--orange-bg); border: 1px solid rgba(217,119,6,.2); }
.verdict-card.verdict-error { background: var(--surface2); border: 1px solid var(--border); }

.verdict-label {
  font-family: var(--font-mono);
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 8px;
}

.verdict-pass .verdict-label { color: var(--green); }
.verdict-fail .verdict-label { color: var(--red); }
.verdict-partial .verdict-label { color: var(--orange); }

.verdict-score {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
}

.verdict-pass .verdict-score { color: var(--green); }
.verdict-fail .verdict-score { color: var(--red); }
.verdict-partial .verdict-score { color: var(--orange); }

.quality-bar {
  height: 6px;
  background: var(--surface3);
  border-radius: 3px;
  overflow: hidden;
  margin: 8px 0;
}

.quality-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width .5s ease;
}

.verdict-reasons {
  font-size: .78rem;
  color: var(--text-2);
  margin-top: 8px;
  line-height: 1.5;
}

.post-process-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--cyan);
  border-radius: 2px var(--radius) var(--radius) 2px;
  padding: 14px 18px;
  margin: 16px 0;
  font-size: .84rem;
}

.post-process-panel .pp-title {
  font-family: var(--font-mono);
  font-size: .68rem;
  font-weight: 700;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 6px;
}

.post-process-change {
  padding: 4px 0;
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: .78rem;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   CHALLENGE 3: MODEL RANKING & RECOMMENDATIONS
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.recommendation-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.rec-recommended { background: rgba(5,150,105,.12); color: var(--green); }
.rec-acceptable  { background: rgba(217,119,6,.12); color: var(--orange); }
.rec-avoid       { background: rgba(220,38,38,.12); color: var(--red); }

.c3-learnings {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 16px 0;
}

.c3-learning-item {
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 2px var(--radius) var(--radius) 2px;
  font-size: .84rem;
  color: var(--text-2);
  line-height: 1.5;
  box-shadow: var(--shadow-sm);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   RESPONSIVE
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

@media (max-width: 960px) {
  .sidebar { display: none; }
  .main { margin-left: 0; padding: 20px 16px 60px; }
  .chart-row { grid-template-columns: 1fr; }
  .image-compare { grid-template-columns: 1fr; }
  .prompt-compare { grid-template-columns: 1fr; }
  .vision-comparison { grid-template-columns: 1fr; }
  .vision-3col { grid-template-columns: 1fr; }
  .verdict-side-by-side { grid-template-columns: 1fr; }
  .c3-approach-grid { grid-template-columns: 1fr; }
  .pipeline-vis { flex-direction: column; align-items: stretch; }
  .pipeline-arrow { text-align: center; transform: rotate(90deg); padding: 4px 0; }
  .market-context-controls { flex-direction: column; }
}
