/* AEX — facility console system
   Hard geometry. No tiles. No pill buttons. No SaaS card grid. */

:root {
  --void: #05070a;
  --ink: #e8eef6;
  --mute: #8b97a8;
  --dim: #5c6778;
  --line: #1a2433;
  --line2: #243044;
  --cyan: #00e8c0;
  --cyan-d: #0a7a66;
  --amber: #d4922a;
  --red: #e0455f;
  --blue: #3d8fd4;
  --panel: #080c14;
  --panel2: #0b101a;
  --mono: "IBM Plex Mono", "SFMono-Regular", ui-monospace, Menlo, monospace;
  --sans: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --max: 1180px;
  --gutter: clamp(12px, 2.5vw, 28px);
  --r: 0px; /* intentional: no rounded UI */
}

*, *::before, *::after { box-sizing: border-box; border-radius: 0 !important; }

html {
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--void);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.45;
  overflow-x: hidden;
}

/* Schematic field — fine hash, not soft glow blobs */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    linear-gradient(90deg, transparent 0, transparent calc(50% - 590px), rgba(0,232,192,0.03) calc(50% - 590px), rgba(0,232,192,0.03) calc(50% - 589px), transparent calc(50% - 589px), transparent calc(50% + 589px), rgba(0,232,192,0.03) calc(50% + 589px), rgba(0,232,192,0.03) calc(50% + 590px), transparent calc(50% + 590px)),
    repeating-linear-gradient(0deg, transparent, transparent 47px, rgba(36,50,70,0.25) 47px, rgba(36,50,70,0.25) 48px),
    repeating-linear-gradient(90deg, transparent, transparent 47px, rgba(36,50,70,0.18) 47px, rgba(36,50,70,0.18) 48px),
    var(--void);
}

#webgl {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.28;
  mix-blend-mode: screen;
}

.app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* ─── TOP INSTRUMENT BAR ─── */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 0;
  border-bottom: 1px solid var(--line2);
  background: rgba(5, 7, 10, 0.94);
  min-height: 52px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 var(--gutter);
  border-right: 1px solid var(--line2);
  text-decoration: none !important;
  color: var(--ink);
  min-width: 220px;
}

.nav-logo {
  width: 32px;
  height: 32px;
  display: block;
  flex-shrink: 0;
  border-radius: 0;
}

.nav-word { display: flex; flex-direction: column; gap: 2px; }
.nav-name {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.28em;
  line-height: 1;
}
.nav-brand .sub {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
}

.nav-links {
  display: flex;
  flex: 1;
  align-items: stretch;
  justify-content: flex-end;
  overflow-x: auto;
}

.nav-links button,
.nav-links a.btn-link {
  appearance: none;
  background: transparent;
  border: 0;
  border-left: 1px solid var(--line);
  color: var(--mute);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0 16px;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  text-decoration: none !important;
  border-radius: 0;
}

.nav-links button:hover,
.nav-links a.btn-link:hover {
  color: var(--ink);
  background: rgba(0, 232, 192, 0.04);
}

.nav-links button.active {
  color: var(--cyan);
  background: linear-gradient(180deg, transparent, rgba(0, 232, 192, 0.08));
  box-shadow: inset 0 -2px 0 var(--cyan);
}

/* ─── VIEW SHELL ─── */
.view { animation: none; }
.view::before { display: none; }
.view > * { position: relative; }

.hidden { display: none !important; }

/* ─── HERO — split blueprint, not card hero ─── */
.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 0;
  max-width: var(--max);
  margin: 0 auto;
  border-left: 1px solid var(--line2);
  border-right: 1px solid var(--line2);
  border-bottom: 1px solid var(--line2);
  background: linear-gradient(180deg, rgba(8,12,20,0.75), rgba(5,7,10,0.55));
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; border-left: 0; border-right: 0; }
}

.hero > div:first-child {
  padding: clamp(28px, 5vw, 56px) var(--gutter);
  border-right: 1px solid var(--line2);
  position: relative;
}

.hero > div:first-child::before {
  content: "SYS / AEX / 01";
  position: absolute;
  top: 10px;
  right: 12px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--dim);
}

