/* ──────────────────────────────────────────────────────────────────────
   Shared base — body / container / table / footer / page-head, used
   by every subpage so they pick up the redesign visual language without
   re-stating it. Pairs with site-header.css for the masthead.
   ────────────────────────────────────────────────────────────────────── */

:root {
  --bg:           #06070C;
  --bg-alt:       #0B0D14;
  --ink:          #F2F3F8;
  --ink-hi:       #FFFFFF;
  --ink-muted:    rgba(242,243,248,0.80);
  --ink-subtle:   rgba(242,243,248,0.62);
  --ink-dim:      rgba(242,243,248,0.32);
  --accent:       #E7011F;
  --accent-soft:  rgba(231,1,31,0.10);
  --accent-glow:  rgba(231,1,31,0.55);
  --border:        rgba(255,255,255,0.04);
  --border-strong: rgba(255,255,255,0.08);
  --border-faint:  rgba(255,255,255,0.025);
  --surface-card:  #11141C;
  --shadow-card:   0 1px 2px rgba(0,0,0,0.5), 0 6px 16px rgba(0,0,0,0.35);
  --shadow-card-hi:0 2px 4px rgba(0,0,0,0.55), 0 12px 32px rgba(0,0,0,0.45);
  --status-on:     #6ED25C;
  --green:         #87b13a;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, "SF Mono", monospace;
  --container-max: 1280px;
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; font-feature-settings: "ss01","tnum","cv11"; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  font-weight: 300;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; color: var(--ink-hi); }

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 1;
}

/* Page head — shared title + eyebrow */
.page-head { padding: 56px 0 24px; }
.page-title {
  font-family: var(--font-sans);
  font-size: 48px;
  line-height: 1.04;
  letter-spacing: -0.025em;
  font-weight: 200;
  color: var(--ink-hi);
  margin: 0 0 12px;
}
.page-title .accent { color: var(--accent); font-weight: 300; }
.page-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.page-meta .marker { color: var(--accent); margin-right: 8px; }
.page-lede {
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-muted);
  max-width: 720px;
  margin: 16px 0 0;
}

/* Section spacing */
.section { padding: 32px 0 0; }
main { padding-bottom: 64px; }

/* Tables — shared with the homepage's data-table styling */
.table-wrap {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  font-family: var(--font-sans);
  table-layout: fixed;
}
.data-table thead th {
  text-align: left;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding: 14px 22px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  background: rgba(255,255,255,0.012);
}
.data-table tbody td {
  padding: 16px 22px;
  color: var(--ink);
  vertical-align: middle;
  height: 56px;
  border-bottom: 1px solid var(--border-faint);
  font-feature-settings: "tnum";
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr { transition: background 0.12s; }
.data-table tbody tr:hover { background: rgba(231, 1, 31, 0.18); }
.data-table tbody tr.clickable,
.data-table tbody tr[data-href] { cursor: pointer; }
/* Left-edge accent bar on hover — matches the .is-current indicator. */
.data-table tbody tr td:first-child { position: relative; }
.data-table tbody tr td:first-child::before {
  content: "";
  position: absolute;
  left: 0; top: 8px; bottom: 8px;
  width: 2px;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
  opacity: 0;
  transition: opacity 0.15s;
}
.data-table tbody tr:hover td:first-child::before { opacity: 1; }
.data-table tbody tr.is-current td:first-child::before { opacity: 1; }

.data-table .num,
.data-table .hash,
.data-table .alias { font-family: var(--font-mono); }
.data-table .cell-link { color: var(--accent); }
.data-table .hash {
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 1;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 360px;
  display: inline-block;
  vertical-align: middle;
}
.data-table .age { color: var(--ink-muted); font-family: var(--font-mono); font-size: 13px; }
.data-table .cell-link { color: var(--accent); }
.data-table .amount { font-family: var(--font-mono); color: var(--ink-hi); }
.data-table .amount .ticker { font-size: 11px; color: var(--ink-subtle); margin-left: 4px; }
.data-table .amount { font-family: var(--font-mono); }
.data-table tbody td.is-positive { color: var(--green); font-weight: 500; }
.data-table tbody td.is-zero { color: var(--ink-dim); }

.status-dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  position: relative;
  cursor: default;
}
.status-dot.on  { background: var(--status-on); box-shadow: 0 0 6px rgba(110,210,92,0.4); }
.status-dot.off { box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.18); }

/* Pagination */
.pagination {
  display: flex; gap: 6px; justify-content: center;
  margin: 32px 0 56px;
  flex-wrap: wrap;
}
.pagination button {
  background: var(--surface-card);
  border: none;
  color: var(--ink-muted);
  padding: 8px 14px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  box-shadow: var(--shadow-card);
  transition: color 0.15s, background 0.15s, box-shadow 0.15s, transform 0.1s;
}
.pagination button:hover:not(:disabled) {
  color: var(--ink-hi);
  box-shadow: var(--shadow-card-hi);
  transform: translateY(-1px);
}
.pagination button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.pagination button:disabled { opacity: 0.35; cursor: not-allowed; }

