/* ==========================================================================
   Armaxcoin "Quantum Lattice" design system
   Shared by armax_web (armax-coin.cloud) and armax-explorer (*.explorer.*).
   Self-hosted fonts only (no third-party requests, zero-tracking policy).
   ========================================================================== */

/* --- Fonts (SIL OFL 1.1, see /fonts/OFL-*.txt) --- */
@font-face {
  font-family: "Space Grotesk";
  src: url("/fonts/space-grotesk.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/jetbrains-mono.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

/* --- Tokens: dark (default) --- */
:root {
  color-scheme: dark;

  --bg: #090c1b;
  --bg-subtle: #0c1024;
  --surface: #10152d;
  --surface-2: #151b38;
  --surface-hover: #1b2246;
  --surface-glass: rgba(16, 21, 45, 0.78);
  --border: rgba(148, 160, 255, 0.14);
  --border-subtle: rgba(148, 160, 255, 0.08);
  --border-strong: rgba(148, 160, 255, 0.26);
  --border-focus: #4fd1e8;

  --text: #e9ebf8;
  --text-muted: #a3aacb;
  --text-dim: #7c84aa;
  --text-inverse: #0b0d1a;

  /* Brand gold (from the logo) and live-data cyan */
  --brand: #f2c14e;
  --brand-strong: #e0a82e;
  --brand-ink: #1a1302;
  --brand-subtle: rgba(242, 193, 78, 0.12);
  --brand-border: rgba(242, 193, 78, 0.38);
  --data: #4fd1e8;
  --data-subtle: rgba(79, 209, 232, 0.12);
  --data-border: rgba(79, 209, 232, 0.34);

  /* Legacy aliases kept for page scripts that reference --accent */
  --accent: var(--data);
  --accent-hover: #7ddff0;
  --accent-subtle: var(--data-subtle);

  --success: #3ddc97;
  --success-subtle: rgba(61, 220, 151, 0.12);
  --success-border: rgba(61, 220, 151, 0.34);
  --warning: #f5a524;
  --warning-subtle: rgba(245, 165, 36, 0.12);
  --warning-border: rgba(245, 165, 36, 0.36);
  --danger: #ff5c7a;
  --danger-subtle: rgba(255, 92, 122, 0.12);
  --danger-border: rgba(255, 92, 122, 0.36);
  --violet: #a78bfa;
  --violet-subtle: rgba(167, 139, 250, 0.14);
  --live: var(--success);

  --lattice-dot: rgba(148, 160, 255, 0.16);
  --lattice-line: rgba(148, 160, 255, 0.045);
  --glow-data: 0 0 0 1px var(--data-border), 0 8px 28px rgba(79, 209, 232, 0.12);

  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-8: 3rem;
  --space-10: 4.5rem;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 30px rgba(3, 5, 18, 0.45);
  --shadow-lg: 0 24px 64px rgba(3, 5, 18, 0.6);

  --container-max: 1320px;
  --navbar-height: 64px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* --- Tokens: light --- */
:root[data-theme="light"] {
  color-scheme: light;

  --bg: #f5f6fc;
  --bg-subtle: #eef0f9;
  --surface: #ffffff;
  --surface-2: #f3f4fb;
  --surface-hover: #e9ebf7;
  --surface-glass: rgba(255, 255, 255, 0.82);
  --border: rgba(30, 38, 92, 0.13);
  --border-subtle: rgba(30, 38, 92, 0.07);
  --border-strong: rgba(30, 38, 92, 0.24);
  --border-focus: #0a7e93;

  --text: #121530;
  --text-muted: #4a5078;
  --text-dim: #646a90;
  --text-inverse: #ffffff;

  --brand: #8f6200;
  --brand-strong: #6f4b00;
  --brand-ink: #ffffff;
  --brand-subtle: rgba(181, 128, 0, 0.1);
  --brand-border: rgba(143, 98, 0, 0.36);
  --data: #0a7e93;
  --data-subtle: rgba(10, 126, 147, 0.09);
  --data-border: rgba(10, 126, 147, 0.32);
  --accent-hover: #075f6f;

  --success: #0c8a57;
  --success-subtle: rgba(12, 138, 87, 0.1);
  --success-border: rgba(12, 138, 87, 0.3);
  --warning: #a35f00;
  --warning-subtle: rgba(198, 120, 0, 0.11);
  --warning-border: rgba(163, 95, 0, 0.32);
  --danger: #c2183f;
  --danger-subtle: rgba(194, 24, 63, 0.09);
  --danger-border: rgba(194, 24, 63, 0.3);
  --violet: #6d4fd8;
  --violet-subtle: rgba(109, 79, 216, 0.1);

  --lattice-dot: rgba(30, 38, 92, 0.13);
  --lattice-line: rgba(30, 38, 92, 0.035);
  --glow-data: 0 0 0 1px var(--data-border), 0 8px 24px rgba(10, 126, 147, 0.1);
  --shadow-md: 0 10px 30px rgba(20, 26, 70, 0.08);
  --shadow-lg: 0 24px 64px rgba(20, 26, 70, 0.14);
}

/* --- Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--navbar-height) + 1rem);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

/* Lattice field: a fixed grid of lattice points behind every page (the brand motif,
   a nod to the lattice cryptography behind ML-DSA-65). Fades out down the page. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 1px 1px, var(--lattice-dot) 1.2px, transparent 0),
    linear-gradient(var(--lattice-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--lattice-line) 1px, transparent 1px);
  background-size: 32px 32px, 128px 128px, 128px 128px;
  -webkit-mask-image: radial-gradient(ellipse 120% 70% at 50% 0%, #000 30%, transparent 85%);
  mask-image: radial-gradient(ellipse 120% 70% at 50% 0%, #000 30%, transparent 85%);
}

img,
svg,
canvas {
  display: block;
  max-width: 100%;
}
svg {
  flex-shrink: 0;
}

a {
  color: var(--data);
  text-decoration: none;
  transition: color 0.15s var(--ease);
}
a:hover {
  color: var(--accent-hover);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.015em;
  font-weight: 600;
}
h1 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.35rem); }
h2 { font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.7rem); }
h3 { font-size: 1.12rem; }
h4 { font-size: 0.95rem; }

p {
  color: var(--text-muted);
}

strong {
  color: var(--text);
  font-weight: 600;
}

code,
kbd,
pre,
.mono {
  font-family: var(--font-mono);
  font-feature-settings: "zero" 1;
}
code {
  font-size: 0.86em;
  padding: 0.08em 0.38em;
  border-radius: 5px;
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  color: var(--text);
  overflow-wrap: break-word;
}

ul,
ol {
  list-style: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
  background: none;
  border: none;
}

table {
  border-collapse: collapse;
  width: 100%;
}

::selection {
  background: var(--brand-subtle);
  color: var(--text);
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 3000;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  background: var(--brand);
  color: var(--brand-ink);
  font-weight: 600;
}
.skip-link:focus {
  top: 0.75rem;
  color: var(--brand-ink);
}

.tabular {
  font-variant-numeric: tabular-nums;
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.main-content {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding: 1.75rem 1.25rem 3.5rem;
  flex: 1;
}

.stack { display: flex; flex-direction: column; gap: var(--gap, 1rem); }
.row { display: flex; align-items: center; gap: var(--gap, 0.75rem); flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.text-muted { color: var(--text-muted); }
.text-dim { color: var(--text-dim); }
.text-data { color: var(--data); }
.text-brand { color: var(--brand); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-sm { font-size: 0.85rem; }
.text-xs { font-size: 0.76rem; }
.text-right { text-align: right; }
.mt-1 { margin-top: var(--space-2); }
.mt-2 { margin-top: var(--space-4); }
.mb-1 { margin-bottom: var(--space-2); }
.mb-2 { margin-bottom: var(--space-4); }
.mb-3 { margin-bottom: var(--space-5); }
.hidden { display: none !important; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--data);
}

/* --- Testnet / mainnet strip --- */
.testnet-strip {
  position: relative;
  z-index: 60;
  background: linear-gradient(90deg, var(--brand-subtle), transparent 60%), var(--bg-subtle);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  color: var(--text-muted);
}
.testnet-strip.is-mainnet {
  background: linear-gradient(90deg, var(--violet-subtle), transparent 60%), var(--bg-subtle);
}
.testnet-strip-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 36px;
  padding-block: 0.35rem;
}
.testnet-strip-text {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.6rem;
  min-width: 0;
}
.testnet-strip-text code {
  font-size: 0.76rem;
}
.strip-pill {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.12rem 0.5rem;
  border-radius: var(--radius-pill);
  background: var(--brand-subtle);
  color: var(--brand);
  border: 1px solid var(--brand-border);
}
.is-mainnet .strip-pill {
  background: var(--violet-subtle);
  color: var(--violet);
  border-color: var(--violet);
}
.strip-link {
  font-weight: 600;
  color: var(--brand);
  white-space: nowrap;
}
.strip-dismiss {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-size: 1.1rem;
  line-height: 1;
}
.strip-dismiss:hover {
  background: var(--surface-hover);
  color: var(--text);
}

/* --- Navbar --- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface-glass);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.navbar-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: var(--navbar-height);
}
.brand-cluster {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}
.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.brand-logo {
  width: 30px;
  height: 30px;
  object-fit: contain;
}
.brand-text {
  height: 15px;
  width: auto;
}
.net-badge {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 0.18rem 0.5rem;
  border-radius: var(--radius-pill);
  color: var(--data);
  background: var(--data-subtle);
  border: 1px solid var(--data-border);
  white-space: nowrap;
}
.net-badge.is-mainnet {
  color: var(--violet);
  background: var(--violet-subtle);
  border-color: var(--violet);
}
.net-badge.is-soon {
  color: var(--brand);
  background: var(--brand-subtle);
  border-color: var(--brand-border);
}

.global-search-form {
  flex: 1 1 320px;
  max-width: 460px;
  display: flex;
  align-items: center;
  height: 38px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.global-search-form:focus-within {
  border-color: var(--data-border);
  box-shadow: 0 0 0 3px var(--data-subtle);
}
.global-search-input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0 0.85rem;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text);
}
.global-search-input::placeholder {
  color: var(--text-dim);
}
.global-search-btn {
  width: 38px;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  border-left: 1px solid var(--border-subtle);
}
.global-search-btn:hover {
  color: var(--data);
}

.nav-desktop {
  margin-left: auto;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}
.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 0.7rem;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}
.nav-link:hover {
  color: var(--text);
  background: var(--surface-hover);
}
.nav-link.active {
  color: var(--text);
}
.nav-link.active::after {
  content: "";
  position: absolute;
  left: 0.7rem;
  right: 0.7rem;
  bottom: -15px;
  height: 2px;
  border-radius: 2px;
  background: var(--brand);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.pool-pill,
.node-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 32px;
  padding: 0 0.7rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}
.pool-pill:hover {
  border-color: var(--brand-border);
  color: var(--text);
}
.network-switch-pill {
  color: var(--violet);
  border-color: var(--violet-subtle);
}
.network-switch-pill.to-testnet {
  color: var(--brand);
  border-color: var(--brand-border);
}
.node-status-pill {
  font-family: var(--font-mono);
  font-size: 0.74rem;
}
.node-status-pill.is-offline {
  color: var(--danger);
  border-color: var(--danger-border);
}
.status-dot,
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-dim);
  flex-shrink: 0;
}
.status-dot.is-live,
.live-dot {
  background: var(--success);
  box-shadow: 0 0 0 3px var(--success-subtle);
  animation: pulse 2.4s ease-in-out infinite;
}
.status-dot.is-offline {
  background: var(--danger);
  box-shadow: 0 0 0 3px var(--danger-subtle);
  animation: none;
}
.status-dot.is-soon {
  background: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-subtle);
  animation: none;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.theme-toggle-btn,
.mobile-menu-btn {
  display: inline-grid;
  place-items: center;
  height: 32px;
  min-width: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.theme-toggle-btn:hover,
.mobile-menu-btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
}
.mobile-menu-btn {
  display: none;
  grid-auto-flow: column;
  gap: 0.35rem;
  padding: 0 0.6rem;
  font-size: 0.78rem;
}

.mobile-quick-nav {
  display: none;
  border-top: 1px solid var(--border-subtle);
}
.mobile-quick-nav-inner {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding-block: 0.5rem;
  scrollbar-width: none;
}
.mobile-quick-nav-inner::-webkit-scrollbar {
  display: none;
}
.mobile-quick-pill {
  flex-shrink: 0;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.mobile-quick-pill.active {
  color: var(--brand-ink);
  background: var(--brand);
  border-color: var(--brand);
}

.mobile-nav-drawer {
  border-top: 1px solid var(--border);
  padding: 0.9rem 1.25rem 1.1rem;
  background: var(--surface);
}
.mobile-search-form {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.mobile-search-form .global-search-input {
  height: 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-subtle);
}
.mobile-nav-links {
  display: grid;
  gap: 0.15rem;
}
.mobile-nav-links .nav-link {
  width: 100%;
  height: 40px;
}
.mobile-nav-links .nav-link.active::after {
  display: none;
}
.mobile-nav-links .nav-link.active {
  background: var(--brand-subtle);
  color: var(--brand);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  height: 40px;
  padding: 0 1.05rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition: background 0.15s var(--ease), border-color 0.15s, color 0.15s, transform 0.15s;
}
.btn:active {
  transform: translateY(1px);
}
.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
.btn-sm {
  height: 32px;
  padding: 0 0.75rem;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}
.btn-lg {
  height: 48px;
  padding: 0 1.4rem;
  font-size: 0.95rem;
}
.btn-primary {
  background: var(--brand);
  color: var(--brand-ink);
  border-color: var(--brand);
}
.btn-primary:hover {
  background: var(--brand-strong);
  border-color: var(--brand-strong);
  color: var(--brand-ink);
}
.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
  color: var(--text);
}
.btn-accent {
  background: var(--data-subtle);
  color: var(--data);
  border-color: var(--data-border);
}
.btn-accent:hover {
  background: var(--data);
  color: var(--text-inverse);
}
.btn-ghost {
  color: var(--text-muted);
}
.btn-ghost:hover {
  color: var(--text);
  background: var(--surface-hover);
}
.btn.is-active {
  background: var(--data-subtle);
  color: var(--data);
  border-color: var(--data-border);
}
.btn-close {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  font-size: 1.4rem;
  line-height: 1;
  color: var(--text-dim);
}
.btn-close:hover {
  color: var(--text);
  background: var(--surface-hover);
}
.btn-copy-mini {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 5px;
  color: var(--text-dim);
  vertical-align: middle;
}
.btn-copy-mini:hover {
  color: var(--data);
  background: var(--data-subtle);
}
.btn-copy-mini svg {
  width: 13px;
  height: 13px;
}
.btn-copy-mini.copied {
  color: var(--success);
}

/* --- Badges --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.14rem 0.5rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.badge-success { color: var(--success); background: var(--success-subtle); border-color: var(--success-border); }
.badge-warning { color: var(--warning); background: var(--warning-subtle); border-color: var(--warning-border); }
.badge-danger { color: var(--danger); background: var(--danger-subtle); border-color: var(--danger-border); }
.badge-info { color: var(--data); background: var(--data-subtle); border-color: var(--data-border); }
.badge-brand { color: var(--brand); background: var(--brand-subtle); border-color: var(--brand-border); }
.badge-violet { color: var(--violet); background: var(--violet-subtle); border-color: var(--violet-subtle); }
.badge-get { color: var(--success); background: var(--success-subtle); border-color: var(--success-border); }
.badge-post { color: var(--brand); background: var(--brand-subtle); border-color: var(--brand-border); }

/* --- Panels & cards --- */
.panel,
.table-panel,
.chart-card,
.stat-card,
.endpoint-card,
.notice-box,
.wallet-address-panel {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
/* Lattice corner node: a small brand accent on primary surfaces */
.panel::before,
.table-panel::before,
.chart-card::before,
.stat-card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 18px;
  width: 28px;
  height: 2px;
  border-radius: 0 0 2px 2px;
  background: linear-gradient(90deg, var(--brand), transparent);
  opacity: 0.85;
}
.panel {
  padding: 1.25rem;
}
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.panel-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.page-header h1 {
  margin-top: 0.35rem;
}
.page-header p {
  max-width: 64ch;
  margin-top: 0.4rem;
  font-size: 0.95rem;
}
.page-header-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* --- Stats --- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}
.stat-card {
  padding: 1rem 1.1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.stat-card:hover {
  border-color: var(--data-border);
}
.stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  color: var(--text-dim);
}
.stat-label,
.chart-card-title {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.stat-value {
  margin-top: 0.4rem;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.stat-value.is-data {
  color: var(--data);
}
.stat-sub {
  margin-top: 0.2rem;
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* Network status ribbon on the explorer */
.net-ribbon {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
  margin-bottom: 1.25rem;
}
.net-ribbon-item {
  padding: 0.85rem 1rem;
  border-right: 1px solid var(--border-subtle);
  min-width: 0;
}
.net-ribbon-item:last-child {
  border-right: none;
}
.net-ribbon-value {
  margin-top: 0.25rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.net-ribbon-value.is-data {
  color: var(--data);
}

/* --- Charts --- */
.charts-grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}
.chart-card {
  padding: 1rem 1.1rem 0.85rem;
}
.chart-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-dim);
  margin-bottom: 0.4rem;
}
.chart-card-stat {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.chart-card-note {
  font-family: var(--font-sans);
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--text-dim);
}
.chart-svg-wrap {
  position: relative;
  width: 100%;
  height: 72px;
  margin-top: 0.5rem;
  cursor: crosshair;
}
.chart-svg-wrap svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.sparkline-canvas {
  width: 100%;
  height: 100%;
}
.sparkline-tooltip {
  position: absolute;
  top: -28px;
  right: 0;
  z-index: 10;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-md);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 0.15s, transform 0.15s;
}
.sparkline-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Tabs, filters, controls --- */
.explorer-controls-bar {
  position: sticky;
  top: var(--navbar-height);
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0 -1.25rem 1rem;
  padding: 0.6rem 1.25rem;
  background: var(--surface-glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}
.view-tabs {
  display: flex;
  gap: 0.25rem;
  padding: 0.25rem;
  border-radius: var(--radius);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}
.view-tabs::-webkit-scrollbar {
  display: none;
}
.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  height: 34px;
  padding: 0 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}
.tab-btn:hover {
  color: var(--text);
}
.tab-btn.active {
  background: var(--surface-2);
  color: var(--text);
  box-shadow: inset 0 -2px 0 var(--brand);
}
.tab-count {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0 0.4rem;
  border-radius: var(--radius-pill);
  background: var(--surface-hover);
  color: var(--text-muted);
}
.controls-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.privacy-badge,
.auto-refresh-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 32px;
  padding: 0 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: var(--bg-subtle);
}
.privacy-badge {
  color: var(--data);
  border-color: var(--data-border);
  background: var(--data-subtle);
}
.auto-refresh-pill .btn {
  height: 24px;
  padding: 0 0.5rem;
  font-size: 0.7rem;
}
.auto-refresh-pill .live-dot.is-paused {
  background: var(--text-dim);
  box-shadow: none;
  animation: none;
}
.filter-pill-group {
  display: inline-flex;
  padding: 2px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
}
.btn-filter-pill,
.fee-preset-pill {
  height: 28px;
  padding: 0 0.7rem;
  border-radius: 5px;
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid transparent;
}
.btn-filter-pill:hover,
.fee-preset-pill:hover {
  color: var(--text);
}
.btn-filter-pill.active,
.fee-preset-pill.active {
  background: var(--data-subtle);
  color: var(--data);
  border-color: var(--data-border);
}
.fee-val {
  font-family: var(--font-mono);
}

