/* PUNK — the adaptive runtime. official brand system. */

:root {
  /* ---- brand palette ---- */
  --obsidian: #0A0A0A;
  --paper: #F4F4EE;
  --alloy: #A7ACB2;
  --acid: #D7FF2F;
  --runtime-blue: #1E5BFF;

  --acid-soft: rgba(215, 255, 47, 0.12);
  --acid-dim: rgba(215, 255, 47, 0.6);
  --blue-soft: rgba(30, 91, 255, 0.14);
  --alloy-soft: rgba(167, 172, 178, 0.12);
  --danger: #E5484D;
  --danger-soft: rgba(229, 72, 77, 0.12);

  /* ---- surfaces / structure ---- */
  --bg: var(--obsidian);
  --bg-2: #101010;
  --bg-3: #121212;
  --bg-hover: #181818;
  --border: rgba(167, 172, 178, 0.25);
  --border-soft: rgba(167, 172, 178, 0.15);
  --rule-paper: var(--paper);

  /* ---- text ---- */
  --text: var(--paper);
  --dim: var(--alloy);
  --dimmer: #6B7076;

  /* ---- semantic aliases (referenced by app.js inline styles) ---- */
  --accent: var(--acid);
  --accent-soft: var(--acid-soft);
  --green: var(--acid);
  --green-soft: var(--acid-soft);
  --teal: var(--acid);
  --teal-soft: var(--acid-soft);
  --amber: var(--acid-dim);
  --amber-soft: rgba(215, 255, 47, 0.08);
  --red: var(--danger);
  --red-soft: var(--danger-soft);
  --blue: var(--runtime-blue);
  --purple: var(--runtime-blue);
  --purple-soft: var(--blue-soft);
  --term-green: rgba(215, 255, 47, 0.85);

  /* ---- type ---- */
  --display: "Arial Narrow", "Helvetica Neue Condensed", "Roboto Condensed", system-ui, sans-serif;
  --sans: system-ui, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 0px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.45;
}

a { color: inherit; text-decoration: none; }
a.link { color: var(--runtime-blue); }
a.link:hover { text-decoration: underline; color: var(--paper); }

.mono { font-family: var(--mono); }
.dim { color: var(--dim); }
.dimmer { color: var(--dimmer); }
.green { color: var(--acid); }
.red { color: var(--danger); }
.amber { color: var(--acid-dim); }
.accent { color: var(--acid); }
.right { text-align: right; }
.nowrap { white-space: nowrap; }

/* scrollbars */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 0; }
::-webkit-scrollbar-thumb:hover { background: #3a3a3a; }
* { scrollbar-width: thin; scrollbar-color: #2a2a2a transparent; }

/* ---------- corner brackets (viewfinder motif) ---------- */

.bracketed, .tile {
  position: relative;
}
.bracketed::before, .tile::before {
  content: "";
  position: absolute;
  top: -1px; left: -1px;
  width: 10px; height: 10px;
  border-top: 2px solid var(--paper);
  border-left: 2px solid var(--paper);
  pointer-events: none;
}
.bracketed::after, .tile::after {
  content: "";
  position: absolute;
  bottom: -1px; right: -1px;
  width: 10px; height: 10px;
  border-bottom: 2px solid var(--paper);
  border-right: 2px solid var(--paper);
  pointer-events: none;
}
.tile:hover::before, .tile:hover::after,
.tile.hero::before, .tile.hero::after { border-color: var(--acid); }

/* ---------- shell ---------- */

.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 196px;
  flex: 0 0 196px;
  border-right: 1px solid var(--border);
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--bg);
}

.wordmark {
  display: block;
  padding: 0 20px 18px;
  font-family: var(--display);
  font-stretch: condensed;
  font-weight: 700;
  font-size: 26px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--paper);
  line-height: 1;
}
.wordmark .wm-square {
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--acid);
  margin-left: 5px;
}
.wordmark-sub {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 1px;
  color: var(--alloy);
  margin-top: 4px;
  text-transform: lowercase;
}