.kicker {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
  margin: 0 0 18px;
  font-weight: 500;
}

.hero h1,
.section h2,
.console-header h2 {
  font-family: var(--sans);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0 0 16px;
  color: var(--ink);
}

.hero h1 {
  font-size: clamp(2rem, 4.8vw, 3.1rem);
  max-width: 14ch;
}

.hero h1 em {
  font-style: normal;
  color: var(--cyan);
  font-weight: 500;
}

.lede,
.section .sub {
  color: var(--mute);
  font-size: 0.98rem;
  line-height: 1.55;
  max-width: 40rem;
  margin: 0 0 22px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-bottom: 28px;
}

/* Hard command controls — not pills */
.btn,
button.btn {
  appearance: none;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 12px 18px;
  border: 1px solid var(--cyan);
  background: var(--cyan);
  color: #04110e;
  cursor: pointer;
  border-radius: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none !important;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.btn:hover {
  background: transparent;
  color: var(--cyan);
}

.btn.ghost {
  background: transparent;
  color: var(--mute);
  border-color: var(--line2);
  margin-left: -1px; /* seam join */
}

.btn.ghost:hover {
  color: var(--ink);
  border-color: var(--mute);
  background: rgba(255,255,255,0.02);
}

.btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Telemetry strip under CTAs — not stat tiles */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--line2);
  background: var(--panel);
}

.stat {
  padding: 12px 14px;
  border-right: 1px solid var(--line2);
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

.stat:last-child { border-right: 0; }

.stat .v {
  font-family: var(--mono);
  font-size: 1.35rem;
  color: var(--cyan);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.stat .l {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 6px;
  line-height: 1.35;
}

.stat-src {
  display: block;
  color: var(--cyan-d);
  margin-top: 3px;
}

/* Right hero instrument — hard frame */
.hero-card {
  border: 0;
  border-radius: 0;
  background: var(--panel);
  box-shadow: none;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.hero-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line2);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
  background: rgba(0,0,0,0.35);
}

.pulse {
  width: 6px;
  height: 6px;
  border-radius: 0;
  background: var(--cyan);
  box-shadow: 0 0 0 1px rgba(0,232,192,0.3);
  animation: blink 1.4s steps(2) infinite;
}

@keyframes blink {
  50% { opacity: 0.2; }
}

.meter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 0;
  flex: 1;
}

.meter {
  border: 0;
  border-right: 1px solid var(--line2);
  border-bottom: 1px solid var(--line2);
  border-radius: 0;
  padding: 16px 14px;
  background: transparent;
}

.meter:nth-child(2n) { border-right: 0; }

.meter .label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 8px;
}

.meter .val {
  font-family: var(--mono);
  font-size: 1.25rem;
  color: var(--ink);
  font-weight: 500;
}

.bar {
  height: 2px;
  background: var(--line2);
  margin-top: 12px;
  border-radius: 0;
  overflow: hidden;
}

.bar > i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--cyan);
  transition: width 0.5s linear;
}

.notice {
  margin: 0;
  border: 0;
  border-top: 1px solid var(--line2);
  border-left: 3px solid var(--cyan);
  border-radius: 0;
  background: rgba(0, 232, 192, 0.03);
  padding: 12px 14px;
  color: var(--mute);
  font-size: 0.88rem;
  line-height: 1.5;
}

.notice.cyan { border-left-color: var(--cyan); }
.notice strong { color: var(--ink); }

/* ─── SECTIONS as horizontal bands ─── */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(28px, 4vw, 48px) var(--gutter);
  border-left: 1px solid var(--line2);
  border-right: 1px solid var(--line2);
  border-bottom: 1px solid var(--line);
  background: rgba(5, 7, 10, 0.82);
}

.section h2 {
  font-size: clamp(1.25rem, 2.4vw, 1.55rem);
  margin: 0 0 8px;
  padding-left: 12px;
  border-left: 2px solid var(--cyan);
}

.section .sub { margin-bottom: 20px; padding-left: 14px; }