.milestone-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.74rem;
  color: var(--text-dim);
}
.milestone-bar-label {
  font-weight: 600;
  color: var(--text-muted);
  margin-right: 0.15rem;
}

/* --- Tables --- */
.table-panel {
  overflow: hidden;
  margin-bottom: 1.25rem;
}
.table-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--border);
}
.table-panel-title {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text);
}
.table-panel-meta {
  font-size: 0.76rem;
  color: var(--text-dim);
}
.table-panel-footer {
  padding: 0.8rem 1.1rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.76rem;
  color: var(--text-dim);
}
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table-sticky-head thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}
.table-compact {
  font-size: 0.84rem;
}
.table-compact th {
  padding: 0.6rem 1.1rem;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table-compact td {
  padding: 0.7rem 1.1rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text);
  vertical-align: middle;
  white-space: nowrap;
}
.table-compact tbody tr {
  transition: background 0.12s;
}
.table-compact tbody tr:hover {
  background: var(--surface-hover);
}
.table-compact tbody tr:last-child td {
  border-bottom: none;
}
.table-compact td.table-empty {
  padding: 2.25rem 1rem;
  text-align: center;
  color: var(--text-dim);
  white-space: normal;
}
.hash-cell,
.mono-cell {
  font-family: var(--font-mono);
  font-size: 0.8rem;
}
.hash-cell a,
.link-accent {
  color: var(--data);
}
.hash-cell a:hover,
.link-accent:hover {
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.block-age-cell,
.transfer-age-cell {
  text-align: right;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.block-age-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
}
.block-conf-cell,
.transfer-conf-cell {
  font-variant-numeric: tabular-nums;
}
.amount-cell {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.param-table {
  font-size: 0.86rem;
}
.param-table th,
.param-table td {
  padding: 0.6rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: top;
}
.param-table th {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: var(--bg-subtle);
}

/* --- Pagination --- */
.pagination-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.75rem 1.1rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.78rem;
  color: var(--text-dim);
}
.pagination-bar:empty {
  display: none;
}
.pagination-controls {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: wrap;
}
.btn-page-nav,
.btn-page-num {
  min-width: 32px;
  height: 32px;
  padding: 0 0.55rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-muted);
  background: var(--surface);
}
.btn-page-nav:hover:not(:disabled),
.btn-page-num:hover {
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-page-num.active {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--brand-ink);
}
.btn-page-nav:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.page-ellipsis {
  padding: 0 0.25rem;
  color: var(--text-dim);
}
.page-jump-input {
  width: 64px;
  height: 32px;
  padding: 0 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  font-family: var(--font-mono);
  font-size: 0.76rem;
}