/* technical annotation micro-block */
.anno {
  padding: 0 20px 16px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.5px;
  line-height: 1.7;
  color: var(--alloy);
  text-transform: uppercase;
}
.anno .a-title { color: var(--paper); }
.anno .a-val { color: var(--paper); }
.anno .a-active { color: var(--acid); }

#nav { display: flex; flex-direction: column; }
#nav a {
  padding: 8px 20px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-left: 2px solid transparent;
  transition: color 0.1s, background 0.1s;
}
#nav a:hover { color: var(--text); background: var(--bg-2); }
#nav a.active {
  color: var(--acid);
  border-left-color: var(--acid);
  background: var(--bg-2);
}

.sidebar-foot {
  margin-top: auto;
  padding: 16px 20px 0;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--dimmer);
  line-height: 1.8;
}

#main { flex: 1; min-width: 0; }
.view { max-width: 1280px; margin: 0 auto; padding: 28px 32px 64px; }

.loading { color: var(--dimmer); padding: 48px 0; }

/* ---------- banner ---------- */

.banner {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--danger-soft);
  border-bottom: 1px solid var(--danger);
  color: var(--danger);
  font-family: var(--mono);
  font-size: 12px;
  padding: 6px 16px;
  text-align: center;
}
.banner.hidden { display: none; }
.hidden { display: none !important; }

/* ---------- headings / layout primitives ---------- */

.page-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule-paper);
  flex-wrap: wrap;
}
.page-head h1 {
  margin: 0;
  font-family: var(--display);
  font-stretch: condensed;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--paper);
}
.page-head h1 .sec-num {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--acid);
  margin-right: 10px;
  vertical-align: 3px;
  letter-spacing: 1px;
}
.page-head .sub { color: var(--dim); font-size: 12px; }

.section-title {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--acid);
  margin: 28px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(167, 172, 178, 0.35);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.section-title:first-child { margin-top: 0; }

.panel {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 1200px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---------- tiles ---------- */

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
  gap: 10px;
  margin-bottom: 22px;
}
.tile {
  background: var(--bg-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 14px 14px 12px;
  min-height: 92px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tile-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--alloy);
}
.tile-value {
  font-family: var(--display);
  font-stretch: condensed;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.5px;
  color: var(--paper);
  margin-top: auto;
}
.tile-sub { font-size: 11px; color: var(--dimmer); font-family: var(--mono); }
.tile.hero { border-color: rgba(215, 255, 47, 0.45); }
.tile.hero .tile-value { color: var(--acid); font-size: 34px; }
.tile .spark { position: absolute; right: 8px; bottom: 8px; opacity: 0.7; }
.tile-donut { display: flex; align-items: center; gap: 10px; margin-top: auto; }

/* donut + sparkline */
.donut { width: 52px; height: 52px; flex: 0 0 52px; }
.donut-bg { fill: none; stroke: rgba(167, 172, 178, 0.2); stroke-width: 7; }
.donut-fg { fill: none; stroke: var(--acid); stroke-width: 7; stroke-linecap: butt; }
.donut-text { fill: var(--paper); font-family: var(--mono); font-size: 13px; font-weight: 700; }
.spark { width: 110px; height: 26px; }
.spark polyline { fill: none; stroke: var(--acid); stroke-width: 1.5; }
.spark.spark-accent polyline { stroke: var(--acid); }

/* ---------- runtime loop strip ---------- */

