:root {
  --bg: #07111f;
  --bg-elevated: rgba(15, 25, 41, 0.7);
  --panel: rgba(10, 19, 33, 0.78);
  --panel-strong: rgba(14, 24, 40, 0.94);
  --line: rgba(183, 209, 255, 0.14);
  --line-strong: rgba(183, 209, 255, 0.28);
  --text: #ecf2ff;
  --muted: #9fb3d1;
  --accent: #7de2d1;
  --accent-strong: #98f3cf;
  --warn: #f4c474;
  --danger: #ff8f8f;
  --good: #83e6b5;
  --shadow: 0 22px 60px rgba(2, 8, 18, 0.45);
  --display: "Baskerville", "Iowan Old Style", "Palatino Linotype", serif;
  --sans: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(42, 85, 137, 0.34), transparent 32rem),
    radial-gradient(circle at bottom right, rgba(34, 134, 120, 0.18), transparent 34rem),
    linear-gradient(180deg, #08111b 0%, #07101b 46%, #050b12 100%);
  color: var(--text);
  font-family: var(--sans);
  overflow-x: hidden;
}

.ambient {
  position: fixed;
  inset: auto;
  border-radius: 999px;
  filter: blur(80px);
  pointer-events: none;
  opacity: 0.6;
}

.ambient-a {
  top: -8rem;
  left: -4rem;
  width: 20rem;
  height: 20rem;
  background: rgba(78, 135, 210, 0.22);
}

.ambient-b {
  right: -8rem;
  bottom: -8rem;
  width: 24rem;
  height: 24rem;
  background: rgba(74, 189, 160, 0.16);
}

.shell {
  position: relative;
  width: min(1400px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 32px 0 72px;
}

.masthead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: end;
  margin-bottom: 28px;
  animation: rise-in 700ms ease-out both;
}

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

h1,
h2,
h3,
.score-value {
  font-family: var(--display);
  font-weight: 500;
}

h1 {
  margin: 0;
  font-size: clamp(2.8rem, 7vw, 5.2rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
}

.subcopy {
  max-width: 42rem;
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.status-panel,
.panel,
.hero-card,
.metric-card {
  background: linear-gradient(180deg, rgba(18, 30, 48, 0.92), rgba(9, 17, 29, 0.92));
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.status-panel {
  padding: 20px 22px;
}

.status-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.status-line:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.status-line strong {
  color: var(--text);
  text-align: right;
}

.launch-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin-top: 18px;
  padding: 14px 18px;
  border-radius: 16px;
  color: #04111a;
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: transform 180ms ease, box-shadow 180ms ease;
  box-shadow: 0 14px 30px rgba(125, 226, 209, 0.2);
}

.launch-link:hover,
.launch-link:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(125, 226, 209, 0.28);
  outline: none;
}

.hero-grid,
.grid-two,
.integration-grid {
  display: grid;
  gap: 20px;
}

.hero-grid {
  grid-template-columns: 1.25fr 0.95fr;
  margin-bottom: 20px;
}

.hero-card,
.panel {
  padding: 24px;
  animation: rise-in 820ms ease-out both;
}

.hero-lead {
  position: relative;
  overflow: hidden;
}

.hero-lead::after {
  content: "";
  position: absolute;
  inset: auto -5rem -5rem auto;
  width: 15rem;
  height: 15rem;
  background: radial-gradient(circle, rgba(125, 226, 209, 0.24), transparent 72%);
}

.hero-topline,
.section-header,
.score-meta,
.agent-top,
.alert-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, color 180ms ease;
}

.chip:hover,
.chip:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(125, 226, 209, 0.65);
  color: var(--text);
  outline: none;
}

.chip.active {
  background: rgba(125, 226, 209, 0.12);
  border-color: rgba(125, 226, 209, 0.78);
  color: var(--text);
}

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

.score-wrap {
  margin-top: 22px;
}

.score-stack {
  display: flex;
  gap: 22px;
  align-items: end;
}

.score-value {
  font-size: clamp(4rem, 9vw, 7rem);
  line-height: 0.9;
}

.score-band {
  margin: 0;
  font-size: 1.35rem;
}

.score-summary {
  margin: 8px 0 0;
  max-width: 26rem;
  color: var(--muted);
  line-height: 1.6;
}

.score-meta {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.hero-stats div {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.02);
}

.hero-stats span {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
}

.hero-stats strong {
  display: block;
  margin-top: 6px;
  font-size: 1.6rem;
}

