/* ============================================================
   MINDSCAN — Mind Chain explorer stylesheet
   Matches the Mind Chain brand site: near-black cosmic canvas,
   thin display type, violet/cyan/purple accents, hairline pills.
   Offline-safe: no external resources, system-ui/Inter local
   stack only. Self-contained so explorer/ deploys standalone.
   ============================================================ */

:root {
  --bg: #03040a;
  --ink: #eef0ff;
  --muted: rgba(238, 240, 255, 0.72);
  --dim: rgba(238, 240, 255, 0.42);
  --faint: rgba(238, 240, 255, 0.16);
  --hairline: rgba(238, 240, 255, 0.18);
  --fill: rgba(238, 240, 255, 0.03);
  --fill-hover: rgba(238, 240, 255, 0.06);

  /* brand accents */
  --c1: #6d5bff;               /* violet  — exec / final-ish   */
  --c2: #37c8ff;               /* cyan    — live / info        */
  --c3: #b44dff;               /* purple  — cognition          */
  /* readable text tints of the accents (small text on #03040a) */
  --c1t: #a89cff;
  --c2t: #5bd2ff;
  --c3t: #d18fff;
  --warn: #eec07a;             /* functional caution (pending, challenge) */
  --bad: #ff7a8c;              /* terminal-bad / reverted ONLY */

  --c1-soft: rgba(109, 91, 255, 0.12);
  --c2-soft: rgba(55, 200, 255, 0.10);
  --c3-soft: rgba(180, 77, 255, 0.11);
  --warn-soft: rgba(238, 192, 122, 0.10);
  --bad-soft: rgba(255, 122, 140, 0.10);
  --c1-line: rgba(109, 91, 255, 0.45);
  --c2-line: rgba(55, 200, 255, 0.40);
  --c3-line: rgba(180, 77, 255, 0.42);
  --warn-line: rgba(238, 192, 122, 0.38);
  --bad-line: rgba(255, 122, 140, 0.42);

  --grad: linear-gradient(92deg, var(--c1) 0%, var(--c2) 100%);
  --grad-b: linear-gradient(92deg, var(--c2) 0%, var(--c3) 100%);

  --sans: "Inter", "SF Pro Text", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --radius: 20px;
  --radius-lg: 28px;
  --pill: 100px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; background: var(--bg); }

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

body {
  background: transparent; /* canvas color lives on html so the starfield can sit behind content */
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---- starfield / nebula (pure CSS, behind everything) ---- */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
/* nebula washes */
body::before {
  background:
    radial-gradient(1100px 620px at 82% -12%, rgba(109, 91, 255, 0.10), transparent 62%),
    radial-gradient(950px 700px at 8% 108%, rgba(55, 200, 255, 0.07), transparent 60%),
    radial-gradient(760px 520px at 55% 46%, rgba(180, 77, 255, 0.045), transparent 65%);
}
/* sparse star dots — tiled radial gradients, slow vertical drift */
body::after {
  inset: -140px 0 0 0;
  background-image:
    radial-gradient(1px 1px at 22px 34px, rgba(238, 240, 255, 0.50), transparent),
    radial-gradient(1px 1px at 178px 122px, rgba(238, 240, 255, 0.28), transparent),
    radial-gradient(1.4px 1.4px at 316px 224px, rgba(168, 156, 255, 0.38), transparent),
    radial-gradient(1px 1px at 108px 284px, rgba(238, 240, 255, 0.20), transparent),
    radial-gradient(1.6px 1.6px at 258px 62px, rgba(91, 210, 255, 0.30), transparent),
    radial-gradient(1px 1px at 62px 186px, rgba(238, 240, 255, 0.34), transparent),
    radial-gradient(1.2px 1.2px at 342px 342px, rgba(209, 143, 255, 0.26), transparent),
    radial-gradient(1px 1px at 214px 306px, rgba(238, 240, 255, 0.18), transparent);
  background-size: 389px 389px, 353px 353px, 431px 431px, 307px 307px, 467px 467px, 269px 269px, 397px 397px, 373px 373px;
  background-repeat: repeat;
  opacity: 0.8;
  animation: star-drift 240s linear infinite alternate;
}
@keyframes star-drift {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(0, 140px, 0); }
}
@media (prefers-reduced-motion: reduce) {
  body::after { animation: none; inset: 0; }
}

