/* ============================================================
   LongVault — Bloomberg × Hyperliquid hybrid
   ============================================================ */

:root {
  /* Base palette */
  --bg: #08090c;
  --bg-elev: #0e1015;
  --surface: #13151c;
  --surface-2: #181b24;
  --surface-hi: #1d2030;
  --border: #232634;
  --border-strong: #2e3346;
  --divider: #1a1d27;

  /* Text */
  --text: #e2e6ef;
  --text-dim: #9aa1b3;
  --text-muted: #5d6478;
  --text-faint: #3a3f50;

  /* Accent (changeable via tweaks) */
  --accent: #5fd07e;
  --accent-dim: #3a8f54;
  --accent-glow: rgba(95, 208, 126, 0.18);

  /* Semantic */
  --gold: #ffd166;
  --gold-dim: #b18a3e;
  --gold-glow: rgba(255, 209, 102, 0.35);
  --warn: #f4b13c;
  --warn-dim: #a3742a;
  --danger: #ff6b6b;
  --danger-dim: #a04545;
  --info: #6aa9f0;

  /* Fonts */
  --font-sans: -apple-system, "SF Pro Text", "Helvetica Neue", system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", "Menlo", "Consolas", ui-monospace, monospace;

  /* Radii */
  --r-xs: 3px;
  --r-sm: 5px;
  --r-md: 8px;
  --r-lg: 12px;

  /* Spacing */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 56px;

  /* Effects */
  --shadow-card: 0 1px 0 rgba(255,255,255,0.02) inset, 0 4px 24px rgba(0,0,0,0.35);
  --gridline: rgba(255, 255, 255, 0.022);
}

/* Theme: amber accent */
[data-accent="amber"] {
  --accent: #f4b13c;
  --accent-dim: #a3742a;
  --accent-glow: rgba(244, 177, 60, 0.18);
}
[data-accent="cyan"] {
  --accent: #56d3e0;
  --accent-dim: #347a82;
  --accent-glow: rgba(86, 211, 224, 0.18);
}
[data-accent="violet"] {
  --accent: #a78bfa;
  --accent-dim: #6a4ed1;
  --accent-glow: rgba(167, 139, 250, 0.22);
}

/* Background density */
[data-bg="grid"] body {
  background-image:
    linear-gradient(var(--gridline) 1px, transparent 1px),
    linear-gradient(90deg, var(--gridline) 1px, transparent 1px);
  background-size: 32px 32px;
}
[data-bg="solid"] body { background-image: none; }
[data-bg="scan"] body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(
    0deg, rgba(255,255,255,0.012) 0 1px, transparent 1px 3px
  );
  z-index: 1;
}

/* ============================================================
   Reset + body
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
  background-image:
    linear-gradient(var(--gridline) 1px, transparent 1px),
    linear-gradient(90deg, var(--gridline) 1px, transparent 1px);
  background-size: 32px 32px;
}

button { font-family: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
input { font-family: inherit; }

.mono { font-family: var(--font-mono); font-feature-settings: "tnum", "zero"; }
.num  { font-family: var(--font-mono); font-feature-settings: "tnum", "zero"; font-variant-numeric: tabular-nums; }
.dim  { color: var(--text-dim); }
.muted{ color: var(--text-muted); }
.faint{ color: var(--text-faint); }
.pos  { color: var(--accent); }
.neg  { color: var(--danger); }
.gold { color: var(--gold); }
.warn { color: var(--warn); }

.uppercase { text-transform: uppercase; letter-spacing: 0.08em; font-size: 11px; }

/* ============================================================
   Top header
   ============================================================ */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(8, 9, 12, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1440px; margin: 0 auto;
  padding: 0 var(--sp-6);
  height: 56px;
  display: flex; align-items: center; gap: var(--sp-6);
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 14px; letter-spacing: 0.02em;
}
.brand-mark {
  width: 26px; height: 26px;
  display: grid; place-items: center;
  position: relative;
}
.brand-mark svg { width: 100%; height: 100%; display: block; }
.brand-mark img { width: 100%; height: 100%; display: block; object-fit: contain; filter: drop-shadow(0 0 8px var(--accent-glow)); }
.brand-mark .wing { fill: var(--accent); filter: drop-shadow(0 0 8px var(--accent-glow)); }
.brand-name { color: var(--text); }
.brand-sub  { color: var(--text-muted); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }

