/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ===== LAYOUT ===== */
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 56px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { height: 100%; display: flex; align-items: center; gap: 1.25rem; }
.header-back {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
  white-space: nowrap;
  transition: color 0.15s;
}
.header-back:hover { color: var(--text-muted); }
.header-divider { width: 1px; height: 18px; background: var(--border); flex-shrink: 0; }
.header-brand {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
}
.header-brand span { color: var(--text-dim); font-weight: 400; }
.header-badge {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: 3px;
  border: 1px solid;
  flex-shrink: 0;
}
.header-badge.live { color: var(--live); border-color: rgba(94,230,160,0.35); background: rgba(94,230,160,0.07); }
.header-badge.test { color: var(--text-dim); border-color: var(--border-strong); }
.net-tabs {
  display: flex;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 5px;
  overflow: hidden;
  flex-shrink: 0;
}
.net-tab {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  padding: 0.3rem 0.85rem;
  color: var(--text-dim);
  background: transparent;
  border-right: 1px solid var(--border);
  transition: color 0.12s, background 0.12s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.net-tab:last-child { border-right: none; }
.net-tab:hover { color: var(--text-muted); background: var(--bg-elev); }

/* active dot indicator */
.net-tab.active::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  background: currentColor;
}

/* mainnet = green */
.net-tab.active.net-tab--mainnet {
  color: var(--live);
  background: rgba(94, 230, 160, 0.08);
  font-weight: 600;
}
/* any non-mainnet (testnet, testnet_housefire, etc.) = orange */
.net-tab.active:not(.net-tab--mainnet) {
  color: var(--accent);
  background: rgba(255, 95, 31, 0.08);
  font-weight: 600;
}

.header-nav {
  display: flex;
  gap: 1.25rem;
  margin-left: auto;
  flex-wrap: nowrap;
  overflow: hidden;
}
.header-nav a {
  font-size: 13px;
  color: var(--text-muted);
  transition: color 0.15s;
  white-space: nowrap;
}
.header-nav a:hover { color: var(--text); }

/* ===== CHAIN HERO ===== */
.chain-hero { padding: 3rem 0 2.5rem; }
.chain-hero-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
}
.chain-hero-content { flex: 1; min-width: 0; }
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}
.eyebrow::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 2px;
  background: var(--accent);
  flex-shrink: 0;
}
.chain-title-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.chain-hero h1 {
  font-family: var(--mono);
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
}
.chain-badge {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  padding: 0.25rem 0.7rem;
  border-radius: 4px;
  border: 1px solid;
  flex-shrink: 0;
  align-self: center;
}
.chain-badge.live { color: var(--live); border-color: rgba(94,230,160,0.35); background: rgba(94,230,160,0.07); }
.chain-badge.test { color: var(--text-dim); border-color: var(--border-strong); background: var(--bg-elev); }
.chain-about {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 60ch;
  line-height: 1.65;
  margin-bottom: 1rem;
}
.chain-links { display: flex; gap: 1.25rem; flex-wrap: wrap; align-items: center; }
.chain-website {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  transition: opacity 0.15s;
}
.chain-website:hover { opacity: 0.75; }
.chain-github {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
  transition: color 0.15s;
}
.chain-github:hover { color: var(--text-muted); }
.chain-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 0.25rem;
}

/* ===== SECTION LABEL ===== */
.section-label {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ===== CHAIN SECTIONS ===== */
.chain-section { padding: 2.5rem 0; }

/* ===== ADDR LIST ===== */
.addr-list { display: flex; flex-direction: column; gap: 0.5rem; }

.addr-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.7rem 1rem;
  min-width: 0;
  transition: border-color 0.12s;
}
.addr-row:hover { border-color: var(--border-strong); }

.addr-label {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  min-width: 7rem;
  flex-shrink: 0;
}
.addr-value {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--text);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.addr-value.url { color: var(--text-muted); }
.addr-actions { display: flex; gap: 0.25rem; flex-shrink: 0; }

.copy-btn {
  background: none;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 0.2rem 0.55rem;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-dim);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  line-height: 1.4;
}
.copy-btn:hover { color: var(--text); border-color: var(--border-strong); }
.copy-btn.copied { color: var(--live); border-color: rgba(94,230,160,0.3); }

.link-btn {
  display: inline-flex;
  align-items: center;
  background: none;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 0.2rem 0.55rem;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-dim);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  line-height: 1.4;
}
.link-btn:hover { color: var(--accent); border-color: var(--border-strong); }

/* ===== IBC ACCOUNT EXTRAS ===== */
.addr-row.ibc-acc .seq-badge {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--live);
  background: rgba(94,230,160,0.07);
  border: 1px solid rgba(94,230,160,0.25);
  border-radius: 3px;
  padding: 0.15rem 0.5rem;
  flex-shrink: 0;
  display: none;
}
.addr-row.ibc-acc .seq-badge.visible { display: inline; }

/* ===== CHAIN INFO ROW ===== */
.chain-info-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-muted);
}
.chain-info-row span.ci-label { color: var(--text-dim); font-size: 11px; }
.chain-info-row kbd {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.2rem 0.6rem;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text);
}

/* ===== ADDITIONAL SECTION NOTE ===== */
.section-note {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
  margin-top: 1.5rem;
}

/* ===== TOOLS ===== */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.tool-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.1rem 1.25rem;
  transition: border-color 0.12s;
  display: block;
}
.tool-card:hover { border-color: var(--border-strong); }
.tool-name { font-weight: 600; font-size: 13px; margin-bottom: 0.3rem; }
.tool-link {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  margin-top: 0.5rem;
  display: block;
}

/* ===== IBC TABLE ===== */
.ibc-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
}
.ibc-table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 12px;
  min-width: 500px;
}
.ibc-table-wrap th {
  text-align: left;
  padding: 0.6rem 1rem;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border-strong);
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ibc-table-wrap td {
  padding: 0.55rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-dim);
}
.ibc-table-wrap tr:last-child td { border-bottom: none; }
.ibc-table-wrap td:first-child { color: var(--text-muted); }
.ibc-table-wrap code {
  background: var(--bg-elev-2);
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  font-size: 11px;
  color: var(--text);
}
.ibc-table-wrap tr:hover td { background: var(--bg-elev); }

/* ===== FOOTER ===== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.25rem 0;
  margin-top: 2rem;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-copy {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
}
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a {
  font-size: 12px;
  color: var(--text-dim);
  transition: color 0.12s;
}
.footer-links a:hover { color: var(--text-muted); }

/* ===== RESPONSIVE ===== */
@media (max-width: 700px) {
  .chain-hero-inner { flex-direction: column; }
  .chain-icon { width: 48px; height: 48px; font-size: 16px; }
  .header-nav { display: none; }
  .addr-label { width: 4.5rem; }
}
@media (max-width: 460px) {
  .chain-icon { display: none; }
  .footer-links { display: none; }
}
