@import url("https://fonts.googleapis.com/css2?family=Cabin+Condensed:wght@500;600;700&display=swap");

:root {
  color-scheme: dark;
  --bg-primary: #0a0a0d;
  --bg-card: #131316;
  --bg-elevated: #1c1c20;
  --border-primary: #232328;
  --border-secondary: #2a2a30;
  --border-active: #3a3a42;
  --text-primary: #fafafa;
  --text-secondary: #a3a3a8;
  --text-tertiary: #52525b;
  --accent-primary: #0070f3;
  --accent-primary-hover: #0061d6;
  --accent-active: #62ffcc;
  --accent-warning: #f59e0b;
  --accent-danger: #ef4444;
  --font-display: "Cabin Condensed", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Courier New", monospace;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 9999px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 82% 10%, rgba(98, 255, 204, 0.07), transparent 28rem),
    radial-gradient(circle at 12% 30%, rgba(0, 112, 243, 0.08), transparent 24rem),
    var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  background: rgba(10, 10, 9, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

main,
.header-inner {
  width: min(1080px, calc(100% - 6rem));
  margin: 0 auto;
}

.header-inner {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--text-primary);
  transition: opacity 0.15s ease;
}

.brand:hover {
  opacity: 0.8;
}

.brand-logo {
  display: block;
  width: 61.6px;
  height: 28px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav a {
  color: var(--text-tertiary);
  font-size: 0.875rem;
  transition: color 0.15s ease;
}

.nav a:hover {
  color: var(--text-primary);
}

.hero {
  padding: 11rem 0 3rem;
}

.hero-kicker {
  margin: 0 0 1.1rem;
  color: var(--accent-active);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 1.35rem;
  color: var(--text-primary);
  font-size: 64px;
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: 0;
}

.subtitle {
  max-width: 56ch;
  margin: 0;
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.55;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

button,
a.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.025);
  color: var(--text-primary);
  padding: 0 1.05rem;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

button.primary,
a.button.primary {
  border-color: var(--accent-primary);
  background: var(--accent-primary);
  color: #fff;
}

button:hover,
a.button:hover {
  border-color: var(--border-active);
}

button.primary:hover,
a.button.primary:hover {
  background: var(--accent-primary-hover);
}

main {
  padding: 0 0 5.5rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

section {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border-primary);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.026), transparent 45%),
    var(--bg-card);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.18);
}

section.wide {
  grid-column: 1 / -1;
}

section.hero {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--border-primary);
  padding: 1.1rem 1.25rem;
}

h2 {
  margin: 0;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: 0;
}

.table-wrap {
  overflow-x: auto;
}

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

th,
td {
  border-bottom: 1px solid var(--border-primary);
  padding: 0.85rem 1.25rem;
  text-align: left;
  vertical-align: middle;
}

thead th {
  color: var(--text-tertiary);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

tbody th {
  width: 10rem;
  color: var(--text-secondary);
  font-size: 0.86rem;
  font-weight: 600;
}

tr:last-child td {
  border-bottom: 0;
}

tr:last-child th {
  border-bottom: 0;
}

code {
  overflow-wrap: anywhere;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 13px;
}

.address-link {
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 13px;
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 0.18em;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.address-link:hover {
  color: var(--accent-active);
  text-decoration-color: currentColor;
}

.url-link {
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 13px;
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 0.18em;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.url-link:hover {
  color: var(--accent-active);
  text-decoration-color: currentColor;
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(98, 255, 204, 0.08);
  border: 1px solid rgba(98, 255, 204, 0.2);
  color: var(--accent-active);
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.small {
  min-height: 30px;
  padding: 0 9px;
  font-size: 13px;
}

.notice {
  margin: 0 0 1rem;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: var(--radius-lg);
  background: rgba(245, 158, 11, 0.08);
  color: #fbbf24;
  padding: 0.9rem 1rem;
}

.status {
  color: var(--text-secondary);
  font-size: 13px;
}

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

::selection {
  background: rgba(0, 204, 136, 0.2);
  color: #fff;
}

@media (max-width: 860px) {
  main,
  .header-inner {
    width: min(100% - 2.5rem, 1080px);
  }

  .header-inner {
    min-height: 68px;
  }

  .nav {
    gap: 1rem;
  }

  .grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  main,
  .header-inner {
    width: min(100% - 2rem, 1080px);
  }

  .nav a:not(:last-child) {
    display: none;
  }

  .hero {
    padding-top: 8rem;
  }

  h1 {
    font-size: 44px;
  }

  .actions {
    align-items: stretch;
    flex-direction: column;
  }

  button,
  a.button {
    width: 100%;
  }

  thead th,
  tbody th,
  td {
    padding: 11px 12px;
  }

  tbody th {
    width: auto;
  }
}

/* Chain switcher — only rendered when config.json carries more than one L1. */
.chain-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
}

.chain-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.14));
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
}

.chain-tab:hover {
  border-color: rgba(255, 255, 255, 0.32);
}

.chain-tab[aria-selected="true"] {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.4);
  font-weight: 600;
}

.chain-tab .chain-tab-id {
  opacity: 0.6;
  font-variant-numeric: tabular-nums;
}