.loopstrip {
  display: flex;
  align-items: stretch;
  gap: 0;
  overflow-x: auto;
  border: 1px solid var(--border);
  background: var(--bg-2);
  border-radius: var(--radius);
  margin-bottom: 22px;
  padding: 12px 10px;
}
.loop-step {
  flex: 1 1 0;
  min-width: 96px;
  text-align: center;
  padding: 4px 6px;
  position: relative;
}
.loop-step + .loop-step::before {
  content: "›";
  position: absolute;
  left: -4px;
  top: 6px;
  color: var(--dimmer);
  font-size: 14px;
}
.loop-name {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-3);
  color: var(--alloy);
}
/* the one solid-blue moment: the active loop pill */
.loop-step.hot .loop-name { border-color: var(--runtime-blue); color: var(--paper); background: var(--runtime-blue); }
.loop-num {
  font-family: var(--display);
  font-stretch: condensed;
  font-size: 17px;
  font-weight: 700;
  margin-top: 6px;
  color: var(--paper);
}
.loop-sub { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.5px; text-transform: uppercase; color: var(--dimmer); }

/* ---------- route mix stacked bar ---------- */

.mixbar {
  display: flex;
  height: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-3);
}
.mixbar .seg { height: 100%; min-width: 2px; }
.mix-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; font-size: 11px; color: var(--dim); font-family: var(--mono); }
.mix-legend .swatch { display: inline-block; width: 8px; height: 8px; margin-right: 5px; vertical-align: baseline; }

.seg-live, .swatch-live { background: #4a4d50; }
.seg-exact_cache, .swatch-exact_cache { background: rgba(215, 255, 47, 0.75); }
.seg-tool_cache, .swatch-tool_cache { background: rgba(215, 255, 47, 0.5); }
.seg-som_cache, .swatch-som_cache { background: rgba(215, 255, 47, 0.32); }
.seg-artifact, .swatch-artifact { background: var(--acid); }
.seg-hybrid, .swatch-hybrid { background: var(--runtime-blue); }
.seg-blocked, .swatch-blocked { background: var(--danger); }
.seg-other, .swatch-other { background: var(--dimmer); }

/* ---------- badges & pills ---------- */

.badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 1px 7px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--dim);
  white-space: nowrap;
  vertical-align: middle;
}
.badge-live { color: var(--alloy); border-color: var(--alloy); }
.badge-exact_cache, .badge-tool_cache, .badge-som_cache { color: var(--acid); border-color: var(--acid); background: var(--acid-soft); }
.badge-artifact, .badge-hybrid { color: var(--obsidian); border-color: var(--acid); background: var(--acid); font-weight: 700; }
.badge-blocked { color: var(--danger); border-color: var(--danger); }
.badge-green { color: var(--acid); border-color: var(--acid); background: var(--acid-soft); }
.badge-red { color: var(--danger); border-color: var(--danger); background: var(--danger-soft); }
.badge-amber { color: var(--alloy); border-color: var(--alloy); background: var(--alloy-soft); }
.badge-blue { color: var(--runtime-blue); border-color: var(--runtime-blue); background: var(--blue-soft); }
.badge-pink { color: var(--paper); border-color: var(--runtime-blue); background: var(--runtime-blue); }
.badge-dim { color: var(--dimmer); }

/* square status marker — shadow evaluation ran */
.shadow-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 0;
  background: var(--acid);
  margin-left: 5px;
  vertical-align: middle;
}

/* pattern / artifact state pills */
.pill {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--dim);
  white-space: nowrap;
}
.pill-observed, .pill-candidate { color: var(--alloy); border-color: var(--alloy); }
.pill-synthesizing { color: var(--alloy); border-color: var(--acid-dim); animation: pulse 1.2s ease-in-out infinite; }
.pill-shadowing { color: var(--alloy); border-color: var(--acid-dim); background: var(--amber-soft); }
.pill-promoted, .pill-stable, .pill-canary { color: var(--obsidian); border-color: var(--acid); background: var(--acid); font-weight: 700; }
.pill-negative { color: var(--danger); border-color: var(--danger); text-decoration: line-through; }
.pill-watchlisted { color: var(--dimmer); border-style: dashed; }
.pill-replay_passed { color: var(--acid); border-color: var(--acid); background: var(--acid-soft); }
.pill-approved { color: var(--runtime-blue); border-color: var(--runtime-blue); background: var(--blue-soft); }
.pill-quarantined, .pill-degraded, .pill-rolled_back, .pill-replay_failed { color: var(--danger); border-color: var(--danger); background: var(--danger-soft); }
.pill-draft, .pill-synthesized { color: var(--alloy); }
.pill-retired { color: var(--dimmer); border-color: var(--border-soft); }

