*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0a0a0f;
  --surface: #12121a;
  --surface2: #1a1a26;
  --border: #2a2a3a;
  --accent: #7c6dfa;
  --accent2: #fa6d6d;
  --text: #f0eeff;
  --muted: #7a7a99;
  --green: #4ade80;
  --amber: #fbbf24;
  --red: #f87171;
  --orange: #fb923c;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  min-height: 100vh;
  padding: 0 0 6rem;
}

/* HERO */
.hero {
  max-width: 720px;
  margin: 0 auto;
  padding: 5rem 2rem 2rem;
  text-align: center;
}

.badge {
  display: inline-block;
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.3rem 0.9rem;
  border-radius: 100px;
  margin-bottom: 2rem;
}

h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.2rem;
  letter-spacing: -0.02em;
}

.accent { color: var(--accent2); }

.sub {
  font-size: 1rem;
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.7;
}

/* INPUT PANEL */
.input-panel {
  max-width: 620px;
  margin: 3rem auto 0;
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.input-group { margin-bottom: 1.4rem; }

.input-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 0.5rem;
  font-family: 'DM Mono', monospace;
  letter-spacing: 0.04em;
}

.muted { color: var(--muted); font-weight: 400; }

input, textarea {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: var(--text);
  font-size: 0.95rem;
  font-family: 'DM Sans', sans-serif;
  outline: none;
  transition: border-color 0.2s;
  resize: vertical;
}

input:focus, textarea:focus { border-color: var(--accent); }
input::placeholder, textarea::placeholder { color: #3a3a55; }

button#run-btn {
  width: 100%;
  padding: 0.9rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  margin-top: 0.5rem;
}

button#run-btn:hover { opacity: 0.88; }
button#run-btn:active { transform: scale(0.98); }
button#run-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* PIPELINE */
.pipeline {
  max-width: 620px;
  margin: 3rem auto 0;
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.pipeline-title {
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.steps { display: flex; flex-direction: column; }

.step {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  opacity: 0.3;
  transition: opacity 0.4s;
}

.step:last-child { border-bottom: none; }
.step.active { opacity: 1; }
.step.done { opacity: 1; }

.step-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 4px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
  border: 2px solid var(--border);
  transition: all 0.3s;
  flex-shrink: 0;
}

.step.active .dot {
  background: transparent;
  border-color: var(--accent);
  animation: pulse 1s infinite;
}

.step.done .dot {
  background: var(--green);
  border-color: var(--green);
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(124,109,250,0.2); }
  50% { box-shadow: 0 0 0 6px rgba(124,109,250,0.05); }
}

.step-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.step-desc { font-size: 0.82rem; color: var(--muted); }

.step-output {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--green);
  font-family: 'DM Mono', monospace;
  display: none;
}

.step.done .step-output { display: block; }

/* RESULTS */
.results {
  max-width: 620px;
  margin: 2rem auto 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 0 1rem;
}

/* SCORE ROW */
.score-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
}

.score-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.4rem;
  text-align: center;
}

.score-card .label {
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.score-card .value {
  font-family: 'Syne', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

.score-card .sublabel {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.3rem;
}

.value.red { color: var(--accent2); }
.value.amber { color: var(--amber); }
.value.green { color: var(--green); }
.value.orange { color: var(--orange); }

/* RISK BADGE */
.risk-high { color: var(--red); }
.risk-medium { color: var(--amber); }
.risk-low { color: var(--green); }

/* RESULT CARDS */
.result-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.8rem;
}

.result-card h3 {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  font-weight: 500;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.result-card p, .result-card li {
  font-size: 0.92rem;
  line-height: 1.7;
  color: #c8c8e8;
}

.result-card ul { padding-left: 1.2rem; }
.result-card ul li { margin-bottom: 0.4rem; }

.consequence-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.8rem;
}

.tag {
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
  background: rgba(250,109,109,0.1);
  color: var(--accent2);
  border: 1px solid rgba(250,109,109,0.25);
}

/* QUIZ */
.quiz-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.8rem;
}

.quiz-section h3 {
  font-family: 'DM Mono', monospace;
  font-weight: 500;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--amber);
  margin-bottom: 1rem;
}

.quiz-q {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 1.2rem;
  line-height: 1.5;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.2rem;
}

.quiz-opt {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  text-align: left;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
}