.header-nav { display: flex; gap: 2px; margin-left: var(--sp-4); }
.header-nav a {
  padding: 6px 12px; border-radius: var(--r-sm);
  font-size: 13px; color: var(--text-dim);
  position: relative;
  white-space: nowrap;
}
.header-nav a:hover { color: var(--text); }
.header-nav a.active {
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--border) inset;
}

.header-spacer { flex: 1; }

.header-right { display: flex; align-items: center; gap: 10px; }

/* Network pill */
.net-pill {
  display: inline-flex; align-items: center; gap: 8px;
  height: 30px; padding: 0 10px 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px; background: var(--surface);
  font-size: 12px;
  white-space: nowrap;
}
.net-pill .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent-glow);
  animation: pulse 2.2s infinite ease-out;
}
.net-pill .chain { color: var(--text-dim); font-size: 11px; }
.net-pill .price { color: var(--text); font-family: var(--font-mono); font-size: 12px; }

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 var(--accent-glow); }
  70%  { box-shadow: 0 0 0 6px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* Connect button */
.btn-wallet {
  height: 30px; padding: 0 14px;
  border-radius: 999px;
  background: var(--accent); color: #08090c;
  border: 0;
  font-weight: 600; font-size: 12px; letter-spacing: 0.02em;
  display: inline-flex; align-items: center; gap: 8px;
  transition: filter .15s, transform .15s;
  white-space: nowrap;
}
.btn-wallet:hover { filter: brightness(1.08); }
.btn-wallet:active { transform: translateY(1px); }
.btn-wallet.connected {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-weight: 500;
}
.btn-wallet.connected .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
}

/* Data mode toggle */
.mode-toggle {
  display: flex; height: 30px;
  border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--surface); padding: 2px;
  font-size: 11px; gap: 1px;
}
.mode-toggle button {
  background: transparent; border: 0; color: var(--text-muted);
  padding: 0 10px; border-radius: 5px; font-size: 11px;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.mode-toggle button.active {
  background: var(--bg-elev); color: var(--text);
  box-shadow: 0 0 0 1px var(--border) inset;
}

/* ============================================================
   Page layout
   ============================================================ */
.page {
  max-width: 1440px;
  margin: 0 auto;
  padding: var(--sp-6) var(--sp-6) var(--sp-12);
  position: relative;
}

/* ============================================================
   Home — Hero
   ============================================================ */
.hero {
  position: relative;
  padding: var(--sp-10) 0 var(--sp-6);
  border-bottom: 1px solid var(--divider);
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-muted);
  padding: 4px 10px; border: 1px solid var(--border);
  border-radius: 999px; background: var(--surface);
  margin-bottom: var(--sp-5);
}
.hero-eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}
.hero-title {
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  font-weight: 500;
  margin: 0 0 var(--sp-4);
  max-width: 14ch;
}
.hero-title .accent { color: var(--accent); }
.hero-title .strike {
  position: relative;
  font-style: italic; color: var(--text-muted); font-weight: 400;
}
.hero-sub {
  max-width: 56ch; color: var(--text-dim);
  font-size: 16px; line-height: 1.55;
  margin: 0 0 var(--sp-6);
}
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.cta-primary, .cta-ghost {
  height: 42px; padding: 0 18px; border-radius: 999px;
  font-size: 13px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 10px;
  letter-spacing: 0.01em;
  transition: all .15s;
}
.cta-primary {
  background: var(--accent); color: #08090c; border: 0;
}
.cta-primary:hover { filter: brightness(1.08); }
.cta-ghost {
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border);
}
.cta-ghost:hover { border-color: var(--border-strong); background: var(--surface-2); }
.cta-arrow { transition: transform .15s; }
.cta-primary:hover .cta-arrow,
.cta-ghost:hover .cta-arrow { transform: translateX(2px); }