::selection { background: rgba(109, 91, 255, 0.45); color: #fff; }

a { color: var(--ink); text-decoration-color: var(--faint); }
a:hover { color: var(--c2t); text-decoration-color: var(--c2-line); }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.dim { color: var(--dim); }

/* accessibility: visible focus everywhere */
:focus-visible {
  outline: 2px solid rgba(55, 200, 255, 0.85);
  outline-offset: 2px;
  border-radius: 4px;
}
a:focus-visible, button:focus-visible, .chip:focus-visible, .btn:focus-visible {
  border-radius: var(--pill);
}

/* gradient key word — falls back to cyan when background-clip:text is unsupported */
.grad { color: var(--c2t); }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .grad {
    background: var(--grad-b);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}

.skip-link {
  position: absolute;
  left: -200vw;
  top: 0;
  background: var(--c1);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 100;
  border-radius: 0 0 10px 0;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

.wrap { width: min(1180px, 100% - 2.4rem); margin-inline: auto; }

/* ---- eyebrow → micro-kicker ---- */
.eyebrow {
  display: inline-block;
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--dim);
}

/* ---- header ---- */
.nav-shell {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(3, 4, 10, 0.72);
  border-bottom: 1px solid var(--faint);
}
.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-block: 0.8rem;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.7rem;
  text-decoration: none;
  flex: none;
}
.brand:hover { color: var(--ink); }
.wm {
  font-size: 1rem;
  letter-spacing: 0.2em;
  line-height: 1;
  white-space: nowrap;
}
.wm-mind {
  font-weight: 700;
  color: var(--c2t);
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .wm-mind {
    background: linear-gradient(92deg, #9184ff 0%, #37c8ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}
.wm-rest {
  font-weight: 200;
  color: var(--ink);
}
.brand .brand-tag {
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--dim);
  white-space: nowrap;
}
.nav-links {
  display: flex;
  gap: 0.15rem;
  list-style: none;
  margin-right: auto;
}
.nav-links a {
  display: block;
  text-decoration: none;
  color: var(--dim);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 0.42rem 0.85rem;
  border-radius: var(--pill);
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
  white-space: nowrap;
}
.nav-links a:hover { color: var(--ink); background: var(--fill-hover); }
.nav-links a[aria-current="page"] { color: var(--ink); background: var(--fill-hover); }

.mode-pill {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.36em 0.9em;
  border-radius: var(--pill);
  border: 1px solid var(--hairline);
  color: var(--muted);
  background: var(--fill);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  flex: none;
}
.mode-pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--c1t); }
.mode-pill.live { border-color: var(--c2-line); color: var(--c2t); background: var(--c2-soft); }
.mode-pill.live::before { background: var(--c2); }

/* honesty banner for the fixture-mode devnet deploy */
.devnet-badge {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.36em 0.9em;
  border-radius: var(--pill);
  border: 1px solid var(--warn-line);
  color: var(--warn);
  background: var(--warn-soft);
  white-space: nowrap;
  flex: none;
}

/* ---- search ---- */
.search-form {
  flex: 1 1 260px;
  min-width: 200px;
  display: flex;
  position: relative;
}
.search-form input {
  width: 100%;
  background: var(--fill);
  border: 1px solid var(--hairline);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.8rem;
  border-radius: var(--pill);
  padding: 0.52rem 5.4rem 0.52rem 2.3rem;
  outline: none;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}
.search-form input::placeholder { color: var(--dim); font-family: var(--sans); }
.search-form input:focus {
  border-color: var(--c2-line);
  background: rgba(238, 240, 255, 0.05);
  box-shadow: 0 0 0 3px rgba(55, 200, 255, 0.14);
}
.search-form .search-glyph {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--dim);
  pointer-events: none;
  display: flex;
}
.search-form button {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  cursor: pointer;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #fff;
  background: var(--grad);
  border-radius: var(--pill);
  padding: 0.42em 1.05em;
  box-shadow: 0 0 16px rgba(109, 91, 255, 0.35), 0 0 4px rgba(55, 200, 255, 0.25);
  transition: filter 0.2s var(--ease), transform 0.1s var(--ease), box-shadow 0.2s var(--ease);
}
.search-form button:hover { filter: brightness(1.12); box-shadow: 0 0 22px rgba(109, 91, 255, 0.5), 0 0 6px rgba(55, 200, 255, 0.35); }
.search-form button:active { transform: translateY(-50%) scale(0.96); }

