/* HEX Miner — dark "blue laser" dashboard. No framework, no CDN, no webfonts. */

:root {
  /* deep space base */
  --bg:        #04060e;
  --bg-2:      #070b16;
  --card:      #0a1020;
  --card-2:    #0d1526;
  --card-3:    #101a2e;
  --line:      #1b2942;
  --line-hot:  #24406b;

  /* laser palette */
  --laser:     #22d3ee;   /* cyan — primary */
  --laser-2:   #3b82f6;   /* blue — secondary */
  --laser-3:   #7c9dff;   /* periwinkle */
  --violet:    #a78bfa;

  --text:      #e8f1ff;
  --muted:     #7e93b5;
  --dim:       #55678a;

  --good:      #34e5b0;
  --bad:       #ff5d7d;
  --warn:      #ffc94a;

  --accent:    var(--laser);
  --glow:      0 0 12px rgba(34, 211, 238, .45);
  --radius:    16px;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  color: var(--text);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  overflow-x: hidden;
}

/* laser grid + horizon glow, painted behind everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(1200px 620px at 15% -10%, rgba(34, 211, 238, .16), transparent 62%),
    radial-gradient(1000px 520px at 88% -4%,  rgba(59, 130, 246, .15), transparent 62%),
    radial-gradient(900px 700px at 50% 108%,  rgba(124, 157, 255, .09), transparent 60%),
    linear-gradient(rgba(34, 211, 238, .045) 1px, transparent 1px) 0 0 / 100% 44px,
    linear-gradient(90deg, rgba(34, 211, 238, .045) 1px, transparent 1px) 0 0 / 44px 100%;
  mask-image: linear-gradient(180deg, #000 0%, #000 55%, transparent 100%);
}

body > * { position: relative; z-index: 1; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 22px; }

/* ---------------------------------------------------------------- topbar */

.topbar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 15px 22px;
  max-width: 1240px;
  margin: 0 auto;
  flex-wrap: wrap;
  position: relative;
  /* `body > *` gives every top-level block z-index 1, so without this the header creates a
     stacking context that <main> paints over — and the notice panel could never escape it. */
  z-index: 30;
}

.topbar::after {
  content: "";
  position: absolute;
  left: 22px; right: 22px; bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--laser), var(--laser-2), transparent);
  opacity: .55;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 750;
  font-size: 17px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  color: var(--laser);
  font-size: 22px;
  line-height: 1;
  filter: drop-shadow(0 0 8px rgba(34, 211, 238, .9));
  animation: pulse 3.2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: .62; }
}

.nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }

.nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 7px 14px;
  border-radius: 9px;
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: .4px;
  border: 1px solid transparent;
  transition: color .16s, background .16s, border-color .16s;
}

.nav a:hover { color: var(--text); background: rgba(34, 211, 238, .07); }

.nav a.active {
  color: var(--laser);
  background: rgba(34, 211, 238, .10);
  border-color: rgba(34, 211, 238, .35);
  box-shadow: inset 0 0 14px rgba(34, 211, 238, .12);
}

/* ---------------------------------------------------------------- buttons */

.btn {
  appearance: none;
  border: 1px solid var(--line-hot);
  background: linear-gradient(180deg, var(--card-2), var(--card));
  color: var(--text);
  padding: 9px 16px;
  border-radius: 10px;
  font: inherit;
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: .3px;
  cursor: pointer;
  transition: border-color .16s, box-shadow .16s, transform .06s, color .16s;
}

.btn:hover:not(:disabled) {
  border-color: var(--laser);
  color: var(--laser);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, .18), 0 0 18px rgba(34, 211, 238, .22);
}

.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: default; }

.btn-primary {
  background: linear-gradient(135deg, var(--laser), var(--laser-2));
  border-color: transparent;
  color: #02121b;
  font-weight: 750;
  box-shadow: 0 0 22px rgba(34, 211, 238, .34);
}

.btn-primary:hover:not(:disabled) {
  color: #02121b;
  box-shadow: 0 0 30px rgba(34, 211, 238, .55);
}