/* Detail-card grid — used on /block/, /stealthnode/ */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}
.detail-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  align-items: baseline;
  gap: 16px;
  padding: 14px 18px;
  transition: background 0.18s ease;
  background: var(--surface-card);
  border-radius: 8px;
  box-shadow: var(--shadow-card);
}
.detail-row .lbl {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-subtle);
}
.detail-row .val {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-hi);
  word-break: break-all;
  font-feature-settings: "tnum";
}
.detail-row:hover { background: #14151B; }
.detail-row.span-full { grid-column: span 2; grid-template-columns: 200px 1fr; }
@media (max-width: 720px) {
  .detail-grid { grid-template-columns: 1fr; }
  .detail-row, .detail-row.span-full { grid-template-columns: 1fr; gap: 4px; }
  .detail-row.span-full { grid-column: span 1; }
}

/* Inline copy-to-clipboard button (used next to hashes / txids). */
.copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-left: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink-subtle);
  cursor: pointer;
  border-radius: 4px;
  vertical-align: -5px;
  flex-shrink: 0;
  transition: color 0.15s ease, background 0.15s ease;
}
.copy-btn:hover { color: var(--accent); background: rgba(231,1,31,0.10); }
.copy-btn:active { transform: translateY(1px); }
.copy-btn svg { width: 14px; height: 14px; display: block; }
.copy-btn.is-copied { color: #5fd07a; background: rgba(95,208,122,0.10); }
.copy-btn.is-copied .ic-copy { display: none; }
.copy-btn .ic-check { display: none; }
.copy-btn.is-copied .ic-check { display: block; }

/* Footer — same as homepage */
.site-footer {
  background: var(--bg);
  padding: 40px 0 32px;
  border-top: 1px solid rgba(255,255,255,0.12);
  position: relative;
  margin-top: 24px;
  overflow: hidden; /* contain the full-width hairline breakouts below */
}
.site-footer .container { max-width: none; padding: 0 48px; }
.foot-masthead {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  /* Break out of .container so the bottom hairline reaches viewport edges. */
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding-left: calc(50vw - 50%);
  padding-right: calc(50vw - 50%);
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  margin-bottom: 24px;
}
.foot-masthead h5 {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 16px;
  color: #b0b0b0;
  font-weight: 500;
}
.foot-masthead ul { list-style: none; padding: 0; margin: 0; }
.foot-masthead li { margin-bottom: 4px; }
.foot-masthead a {
  color: #c0c0c0;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.15s;
  min-height: 44px;
  padding: 10px 0;
  display: inline-flex;
  align-items: center;
}
.foot-masthead a:hover { color: var(--ink-hi); }
.foot-statement {
  font-weight: 200;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  max-width: 380px;
  margin-bottom: 20px;
  color: var(--ink);
}
.foot-statement strong { font-weight: 700; color: var(--ink-hi); }
.foot-eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: #b0b0b0;
  text-transform: uppercase;
}
.foot-bottom {
  display: flex;
  justify-content: space-between;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #b0b0b0;
  flex-wrap: wrap;
  gap: 16px;
}
/* Trademark + legal-links row at the very bottom of the footer.
   Same viewport-breakout trick as .foot-masthead so its top hairline is full-width. */