/* --- Forms --- */
.form-field {
  display: grid;
  gap: 0.4rem;
}
.form-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}
.input,
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 42px;
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus,
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--data-border);
  box-shadow: 0 0 0 3px var(--data-subtle);
}
.input.mono,
.form-field input.mono {
  font-family: var(--font-mono);
  font-size: 0.84rem;
}
.input-hint-error,
.input-hint-success {
  font-size: 0.78rem;
}
.input-hint-error { color: var(--danger); }
.input-hint-success { color: var(--success); }

.explorer-search-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.4rem 0.4rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.explorer-search-box:focus-within {
  border-color: var(--data-border);
  box-shadow: var(--glow-data);
}
.explorer-search-box svg {
  color: var(--text-dim);
}
.explorer-search-box input {
  flex: 1;
  min-width: 0;
  min-height: 40px;
  border: none;
  background: transparent;
  outline: none;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  color: var(--text);
}
.explorer-search-box input::placeholder {
  color: var(--text-dim);
}

/* --- Callouts & banners --- */
.notice-banner,
.state-banner,
.alert-box,
.callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.85rem;
  color: var(--text-muted);
}
.state-banner.is-offline,
.alert-box.is-danger,
.callout.is-danger {
  border-color: var(--danger-border);
  background: var(--danger-subtle);
  color: var(--danger);
}
.state-banner.is-syncing,
.callout.is-warning {
  border-color: var(--warning-border);
  background: var(--warning-subtle);
  color: var(--warning);
}
.callout.is-info {
  border-color: var(--data-border);
  background: var(--data-subtle);
}
.callout.is-brand {
  border-color: var(--brand-border);
  background: linear-gradient(120deg, var(--brand-subtle), transparent 70%), var(--surface);
}
.callout-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  flex-shrink: 0;
  background: var(--brand-subtle);
  color: var(--brand);
}
.callout-body {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex: 1 1 320px;
  min-width: 0;
}
.callout-title {
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.callout-text {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}
.callout-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.notice-box {
  padding: 1rem 1.1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.node-offline-alert {
  display: none;
}
.node-offline-alert.show {
  display: flex;
}

/* --- Upgrade banner (auto-release) --- */
.armax-upgrade-banner {
  position: relative;
  z-index: 70;
  background: linear-gradient(90deg, var(--brand-subtle), var(--data-subtle));
  border-bottom: 1px solid var(--brand-border);
}
.armax-upgrade-banner-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0.6rem 1.25rem;
  flex-wrap: wrap;
}
.armax-upgrade-banner-icon {
  color: var(--brand);
  display: grid;
  place-items: center;
}
.armax-upgrade-banner-content {
  flex: 1 1 280px;
  min-width: 0;
}
.armax-upgrade-banner-text {
  font-size: 0.84rem;
  color: var(--text);
}
.armax-upgrade-banner-actions {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}
.armax-upgrade-banner-btn {
  height: 30px;
  padding: 0 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}
.armax-upgrade-banner-btn-primary {
  background: var(--brand);
  color: var(--brand-ink);
}
.armax-upgrade-banner-btn-secondary {
  border: 1px solid var(--border-strong);
  color: var(--text);
}
.armax-upgrade-banner-dismiss {
  color: var(--text-dim);
  font-size: 1.2rem;
  width: 28px;
  height: 28px;
}

/* --- Skeletons & empty states --- */
.skeleton,
.skeleton-line {
  display: inline-block;
  min-height: 0.9em;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--surface-2) 0%, var(--surface-hover) 50%, var(--surface-2) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
  vertical-align: middle;
}
.skeleton-line {
  width: 90px;
  height: 1em;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.empty-state {
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--text-dim);
}

