/* console-dark.css */
body.console-theme {
  background: #030303;
  color: #ededed;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  padding: 0;
  overflow-y: auto; /* Allow vertical scrolling for smaller screens */
  overflow-x: hidden;
}

/* Nav overrides for console */
/* Removed .home-nav override since it's now handled centrally in home-dark.css with grid layout */

/* Right-side container for the top-nav action pills (currently just Language). */
.nav-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* Language switch dropdown — rounded pill style. */
.lang-switch {
  position: relative;
  font-family: "Cascadia Code", Consolas, monospace;
}
.lang-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: #cfcfcf;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 99px;
  cursor: pointer;
  transition: border-color 0.18s, color 0.18s, background 0.18s;
}
.lang-trigger:hover {
  color: #fff;
  border-color: rgba(0, 255, 255, 0.35);
}
.lang-trigger .lang-current { font-weight: 700; }
.lang-trigger .lang-caret { font-size: 9px; opacity: 0.7; }

.lang-switch[data-open="true"] .lang-trigger {
  color: #fff;
  border-color: rgba(0, 255, 255, 0.55);
  background: rgba(0, 255, 255, 0.06);
}

.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 160px;
  margin: 0;
  padding: 4px 0;
  list-style: none;
  background: rgba(8, 8, 12, 0.96);
  border: 1px solid rgba(0, 255, 255, 0.28);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
  z-index: 200;
}
.lang-menu[hidden] { display: none; }
.lang-menu li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  font-size: 12px;
  color: #c8c8c8;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.lang-menu li:hover {
  background: rgba(0, 255, 255, 0.08);
  color: #fff;
}
.lang-menu li[aria-selected="true"] {
  color: #00ffff;
}
.lang-menu .lang-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 18px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
  color: #cfcfcf;
}
.lang-menu li[aria-selected="true"] .lang-tag {
  background: rgba(0, 255, 255, 0.18);
  color: #00ffff;
}
.lang-menu .lang-name { font-size: 12px; }

/* Legacy class kept as an empty nav spacer on public pages
   (index/protocol/node/explorer/docs.html) so the grid layout's
   right column has something to align to. The in-page wallet UI
   it originally housed is gone (see cd3054da). */
.wallet-status-minimal {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 12px;
  color: #888;
  padding: 6px 12px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 99px;
  cursor: pointer;
  transition: background 0.2s;
  position: relative;
  z-index: 100;
}