.btn-danger { border-color: #52243a; color: #ff9ab0; }
.btn-danger:hover:not(:disabled) {
  border-color: var(--bad);
  color: var(--bad);
  box-shadow: 0 0 16px rgba(255, 93, 125, .25);
}

/* ---------------------------------------------------------------- status */

.statusbar {
  max-width: 1240px;
  margin: 14px auto;
  padding: 0 22px;
  min-height: 20px;
  font-size: 12.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  font-family: var(--mono);
}

.statusbar .sep { opacity: .35; }

/* ---------------------------------------------------------------- viewing a link's address */

/* Periwinkle rather than the usual cyan: this is a state you are temporarily in, not a
   warning and not part of the dashboard proper. */
.viewing {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding: 12px 16px;
  border: 1px solid rgba(124, 157, 255, .32);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(124, 157, 255, .10), rgba(124, 157, 255, .04));
  box-shadow: 0 0 22px rgba(124, 157, 255, .10);
  font-size: 13.5px;
}

.viewing-icon { color: var(--laser-3); font-size: 16px; text-shadow: 0 0 10px rgba(124, 157, 255, .8); }
.viewing-text { flex: 1 1 300px; }
.viewing-text .mono { color: var(--laser-3); font-size: 12.5px; }
.viewing-text .muted, .viewing-text .bad { display: block; font-size: 12.5px; margin-top: 2px; }
.viewing-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.btn-sm {
  padding: 6px 12px;
  font-size: 12.5px;
  border-radius: 8px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.dot.ok  { background: var(--good); box-shadow: 0 0 8px var(--good); }
.dot.bad { background: var(--bad);  box-shadow: 0 0 8px var(--bad); }

.spinner {
  width: 12px; height: 12px;
  border: 2px solid rgba(34, 211, 238, .2);
  border-top-color: var(--laser);
  border-radius: 50%;
  display: inline-block;
  animation: spin .7s linear infinite;
  filter: drop-shadow(0 0 5px rgba(34, 211, 238, .7));
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- cards */

.card {
  background:
    linear-gradient(180deg, rgba(34, 211, 238, .035), transparent 42%),
    var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 20px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .035);
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.section-head h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  color: var(--laser);
}

.section-head .controls { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

select {
  appearance: none;
  background: var(--card-2);
  color: var(--text);
  border: 1px solid var(--line-hot);
  border-radius: 9px;
  padding: 7px 12px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

select:hover { border-color: var(--laser); color: var(--laser); }

/* ---------------------------------------------------------------- notice bell */

.bell-wrap { position: relative; }

.btn-bell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 11px;
  color: var(--dim);
}

.btn-bell.has-notices { color: var(--laser); border-color: rgba(34, 211, 238, .4); }

.btn-bell[data-severity="warn"] {
  color: var(--bad);
  border-color: rgba(255, 93, 125, .45);
  box-shadow: 0 0 16px rgba(255, 93, 125, .2);
}

.btn-bell[data-severity="warn"] svg { animation: bell-nudge 4s ease-in-out infinite; }
.btn-bell[data-severity="good"] { color: var(--good); border-color: rgba(52, 229, 176, .4); }
.btn-bell svg { filter: drop-shadow(0 0 6px currentColor); }

@keyframes bell-nudge {
  0%, 88%, 100% { transform: rotate(0); }
  91%           { transform: rotate(-11deg); }
  94%           { transform: rotate(9deg); }
  97%           { transform: rotate(-5deg); }
}

.bell-count {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: currentColor;
  color: inherit;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 17px;
  text-align: center;
  box-shadow: 0 0 10px currentColor;
}

.btn-bell.has-notices .bell-count { background: var(--laser); color: #04121a; }
.btn-bell[data-severity="warn"] .bell-count { background: var(--bad); color: #2a0710; }
.btn-bell[data-severity="good"] .bell-count { background: var(--good); color: #04211a; }

.notice-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 40;
  width: min(430px, calc(100vw - 30px));
  max-height: min(70vh, 560px);
  overflow-y: auto;
  background: linear-gradient(180deg, rgba(34, 211, 238, .05), transparent 30%), #0b1322;
  border: 1px solid var(--line-hot);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .7), 0 0 30px rgba(34, 211, 238, .10);
  animation: notice-in .16s ease-out;
}

@keyframes notice-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}

.notice-head {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--laser);
  padding: 13px 16px 10px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: #0b1322;
}

.notice {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(27, 41, 66, .6);
  border-left: 2px solid transparent;
}

.notice:last-child { border-bottom: none; }
.notice.warn { border-left-color: var(--bad); background: rgba(255, 93, 125, .05); }
.notice.good { border-left-color: var(--good); background: rgba(52, 229, 176, .05); }
.notice.info { border-left-color: var(--laser); background: rgba(34, 211, 238, .04); }

.notice-icon { font-size: 15px; line-height: 1.3; flex: 0 0 auto; }
.notice.warn .notice-icon { color: var(--bad); }
.notice.good .notice-icon { color: var(--good); }
.notice.info .notice-icon { color: var(--laser); }

.notice-title { font-weight: 700; font-size: 13.5px; margin-bottom: 4px; color: var(--text); }
.notice-body { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.notice-body b { color: var(--text); font-weight: 700; }
.notice-body code { font-family: var(--mono); font-size: 11.5px; color: var(--laser); }
.notice-body em { font-style: normal; font-weight: 700; color: var(--text); }

.notice-links { display: flex; gap: 13px; margin-top: 8px; font-size: 11.5px; }
.notice-links a { color: var(--laser-3); text-decoration: none; font-weight: 600; }
.notice-links a:hover { color: var(--laser); text-decoration: underline; }

.notice-empty { padding: 20px 16px; color: var(--dim); font-size: 12.5px; }

@media (max-width: 540px) {
  /* The header wraps on small screens, so the bell is no longer at the right edge and
     right-aligning the panel to it pushes the panel off screen. Anchor to the viewport
     instead; `top` is set from JS because the wrapped header's height varies. */
  .notice-panel {
    position: fixed;
    left: 12px;
    right: 12px;
    width: auto;
    max-height: calc(100vh - var(--notice-top, 120px) - 20px);
    top: var(--notice-top, 120px);
  }
}

/* ---------------------------------------------------------------- secondary mints */

.mint-block {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line-hot);
}

.mint-block .tile-label { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; }

.mint-help {
  color: var(--laser);
  text-decoration: none;
  font-size: 10px;
  letter-spacing: .4px;
  border: 1px solid rgba(34, 211, 238, .3);
  border-radius: 5px;
  padding: 1px 6px;
  text-transform: none;
}

.mint-help:hover { background: rgba(34, 211, 238, .12); }

.mint-row {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  padding: 6px 0;
  border-bottom: 1px solid rgba(27, 41, 66, .5);
}

.mint-row:last-child { border-bottom: none; }

.mint-name {
  font-weight: 750;
  font-size: 11.5px;
  letter-spacing: .5px;
  color: var(--accent);
  min-width: 54px;
}

.mint-amt {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.mint-pill {
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .7px;
  padding: 2px 7px;
  border-radius: 20px;
  border: 1px solid var(--line-hot);
  color: var(--dim);
  white-space: nowrap;
}

.mint-pill.ready   { color: var(--good); border-color: rgba(52, 229, 176, .45); background: rgba(52, 229, 176, .10); }
.mint-pill.warn    { color: var(--warn); border-color: rgba(255, 201, 74, .45); background: rgba(255, 201, 74, .10); }
.mint-pill.done    { color: var(--laser-3); border-color: rgba(124, 157, 255, .4); background: rgba(124, 157, 255, .10); }
.mint-pill.blocked { color: var(--bad); border-color: rgba(255, 93, 125, .35); background: rgba(255, 93, 125, .08); }

.mint-best { font-size: 11px; color: var(--warn); font-family: var(--mono); }

.mint-flags { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }

.mint-flag {
  font-size: 10.5px;
  color: var(--muted);
  background: rgba(255, 255, 255, .035);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 2px 7px;
  cursor: help;
}

.mint-flag.bad { color: #ffb3c1; border-color: rgba(255, 93, 125, .35); background: rgba(255, 93, 125, .07); }
.mint-flag.warn { color: #ffe0a0; border-color: rgba(255, 201, 74, .35); background: rgba(255, 201, 74, .07); }
.mint-flag.good { color: #9ff2d8; border-color: rgba(52, 229, 176, .35); background: rgba(52, 229, 176, .07); }

/* A row for something this stake structurally cannot mint — present for completeness,
   dimmed so it never competes with a row that is actually actionable. */
.mint-row.muted-row { opacity: .55; }

/* Token swatch in the cross-chain side-stake table. */
.tok-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 7px;
  vertical-align: middle;
}

.badge.fixed { --accent: var(--violet); }

.token-blurb {
  color: var(--muted);
  font-size: 12.5px;
  margin: 11px 0 0;
  line-height: 1.45;
}

.kv dd.supply { color: var(--laser); text-shadow: 0 0 10px rgba(34, 211, 238, .35); }

.tier-strip { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 13px; }

.tier-chip {
  font-size: 10px;
  font-family: var(--mono);
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 2px 6px;
  cursor: help;
  white-space: nowrap;
}

.tier-chip b { color: var(--text); font-weight: 700; }
.tier-chip.full { border-color: rgba(255, 93, 125, .35); color: #ffb3c1; background: rgba(255, 93, 125, .06); }
.tier-chip.full b { color: #ffb3c1; }

/* ---------------------------------------------------------------- jdai page */

.hero-warn {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 201, 74, .28);
  border-left: 2px solid var(--warn);
  border-radius: 8px;
  background: rgba(255, 201, 74, .06);
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

.jdai-hero { grid-template-columns: minmax(230px, 1fr) 1.5fr; }
.jdai-hero .hero-value { color: #ffe9b8; text-shadow: 0 0 26px rgba(255, 201, 74, .5), 0 0 60px rgba(255, 201, 74, .2); }
.jdai-hero::before { background: linear-gradient(90deg, transparent, var(--warn) 25%, var(--laser) 70%, transparent); box-shadow: 0 0 16px rgba(255, 201, 74, .6); }

.jdai-pitch p { color: var(--muted); font-size: 13.5px; margin: 0 0 10px; line-height: 1.55; }
.jdai-pitch b { color: var(--text); }

.token-links { display: flex; gap: 13px; flex-wrap: wrap; margin-top: 14px; font-size: 11.5px; }
.token-links a { color: var(--laser-3); text-decoration: none; }
.token-links a:hover { color: var(--laser); text-decoration: underline; }

/* ---------------------------------------------------------------- hero */

.hero {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) 1.9fr;
  gap: 28px;
  align-items: center;
  position: relative;
  overflow: hidden;
  border-color: var(--line-hot);
  background:
    radial-gradient(700px 240px at 6% 0%, rgba(34, 211, 238, .16), transparent 68%),
    radial-gradient(600px 220px at 96% 100%, rgba(59, 130, 246, .13), transparent 68%),
    var(--card);
}

.hero::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--laser) 22%, var(--laser-2) 62%, transparent);
  box-shadow: 0 0 16px rgba(34, 211, 238, .8);
}

.hero-label, .tile-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--dim);
  font-weight: 700;
}

.hero-value {
  font-size: clamp(34px, 5.6vw, 52px);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.05;
  margin: 8px 0 6px;
  font-variant-numeric: tabular-nums;
  color: #d8fbff;
  text-shadow: 0 0 26px rgba(34, 211, 238, .65), 0 0 60px rgba(34, 211, 238, .28);
}

.hero-sub { color: var(--muted); font-size: 13px; font-family: var(--mono); }

.hero-breakdown {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 13px;
}

.tile {
  background: linear-gradient(180deg, rgba(34, 211, 238, .06), rgba(34, 211, 238, .01));
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 14px;
  transition: border-color .16s, box-shadow .16s;
}

.tile:hover {
  border-color: rgba(34, 211, 238, .42);
  box-shadow: 0 0 18px rgba(34, 211, 238, .14);
}

.tile-value {
  font-size: 21px;
  font-weight: 750;
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.tile-hint { font-size: 11px; color: var(--dim); margin-top: 4px; }

/* ---------------------------------------------------------------- chain cards */

.chain-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.chain-card {
  margin: 0;
  position: relative;
  overflow: hidden;
  transition: transform .18s, border-color .18s, box-shadow .18s;
}

.chain-card::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  box-shadow: 0 0 14px var(--accent);
}

.chain-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  box-shadow: 0 22px 50px rgba(0, 0, 0, .6), 0 0 28px color-mix(in srgb, var(--accent) 16%, transparent);
}