.chart-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.section-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.load-bars {
  display: grid;
  grid-template-columns: repeat(24, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
  min-height: 240px;
  margin-top: 24px;
}

.load-bar {
  position: relative;
  min-height: 16px;
  border-radius: 999px 999px 10px 10px;
  background: linear-gradient(180deg, rgba(152, 243, 207, 0.95), rgba(67, 173, 153, 0.3));
  transform-origin: bottom;
  animation: grow-bar 600ms ease-out both;
}

.load-bar::after {
  content: attr(data-hour);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -24px;
  font-size: 0.7rem;
  color: rgba(159, 179, 209, 0.7);
}

.axis-row {
  display: flex;
  justify-content: space-between;
  color: rgba(159, 179, 209, 0.7);
  margin-top: 30px;
  font-size: 0.82rem;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.metric-card {
  padding: 18px 20px;
  animation: rise-in 900ms ease-out both;
}

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

.metric-value {
  margin-top: 8px;
  font-size: 2rem;
  line-height: 1;
}

.metric-trend {
  margin-top: 12px;
  color: var(--accent-strong);
  font-size: 0.88rem;
}

.grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 20px;
}

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

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

.timeline-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(125, 226, 209, 0.12);
}

.timeline-item::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 18px;
  bottom: -20px;
  width: 1px;
  background: var(--line);
}

.timeline-item:last-child::after {
  display: none;
}

.timeline-time {
  color: var(--accent);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.timeline-title {
  margin-top: 4px;
  font-size: 1.05rem;
}

.timeline-detail {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.6;
}

.memory-health {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 24px;
  align-items: center;
  margin-bottom: 22px;
}

.memory-ring-wrap {
  display: grid;
  place-items: center;
}

.memory-ring {
  --coverage: 0.5turn;
  width: 160px;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(closest-side, rgba(11, 18, 31, 1) 75%, transparent 76% 100%),
    conic-gradient(var(--accent) 0 var(--coverage), rgba(125, 226, 209, 0.12) var(--coverage) 1turn);
  display: grid;
  place-items: center;
}

.memory-ring-inner {
  text-align: center;
}

.memory-ring-inner span {
  display: block;
  font-size: 2rem;
}

.memory-ring-inner small {
  color: var(--muted);
}

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

.memory-metric {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
}

.memory-metric span {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
}

.memory-metric strong {
  display: block;
  margin-top: 6px;
  font-size: 1.32rem;
}

.subsection-title {
  margin: 0 0 12px;
  font-size: 1rem;
  color: var(--muted);
  font-family: var(--sans);
}

.entity-list,
.agent-list,
.alert-list,
.recommendation-list {
  display: grid;
  gap: 12px;
}

.entity-item,
.agent-item,
.alert-item,
.recommendation-item {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
}

.entity-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.entity-main strong {
  display: block;
  margin-bottom: 4px;
}

.entity-main span,
.entity-score,
.agent-copy,
.alert-copy,
.recommendation-item {
  color: var(--muted);
}

.entity-score {
  white-space: nowrap;
}

.agent-top strong,
.alert-top strong {
  font-size: 1rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  font-size: 0.8rem;
}

.badge.good {
  color: var(--good);
}

.badge.warn {
  color: var(--warn);
}

.badge.danger {
  color: var(--danger);
}

.agent-copy,
.alert-copy {
  margin-top: 8px;
  line-height: 1.6;
}

.load-track {
  margin-top: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.load-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(125, 226, 209, 0.4), rgba(125, 226, 209, 0.95));
}

.divider {
  height: 1px;
  margin: 20px 0;
  background: var(--line);
}

.recommendation-item {
  line-height: 1.7;
}

.integration-panel {
  margin-top: 4px;
}

.integration-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 22px;
}

.integration-grid > div {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.02);
}

.integration-grid h3 {
  margin: 0 0 8px;
  font-size: 1.25rem;
}

.integration-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes grow-bar {
  from {
    transform: scaleY(0.1);
    opacity: 0.25;
  }

  to {
    transform: scaleY(1);
    opacity: 1;
  }
}

@media (max-width: 1100px) {
  .masthead,
  .hero-grid,
  .grid-two,
  .integration-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 760px) {
  .shell {
    width: min(calc(100vw - 20px), 100%);
    padding-top: 20px;
  }

  .hero-stats,
  .memory-health,
  .memory-metrics,
  .metric-strip {
    grid-template-columns: 1fr;
  }

  .hero-card,
  .panel,
  .metric-card,
  .status-panel {
    padding: 18px;
    border-radius: 20px;
  }

  .score-stack {
    align-items: start;
    flex-direction: column;
    gap: 10px;
  }

  .load-bars {
    gap: 5px;
    min-height: 180px;
  }

  .chip-row {
    margin-top: 8px;
  }

  .hero-topline,
  .section-header,
  .score-meta,
  .agent-top,
  .alert-top {
    flex-direction: column;
  }
}