/* ---- main / page chrome ---- */
main { flex: 1; padding-block: clamp(1.8rem, 4.5vw, 3.4rem) clamp(3rem, 7vw, 5rem); }

.page-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.6rem;
}
.page-head h1 {
  font-size: clamp(1.8rem, 4.2vw, 2.7rem);
  font-weight: 200;
  letter-spacing: -0.02em;
  line-height: 1.12;
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  flex-wrap: wrap;
}
.page-head h1 .id-frag { font-family: var(--mono); font-size: 0.56em; color: var(--muted); font-weight: 400; }
.page-head .eyebrow { margin-bottom: 0.6rem; }

.crumbs {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--dim);
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.55em;
  flex-wrap: wrap;
}
.crumbs a { color: var(--dim); text-decoration: none; }
.crumbs a:hover { color: var(--c2t); text-decoration: underline; text-underline-offset: 3px; }
.crumbs .sep { opacity: 0.5; }

/* ---- panels ---- */
.panel {
  border: 1px solid var(--faint);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(238, 240, 255, 0.035), rgba(238, 240, 255, 0.015));
  overflow: hidden;
}
.panel + .panel, .panel + .panel-gap, .grid-2 + .panel { margin-top: 1.1rem; }
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid var(--faint);
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--dim);
  flex-wrap: wrap;
}
.panel-head .head-actions { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; letter-spacing: normal; }
.panel-body { padding: 1.05rem 1.15rem 1.15rem; }
.panel-body.flush { padding: 0; }

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 1.1rem;
  align-items: start;
  margin-top: 1.1rem;
}
@media (max-width: 900px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }

/* ---- stat strip: huge thin numerals, micro-captions ---- */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-block: 1px solid var(--faint);
  margin-bottom: 1.6rem;
}
.stat { padding: 1.3rem 1.2rem 1.2rem; border-left: 1px solid var(--faint); min-width: 0; }
.stat:first-child { border-left: none; }
.stat .n {
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  font-weight: 200;
  letter-spacing: -0.01em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stat .n .accent { color: var(--c2t); }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .stat .n .accent {
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}
.stat .l {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--dim);
  margin-top: 0.55rem;
}
.stat .sub { font-family: var(--mono); font-size: 0.66rem; color: var(--dim); margin-top: 0.3rem; }
.stat .sub.good { color: var(--c2t); }
@media (max-width: 760px) { .stat-strip { grid-template-columns: repeat(2, 1fr); } .stat:nth-child(3) { border-left: none; } }

/* ---- key/value rows ---- */
.kv-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.2rem;
  padding: 0.52rem 0;
  border-bottom: 1px solid rgba(238, 240, 255, 0.07);
  font-size: 0.85rem;
}
.kv-row:last-child { border-bottom: none; }
.kv-row .k { color: var(--dim); font-size: 0.62rem; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase; flex: none; padding-top: 0.1em; }
.kv-row .v { text-align: right; min-width: 0; overflow-wrap: anywhere; font-family: var(--mono); font-size: 0.82rem; color: var(--ink); }
.kv-row .v.plain { font-family: var(--sans); font-size: 0.88rem; }

/* ---- hash pieces ---- */
a.hash, a.slot-link {
  font-family: var(--mono);
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px dotted var(--faint);
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease);
}
a.hash:hover, a.slot-link:hover { color: var(--c2t); border-bottom: 1px solid var(--c2-line); }
.hash-full {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  min-width: 0;
  max-width: 100%;
}
.hash-full code {
  font-family: var(--mono);
  overflow-wrap: anywhere;
  word-break: break-all;
  font-size: 0.82em;
}
.copy-btn {
  border: 1px solid var(--hairline);
  background: var(--fill);
  color: var(--dim);
  border-radius: var(--pill);
  font-size: 0.56rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.24em 0.7em;
  cursor: pointer;
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease);
  flex: none;
}
.copy-btn:hover { color: var(--c2t); border-color: var(--c2-line); }
.copy-btn.done { color: var(--c2t); border-color: var(--c2-line); background: var(--c2-soft); }