/* --- Modal --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 5vh 1rem;
  overflow-y: auto;
  background: rgba(4, 6, 18, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.modal-overlay.show,
.modal-overlay.active,
.modal-overlay.open {
  display: flex;
}
.modal-content {
  position: relative;
  width: 100%;
  max-width: 880px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  padding: 1.25rem 1.4rem 1.5rem;
}
.modal-content.is-narrow {
  max-width: 480px;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.9rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.modal-title {
  font-size: 1.1rem;
  overflow-wrap: anywhere;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border-subtle);
}

/* Key/value detail lists (block, tx, address views) */
.kv-list {
  display: grid;
  grid-template-columns: minmax(140px, 220px) 1fr;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.kv-list > dt,
.kv-list > dd {
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.85rem;
}
.kv-list > dt {
  color: var(--text-dim);
  background: var(--bg-subtle);
  font-weight: 500;
}
.kv-list > dd {
  color: var(--text);
  overflow-wrap: anywhere;
  min-width: 0;
}

/* --- Code / terminal --- */
.code-block,
.terminal-block,
pre {
  position: relative;
  padding: 0.9rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #070914;
  color: #dfe3ff;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.65;
  overflow-x: auto;
  white-space: pre;
}
:root[data-theme="light"] .code-block,
:root[data-theme="light"] .terminal-block,
:root[data-theme="light"] pre {
  background: #121530;
  color: #e5e8ff;
}
pre code,
.code-block code,
.terminal-block code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}
.terminal-copy {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  height: 26px;
  padding: 0 0.55rem;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #b8bfe6;
  font-family: var(--font-sans);
  font-size: 0.72rem;
}
.terminal-copy:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

