:root {
  --bg: #170f22;
  --bg-1: #221632;
  --bg-2: #1e142c;
  --text: #ece4f3;
  --heading: #f8eff8;
  --heading-2: #faf1f9;
  --muted: #a693b3;
  --muted-2: #9b8ba6;
  --muted-3: #94849f;
  --muted-4: #a494b0;
  --muted-5: #7a6a86;
  --accent: #ec4f9c;
  --accent-soft: #ee8fbe;
  --border: rgba(255, 255, 255, 0.09);
  --border-soft: rgba(255, 255, 255, 0.05);
  --card: linear-gradient(158deg, rgba(72, 45, 88, 0.55), rgba(34, 22, 50, 0.42));
  --card-shadow: 0 26px 60px rgba(10, 5, 18, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.11);
  --ok: #68dcb0;
  --ok-bg: rgba(87, 214, 163, 0.12);
  --ok-bd: rgba(87, 214, 163, 0.28);
  --warn: #efb066;
  --warn-bg: rgba(240, 169, 76, 0.12);
  --warn-bd: rgba(240, 169, 76, 0.3);
  --err: #e79191;
  --err-bg: rgba(226, 110, 110, 0.12);
  --err-bd: rgba(226, 110, 110, 0.3);
  --off: #98a7bf;
  --off-bg: rgba(150, 165, 190, 0.1);
  --off-bd: rgba(150, 165, 190, 0.24);
  --font-sans: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 46%, var(--bg) 100%);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-soft); }