/* Hero ticker line — Bloomberg style */
.hero-ticker {
  margin-top: var(--sp-8);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  overflow: hidden;
}
.tick-cell {
  padding: var(--sp-4) var(--sp-5);
  border-right: 1px solid var(--divider);
  position: relative;
}
.tick-cell:last-child { border-right: 0; }
.tick-label {
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 6px;
  display: flex; align-items: center; gap: 6px;
}
.tick-label .led {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 6px var(--accent);
}
.tick-value {
  font-family: var(--font-mono); font-size: 22px;
  font-feature-settings: "tnum"; letter-spacing: -0.01em;
  color: var(--text);
}
.tick-unit { color: var(--text-muted); font-size: 13px; margin-left: 4px; }
.tick-delta { font-size: 11px; color: var(--accent); margin-top: 4px; font-family: var(--font-mono); }

/* Hero side mini chart */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-10);
  align-items: end;
}
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: var(--sp-6); }
}

.hero-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-5);
  position: relative;
}
.hero-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--sp-4);
}
.hero-panel-title {
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-muted);
}
.hero-panel-badge {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--accent);
  padding: 2px 8px; border-radius: 999px;
  background: var(--accent-glow);
}

/* ============================================================
   Feature cards
   ============================================================ */
.section {
  padding-top: var(--sp-10);
}
.section-head {
  display: flex; align-items: end; justify-content: space-between;
  margin-bottom: var(--sp-5); gap: var(--sp-4);
}
.section-eyebrow {
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 6px;
}
.section-title {
  font-size: 28px; font-weight: 500; letter-spacing: -0.01em;
  margin: 0; max-width: 22ch;
}

.feature-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-4);
}
@media (max-width: 980px) {
  .feature-grid { grid-template-columns: 1fr; }
}
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-6);
  position: relative;
  overflow: hidden;
  min-height: 240px;
  display: flex; flex-direction: column;
}
.feature-num {
  font-family: var(--font-mono); font-size: 11px; color: var(--text-muted);
  margin-bottom: var(--sp-4);
}
.feature-icon {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--bg-elev);
  margin-bottom: var(--sp-4);
  color: var(--accent);
}
.feature-icon svg { display: block; }
.feature-title {
  font-size: 18px; font-weight: 500; margin: 0 0 var(--sp-2);
}
.feature-desc { color: var(--text-dim); font-size: 13px; line-height: 1.55; }
.feature-meta {
  margin-top: auto; padding-top: var(--sp-4);
  border-top: 1px dashed var(--divider);
  display: flex; justify-content: space-between;
  font-family: var(--font-mono); font-size: 11px; color: var(--text-muted);
}
.feature-meta .v { color: var(--text); }

/* ============================================================
   Flow diagram
   ============================================================ */
.flow-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-6);
  position: relative;
  overflow: hidden;
}
.flow-svg { width: 100%; height: auto; display: block; }
.flow-node-bg {
  fill: var(--surface-2); stroke: var(--border-strong); stroke-width: 1;
}
.flow-node-bg.accent { stroke: var(--accent); }
.flow-node-bg.gold { stroke: var(--gold); }
.flow-node-bg.amber { stroke: var(--warn); }
.flow-text { fill: var(--text); font-family: var(--font-sans); font-size: 13px; }
.flow-sub  { fill: var(--text-muted); font-family: var(--font-mono); font-size: 11px; }
.flow-line { stroke: var(--border-strong); stroke-width: 1; fill: none; }
.flow-line.dashed { stroke-dasharray: 4 3; }
.flow-arrow { fill: var(--text-muted); }

.flow-dot {
  fill: var(--accent);
  filter: drop-shadow(0 0 4px var(--accent));
}

/* ============================================================
   Explorer
   ============================================================ */
.explore-head {
  display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between;
  gap: var(--sp-4);
  margin-bottom: var(--sp-5);
}
.explore-stats {
  display: flex; gap: 0;
  border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--surface); overflow: hidden;
}
.explore-stat {
  padding: 12px 18px;
  border-right: 1px solid var(--divider);
}
.explore-stat:last-child { border-right: 0; }
.explore-stat .lbl { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted); }
.explore-stat .val { font-family: var(--font-mono); font-size: 18px; margin-top: 4px; color: var(--text); }

.toolbar {
  display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center;
  margin-bottom: var(--sp-4);
}
.search-input {
  flex: 1; min-width: 240px;
  height: 36px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--r-md);
  padding: 0 12px 0 36px;
  font-size: 13px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235d6478' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 12px center;
}
.search-input:focus { outline: 0; border-color: var(--border-strong); }