.chain-card.error::before { background: linear-gradient(90deg, transparent, var(--bad), transparent); }

.chain-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }

.chain-name {
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  font-size: 12.5px;
  color: var(--muted);
}

.badge {
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: .5px;
  padding: 3px 8px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  text-shadow: 0 0 10px color-mix(in srgb, var(--accent) 60%, transparent);
}

.badge.auto { --accent: var(--violet); }
/* A HEX stake held by its own contract rather than in the wallet's stake list. */
.badge.hsi { --accent: var(--laser-2); }

.chain-price {
  font-size: 30px;
  font-weight: 780;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: baseline;
  gap: 11px;
  flex-wrap: wrap;
  color: var(--text);
  text-shadow: 0 0 20px color-mix(in srgb, var(--accent) 40%, transparent);
}

/* A price from a pool too thin or too stale to trade at should not glow like a real one. */
.chain-price.unreliable { color: var(--muted); text-shadow: none; }

.price-flag {
  font-size: 10px;
  font-family: var(--mono);
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--warn);
  border: 1px solid rgba(255, 201, 74, .4);
  background: rgba(255, 201, 74, .09);
  border-radius: 5px;
  padding: 3px 7px;
  text-shadow: none;
  cursor: help;
}

.chg { font-size: 13px; font-weight: 700; font-family: var(--mono); }
.chg.up   { color: var(--good); text-shadow: 0 0 10px rgba(52, 229, 176, .5); }
.chg.down { color: var(--bad);  text-shadow: 0 0 10px rgba(255, 93, 125, .5); }