.wallet-status-minimal:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* Generic status dot — reused by JSON lint and Local Verify
   indicators in console.html. */
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.dot.disconnected { background: #444; }
.dot.connected { background: #fff; box-shadow: 0 0 10px #fff; }

/* Console Layout */
.console-layout {
  display: grid;
  grid-template-columns: 1fr 420px;
  grid-template-rows: auto 1fr auto 200px auto;
  gap: 16px;
  min-height: calc(100vh - 73px);
  padding: 16px 32px 24px 32px;
  box-sizing: border-box;
}

.panel-dark {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.panel-header {
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 11px;
  text-transform: uppercase;
  color: #666;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 12px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  letter-spacing: 0.05em;
}

/* Specific panels */
.hud-status {
  grid-column: 1 / -1;
  grid-row: 1;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 16px 32px;
}

.hud-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hud-label { 
  font-family: "Cascadia Code", Consolas, monospace;
  color: #555; 
  font-size: 10px; 
  text-transform: uppercase; 
  letter-spacing: 0.1em;
}
.hud-value { 
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 14px; 
  color: #ccc; 
}
.hud-value.glow { 
  color: #fff; 
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5); 
}

/* Observation Grid (Block 6.5: actual sizing is in .matrix-stage below) */
.observation-grid {
  grid-column: 1;
  grid-row: 2;
  align-items: stretch;
  justify-content: stretch;
  background: radial-gradient(circle at center, rgba(255,255,255,0.03) 0%, transparent 60%);
  gap: 16px;
}

/* Right Tabbed Panel — replaces the legacy `.right-column-split`. Holds the
   Brief / Network / Export tabs PLUS a sticky-bottom Deduction Dock so the
   Submit button is always visible regardless of how much Brief content
   exists. */
.right-tabbed {
  grid-column: 2;
  grid-row: 2;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  min-height: 0; /* allow inner overflow */
}
.right-tabs-header {
  margin-bottom: 12px !important;
}
.right-tabs-header .tabs { gap: 14px; }
.right-tab-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}
.right-tab-pane { display: none; }
.right-tab-pane.active { display: block; }

/* Sticky bottom: deduction dock */
.deduction-dock {
  flex: 0 0 auto;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dock-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8a8a8a;
}
.dock-title { color: #fff; }
.deduction-dock .deduction-label {
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: #666;
  text-transform: uppercase;
}
.deduction-input-wrap {
  position: relative;
}
.deduction-input-wrap .dark-input {
  min-height: 76px;
  max-height: 120px;
  font-size: 11px;
  padding: 10px 12px;
}
.json-lint-state {
  position: absolute;
  right: 8px;
  bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 10px;
  color: #888;
  background: rgba(0,0,0,0.5);
  padding: 2px 6px;
  border-radius: 4px;
}
.json-lint-state .dot { width: 6px; height: 6px; }
.json-lint-state .dot.connected   { background: #7cffaf; box-shadow: 0 0 6px rgba(124,255,175,0.5); }
.json-lint-state .dot.disconnected { background: #444; }
.json-lint-state .dot.warn        { background: #ffaa00; box-shadow: 0 0 6px rgba(255,170,0,0.6); }
.json-lint-state .dot.error       { background: #ff003c; box-shadow: 0 0 6px rgba(255,0,60,0.7); }

.submit-proof-btn {
  margin-top: 6px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: "Cascadia Code", Consolas, monospace;
}
.submit-proof-btn .spb-label { font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.submit-proof-btn .spb-meta { font-size: 10px; color: rgba(0,0,0,0.65); letter-spacing: 0.04em; }
.submit-proof-btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; transform: none; }

/* Legacy class kept only for backward compat with any external stylesheet. */
.right-column-split { display: none; }

textarea.dark-input {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255,255,255,0.1);
  color: #a0a0a0;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 12px;
  line-height: 1.5;
  padding: 16px;
  width: 100%;
  flex-grow: 1;
  resize: none;
  border-radius: 8px;
  box-sizing: border-box;
}
textarea.dark-input:focus { 
  outline: none; 
  border-color: #fff; 
  color: #fff;
}

button.action-btn {
  background: #fff;
  color: #000;
  border: none;
  padding: 16px;
  width: 100%;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  margin-top: 16px;
  border-radius: 8px;
  transition: all 0.2s;
}
button.action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(255,255,255,0.2);
}
button.action-btn.ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  box-shadow: none;
}
button.action-btn.ghost:hover {
  background: rgba(255,255,255,0.05);
}

/* Ecosystem Logs & Tabs */
.ecosystem-logs {
  grid-column: 1 / -1;
  grid-row: 4;
}

.tabs-header {
  margin-bottom: 0 !important;
  border-bottom: none !important;
  padding-bottom: 0 !important;
}

.tabs {
  display: flex;
  gap: 16px;
}

.tab-btn {
  background: transparent;
  border: none;
  color: #666;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0 0 12px 0;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.tab-btn:hover {
  color: #ccc;
}

.tab-btn.active {
  color: #fff;
  border-bottom-color: #fff;
}

.tab-content-area {
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  height: 100%;
  overflow: hidden;
}

.log-stream {
  overflow-y: auto;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 11px;
  color: #777;
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
}
.log-line { display: flex; gap: 12px; }
.log-time { color: #444; }
.log-sys { color: #fff; }
.log-warn { color: #ffaa00; }
.log-data { color: #aaa; }

/* =========================================================================
   Block 6.5 additions: Step Brief, dynamic matrix, sample overlay,
   deduction-verify pill, leaderboard, status banner line, diff pills.
   ========================================================================= */

/* Top status banner (broadcasting / acked / locked / pending / confirmed) */
.status-banner-line {
  position: fixed;
  top: 73px;
  left: 0;
  right: 0;
  z-index: 800;
  text-align: center;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 8px 16px;
  background: rgba(0, 0, 0, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transform: translateY(-150%);
  transition: transform 0.25s ease, color 0.25s ease, background 0.25s ease;
  pointer-events: none;
}
.status-banner-line.visible {
  transform: translateY(0);
}
.status-banner-line.info { color: #cfd5ff; background: rgba(40, 50, 90, 0.9); }
.status-banner-line.success { color: #7cffaf; background: rgba(20, 60, 35, 0.9); }
.status-banner-line.warn { color: #ffaa00; background: rgba(60, 45, 0, 0.9); }
.status-banner-line.error { color: #ff8a8a; background: rgba(70, 20, 20, 0.9); }

/* Matrix stage = axis labels + grid + overlay container */
.matrix-stage {
  position: relative;
  display: grid;
  grid-template-columns: 22px 1fr;
  grid-template-rows: 1fr 22px;
  gap: 8px;
  width: min(960px, 100%);
  max-height: min(960px, 88vh);
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  padding-top: 8px;
}
.axis-label-y {
  grid-column: 1;
  grid-row: 1;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  text-align: center;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 10px;
  color: #555;
  letter-spacing: 0.15em;
  text-transform: lowercase;
}
.axis-label-x {
  grid-column: 2;
  grid-row: 2;
  text-align: center;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 10px;
  color: #555;
  letter-spacing: 0.15em;
  text-transform: lowercase;
}

/* Grid container holds: ticks-y (left), grid, overlay svg, ticks-x (bottom) */
.matrix-grid-container {
  grid-column: 2;
  grid-row: 1;
  position: relative;
  aspect-ratio: 1 / 1;
  display: grid;
  grid-template-columns: 22px 1fr;
  grid-template-rows: 1fr 14px;
  gap: 2px;
}
.axis-ticks-y {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.axis-ticks-y .axis-tick {
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 8px;
  color: #555;
  text-align: right;
  padding-right: 4px;
  line-height: 1;
  min-height: 1px;
}
.axis-ticks-x {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  justify-content: space-between;
}
.axis-ticks-x .axis-tick {
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 8px;
  color: #555;
  text-align: center;
  flex: 1;
  line-height: 1;
}
.matrix-grid {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: grid;
  gap: 1px;
  background: rgba(255, 255, 255, 0.02);
  position: relative;
}
.matrix-grid.canvas-mode {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  cursor: crosshair;
  background-color: rgba(255, 255, 255, 0.015);
  background-repeat: repeat;
  background-origin: padding-box;
}
.matrix-grid.canvas-mode:hover {
  background-color: rgba(255, 255, 255, 0.03);
}
.canvas-grid-note {
  color: #888;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 10px;
  padding: 4px 10px;
  margin-bottom: 6px;
  text-align: center;
  letter-spacing: 0.08em;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  pointer-events: none;
}

/* Sample SVG overlay sits exactly over the grid */
.sample-overlay {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.sample-overlay .sample-line {
  stroke: rgba(255, 255, 255, 0.35);
  stroke-width: 0.05;
  vector-effect: non-scaling-stroke;
}
.sample-overlay .sample-line.newest {
  stroke: #ffffff;
  stroke-width: 0.08;
  vector-effect: non-scaling-stroke;
}
.sample-overlay .sample-dot-a { fill: #7cffaf; }
.sample-overlay .sample-dot-b { fill: #ff8a8a; }

/* Cell highlight flashes */
.matrix-cell {
  background: rgba(255, 255, 255, 0.02);
  transition: background 0.1s ease, transform 0.1s ease;
}
.matrix-cell:hover {
  background: rgba(255, 255, 255, 0.18);
  cursor: crosshair;
}
.matrix-cell.cell-flash-a {
  animation: cell-flash-a-anim 1400ms ease-out forwards;
  z-index: 5;
}
.matrix-cell.cell-flash-b {
  animation: cell-flash-b-anim 1400ms ease-out forwards;
  z-index: 5;
}
@keyframes cell-flash-a-anim {
  0%   { background: rgba(124, 255, 175, 0.85); box-shadow: 0 0 14px rgba(124, 255, 175, 0.8); }
  60%  { background: rgba(124, 255, 175, 0.45); box-shadow: 0 0 8px  rgba(124, 255, 175, 0.4); }
  100% { background: rgba(255, 255, 255, 0.02); box-shadow: none; }
}
@keyframes cell-flash-b-anim {
  0%   { background: rgba(255, 138, 138, 0.85); box-shadow: 0 0 14px rgba(255, 138, 138, 0.8); }
  60%  { background: rgba(255, 138, 138, 0.45); box-shadow: 0 0 8px  rgba(255, 138, 138, 0.4); }
  100% { background: rgba(255, 255, 255, 0.02); box-shadow: none; }
}

.matrix-hint {
  text-align: center;
  color: #666;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 11px;
  margin-top: 18px;
  display: flex;
  justify-content: space-between;
  padding: 0 12px;
}
.matrix-hint .muted { color: #555; }

/* ---------- Network Strength panel (SAC, demo data) ---------- */
.network-strength {
  margin-top: 18px;
  padding: 14px 18px 12px 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0.005));
}
.ns-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.ns-title {
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: #6e7280;
  text-transform: uppercase;
}
.ns-tag {
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 9px;
  letter-spacing: 0.12em;
  color: #555;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 999px;
  padding: 2px 8px;
  text-transform: uppercase;
}
.ns-body {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 1.2fr);
  gap: 18px;
  align-items: center;
}
.ns-figure { display: flex; flex-direction: column; gap: 2px; }
.ns-count {
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 40px;
  line-height: 1.05;
  letter-spacing: 0.01em;
  color: #fff;
}
.ns-count.glow { text-shadow: 0 0 14px rgba(255,255,255,0.45); }
.ns-count.flash-up   { animation: ns-flash-up   1500ms ease-out; }
.ns-count.flash-down { animation: ns-flash-down 1500ms ease-out; }
@keyframes ns-flash-up {
  0%   { color: #7cffaf; text-shadow: 0 0 18px rgba(124,255,175,0.85); }
  100% { color: #fff;    text-shadow: 0 0 14px rgba(255,255,255,0.45); }
}
@keyframes ns-flash-down {
  0%   { color: #ffaa00; text-shadow: 0 0 18px rgba(255,170,0,0.85); }
  100% { color: #fff;    text-shadow: 0 0 14px rgba(255,255,255,0.45); }
}
.ns-caption {
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 11px;
  color: #8a8a8a;
  letter-spacing: 0.06em;
  margin-top: 2px;
}
.ns-meta {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 11px;
  color: #999;
}
.ns-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}
.ns-dot-node { background: #7cffaf; box-shadow: 0 0 6px rgba(124,255,175,0.6); }
.ns-dot-web  { background: #00ffff; box-shadow: 0 0 6px rgba(0,255,255,0.5); }
.ns-delta.up    { color: #7cffaf; }
.ns-delta.down  { color: #ffaa00; }
.ns-delta.flat  { color: #666; }
.ns-updated { color: #555; }
.ns-spark-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 100%;
  justify-content: center;
}
.ns-spark {
  width: 100%;
  height: 56px;
  display: block;
}
.ns-spark polyline.line {
  fill: none;
  stroke: url(#ns-spark-gradient);
  stroke-width: 1.5;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.ns-spark polyline.area {
  fill: rgba(0, 255, 255, 0.08);
  stroke: none;
}
.ns-spark circle.head {
  fill: #00ffff;
  filter: drop-shadow(0 0 4px rgba(0,255,255,0.9));
}
.ns-spark-label {
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 9px;
  color: #555;
  text-align: right;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

@media (max-width: 1024px) {
  .ns-body { grid-template-columns: 1fr; }
  .ns-spark { height: 40px; }
}

/* Step Brief panel */
.right-column-split {
  overflow-y: auto;
  max-height: calc(100vh - 200px);
  padding-right: 4px;
}
.step-brief { flex: 0 0 auto; }
.brief-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.03);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 12px;
}
.brief-row.narrow { padding: 4px 0; font-size: 11px; }
.brief-row:last-child { border-bottom: none; }
.brief-key {
  color: #555;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.1em;
  flex: 0 0 auto;
}
.brief-val {
  color: #ddd;
  font-weight: 500;
  text-align: right;
  flex: 1;
}
.brief-val.glow { color: #fff; text-shadow: 0 0 8px rgba(255, 255, 255, 0.4); }
.brief-val.warn { color: #ffaa00; }
.brief-val.mono { font-family: "Cascadia Code", Consolas, monospace; }
.brief-val.small { font-size: 11px; }
.brief-divider {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin: 8px 0;
}
.brief-footnote {
  color: #444;
  font-size: 9px;
  font-family: "Cascadia Code", Consolas, monospace;
  text-align: right;
  padding-bottom: 8px;
}
.brief-progress {
  position: relative;
  width: 80px;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  overflow: hidden;
}
.brief-progress-bar {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, #7cffaf, #00ffff);
  border-radius: 3px;
  transition: width 0.3s ease;
}
.diff-pills {
  display: flex;
  gap: 2px;
}
.diff-pill {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.diff-pill.on {
  background: #ff8a8a;
  border-color: #ff8a8a;
  box-shadow: 0 0 6px rgba(255, 138, 138, 0.6);
}

/* Deduction Engine extras */
.deduction-label {
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 10px;
  color: #555;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: block;
  letter-spacing: 0.05em;
}
.deduction-verify {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0 4px 0;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 11px;
}
.deduction-verify .dot.warn {
  background: #ffaa00;
  box-shadow: 0 0 10px rgba(255, 170, 0, 0.6);
}
.deduction-verify .dot.error {
  background: #ff4d4d;
  box-shadow: 0 0 10px rgba(255, 77, 77, 0.6);
}
button.action-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.1);
  color: #888;
  box-shadow: none;
}
button.action-btn:disabled:hover {
  transform: none;
  box-shadow: none;
}

/* Export panel extras */
.export-format-row {
  display: flex;
  gap: 12px;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 11px;
  color: #aaa;
  margin: 8px 0;
}
.export-format-row label {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
.export-count-row {
  margin-bottom: 12px;
}

/* Telemetry tabs panes + leaderboard */
.tab-pane { display: none; height: 100%; }
.tab-pane.active { display: block; }
.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 11px;
}
.leaderboard-table thead th {
  color: #555;
  text-align: left;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.05em;
  font-weight: 500;
}
.leaderboard-table tbody td {
  color: #ccc;
  padding: 8px 12px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.03);
}
.leaderboard-table tbody tr:hover td { background: rgba(255, 255, 255, 0.02); }
.mono { font-family: "Cascadia Code", Consolas, monospace; }
.muted { color: #555; }
.small { font-size: 11px; }

@media (max-width: 1024px) {
  .console-layout {
    display: flex;
    flex-direction: column;
    height: auto;
    overflow-y: auto;
  }
  body.console-theme { overflow-y: auto; }
}

/* Brand glow — used by the MAZEX brand link in the top nav and a
   few inline accent words on home/protocol/node pages. */
.glow-text {
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.warn-text {
  color: #ffaa00 !important;
  border-color: rgba(255, 170, 0, 0.3) !important;
}
.warn-text:hover {
  background: rgba(255, 170, 0, 0.1) !important;
}

.action-btn.small {
  padding: 10px;
  font-size: 12px;
}

/* Signature Request Specifics */
.sign-payload-box {
  background: rgba(255, 170, 0, 0.05);
  border: 1px solid rgba(255, 170, 0, 0.2);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: auto;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 11px;
}

.payload-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  color: #aaa;
}

.payload-hash {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed rgba(255, 170, 0, 0.2);
  color: #ffaa00;
  word-break: break-all;
}

.action-btn.sign-btn {
  background: #ffaa00;
  color: #000;
  box-shadow: 0 0 15px rgba(255, 170, 0, 0.3);
}
.action-btn.sign-btn:hover {
  background: #ffcc33;
  box-shadow: 0 0 25px rgba(255, 170, 0, 0.5);
}

/* ========================================================
   Immersive Solve Mode — collapse right column to give the
   observation matrix the full pane. Block 6.5 polish.
   ======================================================== */

.panel-header-tools {
  display: flex;
  align-items: center;
  gap: 14px;
}

.immersive-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(0, 255, 255, 0.18);
  color: #9fefef;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.immersive-toggle:hover {
  background: rgba(0, 255, 255, 0.08);
  border-color: rgba(0, 255, 255, 0.45);
  color: #cffafa;
}
.immersive-toggle svg {
  width: 12px;
  height: 12px;
}
.immersive-toggle[aria-pressed="true"] {
  background: rgba(0, 255, 255, 0.12);
  border-color: rgba(0, 255, 255, 0.65);
  color: #e7ffff;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.25);
}

/* Folded right column: observation matrix occupies the full row */
.console-layout.immersive {
  grid-template-columns: 1fr 0;
}
.console-layout.immersive .right-tabbed,
.console-layout.immersive .right-column-split {
  display: none;
}
.console-layout.immersive .observation-grid {
  grid-column: 1 / -1;
}
.console-layout.immersive .matrix-stage {
  width: min(1080px, 100%);
  max-height: min(1080px, 90vh);
}

@media (max-width: 1100px) {
  .immersive-toggle-label { display: none; }
}

/* ===========================================================
   Block 6.5 · Wave 2 — full visibility pass
   Added: banner stack, HUD align button, beacon dot,
          tool buttons, examples dropdown, NS ribbon,
          right-tab network/export panes, cell hover tooltip,
          confirm modal, shortcuts/tutorial/settings overlays,
          footer + floaters, my-rank chip, candidates pane.
   =========================================================== */

/* ---------- Banner stack ---------- */
.banner-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
}
.banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 24px;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  border-top: 1px solid transparent;
  border-bottom: 1px solid transparent;
}
.banner[hidden] { display: none; }
.banner-warn {
  background: rgba(255, 170, 0, 0.08);
  color: #ffcc66;
  border-top-color: rgba(255, 170, 0, 0.25);
  border-bottom-color: rgba(255, 170, 0, 0.25);
}
.banner-icon { font-size: 14px; }
.banner-dismiss {
  margin-left: auto;
  background: transparent;
  color: inherit;
  border: 1px solid rgba(255, 170, 0, 0.4);
  padding: 2px 8px;
  border-radius: 3px;
  font-family: inherit;
  font-size: 10px;
  cursor: pointer;
}
.banner-dismiss:hover { background: rgba(255, 170, 0, 0.15); }

/* ---------- HUD additions ---------- */
.hud-item-align {
  flex-direction: column;
  align-items: flex-start;
}
.hud-align-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.align-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 255, 255, 0.08);
  color: #cffafa;
  border: 1px solid rgba(0, 255, 255, 0.35);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  padding: 5px 10px;
  border-radius: 3px;
  cursor: pointer;
  text-transform: uppercase;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.align-btn:hover {
  background: rgba(0, 255, 255, 0.15);
  border-color: rgba(0, 255, 255, 0.65);
  color: #fff;
}
.align-btn.aligning { animation: align-spin 1s linear infinite; }
.align-btn.aligned {
  background: rgba(124, 255, 175, 0.10);
  border-color: rgba(124, 255, 175, 0.45);
  color: #c8ffe1;
}
.align-icon { display: inline-block; transform-origin: center; }
.align-btn.aligning .align-icon { animation: align-spin 1s linear infinite; }
@keyframes align-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.beacon-indicator {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: #777;
  text-transform: uppercase;
}
.beacon-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #444;
  transition: background 0.2s, box-shadow 0.2s;
}
.beacon-indicator.live .beacon-dot {
  background: #7cffaf;
  box-shadow: 0 0 8px rgba(124, 255, 175, 0.65);
  animation: beacon-pulse 1.6s ease-in-out infinite;
}
.beacon-indicator.live .beacon-label { color: #c8ffe1; }
@keyframes beacon-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.35); opacity: 0.6; }
}

/* ---------- Tool buttons on Observation Terminal header ---------- */
.tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.02);
  color: #aaa;
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.tool-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
  color: #fff;
}
.tool-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.tool-btn svg { opacity: 0.85; }

.open-since-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 10px;
  color: #999;
  letter-spacing: 0.06em;
  padding: 4px 8px;
  border-radius: 3px;
}
.open-since-chip.warn { color: #ffcc66; border-color: rgba(255, 170, 0, 0.3); background: rgba(255, 170, 0, 0.05); }

/* ---------- Examples dropdown ---------- */
.tool-dropdown { position: relative; }
.tool-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 280px;
  background: #0c0c0c;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 6px;
  z-index: 50;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 320px;
  overflow-y: auto;
}
.tool-dropdown-menu[hidden] { display: none; }
.example-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  background: transparent;
  border: none;
  color: #ccc;
  text-align: left;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 11px;
  cursor: pointer;
  border-radius: 3px;
}
.example-item:hover { background: rgba(255, 255, 255, 0.05); color: #fff; }
.example-item .ex-title { color: #00ffff; font-size: 10px; letter-spacing: 0.06em; }
.example-item .ex-desc  { color: #888; font-size: 10px; }
.example-item .ex-snippet {
  color: #aaa;
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- (Cell hover tooltip removed in Wave-3b — PROBE panel deprecated) ---------- */

/* ---------- Network Strength ribbon (replaces inline panel) ---------- */
.ns-ribbon {
  grid-column: 1 / -1;
  grid-row: 3;
  display: grid;
  grid-template-columns: 200px 1fr 1fr 1.4fr 1fr;
  gap: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 14px 22px;
  align-items: center;
}
.ns-rib-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 18px;
  border-left: 1px solid rgba(255, 255, 255, 0.05);
}
.ns-rib-cell:first-child { border-left: none; padding-left: 0; }
.ns-rib-headcell {
  align-items: flex-start;
}
.ns-rib-title {
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: #888;
  text-transform: uppercase;
}
.ns-rib-figure { align-items: flex-start; }
.ns-rib-figure .ns-count { font-size: 32px; line-height: 1; }
.ns-rib-figure .ns-caption {
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: #777;
  text-transform: uppercase;
}
.ns-rib-meta {
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 11px;
  color: #aaa;
  gap: 3px;
}
.ns-meta-line { display: flex; align-items: center; gap: 6px; }
.ns-rib-spark {
  flex-direction: row;
  align-items: stretch;
  gap: 12px;
}
.ns-rib-spark svg {
  flex: 1;
  height: 36px;
  width: 100%;
}
.ns-rib-spark .ns-spark-label {
  align-self: flex-end;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 9px;
  color: #666;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.ns-rib-burn {
  align-items: flex-start;
}
.ns-burn-title {
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: #888;
  text-transform: uppercase;
}
.ns-burn-value {
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 22px;
  color: #ffcc66;
  text-shadow: 0 0 10px rgba(255, 170, 0, 0.35);
  letter-spacing: 0.01em;
}

/* ---------- Right tab: Network detail pane ---------- */
.net-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 6px 0;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 12px;
}
.net-key { color: #888; letter-spacing: 0.06em; text-transform: uppercase; font-size: 10px; }
.net-val { color: #ddd; }
.net-val.glow { color: #fff; text-shadow: 0 0 8px rgba(255, 255, 255, 0.4); }
.net-val.warn { color: #ffcc66; }
.net-explain { margin-top: 8px; line-height: 1.5; }
.net-link {
  display: inline-block;
  margin-top: 10px;
  color: #00ffff;
  text-decoration: none;
  border-bottom: 1px dashed rgba(0, 255, 255, 0.4);
}
.net-link:hover { color: #fff; border-bottom-color: rgba(255, 255, 255, 0.6); }

/* ---------- Footer & utility floaters ---------- */
.console-footer {
  grid-column: 1 / -1;
  grid-row: 5;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 11px;
  color: #777;
}
.me-teaser {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: linear-gradient(90deg, rgba(140, 100, 255, 0.10), rgba(0, 255, 255, 0.05));
  border: 1px solid rgba(140, 100, 255, 0.25);
  border-radius: 999px;
  color: #ccb8ff;
  letter-spacing: 0.04em;
}
.me-teaser strong { color: #fff; }
.footer-spacer { flex: 1; }
.footer-floaters { display: flex; gap: 6px; }
.float-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  color: #aaa;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.float-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

/* ---------- Generic modal (confirm / shortcuts / tutorial / settings) ---------- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 300;
}
.modal-overlay[hidden] { display: none; }
.modal-panel {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: min(560px, 92vw);
  max-height: 86vh;
  background: #0a0a0a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  z-index: 301;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8);
}
.modal-panel[hidden] { display: none; }
.modal-panel.narrow { width: min(420px, 92vw); }
.modal-panel.wide   { width: min(720px, 96vw); }
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ccc;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.modal-close {
  background: none;
  border: none;
  color: #888;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}
.modal-close:hover { color: #ff003c; }
.modal-body {
  padding: 20px;
  overflow-y: auto;
}
.modal-foot {
  display: flex;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.modal-foot .action-btn { margin-top: 0; }
.modal-warn-banner {
  background: rgba(255, 170, 0, 0.08);
  border: 1px solid rgba(255, 170, 0, 0.25);
  color: #ffcc66;
  padding: 10px 14px;
  border-radius: 6px;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
}
.modal-checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 11px;
  color: #aaa;
  cursor: pointer;
}
.modal-checkbox-row input { accent-color: #00ffff; }

/* Shortcuts cheatsheet table */
.kbd-table {
  width: 100%;
  border-collapse: collapse;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 12px;
}
.kbd-table td {
  padding: 8px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #ccc;
}
.kbd-table td:first-child { width: 35%; }
kbd {
  display: inline-block;
  padding: 2px 6px;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 11px;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 3px;
  margin: 0 2px;
}
.kbd-inline {
  font-family: "Cascadia Code", Consolas, monospace;
  background: rgba(0, 255, 255, 0.08);
  border: 1px solid rgba(0, 255, 255, 0.3);
  color: #cffafa;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 11px;
}

/* Tutorial list */
.tutorial-list {
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 12px;
  color: #ccc;
  padding-left: 22px;
  line-height: 1.7;
}
.tutorial-list strong { color: #fff; }
.tutorial-list li + li { margin-top: 6px; }
.tutorial-foot { margin-top: 16px; }

/* Settings rows */
.settings-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 11px;
  color: #ccc;
}
.settings-row label { color: #aaa; letter-spacing: 0.04em; }
.dark-input.compact {
  padding: 6px 8px;
  font-size: 11px;
  width: 200px;
  min-height: auto;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

/* My rank chip in telemetry header */
.tabs-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.my-rank-chip {
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: #888;
  background: rgba(0, 255, 255, 0.05);
  border: 1px solid rgba(0, 255, 255, 0.25);
  padding: 3px 8px;
  border-radius: 999px;
  text-transform: uppercase;
}
.my-rank-chip strong { color: #cffafa; margin-left: 4px; }
.my-rank-chip[hidden] { display: none; }

/* Responsive: stack NS ribbon at smaller screens */
@media (max-width: 1280px) {
  .ns-ribbon {
    grid-template-columns: 1fr 1fr;
  }
  .ns-rib-cell { border-left: none; padding: 8px 12px; }
  .ns-rib-cell:nth-child(2n+1) { border-right: 1px solid rgba(255,255,255,0.05); }
}
@media (max-width: 900px) {
  .ns-ribbon { grid-template-columns: 1fr; }
  .ns-rib-cell:nth-child(n) { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.05); }
}

/* ===========================================================
   Wave-3 polish — full-screen editor, hover tooltip mini-grid,
   dock tools row, settings actions.
   =========================================================== */

/* Dock header tools (Expand button etc.) */
.dock-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}
.tool-btn.small {
  padding: 3px 8px;
  font-size: 9px;
}

/* (Hover tooltip + mini-grid styles removed in Wave-3b along with the
   deprecated PROBE panel.) */

/* Full-screen editor modal */
.modal-panel.fseditor {
  width: min(1100px, 96vw);
  height: min(720px, 90vh);
  max-height: 90vh;
}
.fseditor-head-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}
.json-lint-state.inline {
  position: static;
  background: transparent;
  border: none;
  padding: 0;
}
.fseditor-body {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 16px;
  overflow: hidden;
  padding: 16px 20px;
}
.fseditor-textarea {
  width: 100%;
  height: 100%;
  min-height: 100%;
  max-height: none;
  font-size: 13px;
  line-height: 1.55;
  padding: 14px 16px;
  resize: none;
}
.fseditor-side {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  padding: 12px;
  overflow-y: auto;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 11px;
  color: #aaa;
}
.fseditor-side h4 {
  margin: 0 0 10px 0;
  font-size: 10px;
  letter-spacing: 0.14em;
  color: #00ffff;
  text-transform: uppercase;
}
.fseditor-dsl {
  list-style: none;
  padding: 0;
  margin: 0 0 10px 0;
}
.fseditor-dsl li {
  padding: 6px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.fseditor-dsl code {
  color: #cffafa;
  background: rgba(0, 255, 255, 0.05);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 11px;
}
.fseditor-foot {
  justify-content: flex-end;
  gap: 10px;
}
.fseditor-foot .action-btn {
  flex: 0 0 auto;
  width: auto;
  min-width: 120px;
  margin-top: 0;
  padding: 10px 22px;
  font-size: 12px;
  text-align: center;
  letter-spacing: 0.06em;
}
.fseditor-foot .action-btn:not(.ghost) {
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.18);
}

.settings-row-actions {
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
  border-bottom: none;
}

/* ===========================================================
   Wave-3b · First-screen compaction (Probe panel removed)
   - Tightens HUD / NS-ribbon / observation paddings so that
     the bottom Telemetry panel becomes first-screen visible.
   =========================================================== */

/* Inline matrix-hint mini probe display (now legacy; primary probe is in toolbar chip) */
#matrix-probe-mini {
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: #888;
}
#matrix-probe-mini.live { color: #cffafa; }

/* Probe chip in the OBSERVATION TERMINAL toolbar — primary hover-coord display.
   Sits inline with Undo / Reset / Examples on the right side of the panel header. */
.probe-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: #888;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  transition: color 0.18s, border-color 0.18s, background 0.18s;
}
.probe-chip.live {
  color: #cffafa;
  border-color: rgba(0, 255, 255, 0.4);
  background: rgba(0, 255, 255, 0.06);
}
.probe-chip .probe-chip-icon {
  font-size: 11px;
  opacity: 0.85;
}
.probe-chip .probe-chip-label {
  font-size: 11px;
  letter-spacing: 0.06em;
}
.matrix-hint {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

/* ---- First-screen compaction ---- */
.console-layout {
  /* Original was: auto 1fr auto 200px auto with 16px gaps and 16/24 padding.
     We tighten gaps and rows so the Telemetry pane is visible at 1080p
     without scrolling. */
  grid-template-rows: auto 1fr auto 180px auto;
  gap: 12px;
  padding: 12px 28px 14px 28px;
}

/* HUD — slim row */
.hud-status {
  padding: 10px 24px;
}
.hud-label { font-size: 9px; }
.hud-value { font-size: 13px; }
.align-btn { padding: 4px 9px; font-size: 10px; }

/* Observation matrix slightly shorter so it shares vertical room. */
.matrix-stage {
  width: min(960px, 100%);
  max-height: min(720px, 64vh);
}
.console-layout.immersive .matrix-stage {
  /* immersive mode keeps the generous size since the right pane is folded */
  width: min(1080px, 100%);
  max-height: min(1080px, 86vh);
}
.observation-grid { padding: 14px 18px; }
.observation-grid .panel-header { margin-bottom: 12px; }

/* NS ribbon: tighten vertical footprint */
.ns-ribbon { padding: 10px 18px; }
.ns-rib-figure .ns-count { font-size: 28px; }
.ns-burn-value { font-size: 18px; }

/* Telemetry panel: use the dedicated row 4 height */
.ecosystem-logs { padding: 14px 18px; }
.tab-content-area { min-height: 120px; }

/* ---------- Collapsible Telemetry panel (Wave-3c) ---------- */
.logs-collapse-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  margin-left: 10px;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: #cfcfcf;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 99px;
  cursor: pointer;
  transition: color 0.18s, border-color 0.18s, background 0.18s;
  text-transform: uppercase;
}
.logs-collapse-btn:hover {
  color: #fff;
  border-color: rgba(0, 255, 255, 0.45);
  background: rgba(0, 255, 255, 0.06);
}
.logs-collapse-caret {
  display: inline-block;
  font-size: 10px;
  line-height: 1;
  transition: transform 0.2s ease;
}

/* Collapsed state — content slides up, only the header pill remains. */
.ecosystem-logs.collapsed {
  /* Drop the inner pane height so the section becomes a single header row.
     We also override the dedicated row height on .console-layout via a
     selector trick below. */
  padding-top: 8px;
  padding-bottom: 8px;
}
.ecosystem-logs.collapsed .tab-content-area {
  display: none;
}
.ecosystem-logs.collapsed .logs-collapse-caret {
  transform: rotate(180deg);
}

/* When collapsed, shrink the grid row that the panel occupies so the
   freed vertical space goes back to the matrix area. */
.console-layout:has(.ecosystem-logs.collapsed) {
  grid-template-rows: auto 1fr auto auto auto;
}

@media (min-height: 980px) {
  /* Tall screens: relax the matrix back to its larger size. */
  .matrix-stage { max-height: min(820px, 72vh); }
}

/* ===========================================================
   Wave-3d · Readable font system (Aug 2026)
   ------------------------------------------------------------
   The original "terminal" theme used very small fonts (9–11px)
   which were hard to read on 1080p+ displays. We expose a
   CSS-variable-driven font size system that can be flipped at
   runtime via `data-font-scale` on .console-layout:

     compact  →  the original ultra-dense terminal sizes
     cozy     →  +2px across the board (DEFAULT — easier on eyes)
     large    →  +4px (older eyes / 4K monitor friendly)

   We override the most legibility-critical selectors using
   variables so any future tweak is just one number change.
   =========================================================== */

.console-layout {
  /* Default = cozy */
  --fs-mini:    11px; /* was 9px  → muted footnotes, axis labels */
  --fs-tiny:    12px; /* was 10px → status chips, ns deltas */
  --fs-small:   13px; /* was 11px → HUD labels, brief keys, log lines */
  --fs-base:    14px; /* was 12px → tab buttons, panel headers, brief values */
  --fs-emph:    15px; /* was 13px → HUD values */
  --fs-strong:  17px; /* was 15px → ns count emphasis */
  --fs-display: 30px; /* was 28px → ns big number */
}

.console-layout[data-font-scale="compact"] {
  --fs-mini:    9px;
  --fs-tiny:    10px;
  --fs-small:   11px;
  --fs-base:    12px;
  --fs-emph:    13px;
  --fs-strong:  15px;
  --fs-display: 28px;
}

.console-layout[data-font-scale="large"] {
  --fs-mini:    13px;
  --fs-tiny:    14px;
  --fs-small:   15px;
  --fs-base:    16px;
  --fs-emph:    17px;
  --fs-strong:  19px;
  --fs-display: 32px;
}

/* ---- HUD ---- */
.console-layout .hud-label { font-size: var(--fs-mini); }
.console-layout .hud-value { font-size: var(--fs-emph); }
.console-layout .hud-value.mono.small { font-size: var(--fs-small); }
.console-layout .align-btn .align-label,
.console-layout .beacon-label { font-size: var(--fs-mini); }

/* ---- Panel headers + tabs ---- */
.console-layout .panel-header > span:first-child,
.console-layout .panel-header > div:first-child,
.console-layout .ns-rib-title,
.console-layout .ns-burn-title { font-size: var(--fs-base); letter-spacing: 0.12em; }
.console-layout .tab-btn { font-size: var(--fs-small); }
.console-layout .panel-header-tools,
.console-layout .panel-header-tools span,
.console-layout .tabs-right,
.console-layout .tabs-right > span { font-size: var(--fs-small); }

/* ---- Toolbar buttons (Undo / Reset / Examples / Immersive) ---- */
.console-layout .tool-btn,
.console-layout .tool-btn span,
.console-layout .immersive-toggle,
.console-layout .immersive-toggle-label { font-size: var(--fs-small); }
.console-layout .tool-btn.small,
.console-layout .tool-btn.small span { font-size: var(--fs-tiny); }
.console-layout .probe-chip,
.console-layout .probe-chip-label,
.console-layout .open-since-chip,
.console-layout .osc-value { font-size: var(--fs-small); }

/* ---- Right-side Brief / Network / Export ---- */
.console-layout .brief-key { font-size: var(--fs-small); }
.console-layout .brief-val { font-size: var(--fs-base); }
.console-layout .brief-val.glow { font-size: var(--fs-emph); }
.console-layout .brief-row.narrow .brief-key,
.console-layout .brief-row.narrow .brief-val { font-size: var(--fs-small); }
.console-layout .brief-footnote,
.console-layout .net-explain,
.console-layout .net-link,
.console-layout .export-count-row { font-size: var(--fs-small); }
.console-layout .net-key { font-size: var(--fs-small); }
.console-layout .net-val { font-size: var(--fs-base); }

/* ---- Deduction dock ---- */
.console-layout .dock-title { font-size: var(--fs-base); letter-spacing: 0.12em; }
.console-layout .deduction-label,
.console-layout .deduction-verify,
.console-layout .deduction-verify span,
.console-layout #deduction-budget-readout,
.console-layout .jls-label,
.console-layout .json-lint-state { font-size: var(--fs-small); }
.console-layout .dark-input,
.console-layout #deduction-input { font-size: var(--fs-small); line-height: 1.55; }
.console-layout .spb-label { font-size: var(--fs-base); letter-spacing: 0.12em; }
.console-layout .spb-meta { font-size: var(--fs-mini); }

/* ---- Network strength ribbon ---- */
.console-layout .ns-rib-cell { font-size: var(--fs-small); }
.console-layout .ns-count { font-size: var(--fs-display); }
.console-layout .ns-caption,
.console-layout .ns-meta-line,
.console-layout .ns-spark-label,
.console-layout .ns-tag,
.console-layout .ns-delta { font-size: var(--fs-small); }
.console-layout .ns-burn-value { font-size: var(--fs-strong); }

/* ---- Bottom: telemetry / leaderboard / candidates / chips ---- */
.console-layout .log-stream,
.console-layout .log-stream > * { font-size: var(--fs-small); line-height: 1.55; }
.console-layout .leaderboard-table th,
.console-layout .leaderboard-table td { font-size: var(--fs-small); }
.console-layout .my-rank-chip,
.console-layout .my-rank-chip strong,
.console-layout .logs-collapse-btn,
.console-layout .logs-collapse-label { font-size: var(--fs-small); }

/* ---- Matrix hint line + sample readout ---- */
.console-layout .matrix-hint,
.console-layout .matrix-hint span,
.console-layout #sample-count-readout,
.console-layout #matrix-probe-mini { font-size: var(--fs-small); }

/* ---- Footer / floaters ---- */
.console-layout .me-teaser { font-size: var(--fs-small); }
.console-layout .float-btn { font-size: var(--fs-base); }

/* ---- Banners ---- */
.console-layout .banner,
.console-layout .banner span,
.console-layout .status-banner-line { font-size: var(--fs-small); }

/* ---- Generic .muted.small ---- */
.console-layout .muted.small,
.console-layout p.muted.small,
.console-layout span.muted.small { font-size: var(--fs-small); }

/* ---- Modals (overlays use console scale too) ---- */
body.console-theme .modal-panel { font-size: var(--fs-base, 14px); }
body.console-theme .modal-head > span { font-size: var(--fs-emph, 15px); }
body.console-theme .kbd-table td { font-size: var(--fs-small, 13px); }
body.console-theme .tutorial-list li { font-size: var(--fs-small, 13px); line-height: 1.65; }
body.console-theme .tutorial-foot { font-size: var(--fs-small, 13px); }
body.console-theme .settings-row label { font-size: var(--fs-small, 13px); }
body.console-theme .settings-row select,
body.console-theme .settings-row .dark-input { font-size: var(--fs-small, 13px); }
body.console-theme .payload-row { font-size: var(--fs-small, 13px); }
body.console-theme .payload-hash { font-size: var(--fs-small, 13px); }
body.console-theme .modal-warn-banner { font-size: var(--fs-small, 13px); line-height: 1.5; }
body.console-theme .modal-checkbox-row { font-size: var(--fs-small, 13px); }
body.console-theme .modal-foot .action-btn { font-size: var(--fs-small, 13px); }
body.console-theme .fseditor-textarea { font-size: var(--fs-base, 14px); line-height: 1.6; }
body.console-theme .fseditor-side h4 { font-size: var(--fs-base, 14px); }
body.console-theme .fseditor-side li { font-size: var(--fs-small, 13px); }
body.console-theme .fseditor-side p { font-size: var(--fs-mini, 11px); }

/* Action buttons inside modals/overlays — keep typography consistent. */
body.console-theme .action-btn { font-size: var(--fs-small, 13px); letter-spacing: 0.06em; }
body.console-theme .action-btn.small { font-size: var(--fs-tiny, 12px); }

/* Top-nav (outside .console-layout) — bump too so menu reads consistently. */
body.console-theme .home-nav .mega-nav a { font-size: 15px; }
body.console-theme .lang-trigger,
body.console-theme .lang-trigger .lang-current { font-size: 13px; }
body.console-theme .lang-menu li { font-size: 13px; }
body.console-theme .wallet-status-minimal { font-size: 13px; }