.sort-tabs {
  display: flex; gap: 0;
  border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--surface); padding: 2px;
  flex-shrink: 0;
}
.sort-tabs button {
  background: transparent; border: 0; color: var(--text-muted);
  padding: 6px 12px; border-radius: 5px; font-size: 12px;
  font-family: var(--font-sans);
  white-space: nowrap;
}
.sort-tabs button.active {
  background: var(--bg-elev); color: var(--text);
  box-shadow: 0 0 0 1px var(--border) inset;
}

/* Vault table */
.vault-table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  font-size: 13px;
}
.vault-table thead th {
  text-align: left;
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-muted); font-weight: 500;
  padding: 12px var(--sp-4);
  border-bottom: 1px solid var(--border);
  background: var(--bg-elev);
  white-space: nowrap;
}
.vault-table tbody tr {
  cursor: pointer;
  transition: background .12s;
}
.vault-table tbody tr:hover { background: var(--surface-2); }
.vault-table tbody td {
  padding: 14px var(--sp-4);
  border-bottom: 1px solid var(--divider);
}
.vault-table tbody tr:last-child td { border-bottom: 0; }
.vault-table .num { font-family: var(--font-mono); font-feature-settings: "tnum"; }
.vault-table .right { text-align: right; }

.tok {
  display: flex; align-items: center; gap: 10px;
}
.tok-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  color: #08090c;
  flex-shrink: 0;
}
.tok-name { font-weight: 500; }
.tok-sub  { font-size: 11px; color: var(--text-muted); font-family: var(--font-mono); }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 8px; border-radius: 999px;
  font-size: 11px; letter-spacing: 0.04em;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  white-space: nowrap;
}
.pill .pdot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.pill.live { color: var(--accent); border-color: rgba(95,208,126,0.25); background: rgba(95,208,126,0.05); }
.pill.live .pdot { background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.pill.ready { color: var(--gold); border-color: rgba(255,209,102,0.35); background: rgba(255,209,102,0.06); }
.pill.ready .pdot { background: var(--gold); box-shadow: 0 0 6px var(--gold); }
.pill.idle { color: var(--text-muted); }
.pill.idle .pdot { background: var(--text-muted); }

.pnl-cell {
  display: inline-block; padding: 2px 8px; border-radius: var(--r-xs);
  font-family: var(--font-mono); font-size: 12px;
}
.pnl-cell.pos { color: var(--accent); background: rgba(95,208,126,0.08); }
.pnl-cell.neg { color: var(--danger); background: rgba(255,107,107,0.08); }
.pnl-cell.flat { color: var(--text-muted); background: var(--surface-hi); }

/* Spark line */
.spark { width: 80px; height: 24px; display: inline-block; vertical-align: middle; }

/* ============================================================
   Detail page
   ============================================================ */
.detail-header {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-5) var(--sp-6);
  display: grid; grid-template-columns: 1fr auto; gap: var(--sp-4);
  align-items: center; margin-bottom: var(--sp-4);
}
.detail-header-left {
  display: flex; align-items: center; gap: var(--sp-4);
}
.detail-meta-grid {
  display: flex; gap: var(--sp-6);
  align-items: center;
}
.detail-meta-grid .k { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted); }
.detail-meta-grid .v { font-family: var(--font-mono); font-size: 13px; margin-top: 2px; }
.copy-addr {
  background: transparent; border: 0; color: var(--text-muted);
  font-family: var(--font-mono); font-size: 12px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 8px; border-radius: var(--r-sm);
}
.copy-addr:hover { color: var(--text); background: var(--surface-2); }

.tok-avatar-lg {
  width: 44px; height: 44px;
}
.detail-titles { display: flex; flex-direction: column; }
.detail-symbol {
  font-size: 22px; font-weight: 600; letter-spacing: -0.01em;
  display: flex; align-items: center; gap: 10px;
}
.detail-name { color: var(--text-dim); font-size: 13px; margin-top: 2px; }