/* ---------------------------------------------------------------- key/value */

.kv { margin: 15px 0 0; display: grid; gap: 8px; }

.kv > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(27, 41, 66, .6);
}

.kv > div:last-child { border-bottom: none; padding-bottom: 0; }
.kv dt { color: var(--muted); font-size: 12.5px; }

.kv dd {
  margin: 0;
  font-weight: 680;
  font-variant-numeric: tabular-nums;
  text-align: right;
  font-family: var(--mono);
  font-size: 13.5px;
}

.usd { color: var(--dim); font-weight: 500; font-size: 11.5px; margin-left: 6px; }

/* ---------------------------------------------------------------- stakes */

.stake-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 18px;
}

.stake {
  background: linear-gradient(180deg, var(--card-3), var(--card-2));
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 17px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: transform .18s, border-color .18s, box-shadow .18s;
}

.stake::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--accent);
  box-shadow: 0 0 14px var(--accent);
}

.stake:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  box-shadow: 0 18px 40px rgba(0, 0, 0, .55), 0 0 24px color-mix(in srgb, var(--accent) 14%, transparent);
}

.stake.late     { --accent: var(--bad); }
.stake.matured  { --accent: var(--good); }
.stake.pending  { --accent: var(--dim); }
/* Settled by stakeGoodAccounting(): finished and safe, but not the same "act now" green
   as a matured stake burning through its grace window. */
