:root {
  color-scheme: dark;
  --ink: #e8eef4;
  --muted: #8fa0b0;
  --subtle: #6a7f94;
  --canvas: #0b1520;
  --surface: #101c2a;
  --surface-raised: #122033;
  --surface-soft: #15263a;
  --line: #243548;
  --line-strong: #3d5166;
  --green: #2f5f8a;
  --green-bright: #4a7ba8;
  --green-dark: #1c3348;
  --amber: #8ab4d4;
  --amber-dark: #243548;
  --red: #9aa8b8;
  --red-dark: #2a3038;
  --blue: #8ab4d4;
  --violet: #2f5f8a;
  --sidebar: 224px;
  --radius: 14px;
  --display: "IBM Plex Sans", "Source Sans 3", ui-sans-serif, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-family: "Source Sans 3", "IBM Plex Sans", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}
h1, h2, h3 { font-family: var(--display); }

html[data-theme="light"] {
  color-scheme: light;
  --ink: #1a2a3a;
  --muted: #5a6f84;
  --subtle: #6a7f94;
  --canvas: #e8eef4;
  --surface: #f0f4f8;
  --surface-raised: #ffffff;
  --surface-soft: #dce5ee;
  --line: rgba(26, 42, 58, .16);
  --line-strong: rgba(26, 42, 58, .28);
  --green: #1e4566;
  --green-bright: #1e4566;
  --green-dark: #d5dee8;
  --amber: #3d5166;
  --amber-dark: #dce5ee;
  --red: #5c6b73;
  --red-dark: #d5dee8;
  --blue: #5a6f84;
  --violet: #1e4566;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--canvas); }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 72% -10%, rgba(106, 156, 196, 0.16), transparent 32rem),
    var(--canvas);
}

html[data-theme="light"] body {
  background:
    radial-gradient(circle at 72% -10%, rgba(30, 69, 102, 0.09), transparent 32rem),
    var(--canvas);
}

button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }

.app-shell { min-height: 100vh; }

.mock-only-banner {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid rgba(138, 180, 212, .45);
  border-radius: var(--radius);
  background: rgba(20, 36, 51, .88);
  color: var(--amber);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .18);
}