.detail-oracle {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px;
  border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--bg-elev);
}
.detail-oracle .lbl { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted); }
.detail-oracle .val { font-family: var(--font-mono); font-size: 13px; }
.detail-oracle .dot {
  width: 7px; height: 7px; border-radius: 50%;
}
.detail-oracle.healthy .dot { background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.detail-oracle.slow .dot    { background: var(--warn); box-shadow: 0 0 6px var(--warn); }
.detail-oracle.stale .dot   { background: var(--danger); box-shadow: 0 0 6px var(--danger); }

/* Two-column data grid */
.detail-cols {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4);
  margin-bottom: var(--sp-4);
}
@media (max-width: 980px) { .detail-cols { grid-template-columns: 1fr; } }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-5) var(--sp-6);
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--sp-4); padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--divider);
}
.panel-title {
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-muted);
}
.panel-title .h { color: var(--text); font-size: 13px; letter-spacing: 0; text-transform: none; margin-right: 8px; }
.kv-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 10px 0; border-bottom: 1px dashed var(--divider);
}
.kv-row:last-child { border-bottom: 0; }
.kv-row .k { color: var(--text-dim); font-size: 13px; }
.kv-row .v { font-family: var(--font-mono); font-size: 14px; color: var(--text); }
.kv-row .v .unit { color: var(--text-muted); margin-left: 4px; font-size: 12px; }
.kv-row.big .v { font-size: 18px; }

/* Harvest panel */
.harvest-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-6);
  margin-bottom: var(--sp-4);
}
.harvest-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: var(--sp-4);
}
.harvest-head .title {
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-muted);
}
.harvest-head .pct {
  font-family: var(--font-mono); font-size: 28px;
  color: var(--text);
  letter-spacing: -0.01em;
}
.harvest-bar-track {
  height: 12px; background: var(--bg-elev);
  border-radius: 999px; overflow: hidden;
  border: 1px solid var(--border);
  position: relative;
}
.harvest-bar-fill {
  height: 100%; background: linear-gradient(90deg, var(--accent-dim), var(--accent));
  border-radius: 999px;
  transition: width .8s cubic-bezier(.2,.7,.2,1);
  position: relative;
  box-shadow: 0 0 12px var(--accent-glow);
}
.harvest-bar-fill::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  animation: shimmer 2.4s infinite linear;
}
.harvest-panel.ready .harvest-bar-fill {
  background: linear-gradient(90deg, var(--gold-dim), var(--gold));
  box-shadow: 0 0 20px var(--gold-glow);
  animation: pulse-gold 1.6s infinite;
}
.harvest-panel.ready .pct { color: var(--gold); }
.harvest-panel.ready { box-shadow: 0 0 0 1px rgba(255,209,102,0.35), 0 0 40px rgba(255,209,102,0.15); }

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
@keyframes pulse-gold {
  0%,100% { box-shadow: 0 0 20px var(--gold-glow); }
  50%     { box-shadow: 0 0 30px rgba(255,209,102,0.55); }
}

.harvest-foot {
  display: flex; justify-content: space-between; margin-top: var(--sp-4);
  color: var(--text-dim); font-size: 12px;
}
.harvest-foot .threshold { color: var(--text-muted); font-family: var(--font-mono); }
.harvest-foot .target { color: var(--text); font-family: var(--font-mono); }

/* Action buttons */
.actions {
  display: grid; grid-template-columns: 1fr 1fr auto; gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}
@media (max-width: 720px) {
  .actions { grid-template-columns: 1fr; }
}
.act-btn {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-4) var(--sp-5);
  color: var(--text);
  text-align: left;
  display: flex; align-items: center; gap: var(--sp-4);
  transition: all .15s;
  position: relative; overflow: hidden;
}
.act-btn:hover:not(.disabled) {
  border-color: var(--border-strong);
  background: var(--surface-2);
}
.act-btn.disabled { opacity: 0.5; cursor: not-allowed; }
.act-btn .ic {
  width: 42px; height: 42px; flex: 0 0 42px;
  border-radius: var(--r-sm);
  display: grid; place-items: center;
  background: var(--bg-elev); border: 1px solid var(--border);
  color: var(--accent);
}
.act-btn.harvest .ic { color: var(--gold); }
.act-btn .lbl {
  font-size: 16px; font-weight: 500;
}
.act-btn .sub { font-size: 11px; color: var(--text-muted); font-family: var(--font-mono); margin-top: 2px; }
.act-btn.ready {
  border-color: rgba(255,209,102,0.5);
  background: linear-gradient(135deg, rgba(255,209,102,0.05), rgba(255,209,102,0.01));
  box-shadow: 0 0 0 1px rgba(255,209,102,0.2), 0 0 24px rgba(255,209,102,0.08);
  animation: ready-pulse 2.4s infinite;
}
.act-btn.ready .lbl { color: var(--gold); }
@keyframes ready-pulse {
  0%,100% { box-shadow: 0 0 0 1px rgba(255,209,102,0.2), 0 0 24px rgba(255,209,102,0.08); }
  50%     { box-shadow: 0 0 0 1px rgba(255,209,102,0.5), 0 0 36px rgba(255,209,102,0.25); }
}
.act-mini {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); color: var(--text-dim);
  width: 42px; height: 100%; min-height: 76px;
  display: grid; place-items: center;
}
.act-mini:hover { color: var(--text); border-color: var(--border-strong); }