/* ---- badges: hairline pill chips, accent-tinted per state ----
   violet = exec / final-ish   cyan = live / info
   purple = cognition          red  = terminal-bad / reverted only */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.3em 0.8em;
  border-radius: var(--pill);
  border: 1px solid var(--hairline);
  color: var(--muted);
  background: var(--fill);
  white-space: nowrap;
}
.badge::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: 0.9; }
.badge.b-cool  { color: var(--c1t); border-color: var(--c1-line); background: var(--c1-soft); }   /* violet */
.badge.b-good  { color: var(--c2t); border-color: var(--c2-line); background: var(--c2-soft); }   /* cyan   */
.badge.b-gold  { color: var(--c3t); border-color: var(--c3-line); background: var(--c3-soft); }   /* purple */
.badge.b-warn  { color: var(--warn); border-color: var(--warn-line); background: var(--warn-soft); }
.badge.b-bad   { color: var(--bad); border-color: var(--bad-line); background: var(--bad-soft); }
.badge.b-plain { color: var(--muted); }

/* ---- tables: hairline borders, ink primary / dim secondary ---- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}
table.data th {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--dim);
  text-align: left;
  padding: 0.7rem 1.15rem;
  border-bottom: 1px solid var(--faint);
  white-space: nowrap;
}
table.data td {
  padding: 0.64rem 1.15rem;
  border-bottom: 1px solid rgba(238, 240, 255, 0.06);
  vertical-align: middle;
  white-space: nowrap;
  color: var(--ink);
}
table.data tr:last-child td { border-bottom: none; }
table.data tbody tr { transition: background 0.15s var(--ease); }
table.data tbody tr:hover { background: rgba(238, 240, 255, 0.025); }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data td.num { font-family: var(--mono); font-size: 0.8rem; }
.unit { color: var(--dim); font-size: 0.86em; margin-left: 0.35em; }

/* ---- chips (cognition filter, pill controls) ---- */
.chip-row { display: flex; gap: 0.45rem; flex-wrap: wrap; }
.chip {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--hairline);
  background: var(--fill);
  padding: 0.4em 1em;
  border-radius: var(--pill);
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.chip:hover { color: var(--ink); border-color: rgba(238, 240, 255, 0.34); }
.chip.active { color: var(--c2t); border-color: var(--c2-line); background: var(--c2-soft); }
.chip:disabled { opacity: 0.45; cursor: default; }

/* ---- prev / next nav ---- */
.pager { display: flex; gap: 0.5rem; align-items: center; }
.pager a, .pager span.disabled {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border: 1px solid var(--hairline);
  border-radius: var(--pill);
  padding: 0.38em 1em;
  text-decoration: none;
  color: var(--muted);
  background: var(--fill);
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease);
  white-space: nowrap;
}
.pager a:hover { color: var(--c2t); border-color: var(--c2-line); }
.pager span.disabled { opacity: 0.35; cursor: not-allowed; }

/* ---- lifecycle stepper ---- */
.stepper { list-style: none; position: relative; padding-left: 0.25rem; }
.step {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 0 0.9rem;
  padding-bottom: 1.5rem;
}
.step:last-child { padding-bottom: 0.2rem; }
.step::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 26px;
  bottom: 2px;
  width: 2px;
  background: var(--faint);
}
.step:last-child::before { display: none; }
.step.reached::before { background: linear-gradient(180deg, var(--c1), var(--c2)); }
.step.skipped::before { background: repeating-linear-gradient(var(--faint) 0 4px, transparent 4px 9px); }
.step-marker {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  background: rgba(3, 4, 10, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--dim);
  z-index: 1;
}
.step.reached .step-marker { border-color: var(--c1-line); background: var(--c1-soft); color: var(--c1t); }
.step.terminal-good .step-marker { border-color: var(--c1-line); background: var(--c1-soft); color: var(--c1t); }
.step.terminal-bad .step-marker { border-color: var(--bad-line); background: var(--bad-soft); color: var(--bad); }
.step.skipped .step-marker { border-style: dashed; }
.step-body { min-width: 0; padding-top: 0.15rem; }
.step-name {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  flex-wrap: wrap;
}
.step.pending .step-name, .step.pending .step-marker { color: var(--dim); opacity: 0.75; }
.step.terminal-good .step-name { color: var(--c1t); }
.step.terminal-bad .step-name { color: var(--bad); }
.step-meta { font-family: var(--mono); font-size: 0.74rem; color: var(--dim); margin-top: 0.25rem; display: flex; gap: 1.1rem; flex-wrap: wrap; }
.step-meta a { color: var(--muted); }
.step-meta a:hover { color: var(--c2t); }
.step-note { font-size: 0.8rem; color: var(--dim); margin-top: 0.25rem; font-style: italic; }