.stake.unlocked { --accent: var(--laser-3); }

.stake > header {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.stake-id { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.chain-tag {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .8px;
  padding: 3px 7px;
  border-radius: 5px;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}

.owner {
  font-size: 10.5px;
  color: var(--muted);
  background: rgba(124, 157, 255, .10);
  border: 1px solid rgba(124, 157, 255, .22);
  padding: 2px 7px;
  border-radius: 5px;
}

.pill {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid;
  white-space: nowrap;
}

.pill.active  { color: var(--laser); border-color: rgba(34, 211, 238, .45); background: rgba(34, 211, 238, .10); box-shadow: 0 0 12px rgba(34, 211, 238, .18); }
.pill.matured { color: var(--good);  border-color: rgba(52, 229, 176, .45); background: rgba(52, 229, 176, .10); box-shadow: 0 0 12px rgba(52, 229, 176, .18); }
.pill.late    { color: var(--bad);   border-color: rgba(255, 93, 125, .45); background: rgba(255, 93, 125, .10); box-shadow: 0 0 12px rgba(255, 93, 125, .18); }
.pill.pending { color: var(--dim);   border-color: var(--line); background: rgba(255, 255, 255, .03); }
.pill.unlocked { color: var(--laser-3); border-color: rgba(124, 157, 255, .45); background: rgba(124, 157, 255, .10); box-shadow: 0 0 12px rgba(124, 157, 255, .18); }

.stake-progress { display: flex; align-items: center; gap: 15px; }

.ring {
  flex: 0 0 auto;
  color: var(--text);
  filter: drop-shadow(0 0 7px color-mix(in srgb, var(--accent) 55%, transparent));
}

.progress-days {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-family: var(--mono);
  font-size: 13.5px;
}

.if-ended {
  margin-top: 15px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-end;
}

.if-ended .net {
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  margin-top: 5px;
  font-family: var(--mono);
  font-size: 14px;
}

.if-ended .penalty { text-align: right; }

.if-ended .penalty > div:last-child {
  font-weight: 750;
  margin-top: 5px;
  font-variant-numeric: tabular-nums;
  font-family: var(--mono);
  font-size: 14px;
}

.good { color: var(--good); }
.bad  { color: var(--bad); }
.bpd  { color: var(--warn); text-shadow: 0 0 10px rgba(255, 201, 74, .45); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: var(--mono); font-size: 12px; }

/* ---------------------------------------------------------------- tables */

.table-scroll { overflow-x: auto; }

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  font-family: var(--mono);
}

table.data th {
  text-align: left;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--laser);
  font-weight: 700;
  padding: 0 14px 10px 0;
  white-space: nowrap;
  border-bottom: 1px solid var(--line-hot);
  font-family: inherit;
}