@keyframes pulse { 50% { opacity: 0.45; } }

/* trust tiers */
.pill-unverified { color: var(--alloy); }
.pill-verified { color: var(--paper); border-color: var(--paper); }
.pill-trusted { color: var(--runtime-blue); border-color: var(--runtime-blue); background: var(--blue-soft); }
.pill-privileged { color: var(--obsidian); border-color: var(--acid); background: var(--acid); font-weight: 700; }

/* ---------- bars ---------- */

.bar-track {
  position: relative;
  height: 6px;
  width: 100%;
  min-width: 60px;
  background: var(--bg-hover);
  border-radius: 0;
  overflow: hidden;
}
.bar-fill { height: 100%; background: var(--acid); border-radius: 0; }
.bar-fill.bar-green { background: var(--acid); }
.bar-fill.bar-blue { background: var(--runtime-blue); }
.bar-wrap { display: flex; align-items: center; gap: 8px; }
.bar-wrap .bar-num { font-family: var(--mono); font-size: 11px; color: var(--dim); min-width: 34px; text-align: right; }

/* ---------- tables ---------- */

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-2); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tbl th {
  text-align: left;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--alloy);
  padding: 8px 12px;
  border-bottom: 1px solid var(--rule-paper);
  white-space: nowrap;
}
.tbl td {
  padding: 7px 12px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: middle;
  white-space: nowrap;
}
.tbl tr:last-child td { border-bottom: none; }
.tbl tbody tr:hover { background: var(--bg-hover); }
.tbl td.num, .tbl th.num { text-align: right; font-family: var(--mono); }
.tbl .id-cell { font-family: var(--mono); font-size: 11.5px; }
.tbl tr.row-link { cursor: pointer; }
.tbl tr.detail-row td { white-space: normal; background: var(--bg); }
.tbl tr.detail-row:hover { background: var(--bg); }

/* ---------- chips (filters) ---------- */

.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.chip {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-2);
  color: var(--dim);
  cursor: pointer;
}
.chip:hover { color: var(--text); border-color: var(--alloy); }
.chip.active { color: var(--runtime-blue); border-color: var(--runtime-blue); background: var(--blue-soft); }

/* ---------- buttons ---------- */

.btn {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 6px 14px;
  border: 1px solid var(--paper);
  border-radius: 0;
  background: transparent;
  color: var(--paper);
  cursor: pointer;
  letter-spacing: 0.8px;
}
.btn:hover { background: var(--bg-hover); }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn-accent { border-color: var(--acid); color: var(--obsidian); background: var(--acid); }
.btn-accent:hover { background: rgba(215, 255, 47, 0.85); border-color: var(--acid); }
.btn-danger { border-color: var(--danger); color: var(--danger); background: transparent; }
.btn-danger:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--dim); }
.btn-ghost:hover { color: var(--paper); border-color: var(--alloy); }
.btn-sm { padding: 3px 10px; font-size: 11px; }
.btn.fb-active { border-color: var(--acid); color: var(--acid); background: var(--acid-soft); }
.btn.fb-active-down { border-color: var(--danger); color: var(--danger); background: var(--danger-soft); }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

/* ---------- terminal / learning feed ---------- */

