:root {
  --bg: #030816;
  --bg-alt: #09152a;
  --bg-deep: #02040c;
  --panel: rgba(8, 18, 36, 0.78);
  --panel-border: rgba(118, 214, 255, 0.18);
  --text: #ecf7ff;
  --muted: #8ea8c7;
  --accent: #61f3d4;
  --accent-strong: #1fe0bf;
  --danger: #ff6b9d;
  --warning: #ffb347;
  --blue: #4da3ff;
  --violet: #8f9dff;
  --neon-cyan: #4cf5ff;
  --neon-pink: #ff4fb2;
  --neon-blue: #4d7dff;
  --grid-line: rgba(95, 212, 255, 0.11);
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.46);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 18%, rgba(76, 245, 255, 0.18), transparent 16%),
    radial-gradient(circle at 82% 12%, rgba(255, 79, 178, 0.16), transparent 18%),
    radial-gradient(circle at 52% 110%, rgba(77, 125, 255, 0.22), transparent 28%),
    linear-gradient(145deg, var(--bg-deep), var(--bg) 42%, #0a1830 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px),
    linear-gradient(135deg, rgba(76, 245, 255, 0.06), transparent 45%, rgba(255, 79, 178, 0.05) 100%);
  background-size: 52px 52px, 52px 52px, 100% 100%;
  transform: perspective(1400px) rotateX(74deg) translateY(24vh) scale(1.5);
  transform-origin: center top;
  opacity: 0.85;
  pointer-events: none;
  animation: grid-drift 18s linear infinite;
}

body::after {
  content: "";
  position: fixed;
  inset: -12%;
  background:
    conic-gradient(from 120deg at 50% 50%, rgba(76, 245, 255, 0.12), transparent 18%, rgba(255, 79, 178, 0.12), transparent 42%, rgba(77, 125, 255, 0.15), transparent 62%, rgba(76, 245, 255, 0.08));
  filter: blur(90px);
  opacity: 0.5;
  pointer-events: none;
  animation: pulse-halo 10s ease-in-out infinite alternate;
}

.shell {
  position: relative;
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 44px;
  perspective: 1600px;
  transform-style: preserve-3d;
}

.shell::before,
.shell::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(18px);
  opacity: 0.42;
}

.shell::before {
  top: 90px;
  right: -80px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(76, 245, 255, 0.28), transparent 68%);
}

.shell::after {
  left: -70px;
  top: 520px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(255, 79, 178, 0.22), transparent 70%);
}

.dashboard {
  display: grid;
  gap: 22px;
}

.panel {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(14, 31, 58, 0.82), rgba(6, 14, 28, 0.84)),
    var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  transform-style: preserve-3d;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.08), transparent 24%, transparent 72%, rgba(76, 245, 255, 0.06)),
    linear-gradient(180deg, rgba(76, 245, 255, 0.04), transparent 30%);
  pointer-events: none;
}

.panel::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(76, 245, 255, 0.8), rgba(255, 79, 178, 0.5), transparent);
}

.hero,
.metric-card,
.feature-card,
.stat-card,
.incident,
.recommendation,
.mitigation-card,
.timeline-item,
.signal-note {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 18px 34px rgba(0, 0, 0, 0.28);
}

@media (hover: hover) and (pointer: fine) {
  .panel:hover {
    transform: translateY(-6px) rotateX(3deg) rotateY(-3deg);
    border-color: rgba(97, 243, 212, 0.34);
    box-shadow:
      0 34px 90px rgba(0, 0, 0, 0.5),
      0 0 0 1px rgba(76, 245, 255, 0.08);
  }
}

.hero {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 24px;
  padding: 28px;
  margin-bottom: 22px;
  background:
    linear-gradient(135deg, rgba(10, 27, 49, 0.88), rgba(6, 13, 24, 0.82)),
    radial-gradient(circle at top right, rgba(76, 245, 255, 0.12), transparent 24%);
}

.eyebrow,
.section-kicker {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  letter-spacing: -0.03em;
}

h1 {
  max-width: 12ch;
  font-size: clamp(2.2rem, 5vw, 4.6rem);
  line-height: 0.96;
}

h2 {
  font-size: 1.42rem;
}