.foot-trademark {
  margin: 32px calc(50% - 50vw) 0;
  padding: 32px calc(50vw - 50%) 0;
  border-top: 1px solid rgba(255,255,255,0.12);
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  align-items: center;
  justify-content: space-between;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
}
.foot-trademark .legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.foot-trademark .legal-nav a { color: #c0c0c0; text-decoration: none; }
.foot-trademark .legal-nav a:hover { color: var(--ink-hi); }
.foot-trademark .tm-line {
  font-size: 13px;
  letter-spacing: 0.04em;
  color: #a8a8a8;
  line-height: 1.6;
}
@media (max-width: 900px) { .foot-masthead { grid-template-columns: 1fr 1fr; } }
@media (max-width: 720px) {
  .container { padding: 0 20px; }
  .site-footer .container { padding: 0 20px; }
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .data-table { min-width: 720px; }
  .data-table thead th,
  .data-table tbody td { padding: 12px 16px; }
  /* Sub-page title row — same shape as the homepage's .h-page rule, so
     /blocks, /block, /richlist, /stealthnodes, /network, /pricehistory,
     /setup-guide and the per-node template all collapse cleanly. */
  .page-head { padding: 36px 0 18px; }
  .page-title { font-size: 32px; line-height: 1.05; letter-spacing: -0.02em; overflow-wrap: break-word; }
  .page-lede  { font-size: 14px; line-height: 1.6; margin-top: 12px; }
  .page-meta  { font-size: 11px; letter-spacing: 0.10em; }
  /* Detail-row label column was 200px on desktop — drop the gap on
     mobile since label + val now stack. */
  .detail-row { padding: 12px 14px; }
  .detail-row .lbl { font-size: 10px; }
  .detail-row .val { font-size: 12px; }
  /* Pagination buttons keep enough tap area without breaking onto more
     than two rows. */
  .pagination button { padding: 8px 11px; font-size: 11px; letter-spacing: 0.04em; }
  .foot-statement { font-size: 20px; max-width: none; line-height: 1.35; margin-bottom: 16px; }
  .foot-eyebrow { font-size: 12px; letter-spacing: 0.14em; }
  .foot-masthead { grid-template-columns: 1fr 1fr; gap: 28px 24px; padding-bottom: 28px; margin-bottom: 22px; }
  .foot-masthead h5 { font-size: 12px; margin-bottom: 12px; letter-spacing: 0.14em; }
  .foot-masthead a { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 0; font-size: 15px; line-height: 1.4; }
  .foot-masthead li { margin-bottom: 0; }
  .foot-bottom { font-size: 12px; gap: 8px; padding-top: 16px; justify-content: center; text-align: center; }
  .foot-trademark { padding-top: 22px; gap: 14px 18px; }
  .foot-trademark .tm-line { font-size: 12px; line-height: 1.55; }
  .foot-trademark .legal-nav { gap: 18px; font-size: 13px; }
  .foot-trademark .legal-nav a { padding: 6px 0; min-height: 36px; display: inline-flex; align-items: center; }
}
@media (max-width: 500px) {
  .foot-masthead { grid-template-columns: 1fr; }
  .site-footer { padding: 56px 0 32px; }
}
@media (max-width: 460px) {
  .container { padding: 0 16px; }
  .site-footer .container { padding: 0 16px; }
  .page-title { font-size: 28px; }
  .page-head { padding: 28px 0 14px; }
  .data-table thead th,
  .data-table tbody td { padding: 10px 14px; }
}

/* ═════════════════════════════════════════════════════════════════════
   CUSTOM SCROLLBAR — JS-driven, on every page
   ─────────────────────────────────────────────────────────────────────
   Three design-language signals layered on top of a functional scrollbar:
     1. § section anchors  — hairline ticks at each <section class="section">
        boundary (read from .section-num). Click to jump.
     2. Red-accent thumb   — 1px accent-red hairline on the LEFT edge of
        the thumb, ties into the brand-red highlight system.
     3. Mono position pill — IBM Plex Mono label "§NN · NN%" appears during
        scroll, fades when idle.
   The rail is wider than the track so the floating label has room to live;
   only track/thumb/ticks are interactive — the rest of the rail has
   pointer-events: none so it doesn't block content underneath.

   Markup is injected by _shared/script.js (initCustomScrollbar). The
   native scrollbars below are hidden so we own the visual.
   ═════════════════════════════════════════════════════════════════════ */
html { scrollbar-width: none; }                    /* Firefox */
html::-webkit-scrollbar,
body::-webkit-scrollbar,
::-webkit-scrollbar { width: 0; height: 0; display: none; }

.sb-rail {
  position: fixed;
  top: 0;
  right: 0;
  width: 100px;
  height: 100vh;
  z-index: 9999;
  pointer-events: none;
}
.sb-track {
  position: absolute;
  top: 0;
  right: 2px;
  width: 8px;
  height: 100%;
  background: var(--bg-alt);
  pointer-events: auto;
  cursor: pointer;
  transition: opacity 0.2s ease;
}
.sb-thumb {
  position: absolute;
  top: 0;
  left: 0;
  width: 8px;
  min-height: 24px;
  background: var(--ink-muted);
  border-left: 1px solid var(--accent);  /* signal #2 — brand red */
  cursor: grab;
  transition: background 0.15s ease;
  will-change: transform, height;
  z-index: 2;
}
.sb-thumb:hover  { background: var(--ink-hi); }
.sb-thumb:active { background: var(--ink-hi); cursor: grabbing; }

/* § section tick marks — signal #1 */
.sb-tick {
  position: absolute;
  right: 2px;
  width: 8px;
  height: 1px;
  background: var(--ink-dim);
  pointer-events: auto;
  cursor: pointer;
  z-index: 1;
  transition: background 0.15s ease, height 0.15s ease, width 0.15s ease;
}
.sb-tick:hover {
  background: var(--accent);
  height: 2px;
  width: 12px;
  right: 0;
}

/* Mono position indicator — signal #3 */
.sb-label {
  position: absolute;
  top: 0;
  right: 16px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
  pointer-events: none;
  background: var(--bg);
  padding: 4px 8px;
  border: 1px solid var(--border-strong);
  transition: opacity 0.25s ease;
  opacity: 0;
  will-change: transform, opacity;
}
.sb-label .sb-label-num { color: var(--accent); font-weight: 500; margin-right: 6px; }
.sb-label .sb-label-sep { color: var(--ink-dim); margin: 0 6px; }
.sb-label.is-active     { opacity: 1; }

.sb-track.sb-hidden { opacity: 0; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  .sb-track, .sb-thumb, .sb-tick, .sb-label { transition: none; }
}
