:root {
  --bg: #0b1220;
  --panel: #111827;
  --panel-2: #0f172a;
  --border: #1e293b;
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #00d4ff;
  --cyan-2: #0099ff;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  --sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--sans);
  color: var(--text);
  background:
    radial-gradient(circle at 10% 0%, rgba(0, 212, 255, 0.14), transparent 34rem),
    radial-gradient(circle at 90% 12%, rgba(34, 197, 94, 0.09), transparent 30rem),
    var(--bg);
}

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

button,
input,
select {
  font: inherit;
}

.portal-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.portal-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(30, 41, 59, 0.85);
  background: rgba(11, 18, 32, 0.84);
  backdrop-filter: blur(18px);
}

.portal-nav {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 16px 28px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 22px;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #04111d;
  font-weight: 900;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--cyan), var(--cyan-2));
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.24);
}

.brand-title {
  font-weight: 800;
  letter-spacing: -0.04em;
  font-size: 18px;
}

.brand-subtitle,
.eyebrow,
.label,
.meta {
  color: var(--muted);
}

.brand-subtitle,
.eyebrow,
.label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
  font-weight: 700;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-links a,
.footer-links a,
.mobile-nav a {
  color: var(--muted);
}

.nav-links a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  padding: 9px 11px;
  font-weight: 700;
  font-size: 14px;
}

.nav-links a:hover,
.nav-links a.active,
.mobile-nav a.active {
  color: var(--text);
  background: rgba(0, 212, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(0, 212, 255, 0.25);
}

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

.search-box {
  width: min(300px, 28vw);
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.9);
  color: var(--text);
  padding: 0 12px;
}

.page {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 34px 28px 96px;
  display: grid;
  gap: 20px;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  border-bottom: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(11, 18, 32, 0), var(--bg)),
    radial-gradient(circle at 72% 28%, rgba(0, 212, 255, 0.16), transparent 22rem);
}

.hero-inner {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 86px 28px 34px;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  gap: 30px;
  align-items: center;
}

.hero h1,
.page-title h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 92px);
  line-height: 0.95;
  letter-spacing: -0.07em;
}

.page-title h1 {
  font-size: clamp(34px, 5vw, 62px);
}

.lead {
  color: #cbd5e1;
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.6;
  max-width: 760px;
}

.hero-copy {
  display: grid;
  gap: 22px;
}

.cta-row,
.filter-row,
.link-row,
.trust-grid,
.chip-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.btn,
.chip,
.status-pill,
.filter-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--border);
  padding: 9px 13px;
  background: rgba(17, 24, 39, 0.82);
  color: var(--text);
  font-weight: 800;
}

.btn.primary {
  border: 0;
  color: #03121f;
  background: linear-gradient(135deg, var(--cyan), var(--cyan-2));
}

.btn:hover,
.filter-button:hover {
  transform: translateY(-1px);
}

.hero-visual,
.network-map {
  min-height: 420px;
  border: 1px solid rgba(0, 212, 255, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(148, 163, 184, 0.06) 1px, transparent 1px),
    linear-gradient(0deg, rgba(148, 163, 184, 0.06) 1px, transparent 1px),
    radial-gradient(circle at 42% 42%, rgba(0, 212, 255, 0.22), transparent 13rem),
    rgba(15, 23, 42, 0.72);
  background-size: 42px 42px, 42px 42px, auto, auto;
  position: relative;
  overflow: hidden;
}

.hero-visual::before,
.network-map::before,
.hero-visual::after,
.network-map::after {
  content: "";
  position: absolute;
  inset: 18%;
  border: 1px solid rgba(0, 212, 255, 0.18);
  border-radius: 50%;
}

.hero-visual::after,
.network-map::after {
  inset: 30%;
  animation: pulseRing 3.2s ease-in-out infinite;
}

.node-dot {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 18px rgba(34, 197, 94, 0.8);
}

.node-dot.cyan {
  background: var(--cyan);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.8);
}

.node-line {
  position: absolute;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.8), transparent);
  transform-origin: left center;
  animation: scanLine 3.6s linear infinite;
}

@keyframes pulseRing {
  0%, 100% { opacity: 0.38; transform: scale(0.96); }
  50% { opacity: 0.86; transform: scale(1.04); }
}

@keyframes scanLine {
  0% { opacity: 0.12; }
  50% { opacity: 0.9; }
  100% { opacity: 0.12; }
}

.page-title {
  padding: 34px 0 12px;
  display: grid;
  gap: 12px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.grid.two {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.45fr);
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card,
.table-card,
.section {
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(17, 24, 39, 0.88);
  box-shadow: var(--shadow);
  padding: 20px;
}

.card {
  display: grid;
  gap: 10px;
}

.value {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.value.good {
  color: var(--success);
}

.value.warn {
  color: var(--warning);
}

.value.bad {
  color: var(--danger);
}

.mono,
code,
pre {
  font-family: var(--mono);
}

.muted {
  color: var(--muted);
}

.status-pill.good,
.health.good {
  color: #052e18;
  border-color: rgba(34, 197, 94, 0.44);
  background: var(--success);
}

.status-pill.warn,
.health.warn {
  color: #2a1700;
  border-color: rgba(245, 158, 11, 0.44);
  background: var(--warning);
}

.status-pill.bad,
.health.bad {
  color: #fff;
  border-color: rgba(239, 68, 68, 0.44);
  background: var(--danger);
}

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

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
}

.list {
  display: grid;
  gap: 10px;
}

.list-item,
.health-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.86);
  padding: 12px;
}

.health-row {
  grid-template-columns: minmax(180px, 1fr) repeat(4, auto);
}

.badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border-radius: 7px;
  padding: 6px 10px;
  color: var(--cyan);
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.22);
  font-weight: 800;
  font-size: 12px;
}

.code-block {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  background: #030712;
  color: #dbeafe;
}

.footer {
  border-top: 1px solid var(--border);
  background: rgba(11, 18, 32, 0.9);
}

.footer-inner {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 28px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.mobile-nav {
  display: none;
}

.sparkline {
  height: 90px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background:
    linear-gradient(135deg, transparent 48%, rgba(0, 212, 255, 0.45) 50%, transparent 52%),
    linear-gradient(45deg, transparent 58%, rgba(34, 197, 94, 0.36) 60%, transparent 62%),
    rgba(15, 23, 42, 0.8);
}

@media (max-width: 980px) {
  .portal-nav {
    grid-template-columns: 1fr;
  }

  .nav-actions {
    display: none;
  }

  .hero-inner,
  .grid.two,
  .grid.three {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-visual,
  .network-map {
    min-height: 300px;
  }
}

@media (max-width: 720px) {
  .portal-nav {
    padding: 14px 16px;
  }

  .nav-links {
    display: none;
  }

  .page,
  .hero-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .mobile-nav {
    position: fixed;
    z-index: 30;
    left: 0;
    right: 0;
    bottom: 0;
    min-height: 64px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    border-top: 1px solid var(--border);
    background: rgba(11, 18, 32, 0.96);
    backdrop-filter: blur(18px);
  }

  .mobile-nav a {
    display: grid;
    place-items: center;
    padding: 8px 4px;
    font-size: 12px;
    font-weight: 800;
  }

  .value {
    font-size: 24px;
  }

  .health-row,
  .list-item {
    grid-template-columns: 1fr;
  }
}
