/* Cindel Explorer — global styles, v3 (cypherpunk default + alts) */

/* ============ THEMES ============ */

/* Default: Cypher — black CRT, phosphor green, amber redacted */
:root, [data-theme="cypher"] {
  --bg-0: #050605;
  --bg-1: #0a0d0a;
  --bg-2: #10140f;
  --bg-3: #161b14;
  --border: #1c2a1a;
  --border-soft: #131a12;
  --border-strong: #2e4a28;

  --text: #c9ffd0;
  --text-dim: #7fbf86;
  --muted: #4d7b50;
  --muted-soft: #2f5532;

  --accent: #5cff7a;          /* phosphor green */
  --accent-bright: #9eff9a;
  --accent-dim: #2bcc4a;
  --accent-rgb: 92, 255, 122;

  --asset: #ffb84d;           /* CRT amber */
  --asset-dim: #cc8a1f;
  --asset-rgb: 255, 184, 77;

  --success: #5cff7a;
  --warn: #ffd060;
  --danger: #ff5050;
  --success-rgb: 92, 255, 122;
  --warn-rgb: 255, 208, 96;
  --danger-rgb: 255, 80, 80;

  --pill-default-bg: rgba(92, 255, 122, 0.05);
  --pill-default-border: rgba(92, 255, 122, 0.18);

  --logo-glow: 0 0 12px rgba(92, 255, 122, 0.6);
  --header-grad: linear-gradient(180deg, #080a08 0%, var(--bg-0) 100%);

  --hero-num-color: var(--accent);

  --crt-glow: 0 0 6px rgba(var(--accent-rgb), 0.35);
  --r-cypher: 0px;
}

/* Paper — editorial light, oxblood accent, deep navy for assets */
[data-theme="paper"] {
  --bg-0: #ece5d2;
  --bg-1: #f4eedc;
  --bg-2: #e6dfca;
  --bg-3: #d8d0b6;
  --border: #c9c0a3;
  --border-soft: #ddd4b7;
  --border-strong: #a89e7d;

  --text: #181410;
  --text-dim: #3a342a;
  --muted: #7c7361;
  --muted-soft: #a39a83;

  --accent: #9c2a2a;          /* oxblood */
  --accent-bright: #b8383b;
  --accent-dim: #6b1a1a;
  --accent-rgb: 156, 42, 42;

  --asset: #294467;           /* deep navy */
  --asset-dim: #1b2f4a;
  --asset-rgb: 41, 68, 103;

  --success: #2d6f3a;
  --warn: #9a6c10;
  --danger: #9c2a2a;
  --success-rgb: 45, 111, 58;
  --warn-rgb: 154, 108, 16;
  --danger-rgb: 156, 42, 42;

  --pill-default-bg: rgba(0, 0, 0, 0.045);
  --pill-default-border: rgba(0, 0, 0, 0.10);

  --logo-glow: 0 0 0 rgba(0,0,0,0);
  --header-grad: linear-gradient(180deg, #f7f1df 0%, var(--bg-0) 100%);

  --hero-num-color: var(--accent);
}

/* Violet Noir — deep eggplant, electric lilac accent, mint asset */
[data-theme="violet"] {
  --bg-0: #0d0a14;
  --bg-1: #14101e;
  --bg-2: #1c1729;
  --bg-3: #251e36;
  --border: #2b2240;
  --border-soft: #1d172e;
  --border-strong: #3d3258;

  --text: #ece6f5;
  --text-dim: #b9aed4;
  --muted: #7a6e95;
  --muted-soft: #564b6c;

  --accent: #c490ff;          /* electric lilac */
  --accent-bright: #dbb3ff;
  --accent-dim: #8a5fcc;
  --accent-rgb: 196, 144, 255;

  --asset: #7fe7d0;           /* mint */
  --asset-dim: #4eb59e;
  --asset-rgb: 127, 231, 208;

  --success: #7fe7a8;
  --warn: #f5cf6b;
  --danger: #ff8c92;
  --success-rgb: 127, 231, 168;
  --warn-rgb: 245, 207, 107;
  --danger-rgb: 255, 140, 146;

  --pill-default-bg: rgba(255, 255, 255, 0.04);
  --pill-default-border: rgba(255, 255, 255, 0.07);

  --logo-glow: 0 0 18px rgba(196, 144, 255, 0.45);
  --header-grad: linear-gradient(180deg, #161020 0%, var(--bg-0) 100%);

  --hero-num-color: var(--accent);
}

/* Phosphor — cool slate, chartreuse accent, hot magenta asset */
[data-theme="phosphor"] {
  --bg-0: #0a0d10;
  --bg-1: #10141a;
  --bg-2: #161b23;
  --bg-3: #1e252f;
  --border: #232b36;
  --border-soft: #181d25;
  --border-strong: #36404e;

  --text: #e2e9ed;
  --text-dim: #95a3ad;
  --muted: #5e6a78;
  --muted-soft: #424a55;

  --accent: #b6e84d;          /* chartreuse */
  --accent-bright: #d3f17b;
  --accent-dim: #7da028;
  --accent-rgb: 182, 232, 77;

  --asset: #ff79c6;           /* hot magenta */
  --asset-dim: #c44a8e;
  --asset-rgb: 255, 121, 198;

  --success: #6ce0a0;
  --warn: #ffd166;
  --danger: #ff7676;
  --success-rgb: 108, 224, 160;
  --warn-rgb: 255, 209, 102;
  --danger-rgb: 255, 118, 118;

  --pill-default-bg: rgba(255, 255, 255, 0.035);
  --pill-default-border: rgba(255, 255, 255, 0.07);

  --logo-glow: 0 0 16px rgba(182, 232, 77, 0.35);
  --header-grad: linear-gradient(180deg, #12161d 0%, var(--bg-0) 100%);

  --hero-num-color: var(--accent);
}

/* ============ shared derived tokens ============ */
:root, [data-theme="paper"], [data-theme="violet"], [data-theme="phosphor"] {
  --accent-soft: rgba(var(--accent-rgb), 0.08);
  --accent-glow: rgba(var(--accent-rgb), 0.18);
  --asset-soft: rgba(var(--asset-rgb), 0.10);

  /* legacy aliases so older inline styles still work */
  --ember: var(--accent);
  --ember-bright: var(--accent-bright);
  --ember-dim: var(--accent-dim);
  --ember-soft: var(--accent-soft);
  --ember-glow: var(--accent-glow);
  --steel: var(--asset);
  --steel-dim: var(--asset-dim);
  --steel-soft: var(--asset-soft);

  --hatch: repeating-linear-gradient(
    -45deg,
    rgba(var(--accent-rgb), 0.10) 0px,
    rgba(var(--accent-rgb), 0.10) 4px,
    transparent 4px,
    transparent 9px
  );
  --hatch-asset: repeating-linear-gradient(
    -45deg,
    rgba(var(--asset-rgb), 0.14) 0px,
    rgba(var(--asset-rgb), 0.14) 4px,
    transparent 4px,
    transparent 9px
  );

  --r-sm: 4px;
  --r: 6px;
  --r-lg: 10px;
}

/* ============ base ============ */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg-0); color: var(--text); }
body {
  font-family: "Inter Tight", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-bright); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; text-decoration-color: rgba(var(--accent-rgb), 0.4); }

button { font-family: inherit; cursor: pointer; }
input, button { font-family: inherit; color: inherit; }

.mono { font-family: "JetBrains Mono", ui-monospace, monospace; font-feature-settings: "ss01", "ss02"; }
.serif { font-family: "Instrument Serif", "Iowan Old Style", Georgia, serif; font-style: italic; }

.muted { color: var(--muted); }
.dim { color: var(--text-dim); }

/* legacy class names kept for compatibility with existing JS */
.ember { color: var(--accent); }
.steel { color: var(--asset); }

/* ============ Layout ============ */
.app { min-height: 100vh; display: flex; flex-direction: column; }

.header {
  border-bottom: 1px solid var(--border);
  background: var(--header-grad);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(8px);
}
.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 14px 28px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 28px;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.02em;
  color: var(--text);
}
.logo-mark {
  width: 22px;
  height: 22px;
  position: relative;
}
.logo-mark::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  box-shadow: var(--logo-glow);
}
.logo-mark::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.logo-sub {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-left: 4px;
  border-left: 1px solid var(--border);
  padding-left: 10px;
}