/* Kill card-grid aesthetic → instrument rows / columns */
.grid-3,
.grid-2,
.not-grid {
  display: grid;
  gap: 0;
  border: 1px solid var(--line2);
  background: var(--panel);
}

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

@media (max-width: 860px) {
  .grid-3, .grid-2, .stat-strip, .meter-grid { grid-template-columns: 1fr; }
  .stat { border-right: 0; border-bottom: 1px solid var(--line2); }
  .hero > div:first-child { border-right: 0; border-bottom: 1px solid var(--line2); }
}

.card {
  border: 0;
  border-right: 1px solid var(--line2);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 18px 16px;
  min-height: 0;
  display: block;
}

.grid-3 .card:last-child,
.grid-2 .card:last-child { border-right: 0; }

@media (max-width: 860px) {
  .card { border-right: 0; border-bottom: 1px solid var(--line2); }
  .card:last-child { border-bottom: 0; }
}

.card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.card p, .card li {
  color: var(--mute);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
}

.card ul { margin: 0.5rem 0 0; padding-left: 1.1rem; }
.card li + li { margin-top: 0.35rem; }

.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  border: 0;
  border-bottom: 1px solid var(--cyan-d);
  background: transparent;
  padding: 0 0 3px;
  margin-bottom: 10px;
  border-radius: 0;
}

/* Process — vertical rail, not tiles */
.process-track {
  display: grid;
  gap: 0;
  border: 1px solid var(--line2);
}

.process-step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 0;
  align-items: stretch;
  padding: 0;
  background: var(--panel);
  border: 0;
  border-bottom: 1px solid var(--line2);
  border-radius: 0;
  box-shadow: none;
}

.process-step:last-child { border-bottom: 0; }

.process-num {
  width: auto;
  height: auto;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--cyan);
  border: 0;
  border-right: 1px solid var(--line2);
  background: rgba(0, 232, 192, 0.04);
}

.process-step > div { padding: 16px 18px; }

.process-step h3 {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 500;
}

.process-step p {
  margin: 0;
  color: var(--mute);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Layers / lists as terminal rows */
.layers {
  display: grid;
  gap: 0;
  border: 1px solid var(--line2);
}

.layer {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 0 14px;
  align-items: center;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 12px 14px;
  background: var(--panel);
  box-shadow: none;
  transition: background 0.1s;
}

.layer:last-child { border-bottom: 0; }
.layer:hover {
  background: rgba(0, 232, 192, 0.03);
  border-color: var(--line);
}

.layer .num {
  font-family: var(--mono);
  color: var(--cyan);
  font-size: 12px;
}

.layer .name {
  font-weight: 500;
  color: var(--ink);
  font-size: 0.95rem;
}

.layer .desc {
  color: var(--mute);
  font-size: 0.85rem;
  margin-top: 2px;
  line-height: 1.4;
}

.layer .status {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
  background: transparent;
  border: 1px solid rgba(212, 146, 42, 0.45);
  padding: 4px 8px;
  border-radius: 0;
  white-space: nowrap;
}

.layer .status.live {
  color: var(--cyan);
  border-color: rgba(0, 232, 192, 0.4);
  background: transparent;
}

.layer .btn,
.layer .btn.ghost {
  margin: 0;
  padding: 8px 12px;
  font-size: 10px;
}

/* Clarity — inline flags, not red tiles */
.clarity-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border: 1px solid var(--line2);
}

.clarity-item {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mute);
  background: var(--panel);
  border: 0;
  border-right: 1px solid var(--line2);
  border-radius: 0;
  padding: 10px 14px;
  line-height: 1.3;
  box-shadow: none;
}

.clarity-item:last-child { border-right: 0; }
.clarity-item strong {
  color: var(--red);
  font-weight: 500;
  margin-right: 6px;
}

/* ─── CONSOLE ─── */
.console-shell {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 0 48px;
  border-left: 1px solid var(--line2);
  border-right: 1px solid var(--line2);
  background: rgba(5, 7, 10, 0.88);
}

.console-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
  margin: 0;
  padding: 20px var(--gutter);
  background: var(--panel);
  border: 0;
  border-bottom: 1px solid var(--line2);
  border-radius: 0;
  box-shadow: none;
}

