    :root {
      --bg-deep: #030408;
      --bg: #060a12;
      --panel: rgba(14, 18, 28, 0.72);
      --panel-solid: #0c1018;
      --inset: rgba(6, 9, 16, 0.85);
      --border: rgba(148, 163, 184, 0.12);
      --border-bright: rgba(148, 163, 184, 0.22);
      --text: #eef1f8;
      --muted: #7b8499;
      --accent: #5ee9b5;
      --accent-dim: rgba(94, 233, 181, 0.12);
      --gold: #e8c468;
      --gold-dim: rgba(232, 196, 104, 0.1);
      --cyan: #5ce1ff;
      --cyan-dim: rgba(92, 225, 255, 0.1);
      --mag: #c77dff;
      --mag-dim: rgba(199, 125, 255, 0.1);
      --warm: #fbbf24;
      --neg: #ff6b7a;
      --glass: blur(18px) saturate(1.35);
      --radius-lg: 20px;
      --radius-md: 14px;
      --radius-sm: 10px;
      --shadow: 0 24px 48px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
      --mono: "IBM Plex Mono", ui-monospace, monospace;
      --serif: "Instrument Serif", Georgia, serif;
      --sans: "Outfit", system-ui, sans-serif;
    }

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

    body {
      min-height: 100vh;
      background: var(--bg-deep);
      color: var(--text);
      font-family: var(--sans);
      font-size: 13px;
      line-height: 1.45;
      -webkit-font-smoothing: antialiased;
    }

    .ambient {
      position: fixed;
      inset: 0;
      pointer-events: none;
      z-index: 0;
      overflow: hidden;
    }
    .ambient-grid {
      position: absolute;
      inset: 0;
      background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
      background-size: 48px 48px;
      mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, black, transparent);
    }
    .ambient-orb {
      position: absolute;
      border-radius: 50%;
      filter: blur(80px);
      opacity: 0.55;
      animation: drift 18s ease-in-out infinite alternate;
    }
    .ambient-orb.a { width: 520px; height: 520px; top: -12%; left: -8%; background: rgba(94, 233, 181, 0.14); }
    .ambient-orb.b { width: 440px; height: 440px; top: 40%; right: -10%; background: rgba(199, 125, 255, 0.12); animation-delay: -6s; }
    .ambient-orb.c { width: 380px; height: 380px; bottom: -8%; left: 30%; background: rgba(92, 225, 255, 0.1); animation-delay: -12s; }
    @keyframes drift {
      from { transform: translate(0, 0) scale(1); }
      to { transform: translate(24px, -18px) scale(1.06); }
    }

    .gate, .vault { display: none; position: relative; z-index: 1; }
    .gate.active {
      display: grid;
      min-height: 100vh;
      place-items: center;
      padding: 28px;
    }
    .vault.active { display: block; }

    /* ── Gate ── */
    .gate-card {
      width: min(420px, 100%);
      background: var(--panel);
      backdrop-filter: var(--glass);
      -webkit-backdrop-filter: var(--glass);
      border: 1px solid var(--border-bright);
      border-radius: var(--radius-lg);
      padding: 40px 36px 36px;
      box-shadow: var(--shadow);
      text-align: center;
    }
    .gate-emblem {
      width: 72px;
      height: 72px;
      margin: 0 auto 20px;
      color: var(--accent);
      filter: drop-shadow(0 0 20px rgba(94, 233, 181, 0.35));
    }
    .gate-card h1 {
      font-family: var(--serif);
      font-size: 36px;
      font-weight: 400;
      letter-spacing: -0.03em;
      margin-bottom: 6px;
    }
    .gate-card .gate-tag {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-family: var(--mono);
      font-size: 10px;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      color: var(--muted);
      margin-bottom: 28px;
    }
    .gate-card .gate-tag::before {
      content: "";
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: var(--accent);
      box-shadow: 0 0 10px var(--accent);
    }
    .gate-card .gate-tag.live::before {
      background: #5ee9b5;
      box-shadow: 0 0 12px rgba(94, 233, 181, 0.75);
      animation: vault-live-pulse 2s ease-in-out infinite;
    }
    @keyframes vault-live-pulse {
      0%, 100% { opacity: 1; transform: scale(1); }
      50% { opacity: 0.55; transform: scale(0.88); }
    }
    .gate-card input {
      width: 100%;
      background: var(--inset);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      padding: 14px 16px;
      color: var(--text);
      font-family: var(--mono);
      font-size: 12px;
      margin-bottom: 12px;
      transition: border-color 0.2s, box-shadow 0.2s;
    }
    .gate-card input:focus {
      outline: none;
      border-color: rgba(94, 233, 181, 0.45);
      box-shadow: 0 0 0 3px var(--accent-dim);
    }
    .gate-card button[type="submit"] {
      width: 100%;
      border-radius: var(--radius-sm);
      border: 1px solid rgba(94, 233, 181, 0.4);
      background: linear-gradient(180deg, rgba(94, 233, 181, 0.16), rgba(94, 233, 181, 0.06));
      color: var(--accent);
      font-family: var(--sans);
      font-weight: 600;
      font-size: 12px;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      padding: 14px;
      cursor: pointer;
      transition: transform 0.15s, background 0.2s, box-shadow 0.2s;
    }
    .gate-card button[type="submit"]:hover {
      background: linear-gradient(180deg, rgba(94, 233, 181, 0.22), rgba(94, 233, 181, 0.1));
      box-shadow: 0 8px 24px rgba(94, 233, 181, 0.15);
    }
    .gate-card button[type="submit"]:active { transform: scale(0.98); }
    .err { color: var(--neg); font-size: 11px; min-height: 1.2em; margin-top: 10px; font-family: var(--mono); }

    /* ── Shell ── */
    .vault {
      max-width: 1280px;
      margin: 0 auto;
      padding: 0 20px 56px;
    }
    .vault-header {
      position: sticky;
      top: 0;
      z-index: 20;
      margin: 0 -20px 28px;
      padding: 16px 20px;
      background: rgba(3, 4, 8, 0.65);
      backdrop-filter: blur(16px) saturate(1.2);
      -webkit-backdrop-filter: blur(16px) saturate(1.2);
      border-bottom: 1px solid var(--border);
    }
    .vault-header-inner {
      max-width: 1280px;
      margin: 0 auto;
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      gap: 20px;
    }
    .brand {
      display: flex;
      align-items: center;
      gap: 14px;
    }
    .brand-mark {
      width: 44px;
      height: 44px;
      border-radius: 12px;
      background: linear-gradient(135deg, var(--accent-dim), var(--mag-dim));
      border: 1px solid var(--border-bright);
      display: grid;
      place-items: center;
      color: var(--accent);
      flex-shrink: 0;
    }
    .brand-mark svg { width: 22px; height: 22px; }
    .brand h1 {
      font-family: var(--serif);
      font-size: clamp(26px, 4vw, 32px);
      font-weight: 400;
      letter-spacing: -0.02em;
      line-height: 1.1;
    }
    .brand p {
      color: var(--muted);
      font-family: var(--mono);
      font-size: 10px;
      letter-spacing: 0.18em;
      text-transform: uppercase;
      margin-top: 3px;
    }
    .version-pill {
      display: inline-block;
      margin-left: 8px;
      font-family: var(--mono);
      font-size: 9px;
      padding: 2px 7px;
      border-radius: 999px;
      border: 1px solid var(--border);
      color: var(--muted);
      vertical-align: middle;
    }
    .nav {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      padding: 4px;
      background: var(--inset);
      border: 1px solid var(--border);
      border-radius: 999px;
    }
    .nav button {
      border: none;
      background: transparent;
      color: var(--muted);
      font-family: var(--sans);
      font-weight: 500;
      font-size: 11px;
      padding: 9px 16px;
      border-radius: 999px;
      cursor: pointer;
      transition: color 0.2s, background 0.2s, box-shadow 0.2s;
      white-space: nowrap;
    }
    .nav button:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
    .nav button.active {
      color: var(--text);
      background: var(--panel-solid);
      box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35), 0 0 0 1px var(--border-bright);
    }
    .nav button[data-view="finance"].active { color: var(--gold); }
    .nav button[data-view="wallet"].active { color: var(--gold); }
    .nav button[data-view="crypto"].active { color: var(--mag); }
    .nav button[data-view="quantum"].active { color: var(--cyan); }
    .nav button[data-view="overview"].active { color: var(--accent); }
    .nav button .pill {
      display: inline-block;
      margin-left: 6px;
      font-family: var(--mono);
      font-size: 8px;
      padding: 2px 6px;
      border-radius: 999px;
      border: 1px solid var(--border);
      color: var(--muted);
      vertical-align: middle;
    }

    .view { display: none; animation: view-in 0.35s ease; }
    .view.active { display: block; }
    @keyframes view-in {
      from { opacity: 0; transform: translateY(6px); }
      to { opacity: 1; transform: translateY(0); }
    }

    /* ── Heroes ── */
    .hero, .dash-hero {
      background: var(--panel);
      backdrop-filter: var(--glass);
      -webkit-backdrop-filter: var(--glass);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 26px 28px;
      margin-bottom: 20px;
      box-shadow: var(--shadow);
    }
    .dash-hero {
      display: flex;
      flex-wrap: wrap;
      justify-content: space-between;
      align-items: center;
      gap: 18px;
    }
    .hero-top {
      display: flex;
      flex-wrap: wrap;
      justify-content: space-between;
      align-items: flex-start;
      gap: 16px;
      margin-bottom: 22px;
    }
    .hero-label {
      font-family: var(--mono);
      font-size: 10px;
      letter-spacing: 0.22em;
      text-transform: uppercase;
      color: var(--muted);
      margin-bottom: 8px;
    }
    .hero-title {
      font-family: var(--serif);
      font-size: clamp(24px, 4vw, 34px);
      font-weight: 400;
      letter-spacing: -0.02em;
      line-height: 1.15;
    }
    .hero-sub { color: var(--muted); font-size: 12px; margin-top: 6px; max-width: 52ch; }
    .hero-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
    .btn {
      border: 1px solid var(--border-bright);
      background: var(--inset);
      color: var(--text);
      font-family: var(--sans);
      font-weight: 500;
      font-size: 11px;
      padding: 9px 16px;
      border-radius: var(--radius-sm);
      cursor: pointer;
      transition: border-color 0.2s, background 0.2s, transform 0.15s;
    }
    .btn:hover { border-color: var(--accent); background: var(--accent-dim); }
    .btn:active { transform: scale(0.97); }
    .btn-ghost { color: var(--muted); background: transparent; }
    .btn-ghost:hover { color: var(--text); }

    .stats {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
      gap: 12px;
    }
    .stat {
      background: var(--inset);
      border: 1px solid var(--border);
      border-radius: var(--radius-md);
      padding: 18px 16px;
      text-align: left;
      position: relative;
      overflow: hidden;
      transition: border-color 0.2s, transform 0.2s;
    }
    .stat::before {
      content: "";
      position: absolute;
      left: 0;
      top: 0;
      bottom: 0;
      width: 3px;
      background: var(--border-bright);
      border-radius: 3px 0 0 3px;
    }
    .stat:hover { border-color: var(--border-bright); transform: translateY(-1px); }
    .stat .label {
      font-family: var(--mono);
      font-size: 9px;
      text-transform: uppercase;
      letter-spacing: 0.14em;
      color: var(--muted);
    }
    .stat .value {
      font-family: var(--serif);
      font-size: clamp(22px, 3vw, 30px);
      margin-top: 8px;
      line-height: 1.1;
    }
    .stat .value.mono {
      font-family: var(--mono);
      font-size: 13px;
      letter-spacing: 0.02em;
    }
    .stat .value.pos { color: var(--accent); }
    .stat .value.neg { color: var(--neg); }
    .stat .value.cyan { color: var(--cyan); }
    .stat .value.gold { color: var(--gold); }
    .stat .value.mag { color: var(--mag); }
    .stat .value.warm { color: var(--warm); }
    .meta { margin-top: 16px; font-family: var(--mono); font-size: 10px; color: var(--muted); }
    .meta.spaced { margin-top: 12px; }
    .warn { margin-top: 10px; font-size: 11px; color: var(--warm); display: none; font-family: var(--mono); }
    .warn.show { display: block; }

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

    .card {
      background: var(--panel);
      backdrop-filter: var(--glass);
      -webkit-backdrop-filter: var(--glass);
      border: 1px solid var(--border);
      border-radius: var(--radius-md);
      padding: 20px 22px;
      box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
    }
    .card h2 {
      font-family: var(--mono);
      font-size: 10px;
      text-transform: uppercase;
      letter-spacing: 0.18em;
      margin-bottom: 14px;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .card h2::after {
      content: "";
      flex: 1;
      height: 1px;
      background: linear-gradient(90deg, var(--border-bright), transparent);
    }
    .card h2.fin { color: var(--gold); }
    .card h2.crypto { color: var(--mag); }
    .card h2.quantum { color: var(--cyan); }
    .card h2.wallet { color: var(--gold); }

    .row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
      padding: 12px 0;
      border-bottom: 1px solid var(--border);
      transition: background 0.15s;
    }
    .row:hover { background: rgba(255, 255, 255, 0.02); margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: 8px; }
    .row:last-child { border-bottom: none; }
    .row .name { font-size: 12px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
    .row .sub { font-family: var(--mono); font-size: 10px; color: var(--muted); margin-top: 3px; }
    .row .amt { font-family: var(--mono); font-size: 12px; flex-shrink: 0; font-weight: 500; }
    .row .amt.pos { color: var(--accent); }
    .row .amt.neg { color: var(--neg); }
    .empty { text-align: center; color: var(--muted); font-family: var(--mono); font-size: 11px; padding: 28px 0; }

    .council-field {
      display: grid;
      grid-template-columns: repeat(12, 1fr);
      gap: 5px;
      margin-top: 14px;
      height: 96px;
      align-items: end;
      padding: 12px;
      background: var(--inset);
      border-radius: var(--radius-sm);
      border: 1px solid var(--border);
    }
    .council-bar {
      background: linear-gradient(to top, rgba(92, 225, 255, 0.12), rgba(92, 225, 255, 0.75));
      border-radius: 4px 4px 0 0;
      min-height: 4px;
      transition: height 0.45s cubic-bezier(0.22, 1, 0.36, 1);
      box-shadow: 0 0 12px rgba(92, 225, 255, 0.2);
    }

    .foot {
      margin-top: 40px;
      text-align: center;
      font-family: var(--mono);
      font-size: 10px;
      color: var(--muted);
      letter-spacing: 0.12em;
      padding-top: 20px;
      border-top: 1px solid var(--border);
    }

    /* ── Overview dashboard ── */
    .status-strip { display: flex; flex-wrap: wrap; gap: 8px; }
    .status-chip {
      font-family: var(--mono);
      font-size: 9px;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      padding: 7px 12px;
      border-radius: 999px;
      border: 1px solid var(--border);
      background: var(--inset);
    }
    .status-chip.ok { border-color: rgba(94, 233, 181, 0.35); color: var(--accent); background: var(--accent-dim); }
    .status-chip.warn { border-color: rgba(251, 191, 36, 0.35); color: var(--warm); background: rgba(251, 191, 36, 0.08); }
    .status-chip.err { border-color: rgba(255, 107, 122, 0.35); color: var(--neg); background: rgba(255, 107, 122, 0.08); }

    .viz-grid {
      display: grid;
      grid-template-columns: 1fr;
      gap: 16px;
      margin-bottom: 16px;
    }
    @media (min-width: 900px) { .viz-grid { grid-template-columns: 1.1fr 0.95fr 1fr; } }

    .viz-card {
      background: var(--panel);
      backdrop-filter: var(--glass);
      -webkit-backdrop-filter: var(--glass);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 22px;
      min-height: 300px;
      display: flex;
      flex-direction: column;
      position: relative;
      overflow: hidden;
      box-shadow: var(--shadow);
      transition: border-color 0.25s, transform 0.25s;
    }
    .viz-card:hover { transform: translateY(-2px); }
    .viz-card::before {
      content: "";
      position: absolute;
      inset: 0;
      opacity: 0.5;
      pointer-events: none;
    }
    .viz-card.fin { border-top: 2px solid rgba(232, 196, 104, 0.5); }
    .viz-card.fin::before { background: radial-gradient(circle at 15% 0%, var(--gold-dim), transparent 60%); }
    .viz-card.fin:hover { border-color: rgba(232, 196, 104, 0.35); }
    .viz-card.crypto { border-top: 2px solid rgba(199, 125, 255, 0.5); }
    .viz-card.crypto::before { background: radial-gradient(circle at 85% 0%, var(--mag-dim), transparent 60%); }
    .viz-card.crypto:hover { border-color: rgba(199, 125, 255, 0.35); }
    .viz-card.quantum { border-top: 2px solid rgba(92, 225, 255, 0.5); }
    .viz-card.quantum::before { background: radial-gradient(circle at 50% 100%, var(--cyan-dim), transparent 65%); }
    .viz-card.quantum:hover { border-color: rgba(92, 225, 255, 0.35); }

    .viz-card h3 {
      font-family: var(--mono);
      font-size: 10px;
      letter-spacing: 0.2em;
      text-transform: uppercase;
      margin-bottom: 16px;
      position: relative;
      z-index: 1;
    }
    .viz-card.fin h3 { color: var(--gold); }
    .viz-card.crypto h3 { color: var(--mag); }
    .viz-card.quantum h3 { color: var(--cyan); }

    .viz-center {
      flex: 1;
      display: grid;
      place-items: center;
      position: relative;
      z-index: 1;
    }
    .gauge-wrap { position: relative; width: 168px; height: 168px; }
    .gauge-wrap circle:first-of-type { stroke: rgba(255, 255, 255, 0.06) !important; }
    .gauge-value {
      position: absolute;
      inset: 0;
      display: grid;
      place-items: center;
      text-align: center;
      pointer-events: none;
    }
    .gauge-value .big {
      font-family: var(--serif);
      font-size: 28px;
      line-height: 1.05;
      letter-spacing: -0.02em;
    }
    .gauge-value .big.pos { color: var(--accent); }
    .gauge-value .big.neg { color: var(--neg); }
    .gauge-value .small { font-family: var(--mono); font-size: 9px; color: var(--muted); margin-top: 4px; letter-spacing: 0.1em; text-transform: uppercase; }

    .viz-seal-label {
      text-align: center;
      font-family: var(--serif);
      font-size: 24px;
      margin-top: 6px;
      letter-spacing: 0.04em;
      color: var(--mag);
      position: relative;
      z-index: 1;
    }

    .cashflow-viz { margin-top: 18px; display: grid; gap: 10px; position: relative; z-index: 1; }
    .cf-row { display: grid; grid-template-columns: 44px 1fr 56px; align-items: center; gap: 10px; font-family: var(--mono); font-size: 10px; color: var(--muted); }
    .cf-bar {
      height: 10px;
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.04);
      overflow: hidden;
      border: 1px solid var(--border);
    }
    .cf-fill { height: 100%; border-radius: 999px; transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1); }
    .cf-fill.in { background: linear-gradient(90deg, rgba(92, 225, 255, 0.35), var(--cyan)); }
    .cf-fill.out { background: linear-gradient(90deg, rgba(251, 191, 36, 0.35), var(--warm)); }

    .seal-ring { width: 148px; height: 148px; }
    .seal-ring circle:first-of-type { stroke: rgba(255, 255, 255, 0.06) !important; }
    .seal-ring.pulse { animation: seal-pulse 2.8s ease-in-out infinite; }
    @keyframes seal-pulse {
      0%, 100% { filter: drop-shadow(0 0 8px rgba(199, 125, 255, 0.25)); }
      50% { filter: drop-shadow(0 0 22px rgba(199, 125, 255, 0.55)); }
    }

    .entry-dots {
      display: flex;
      flex-wrap: wrap;
      gap: 7px;
      margin-top: 16px;
      justify-content: center;
      position: relative;
      z-index: 1;
    }
    .entry-dot {
      width: 9px;
      height: 9px;
      border-radius: 50%;
      background: rgba(199, 125, 255, 0.2);
      border: 1px solid rgba(199, 125, 255, 0.45);
      transition: transform 0.2s, box-shadow 0.2s;
    }
    .entry-dot.active {
      background: var(--mag);
      box-shadow: 0 0 10px rgba(199, 125, 255, 0.55);
      transform: scale(1.15);
    }

    .radar-wrap {
      width: 100%;
      max-width: 220px;
      aspect-ratio: 1;
      padding: 8px;
      background: radial-gradient(circle, rgba(92, 225, 255, 0.06), transparent 70%);
      border-radius: 50%;
    }
    .radar-wrap canvas { width: 100%; height: 100%; display: block; }

    .presence-row {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 12px;
      margin-top: 14px;
      font-family: var(--mono);
      font-size: 10px;
      color: var(--muted);
      position: relative;
      z-index: 1;
    }
    .presence-bar {
      width: 110px;
      height: 8px;
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.04);
      border: 1px solid var(--border);
      overflow: hidden;
    }
    .presence-fill {
      height: 100%;
      background: linear-gradient(90deg, var(--accent), var(--cyan));
      border-radius: 999px;
      transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1);
      box-shadow: 0 0 12px rgba(92, 225, 255, 0.35);
    }

    .viz-row-2 {
      display: grid;
      grid-template-columns: 1fr;
      gap: 16px;
    }
    @media (min-width: 768px) { .viz-row-2 { grid-template-columns: 1.2fr 0.8fr; } }

    .bar-chart { display: grid; gap: 12px; margin-top: 10px; }
    .bar-item { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; font-size: 10px; }
    .bar-item span:first-child { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .bar-item .amt { font-family: var(--mono); font-weight: 500; }
    .bar-item .track {
      grid-column: 1 / -1;
      height: 12px;
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.04);
      border: 1px solid var(--border);
      overflow: hidden;
    }
    .bar-item .fill {
      height: 100%;
      border-radius: 999px;
      transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .bar-item .fill.pos { background: linear-gradient(90deg, rgba(94, 233, 181, 0.3), var(--accent)); }
    .bar-item .fill.neg { background: linear-gradient(90deg, rgba(255, 107, 122, 0.3), var(--neg)); }

    .spark-row {
      display: flex;
      align-items: flex-end;
      gap: 5px;
      height: 80px;
      margin-top: 14px;
      padding: 12px;
      background: var(--inset);
      border-radius: var(--radius-sm);
      border: 1px solid var(--border);
    }
    .spark-bar {
      flex: 1;
      min-width: 5px;
      border-radius: 4px 4px 0 0;
      background: linear-gradient(to top, var(--gold-dim), var(--gold));
      transition: height 0.55s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .spark-bar.neg { background: linear-gradient(to top, rgba(255, 107, 122, 0.15), var(--neg)); }
    .viz-meta {
      margin-top: auto;
      padding-top: 14px;
      font-family: var(--mono);
      font-size: 9px;
      color: var(--muted);
      letter-spacing: 0.04em;
      position: relative;
      z-index: 1;
    }

    /* ── Crypto form ── */
    .secret-form-card { margin-bottom: 16px; }
    .secret-form {
      display: grid;
      grid-template-columns: 1fr;
      gap: 10px;
      margin-bottom: 10px;
    }
    @media (min-width: 640px) {
      .secret-form { grid-template-columns: 1fr 1fr auto; align-items: stretch; }
    }
    .secret-form input {
      background: var(--inset);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      padding: 12px 14px;
      color: var(--text);
      font-family: var(--mono);
      font-size: 11px;
      transition: border-color 0.2s, box-shadow 0.2s;
    }
    .secret-form input:focus {
      outline: none;
      border-color: rgba(199, 125, 255, 0.4);
      box-shadow: 0 0 0 3px var(--mag-dim);
    }
    .btn-seal {
      border-color: rgba(199, 125, 255, 0.45);
      color: var(--mag);
      background: var(--mag-dim);
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.05em;
    }
    .btn-seal:hover { background: rgba(199, 125, 255, 0.18); border-color: var(--mag); }
    .btn-del {
      border: 1px solid rgba(255, 107, 122, 0.35);
      color: var(--neg);
      background: transparent;
      font-family: var(--mono);
      font-size: 9px;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      padding: 5px 10px;
      border-radius: 8px;
      cursor: pointer;
      flex-shrink: 0;
      transition: background 0.15s;
    }
    .btn-del:hover { background: rgba(255, 107, 122, 0.12); }

    /* ── NXCB Wallet ── */
    .wallet-hero { border-top: 2px solid rgba(232, 196, 104, 0.35); }
    .wallet-total {
      margin-bottom: 20px;
      padding: 20px 22px;
      border-radius: var(--radius-md);
      background: linear-gradient(135deg, var(--gold-dim), rgba(14, 18, 28, 0.6));
      border: 1px solid rgba(232, 196, 104, 0.2);
    }
    .wallet-total .label {
      font-family: var(--mono);
      font-size: 10px;
      letter-spacing: 0.16em;
      text-transform: uppercase;
      color: var(--muted);
    }
    .wallet-usd-total {
      font-family: var(--serif);
      font-size: clamp(36px, 6vw, 52px);
      color: var(--gold);
      line-height: 1.05;
      margin-top: 6px;
      letter-spacing: -0.02em;
    }
    .wallet-balances {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
      gap: 12px;
      margin-bottom: 16px;
    }
    .balance-card {
      background: var(--panel);
      backdrop-filter: var(--glass);
      border: 1px solid var(--border);
      border-radius: var(--radius-md);
      padding: 18px 20px;
      position: relative;
      overflow: hidden;
      transition: transform 0.2s, border-color 0.2s;
    }
    .balance-card:hover { transform: translateY(-2px); border-color: rgba(232, 196, 104, 0.3); }
    .balance-card.native { border-top: 2px solid rgba(232, 196, 104, 0.55); }
    .balance-card .ticker {
      font-family: var(--mono);
      font-size: 11px;
      letter-spacing: 0.14em;
      color: var(--gold);
      text-transform: uppercase;
    }
    .balance-card .amount {
      font-family: var(--serif);
      font-size: 28px;
      margin-top: 8px;
      line-height: 1.1;
    }
    .balance-card .usd {
      font-family: var(--mono);
      font-size: 10px;
      color: var(--muted);
      margin-top: 6px;
    }
    .balance-card .chip-native {
      position: absolute;
      top: 12px;
      right: 12px;
      font-family: var(--mono);
      font-size: 8px;
      padding: 3px 7px;
      border-radius: 999px;
      border: 1px solid rgba(232, 196, 104, 0.35);
      color: var(--gold);
      background: var(--gold-dim);
    }
    .rate-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 10px 0;
      border-bottom: 1px solid var(--border);
      font-family: var(--mono);
      font-size: 11px;
    }
    .rate-row:last-child { border-bottom: none; }
    .rate-row .ticker { color: var(--gold); font-weight: 500; }
    .rate-row .price { color: var(--text); }
    .rate-row .src { color: var(--muted); font-size: 9px; }
    .tx-mint {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 10px;
      padding: 11px 0;
      border-bottom: 1px solid var(--border);
    }
    .tx-mint:last-child { border-bottom: none; }
    .tx-mint .amt { font-family: var(--mono); color: var(--gold); font-weight: 500; flex-shrink: 0; }
    .tx-mint .scheme { font-size: 10px; color: var(--muted); margin-top: 3px; }
    .tx-mint .when { font-family: var(--mono); font-size: 9px; color: var(--muted); flex-shrink: 0; }

    .field-card {
      border-top: 2px solid rgba(168, 120, 255, 0.35);
      margin-bottom: 16px;
      background: linear-gradient(180deg, rgba(24, 16, 48, 0.45), rgba(10, 14, 24, 0.2));
    }
    .field-pill.scanning { color: var(--cyan); border-color: rgba(122, 196, 255, 0.4); }
    .field-best {
      display: flex;
      align-items: baseline;
      flex-wrap: wrap;
      gap: 10px 18px;
      margin: 14px 0 18px;
      padding: 16px 18px;
      border-radius: var(--radius-md);
      background: rgba(8, 12, 22, 0.55);
      border: 1px solid rgba(168, 120, 255, 0.2);
    }
    .field-best-label {
      font-family: var(--mono);
      font-size: 10px;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      color: var(--muted);
      width: 100%;
    }
    .field-best-coin {
      font-family: var(--serif);
      font-size: 32px;
      color: var(--gold);
      line-height: 1;
    }
    .field-best-hz {
      font-family: var(--mono);
      font-size: 13px;
      color: var(--cyan);
    }
    .field-spectrum {
      display: grid;
      gap: 10px;
      margin-bottom: 14px;
    }
    .freq-bar {
      display: grid;
      grid-template-columns: 52px 1fr 72px 88px;
      gap: 10px;
      align-items: center;
      font-family: var(--mono);
      font-size: 10px;
    }
    .freq-bar .ticker { color: var(--gold); font-weight: 500; }
    .freq-bar .track {
      height: 8px;
      border-radius: 99px;
      background: rgba(255, 255, 255, 0.06);
      overflow: hidden;
    }
    .freq-bar .fill {
      height: 100%;
      border-radius: 99px;
      background: linear-gradient(90deg, rgba(122, 196, 255, 0.5), rgba(168, 120, 255, 0.85));
      transition: width 0.6s ease;
    }
    .freq-bar.peak .fill {
      background: linear-gradient(90deg, rgba(232, 196, 104, 0.7), rgba(255, 180, 100, 1));
      box-shadow: 0 0 12px rgba(232, 196, 104, 0.35);
    }
    .freq-bar .hz { color: var(--cyan); text-align: right; }
    .freq-bar .score { color: var(--muted); text-align: right; }
    .field-stats {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
      gap: 10px;
    }

    .leviathan-card { border-top: 2px solid rgba(122, 196, 255, 0.25); margin-bottom: 16px; }
    .card-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 8px;
    }
    .leviathan-grid,
    .cohort-protocols {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 14px;
      margin-top: 14px;
    }
    @media (max-width: 900px) {
      .cohort-protocols { grid-template-columns: 1fr; }
    }

    /* ── Protocol tiles (three distinct doctrines) ── */
    .leviathan-protocol {
      position: relative;
      border-radius: var(--radius-md);
      padding: 18px 18px 16px;
      overflow: hidden;
      transition: transform 0.25s, box-shadow 0.25s;
      min-height: 220px;
    }
    .leviathan-protocol:hover { transform: translateY(-3px); }
    .leviathan-protocol.dormant { opacity: 0.78; }

    .proto-codename {
      font-family: var(--mono);
      font-size: 9px;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      color: var(--muted);
      margin-bottom: 6px;
    }
    .leviathan-protocol .name {
      font-family: var(--serif);
      font-size: 17px;
      line-height: 1.2;
      margin-bottom: 4px;
    }
    .leviathan-protocol .doctrine {
      font-size: 11px;
      color: var(--muted);
      line-height: 1.45;
      margin-bottom: 12px;
      min-height: 32px;
    }
    .phase-badge {
      display: inline-block;
      margin-top: 8px;
      font-family: var(--mono);
      font-size: 9px;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      padding: 4px 8px;
      border-radius: 4px;
    }
    .leviathan-protocol .stats-row {
      display: flex;
      flex-wrap: wrap;
      gap: 8px 14px;
      margin-top: 12px;
      font-family: var(--mono);
      font-size: 10px;
      color: var(--text);
      border-top: 1px solid rgba(255,255,255,0.06);
      padding-top: 10px;
    }
    .leviathan-protocol .stats-row span { color: var(--muted); }

    /* Behemoth — ANCHOR / fortress gold */
    .leviathan-protocol.fortress {
      background: linear-gradient(145deg, rgba(48, 36, 12, 0.55), rgba(12, 14, 22, 0.85));
      border: 1px solid rgba(232, 196, 104, 0.35);
      box-shadow: inset 0 1px 0 rgba(232, 196, 104, 0.12);
    }
    .leviathan-protocol.fortress .name { color: var(--gold); }
    .proto-glyph-ring {
      position: absolute;
      top: 10px;
      right: 10px;
      width: 72px;
      height: 72px;
      opacity: 0.9;
    }
    .anchor-ring .ring-bg {
      fill: none;
      stroke: rgba(232, 196, 104, 0.15);
      stroke-width: 4;
    }
    .anchor-ring .ring-fill {
      fill: none;
      stroke: var(--gold);
      stroke-width: 4;
      stroke-linecap: round;
      transform: rotate(-90deg);
      transform-origin: 40px 40px;
      transition: stroke-dasharray 0.8s ease;
    }
    .anchor-ring .ring-glyph {
      fill: var(--gold);
      font-size: 22px;
      font-family: var(--serif);
    }
    .anchor-viz {
      display: flex;
      align-items: baseline;
      gap: 10px;
    }
    .anchor-viz .viz-value { font-family: var(--serif); font-size: 28px; }
    .phase-badge.anchor {
      color: var(--gold);
      background: rgba(232, 196, 104, 0.1);
      border: 1px solid rgba(232, 196, 104, 0.25);
    }

    /* Tannin — ABYSS / void purple */
    .leviathan-protocol.abyss {
      background: linear-gradient(180deg, rgba(18, 8, 36, 0.9), rgba(6, 8, 18, 0.95));
      border: 1px solid rgba(120, 80, 200, 0.4);
    }
    .leviathan-protocol.abyss .name { color: #c9a8ff; }
    .proto-codename.abyss { color: #9b7ad8; }
    .abyss-void {
      position: absolute;
      inset: 0;
      pointer-events: none;
      overflow: hidden;
    }
    .void-pulse {
      position: absolute;
      bottom: -40%;
      left: 50%;
      width: 140%;
      height: 80%;
      transform: translateX(-50%);
      border-radius: 50%;
      background: radial-gradient(ellipse, rgba(88, 40, 160, 0.35), transparent 70%);
      animation: abyss-breathe 4s ease-in-out infinite;
    }
    .void-pulse.delay { animation-delay: 2s; opacity: 0.6; }
    @keyframes abyss-breathe {
      0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.5; }
      50% { transform: translateX(-50%) scale(1.08); opacity: 0.85; }
    }
    .abyss-viz {
      display: flex;
      align-items: flex-end;
      gap: 6px;
      height: 48px;
      position: relative;
      z-index: 1;
    }
    .depth-bar {
      flex: 1;
      height: 100%;
      display: flex;
      align-items: flex-end;
    }
    .depth-bar span {
      display: block;
      width: 100%;
      height: var(--d);
      border-radius: 3px 3px 0 0;
      background: linear-gradient(180deg, #9b7ad8, rgba(60, 20, 100, 0.6));
      opacity: calc(1 - var(--i) * 0.22);
      animation: depth-sway 3s ease-in-out infinite;
      animation-delay: calc(var(--i) * 0.4s);
    }
    @keyframes depth-sway {
      0%, 100% { filter: brightness(1); }
      50% { filter: brightness(1.25); }
    }
    .phase-badge.abyss {
      color: #c9a8ff;
      background: rgba(88, 40, 160, 0.2);
      border: 1px solid rgba(120, 80, 200, 0.35);
      position: relative;
      z-index: 1;
    }

    /* Rahab — CURRENT / harmonic cyan */
    .leviathan-protocol.current {
      background: linear-gradient(160deg, rgba(8, 28, 42, 0.85), rgba(10, 14, 24, 0.7));
      border: 1px solid rgba(80, 200, 220, 0.35);
    }
    .leviathan-protocol.current .name { color: var(--cyan); }
    .proto-codename.current { color: #5ec8d8; }
    .current-wave {
      position: absolute;
      left: 0;
      right: 0;
      bottom: 0;
      height: 48px;
      opacity: 0.45;
      pointer-events: none;
    }
    .current-wave .wave-a {
      fill: rgba(80, 200, 220, 0.25);
      animation: wave-slide 5s linear infinite;
    }
    .current-wave .wave-b {
      fill: rgba(40, 140, 180, 0.2);
      animation: wave-slide 7s linear infinite reverse;
    }
    @keyframes wave-slide {
      from { transform: translateX(0); }
      to { transform: translateX(-25%); }
    }
    .current-viz {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }
    .drift-arrow {
      font-size: 22px;
      color: var(--cyan);
      animation: drift-pulse 2s ease-in-out infinite;
    }
    @keyframes drift-pulse {
      0%, 100% { transform: translateX(0); opacity: 0.7; }
      50% { transform: translateX(6px); opacity: 1; }
    }
    .current-viz .viz-value {
      font-family: var(--mono);
      font-size: 14px;
      font-weight: 500;
    }
    .phase-badge.current {
      color: var(--cyan);
      background: rgba(80, 200, 220, 0.1);
      border: 1px solid rgba(80, 200, 220, 0.3);
    }

    @media (max-width: 640px) {
      .vault-header { position: relative; }
      .nav { width: 100%; justify-content: center; }
      .gate-card { padding: 32px 24px; }
    }