table.data td {
  padding: 11px 14px 11px 0;
  border-bottom: 1px solid rgba(27, 41, 66, .55);
  white-space: nowrap;
}

table.data tbody tr { transition: background .14s; }
table.data tbody tr:hover { background: rgba(34, 211, 238, .045); }
table.data tbody tr:last-child td { border-bottom: none; }

/* ---------------------------------------------------------------- empty / forms */

.empty { text-align: center; padding: 52px 24px; }

.empty h2 {
  margin: 0 0 12px;
  font-size: 23px;
  letter-spacing: .3px;
  color: var(--text);
  text-shadow: 0 0 22px rgba(34, 211, 238, .35);
}

.empty p { max-width: 580px; margin: 0 auto 8px; color: var(--muted); }
.empty-actions { display: flex; gap: 11px; justify-content: center; margin: 22px 0 14px; flex-wrap: wrap; }

label {
  display: block;
  font-size: 11px;
  color: var(--dim);
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 7px;
}

input[type=text], input[type=url], input[type=number] {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--line-hot);
  color: var(--text);
  border-radius: 10px;
  padding: 11px 13px;
  font: inherit;
  font-family: var(--mono);
  font-size: 13.5px;
}

input::placeholder { color: var(--dim); }

input:focus, select:focus, .btn:focus-visible {
  outline: none;
  border-color: var(--laser);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, .16), 0 0 20px rgba(34, 211, 238, .22);
}

input.invalid { border-color: var(--bad); box-shadow: 0 0 0 3px rgba(255, 93, 125, .14); }

