:root {
  color-scheme: light;
  --bg: #f6f8fc;
  --text: #132033;
  --muted: #637083;
  --card: #ffffff;
  --line: #dfe6f1;
  --primary: #2454ff;
  --primary-dark: #1737a7;
  --good: #15803d;
  --warn: #b45309;
  --bad: #dc2626;
  --critical: #7f1d1d;
  --shadow: 0 24px 70px rgba(19, 32, 51, 0.12);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top left, #eaf0ff, transparent 34rem), var(--bg);
}

a { color: inherit; }
.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.1rem 1.25rem;
}
.nav strong { margin-right: auto; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 650; }

.hero {
  padding-bottom: 4rem;
  background: linear-gradient(135deg, rgba(36,84,255,.10), rgba(34,197,94,.05));
}
.hero-grid {
  max-width: 1180px;
  margin: 0 auto;
  padding: 4rem 1.25rem 2rem;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
  gap: 2rem;
  align-items: center;
}
.eyebrow { color: var(--primary); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: .78rem; }
h1 { font-size: clamp(2.35rem, 6vw, 5.5rem); line-height: .95; margin: .4rem 0 1.3rem; max-width: 980px; }
h2 { font-size: clamp(1.8rem, 3vw, 3rem); line-height: 1; margin: .4rem 0 1rem; }
h3 { margin-top: 0; }
.lead { font-size: 1.25rem; color: var(--muted); max-width: 760px; line-height: 1.65; }
.actions { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; margin-top: 1.3rem; }
.button {
  border: 0;
  border-radius: 999px;
  padding: .9rem 1.2rem;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.primary { color: #fff; background: var(--primary); box-shadow: 0 16px 30px rgba(36,84,255,.25); }
.ghost { color: var(--primary-dark); background: #e8edff; }
.subtle { color: var(--muted); background: #edf1f7; }
.card {
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(223,230,241,.9);
  border-radius: 28px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.score-card .big { font-size: 1.8rem; font-weight: 900; margin: .2rem 0 .8rem; color: var(--bad); }
.status-dot { width: .75rem; height: .75rem; border-radius: 50%; display: inline-block; }
.status-dot.bad { background: var(--bad); box-shadow: 0 0 0 8px rgba(220,38,38,.12); }
.muted { color: var(--muted); line-height: 1.55; }
.section { max-width: 1180px; margin: 0 auto; padding: 4rem 1.25rem; }
.section-heading { max-width: 780px; margin-bottom: 1.5rem; }
.section-heading p { color: var(--muted); font-size: 1.08rem; }
.scenario-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.scenario {
  text-align: left;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 22px;
  padding: 1rem;
  cursor: pointer;
  color: var(--text);
}
.scenario strong { display: block; font-size: 1.05rem; margin-bottom: .35rem; }
.scenario span { color: var(--muted); line-height: 1.35; }
.scenario.active { outline: 3px solid rgba(36,84,255,.22); border-color: var(--primary); }
.test-panel { margin-top: 1rem; }
.form-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
label { color: var(--muted); font-weight: 700; }
select {
  display: block;
  width: 100%;
  margin-top: .4rem;
  padding: .8rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  font: inherit;
  color: var(--text);
  background: white;
}
.progress { height: 12px; border-radius: 999px; overflow: hidden; background: #e5ebf5; margin-top: 1.4rem; }
.progress span { display: block; width: 0%; height: 100%; background: linear-gradient(90deg, var(--primary), #22c55e); transition: width .25s ease; }
.results { display: grid; grid-template-columns: 1.4fr .6fr; gap: 1rem; margin-top: 1.2rem; }
.result-main { border-left: 8px solid var(--primary); }
.result-main.bad { border-left-color: var(--bad); }
.result-main.critical { border-left-color: var(--critical); }
.result-main.watch { border-left-color: var(--warn); }
.result-main.good { border-left-color: var(--good); }
.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem; margin-top: 1.1rem; }
.metric-grid div { background: #f3f6fb; border-radius: 18px; padding: 1rem; }
.metric-grid span { color: var(--muted); display: block; font-size: .9rem; }
.metric-grid strong { font-size: 1.25rem; display: block; margin-top: .2rem; }
.cards-three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.history-list { display: grid; gap: .75rem; }
.history-item { display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: center; padding: .9rem; border: 1px solid var(--line); border-radius: 18px; background: #fbfcff; }
.history-item strong { display: block; }
.history-item span { color: var(--muted); }
.footer { text-align: center; color: var(--muted); padding: 3rem 1rem; border-top: 1px solid var(--line); }

@media (max-width: 900px) {
  .hero-grid, .results { grid-template-columns: 1fr; }
  .scenario-grid, .cards-three, .form-row, .metric-grid { grid-template-columns: 1fr; }
  .nav { flex-wrap: wrap; }
  .nav strong { width: 100%; }
}