/* --- Toasts --- */
.toast-container {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 2500;
  display: grid;
  gap: 0.5rem;
  max-width: min(380px, calc(100vw - 2rem));
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  font-size: 0.84rem;
  color: var(--text);
  animation: toast-in 0.2s var(--ease);
}
.toast-icon {
  color: var(--success);
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* --- Dropdown --- */
.dropdown-menu {
  position: absolute;
  z-index: 80;
  min-width: 200px;
  display: none;
  padding: 0.35rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}
.dropdown-menu.show {
  display: block;
}
.dropdown-item {
  display: block;
  padding: 0.5rem 0.7rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--text-muted);
}
.dropdown-item:hover {
  color: var(--text);
  background: var(--surface-hover);
}

/* --- Steps (faucet / wallet flows) --- */
.step-nav-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.step-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.8rem 0.4rem 0.4rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
}
.step-nav-btn.active {
  border-color: var(--brand-border);
  color: var(--text);
  background: var(--brand-subtle);
}
.step-circle {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.active > .step-circle,
.step-circle.active {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--brand-ink);
}

/* --- Faucet & wallet layouts --- */
.faucet-grid-container,
.split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 1.25rem;
  align-items: start;
}
.wallet-address-panel {
  padding: 1.1rem 1.2rem;
  overflow-wrap: anywhere;
}
.version-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
}
.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.online { color: var(--success); }
.offline { color: var(--danger); }