/* Staking panel */
.stake-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-6);
  margin-bottom: var(--sp-4);
}
.stake-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-6);
  padding-bottom: var(--sp-5);
  margin-bottom: var(--sp-5);
  border-bottom: 1px solid var(--divider);
}
@media (max-width: 820px) {
  .stake-grid { grid-template-columns: 1fr; }
}
.stake-col-title {
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: var(--sp-3);
}

.stake-form-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: var(--sp-3);
  align-items: center;
  margin-bottom: var(--sp-3);
}
@media (max-width: 720px) {
  .stake-form-row { grid-template-columns: 1fr; }
}
.amount-input {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 0 var(--sp-3); height: 44px;
  display: flex; align-items: center; gap: var(--sp-3);
}
.amount-input input {
  background: transparent; border: 0; color: var(--text);
  flex: 1; min-width: 0;
  font-family: var(--font-mono); font-size: 16px;
  font-feature-settings: "tnum";
  outline: none;
}
.amount-input .sym { color: var(--text-muted); font-family: var(--font-mono); font-size: 13px; }
.amount-input .max {
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-dim); font-size: 11px;
  padding: 4px 10px; border-radius: var(--r-sm);
}
.amount-input .max:hover { color: var(--accent); border-color: var(--accent); }

.btn {
  border: 0; border-radius: var(--r-md);
  padding: 0 18px; height: 44px;
  font-weight: 600; font-size: 13px; letter-spacing: 0.02em;
  display: inline-flex; align-items: center; gap: 8px;
  transition: all .15s;
}
.btn-primary { background: var(--accent); color: #08090c; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-secondary {
  background: var(--surface-2); color: var(--text); border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--border-strong); background: var(--surface-hi); }
.btn-gold {
  background: linear-gradient(180deg, var(--gold), var(--gold-dim));
  color: #08090c;
  box-shadow: 0 0 24px var(--gold-glow);
}
.btn:disabled, .btn.disabled {
  opacity: 0.5; cursor: not-allowed; filter: none;
}

.cooldown-bar {
  margin-top: 10px;
  height: 4px; background: var(--bg-elev); border-radius: 999px;
  overflow: hidden;
}
.cooldown-fill {
  height: 100%; background: linear-gradient(90deg, var(--warn), var(--accent));
  transition: width .4s linear;
}
.cooldown-text {
  font-size: 11px; color: var(--text-muted); margin-top: 4px; font-family: var(--font-mono);
}

/* Events log */
.events {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-5) var(--sp-6);
  font-family: var(--font-mono); font-size: 12px;
}
.event-row {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: var(--sp-3);
  padding: 8px 0;
  border-bottom: 1px dashed var(--divider);
  color: var(--text-dim);
}
.event-row:last-child { border-bottom: 0; }
.event-row .time { color: var(--text-muted); }
.event-row .tag {
  padding: 1px 8px; border-radius: 3px;
  font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase;
  border: 1px solid var(--border); color: var(--text);
  margin-right: 8px;
}
.event-row .tag.tax { color: var(--accent); border-color: rgba(95,208,126,0.3); }
.event-row .tag.tick { color: var(--info); border-color: rgba(106,169,240,0.3); }
.event-row .tag.harvest { color: var(--gold); border-color: rgba(255,209,102,0.3); }
.event-row .tag.stake { color: var(--text); }
.event-row .by { color: var(--text-muted); }

/* ============================================================
   Tweaks panel
   ============================================================ */