.mock-only-banner div { display: grid; gap: 4px; }
.mock-only-banner strong {
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.mock-only-banner span {
  color: #d5dee8;
  font-size: 13px;
  line-height: 1.45;
}

.mock-only-banner a {
  flex: 0 0 auto;
  color: var(--ink);
  background: var(--amber);
  border-radius: 2px;
  padding: 10px 13px;
  font-size: 12px;
  font-weight: 760;
  text-decoration: none;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar);
  display: flex;
  flex-direction: column;
  padding: 24px 14px 18px;
  border-right: 1px solid var(--line);
  background: rgba(7, 17, 15, 0.96);
  z-index: 30;
}
html[data-theme="light"] .sidebar { background: rgba(240,244,248,.96); }
html[data-theme="light"] .mock-only-banner { background: #dce5ee; }
html[data-theme="light"] .mock-only-banner a { color: #f0f4f8; background: #1a2a3a; }
html[data-theme="light"] .form-grid input,
html[data-theme="light"] .form-grid select,
html[data-theme="light"] .producer-evidence pre { background: #f5f8fb; }
html[data-theme="light"] .producer-receipt,
html[data-theme="light"] .proof-callout,
html[data-theme="light"] .what-proves,
html[data-theme="light"] .reconciliation-banner { background: #d5dee8; }
html[data-theme="light"] dialog { background: #f0f4f8; }

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 10px 38px;
  color: var(--ink);
  font-size: 19px;
  font-weight: 760;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.brand > span:last-child span { color: var(--green); }
.brand-mark { width: 28px; height: 28px; display: flex; align-items: flex-end; gap: 3px; }
.brand-mark i { width: 6px; border-radius: 2px; background: var(--green); transform: skewY(-24deg); }
.brand-mark i:nth-child(1) { height: 13px; opacity: .55; }
.brand-mark i:nth-child(2) { height: 20px; opacity: .8; }
.brand-mark i:nth-child(3) { height: 27px; }

.nav-list { display: grid; gap: 5px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 45px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: 140ms ease;
}
.nav-item:hover { color: var(--ink); background: rgba(255,255,255,.025); }
.nav-item.active { color: var(--green-bright); border-color: #3d5166; background: #15263a; }
.nav-item svg { width: 18px; fill: currentColor; }

.sidebar-footer { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid var(--line); }
.environment-chip {
  display: inline-flex;
  padding: 5px 7px;
  border: 1px solid #3d5166;
  border-radius: 4px;
  color: var(--amber);
  background: rgba(138,180,212,.08);
  font: 700 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .13em;
}
.synthetic-label { display: flex; align-items: center; gap: 7px; margin-top: 10px; color: var(--subtle); font-size: 11px; }
.synthetic-label i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }

.main-content { margin-left: var(--sidebar); min-height: 100vh; }
.topbar {
  height: 94px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 34px;
  border-bottom: 1px solid var(--line);
  background: rgba(7,17,15,.72);
  backdrop-filter: blur(18px);
}
.topbar h1 { margin: 4px 0 0; font-size: 23px; letter-spacing: -.035em; }
.eyebrow { margin: 0; color: var(--green); font: 700 9px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .15em; }
.topbar-status { display: flex; align-items: center; gap: 28px; }
.scenario-identity, .refresh-time, .overall-health > div { display: grid; gap: 5px; }
.scenario-identity span, .refresh-time span, .overall-health span { color: var(--subtle); font: 700 8px/1 var(--mono); letter-spacing: .12em; }
.scenario-identity strong, .refresh-time strong, .overall-health strong { color: var(--muted); font-size: 11px; font-weight: 650; }
.overall-health { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid #3d5166; border-radius: 8px; background: #122033; }
.overall-health > i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px rgba(94,224,160,.7); }
.overall-health.recovering { border-color: #3d5166; background: #15263a; }
.overall-health.recovering > i { background: var(--amber); box-shadow: 0 0 10px rgba(138,180,212,.55); animation: pulse 1s infinite; }
.mobile-menu { display: none; }

.pipeline-strip {
  min-height: 88px;
  display: grid;
  grid-template-columns: minmax(210px,1fr) 70px minmax(210px,1fr) 70px minmax(210px,1fr);
  align-items: center;
  gap: 7px;
  padding: 13px 34px;
  border-bottom: 1px solid var(--line);
  background: #0a1513;
}
.pipeline-node {
  min-width: 0;
  display: grid;
  grid-template-columns: 40px minmax(0,1fr) 10px;
  align-items: center;
  gap: 11px;
  padding: 7px;
  border: 0;
  border-radius: 9px;
  text-align: left;
  background: transparent;
  cursor: pointer;
}
.pipeline-node:hover { background: rgba(255,255,255,.025); }
.pipeline-node > span:nth-child(2) { min-width: 0; display: grid; gap: 2px; }
.pipeline-node small { color: var(--subtle); font: 700 8px/1 var(--mono); letter-spacing: .11em; }
.pipeline-node strong { font-size: 12px; }
.pipeline-node em { overflow: hidden; color: var(--muted); font-size: 10px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.tech-icon { width: 40px; height: 40px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid; border-radius: 9px; font: 800 13px var(--mono); }
.kafka-icon { color: var(--green); border-color: rgba(47,95,138,.35); background: rgba(47,95,138,.12); }
.flink-icon { color: var(--amber); border-color: rgba(138,180,212,.4); background: rgba(138,180,212,.14); }
.postgres-icon { color: var(--blue); border-color: rgba(138,148,144,.4); background: rgba(138,148,144,.14); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px rgba(94,224,160,.7); }
.status-dot.warning { background: var(--amber); box-shadow: 0 0 8px rgba(138,180,212,.55); }
.flow-connector { display: flex; align-items: center; }
.flow-connector span { height: 1px; flex: 1; background: var(--line-strong); }
.flow-connector i { width: 6px; height: 6px; margin-left: -6px; border-top: 1px solid var(--green); border-right: 1px solid var(--green); transform: rotate(45deg); }
.flow-connector.active span { background: linear-gradient(90deg, var(--line-strong), var(--green), var(--line-strong)); background-size: 200% 100%; animation: flow 2.2s linear infinite; }

.content-area { padding: 29px 34px 50px; max-width: 1600px; margin: 0 auto; }
.view { display: none; animation: appear 220ms ease; }
.view.active { display: block; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 23px; }
.section-heading h2 { margin: 6px 0 0; font-size: 25px; letter-spacing: -.04em; }
.section-copy { max-width: 630px; margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.primary-action, .secondary-action, .danger-action {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 15px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}
.primary-action { border: 1px solid var(--green); color: #0b1520; background: var(--green); }
.primary-action:hover { background: var(--green-bright); }
.secondary-action { border: 1px solid var(--line-strong); color: var(--ink); background: var(--surface-soft); }
.secondary-action:hover { border-color: var(--green); }
.danger-action { border: 1px solid var(--red); color: #0b1520; background: var(--red); }
button:disabled { opacity: .45; cursor: not-allowed; }

.kpi-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 18px; }
.kpi-card { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 11px; background: linear-gradient(145deg, var(--surface-raised), #0b1714); }
.kpi-card .kpi-label { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 10px; }
.kpi-card .kpi-value { margin: 13px 0 5px; overflow: hidden; color: var(--ink); font-size: clamp(19px, 2vw, 27px); font-weight: 720; letter-spacing: -.055em; text-overflow: ellipsis; white-space: nowrap; }
.kpi-card .kpi-help { color: var(--subtle); font-size: 9px; }
.kpi-card .trend { color: var(--green); font: 700 9px var(--mono); }
.kpi-card.warning .kpi-value { color: var(--amber); }

.overview-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(330px, .8fr); gap: 14px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.panel-header { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 0 19px; border-bottom: 1px solid var(--line); }
.panel-header h3 { margin: 5px 0 0; font-size: 14px; }
.legend { display: flex; gap: 15px; color: var(--muted); font-size: 9px; }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend i { width: 7px; height: 7px; display: inline-block; border-radius: 2px; }
.legend .orders { background: var(--green); }
.legend .revenue { background: var(--blue); }
.chart-wrap { height: 278px; padding: 14px 18px 0; }
#activity-chart { width: 100%; height: 100%; overflow: visible; }
.chart-grid { stroke: #243548; stroke-width: 1; }
.chart-axis { fill: #6a7f94; font: 9px var(--mono); }
.chart-order { fill: none; stroke: var(--green); stroke-width: 2.5; }
.chart-order-area { fill: url(#orderGradient); }
.chart-revenue { fill: none; stroke: var(--blue); stroke-width: 2; stroke-dasharray: 4 5; }
.chart-dot { fill: var(--canvas); stroke: var(--green); stroke-width: 2; }
.watermark-note { display: flex; align-items: center; gap: 9px; min-height: 45px; padding: 0 19px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; }
.watermark-note i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px rgba(94,224,160,.6); }
.watermark-note strong { color: var(--ink); }
.live-label { display: flex; align-items: center; gap: 6px; color: var(--green); font: 700 8px var(--mono); letter-spacing: .1em; }
.live-label i { width: 5px; height: 5px; border-radius: 50%; background: var(--green); animation: pulse 1.6s infinite; }
.event-list { padding: 4px 18px 9px; }
.event-row { display: grid; grid-template-columns: 31px minmax(0,1fr) auto; align-items: center; gap: 11px; padding: 13px 0; border-bottom: 1px solid rgba(34,59,54,.7); }
.event-row:last-child { border-bottom: 0; }
.event-icon { width: 31px; height: 31px; display: grid; place-items: center; border: 1px solid #3d5166; border-radius: 8px; color: var(--green); background: #15263a; font-weight: 800; }
.event-icon.warning { border-color: #3d5166; color: var(--amber); background: #1c3348; }
.event-row strong, .event-row span { display: block; }
.event-row strong { margin-bottom: 3px; font-size: 10px; }
.event-row span { color: var(--muted); font-size: 9px; line-height: 1.4; }
.event-row time { color: var(--subtle); font: 9px var(--mono); }
.reconciliation-banner { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 14px; padding: 14px 18px; border: 1px solid #3d5166; border-radius: 11px; background: linear-gradient(90deg, #15263a, #0b1520); }
.reconciliation-banner strong { font-size: 11px; }
.reconciliation-banner p { margin: 4px 0 0; color: var(--muted); font-size: 9px; }
.reconciliation-equation { font: 700 11px var(--mono); color: var(--green-bright); }

.table-panel { overflow: hidden; }
.table-toolbar { min-height: 66px; display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.search-field { width: min(360px, 45%); height: 36px; display: flex; align-items: center; gap: 8px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; background: #091411; }
.search-field svg { width: 15px; fill: var(--subtle); }
.search-field input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 11px; }
.search-field input::placeholder { color: var(--subtle); }
select { height: 36px; padding: 0 30px 0 10px; border: 1px solid var(--line); border-radius: 8px; outline: 0; color: var(--muted); background: #091411; font-size: 10px; }
.row-count { margin-left: auto; color: var(--subtle); font: 9px var(--mono); }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 12px 16px; color: var(--subtle); font: 700 8px var(--mono); letter-spacing: .1em; text-align: left; white-space: nowrap; }
td { padding: 15px 16px; border-top: 1px solid rgba(34,59,54,.7); color: var(--muted); font-size: 10px; white-space: nowrap; }
tbody tr { cursor: pointer; transition: background 120ms ease; }
tbody tr:hover, tbody tr:focus { outline: 0; background: #122033; }
td strong { color: var(--ink); }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 7px; border: 1px solid #3d5166; border-radius: 2px; color: var(--green-bright); background: #15263a; font-size: 8px; font-weight: 750; }
.status-pill.failed { border-color: #3d5166; color: var(--red); background: #1c3348; }
.status-pill.unpaid { border-color: #3d5166; color: var(--amber); background: #15263a; }

.quality-summary { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-bottom: 14px; }
.quality-stat { padding: 19px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.quality-stat strong { display: block; margin: 10px 0 4px; font-size: 29px; letter-spacing: -.05em; }
.quality-stat p { margin: 0; color: var(--muted); font-size: 10px; }
.quality-stat.rejected strong { color: var(--amber); }
.quality-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 14px; }
.rejection-row { display: grid; grid-template-columns: 36px minmax(0,1fr) auto; gap: 12px; align-items: start; margin: 0 18px; padding: 17px 0; border-bottom: 1px solid var(--line); }
.rejection-row:last-child { border-bottom: 0; }
.rejection-row .event-icon { color: var(--amber); border-color: #3d5166; background: #1c3348; }
.rejection-row h4 { margin: 0 0 6px; font-size: 11px; }
.rejection-row p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.55; }
.reason-code { color: var(--amber); font: 8px var(--mono); }
.payload-block { margin-top: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: #0b1520; font: 9px/1.55 var(--mono); }
.payload-block mark { color: var(--red); background: rgba(154,168,184,.14); }
.duplicate-card { padding: 22px; }
.duplicate-card h3 { margin: 5px 0 8px; font-size: 16px; }
.duplicate-card > p { color: var(--muted); font-size: 10px; line-height: 1.6; }
.event-compare { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 11px; margin: 23px 0; }
.event-compare > div { padding: 14px; border: 1px solid var(--line); border-radius: 9px; background: #091411; }
.event-compare small, .event-compare strong { display: block; }
.event-compare small { color: var(--subtle); font: 8px var(--mono); }
.event-compare strong { margin: 7px 0 4px; font-size: 10px; }
.event-compare span { color: var(--muted); font-size: 9px; }
.event-compare > span { color: var(--green); font-size: 16px; }
.proof-callout { padding: 12px 14px; border: 1px solid rgba(47,95,138,.3); border-radius: 8px; color: var(--green-bright); background: #15263a; font-size: 10px; }

.health-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.health-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.health-title { display: flex; align-items: center; gap: 12px; padding: 17px; border-bottom: 1px solid var(--line); }
.health-title > div:nth-child(2) { flex: 1; }
.health-title small, .health-title strong { display: block; }
.health-title small { margin-bottom: 3px; color: var(--subtle); font: 8px var(--mono); }
.health-title strong { font-size: 13px; }
.healthy-label { color: var(--green); font: 700 8px var(--mono); }
.metric-list { padding: 6px 17px; }
.metric-row { display: flex; justify-content: space-between; gap: 20px; padding: 11px 0; border-bottom: 1px solid rgba(34,59,54,.65); font-size: 9px; }
.metric-row:last-child { border-bottom: 0; }
.metric-row span { color: var(--muted); }
.metric-row strong { color: var(--ink); font-family: var(--mono); font-size: 9px; }
.health-explainer { min-height: 72px; padding: 13px 17px; border-top: 1px solid var(--line); color: var(--muted); background: #0a1513; font-size: 9px; line-height: 1.6; }

.lab-layout { display: grid; grid-template-columns: minmax(0,1fr) 330px; gap: 14px; }
.scenario-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; }
.scenario-card { display: grid; grid-template-columns: 38px minmax(0,1fr) auto; align-items: center; gap: 12px; min-height: 105px; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.scenario-number { width: 35px; height: 35px; display: grid; place-items: center; border: 1px solid #3d5166; border-radius: 9px; color: var(--green); background: #15263a; font: 700 10px var(--mono); }
.scenario-card h3 { margin: 0 0 5px; font-size: 11px; }
.scenario-card p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.scenario-card button { width: 31px; height: 31px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--green); background: #122033; cursor: pointer; }
.scenario-card button:hover { border-color: var(--green); }
.scenario-card.destructive .scenario-number { color: var(--red); border-color: #3d5166; background: #1c3348; }
.scenario-card.destructive button { color: var(--red); }
.run-monitor { min-height: 334px; padding: 19px; }
.monitor-empty { height: 100%; display: grid; place-items: center; text-align: center; }
.monitor-empty .lab-symbol { width: 48px; height: 48px; display: grid; place-items: center; margin: 0 auto 13px; border: 1px solid var(--line); border-radius: 12px; color: var(--green); background: var(--surface-soft); font-size: 21px; }
.monitor-empty h3 { margin: 0 0 8px; font-size: 12px; }
.monitor-empty p { max-width: 230px; margin: 0; color: var(--muted); font-size: 9px; line-height: 1.6; }
.monitor-status { display: flex; align-items: center; gap: 8px; color: var(--green); font: 700 8px var(--mono); letter-spacing: .1em; }
.monitor-status i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; animation: pulse 1s infinite; }
.run-monitor h3 { margin: 14px 0 7px; font-size: 16px; }
.run-monitor > p { margin: 0 0 18px; color: var(--muted); font-size: 9px; line-height: 1.6; }
.progress-track { height: 4px; overflow: hidden; border-radius: 3px; background: var(--line); }
.progress-track span { display: block; width: 100%; height: 100%; background: var(--green); transform: scaleX(0); transform-origin: left; transition: transform 260ms ease; }
.run-steps { display: grid; gap: 11px; margin-top: 20px; }
.run-step { display: flex; align-items: center; gap: 9px; color: var(--subtle); font-size: 9px; }
.run-step i { width: 17px; height: 17px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; font-style: normal; font-size: 8px; }
.run-step.done { color: var(--ink); }
.run-step.done i { color: #0b1520; border-color: var(--green); background: var(--green); }
.run-step.current { color: var(--green); }
.run-step.current i { border-color: var(--green); animation: pulse 1s infinite; }
.reconciliation-panel { margin-top: 14px; padding: 20px; }
.reconciliation-panel h3 { margin: 5px 0 18px; font-size: 14px; }
.equation-box { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 12px; padding: 18px; border: 1px solid #3d5166; border-radius: 10px; background: #122033; }
.equation-box span { color: var(--subtle); font: 11px var(--mono); }
.equation-box strong { color: var(--green-bright); font: 700 18px var(--mono); }
.assertion-list { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; margin-top: 13px; }
.assertion { padding: 11px; border: 1px solid var(--line); border-radius: 8px; background: #091411; }
.assertion span, .assertion strong { display: block; }
.assertion span { color: var(--subtle); font-size: 8px; }
.assertion strong { margin-top: 6px; font-size: 9px; }
.assertion strong::before { content: "✓"; margin-right: 6px; color: var(--green); }

.producer-layout { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(330px,.85fr); gap: 14px; }
.producer-form, .producer-evidence, .kafka-guide { padding: 22px; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.form-grid label { display: grid; align-content: start; gap: 7px; color: var(--muted); font-size: 9px; }
.form-grid [hidden] { display: none !important; }
.form-grid label > span { color: var(--subtle); font: 700 8px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.form-grid label em { color: var(--subtle); font-style: normal; font-weight: 400; text-transform: none; }
.form-grid input, .form-grid select { width: 100%; height: 40px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; outline: 0; color: var(--ink); background: #091411; font-size: 11px; }
.form-grid input:focus, .form-grid select:focus { border-color: var(--green); box-shadow: 0 0 0 2px rgba(94,224,160,.1); }
.form-grid small { color: var(--subtle); font-size: 8px; }
.form-grid .form-span { grid-column: 1 / -1; }
.producer-actions { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.producer-actions p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.6; }
.producer-actions strong { color: var(--green-bright); font-family: var(--mono); }
.producer-evidence pre { min-height: 240px; max-height: 330px; margin: 17px 0; padding: 16px; overflow: auto; border: 1px solid var(--line); border-radius: 9px; color: #a8d9c5; background: #07100e; font: 9px/1.7 var(--mono); white-space: pre-wrap; }
.producer-receipts { display: grid; gap: 7px; }
.empty-copy { margin: 0; color: var(--subtle); font-size: 9px; }
.producer-receipt { display: grid; gap: 4px; padding: 10px 13px; border: 1px solid rgba(47,95,138,.3); border-radius: 8px; background: #15263a; }
.producer-receipt strong { color: var(--green-bright); font: 700 9px var(--mono); }
.producer-receipt span, .producer-receipt small { color: var(--muted); font: 8px var(--mono); }
.kafka-guide { display: grid; grid-template-columns: 240px 1fr; gap: 32px; margin-top: 14px; }
.kafka-guide h3 { margin: 6px 0 0; font-size: 14px; }
.kafka-guide ol { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin: 0; padding: 0; counter-reset: kafka-step; list-style: none; }
.kafka-guide li { position: relative; padding: 10px 0 0 28px; color: var(--muted); font-size: 9px; line-height: 1.55; }
.kafka-guide li::before { content: counter(kafka-step); counter-increment: kafka-step; position: absolute; top: 8px; left: 0; width: 19px; height: 19px; display: grid; place-items: center; border: 1px solid var(--green); border-radius: 50%; color: var(--green); font: 700 8px var(--mono); }

.architecture-flow { display: grid; grid-template-columns: 1fr 70px 1fr 70px 1fr; align-items: stretch; gap: 0; }
.architecture-step { position: relative; min-height: 390px; padding: 31px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, var(--surface-raised), #091411); }
.architecture-step > span { position: absolute; top: 18px; right: 20px; color: var(--line-strong); font: 700 32px var(--mono); }
.architecture-step .tech-icon { margin-bottom: 28px; }
.architecture-step h3 { margin: 7px 0 12px; font-size: 24px; letter-spacing: -.04em; }
.architecture-step p:not(.eyebrow) { min-height: 72px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.architecture-step ul { display: grid; gap: 8px; margin: 24px 0 0; padding: 19px 0 0; border-top: 1px solid var(--line); list-style: none; }
.architecture-step li { color: var(--muted); font: 9px var(--mono); }
.architecture-step li::before { content: "→"; margin-right: 9px; color: var(--green); }
.architecture-arrow { display: grid; place-items: center; color: var(--green); font-size: 22px; }

.drawer-backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(2,8,7,.67); backdrop-filter: blur(3px); }
.detail-drawer { position: fixed; inset: 0 0 0 auto; z-index: 90; width: min(480px,100%); padding: 28px; overflow-y: auto; border-left: 1px solid var(--line-strong); background: #0a1513; transform: translateX(102%); transition: transform 220ms ease; }
.detail-drawer.open { transform: translateX(0); }
.drawer-close { position: absolute; top: 19px; right: 20px; width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); background: var(--surface); cursor: pointer; }
.drawer-order { margin: 8px 0 4px; font-size: 25px; letter-spacing: -.04em; }
.drawer-subtitle { color: var(--muted); font-size: 10px; }
.drawer-summary { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; margin: 23px 0; }
.drawer-summary div { padding: 13px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.drawer-summary span, .drawer-summary strong { display: block; }
.drawer-summary span { color: var(--subtle); font-size: 8px; }
.drawer-summary strong { margin-top: 6px; font-size: 10px; }
.journey-title { margin: 27px 0 17px; font-size: 12px; }
.journey { position: relative; display: grid; gap: 0; }
.journey::before { content: ""; position: absolute; top: 14px; bottom: 14px; left: 12px; width: 1px; background: var(--line-strong); }
.journey-step { position: relative; display: grid; grid-template-columns: 25px 1fr auto; gap: 11px; padding-bottom: 19px; }
.journey-step i { z-index: 1; width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid var(--green); border-radius: 50%; color: #0b1520; background: var(--green); font: normal 700 8px var(--mono); }
.journey-step strong, .journey-step span { display: block; }
.journey-step strong { margin-bottom: 3px; font-size: 10px; }
.journey-step span { color: var(--muted); font-size: 9px; line-height: 1.45; }
.journey-step time { color: var(--subtle); font: 8px var(--mono); }
.what-proves { margin-top: 9px; padding: 13px 15px; border: 1px solid rgba(47,95,138,.3); border-radius: 8px; color: var(--green-bright); background: #15263a; font-size: 10px; line-height: 1.55; }

dialog { width: min(420px, calc(100% - 30px)); padding: 0; border: 1px solid var(--line-strong); border-radius: 14px; color: var(--ink); background: #101c2a; box-shadow: 0 24px 80px rgba(0,0,0,.5); }
dialog::backdrop { background: rgba(2,8,7,.74); backdrop-filter: blur(4px); }
dialog form { padding: 26px; }
.dialog-icon { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid #3d5166; border-radius: 10px; color: var(--amber); background: #1c3348; font-weight: 800; }
dialog h2 { margin: 19px 0 8px; font-size: 18px; }
dialog p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 25px; }
.toast-region { position: fixed; right: 22px; bottom: 22px; z-index: 110; display: grid; gap: 8px; }
.toast { min-width: 290px; padding: 14px 16px; border: 1px solid #3d5166; border-radius: 9px; color: var(--green-bright); background: #15263a; box-shadow: 0 12px 35px rgba(0,0,0,.35); font-size: 10px; animation: toast-in 200ms ease; }

@keyframes flow { to { background-position: -200% 0; } }
@keyframes pulse { 50% { opacity: .35; } }
@keyframes appear { from { opacity: 0; transform: translateY(4px); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 1180px) {
  :root { --sidebar: 76px; }
  .brand { margin-inline: 10px; justify-content: center; }
  .brand > span:last-child, .nav-item span, .sidebar-footer { display: none; }
  .nav-item { justify-content: center; padding: 0; }
  .nav-item svg { width: 19px; }
  .kpi-grid { grid-template-columns: repeat(3,1fr); }
  .health-grid { grid-template-columns: 1fr; }
  .topbar-status { gap: 14px; }
  .scenario-identity { display: none; }
}

@media (max-width: 900px) {
  .pipeline-strip { grid-template-columns: 1fr 32px 1fr 32px 1fr; padding-inline: 20px; }
  .pipeline-node { grid-template-columns: 32px minmax(0,1fr) 7px; gap: 7px; }
  .pipeline-node .tech-icon { width: 32px; height: 32px; }
  .overview-grid, .quality-grid, .lab-layout, .producer-layout { grid-template-columns: 1fr; }
  .scenario-grid { grid-template-columns: repeat(2,1fr); }
  .architecture-flow { grid-template-columns: 1fr; gap: 10px; }
  .architecture-arrow { transform: rotate(90deg); min-height: 35px; }
  .architecture-step { min-height: auto; }
  .architecture-step p:not(.eyebrow) { min-height: auto; }
}

@media (max-width: 700px) {
  :root { --sidebar: 0px; }
  .sidebar { width: 224px; transform: translateX(-102%); transition: transform 200ms ease; }
  .sidebar.open { transform: translateX(0); }
  .sidebar .brand { justify-content: flex-start; }
  .sidebar .brand > span:last-child, .sidebar .nav-item span, .sidebar .sidebar-footer { display: initial; }
  .sidebar .nav-item { justify-content: flex-start; padding: 0 12px; }
  .mobile-menu { width: 36px; height: 36px; display: grid; place-content: center; gap: 4px; margin-right: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
  .mobile-menu span { width: 16px; height: 1px; background: var(--muted); }
  .topbar { height: 82px; justify-content: flex-start; padding: 0 17px; }
  .topbar-status { margin-left: auto; }
  .refresh-time, .overall-health div { display: none; }
  .overall-health { padding: 10px; }
  .pipeline-strip { overflow-x: auto; grid-template-columns: 190px 26px 190px 26px 190px; padding-inline: 16px; }
  .content-area { padding: 23px 16px 40px; }
  .mock-only-banner {
    align-items: stretch;
    flex-direction: column;
    margin: 16px 16px 0;
  }
  .mock-only-banner a { text-align: center; }
  .kpi-grid { grid-template-columns: repeat(2,1fr); }
  .scenario-grid, .quality-summary, .assertion-list { grid-template-columns: 1fr; }
  .form-grid, .kafka-guide, .kafka-guide ol { grid-template-columns: 1fr; }
  .form-grid .form-span { grid-column: auto; }
  .section-heading { align-items: flex-start; }
  .primary-action { white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
