/* poolmining.eu — no external fonts or requests (GDPR friendly) */

:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #f8f9fd;
  --border: #e2e6f0;
  --text: #141a2e;
  --muted: #5d6680;
  --eu: #003399;
  --eu-soft: #e6ecfa;
  --star: #ffcc00;
  --pos: #0f8a4a;
  --neg: #c62f3a;
  --warn: #b7791f;
  --row-hover: #f1f4fc;
  --shadow: 0 1px 2px rgba(20, 26, 46, 0.06), 0 4px 16px rgba(20, 26, 46, 0.05);
  --radius: 10px;
  --mono: ui-monospace, 'SF Mono', 'Cascadia Mono', 'Roboto Mono', Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0b1020;
    --surface: #121a30;
    --surface-2: #0f1628;
    --border: #243052;
    --text: #e6eaf5;
    --muted: #93a0c0;
    --eu: #6f95ff;
    --eu-soft: #1a2750;
    --pos: #37c47c;
    --neg: #ff6b76;
    --warn: #e8b04b;
    --row-hover: #17213d;
    --shadow: none;
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #0b1020;
  --surface: #121a30;
  --surface-2: #0f1628;
  --border: #243052;
  --text: #e6eaf5;
  --muted: #93a0c0;
  --eu: #6f95ff;
  --eu-soft: #1a2750;
  --pos: #37c47c;
  --neg: #ff6b76;
  --warn: #e8b04b;
  --row-hover: #17213d;
  --shadow: none;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-variant-numeric: tabular-nums;
}
a { color: var(--eu); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1320px; margin: 0 auto; padding: 0 16px; }