.quiz-opt:hover { border-color: var(--accent); background: #1a1a30; }
.quiz-opt.correct { border-color: var(--green); background: rgba(74,222,128,0.08); color: var(--green); }
.quiz-opt.wrong { border-color: var(--accent2); background: rgba(250,109,109,0.08); color: var(--accent2); }

.quiz-explain {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.8rem;
  padding: 0.8rem;
  background: var(--surface2);
  border-radius: 8px;
  line-height: 1.6;
  display: none;
}
/* Paste these at the bottom of your style.css */

/* ── FAILURE SIMULATOR CARD ───────────────────── */
.sim-card {
  border-color: #2a1a1a;
  background: #0f0a0a;
}

.sim-card h3.sim-title {
  color: var(--accent2);
}

.sim-attempting {
  font-family: 'DM Mono', monospace;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.sim-step {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 0.65rem;
  font-size: 0.88rem;
  line-height: 1.5;
}

.sim-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  margin-top: 2px;
}

.sim-icon.pass {
  background: rgba(74,222,128,0.12);
  color: var(--green);
  border: 1px solid rgba(74,222,128,0.3);
}

.sim-icon.fail {
  background: rgba(248,113,113,0.12);
  color: var(--red);
  border: 1px solid rgba(248,113,113,0.3);
}

.sim-text.pass { color: #c8c8e8; }
.sim-text.fail { color: var(--red); }

.sim-reason-box {
  margin-top: 1rem;
  padding: 0.8rem 1rem;
  background: rgba(248,113,113,0.07);
  border: 1px solid rgba(248,113,113,0.2);
  border-radius: 8px;
}

.sim-reason-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent2);
  margin-bottom: 0.3rem;
}

.sim-reason-text {
  font-size: 0.85rem;
  color: #c8c8e8;
  line-height: 1.6;
}

.sim-confidence {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 1rem;
}

.sim-conf-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  color: var(--muted);
  white-space: nowrap;
}

.sim-conf-bar {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.sim-conf-fill {
  height: 100%;
  background: var(--accent2);
  border-radius: 2px;
  transition: width 1s ease;
  width: 0%;
}

.sim-conf-val {
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem;
  color: var(--accent2);
}
/* ── ROADMAP RESOURCES ─────────────────────────── */
.plan-list { list-style: none; padding: 0; margin: 0; }

.plan-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}
.plan-item:last-child { border-bottom: none; }

.plan-header {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 0.7rem;
}

.plan-action {
  font-size: 0.82rem;
  color: var(--muted);
}

.plan-resources {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.resource-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  text-decoration: none;
  border: 1px solid var(--border);
  background: var(--surface2);
  transition: border-color 0.2s;
}
.resource-link:hover { border-color: var(--accent); }

.resource-video   { border-left: 2px solid #f87171; }
.resource-problem { border-left: 2px solid #fbbf24; }
.resource-doc     { border-left: 2px solid #7c6dfa; }

.resource-icon {
  font-size: 0.75rem;
  flex-shrink: 0;
  width: 16px;
  text-align: center;
}

.resource-body {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.resource-title {
  font-size: 0.82rem;
  color: var(--text);
  font-weight: 500;
}

.resource-source {
  font-size: 0.72rem;
  color: var(--muted);
  font-family: 'DM Mono', monospace;
}   
/* ── ROADMAP RESOURCES ─────────────────────────── */
.plan-list { list-style: none; padding: 0; margin: 0; }

.plan-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}
.plan-item:last-child { border-bottom: none; }

.plan-header {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 0.7rem;
}

.plan-action {
  font-size: 0.82rem;
  color: var(--muted);
}

.plan-resources {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.resource-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  text-decoration: none;
  border: 1px solid var(--border);
  background: var(--surface2);
  transition: border-color 0.2s;
}
.resource-link:hover { border-color: var(--accent); }

.resource-video   { border-left: 2px solid #f87171; }
.resource-problem { border-left: 2px solid #fbbf24; }
.resource-doc     { border-left: 2px solid #7c6dfa; }

.resource-icon {
  font-size: 0.75rem;
  flex-shrink: 0;
  width: 16px;
  text-align: center;
}

.resource-body {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.resource-title {
  font-size: 0.82rem;
  color: var(--text);
  font-weight: 500;
}

.resource-source {
  font-size: 0.72rem;
  color: var(--muted);
  font-family: 'DM Mono', monospace;
}