/* --- API documentation --- */
.api-container {
  display: grid;
  gap: 1rem;
}
.api-header {
  margin-bottom: 0.5rem;
}
.api-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.14rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.endpoint-card {
  padding: 1rem 1.15rem;
  scroll-margin-top: calc(var(--navbar-height) + 1rem);
}
.endpoint-card:target {
  box-shadow: var(--glow-data);
}
.endpoint-title-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.4rem;
}
.endpoint-path {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}
.endpoint-desc {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.docs-nav-link {
  display: block;
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: var(--text-muted);
}
.docs-nav-link:hover,
.docs-nav-link.active {
  color: var(--text);
  background: var(--surface-hover);
}
.api-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}
.api-nav {
  position: sticky;
  top: calc(var(--navbar-height) + 1rem);
  display: grid;
  gap: 0.1rem;
  padding: 0.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.api-nav-group {
  padding: 0.6rem 0.6rem 0.25rem;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* --- Coming-soon (mainnet) hero --- */
.coming-soon {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 4rem 1rem 3rem;
}
.coming-soon-mark {
  width: 88px;
  height: 88px;
  margin-bottom: 1.25rem;
  filter: drop-shadow(0 10px 30px rgba(242, 193, 78, 0.25));
}
.coming-soon p {
  max-width: 58ch;
  margin: 0.75rem auto 1.5rem;
}
.gate-list {
  display: grid;
  gap: 0.5rem;
  max-width: 640px;
  margin: 1.5rem auto 0;
  text-align: left;
}
.gate-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 0.85rem;
}

/* --- Footer --- */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
}
.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 2fr);
  gap: 2.5rem;
  padding-block: 2.75rem 2rem;
}
.footer-brand-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
}
.footer-brand-row img:first-child {
  width: 26px;
  height: 26px;
}
.footer-wordmark {
  height: 14px;
  width: auto;
}
.footer-desc {
  font-size: 0.84rem;
  max-width: 44ch;
}
.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}
.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
}
.footer-col ul {
  display: grid;
  gap: 0.45rem;
}
.footer-col a {
  font-size: 0.86rem;
  color: var(--text-muted);
}
.footer-col a:hover {
  color: var(--brand);
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-block: 1rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.76rem;
  color: var(--text-dim);
}

