:root {
  --rh-green: #00c805;
  --rh-green-bright: #00e676;
  --bg: #0a0d0b;
  --bg-soft: #111614;
  --card: #141a17;
  --card-2: #1a211d;
  --border: #232c27;
  --border-strong: #2f3b34;
  --text: #eef2ef;
  --muted: #8b9890;
  --danger: #ff5252;
  --radius: 14px;
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(600px 320px at 15% -5%, rgba(0, 200, 5, 0.12), transparent 70%),
    radial-gradient(700px 380px at 90% 10%, rgba(0, 230, 118, 0.08), transparent 70%);
}

.container {
  width: min(1080px, 92vw);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(10, 13, 11, 0.78);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--rh-green);
  color: #04140a;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 18px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Buttons */
.btn {
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  border-radius: 10px;
  padding: 10px 16px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.06s ease, background 0.15s ease, border-color 0.15s ease, opacity 0.15s;
  color: var(--text);
  white-space: nowrap;
}

.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--rh-green);
  color: #04140a;
}
.btn-primary:hover:not(:disabled) { background: var(--rh-green-bright); }

.btn-secondary {
  background: var(--card-2);
  border-color: var(--border-strong);
}
.btn-secondary:hover:not(:disabled) { border-color: var(--rh-green); }

.btn-ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--muted);
}
.btn-ghost:hover:not(:disabled) { color: var(--text); border-color: var(--muted); }

.btn-lg { padding: 13px 22px; font-size: 15px; border-radius: 12px; }

/* Network pill */
.network-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: default;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #555;
  flex-shrink: 0;
}
.dot-idle { background: #5b6b62; }
.dot-ok { background: var(--rh-green); box-shadow: 0 0 0 3px rgba(0, 200, 5, 0.2); }
.dot-warn { background: #ffb300; box-shadow: 0 0 0 3px rgba(255, 179, 0, 0.15); }

/* Hero */
.hero { padding: 64px 0 36px; text-align: center; }

.badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--rh-green);
  border: 1px solid rgba(0, 200, 5, 0.35);
  background: rgba(0, 200, 5, 0.08);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  max-width: 16ch;
  margin: 0 auto 16px;
}

.accent { color: var(--rh-green); }

.lede {
  color: var(--muted);
  max-width: 58ch;
  margin: 0 auto 28px;
  font-size: 17px;
}

.hero-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin: 20px 0 34px;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.stat-value { font-size: 22px; font-weight: 700; }
.stat-sub { font-size: 12px; color: var(--muted); }

/* Panels */
.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  margin-bottom: 22px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.panel-head h2 { font-size: 18px; font-weight: 700; }

.panel-tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px;
}
.panel-tag.ok { color: var(--rh-green); border-color: rgba(0, 200, 5, 0.4); }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); font-size: 13px; }
.hidden { display: none !important; }

/* Provider grid */
.provider-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  margin: 16px 0 20px;
}

.provider-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, transform 0.06s;
}
.provider-btn:hover { border-color: var(--rh-green); }
.provider-btn:active { transform: translateY(1px); }

.provider-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 15px;
  flex-shrink: 0;
  background: var(--bg-soft);
}

.connect-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* Account card */
.account-card {
  background: var(--card-2);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 18px;
}

.account-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.address-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.address { font-size: 15px; font-weight: 600; word-break: break-all; }

.icon-btn {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 8px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  cursor: pointer;
  text-decoration: none;
  font-size: 13px;
  flex-shrink: 0;
  transition: color 0.15s, border-color 0.15s;
}
.icon-btn:hover { color: var(--rh-green); border-color: var(--rh-green); }

.account-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.account-item { display: flex; flex-direction: column; gap: 3px; }
.account-item .value { font-weight: 600; font-size: 15px; }

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Sign box */
.sign-box {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-soft);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.input {
  font: inherit;
  font-family: var(--mono);
  font-size: 13px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  color: var(--text);
  border-radius: 10px;
  padding: 11px 13px;
  width: 100%;
}
.input:focus { outline: none; border-color: var(--rh-green); }

.sign-actions { display: flex; gap: 10px; }

.result {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  font-size: 12px;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 200px;
  overflow: auto;
  color: var(--rh-green-bright);
}

/* Config list */
.tabs {
  display: flex;
  gap: 6px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px;
}

.tab {
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  border: none;
  border-radius: 8px;
  padding: 7px 14px;
  cursor: pointer;
}
.tab.active { background: var(--card-2); color: var(--text); }

.config-list { display: flex; flex-direction: column; }

.config-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 12px;
  align-items: center;
  padding: 13px 0;
  border-top: 1px solid var(--border);
}
.config-row:first-child { border-top: none; }

.config-row dt { color: var(--muted); font-size: 13px; font-weight: 500; }

.config-row dd {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  min-width: 0;
}

.config-row dd span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-btn {
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 10px;
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.15s, border-color 0.15s;
}
.copy-btn:hover { color: var(--rh-green); border-color: var(--rh-green); }

/* FAQ */
.faq details {
  border-top: 1px solid var(--border);
  padding: 14px 0;
}
.faq details:first-of-type { border-top: none; }

.faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-size: 18px; }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--muted); margin-top: 10px; font-size: 15px; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 40px;
  padding: 22px 0 34px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(4, 8, 6, 0.72);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-card {
  width: min(420px, 100%);
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.modal-head h3 { font-size: 17px; }

.modal-providers {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.modal-note { text-align: center; }

/* Toast */
.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  background: var(--card-2);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  padding: 12px 20px;
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
  max-width: 90vw;
  text-align: center;
  animation: toast-in 0.18s ease;
}
.toast.err { border-color: rgba(255, 82, 82, 0.5); color: #ffb4b4; }
.toast.ok { border-color: rgba(0, 200, 5, 0.5); }

@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@media (max-width: 640px) {
  .hero { padding: 40px 0 24px; }
  .panel { padding: 18px; }
  .config-row { grid-template-columns: 1fr; gap: 6px; }
  .header-actions .network-pill { display: none; }
  #header-connect { padding: 9px 12px; font-size: 13px; }
}
