:root {
  --bg: #070b18;
  --bg-2: #0b1226;
  --panel: rgba(19, 27, 51, 0.72);
  --panel-solid: #121a33;
  --border: rgba(125, 211, 252, 0.14);
  --border-strong: rgba(125, 211, 252, 0.32);
  --text: #e8eefc;
  --muted: #93a1c4;
  --accent: #7dd3fc;
  --accent-2: #6366f1;

  --low: #22c55e;
  --low-bg: rgba(34, 197, 94, 0.12);
  --medium: #f59e0b;
  --medium-bg: rgba(245, 158, 11, 0.12);
  --high: #ef4444;
  --high-bg: rgba(239, 68, 68, 0.12);

  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(1200px 600px at 12% -8%, rgba(99, 102, 241, 0.18), transparent 60%),
    radial-gradient(1000px 560px at 92% 4%, rgba(125, 211, 252, 0.12), transparent 55%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.scanline {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(255,255,255,0.015) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
  z-index: 1;
}

/* ── Hero ─────────────────────────────────────────────── */
.hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: 44px 24px 8px;
  position: relative;
  z-index: 2;
}
.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 16px; }
.eye { filter: drop-shadow(0 6px 18px rgba(125, 211, 252, 0.35)); }
.brand-text h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 40px;
  letter-spacing: 6px;
  margin: 0;
  background: linear-gradient(90deg, #e0f2fe, #7dd3fc 55%, #a5b4fc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand-text p { margin: 2px 0 0; color: var(--muted); font-size: 13px; letter-spacing: 1px; }
.brand-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag {
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  letter-spacing: 0.4px;
}
.tag-ghost { color: var(--accent); background: rgba(125, 211, 252, 0.08); border: 1px solid var(--border-strong); }
.hero-sub {
  max-width: 860px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}
.hero-sub strong { color: var(--text); }

/* ── Layout ───────────────────────────────────────────── */
.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px 24px 40px;
  position: relative;
  z-index: 2;
}
.loading { color: var(--muted); padding: 60px 0; text-align: center; }

.summary-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 20px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
}
.company { display: flex; flex-direction: column; gap: 4px; margin-right: auto; }
.company h2 { margin: 0; font-size: 22px; font-family: 'Space Grotesk', sans-serif; }
.company .meta { color: var(--muted); font-size: 13px; }
.chip {
  font-size: 12px; font-weight: 600; padding: 5px 11px; border-radius: 8px;
  background: rgba(99, 102, 241, 0.15); color: #c7d2fe; border: 1px solid rgba(99,102,241,0.35);
  text-transform: capitalize;
}
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; padding: 6px 11px; border-radius: 999px;
  background: var(--low-bg); color: var(--low); border: 1px solid rgba(34,197,94,0.4);
}
.badge::before { content: "✓"; }

/* ── Hero grid: gauge + recommendation ────────────────── */
.top-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
  margin-top: 20px;
}
@media (max-width: 820px) { .top-grid { grid-template-columns: 1fr; } }

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px;
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
}
.card h3 {
  margin: 0 0 4px; font-size: 12px; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--muted); font-weight: 700;
}