/* --- Responsive --- */
@media (max-width: 1560px) {
  .global-search-form {
    max-width: 300px;
  }
  .web3-connect-pill,
  .network-switch-pill {
    display: none;
  }
}

@media (max-width: 1180px) {
  .nav-desktop {
    display: none;
  }
  .mobile-menu-btn {
    display: inline-grid;
  }
  .global-search-form {
    margin-left: auto;
  }
  .net-ribbon {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .net-ribbon-item:nth-child(3n) {
    border-right: none;
  }
  .net-ribbon-item:nth-child(-n + 3) {
    border-bottom: 1px solid var(--border-subtle);
  }
}

@media (max-width: 900px) {
  .faucet-grid-container,
  .split-grid,
  .api-layout {
    grid-template-columns: 1fr;
  }
  .api-nav {
    position: static;
  }
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
  .pool-pill:not(.web3-connect-pill),
  .network-switch-pill {
    display: none;
  }
}

@media (max-width: 720px) {
  :root {
    --navbar-height: 58px;
  }
  .global-search-form,
  .web3-connect-pill,
  .node-status-pill {
    display: none;
  }
  .navbar-actions {
    margin-left: auto;
  }
  .mobile-quick-nav {
    display: block;
  }
  .main-content {
    padding: 1.25rem 1rem 2.5rem;
  }
  .container {
    padding-inline: 1rem;
  }
  .explorer-controls-bar {
    position: static;
    margin-inline: 0;
    padding-inline: 0;
    background: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border-bottom: none;
  }
  .net-ribbon {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .net-ribbon-item {
    border-right: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
  }
  .net-ribbon-item:nth-child(2n) {
    border-right: none;
  }
  .net-ribbon-item:nth-last-child(-n + 2) {
    border-bottom: none;
  }
  .footer-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .kv-list {
    grid-template-columns: 1fr;
  }
  .kv-list > dt {
    border-bottom: none;
    padding-bottom: 0.2rem;
  }
  .modal-content {
    padding: 1rem;
  }
  .table-compact th,
  .table-compact td {
    padding-inline: 0.8rem;
  }
}

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

/* ==========================================================================
   Header fixes
   ========================================================================== */
/* layout.js injects the header into #site-chrome-top. As a normal box that host is
   exactly as tall as the header, so position: sticky had no room to stick. With
   display: contents the header's sticky container becomes <body>. */
#site-chrome-top,
#site-chrome-footer {
  display: contents;
}
