:root {
  color-scheme: dark;
  --bg: #0b0f14;
  --panel: #111722;
  --panel-2: #0f151f;
  --border: #1e2633;
  --text: #eef2f6;
  --muted: #9aa7b2;
  --accent: #7cf03d;
  --accent-soft: rgba(124, 240, 61, 0.2);
  --accent-2: #58c7ff;
  --danger: #f56b6b;
  --radius-lg: 20px;
  --radius-md: 14px;
  --shadow: 0 24px 50px rgba(3, 8, 14, 0.55);
  --transition: 180ms ease;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", "Inter", system-ui, sans-serif;
  background: radial-gradient(circle at top, #162030 0%, #0b0f14 55%);
  color: var(--text);
}

.roi-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 24px 80px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.roi-header {
  display: grid;
  gap: 12px;
}

.eyebrow {
  margin: 0;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--muted);
}

.roi-header h1 {
  margin: 0;
  font-size: clamp(2.2rem, 3vw, 3.4rem);
}

.subhead {
  margin: 0;
  color: var(--muted);
  max-width: 560px;
}

.roi-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.panel-header h2 {
  margin: 0 0 6px;
  font-size: 1.4rem;
}

.panel-header p {
  margin: 0;
  color: var(--muted);
}

.controls {
  display: grid;
  gap: 20px;
}

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

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

.control-head label {
  font-weight: 600;
}

.control-head input {
  width: 130px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  font-family: inherit;
  text-align: right;
}

.control-head input:focus {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

.control input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.control-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--muted);
}

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

.metric {
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--panel-2);
  border: 1px solid transparent;
  display: grid;
  gap: 6px;
}

.metric span {
  color: var(--muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.metric strong {
  font-size: 1.6rem;
}

.metric.highlight {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-soft);
}

.chart-card {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
}

.chart {
  height: 220px;
  display: flex;
  align-items: stretch;
  gap: 24px;
}

.bar-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  gap: 10px;
}

.bar {
  width: 100%;
  max-width: 140px;
  border-radius: 16px 16px 8px 8px;
  transition: height 0.35s ease;
}

.bar-current {
  background: #2b3342;
}

.bar-projected {
  background: var(--accent);
  box-shadow: 0 0 20px rgba(124, 240, 61, 0.25);
}

.bar-group span {
  font-size: 0.85rem;
  color: var(--muted);
}

.cta {
  padding: 14px 20px;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: #0b0f14;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}

.cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(124, 240, 61, 0.2);
}

.report-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 15, 20, 0.7);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
  z-index: 50;
}

.report-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.report-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.98);
  width: min(720px, 92vw);
  max-height: 85vh;
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition);
  z-index: 60;
  padding: 28px;
}

.report-modal.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.report-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 16px;
}

.report-header h2 {
  margin: 6px 0 0;
  font-size: 1.6rem;
}

.report-close {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 1.4rem;
  cursor: pointer;
  transition: box-shadow var(--transition), border-color var(--transition), color var(--transition);
}

.report-close:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 12px rgba(124, 240, 61, 0.2);
}

.report-body {
  display: grid;
  gap: 20px;
}

.report-lede {
  margin: 0;
  color: var(--muted);
}

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

.report-metric {
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--panel-2);
  border: 1px solid transparent;
  display: grid;
  gap: 6px;
}

.report-metric span {
  color: var(--muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.report-metric strong {
  font-size: 1.4rem;
}

.report-metric.highlight {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-soft);
}

.report-highlights h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.report-highlights ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text);
  display: grid;
  gap: 8px;
}

.report-highlights li {
  color: var(--muted);
}

.report-highlights strong {
  color: var(--text);
}

.report-actions {
  display: flex;
  justify-content: flex-end;
}

body.report-open {
  overflow: hidden;
}

@media (max-width: 720px) {
  .control-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .control-head input {
    width: 100%;
  }

  .bar {
    max-width: none;
  }
}