.tweaks-fab {
  position: fixed; right: 18px; bottom: 18px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
  display: grid; place-items: center;
  cursor: pointer;
  z-index: 90;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.tweaks-fab:hover { color: var(--text); border-color: var(--border-strong); }

.tweaks-panel {
  position: fixed; right: 18px; bottom: 70px;
  width: 320px; max-height: 70vh;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  z-index: 100;
  display: none; flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.02);
}
.tweaks-panel.open { display: flex; }
.tweaks-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--divider);
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-muted);
}
.tweaks-head button { background: transparent; border: 0; color: var(--text-muted); }
.tweaks-body {
  overflow: auto; padding: 12px 16px 16px;
  display: flex; flex-direction: column; gap: 18px;
}
.tweak-group { display: flex; flex-direction: column; gap: 8px; }
.tweak-label {
  font-size: 11px; color: var(--text-muted); letter-spacing: 0.06em;
  text-transform: uppercase;
}
.tweak-row {
  display: flex; gap: 4px; padding: 2px;
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--r-sm);
}
.tweak-row button {
  background: transparent; border: 0; color: var(--text-dim);
  padding: 6px 10px; border-radius: 4px;
  font-size: 12px; flex: 1;
}
.tweak-row button.active {
  background: var(--surface-hi); color: var(--text);
  box-shadow: 0 0 0 1px var(--border) inset;
}
.swatch-row {
  display: flex; gap: 8px;
}
.swatch {
  width: 32px; height: 32px; border-radius: var(--r-sm);
  border: 1px solid var(--border);
  cursor: pointer; position: relative;
}
.swatch.active { box-shadow: 0 0 0 2px var(--text); }
.swatch[data-c="green"]  { background: #5fd07e; }
.swatch[data-c="amber"]  { background: #f4b13c; }
.swatch[data-c="cyan"]   { background: #56d3e0; }
.swatch[data-c="violet"] { background: #a78bfa; }

/* ============================================================
   Toast
   ============================================================ */
.toast-container {
  position: fixed; top: 70px; right: 18px;
  display: flex; flex-direction: column; gap: 8px;
  z-index: 200; pointer-events: none;
}
.toast {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 16px;
  display: flex; align-items: center; gap: 12px;
  min-width: 280px; max-width: 380px;
  font-size: 13px;
  pointer-events: auto;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  animation: toast-in .3s ease-out;
}
.toast.success { border-color: rgba(95,208,126,0.4); }
.toast.success .ic { color: var(--accent); }
.toast.error   { border-color: rgba(255,107,107,0.4); }
.toast.error .ic { color: var(--danger); }
.toast.info .ic { color: var(--info); }
.toast .body { flex: 1; }
.toast .title { font-weight: 500; }
.toast .sub { color: var(--text-muted); font-size: 11px; margin-top: 2px; font-family: var(--font-mono); }

@keyframes toast-in {
  from { transform: translateX(20px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

/* ============================================================
   Misc
   ============================================================ */
.crumb {
  font-size: 12px; color: var(--text-muted);
  display: flex; align-items: center; gap: 8px;
  margin-bottom: var(--sp-4);
}
.crumb a { color: var(--text-dim); }
.crumb a:hover { color: var(--text); }
.crumb .sep { color: var(--text-faint); }

.empty {
  padding: var(--sp-12) var(--sp-6);
  text-align: center; color: var(--text-muted);
  border: 1px dashed var(--border);
  border-radius: var(--r-md);
}

.divider-h {
  height: 1px; background: var(--divider); margin: var(--sp-6) 0;
}

/* Responsive header */
@media (max-width: 1080px) {
  .header-inner { gap: var(--sp-3); }
  .header-nav { gap: 0; }
}
@media (max-width: 880px) {
  .header-nav a:last-child { display: none; }
  .net-pill .chain { display: none; }
}
@media (max-width: 720px) {
  .header-inner { padding: 0 var(--sp-4); gap: var(--sp-3); }
  .header-nav { display: none; }
  .net-pill .chain { display: none; }
  .page { padding: var(--sp-4); }
  .hero-title { font-size: 38px; }
  .hero-ticker { grid-template-columns: 1fr 1fr; }
  .tick-cell:nth-child(2) { border-right: 0; }
  .detail-header { grid-template-columns: 1fr; }
  .detail-meta-grid { flex-wrap: wrap; gap: var(--sp-3); }
}