.gauge-card { display: flex; flex-direction: column; align-items: center; text-align: center; }
.gauge { position: relative; width: 220px; height: 220px; }
.gauge svg { transform: rotate(-90deg); }
.gauge .center {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.gauge .risk-word { font-family: 'Space Grotesk', sans-serif; font-size: 30px; font-weight: 700; letter-spacing: 1px; }
.gauge .risk-label { font-size: 11px; color: var(--muted); letter-spacing: 2px; text-transform: uppercase; margin-top: 2px; }

.rec {
  display: flex; flex-direction: column; gap: 14px; justify-content: center;
}
.rec .rec-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rec .rec-pill {
  font-family: 'Space Grotesk', sans-serif; font-size: 20px; font-weight: 700;
  padding: 10px 18px; border-radius: 12px; letter-spacing: 0.5px;
}
.rec .rationale { color: var(--muted); font-size: 14.5px; line-height: 1.6; }
.rec .conditions {
  font-size: 14px; line-height: 1.6; color: var(--text);
  background: rgba(245, 158, 11, 0.08); border: 1px solid rgba(245,158,11,0.25);
  border-radius: 12px; padding: 14px 16px;
}
.rec .conditions b { color: var(--medium); }

/* ── Dimension cards ──────────────────────────────────── */
.section-title {
  margin: 34px 4px 14px; font-size: 13px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--muted); font-weight: 700; display: flex; align-items: center; gap: 10px;
}
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.dims { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 980px) { .dims { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .dims { grid-template-columns: 1fr; } }

.dim { display: flex; flex-direction: column; gap: 12px; }
.dim-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dim-name { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.dim-icon { width: 22px; height: 22px; opacity: 0.9; }
.meter { position: relative; width: 88px; height: 88px; flex-shrink: 0; }
.meter svg { transform: rotate(-90deg); }
.meter .val { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 20px; font-family: 'Space Grotesk', sans-serif; }
.dim-summary { color: var(--muted); font-size: 13px; line-height: 1.5; }
.dim-findings { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.dim-findings li { font-size: 12.5px; color: var(--text); line-height: 1.45; padding-left: 16px; position: relative; }
.dim-findings li::before { content: "▸"; position: absolute; left: 0; color: var(--accent); }

.risk-badge { font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 7px; letter-spacing: 0.5px; text-transform: uppercase; }
.r-low { color: var(--low); background: var(--low-bg); border: 1px solid rgba(34,197,94,0.35); }
.r-medium { color: var(--medium); background: var(--medium-bg); border: 1px solid rgba(245,158,11,0.35); }
.r-high { color: var(--high); background: var(--high-bg); border: 1px solid rgba(239,68,68,0.35); }

/* ── Red flags ────────────────────────────────────────── */
.flags { display: flex; flex-direction: column; gap: 12px; }
.flag {
  display: grid; grid-template-columns: 8px 1fr auto; gap: 16px; align-items: start;
  background: var(--panel); border: 1px solid var(--border); border-radius: 14px;
  padding: 16px 18px; backdrop-filter: blur(8px);
}
.flag .rail { width: 4px; border-radius: 4px; align-self: stretch; }
.flag.sev-low .rail { background: var(--low); }
.flag.sev-medium .rail { background: var(--medium); }
.flag.sev-high .rail { background: var(--high); }
.flag .body { display: flex; flex-direction: column; gap: 8px; }
.flag .flag-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.flag .cat { font-size: 11px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: #c7d2fe; }
.flag .desc { font-size: 14px; line-height: 1.55; color: var(--text); }
.flag .side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; text-align: right; }
.conf { font-size: 11px; color: var(--muted); }
.conf b { color: var(--text); text-transform: uppercase; }
.src { font-size: 12px; color: var(--accent); text-decoration: none; white-space: nowrap; }
.src:hover { text-decoration: underline; }

/* ── Footer ───────────────────────────────────────────── */
.foot { border-top: 1px solid var(--border); margin-top: 30px; position: relative; z-index: 2; }
.foot-inner { max-width: 1180px; margin: 0 auto; padding: 24px; }
.pipeline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 14px; }
.p-step { font-size: 12.5px; font-weight: 600; color: var(--text); background: var(--panel-solid); border: 1px solid var(--border); padding: 8px 13px; border-radius: 10px; }
.p-parallel { border-color: var(--border-strong); color: var(--accent); }
.p-arrow { color: var(--muted); }
.disclaimer { text-align: center; color: var(--muted); font-size: 12.5px; line-height: 1.6; margin: 0; }
.disclaimer code { color: var(--accent); background: rgba(125,211,252,0.08); padding: 1px 6px; border-radius: 5px; }
.disclaimer a { color: var(--accent); text-decoration: none; }
.disclaimer a:hover { text-decoration: underline; }
