:root {
  --bg: #0b1220;
  --panel: #121a2b;
  --border: #243049;
  --text: #e8eefc;
  --muted: #8b9bb8;
  --accent: #3dd6c6;
  --accent2: #6ea8ff;
  --warn: #f0b429;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--sans);
  background: radial-gradient(1200px 600px at 10% -10%, #1a2744 0%, var(--bg) 55%);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }

.top {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: rgba(11, 18, 32, 0.85);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand a {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--accent);
  letter-spacing: 0.04em;
}
.brand .tag {
  margin-left: 0.75rem;
  color: var(--muted);
  font-size: 0.85rem;
}
.promo-stack {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin: 0 0 1.1rem;
}
.fee-promo,
.bonus-promo {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.35rem 0.75rem;
  margin: 0;
  padding: 0.85rem 1.15rem;
  border-radius: 12px;
  text-align: center;
  line-height: 1.35;
}
.fee-promo {
  border: 1px solid rgba(61, 214, 198, 0.45);
  background: linear-gradient(135deg, rgba(61, 214, 198, 0.18), rgba(91, 141, 239, 0.1));
  color: #b8f7ef;
}
.fee-promo-main,
.bonus-promo-main {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.fee-promo strong {
  color: #e7fffb;
  font-weight: 800;
  font-size: 1.15em;
}
.fee-promo-aside,
.bonus-promo-aside {
  color: var(--muted);
  font-weight: 500;
  font-size: 1.05rem;
}
.bonus-promo {
  border: 1px solid rgba(240, 180, 41, 0.5);
  background: linear-gradient(135deg, rgba(240, 180, 41, 0.16), rgba(244, 162, 97, 0.1));
  color: #ffe6a3;
}
.bonus-promo strong {
  color: #ffe08a;
  font-weight: 800;
  font-size: 1.15em;
}
.bonus-spots {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.45rem;
  width: 100%;
  margin-top: 0.35rem;
}
.bonus-spot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  border: 1.5px solid rgba(240, 180, 41, 0.65);
  background: transparent;
  box-sizing: border-box;
}
.bonus-spot.claimed {
  background: #f0b429;
  border-color: #ffe08a;
  box-shadow: 0 0 0 2px rgba(240, 180, 41, 0.18);
}
.bonus-spots-label {
  margin-left: 0.35rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}
.bonus-spots-label strong {
  color: #ffe08a;
  font-size: 1em;
}
@media (max-width: 720px) {
  .fee-promo,
  .bonus-promo {
    padding: 0.75rem 0.9rem;
  }
  .fee-promo-main,
  .bonus-promo-main {
    font-size: 1.2rem;
    width: 100%;
  }
  .fee-promo-aside,
  .bonus-promo-aside {
    font-size: 0.95rem;
    width: 100%;
  }
}
.health-strip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}
.health-strip:hover { text-decoration: none; filter: brightness(1.08); }
.health-ok {
  border-color: rgba(80, 180, 120, 0.45);
  background: rgba(80, 180, 120, 0.12);
  color: #7ddea8;
}
.health-degraded {
  border-color: rgba(240, 180, 41, 0.5);
  background: rgba(240, 180, 41, 0.14);
  color: #ffc14d;
}
.health-down {
  border-color: rgba(232, 93, 93, 0.55);
  background: rgba(232, 93, 93, 0.16);
  color: #ff8e8e;
}
.health-unknown {
  color: var(--muted);
}
@media (max-width: 720px) {
  .health-strip {
    order: 3;
    width: 100%;
    justify-content: center;
  }
}
.lookup {
  display: flex;
  gap: 0.5rem;
  flex: 1;
  max-width: 520px;
  justify-content: flex-end;
}
.lookup input {
  flex: 1;
  min-width: 180px;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.9rem;
}
.lookup button {
  padding: 0.55rem 0.9rem;
  border-radius: 8px;
  border: 0;
  background: var(--accent);
  color: #04221f;
  font-weight: 600;
  cursor: pointer;
}
.lookup button:hover { filter: brightness(1.08); }

main { padding: 1.25rem; max-width: 1100px; width: 100%; margin: 0 auto; flex: 1; }
h1 { margin: 0 0 0.5rem; font-size: 1.6rem; }
h2 { margin: 1.25rem 0 0.65rem; font-size: 1.1rem; }
.muted { color: var(--muted); font-weight: 400; }
#userSubtitle { margin: 0 0 0.35rem; font-size: 0.9rem; }

.cards {
  display: grid;
  /* 6 cards → 3+3 keeps related pairs adjacent (network/pool, finds/miners, blocks/window). */
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}
@media (max-width: 860px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .cards { grid-template-columns: 1fr; }
}
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.9rem 1rem;
}
.card .label { color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; }
.card .value { margin-top: 0.35rem; font-size: 1.15rem; font-weight: 600; font-variant-numeric: tabular-nums; word-break: break-all; }
.card .value.mono { font-family: var(--mono); font-size: 0.95rem; }
.card .card-note {
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.01em;
}
.card-split {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 0.35rem;
  min-height: 1.35em;
}
.card-split .split-cell {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.15;
  min-width: 0;
}
.card-split .split-n {
  font-size: 1.15rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.card-split .split-k {
  margin-top: 0.12rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.card-split .split-sep {
  width: 1px;
  align-self: stretch;
  background: var(--border);
  opacity: 0.9;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.25rem;
}
@media (max-width: 860px) {
  .grid-2 { grid-template-columns: 1fr; }
}

/* Contributors full-width, recent blocks stacked underneath */
.stack-panels {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.25rem;
}
.recent-blocks-panel {
  margin-top: 0.5rem;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
}
.table-more {
  margin: 0.45rem 0 0;
  font-size: 0.88rem;
}
.table-more button {
  background: transparent;
  border: 1px solid var(--border, #333);
  color: var(--accent, #3dd6c6);
  border-radius: 6px;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
  font: inherit;
}
.table-more button:hover {
  background: rgba(61, 214, 198, 0.1);
}
.worker-plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  margin-left: 0.15rem;
  padding: 0;
  border: 1px solid var(--border, #333);
  border-radius: 4px;
  background: rgba(61, 214, 198, 0.08);
  color: var(--accent, #3dd6c6);
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
}
.worker-plus:hover { background: rgba(61, 214, 198, 0.18); }
tr.worker-sub td {
  background: rgba(255,255,255,0.02);
  font-size: 0.86rem;
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}
.contrib-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem 1rem;
  margin: 0.35rem 0 0.65rem;
  font-size: 0.85rem;
}
.contrib-sort-bar {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  align-items: center;
}
.contrib-sort-bar[hidden] {
  display: none !important;
}
.contrib-sort-bar label {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
}
.contrib-sort-bar select,
.contrib-sort-sel {
  font: inherit;
  background: var(--panel, #1a1a1a);
  color: inherit;
  border: 1px solid var(--border, #333);
  border-radius: 4px;
  padding: 0.2rem 0.4rem;
}
tr.nick-group td {
  background: rgba(61, 214, 198, 0.06);
  font-weight: 500;
}
tr.nick-sub td {
  background: rgba(255,255,255,0.02);
}
.coinbaser-pie-wrap {
  /* Full panel width — room for mempool-style left/right leader labels. */
  width: 100%;
  max-width: none;
  margin: 0.35rem 0 0.35rem;
  position: relative;
  height: 400px;
  padding: 0;
}
@media (min-width: 900px) {
  .coinbaser-pie-wrap {
    height: 440px;
  }
}
@media (max-width: 640px) {
  .coinbaser-pie-wrap {
    height: 340px;
  }
}
.coinbaser-pie-wrap canvas {
  width: 100% !important;
  height: 100% !important;
}
.worker-chart-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  margin: 0.35rem 0 0.5rem;
  font-size: 0.85rem;
}
.worker-chart-filters label {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
  user-select: none;
}
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { padding: 0.55rem 0.75rem; text-align: left; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.03em; }
td.mono, th.mono { font-family: var(--mono); }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(110, 168, 255, 0.06); }

.footnote {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 1.25rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}
.join.box {
  margin-top: 1.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
}
.join.box pre {
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.8rem;
  background: #0a101c;
  padding: 0.75rem;
  border-radius: 8px;
  white-space: pre-wrap;
  word-break: break-all;
}

.hidden { display: none !important; }
footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
}
.truncate {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  vertical-align: bottom;
  font-family: var(--mono);
}

/* Worker / nickname cells — keep tables from blowing out on long tags.
   Ellipsis lives on .clip-text (not the td): auto table layout ignores
   td max-width for unbroken strings like long coinbase nicknames. */
td.clip,
td.clip-wide {
  max-width: 10rem;
  vertical-align: middle;
}
td.clip-wide {
  max-width: 14rem;
}
td.clip .clip-text,
td.clip-wide .clip-text {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 10rem;
}
td.clip-wide .clip-text {
  max-width: 14rem;
}
@media (max-width: 900px) {
  td.clip,
  td.clip-wide { max-width: 7rem; }
  td.clip .clip-text,
  td.clip-wide .clip-text { max-width: 7rem; }
}


.rules {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border, #333);
  border-radius: 6px;
  background: var(--panel-2, rgba(255,255,255,0.03));
}
.rules h3 {
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
}
.rules ul {
  margin: 0;
  padding-left: 1.2rem;
}
.rules li {
  margin: 0.35rem 0;
  line-height: 1.35;
}
.warn.box {
  margin: 0.75rem 0 0.5rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--warn, #f0b429);
  border-radius: 6px;
  background: rgba(240, 180, 41, 0.08);
  color: var(--text, #e8e8e8);
  line-height: 1.4;
}
.warn.box strong {
  color: var(--warn, #f0b429);
}

.alert.box {
  margin: 1rem 0 1.25rem;
  padding: 1rem 1.1rem;
  border-radius: 10px;
  border: 2px solid #e85d5d;
  background: rgba(232, 93, 93, 0.12);
  color: var(--text);
  line-height: 1.45;
}
.alert.box strong { color: #ff8e8e; }
.alert.box a { color: #ffb4b4; font-weight: 600; }
.alert.box ul { margin: 0.5rem 0 0 1.2rem; padding: 0; }
.alert.box li { margin: 0.35rem 0; }

.badge-quarantine {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #3a1d00;
  background: #ffb020;
  vertical-align: middle;
  white-space: nowrap;
}

.badge {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  vertical-align: middle;
  white-space: nowrap;
  background: #243049;
  color: var(--muted);
}
.badge-ok {
  background: rgba(61, 214, 198, 0.18);
  color: var(--accent);
}
.badge-warn {
  background: rgba(240, 180, 41, 0.18);
  color: var(--warn);
}
.badge-pending {
  background: rgba(240, 180, 41, 0.18);
  color: var(--warn);
}
.badge-orphan {
  background: rgba(232, 93, 93, 0.22);
  color: #ff8e8e;
  font-weight: 700;
}

/* Recent pool blocks — status row colors */
tr.row-orphan td {
  background: rgba(232, 93, 93, 0.14);
  color: #ffb4b4;
  border-bottom-color: rgba(232, 93, 93, 0.35);
}
tr.row-orphan td a {
  color: #ff8e8e;
}
tr.row-orphan:hover td {
  background: rgba(232, 93, 93, 0.22);
}

tr.row-pending td {
  background: rgba(240, 180, 41, 0.10);
  border-bottom-color: rgba(240, 180, 41, 0.28);
}
tr.row-pending:hover td {
  background: rgba(240, 180, 41, 0.16);
}

.badge-manual {
  background: rgba(240, 160, 40, 0.22);
  color: #ffc14d;
  font-weight: 700;
}
.badge-manual-done {
  background: rgba(80, 180, 120, 0.20);
  color: #7ddea8;
  font-weight: 600;
}
tr.row-manual td {
  background: rgba(240, 160, 40, 0.10);
  border-bottom-color: rgba(240, 160, 40, 0.30);
}
tr.row-manual:hover td {
  background: rgba(240, 160, 40, 0.16);
}

/* Dashboard primary panels — keep padding consistent; avoid stacked h2 + box gaps */
.box,
.dashboard-panel {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
}
.box > h2:first-child,
.dashboard-panel > h2:first-child {
  margin-top: 0;
  margin-bottom: 0.5rem;
}
.box > .muted:first-of-type,
.dashboard-panel > .muted:first-of-type {
  margin-top: 0;
}
.cards + .box,
.cards + .dashboard-panel {
  margin-top: 0.85rem;
}

/* Coinbaser kind highlights */
tr.row-finder td {
  background: rgba(61, 214, 198, 0.14);
  border-bottom-color: rgba(61, 214, 198, 0.35);
}
tr.row-finder:hover td {
  background: rgba(61, 214, 198, 0.22);
}
tr.row-ops td {
  background: rgba(110, 168, 255, 0.08);
}
.kind-ico {
  display: inline-flex;
  align-items: center;
  gap: 0.12rem;
  font-size: 1.15rem;
  line-height: 1;
  letter-spacing: 0;
  cursor: help;
  user-select: none;
}
.kind-finder {
  font-weight: 700;
  color: var(--accent);
  filter: drop-shadow(0 0 6px rgba(61, 214, 198, 0.35));
}
.kind-finder-inline {
  color: var(--accent);
  font-weight: 650;
  cursor: help;
}
.kind-tides {
  opacity: 0.92;
}
.kind-ops {
  color: var(--accent2);
  font-weight: 600;
  font-size: 1.05rem;
}
.more-link {
  margin: 0.6rem 0 0;
  font-size: 0.92rem;
}

.activity-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.85rem;
  margin: 0;
  font-size: inherit;
}
.activity-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
}
.activity-legend .activity-dot {
  margin: 0;
  flex-shrink: 0;
}
.activity-cell {
  width: 1.25rem;
  text-align: center;
  vertical-align: middle;
}
.activity-dot {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  vertical-align: middle;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
}
.activity-dot.live {
  background: #3dd67a;
  box-shadow: 0 0 0 1px rgba(61, 214, 122, 0.35), 0 0 6px rgba(61, 214, 122, 0.55);
}
.activity-dot.idle {
  background: #f0b429;
  box-shadow: 0 0 0 1px rgba(240, 180, 41, 0.35);
}
.activity-dot.offline {
  background: #e85d5d;
  box-shadow: 0 0 0 1px rgba(232, 93, 93, 0.35);
}

/* Connect / warnings accordion (closed by default) */
.connect-panel {
  margin-top: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  overflow: hidden;
}
.connect-panel-top {
  margin-top: 0.75rem;
  margin-bottom: 1.1rem;
  border-color: rgba(61, 214, 198, 0.35);
}
.connect-panel > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  padding: 0.95rem 1.1rem;
  user-select: none;
}
.connect-panel > summary::-webkit-details-marker { display: none; }
.connect-panel > summary::before {
  content: "▸";
  color: var(--accent);
  font-weight: 700;
  margin-right: 0.15rem;
}
.connect-panel[open] > summary::before { content: "▾"; }
.connect-title {
  font-weight: 650;
  font-size: 1.02rem;
}
.connect-hint { font-size: 0.85rem; }
.connect-panel > summary:hover {
  background: rgba(110, 168, 255, 0.06);
}
.connect-body {
  padding: 0 1.1rem 1.1rem;
  border-top: 1px solid var(--border);
}
.connect-body .join.box,
.connect-body .warn.box,
.connect-body .alert.box {
  margin-top: 0.9rem;
}
.connect-body .join.box { margin-top: 1rem; }
.connect-body h2 { margin-top: 0.75rem; }
.connect-stores {
  margin: 0.55rem 0 0.35rem 1.1rem;
  padding: 0;
  line-height: 1.45;
}
.connect-stores li { margin: 0.35rem 0; }
.connect-shot {
  margin: 0.75rem 0 0.25rem;
  padding: 0;
  max-width: 100%;
}
.connect-shot img {
  display: block;
  width: 100%;
  max-width: 520px;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #0b1220;
}
.connect-shot figcaption {
  margin-top: 0.4rem;
  font-size: 0.85rem;
}

/* Miner page collapsible panels (payout history / shares) */
.miner-panel {
  margin-top: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  overflow: hidden;
}
.miner-panel > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  padding: 0.85rem 1.1rem;
  user-select: none;
}
.miner-panel > summary::-webkit-details-marker { display: none; }
.miner-panel > summary::before {
  content: "▸";
  color: var(--accent);
  font-weight: 700;
  margin-right: 0.15rem;
}
.miner-panel[open] > summary::before { content: "▾"; }
.miner-panel > summary:hover {
  background: rgba(110, 168, 255, 0.06);
}
.miner-panel-body {
  padding: 0 1.1rem 1rem;
  border-top: 1px solid var(--border);
}
.miner-panel-body .chart-sub {
  margin: 0.75rem 0 0.5rem;
}
.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 1rem;
  margin-top: 0.75rem;
}
.pager button {
  appearance: none;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  cursor: pointer;
}
.pager button:hover:not(:disabled) {
  border-color: rgba(61, 214, 198, 0.45);
  color: var(--accent);
}
.pager button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.kind-tides {
  color: var(--accent2);
  font-weight: 600;
}
.kind-finder-hist {
  color: var(--accent);
  font-weight: 650;
}

/* Hashrate charts */
.chart-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 0.25rem;
}
.chart-head h2 { margin: 0; }
.chart-sub { margin: 0 0 0.75rem; font-size: 0.85rem; }
.chart-ranges {
  display: inline-flex;
  gap: 0.35rem;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.2rem;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.chart-ranges button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.35rem 0.7rem;
  border-radius: 6px;
  cursor: pointer;
}
.chart-ranges button:hover { color: var(--text); }
.chart-ranges button.active {
  background: rgba(61, 214, 198, 0.18);
  color: var(--accent);
}
.chart-wrap {
  position: relative;
  width: 100%;
  height: 260px;
}
@media (max-width: 640px) {
  .chart-wrap { height: 220px; }
}