/* ---- inputs / outputs lists ---- */
.io-list { list-style: none; }
.io-list li {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(238, 240, 255, 0.07);
  font-size: 0.84rem;
  flex-wrap: wrap;
}
.io-list li:last-child { border-bottom: none; }
.io-list .io-idx { font-family: var(--mono); font-size: 0.66rem; color: var(--c2t); letter-spacing: 0.08em; flex: none; }

/* ---- empty / error states ---- */
.state-card {
  text-align: center;
  padding: clamp(2.2rem, 6vw, 3.6rem) 1.4rem;
}
.state-card .glyph {
  width: 52px; height: 52px;
  margin: 0 auto 1.1rem;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  background: var(--fill);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dim);
}
.state-card.error .glyph { color: var(--warn); border-color: var(--warn-line); background: var(--warn-soft); }
.state-card h2 { font-size: 1.4rem; font-weight: 200; letter-spacing: -0.01em; margin-bottom: 0.45rem; }
.state-card p { color: var(--muted); font-size: 0.92rem; max-width: 44ch; margin-inline: auto; }
.state-card .code-line { font-family: var(--mono); font-size: 0.72rem; color: var(--dim); margin-top: 0.7rem; overflow-wrap: anywhere; }
.state-card .actions { margin-top: 1.4rem; display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: var(--pill);
  padding: 0.75em 1.6em;
  cursor: pointer;
  border: none;
  font-family: var(--sans);
  transition: filter 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.1s var(--ease), box-shadow 0.2s var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn-solid {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 0 20px rgba(109, 91, 255, 0.35), 0 0 5px rgba(55, 200, 255, 0.25);
}
.btn-solid:hover { filter: brightness(1.12); color: #fff; box-shadow: 0 0 28px rgba(109, 91, 255, 0.5), 0 0 8px rgba(55, 200, 255, 0.35); }
.btn-ghost { border: 1px solid var(--hairline); color: var(--ink); background: var(--fill); }
.btn-ghost:hover { border-color: rgba(238, 240, 255, 0.34); color: var(--ink); }

/* ---- loading skeleton (live mode) ---- */
@keyframes shimmer { 0% { opacity: 0.4; } 50% { opacity: 0.8; } 100% { opacity: 0.4; } }
.skeleton { padding: 1.1rem; }
.skeleton .bone {
  height: 0.95rem;
  border-radius: 6px;
  background: rgba(238, 240, 255, 0.07);
  margin-bottom: 0.7rem;
  animation: shimmer 1.4s ease-in-out infinite;
}
.skeleton .bone:nth-child(2) { width: 82%; }
.skeleton .bone:nth-child(3) { width: 64%; }

/* ---- hint line ---- */
.hint-line {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--dim);
  display: flex;
  align-items: center;
  gap: 0.55em;
  margin-top: 0.9rem;
  flex-wrap: wrap;
}
.hint-line::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--dim); opacity: 0.6; flex: none; }
.hint-line.gold { color: var(--c2t); }
.hint-line.gold::before { background: var(--c2); }

/* ---- note hero value: thin display numerals ---- */
.value-hero { display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.4rem; }
.value-hero .amount {
  font-size: clamp(1.9rem, 5vw, 3rem);
  font-weight: 200;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.value-hero .unit { font-size: 0.62rem; letter-spacing: 0.24em; text-transform: uppercase; }

/* ---- footer ---- */
footer { border-top: 1px solid var(--faint); padding-block: 1.7rem; }
.footer-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--dim);
}
.footer-meta a { color: var(--dim); text-decoration: none; }
.footer-meta a:hover { color: var(--c2t); text-decoration: underline; text-underline-offset: 3px; }

/* ---- responsive ---- */
@media (max-width: 640px) {
  .nav { row-gap: 0.55rem; }
  .search-form { order: 3; flex-basis: 100%; }
  table.data th, table.data td { padding-inline: 0.8rem; }
  .hide-sm { display: none; }
}
@media (max-width: 400px) {
  .wrap { width: calc(100% - 1.6rem); }
  .brand .brand-tag { display: none; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .kv-row { flex-direction: column; align-items: flex-start; gap: 0.15rem; }
  .kv-row .v { text-align: left; }
}