.console-header .sub { margin: 0; max-width: 36rem; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 0;
}

.actions .btn { margin: 0; }
.actions .btn + .btn { margin-left: -1px; }

.howto-banner {
  border: 0;
  border-bottom: 1px solid var(--line2);
  background: rgba(0, 232, 192, 0.03);
  border-radius: 0;
  padding: 10px var(--gutter);
  margin: 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--mute);
}

/* Pipeline rail */
.pipe-rail {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0;
  padding: 0;
  border-bottom: 1px solid var(--line2);
  background: #06090f;
}

.pipe-step {
  flex: 1 1 100px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border-right: 1px solid var(--line);
  font-family: var(--mono);
  min-width: 90px;
}

.pipe-step:last-of-type { border-right: 0; }

.pipe-conn { display: none; }

.pipe-idx {
  font-size: 9px;
  color: var(--dim);
  letter-spacing: 0.12em;
}

.pipe-name {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mute);
}

.pipe-state {
  font-size: 10px;
  color: var(--dim);
  text-transform: uppercase;
}

.pipe-step.done .pipe-state,
.pipe-step.done .pipe-name { color: var(--cyan); }
.pipe-step.active .pipe-state { color: var(--ink); }
.pipe-step.warn .pipe-state { color: var(--amber); }
.pipe-step.fail .pipe-state { color: var(--red); }

.console-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px var(--gutter);
  border-bottom: 1px solid var(--line2);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--mute);
  background: var(--panel2);
}

.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 0;
  background: var(--dim);
  margin-right: 6px;
  vertical-align: middle;
}
.dot.ok { background: var(--cyan); }
.dot.fail { background: var(--red); }
.dot.warn { background: var(--amber); }
.dot.idle { background: var(--dim); }

.mono-meta { color: var(--dim); }

.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0;
  margin: 0;
  border-bottom: 1px solid var(--line2);
}

.kpi {
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  padding: 12px 12px;
  background: var(--panel);
  min-width: 0;
}

.kpi .k {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.kpi .n {
  font-family: var(--mono);
  font-size: 1.05rem;
  margin-top: 4px;
  color: var(--ink);
  font-weight: 500;
}

.kpi .n.good { color: var(--cyan); }
.kpi .n.amber { color: var(--amber); }
.kpi .n.bad { color: var(--red); }
.kpi .n.muted { color: var(--dim); }
.kpi-hint {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--dim);
  margin-top: 4px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border: 0;
  border-bottom: 1px solid var(--line2);
  padding: 0;
  margin: 0;
  background: #06090f;
  border-radius: 0;
}

.tabs button {
  appearance: none;
  background: transparent;
  border: 0;
  border-right: 1px solid var(--line);
  color: var(--mute);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 12px 14px;
  border-radius: 0;
  cursor: pointer;
}

.tabs button.active {
  color: var(--cyan);
  background: rgba(0, 232, 192, 0.05);
  box-shadow: inset 0 -2px 0 var(--cyan);
  border-color: var(--line);
}

.panel {
  border: 0;
  border-bottom: 1px solid var(--line2);
  border-radius: 0;
  background: var(--panel);
  padding: 18px var(--gutter);
  margin: 0;
  box-shadow: none;
}

.panel h3 {
  margin: 0 0 14px;
  font-size: 12px;
  font-family: var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--mute);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.panel-tag {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--void);
  background: var(--cyan);
  padding: 2px 6px;
  border-radius: 0;
  letter-spacing: 0.08em;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
  min-width: 0;
}

input, select, textarea {
  background: #04070c;
  border: 1px solid var(--line2);
  border-radius: 0;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  padding: 10px 10px;
  width: 100%;
  min-height: 38px;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: none;
}

textarea { min-height: 96px; resize: vertical; }

.out {
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.5;
  background: #03050a;
  border: 1px solid var(--line2);
  border-radius: 0;
  padding: 12px;
  max-height: 400px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: #a8b6c8;
}

.out .ok { color: var(--cyan); }
.out .warn { color: var(--amber); }
.out .bad { color: var(--red); }
.out .key { color: var(--cyan); }