button { font: inherit; }
input { font: inherit; }
::selection { background: rgba(236, 79, 156, 0.32); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #372849; border-radius: 8px; }

.wrap { width: min(1240px, calc(100% - 48px)); margin: 0 auto; }
.mono { font-family: var(--font-mono); }
.hidden { display: none !important; }

/* ---- ticker ---- */
.ticker {
  background: rgba(21, 13, 32, 0.66);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  border-bottom: 1px solid var(--border-soft);
}
.ticker-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px 24px; min-height: 38px; font-size: 12px; color: var(--muted-2);
}
.ticker-inner strong { font-family: var(--font-mono); font-weight: 500; color: #e4d5ec; }

/* ---- nav ---- */
.topnav {
  position: sticky; top: 0; z-index: 30;
  background: rgba(30, 20, 44, 0.55);
  backdrop-filter: blur(30px) saturate(170%);
  -webkit-backdrop-filter: blur(30px) saturate(170%);
  border-bottom: 1px solid var(--border-soft);
}
.topnav-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 26px; padding: 14px 0; }
.brand { display: flex; align-items: center; gap: 11px; margin-right: auto; }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px;
  background: linear-gradient(150deg, #f7eef7, #e5cfe1); color: #20122b; font-size: 15px; font-weight: 700;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; color: var(--heading); }
.brand-sub { font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }

.navlinks { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.navlink {
  padding: 8px 13px; border-radius: 9px; font-size: 13.5px; font-weight: 500;
  color: var(--muted-4); background: transparent; cursor: pointer; border: none;
  transition: color 0.18s ease, background 0.18s ease;
}
.navlink:hover { color: var(--heading); }
.navlink.active { color: var(--heading); background: rgba(236, 79, 156, 0.14); }

.btn {
  border: 1px solid rgba(255, 255, 255, 0.13); background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  color: #e2d3ea; padding: 9px 15px; border-radius: 10px; font-size: 13px; font-weight: 500;
  cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
}
.btn:hover { background: rgba(255, 255, 255, 0.13); }
.btn-primary { border: 0; background: var(--accent); color: #2c0f20; font-weight: 600; }
.btn-primary:hover { background: var(--accent-soft); }
.btn-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
#wallet-btn.wallet-connected { border-color: rgba(87, 214, 163, 0.4); background: rgba(87, 214, 163, 0.1); color: #d6f5e8; }
#wallet-btn i { color: var(--accent); }
#wallet-btn.wallet-connected i { color: var(--ok); }

.lang-switch {
  display: flex; gap: 2px; padding: 3px; border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.13); background: rgba(255, 255, 255, 0.06);
}
.lang-btn {
  border: 0; background: transparent; color: var(--muted); padding: 5px 9px; border-radius: 6px;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.03em; cursor: pointer;
}
.lang-btn.active { background: var(--accent); color: #2c0f20; }

/* ---- hero ---- */
.hero {
  position: relative; overflow: hidden; background: #180f23; border-bottom: 1px solid var(--border-soft);
}
.hero-inner {
  position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 36px 56px;
  padding: 56px 0 96px;
}
.hero-backdrop {
  position: absolute; inset: 0; overflow: hidden;
  mask-image: linear-gradient(180deg, #000 0%, #000 58%, transparent 96%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 58%, transparent 96%);
}
.hero-backdrop .glow {
  position: absolute; inset: -10% -5% auto -5%; height: 130%;
  background: radial-gradient(58% 90% at 82% 12%, rgba(236, 79, 156, 0.22), transparent 66%),
    radial-gradient(46% 80% at 12% 78%, rgba(196, 107, 224, 0.14), transparent 70%);
}
.hero-backdrop svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.eyebrow { margin: 0 0 14px; font-size: 12px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent-soft); }
.hero h1 { margin: 0 0 10px; font-size: clamp(28px, 3.6vw, 42px); line-height: 1.1; letter-spacing: -0.035em; font-weight: 600; color: var(--heading-2); }
.hero p.lead { margin: 0 0 28px; max-width: 52ch; font-size: 15.5px; color: var(--muted-4); }

.search-box {
  flex: 1 1 380px; display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 16px;
  background: rgba(255, 255, 255, 0.07); backdrop-filter: blur(20px) saturate(150%); -webkit-backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.13); border-radius: 14px; box-shadow: 0 18px 40px rgba(10, 5, 18, 0.45);
  max-width: 660px;
}
.search-box input {
  flex: 1 1 140px; min-width: 0; border: 0; outline: 0; background: transparent; color: #f2e7f5;
  font-size: 14.5px; padding: 10px 0;
}
.search-box .icon { color: var(--muted); font-size: 15px; }
.hero-hint { margin: 16px 0 0; font-size: 12.5px; color: var(--muted); }

.quick-connect {
  flex: 0 1 322px; min-width: 280px; background: rgba(16, 29, 52, 0.9); border: 1px solid #3f2d52;
  border-radius: 16px; padding: 22px; box-shadow: 0 22px 50px rgba(10, 5, 18, 0.5);
}
.quick-connect-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.quick-connect-label { font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.stratum-line {
  font-family: var(--font-mono); font-size: 13px; color: #dbe7f7; background: rgba(12, 7, 20, 0.42);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px; padding: 12px 14px; word-break: break-all; line-height: 1.6;
}
.quick-connect .btn { margin-top: 12px; width: 100%; justify-content: center; }
.quick-connect-facts { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; font-size: 12.5px; color: var(--muted-4); }
.quick-connect-facts span { display: flex; justify-content: space-between; gap: 12px; }
.quick-connect-facts strong { font-family: var(--font-mono); font-weight: 500; color: #e4d5ec; }

/* ---- page (sub-page) header ---- */
.page-body { padding: 44px 0 72px; }
.page-header { margin-bottom: 26px; }
.page-header.narrow { max-width: 70ch; }
.page-header h1 { margin: 0 0 8px; font-size: clamp(24px, 2.6vw, 32px); font-weight: 600; letter-spacing: -0.03em; color: var(--heading-2); }
.page-header p { margin: 0; max-width: 62ch; font-size: 14.5px; color: var(--muted-4); }
.back-link { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted-4); margin-bottom: 20px; }

/* ---- stat grid ---- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.stat-grid.overlap { margin-top: -52px; position: relative; z-index: 2; }
.stat-card {
  background: var(--card); backdrop-filter: blur(26px) saturate(160%); -webkit-backdrop-filter: blur(26px) saturate(160%);
  border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--card-shadow); padding: 20px;
}
.stat-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.stat-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: rgba(255, 255, 255, 0.08); color: #d59bcd; font-size: 14px; }
.stat-label { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.stat-value { font-family: var(--font-mono); font-size: 27px; font-weight: 500; letter-spacing: -0.03em; color: var(--heading); line-height: 1.1; }
.stat-sub { margin-top: 8px; font-size: 12.5px; color: var(--muted-2); }

/* ---- generic card / list ---- */
.card {
  background: var(--card); backdrop-filter: blur(26px) saturate(160%); -webkit-backdrop-filter: blur(26px) saturate(160%);
  border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--card-shadow); overflow: hidden;
}
.card-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px;
  padding: 18px 22px; border-bottom: 1px solid var(--border-soft);
}
.card-head h2 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; color: var(--heading); }
.card-head p { margin: 4px 0 0; font-size: 12.5px; color: var(--muted-2); }

