:root {
  color-scheme: dark;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: radial-gradient(circle at top, rgba(41, 66, 240, 0.18), rgba(4, 6, 18, 1));
  color: #f5f8ff;
}

body {
  margin: 0;
}

.layout {
  max-width: 1240px;
  margin: 0 auto;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

header {
  background: linear-gradient(135deg, rgba(62, 94, 255, 0.45), rgba(98, 228, 255, 0.18));
  padding: 2.5rem;
  border-radius: 20px;
  box-shadow: 0 24px 48px rgba(12, 18, 50, 0.45);
}

header h1 {
  margin: 0 0 1.25rem;
  font-size: 2.7rem;
}

header p {
  margin: 0;
  line-height: 1.7;
}

.metrics {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.metric-card {
  padding: 1rem 1.2rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(8px);
  box-shadow: inset 0 0 12px rgba(88, 208, 255, 0.08);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.owner-controls {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.8rem;
}

.owner-controls span {
  padding: 0.8rem 1.05rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 0 12px rgba(88, 208, 255, 0.08);
}

.panels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.6rem;
}

.panels article {
  background: rgba(10, 14, 30, 0.86);
  border-radius: 18px;
  padding: 1.6rem;
  border: 1px solid rgba(90, 210, 255, 0.16);
  box-shadow: 0 16px 36px rgba(4, 8, 16, 0.55);
}

.panels article.full-span {
  grid-column: 1 / -1;
}

.panels h2 {
  margin-top: 0;
  font-size: 1.4rem;
}

.mermaid-section {
  background: rgba(8, 10, 22, 0.92);
  border-radius: 18px;
  padding: 1.6rem;
  border: 1px solid rgba(74, 128, 255, 0.22);
  box-shadow: 0 12px 30px rgba(5, 9, 20, 0.5);
}

footer {
  font-size: 0.95rem;
  background: rgba(6, 8, 18, 0.92);
  padding: 1.6rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

#alpha-domains table,
#guardian-mesh table,
#treasury-streams table {
  border-collapse: collapse;
  width: 100%;
}

#alpha-domains th,
#alpha-domains td,
#guardian-mesh th,
#guardian-mesh td,
#treasury-streams th,
#treasury-streams td {
  padding: 0.45rem 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

#opportunity-graph ul,
#mission-threads ul,
#autopilot ul,
#simulations ul,
#ci-matrix ul,
#sovereignty-surface ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  background: rgba(88, 208, 255, 0.16);
  border: 1px solid rgba(88, 208, 255, 0.4);
  font-size: 0.85rem;
}

.status-green {
  color: #6bffb5;
}

.status-armed {
  color: #ffd76b;
}

.metric {
  font-weight: 600;
}

@media (max-width: 768px) {
  .layout {
    padding: 1.5rem;
  }

  header {
    padding: 1.8rem;
  }
}
