/* ============================================================
   NOID Pool — dashboard statica
   Light theme neutrale (bianco/nero/grigio, stile Linear/Vercel)
   zero dipendenze · zero risorse esterne · zero tracking
   ============================================================ */

:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --surface-hover: #f3f4f6;
  --ink: #111827;
  --ink-dim: #4b5563;
  --ink-faint: #6b7280;
  --accent: #111111;           /* unico accento: nero profondo */
  --accent-hover: #1f2937;
  --accent-soft: rgba(17, 24, 39, .05);
  --warn: #b45309;
  --err: #b91c1c;
  --line: #e5e7eb;
  --line-soft: #f3f4f6;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-hover: 0 2px 4px rgba(16, 24, 40, .06), 0 4px 12px rgba(16, 24, 40, .08);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }

a { color: var(--ink); text-decoration: none; }
a:hover { text-decoration: underline; }

::selection { background: rgba(17, 24, 39, .14); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  /* visibile solo al focus; clip-path lo nasconde SENZA espandere lo scroll
     (niente offset negativi: in RTL allargherebbero lo scrollWidth del documento) */
  position: absolute; left: 0; top: 0;
  clip-path: inset(50%); height: 1px; width: 1px; overflow: hidden; white-space: nowrap;
  background: var(--accent); color: #ffffff;
  padding: 8px 14px; border-radius: 0 0 8px 0; z-index: 50; font-weight: 600;
}
.skip-link:focus {
  left: 0;
  width: auto; height: auto;
  clip-path: none; overflow: visible;
}

/* ---------------- header ---------------- */

.site-header {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, .86);
  border-bottom: 1px solid var(--line);
}

.header-row {
  display: flex; align-items: center; gap: 18px;
  padding-top: 12px; padding-bottom: 12px;
  flex-wrap: wrap;
}

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; letter-spacing: .4px; }
.brand:hover { text-decoration: none; }
.brand-text { font-size: 17px; }
.brand-thin { font-weight: 300; color: var(--ink-dim); }

.brand-mark {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2.5px solid var(--accent);
  position: relative;
}
.brand-mark::after {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
}

.badge {
  font-size: 10.5px; font-weight: 700; letter-spacing: 1.2px;
  padding: 2px 8px; border-radius: 999px;
}
.badge-demo {
  color: var(--ink-faint); border: 1px solid var(--line);
  background: var(--surface-2);
}

.main-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.main-nav a {
  color: var(--ink-dim);
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 14px;
  transition: color .15s ease, background-color .15s ease;
}
.main-nav a:hover { color: var(--ink); text-decoration: none; background: var(--surface-hover); }
.main-nav a[aria-current="page"] {
  color: #ffffff;
  background: var(--accent);
  font-weight: 600;
}

.header-controls { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.status-pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; color: var(--ink-dim);
  border: 1px solid var(--line);
  padding: 5px 11px; border-radius: 999px;
  background: var(--surface);
  white-space: nowrap;
}
.status-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-faint); flex: 0 0 auto; }
.status-pill[data-state="ok"]   .dot { background: var(--accent); animation: pulse 2.2s ease-out infinite; }
.status-pill[data-state="wait"] .dot { background: var(--warn); }
.status-pill[data-state="err"]  .dot { background: var(--err); }
.status-pill[data-state="demo"] .dot { background: var(--ink-faint); animation: pulse 2.2s ease-out infinite; }

.btn-ghost {
  font: inherit; font-size: 12.5px; font-weight: 700; letter-spacing: .8px;
  color: var(--ink-dim);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease;
}
.btn-ghost:hover { color: var(--ink); border-color: var(--ink); }

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

.view-host { flex: 1 0 auto; padding-top: 26px; padding-bottom: 48px; outline: none; }

.view { animation: rise .32s ease both; }

.page-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.page-title { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
.page-sub { margin: 2px 0 0; color: var(--ink-dim); font-size: 13.5px; max-width: 62ch; }

.grid-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-1px); box-shadow: var(--shadow-hover); }