.empty-out .empty-title {
  display: block;
  color: var(--mute);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 10px;
}
.empty-out .empty-body { color: var(--dim); }

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  font-family: var(--mono);
}

table.data th, table.data td {
  text-align: left;
  padding: 10px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  border-radius: 0;
}

table.data th {
  color: var(--dim);
  font-weight: 500;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: #06090f;
}

table.data td { color: var(--mute); }
table.data tr:hover td { background: rgba(0, 232, 192, 0.03); color: var(--ink); }

.badge {
  display: inline-block;
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 0;
  border: 1px solid var(--line2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: var(--mono);
}

.badge.issued { color: var(--cyan); border-color: rgba(0,232,192,0.4); }
.badge.retired { color: var(--dim); }
.badge.conditional { color: var(--amber); border-color: rgba(212,146,42,0.45); }
.badge.reject { color: var(--red); }

.footer {
  max-width: var(--max);
  margin: 0 auto 0;
  padding: 20px var(--gutter);
  border: 1px solid var(--line2);
  border-top: 0;
  border-radius: 0;
  background: var(--panel);
  color: var(--dim);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  line-height: 1.5;
}

.footer strong { color: var(--ink); font-weight: 500; }

.text-link {
  display: inline;
  background: none;
  border: none;
  color: var(--cyan);
  font: inherit;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  border-radius: 0;
}

.text-link:hover { color: var(--ink); }

.depth-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 8px;
}

.depth-nav .btn { margin-left: -1px; }
.depth-nav .btn:first-child { margin-left: 0; }

.setup-list {
  margin: 0.35rem 0 0;
  padding-left: 1.15rem;
  color: var(--mute);
  font-size: 0.9rem;
  line-height: 1.55;
}
.setup-list li + li { margin-top: 0.35rem; }
.setup-list strong { color: var(--ink); font-weight: 500; }
ol.setup-list { list-style: decimal; }

/* Baseline compare bars */
.baseline-compare {
  display: grid;
  gap: 10px;
}
.bc-row {
  display: grid;
  grid-template-columns: 72px 1fr 100px;
  gap: 10px;
  align-items: center;
  font-family: var(--mono);
  font-size: 11px;
}
.bc-l { color: var(--mute); text-transform: uppercase; letter-spacing: 0.08em; font-size: 10px; }
.bc-track {
  height: 10px;
  border: 1px solid var(--line2);
  background: rgba(0, 0, 0, 0.35);
}
.bc-track i { display: block; height: 100%; min-width: 0; }
.bc-track.base i { background: linear-gradient(90deg, rgba(61, 143, 212, 0.35), rgba(61, 143, 212, 0.9)); }
.bc-track.actual i { background: linear-gradient(90deg, rgba(0, 232, 192, 0.3), rgba(0, 232, 192, 0.9)); }
.bc-track.saved i { background: linear-gradient(90deg, rgba(46, 229, 157, 0.25), rgba(46, 229, 157, 0.85)); }
.bc-v { text-align: right; color: var(--ink); }
.bc-v.good { color: var(--cyan); }
.bc-note {
  margin: 0;
  font-size: 12px;
  color: var(--mute);
  line-height: 1.45;
}
.bc-note b { color: var(--ink); font-weight: 500; }

