:root {
  color-scheme: dark;
  --bg: #0a0f0b;
  --panel: #111c13;
  --panel-2: #17231b;
  --text: #edf6e9;
  --muted: #9caa99;
  --line: rgba(200, 220, 200, 0.14);
  --green: #4ade80;
  --amber: #fb923c;
  --red: #ef4444;
  --purple: #a855f7;
  --blue: #60a5fa;
  --shadow: rgba(0, 0, 0, 0.4);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 14% 20%, rgba(239, 68, 68, 0.08), transparent 28rem),
    radial-gradient(circle at 78% 6%, rgba(251, 146, 60, 0.07), transparent 26rem),
    radial-gradient(circle at 50% 80%, rgba(74, 222, 128, 0.06), transparent 30rem),
    linear-gradient(180deg, #0a0f0b 0%, #0d130e 52%, #0a0f0b 100%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(237, 246, 233, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(237, 246, 233, 0.025) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(180deg, black, transparent 78%);
}

a { color: inherit; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
  background: rgba(10, 15, 11, 0.84);
  backdrop-filter: blur(20px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 3px 12px 3px 12px;
  background: linear-gradient(135deg, var(--amber), var(--red));
  transform: rotate(-18deg);
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem 1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

nav a, footer a { text-underline-offset: 0.22em; }

main { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  min-height: calc(100vh - 74px);
  padding: clamp(4rem, 8vw, 7rem) 0;
}

.eyebrow {
  margin: 0 0 0.9rem;
  color: var(--amber);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  max-width: 13ch;
  margin-bottom: 1.25rem;
  font-size: clamp(3.5rem, 8vw, 7.2rem);
  line-height: 0.92;
}

h2 {
  margin-bottom: 1rem;
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 1;
}

h3 { margin-bottom: 0.65rem; font-size: 1.08rem; }

.lede, .section p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.lede { max-width: 62ch; margin-bottom: 1.75rem; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
  background: rgba(17, 28, 19, 0.7);
}

.button.primary {
  color: #0a0f0b;
  border-color: transparent;
  background: var(--amber);
}

.hero-panel { display: grid; gap: 1rem; }

.metric-card {
  padding: 1.1rem;
  border: 1px solid var(--line);
  background: rgba(17, 28, 19, 0.72);
  box-shadow: 0 24px 80px var(--shadow);
}

.metric-card.large {
  min-height: 220px;
  padding: 1.35rem;
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.25), rgba(239, 68, 68, 0.12)),
              linear-gradient(135deg, rgba(17, 28, 19, 0.9), var(--panel));
}

.metric-label, .metric-note { display: block; color: var(--muted); font-size: 0.85rem; }

.metric-card strong {
  display: block;
  margin: 0.5rem 0;
  font-size: clamp(2rem, 5vw, 4.6rem);
  line-height: 1;
}

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

.section { padding: clamp(4rem, 8vw, 7rem) 0; border-top: 1px solid var(--line); }

.two-column {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.section-head { max-width: 760px; margin-bottom: 2rem; }

.pipeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.pipeline article {
  min-height: 220px;
  padding: 1.2rem;
  background: var(--panel);
}

.pipeline span {
  display: inline-block;
  margin-bottom: 2.25rem;
  color: var(--amber);
  font-weight: 900;
}

.pipeline p { font-size: 0.94rem; }

.chart-card {
  padding: 1.2rem;
  border: 1px solid var(--line);
  background: var(--panel);
}

.chart-card canvas { width: 100% !important; max-height: 340px; }

.chart-card.full-width { grid-column: span 2; }

.chart-card h3 {
  margin-bottom: 1rem;
  font-size: 0.95rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.eda-insights {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.insight {
  padding: 0.9rem 1rem;
  border-left: 3px solid var(--amber);
  background: var(--panel);
  color: var(--muted);
  font-size: 0.94rem;
}

.insight-num {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--amber);
  font-size: 1.5rem;
  font-weight: 800;
}

.feature-categories {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.fcat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.fcat-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.fcat-p { background: var(--red); }
.fcat-d { background: var(--amber); }
.fcat-t { background: var(--green); }

.result-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
  margin-top: 1rem;
}

.result-table th {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--line);
  color: var(--amber);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  text-align: left;
}

.result-table td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}

.result-table tfoot td {
  border-bottom: 0;
  font-size: 0.92rem;
}

.result-table .good { color: var(--green); }
.result-table .mid { color: var(--amber); }
.result-table .warn { color: var(--red); }

.results-table-section { padding-top: 2rem; }

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .two-column { grid-template-columns: 1fr; }
  .pipeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chart-card.full-width { grid-column: auto; }
}

@media (max-width: 640px) {
  .topbar { position: static; align-items: flex-start; flex-direction: column; }
  nav { justify-content: flex-start; }
  .metric-grid, .pipeline { grid-template-columns: 1fr; }
  h1 { font-size: clamp(3rem, 18vw, 4.5rem); }
}