.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 7px 14px; border-radius: 999px; font-size: 12.5px; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.12); background: rgba(255, 255, 255, 0.06); color: #bfaec9;
}
.chip.active { border-color: rgba(236, 79, 156, 0.42); background: rgba(236, 79, 156, 0.14); color: var(--accent); }

.pagination { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 16px 20px; border-top: 1px solid var(--border-soft); }
.pagination-nav { padding: 8px 13px; }
.pagination-nav:disabled { opacity: 0.35; cursor: default; }
.pagination-label { font-size: 12.5px; color: var(--muted-2); font-family: var(--font-mono); }

.chart-body { padding: 22px 22px 14px; }
.chart-canvas-wrap { position: relative; height: 210px; }
.chart-canvas-wrap.sm { height: 190px; }

.row-list .row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 15px 20px;
  border-bottom: 1px solid var(--border-soft);
}
.row-list .row:last-child { border-bottom: none; }
.row-list .row.clickable { cursor: pointer; }
.row-list .row.clickable:hover { background: rgba(236, 79, 156, 0.05); }
.row-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: rgba(255, 255, 255, 0.08); color: #c795c9; font-size: 13px; flex-shrink: 0; }
.row-icon.lg { width: 38px; height: 38px; border-radius: 11px; font-size: 14px; }
.row-main { flex: 1 1 170px; min-width: 0; }
.row-main .primary { font-family: var(--font-mono); font-size: 14px; }
.row-main .secondary { font-size: 12px; color: var(--muted-3); margin-top: 3px; }
.row-end { flex: 0 1 120px; text-align: right; }
.row-end .primary { font-family: var(--font-mono); font-size: 13.5px; color: #ece0f2; }
.row-end .secondary { font-size: 11.5px; color: var(--muted-3); margin-top: 3px; }
.row-more {
  display: flex; align-items: center; justify-content: center; gap: 8px; padding: 15px;
  font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; color: #a493b1; cursor: pointer; border: none; background: none; width: 100%;
}
.row-more:hover { color: var(--heading); }

/* ---- field/column list rows (blocks/miners/payouts tables) ---- */
.field-list .row { padding: 18px 22px; gap: 14px 22px; }
.field { display: flex; flex-direction: column; }
.field-label { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 5px; }
.field-value { font-size: 13.5px; color: #ddd0e4; }
.field-value.mono { font-family: var(--font-mono); font-size: 14px; }

.pill { font-size: 11px; padding: 4px 10px; border-radius: 999px; border: 1px solid; white-space: nowrap; }
.pill-ok { color: var(--ok); background: var(--ok-bg); border-color: var(--ok-bd); }
.pill-warn { color: var(--warn); background: var(--warn-bg); border-color: var(--warn-bd); }
.pill-err { color: var(--err); background: var(--err-bg); border-color: var(--err-bd); }
.pill-off { color: var(--off); background: var(--off-bg); border-color: var(--off-bd); }

.bar-track { display: block; height: 4px; border-radius: 999px; background: #312441; margin-top: 7px; }
.bar-fill { display: block; height: 4px; border-radius: 999px; background: var(--accent); }

/* ---- filter bar ---- */
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.filter-search {
  flex: 1 1 260px; display: flex; align-items: center; gap: 10px; padding: 0 14px;
  background: rgba(255, 255, 255, 0.06); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 13px;
}
.filter-search input { flex: 1 1 auto; min-width: 0; border: 0; outline: 0; background: transparent; color: #f2e7f5; font-size: 14px; padding: 11px 0; }
.filter-search .icon { color: var(--muted); }

/* ---- two column layout ---- */
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 16px; }
.mt16 { margin-top: 16px; }

/* ---- code block ---- */
.code-block {
  margin: 20px; padding: 18px; background: rgba(12, 7, 20, 0.42); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 13px; font-family: var(--font-mono); font-size: 13px;
  line-height: 1.9; color: #e6d8ee; overflow-x: auto;
}
.code-block .k { color: #e894c6; }
.code-block .v { color: #68dcb0; }
.code-block .s { color: #efb066; }
.code-block .indent { padding-left: 20px; }
.code-block .indent2 { padding-left: 42px; }

/* ---- pagination ---- */
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 22px; }

/* ---- steps / start page ---- */
.step-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.step-card { padding: 24px; }
.step-num { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: rgba(255, 255, 255, 0.08); color: #d59bcd; font-family: var(--font-mono); font-size: 14px; margin-bottom: 16px; }
.step-card h2 { margin: 0 0 8px; font-size: 16px; font-weight: 600; color: var(--heading); }
.step-card p { margin: 0; font-size: 14px; color: var(--muted-4); }
.tip-list { padding: 0 20px 22px; display: flex; flex-direction: column; gap: 10px; }
.tip-list .tip { display: flex; gap: 10px; font-size: 13.5px; color: var(--muted-4); }
.tip-list .tip::before { content: "•"; color: var(--ok); }

/* ---- endpoints ---- */
.endpoint-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 14px; padding: 16px 20px; border-bottom: 1px solid var(--border-soft); }
.endpoint-row:last-child { border-bottom: none; }
.endpoint-method {
  flex: 0 0 auto; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em; padding: 4px 8px;
  border-radius: 6px; border: 1px solid; color: var(--accent); background: rgba(236, 79, 156, 0.13); border-color: rgba(236, 79, 156, 0.34);
}
.endpoint-method.post { color: var(--warn); background: var(--warn-bg); border-color: var(--warn-bd); }
.endpoint-path { flex: 1 1 220px; font-family: var(--font-mono); font-size: 13.5px; color: #ece0f2; word-break: break-all; }
.endpoint-desc { flex: 1 1 100%; font-size: 13px; color: var(--muted-4); }

/* ---- footer ---- */
.site-footer { border-top: 1px solid var(--border-soft); background: linear-gradient(180deg, rgba(24, 15, 35, 0.72), rgba(18, 11, 27, 0.9)); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); }
.footer-grid { padding: 40px 0 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 28px; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.footer-brand span.name { font-size: 15px; font-weight: 600; color: #ece0f2; }
.footer-col { display: flex; flex-direction: column; gap: 9px; font-size: 13.5px; }
.footer-col .head { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-5); font-weight: 600; margin-bottom: 3px; }
.footer-col span.fact { color: var(--muted-4); }
.footer-bottom {
  padding: 18px 0 26px; border-top: 1px solid var(--border-soft); display: flex; flex-wrap: wrap;
  gap: 8px 20px; justify-content: space-between; font-size: 12px; color: var(--muted-5);
}

/* ---- toast ---- */
.toast {
  position: fixed; right: 24px; bottom: 24px; z-index: 60; display: flex; align-items: center; gap: 10px;
  padding: 14px 18px; background: linear-gradient(158deg, rgba(88, 52, 104, 0.72), rgba(40, 25, 58, 0.6));
  backdrop-filter: blur(30px) saturate(170%); -webkit-backdrop-filter: blur(30px) saturate(170%);
  border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 15px; box-shadow: 0 26px 54px rgba(10, 5, 18, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  font-size: 13.5px; color: #f2e7f5; animation: ep-rise 0.26s ease;
}
.toast-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
@keyframes ep-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }

.empty { display: flex; align-items: center; justify-content: center; padding: 24px; font-size: 12.5px; color: var(--muted-4); }
.error-text { color: var(--err); font-size: 13px; padding: 16px 22px; }

@media (max-width: 640px) {
  .hero-inner { padding: 40px 0 64px; }
  .field-list .row { flex-direction: column; align-items: stretch; }
  .row-end { text-align: left; }
}