.evidence-actions { margin: 0.5rem 0 0.85rem; }
.evidence-meta {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 6px;
  margin-bottom: 12px;
}
.evidence-meta .mm {
  border: 1px solid var(--line);
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.28);
}
.evidence-meta .mm-l {
  display: block;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
}
.evidence-meta .mm-v {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  margin-top: 4px;
  color: var(--ink);
  word-break: break-all;
}
.evidence-meta .mm-v.good { color: var(--cyan); }
.evidence-meta .mm-v.bad { color: var(--red); }
.evidence-meta .mm-v.amber { color: var(--amber); }
button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* Boundary scope rail + component energy bars */
.bound-rail {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.bound-chip {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 10px;
  border: 1px solid var(--line2);
  color: var(--dim);
  background: transparent;
}
.bound-chip.on {
  color: var(--cyan);
  border-color: rgba(0, 232, 192, 0.45);
  background: rgba(0, 232, 192, 0.07);
  box-shadow: inset 0 0 0 1px rgba(0, 232, 192, 0.08);
}
.bound-chip.off {
  color: var(--dim);
  opacity: 0.55;
  text-decoration: line-through;
  text-decoration-color: rgba(125, 141, 163, 0.35);
}
.measure-meta {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 6px;
  margin-bottom: 12px;
}
.measure-meta.empty-meta .mm-v { color: var(--dim); }
.measure-meta .mm {
  border: 1px solid var(--line);
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.28);
}
.measure-meta .mm-l {
  display: block;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
}
.measure-meta .mm-v {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  margin-top: 4px;
  color: var(--ink);
  word-break: break-word;
}
.measure-meta .mm-v.good { color: var(--cyan); }
.measure-meta .mm-v.bad { color: var(--red); }
.comp-bars {
  display: grid;
  gap: 6px;
  margin-bottom: 4px;
}
.comp-row {
  display: grid;
  grid-template-columns: 88px 1fr 64px 36px;
  gap: 8px;
  align-items: center;
  font-family: var(--mono);
  font-size: 11px;
}
.comp-row.out { opacity: 0.45; }
.comp-name { color: var(--mute); }
.comp-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  position: relative;
}
.comp-track i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, rgba(0, 232, 192, 0.25), rgba(0, 232, 192, 0.85));
  min-width: 0;
}
.comp-row.out .comp-track i {
  background: linear-gradient(90deg, rgba(125, 141, 163, 0.15), rgba(125, 141, 163, 0.4));
}
.comp-val { text-align: right; color: var(--ink); }
.comp-flag {
  font-size: 9px;
  letter-spacing: 0.08em;
  text-align: center;
  border: 1px solid var(--line2);
  padding: 2px 0;
  color: var(--dim);
}
.comp-row.in .comp-flag {
  color: var(--cyan);
  border-color: rgba(0, 232, 192, 0.35);
}

.dim-bars { display: grid; gap: 8px; margin-top: 10px; }
.dim-row {
  display: grid;
  grid-template-columns: minmax(90px, 130px) 1fr 40px;
  gap: 8px;
  align-items: center;
  font-family: var(--mono);
  font-size: 11px;
}
.dim-row span { color: var(--mute); }
.dim-row b { color: var(--ink); text-align: right; font-weight: 500; }

code {
  font-family: var(--mono);
  font-size: 0.88em;
  color: var(--cyan);
  background: rgba(0, 232, 192, 0.06);
  padding: 0.05em 0.3em;
  border-radius: 0;
  border: 1px solid rgba(0, 232, 192, 0.15);
}

.not-card {
  border: 0;
  border-right: 1px solid var(--line2);
  border-radius: 0;
  padding: 16px;
  background: transparent;
  box-shadow: none;
  min-height: 0;
}
.not-card h4 {
  margin: 0 0 6px;
  font-size: 0.9rem;
  color: #e88a98;
  font-weight: 500;
}
.not-card p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--mute);
  line-height: 1.5;
}

/* Console page padding for tab content */
.console-shell .tabs,
.console-shell .kpi-row,
.console-shell #warnings,
.console-shell .pipe-rail,
.console-shell .console-meta,
.console-shell .howto-banner,
.console-shell .console-header {
  /* full bleed inside shell */
}

.console-shell .tab-panel .panel:last-child {
  border-bottom: 0;
}

/* Mobile nav */
@media (max-width: 720px) {
  .nav { flex-direction: column; }
  .nav-brand {
    min-width: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line2);
    padding: 12px var(--gutter);
  }
  .nav-links { justify-content: flex-start; }
  .nav-links button,
  .nav-links a.btn-link {
    padding: 12px 12px;
    font-size: 10px;
  }
  .process-step { grid-template-columns: 44px 1fr; }
  .layer {
    grid-template-columns: 36px minmax(0, 1fr);
  }
  .layer .status,
  .layer .btn {
    grid-column: 2;
    justify-self: start;
    margin-top: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pulse { animation: none; }
  .bar > i { transition: none; }
}