/* Header */
.site-header { background: #003399; color: #fff; }
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 60px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand small { font-weight: 400; opacity: 0.7; font-size: 12px; display: block; letter-spacing: 0; }
.brand .tld { color: var(--star); }
.nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.nav a { color: rgba(255, 255, 255, 0.82); padding: 6px 12px; border-radius: 6px; font-weight: 500; }
.nav a:hover { background: rgba(255, 255, 255, 0.1); text-decoration: none; color: #fff; }
.nav a[aria-current='page'] { background: rgba(255, 255, 255, 0.16); color: #fff; }
.nav-pool {
  background: var(--star); color: #002a80; font-weight: 700; padding: 6px 14px; border-radius: 99px;
  white-space: nowrap; box-shadow: 0 0 0 3px rgba(255, 204, 0, 0.25);
}
.nav-pool:hover { text-decoration: none; filter: brightness(1.08); }
.header-meta { display: flex; align-items: center; gap: 12px; font-size: 12px; color: rgba(255, 255, 255, 0.75); }
.theme-btn { background: rgba(255, 255, 255, 0.12); border: 0; color: #fff; width: 32px; height: 32px; border-radius: 6px; cursor: pointer; font-size: 15px; }
.theme-btn:hover { background: rgba(255, 255, 255, 0.2); }

/* Intro */
.intro { padding: 24px 0 8px; }
.intro h1 { font-size: 24px; margin: 0 0 4px; letter-spacing: -0.02em; }
.intro p { margin: 0; color: var(--muted); max-width: 820px; }

/* Controls */
.controls {
  display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: end;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; margin: 16px 0; box-shadow: var(--shadow);
}
.field { display: flex; flex-direction: column; gap: 4px; }
.field label, .field .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 600; }
input[type='number'], input[type='text'], input[type='search'], select {
  font: inherit; color: var(--text); background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 6px; padding: 6px 9px; min-width: 0;
}
input:focus, select:focus, button:focus-visible { outline: 2px solid var(--eu); outline-offset: 1px; }
.input-suffix { display: flex; align-items: center; }
.input-suffix input { border-top-right-radius: 0; border-bottom-right-radius: 0; width: 92px; }
.input-suffix span {
  border: 1px solid var(--border); border-left: 0; background: var(--eu-soft); color: var(--muted);
  padding: 6px 8px; border-radius: 0 6px 6px 0; font-size: 12px; white-space: nowrap;
}
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.seg button { font: inherit; border: 0; background: var(--surface-2); color: var(--muted); padding: 6px 12px; cursor: pointer; }
.seg button[aria-pressed='true'] { background: var(--eu); color: #fff; }
.btn {
  font: inherit; border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  padding: 6px 12px; border-radius: 6px; cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: var(--eu); }
.spacer { flex: 1; }

/* Hardware panel */
.hw-panel { display: none; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin: -4px 0 16px; box-shadow: var(--shadow); }
.hw-panel.open { display: block; }
.hw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 10px; }
.hw-item { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; background: var(--surface-2); }
.hw-item h4 { margin: 0 0 2px; font-size: 13px; display: flex; justify-content: space-between; align-items: center; }
.hw-item .ref { color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.hw-item .row { display: flex; gap: 8px; }
.hw-item .input-suffix input { width: 100%; }
.hw-item .input-suffix { flex: 1; }
.hw-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; color: var(--muted); font-size: 12px; gap: 12px; flex-wrap: wrap; }

/* Table */
.table-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th, td { padding: 10px 10px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--border); }
th:first-child, td:first-child { text-align: left; }
th.l, td.l { text-align: left; }
th.c, td.c { text-align: center; }
thead th {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 600;
  background: var(--surface-2); position: sticky; top: 0; user-select: none;
}
thead th[data-sort] { cursor: pointer; }
thead th[data-sort]:hover { color: var(--text); }
thead th .arrow { display: inline-block; width: 10px; color: var(--eu); }
tbody tr.coin-row { cursor: pointer; }
tbody tr.coin-row:hover { background: var(--row-hover); }
tbody tr.coin-row.open { background: var(--eu-soft); }
.rank { color: var(--muted); width: 28px; }
.coin { display: flex; align-items: center; gap: 10px; }
.coin img { width: 28px; height: 28px; border-radius: 50%; flex: none; background: var(--surface-2); }
.coin .nm { font-weight: 600; white-space: normal; }
.coin > div { min-width: 0; max-width: 150px; }
.coin .sym { color: var(--muted); font-size: 12px; }
.chev { display: inline-block; transition: transform 0.15s; color: var(--muted); margin-left: 4px; }
.open .chev { transform: rotate(90deg); }
.algo { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 99px; background: var(--eu-soft); color: var(--eu); font-weight: 500; }
.sub { display: block; color: var(--muted); font-size: 12px; }
.pos { color: var(--pos); }
.neg { color: var(--neg); }
.profit { font-weight: 700; font-size: 15px; }
.merged-tag { display: inline-block; font-size: 10px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; color: var(--warn); margin-left: 6px; }
.stale { color: var(--warn); font-size: 11px; }
.muted { color: var(--muted); }
.num-strong { font-weight: 600; }

/* Detail (pools) */
tr.detail > td { padding: 0; background: var(--surface-2); text-align: left; white-space: normal; }
.detail-inner { padding: 14px 16px 18px; }
.detail-head { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: baseline; margin-bottom: 10px; }
.detail-head h3 { margin: 0; font-size: 15px; }
.detail-head .facts { display: flex; flex-wrap: wrap; gap: 4px 18px; color: var(--muted); font-size: 12px; }
.detail-head .facts b { color: var(--text); font-weight: 600; }
.pool-table { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.pool-table table th { background: var(--surface); }
.pool-table th, .pool-table td { padding: 8px 8px; }
.pool-table .tag { margin-top: 3px; }
.pool-table td.payout { white-space: normal; min-width: 110px; max-width: 170px; }
.pool-table .stratum code { font-size: 11px; }
.pool-table .go { padding: 4px 8px; }
.pool-table .share-bar { width: 32px; }
.pool-table tr:last-child td { border-bottom: 0; }
.pool-name { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.cc {
  display: inline-block; font: 600 10px/1 var(--mono); padding: 3px 5px; border-radius: 4px;
  border: 1px solid var(--border); color: var(--muted); background: var(--surface-2); letter-spacing: 0.04em;
}
.tag { display: inline-block; font-size: 10px; font-weight: 600; padding: 2px 6px; border-radius: 4px; background: var(--surface-2); color: var(--muted); border: 1px dashed var(--border); text-transform: uppercase; letter-spacing: 0.03em; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.dot.online { background: var(--pos); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pos) 20%, transparent); }
.dot.degraded { background: var(--warn); }
.dot.offline { background: var(--neg); }
.stratum { display: inline-flex; align-items: center; gap: 2px; }
.stratum code { font: 12px var(--mono); background: var(--surface-2); border: 1px solid var(--border); padding: 2px 6px; border-radius: 4px; }
.copy { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 2px 4px; border-radius: 4px; font-size: 13px; }
.copy:hover { color: var(--eu); background: var(--eu-soft); }
.go { display: inline-block; padding: 4px 10px; border-radius: 6px; background: var(--eu); color: #fff !important; font-size: 12px; font-weight: 600; }
.go:hover { text-decoration: none; filter: brightness(1.1); }
.share-bar { display: inline-block; width: 44px; height: 4px; background: var(--border); border-radius: 2px; vertical-align: middle; margin-left: 6px; overflow: hidden; }
.share-bar i { display: block; height: 100%; background: var(--eu); }
.empty { padding: 16px; color: var(--muted); }

/* Affiliate partners */
.partners { margin: 20px 0 0; }
.partners-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.partners-head h2 { font-size: 16px; margin: 0; }
.ad-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted);
  border: 1px solid var(--border); border-radius: 4px; padding: 2px 6px; cursor: help;
}
.partner-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.partner { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow); }
.partner h3 { margin: 0; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.partner .tagline { font-weight: 600; font-size: 13px; }
.partner p { margin: 0; color: var(--muted); font-size: 13px; flex: 1; }
.go.disabled { background: var(--surface-2); color: var(--muted) !important; border: 1px dashed var(--border); cursor: not-allowed; }

/* Notes / footer */
.note { color: var(--muted); font-size: 12px; margin: 12px 2px 32px; }
.site-footer { border-top: 1px solid var(--border); padding: 24px 0 40px; color: var(--muted); font-size: 13px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; }
.site-footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
.loading { padding: 40px; text-align: center; color: var(--muted); }
.error-box { padding: 14px 16px; border: 1px solid var(--neg); color: var(--neg); border-radius: 8px; margin: 16px 0; background: var(--surface); }

/* Pools directory */
.pool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; margin-bottom: 32px; }
.pool-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.pool-card h3 { margin: 0; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.pool-card p { margin: 0; color: var(--muted); font-size: 13px; flex: 1; }
.pool-card .meta { display: flex; gap: 14px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 3px 8px 3px 4px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface-2); }
.chip img { width: 16px; height: 16px; border-radius: 50%; }
.chip .dot { width: 6px; height: 6px; box-shadow: none; }

/* Prose pages */
.prose { max-width: 780px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 28px; margin: 16px 0 32px; box-shadow: var(--shadow); }
.prose h1 { font-size: 24px; margin-top: 0; }
.prose h2 { font-size: 17px; margin-top: 28px; }
.prose code { font: 13px var(--mono); background: var(--surface-2); padding: 1px 5px; border-radius: 4px; border: 1px solid var(--border); }
.prose .placeholder { background: color-mix(in srgb, var(--star) 25%, transparent); padding: 0 4px; border-radius: 3px; }

@media (max-width: 1360px) {
  .hide-md { display: none; }
}

@media (max-width: 720px) {
  .site-header .wrap { gap: 8px 16px; padding-top: 8px; padding-bottom: 8px; }
  .header-meta .upd { display: none; }
  .intro h1 { font-size: 20px; }
  th, td { padding: 8px 8px; }
  .hide-sm { display: none; }
  .prose { padding: 18px 16px; }
}