.term {
  background: var(--obsidian);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
  color: rgba(215, 255, 47, 0.85);
  max-height: 360px;
  overflow-y: auto;
}
.term .t-head { color: var(--acid); font-weight: 700; }
.term .t-dim { color: var(--dimmer); }
.term .t-note { color: rgba(215, 255, 47, 0.6); }
.term .t-line::before { content: "  "; }
.term .t-head::before { content: "▸ "; }

/* ---------- pre / json blocks ---------- */

pre.json, pre.plain {
  margin: 0;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.55;
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 10px 12px;
  overflow-x: auto;
  white-space: pre;
  color: var(--alloy);
}
.j-key { color: var(--acid); }
.j-str { color: var(--paper); }
.j-num { color: #6E94FF; }
.j-bool { color: var(--acid-dim); }
.j-null { color: var(--dimmer); }

.preblock { position: relative; }
.preblock.collapsed pre { max-height: 4.6em; overflow: hidden; }
.preblock.collapsed::after {
  content: "";
  position: absolute;
  left: 1px; right: 1px; bottom: 22px;
  height: 2.2em;
  background: linear-gradient(transparent, var(--bg));
  pointer-events: none;
}
.pre-toggle {
  display: block;
  width: 100%;
  text-align: left;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--dim);
  background: var(--bg-3);
  border: 1px solid var(--border-soft);
  border-top: none;
  padding: 3px 12px;
  cursor: pointer;
}
.pre-toggle:hover { color: var(--acid); }

.som-pre { max-height: 380px; overflow: auto; white-space: pre-wrap; word-break: break-word; }

/* ---------- facts / key-value ---------- */

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px 20px;
}
.fact .f-label { font-family: var(--mono); font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--alloy); margin-bottom: 2px; }
.fact .f-value { font-family: var(--mono); font-size: 13px; word-break: break-all; }

/* ---------- route explanation ---------- */

.explain { border-left: 2px solid var(--acid); }
.explain .reason { font-size: 14px; margin-bottom: 12px; }
.explain-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.explain-cell { background: var(--bg-3); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 10px 12px; font-size: 12px; }
.explain-cell .e-label { font-family: var(--mono); font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--alloy); margin-bottom: 6px; }
.alt-list { margin: 0; padding: 0; list-style: none; font-family: var(--mono); font-size: 11.5px; }
.alt-list li { padding: 3px 0 3px 14px; border-bottom: 1px dashed var(--border-soft); position: relative; }
.alt-list li::before { content: ""; position: absolute; left: 0; top: 9px; width: 5px; height: 5px; background: var(--acid); }
.alt-list li:last-child { border-bottom: none; }

/* ---------- timeline ---------- */

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border-soft); }
.timeline li:last-child { border-bottom: none; }
.tl-offset { flex: 0 0 76px; text-align: right; font-family: var(--mono); font-size: 11px; color: var(--dim); padding-top: 2px; }
.tl-icon { flex: 0 0 18px; text-align: center; color: var(--acid); font-size: 13px; padding-top: 1px; }
.tl-body { flex: 1; min-width: 0; }
.tl-type { font-family: var(--mono); font-size: 12px; font-weight: 600; }
.tl-body .preblock { margin-top: 6px; }

/* ---------- lifecycle pipeline ---------- */

.pipeline { display: flex; align-items: center; gap: 0; flex-wrap: wrap; margin: 8px 0 4px; }
.pipe-stage {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--dimmer);
  background: var(--bg-3);
  position: relative;
  margin-right: 22px;
}
.pipe-stage:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -22px;
  top: 50%;
  width: 22px;
  height: 1px;
  background: var(--border);
}
.pipe-stage.done { color: var(--acid); border-color: rgba(215, 255, 47, 0.5); }
.pipe-stage.done:not(:last-child)::after { background: rgba(215, 255, 47, 0.5); }
.pipe-stage.active {
  color: var(--obsidian);
  border-color: var(--acid);
  background: var(--acid);
  font-weight: 700;
}
.pipeline.dimmed .pipe-stage { opacity: 0.35; }