.search {
  position: relative;
  width: 100%;
  max-width: 640px;
  justify-self: center;
}
.search input {
  width: 100%;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--text);
  padding: 9px 14px 9px 38px;
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  font-family: "JetBrains Mono", monospace;
}
.search input::placeholder { color: var(--muted-soft); }
.search input:focus { border-color: var(--accent-dim); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.search-kbd {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: var(--muted);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 2px 6px;
}

.nav {
  display: flex;
  gap: 4px;
  align-items: center;
}
.nav a {
  color: var(--text-dim);
  font-size: 13px;
  padding: 6px 10px;
  border-radius: var(--r);
}
.nav a:hover { color: var(--text); background: var(--bg-2); text-decoration: none; }
.nav a.active { color: var(--accent); background: var(--accent-soft); }

.net-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-dim);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px 4px 8px;
  font-family: "JetBrains Mono", monospace;
}
.net-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 6px var(--success);
}

/* Theme switcher */
.theme-switch {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.theme-swatch {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid transparent;
  padding: 0;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
}
.theme-swatch:hover { transform: scale(1.12); }
.theme-swatch.active { border-color: var(--text); }
.theme-swatch.paper { background: linear-gradient(135deg, #ece5d2 50%, #9c2a2a 50%); }
.theme-swatch.violet { background: linear-gradient(135deg, #14101e 50%, #c490ff 50%); }
.theme-swatch.phosphor { background: linear-gradient(135deg, #10141a 50%, #b6e84d 50%); }

.main {
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px;
  width: 100%;
  flex: 1;
}

.footer {
  border-top: 1px solid var(--border);
  padding: 22px 28px;
  margin-top: 60px;
  color: var(--muted);
  font-size: 12px;
}
.footer-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* ============ Generic ============ */
.panel {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.panel-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  font-weight: 500;
  margin: 0;
}
.panel-body { padding: 16px 18px; }
.panel-body.flush { padding: 0; }

.pagehead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}
.pagehead h1 {
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.pagehead .crumb {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 8px;
}
.pagehead .sub { color: var(--muted); font-size: 13px; }

/* ============ Stats ============ */
.stat-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.stat {
  padding: 18px 20px;
  border-right: 1px solid var(--border-soft);
  position: relative;
}
.stat:last-child { border-right: none; }
.stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.stat-value {
  font-size: 30px;
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.stat-value .serif {
  font-size: 38px;
  line-height: 1;
  color: var(--hero-num-color);
}
.stat-sub {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 6px;
  font-family: "JetBrains Mono", monospace;
}
.stat-sub .up { color: var(--success); }
.stat-sub .down { color: var(--danger); }

/* ============ Tables ============ */
.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.tbl th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 500;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-1);
}
.tbl td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: middle;
}
.tbl tr:last-child td { border-bottom: none; }
.tbl tr.row-link:hover { background: var(--bg-2); cursor: pointer; }
.tbl td.mono { font-family: "JetBrains Mono", monospace; }
.tbl td.num { text-align: right; font-variant-numeric: tabular-nums; font-family: "JetBrains Mono", monospace; }
.tbl th.num { text-align: right; }
.tbl td.tight { white-space: nowrap; }

/* ============ Hash chip ============ */
.hash {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.hash a { color: var(--accent); }
.hash .copy {
  opacity: 0;
  color: var(--muted);
  cursor: pointer;
  transition: opacity 0.15s;
  background: none;
  border: none;
  padding: 0;
  display: inline-flex;
}
.hash:hover .copy { opacity: 1; }
.hash .copy:hover { color: var(--accent); }

/* ============ Pills ============ */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-family: "JetBrains Mono", monospace;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--pill-default-border);
  background: var(--pill-default-bg);
  color: var(--text-dim);
  letter-spacing: 0.02em;
}
.pill.ember { color: var(--accent); border-color: rgba(var(--accent-rgb), 0.32); background: var(--accent-soft); }
.pill.steel { color: var(--asset); border-color: rgba(var(--asset-rgb), 0.32); background: var(--asset-soft); }
.pill.ok     { color: var(--success); border-color: rgba(var(--success-rgb), 0.32); background: rgba(var(--success-rgb), 0.10); }
.pill.warn   { color: var(--warn);    border-color: rgba(var(--warn-rgb), 0.32);    background: rgba(var(--warn-rgb), 0.10); }
.pill.danger { color: var(--danger);  border-color: rgba(var(--danger-rgb), 0.32);  background: rgba(var(--danger-rgb), 0.10); }
.pill.priv {
  color: var(--accent);
  border-color: rgba(var(--accent-rgb), 0.32);
  background-color: var(--accent-soft);
  background-image: var(--hatch);
}
.pill.dot::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

/* ============ Redacted ============ */
.redacted {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  background: var(--bg-2);
  background-image: var(--hatch);
  border: 1px dashed rgba(var(--accent-rgb), 0.45);
  border-radius: var(--r-sm);
  padding: 2px 8px;
  color: var(--accent);
  letter-spacing: 0.04em;
}
.redacted.steel {
  color: var(--asset);
  border-color: rgba(var(--asset-rgb), 0.45);
  background-image: var(--hatch-asset);
}
.redacted .lock { display: inline-block; width: 10px; height: 10px; }

.commit-bar {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--bg-2);
  border-radius: 3px;
  padding: 3px 5px;
  border: 1px solid var(--border);
}
.commit-bar span {
  display: inline-block;
  width: 4px;
  height: 12px;
  background: linear-gradient(180deg, var(--accent-dim), var(--accent));
  opacity: 0.9;
  border-radius: 1px;
}

/* ============ KV ============ */
.kv {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 0;
}
.kv > div {
  padding: 13px 18px;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  min-height: 48px;
}
.kv > div:nth-child(2n+1) {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
}
.kv > div:nth-child(2n) { font-family: "JetBrains Mono", monospace; font-size: 13px; }
.kv > div:nth-last-child(-n+2) { border-bottom: none; }

/* ============ Ring viz ============ */
.ring-viz {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px;
  position: relative;
}
.ring-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 6px 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  border-bottom: 1px dashed var(--border-soft);
}
.ring-row:last-child { border-bottom: none; }
.ring-row .idx {
  color: var(--muted);
  font-size: 10px;
  text-align: right;
}
.ring-row.signer { background: linear-gradient(90deg, var(--accent-soft), transparent 50%); margin: 0 -16px; padding: 6px 16px; }
.ring-row .stealth { color: var(--text-dim); }
.ring-row .question { color: var(--accent); font-weight: 600; }

/* ============ Tabs ============ */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}
.tabs button {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 16px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: -1px;
}
.tabs button:hover { color: var(--text-dim); }
.tabs button.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ============ Code block ============ */
pre.code {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 14px 16px;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-dim);
  overflow-x: auto;
  margin: 0;
}
pre.code .k { color: var(--accent); }
pre.code .s { color: var(--success); }
pre.code .c { color: var(--muted); }
pre.code .n { color: var(--asset); }

