:root {
  --bg: #0a0e0d;
  --bg-raised: #0f1513;
  --line: #1e2926;
  --line-soft: #161f1d;
  --ink: #e8f2ee;
  --ink-dim: #7c928c;
  --ink-faint: #4a5a55;
  --accent: #4dffb4;
  --accent-dim: #2a8f66;
  --amber: #ffb454;
  --red: #ff5c5c;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --sans: 'Space Grotesk', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

body {
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: -1px -1px;
  min-height: 100vh;
}

@media (prefers-reduced-motion: no-preference) {
  .scanline {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 50;
    background: linear-gradient(180deg, transparent, rgba(77,255,180,0.03) 50%, transparent);
    background-size: 100% 6px;
    animation: scan 8s linear infinite;
    mix-blend-mode: overlay;
  }
  @keyframes scan {
    0% { background-position: 0 0; }
    100% { background-position: 0 240px; }
  }
}

/* ---------- topbar ---------- */

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(10,14,13,0.9);
  backdrop-filter: blur(6px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar__id {
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.topbar__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink-faint);
  transition: background 0.4s ease, box-shadow 0.4s ease;
}
.topbar__dot.live {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}
.topbar__dot.dead {
  background: var(--red);
  box-shadow: 0 0 8px var(--red);
}

.topbar__sep { color: var(--ink-faint); }
.topbar__coin { color: var(--ink-dim); font-weight: 500; }

.topbar__addr {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-dim);
  border: 1px solid var(--line);
  padding: 5px 10px;
  border-radius: 3px;
}

/* ---------- layout ---------- */

.wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

/* ---------- hero ---------- */

.hero {
  padding: 40px 0 44px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 40px;
}

.hero__hashrate {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-family: var(--mono);
}

.hero__value {
  font-size: clamp(52px, 11vw, 104px);
  font-weight: 800;
  line-height: 1;
  color: var(--accent);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.hero__unit {
  font-size: 22px;
  font-weight: 600;
  color: var(--ink-dim);
}

.hero__meta {
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-dim);
  display: flex;
  gap: 10px;
}

.hero__meta-sep { color: var(--ink-faint); }

/* ---------- grid cards ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-bottom: 48px;
}

.card {
  background: var(--bg-raised);
  padding: 22px 20px;
}

.card__label {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-dim);
  letter-spacing: 0.01em;
}

.card__label small {
  color: var(--ink-faint);
  font-weight: 500;
}

.card__value {
  margin: 0;
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  word-break: break-word;
}

/* ---------- workers table ---------- */

.workers__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
}

.workers__head h2 {
  font-size: 18px;
  margin: 0;
  font-weight: 600;
}

.workers__head h2 span {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-dim);
  font-weight: 500;
  margin-left: 8px;
}

.workers__refresh {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-faint);
}

.workers__table-wrap {
  border: 1px solid var(--line);
  overflow-x: auto;
}

.workers__table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 13px;
  min-width: 560px;
}

.workers__table thead th {
  text-align: left;
  padding: 12px 16px;
  color: var(--ink-faint);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.03em;
  border-bottom: 1px solid var(--line);
  background: var(--bg-raised);
}

.workers__table tbody td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.workers__table tbody tr:last-child td { border-bottom: none; }

.workers__empty {
  color: var(--ink-faint);
  text-align: center;
  padding: 28px 16px !important;
}

.wk-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.wk-status__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.wk-status__dot.on { background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.wk-status__dot.off { background: var(--red); }

.wk-hybrid {
  font-size: 10px;
  color: var(--amber);
  border: 1px solid var(--amber);
  padding: 1px 5px;
  border-radius: 2px;
  margin-left: 6px;
}

/* ---------- footer ---------- */

.foot {
  margin-top: 40px;
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-faint);
  flex-wrap: wrap;
  gap: 8px;
}

/* ---------- responsive ---------- */

@media (max-width: 720px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .topbar { padding: 14px 16px; }
  .wrap { padding: 32px 16px 60px; }
}

@media (max-width: 420px) {
  .grid { grid-template-columns: 1fr; }
}

/* ---------- focus ---------- */

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