/* ---------- confidence ---------- */

.conf-big { font-family: var(--display); font-stretch: condensed; font-size: 46px; font-weight: 700; line-height: 1; }
.evidence { font-family: var(--mono); font-size: 11.5px; color: var(--dim); margin-top: 6px; }

/* ---------- empty states ---------- */

.empty {
  border: 1px dashed var(--alloy);
  border-radius: var(--radius);
  padding: 36px 24px;
  text-align: center;
  color: var(--dim);
  background: var(--bg-2);
}
.empty .hint { font-family: var(--mono); color: var(--acid); margin-top: 8px; font-size: 12.5px; }
.empty .hint code { background: var(--acid-soft); padding: 2px 8px; border-radius: var(--radius); }

/* ---------- web view ---------- */

.web-form { display: flex; gap: 8px; margin-bottom: 18px; }
.web-form input[type="url"], .web-form input[type="text"] {
  flex: 1;
  font-family: var(--mono);
  font-size: 13px;
  padding: 8px 12px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  outline: none;
}
.web-form input:focus { border-color: var(--acid); }

.compress-line { display: flex; align-items: baseline; gap: 10px; font-family: var(--mono); font-size: 14px; flex-wrap: wrap; }
.compress-line .ratio { color: var(--acid); font-weight: 700; font-size: 18px; }

.diff-row-high td { color: var(--danger); }
.diff-row-medium td { color: var(--acid-dim); }
.diff-row-low td { color: var(--dim); }

/* ---------- governance ---------- */

.policy-card { margin-bottom: 12px; }
.policy-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.policy-head .p-name { font-family: var(--mono); font-weight: 700; font-size: 13.5px; }
.rule-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.rule-chip {
  font-family: var(--mono);
  font-size: 11px;
  padding: 3px 9px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  color: var(--dim);
  background: var(--bg-3);
}
.rule-chip.allow { color: var(--acid); border-color: rgba(215, 255, 47, 0.5); background: var(--acid-soft); }
.rule-chip.deny, .rule-chip.block { color: var(--danger); border-color: rgba(229, 72, 77, 0.5); background: var(--danger-soft); }
.rule-chip.warn, .rule-chip.approval, .rule-chip.require_approval { color: var(--alloy); border-color: var(--alloy); background: var(--alloy-soft); }

.decision-allow { color: var(--acid); }
.decision-deny, .decision-block, .decision-blocked { color: var(--danger); }
.decision-warn, .decision-flag { color: var(--alloy); }

/* ---------- misc ---------- */

.kv-inline { font-family: var(--mono); font-size: 11.5px; color: var(--dim); }
.console-panel { margin-top: 12px; }
.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  padding: 1px 6px;
  border-radius: var(--radius);
  background: var(--bg-hover);
  color: var(--dim);
  margin-right: 4px;
}
.muted-note { font-size: 11px; color: var(--dimmer); margin-top: 6px; }
.pass-mark { color: var(--acid); font-weight: 700; }
.fail-mark { color: var(--danger); font-weight: 700; }

.two-col-diff { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 1200px) { .two-col-diff { grid-template-columns: 1fr; } }
.two-col-diff .col-label { font-family: var(--mono); font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--alloy); margin-bottom: 4px; }

@media (max-width: 900px) {
  .shell { flex-direction: column; }
  .sidebar { width: 100%; flex: none; height: auto; position: static; flex-direction: row; align-items: center; padding: 10px 16px; gap: 8px; }
  #nav { flex-direction: row; flex-wrap: wrap; }
  #nav a { border-left: none; border-bottom: 2px solid transparent; padding: 6px 10px; }
  #nav a.active { border-bottom-color: var(--acid); }
  .wordmark { padding: 0 12px 0 0; }
  .wordmark-sub, .sidebar-foot, .anno { display: none; }
  .view { padding: 20px 16px 48px; }
}