.hero-text {
  max-width: 60ch;
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.hero-actions {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(9, 24, 44, 0.92), rgba(5, 12, 22, 0.78)),
    radial-gradient(circle at top, rgba(76, 245, 255, 0.1), transparent 36%);
  border-radius: 22px;
  border: 1px solid rgba(118, 214, 255, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 16px 34px rgba(0, 0, 0, 0.22);
}

.field {
  display: grid;
  gap: 8px;
  font-size: 0.95rem;
  color: var(--muted);
}

select,
button {
  font: inherit;
}

select {
  width: 100%;
  padding: 13px 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(118, 214, 255, 0.16);
  border-radius: 14px;
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(76, 245, 255, 0.04);
}

select:focus-visible,
button:focus-visible {
  outline: 2px solid rgba(110, 231, 183, 0.8);
  outline-offset: 2px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  padding: 12px 16px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  transition: transform 160ms ease, filter 160ms ease, background 160ms ease;
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.btn-primary {
  color: #04131b;
  background: linear-gradient(120deg, var(--neon-cyan), #9dfcff 52%, #78ffd9 100%);
  box-shadow: 0 10px 28px rgba(76, 245, 255, 0.24);
}

.btn-secondary {
  color: var(--text);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(118, 214, 255, 0.18);
}

.status-chip,
.tag,
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(76, 245, 255, 0.12), rgba(255, 79, 178, 0.08));
  color: #a7faff;
  font-size: 0.88rem;
  border: 1px solid rgba(118, 214, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

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

.metric-card {
  padding: 20px;
}

.metric-card p {
  margin: 0;
}

.metric-label {
  color: var(--muted);
  font-size: 0.92rem;
}

.metric-value {
  margin-top: 12px;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.04em;
}

.metric-foot {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

.metric-card.is-danger .metric-value,
.severity-critical,
.severity-high {
  color: #ff88b5;
}

.metric-card.is-warning .metric-value,
.severity-medium {
  color: #ffc56b;
}

.metric-card.is-safe .metric-value,
.status-enabled {
  color: #83ffe4;
}

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

.chart-panel,
.panel {
  padding: 22px;
}

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

.chart {
  min-height: 280px;
  padding: 14px 0 4px;
}

.chart svg {
  width: 100%;
  height: 280px;
}

.chart .axis-label {
  fill: rgba(236, 244, 255, 0.6);
  font-size: 12px;
}

.stack-list {
  display: grid;
  gap: 14px;
}

.incident,
.recommendation,
.mitigation-card,
.timeline-item {
  padding: 16px;
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.028)),
    rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(118, 214, 255, 0.12);
}

.incident-header,
.mitigation-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.incident p,
.recommendation p,
.mitigation-card p,
.timeline-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.protocol-list,
.mitigation-grid {
  display: grid;
  gap: 14px;
}

.signal-matrix,
.signal-list {
  display: grid;
  gap: 14px;
}

.signal-note {
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(153, 171, 198, 0.12);
}

.signal-note p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.signal-item {
  display: grid;
  gap: 8px;
}

.signal-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.signal-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.meter {
  overflow: hidden;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

.meter-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(125, 211, 252, 0.8), rgba(77, 163, 255, 0.95));
}

.meter-fill.active {
  background: linear-gradient(90deg, rgba(255, 79, 178, 0.95), rgba(255, 179, 71, 0.95));
  box-shadow: 0 0 18px rgba(255, 79, 178, 0.28);
}

.protocol-row {
  display: grid;
  gap: 10px;
}

.protocol-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.95rem;
}

.protocol-bar {
  overflow: hidden;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

.protocol-fill {
  height: 100%;
  border-radius: inherit;
}

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

.feature-grid,
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.feature-card,
.stat-card {
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(153, 171, 198, 0.12);
}

.feature-value {
  margin: 10px 0 0;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.subsection {
  margin-top: 18px;
}

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

.decision-callout {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(153, 171, 198, 0.16);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
}

.decision-callout.is-danger {
  border-color: rgba(255, 79, 178, 0.28);
  background: linear-gradient(180deg, rgba(255, 79, 178, 0.12), rgba(255, 255, 255, 0.02));
}

.decision-callout.is-warning {
  border-color: rgba(255, 179, 71, 0.26);
  background: linear-gradient(180deg, rgba(255, 179, 71, 0.1), rgba(255, 255, 255, 0.02));
}

.decision-callout.is-safe {
  border-color: rgba(97, 243, 212, 0.25);
  background: linear-gradient(180deg, rgba(97, 243, 212, 0.08), rgba(255, 255, 255, 0.02));
}

.decision-callout p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.decision-label {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.decision-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.status-alert {
  background: rgba(251, 113, 133, 0.14);
  color: #ffb3c0;
}

.toggle {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(153, 171, 198, 0.18);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  cursor: pointer;
}

.toggle.active {
  color: #04131b;
  background: linear-gradient(120deg, #8cfaff, #98ffd8);
  border-color: transparent;
  box-shadow: 0 12px 28px rgba(76, 245, 255, 0.2);
}

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

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

th,
td {
  text-align: left;
  padding: 14px 12px;
  border-bottom: 1px solid rgba(153, 171, 198, 0.12);
}

th {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

td {
  font-size: 0.96rem;
}

.risk-badge,
.state-badge {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.84rem;
}

.risk-badge {
  background: rgba(251, 113, 133, 0.12);
  color: #ffb3c0;
}

.state-badge.state-blocked {
  background: rgba(110, 231, 183, 0.12);
  color: #b7f7da;
}

.state-badge.state-watchlist {
  background: rgba(245, 158, 11, 0.12);
  color: #ffd791;
}

.state-badge.state-monitor {
  background: rgba(77, 163, 255, 0.12);
  color: #abd6ff;
}

.timeline {
  display: grid;
  gap: 14px;
}

.timeline-item {
  position: relative;
  padding-left: 22px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 20px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(120deg, var(--neon-cyan), var(--neon-pink));
  box-shadow: 0 0 0 6px rgba(76, 245, 255, 0.08);
}

.timeline-time {
  margin-bottom: 6px;
  color: var(--accent);
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.reveal {
  animation: rise-in 480ms ease both;
}

.reveal:nth-child(2) {
  animation-delay: 90ms;
}

.reveal:nth-child(3) {
  animation-delay: 150ms;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes grid-drift {
  from {
    transform: perspective(1400px) rotateX(74deg) translateY(24vh) translateX(0) scale(1.5);
  }
  to {
    transform: perspective(1400px) rotateX(74deg) translateY(24vh) translateX(-24px) scale(1.5);
  }
}

@keyframes pulse-halo {
  from {
    transform: scale(0.96) rotate(0deg);
    opacity: 0.38;
  }
  to {
    transform: scale(1.04) rotate(18deg);
    opacity: 0.58;
  }
}

@media (max-width: 1080px) {
  .hero,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .feature-grid,
  .stat-grid,
  .mitigation-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .shell {
    width: min(100% - 18px, 100%);
    padding-top: 18px;
  }

  .hero,
  .panel {
    padding: 18px;
  }

  .feature-grid,
  .stat-grid,
  .mitigation-grid {
    grid-template-columns: 1fr;
  }

  .button-row {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  th,
  td {
    padding: 12px 8px;
  }
}