.stat-card { padding: 15px 17px 13px; min-height: 104px; display: flex; flex-direction: column; gap: 2px; }
.stat-label { font-size: 12px; text-transform: uppercase; letter-spacing: 1.1px; color: var(--ink-faint); }
.stat-value { font-size: clamp(19px, 2.4vw, 24px); font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.stat-extra { font-size: 12px; color: var(--ink-dim); min-height: 18px; }
.stat-spark { height: 30px; margin-top: 6px; }
.stat-spark canvas { display: block; width: 100%; height: 100%; }

/* card Orphaned / Node peers */
.stat-warn-icon { position: absolute; top: 12px; right: 14px; font-size: 14px; line-height: 1; color: var(--warn); }
.stat-card.stat-warn { border-color: rgba(180, 83, 9, .5); }
.stat-card.stat-warn .stat-value { color: var(--warn); }

/* badge blocco orfano nella lista blocchi */
.tag-orphan { margin-left: .45rem; padding: 1px 7px; border-radius: 999px; font-size: .68rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; background: #fef3c7; color: #92400e; border: 1px solid #f59e0b; }

/* paginatore lista blocchi */
.pager { display: flex; align-items: center; gap: .6rem; justify-content: flex-end; padding: 10px 20px; }
.pg-btn { min-width: 30px; height: 30px; border: 1px solid #e5e7eb; background: #fff; color: #111827; border-radius: 6px; cursor: pointer; font-size: 1rem; line-height: 1; }
.pg-btn:hover:not(:disabled) { border-color: #9ca3af; }
.pg-btn:disabled { opacity: .35; cursor: default; }
.pg-info { font-size: .8rem; color: #6b7280; }

/* card Blocks found: orfani piccoli in basso a destra (extra slot) */
.stat-orphan-sub { display: block; text-align: right; font-size: 11.5px; font-weight: 600; color: #b45309; letter-spacing: .03em; }

.section { margin-bottom: 20px; }
.section-title { margin: 0 0 10px; font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.1px; color: var(--ink-faint); }

.panel { padding: 18px 20px; }
.panel-flush { padding: 8px 0 0; overflow: hidden; }
/* allinea la prima colonna delle tabelle flush al titolo di sezione (padding 20px) */
.panel-flush table.data th:first-child,
.panel-flush table.data td:first-child { padding-left: 20px; }

.chart-lg { height: 280px; }
.chart-md { height: 210px; }
.chart-box canvas { display: block; width: 100%; height: 100%; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

/* job corrente */
.job-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; align-items: end; }
.job-kv .stat-label { margin-bottom: 2px; }
.job-kv .kv { font-family: var(--mono); font-size: 14px; color: var(--ink); word-break: break-all; }

.bar-track {
  grid-column: 1 / -1;
  height: 7px; border-radius: 99px;
  background: var(--line-soft);
  overflow: hidden;
}
.bar-fill {
  display: block; height: 100%; width: 0%;
  border-radius: 99px;
  background: var(--accent);
  transition: width .6s cubic-bezier(.25, .8, .35, 1);
}
.bar-fill.bar-warn { background: var(--warn); }

/* ---------------- tabelle ---------------- */

.table-scroll { overflow-x: auto; }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
table.data th, table.data td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-soft);
  white-space: nowrap;
}
table.data th {
  font-size: 11.5px; text-transform: uppercase; letter-spacing: 1px;
  color: var(--ink-faint); font-weight: 600;
  position: sticky; top: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
table.data tbody tr { transition: background-color .12s ease; }
table.data tbody tr:nth-child(even) td { background: var(--surface-2); }
table.data tbody tr:hover td { background: var(--surface-hover); }
table.data tbody tr:last-child td { border-bottom: none; }
td.num, th.num { text-align: right; }

.table-scroll table.data tr.row-you td { background: var(--accent-soft); }
.table-scroll table.data tr.row-you td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.table-scroll table.data tr.row-you:hover td { background: var(--surface-hover); }

.tag-you {
  display: inline-block; margin-left: 8px;
  font-size: 10px; font-weight: 700; letter-spacing: 1px;
  color: #ffffff; background: var(--accent);
  padding: 1px 7px; border-radius: 999px;
  vertical-align: 1px;
}

.mono { font-family: var(--mono); font-size: 13px; }
.dim { color: var(--ink-dim); }
.faint { color: var(--ink-faint); }
.acc-ok { color: var(--ink); font-weight: 600; }
.acc-bad { color: var(--err); }

.rank-cell { color: var(--ink-faint); font-weight: 600; width: 34px; }
.rank-1 { color: #111827; } .rank-2 { color: #4b5563; } .rank-3 { color: #6b7280; }

/* ---------------- form wallet lookup ---------------- */

.lookup-form { display: flex; gap: 10px; flex-wrap: wrap; }
.input-address {
  flex: 1 1 320px;
  font-family: var(--mono); font-size: 14px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input-address::placeholder { color: var(--ink-faint); }
.input-address:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(17, 24, 39, .1);
}

.btn-accent {
  font: inherit; font-weight: 600; font-size: 14px;
  color: #ffffff;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 11px 22px;
  cursor: pointer;
  transition: background-color .15s ease, transform .1s ease;
}
.btn-accent:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-accent:active { transform: scale(.98); }
.btn-accent:disabled { opacity: .55; cursor: wait; }

.form-error { color: var(--err); font-size: 13px; margin-top: 8px; min-height: 18px; }

/* ---------------- stati ---------------- */

.state-box {
  display: flex;
  flex-direction: column;
  align-items: center;      /* icona, titolo e sottotitolo TUTTI sullo stesso asse */
  text-align: center;       /* testo multi-riga centrato dentro ogni blocco */
  padding: 44px 20px;
  color: var(--ink-dim);
}
.state-box .glyph { font-size: 30px; display: block; margin-bottom: 10px; opacity: .8; }
.state-box .state-title { font-size: 16px; font-weight: 600; color: var(--ink); margin: 0 0 4px; }
.state-box p { margin: 0; max-width: 46ch; font-size: 13.5px; }
.state-box.err .glyph { color: var(--err); }
.state-box.empty .glyph { color: var(--ink-faint); }

.skel {
  border-radius: 8px;
  background: linear-gradient(90deg, #eceef2 25%, #f4f5f7 42%, #eceef2 58%);
  background-size: 300% 100%;
  animation: shimmer 1.15s linear infinite;
  min-height: 14px;
}
.skel-lg { min-height: 200px; border-radius: var(--radius); }

.retry-btn {
  margin-top: 14px;
  font: inherit; font-size: 13.5px;
  color: var(--ink); background: transparent;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 18px; cursor: pointer;
  transition: border-color .15s ease, color .15s ease;
}
.retry-btn:hover { color: var(--accent); border-color: var(--accent); }

/* ---------------- mine now / configuration ---------------- */

.mine-cta {
  appearance: none; border: 1px solid var(--ink);
  background: var(--ink); color: #fff;
  font-size: 13px; font-weight: 600; letter-spacing: .03em;
  padding: 9px 18px; border-radius: 999px; cursor: pointer;
  transition: opacity .15s ease, transform .15s ease;
}
.mine-cta:hover { opacity: .85; transform: translateY(-1px); }

.mine-panel { scroll-margin-top: 90px; }
.mine-head { margin-bottom: 20px; }
.mine-head .section-title { margin-bottom: 4px; font-size: 13.5px; }
.mine-head .page-sub { margin: 0; }

.mine-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; }
.mine-fields { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field-label { font-size: 12px; text-transform: uppercase; letter-spacing: 1.1px; color: var(--ink-faint); }
.field-input {
  width: 100%; box-sizing: border-box;
  font-size: 14px; color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field-input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(17, 24, 39, .08); }
.field-hint { margin: 0; font-size: 12px; color: var(--ink-faint); }
.field-hint.err { color: var(--err); }

.mine-code { display: flex; flex-direction: column; gap: 18px; }
.code-block {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
}
.code-block-dark { border-color: #111827; background: #111827; }
.code-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 16px 9px;
}
.code-title { font-size: 11.5px; font-weight: 600; letter-spacing: .9px; text-transform: uppercase; color: var(--ink-faint); }
.code-block-dark .code-title { color: #9ca3af; }
.code-pre {
  margin: 0; padding: 13px 16px 15px;
  background: var(--surface-2);
  border-top: 1px solid var(--line-soft);
  overflow-x: auto;
  font-family: var(--mono); font-size: 12.5px; line-height: 1.65;
  color: var(--ink); white-space: pre;
}
.code-pre::before { content: "$ "; color: var(--ink-faint); user-select: none; }
.code-block-dark .code-pre { background: #0f172a; border-top: 1px solid rgba(255, 255, 255, .07); color: #e5e7eb; }
.code-block-dark .code-pre::before { color: #6b7280; }
.code-desc { padding: 2px 16px 13px; }
.code-line { font-family: var(--mono); font-size: 12.5px; word-break: break-all; }
.copy-btn {
  appearance: none; border: 1px solid var(--line);
  background: #fff; color: var(--ink);
  font-size: 11.5px; font-weight: 600;
  padding: 5px 12px; border-radius: 7px; cursor: pointer;
  white-space: nowrap;
  transition: border-color .15s ease, color .15s ease, transform .1s ease;
}
.copy-btn:hover { border-color: var(--ink); color: var(--ink); }
.copy-btn:active { transform: translateY(1px); }
.copy-btn-dark { background: transparent; border-color: rgba(255, 255, 255, .25); color: #e5e7eb; }
.copy-btn-dark:hover { border-color: #e5e7eb; color: #fff; }

/* ---------------- requisiti miner (hardware / driver / OS / prestazioni) ---------------- */

.mine-req { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.req-title { margin-bottom: 4px; font-size: 13.5px; }
.req-sub { margin: 0 0 16px; }

/* prestazioni in evidenza: due stat card nello stile gia' usato in overview */
.perf-block { margin: 0 0 28px; }
.perf-heading { margin-bottom: 10px; }
.perf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.perf-stat { min-height: 0; padding: 17px 20px 16px; gap: 5px; }
.perf-stat .stat-value { font-size: clamp(26px, 3.2vw, 34px); line-height: 1.15; }

.spec-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 13px; }
.spec-row {
  display: grid; grid-template-columns: 190px minmax(0, 1fr);
  gap: 6px 18px; align-items: start;
  padding-bottom: 13px; border-bottom: 1px solid var(--line-soft);
}
.spec-row:last-child { padding-bottom: 0; border-bottom: 0; }
.spec-label {
  font-size: 12px; text-transform: uppercase; letter-spacing: 1.1px;
  color: var(--ink-faint); padding-top: 1px;
}
.spec-body { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.spec-text { margin: 0; font-size: 13.5px; color: var(--ink-dim); }
.spec-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.spec-item { font-family: var(--mono); font-size: 12.5px; color: var(--ink); }

.duty-note {
  margin-top: 18px; padding: 14px 16px;
  border: 1px solid var(--line);
  border-inline-start: 3px solid var(--warn);
  border-radius: 10px; background: var(--surface-2);
}
.duty-title { margin: 0 0 6px; font-size: 12.5px; font-weight: 600; color: var(--warn); }
.duty-body { margin: 0 0 6px; font-size: 13.5px; color: var(--ink-dim); }
.duty-hint { margin: 0; font-size: 12px; color: var(--ink-faint); }

/* fee: nota positiva, il punto di forza "0% dev-fee sul client" spicca */
.fee-note {
  margin: 0 0 22px; padding: 14px 16px;
  border: 1px solid var(--line);
  border-inline-start: 3px solid var(--ink);
  border-radius: 10px; background: var(--surface-2);
}
.fee-title { margin: 0 0 6px; font-size: 15px; font-weight: 700; color: var(--ink); letter-spacing: -.01em; }
.fee-body { margin: 0 0 6px; font-size: 13.5px; color: var(--ink-dim); }
.fee-hint { margin: 0; }

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

.site-footer {
  border-top: 1px solid var(--line);
  padding: 18px 0 22px;
  color: var(--ink-faint);
  font-size: 12.5px;
}
.footer-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.site-footer a { color: var(--ink-dim); }
.site-footer a:hover { color: var(--ink); }

.noscript-box {
  margin: 30px auto; max-width: 520px;
  text-align: center; padding: 20px;
  border: 1px solid var(--err); border-radius: var(--radius);
  color: var(--ink);
}

/* ---------------- animazioni ---------------- */

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(17, 17, 17, .35); }
  70%  { box-shadow: 0 0 0 7px rgba(17, 17, 17, 0); }
  100% { box-shadow: 0 0 0 0 rgba(17, 17, 17, 0); }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(9px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes shimmer {
  from { background-position: 120% 0; }
  to   { background-position: -80% 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

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

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

@media (max-width: 640px) {
  body { font-size: 14px; }
  .header-row { gap: 10px; }
  .main-nav { order: 3; width: 100%; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; }
  .main-nav::-webkit-scrollbar { display: none; }
  .chart-lg { height: 220px; }
  .grid-stats { grid-template-columns: repeat(2, 1fr); }
  .page-title { font-size: 21px; }
  .panel { padding: 16px 16px; }
  .panel-flush .section-title { padding-left: 16px !important; }
  .panel-flush table.data th:first-child,
  .panel-flush table.data td:first-child { padding-left: 16px; }
  table.data th, table.data td { padding: 9px 10px; }
}


/* ---------------- RTL support (Arabic, etc.) ---------------- */

[dir="rtl"] .tag-you { margin-left: 0; margin-right: 8px; }

[dir="rtl"] .header-controls { margin-left: 0; margin-right: auto; }
[dir="rtl"] .header-row { direction: rtl; }
[dir="rtl"] .header-row .brand { order: 10; }
[dir="rtl"] .main-nav { order: 5; }

[dir="rtl"] .footer-sep { unicode-bidi: isolate; }

/* RTL: mirror table alignment, first-column padding and accents */
[dir="rtl"] table.data th,
[dir="rtl"] table.data td { text-align: right; }
[dir="rtl"] table.data td.num, [dir="rtl"] table.data th.num { text-align: left; }
[dir="rtl"] .panel-flush table.data th:first-child,
[dir="rtl"] .panel-flush table.data td:first-child { padding-left: 14px; padding-right: 20px; }
[dir="rtl"] .table-scroll table.data tr.row-you td:first-child { box-shadow: inset -3px 0 0 var(--accent); }
[dir="rtl"] .stat-warn-icon { right: auto; left: 14px; }
[dir="rtl"] .lang-select { background-position: left 8px center; padding-right: 10px; padding-left: 22px; }

/* lang-select styling to match neutral theme */
.lang-select {
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .4px;
  color: var(--ink-dim);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236b7280'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 22px;
  transition: color .15s ease, border-color .15s ease;
}
.lang-select:hover { color: var(--ink); border-color: var(--ink); }
.lang-select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (max-width: 640px) {
  .perf-grid { grid-template-columns: minmax(0, 1fr); }
  .spec-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .spec-label { padding-top: 0; }
}

/* Worker mining mostly-stale (wasted, unpaid) work: warning badge + row tint. */
.stale-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
  color: #ffffff;
  background: var(--warn);
  white-space: nowrap;
  vertical-align: middle;
}
.stale-row td { background: rgba(180, 83, 9, .06); }

/* ===== Explorer on-chain ===== */
.expl-searchpanel { padding: 16px 20px; }
.expl-searchbar { display: flex; gap: 8px; align-items: stretch; }
.expl-search { flex: 1 1 auto; min-width: 0; padding: 9px 12px; font-family: var(--mono); font-size: 13.5px; color: var(--ink); background: var(--bg); border: 1px solid var(--border, #e5e7eb); border-radius: 8px; }
.expl-search:focus { outline: none; border-color: var(--accent); }
.expl-searchbar .btn { white-space: nowrap; }
.expl-hint { margin: 8px 2px 0; font-size: 12.5px; line-height: 1.5; }
.expl-card { padding: 16px 20px; }
.expl-cardhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.expl-h { margin: 0; font-size: 15px; font-weight: 650; letter-spacing: .2px; color: var(--ink); }
/* One SHARED grid for the whole block: the label column is exactly as wide as
   the longest label (snug), and every value starts at the same x -> a real
   aligned "values" column with a uniform, tight label->value gap. */
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); column-gap: 18px; align-items: baseline; }
.kv-row { display: contents; }
.kv-k { color: var(--ink-dim); font-size: 12.5px; padding: 7px 0; border-top: 1px solid var(--surface-2, #f1f1f1); white-space: nowrap; }
.kv-v { min-width: 0; font-size: 13.5px; color: var(--ink); padding: 7px 0; border-top: 1px solid var(--surface-2, #f1f1f1); }
.kv-row:first-child .kv-k, .kv-row:first-child .kv-v { border-top: none; }
.kv-v .mono { font-family: var(--mono); word-break: break-all; }
.kv-v .strong { font-weight: 700; }
.expl-link { color: var(--accent); text-decoration: none; border-bottom: 1px dotted rgba(17,24,39,.35); word-break: break-all; }
.expl-link:hover { border-bottom-style: solid; }
.expl-badge { padding: 2px 8px; border-radius: 999px; font-size: .68rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; border: 1px solid; white-space: nowrap; }
.expl-badge.ok { background: #d1fae5; color: #065f46; border-color: #10b981; }
.expl-badge.warn { background: #fef3c7; color: #92400e; border-color: #f59e0b; }
.expl-badge.orphan { background: #fee2e2; color: #991b1b; border-color: #ef4444; }
.expl-badge.mut { background: var(--surface-2, #f3f4f6); color: var(--ink-dim); border-color: var(--border, #e5e7eb); }
.expl-cardhead span > .expl-badge + .expl-badge { margin-left: 6px; }
.expl-sub { margin-top: 14px; }
.expl-subh { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .8px; color: var(--ink-faint, #9ca3af); margin-bottom: 8px; }
.expl-txlist { display: grid; gap: 4px; }
.expl-txrow { display: flex; align-items: baseline; gap: 8px; padding: 5px 0; border-top: 1px solid var(--surface-2, #f1f1f1); flex-wrap: wrap; }
.expl-amt { font-size: 12px; }
.expl-amt + .expl-badge { margin-left: 8px; }
.expl-note { margin: 12px 0 0; font-size: 12px; line-height: 1.5; }
@media (max-width: 560px) {
  .kv { grid-template-columns: 1fr; }
  .kv-k { padding: 8px 0 0; border-top: 1px solid var(--surface-2, #f1f1f1); }
  .kv-v { padding: 1px 0 6px; border-top: none; }
  .kv-row:first-child .kv-k { border-top: none; }
}
