:root {
  color-scheme: dark;
  --bg: #07111f;
  --bg-soft: #0e1c2f;
  --panel: rgba(12, 27, 49, 0.82);
  --panel-strong: rgba(9, 21, 40, 0.94);
  --line: rgba(147, 197, 253, 0.18);
  --line-strong: rgba(125, 211, 252, 0.38);
  --text: #ecf5ff;
  --muted: rgba(236, 245, 255, 0.72);
  --accent: #7dd3fc;
  --accent-2: #f59e0b;
  --accent-3: #fb7185;
  --good: #86efac;
  --warn: #fbbf24;
  --bad: #f87171;
  --radius: 24px;
  --shadow: 0 24px 60px rgba(2, 10, 24, 0.38);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at 15% 20%, rgba(56, 189, 248, 0.18), transparent 28%),
    radial-gradient(circle at 88% 14%, rgba(99, 102, 241, 0.2), transparent 30%),
    linear-gradient(180deg, #050b14 0%, var(--bg) 48%, #040811 100%);
  color: var(--text);
  font-family: "SF Pro Display", "Inter", "PingFang SC", "Noto Sans SC", sans-serif;
}

body {
  padding: 28px 18px 56px;
}

.hero-shell,
.page-shell {
  width: min(1320px, 100%);
  margin: 0 auto;
}

.hero-shell {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  background: linear-gradient(160deg, rgba(8, 18, 35, 0.96), rgba(10, 28, 51, 0.88));
  box-shadow: var(--shadow);
}

.brand-link {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-copy h1,
.panel-head h2,
.info-card h3 {
  margin: 0;
}

.hero-copy h1 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.05;
}

.lead {
  margin: 14px 0 0;
  max-width: 820px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.75;
}

.hero-meta,
.status-grid,
.metric-grid,
.info-grid {
  display: grid;
  gap: 16px;
}

.hero-meta {
  margin-top: 26px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.hero-pill,
.status-card,
.metric-card,
.plot-panel,
.info-card,
.message-bar,
.control-bar {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero-pill,
.status-card,
.metric-card,
.info-card {
  padding: 18px 20px;
}

.hero-pill span,
.status-card span,
.metric-label,
.metric-note,
.panel-kicker,
.panel-copy,
.info-card p {
  color: var(--muted);
}

.hero-pill strong,
.status-card strong,
.metric-value {
  display: block;
  margin-top: 10px;
}

.page-shell {
  margin-top: 24px;
  display: grid;
  gap: 20px;
}

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

.status-card strong {
  font-size: 1rem;
}

.status-card-disclaimer strong {
  font-size: 0.92rem;
  line-height: 1.55;
  font-weight: 600;
}

.message-bar {
  padding: 16px 20px;
  font-size: 0.96rem;
  line-height: 1.5;
}

.message-bar.is-ok {
  border-color: rgba(134, 239, 172, 0.28);
  color: #d8ffe6;
}

.message-bar.is-warn {
  border-color: rgba(251, 191, 36, 0.32);
  color: #fff2c8;
}

.message-bar.is-bad {
  border-color: rgba(248, 113, 113, 0.3);
  color: #ffd7d7;
}

.metric-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.metric-card {
  min-height: 150px;
}

.metric-value {
  margin-top: 14px;
  font-size: clamp(1.35rem, 2vw, 1.9rem);
  line-height: 1.2;
}

.metric-card.is-bad .metric-value {
  color: var(--bad);
}

.metric-card.is-warn .metric-value {
  color: var(--warn);
}

.metric-card.is-ok .metric-value {
  color: var(--good);
}

.control-bar {
  padding: 14px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

.control-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.control-button {
  border: 1px solid rgba(125, 211, 252, 0.22);
  border-radius: 999px;
  background: rgba(14, 34, 59, 0.88);
  color: var(--text);
  padding: 10px 16px;
  font: inherit;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.control-button:hover,
.control-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(125, 211, 252, 0.5);
  outline: none;
}

.control-button.is-active {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.32), rgba(59, 130, 246, 0.24));
  border-color: rgba(125, 211, 252, 0.62);
}

.control-button-secondary {
  border-color: rgba(244, 114, 182, 0.24);
}

.plot-panel {
  padding: 18px 18px 10px;
}

.panel-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  align-items: flex-end;
  margin-bottom: 12px;
}

.panel-kicker {
  margin: 0 0 6px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.panel-copy {
  max-width: 520px;
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.65;
}

.plot-surface {
  width: 100%;
  height: 430px;
}

.info-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.info-card p {
  margin: 12px 0 0;
  line-height: 1.7;
}

@media (max-width: 720px) {
  body {
    padding: 18px 12px 34px;
  }

  .hero-shell {
    padding: 20px;
  }

  .plot-surface {
    height: 340px;
  }

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