/* ============ Grids ============ */
.grid-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; }
.grid-2-eq { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.row { display: flex; gap: 10px; align-items: center; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.gap-s { gap: 6px; }
.gap-l { gap: 18px; }

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
  padding: 7px 14px;
  border-radius: var(--r);
  transition: all 0.15s;
}
.btn:hover { background: var(--bg-3); border-color: var(--border-strong); }
.btn.primary {
  background: var(--accent);
  border-color: var(--accent-dim);
  color: var(--bg-0);
  font-weight: 600;
}
[data-theme="paper"] .btn.primary { color: #fbf6e6; }
[data-theme="violet"] .btn.primary { color: #14101e; }
[data-theme="phosphor"] .btn.primary { color: #0a0d10; }
.btn.primary:hover { background: var(--accent-bright); filter: brightness(1.02); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 4px 10px; font-size: 12px; }

/* ============ Input ============ */
.input {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 9px 12px;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: var(--text);
  outline: none;
  width: 100%;
}
.input:focus { border-color: var(--accent-dim); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ============ Asset glyph ============ */
.asset-g {
  width: 28px;
  height: 28px;
  border-radius: var(--r-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

/* ============ Live ticker ============ */
.ticker {
  display: flex;
  gap: 8px;
  overflow: hidden;
  align-items: center;
  padding: 12px 18px;
  background: var(--bg-1);
  border-bottom: 1px solid var(--border);
}
.ticker-block {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 6px 10px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--text-dim);
  white-space: nowrap;
  animation: tickerIn 0.5s ease-out;
  text-decoration: none;
}
.ticker-block:hover { text-decoration: none; }
.ticker-block.new {
  border-color: rgba(var(--accent-rgb), 0.5);
  background: var(--accent-soft);
  color: var(--accent);
}
@keyframes tickerIn {
  from { transform: translateX(-20px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ============ Fee histogram ============ */
.fee-hist {
  display: flex;
  align-items: flex-end;
  height: 80px;
  gap: 2px;
  padding: 12px 0 0;
}
.fee-bar {
  flex: 1;
  background: linear-gradient(180deg, var(--accent), var(--accent-dim));
  opacity: 0.85;
  border-radius: 1px 1px 0 0;
  min-height: 2px;
}
.fee-bar.dim { background: var(--border-strong); opacity: 0.6; }

/* ============ misc ============ */
.divider { height: 1px; background: var(--border); margin: 16px 0; }
.tag-mini { font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

::selection { background: var(--accent-glow); color: var(--text); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-0); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 5px; border: 2px solid var(--bg-0); }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ============ CYPHER overrides ============ */

[data-theme="cypher"] body {
  font-family: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  font-feature-settings: "ss01", "ss02";
  font-size: 13px;
  line-height: 1.55;
  background: var(--bg-0);
  background-image:
    repeating-linear-gradient(
      0deg,
      rgba(92, 255, 122, 0.04) 0px,
      rgba(92, 255, 122, 0.04) 1px,
      transparent 1px,
      transparent 3px
    ),
    radial-gradient(
      ellipse at center,
      transparent 50%,
      rgba(0, 0, 0, 0.55) 100%
    );
  background-attachment: fixed;
  text-shadow: 0 0 6px rgba(92, 255, 122, 0.18);
}

/* Subtle horizontal scanline that drifts down */
[data-theme="cypher"] body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, rgba(92, 255, 122, 0.06) 50%, transparent 100%);
  height: 80px;
  animation: cypherScan 7s linear infinite;
  z-index: 9999;
  mix-blend-mode: screen;
}
@keyframes cypherScan {
  0% { transform: translateY(-100px); }
  100% { transform: translateY(100vh); }
}

/* Square everything */
[data-theme="cypher"] .panel,
[data-theme="cypher"] .stat-row,
[data-theme="cypher"] .ring-viz,
[data-theme="cypher"] .commit-bar,
[data-theme="cypher"] .btn,
[data-theme="cypher"] .input,
[data-theme="cypher"] .search input,
[data-theme="cypher"] .asset-g,
[data-theme="cypher"] .ticker-block,
[data-theme="cypher"] .redacted,
[data-theme="cypher"] pre.code,
[data-theme="cypher"] .nav a {
  border-radius: 0 !important;
}

/* Pills stay slightly pill-ish — but bracket-style instead */
[data-theme="cypher"] .pill {
  border-radius: 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 6px;
  position: relative;
}
[data-theme="cypher"] .pill::before { content: "["; margin-right: 1px; opacity: 0.55; }
[data-theme="cypher"] .pill::after  { content: "]"; margin-left: 1px; opacity: 0.55; }
[data-theme="cypher"] .pill.dot::before { content: "[" !important; width: auto; height: auto; background: none; border-radius: 0; }

[data-theme="cypher"] .net-pill {
  border-radius: 0;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Theme switch keeps round swatches but loses pill */
[data-theme="cypher"] .theme-switch { border-radius: 0; }

/* All headers/text are mono */
[data-theme="cypher"] h1,
[data-theme="cypher"] h2,
[data-theme="cypher"] h3,
[data-theme="cypher"] .panel-title,
[data-theme="cypher"] .pagehead h1,
[data-theme="cypher"] .stat-label,
[data-theme="cypher"] .stat-value,
[data-theme="cypher"] .crumb,
[data-theme="cypher"] .nav a,
[data-theme="cypher"] .search input {
  font-family: "JetBrains Mono", monospace !important;
}

[data-theme="cypher"] .pagehead h1 {
  font-size: 18px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
[data-theme="cypher"] .pagehead h1::before { content: "> "; color: var(--accent); }

/* Kill the serif in cypher (replaced by mono) */
[data-theme="cypher"] .serif {
  font-family: "JetBrains Mono", monospace !important;
  font-style: normal !important;
  font-weight: 600 !important;
}

[data-theme="cypher"] .stat-value .serif {
  color: var(--accent);
  text-shadow: var(--crt-glow);
  font-size: 30px;
  letter-spacing: -0.01em;
}

[data-theme="cypher"] .stat-label {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
}
[data-theme="cypher"] .stat-label::before { content: "// "; color: var(--muted-soft); }

[data-theme="cypher"] .panel-title {
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.16em;
}
[data-theme="cypher"] .panel-title::before { content: "── "; color: var(--border-strong); }
[data-theme="cypher"] .panel-title::after  { content: " ──────────────────────────"; color: var(--border-strong); opacity: 0.7; }

/* Logo: ASCII / brackets */
[data-theme="cypher"] .logo-mark {
  width: 18px;
  height: 18px;
}
[data-theme="cypher"] .logo-mark::before {
  content: "";
  inset: 1px;
  border: 1px solid var(--accent);
  border-radius: 0;
  box-shadow: var(--logo-glow);
}
[data-theme="cypher"] .logo-mark::after {
  inset: 4px;
  background: var(--accent);
  border-radius: 0;
  box-shadow: 0 0 8px var(--accent);
}
[data-theme="cypher"] .logo {
  font-family: "JetBrains Mono", monospace;
  letter-spacing: 0.05em;
  text-transform: lowercase;
}
[data-theme="cypher"] .logo-sub {
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--accent);
  border-left-color: var(--border-strong);
  text-shadow: var(--crt-glow);
}

/* Tables get tighter, monolithic */
[data-theme="cypher"] .tbl th {
  font-size: 10px;
  color: var(--muted);
  background: var(--bg-0);
  border-bottom: 1px solid var(--border-strong);
  padding: 9px 14px;
}
[data-theme="cypher"] .tbl td {
  padding: 9px 14px;
  font-size: 12px;
  font-family: "JetBrains Mono", monospace;
  border-bottom: 1px solid var(--border-soft);
}
[data-theme="cypher"] .tbl tr.row-link:hover { background: rgba(92, 255, 122, 0.04); }

/* Accent text glows */
[data-theme="cypher"] .ember,
[data-theme="cypher"] a {
  text-shadow: var(--crt-glow);
}
[data-theme="cypher"] .steel {
  text-shadow: 0 0 6px rgba(var(--asset-rgb), 0.35);
}

/* Hero numbers in stat-row also glow */
[data-theme="cypher"] .stat-value { color: var(--text); }

/* Buttons squarer + caps */
[data-theme="cypher"] .btn {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  font-family: "JetBrains Mono", monospace;
  border-radius: 0;
}
[data-theme="cypher"] .btn.primary {
  background: var(--accent);
  color: var(--bg-0);
  border-color: var(--accent);
  text-shadow: none;
  box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.5);
}

/* Search input prompt */
[data-theme="cypher"] .search { max-width: 720px; }
[data-theme="cypher"] .search input {
  border-radius: 0;
  background: var(--bg-1);
  border-color: var(--border-strong);
  font-size: 12px;
  padding-left: 30px;
  color: var(--accent);
}
[data-theme="cypher"] .search::before {
  content: "$";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  text-shadow: var(--crt-glow);
  z-index: 2;
}
[data-theme="cypher"] .search-icon { display: none; }
[data-theme="cypher"] .search-kbd { border-radius: 0; }

/* Nav uppercase */
[data-theme="cypher"] .nav a {
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.08em;
}
[data-theme="cypher"] .nav a.active { background: rgba(92, 255, 122, 0.08); text-shadow: var(--crt-glow); }

/* Ring viz looks like a dump */
[data-theme="cypher"] .ring-viz { background: var(--bg-0); }
[data-theme="cypher"] .ring-row.signer { background: linear-gradient(90deg, rgba(255,184,77,0.18), transparent 70%); }
[data-theme="cypher"] .ring-row .question { color: var(--asset); text-shadow: 0 0 6px rgba(var(--asset-rgb), 0.45); }

/* KV pads tighter */
[data-theme="cypher"] .kv > div { min-height: 40px; padding: 10px 16px; font-size: 12px; }
[data-theme="cypher"] .kv > div:nth-child(2n+1) { font-size: 10px; }

/* Crumb has a leader */
[data-theme="cypher"] .crumb { font-size: 10px; }
[data-theme="cypher"] .crumb::before { content: "/// "; opacity: 0.6; }

/* Cursor blink helper */
[data-theme="cypher"] .blink::after {
  content: "▌";
  color: var(--accent);
  animation: blink 1.05s steps(2) infinite;
  margin-left: 2px;
}
@keyframes blink { 50% { opacity: 0; } }

/* Theme swatch color for cypher */
.theme-swatch.cypher { background: linear-gradient(135deg, #050605 50%, #5cff7a 50%); }

/* Selection in cypher */
[data-theme="cypher"] ::selection { background: rgba(92,255,122,0.35); color: #fff; text-shadow: none; }

/* Footer */
[data-theme="cypher"] .footer { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; }