.field { margin-bottom: 17px; }
.row { display: flex; gap: 11px; align-items: flex-end; flex-wrap: wrap; }
.row > .field { flex: 1 1 220px; margin-bottom: 0; }

.addr-list { display: grid; gap: 10px; margin-bottom: 18px; }

.addr-row {
  display: flex;
  align-items: center;
  gap: 13px;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-left: 2px solid var(--laser);
  border-radius: 10px;
  padding: 11px 14px;
  flex-wrap: wrap;
}

.addr-row .mono { flex: 1 1 260px; word-break: break-all; color: var(--text); }
.addr-row a { color: var(--laser-3); text-decoration: none; }
.addr-row a:hover { text-decoration: underline; }

.toggle-row { display: flex; gap: 20px; flex-wrap: wrap; }

.check {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  font-size: 14px;
  text-transform: none;
  letter-spacing: 0;
  margin: 0;
}

.check input { width: 17px; height: 17px; accent-color: var(--laser); cursor: pointer; }

.notice {
  border: 1px solid rgba(34, 211, 238, .35);
  border-left: 3px solid var(--laser);
  background: rgba(34, 211, 238, .08);
  padding: 12px 15px;
  border-radius: 0 10px 10px 0;
  font-size: 13.5px;
  color: var(--text);
  margin-bottom: 18px;
}

.notice.ok  { border-color: rgba(52, 229, 176, .35); border-left-color: var(--good); background: rgba(52, 229, 176, .08); }
.notice.bad { border-color: rgba(255, 93, 125, .35); border-left-color: var(--bad);  background: rgba(255, 93, 125, .08); }

code.mono, .foot code { font-family: var(--mono); color: var(--laser); }

/* ---------------------------------------------------------------- charts */

.chart-card { margin-bottom: 20px; }
.chart-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 5px; flex-wrap: wrap; }

.chart-head h3 {
  margin: 0;
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--laser);
}

.chart-note { color: var(--muted); font-size: 12.5px; margin: 0 0 16px; max-width: 78ch; }
.chart-svg { width: 100%; display: block; overflow: visible; color: var(--muted); }
.chart-svg path { filter: drop-shadow(0 0 5px currentColor); }
.chart-svg .hit { cursor: crosshair; }

.chart-readout {
  min-height: 20px;
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 12.5px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.chart-readout b { color: var(--text); font-weight: 700; }

.legend { display: flex; gap: 17px; flex-wrap: wrap; margin-left: auto; font-size: 12px; }
.legend span { display: flex; align-items: center; gap: 7px; color: var(--muted); }
.legend i { width: 13px; height: 3px; border-radius: 2px; display: inline-block; box-shadow: 0 0 7px currentColor; }

.range-row { display: flex; gap: 7px; flex-wrap: wrap; margin-left: auto; }

.range-row .btn { padding: 6px 12px; font-size: 12.5px; }

.range-row .btn.on {
  border-color: var(--laser);
  color: var(--laser);
  background: rgba(34, 211, 238, .12);
  box-shadow: 0 0 16px rgba(34, 211, 238, .2);
}

.foot { color: var(--dim); font-size: 12px; padding: 14px 22px 44px; }
.foot p { max-width: 92ch; }

/* Stamped in by js/version.js so the four footers have nothing to keep in sync. */
.foot-version {
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .03em;
  color: var(--dim);
}

.foot-version-tag {
  color: var(--laser);
  font-weight: 700;
  text-shadow: 0 0 10px rgba(34, 211, 238, .45);
}

/* ---------------------------------------------------------------- responsive */

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 22px; }
  .stake-grid { grid-template-columns: 1fr; }
}

@media (max-width: 540px) {
  .wrap, .topbar, .statusbar { padding-left: 15px; padding-right: 15px; }
  .topbar::after { left: 15px; right: 15px; }
  .card { padding: 17px 15px; }
  .nav { order: 3; width: 100%; margin-left: 0; }
  .nav a { flex: 1; text-align: center; }
  #refreshBtn { margin-left: auto; }
  .hero-value { letter-spacing: -1px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
