:root{--bg:#0f1720;--card:#111827;--accent:#06b6d4;--muted:#9ca3af}
*{box-sizing:border-box}
body{
  margin:0;min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;
  background: radial-gradient(1200px 600px at 10% 10%, rgba(56,189,248,0.03), transparent), linear-gradient(180deg,var(--bg),#050708);
  color:var(--text);font-family:Inter,Segoe UI,Arial,sans-serif;padding:28px
}
h1{margin:8px 0 20px}
#ui{max-width:720px;width:100%}
.card{background:rgba(255,255,255,0.03);padding:16px;border-radius:8px;margin:12px 0}
#symptoms{font-size:1.1rem}
button{background:var(--accent);border:none;color:#072024;padding:10px 14px;border-radius:6px;margin:6px;cursor:pointer}
button:hover{opacity:0.95}
#result{min-height:48px;display:flex;align-items:center}

/* Panels */
.panel { background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01)); border: 1px solid rgba(255,255,255,0.03); }

/* Start overlay */
.overlay{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;background:linear-gradient(rgba(2,6,23,0.75), rgba(2,6,23,0.85));z-index:60;padding:24px}
.overlay-card{max-width:720px;text-align:left}
.overlay-card h2{margin-top:0}
.overlay-card .muted{color:var(--muted);font-size:0.95rem}
.ghost{background:transparent;border:1px solid rgba(255,255,255,0.06);color:#fff}

/* Confidence buttons */
.conf-btn{background:#10b981;border:none;color:#032; padding:8px 12px;border-radius:6px;margin:6px;cursor:pointer}
.conf-btn:hover{opacity:0.95}
.conf-btn[disabled]{opacity:0.5;cursor:not-allowed}
.conf-btn + .conf-btn{margin-left:8px}

/* System isolation buttons */
.sys-panel{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0}
.sys-btn{background:#0369a1;color:#fff;border:none;padding:8px 12px;border-radius:6px;cursor:pointer}
.sys-btn:hover{opacity:0.95}
.sys-badge{font-size:0.9rem;color:var(--muted);margin-top:6px}

/* Explanation / reasoning panel */
.explain-panel{background:rgba(0,0,0,0.35);border:1px solid rgba(255,255,255,0.04);padding:10px;margin-top:12px;border-radius:8px}
.explain-panel h4{margin:0 0 8px 0;color:#fff;font-size:1rem}
.explain-item{font-size:0.95rem;color:var(--muted);margin:4px 0}
.explain-key{color:var(--muted);font-weight:600;margin-right:6px}
.explain-value{color:#e6eef3}
.evidence-list{margin:6px 0;padding-left:14px}
.evidence-entry{margin:2px 0;font-size:0.9rem}

/* ================= HOMEPAGE ================= */

.hero h1 {
  font-size: 2.4rem;
  margin-bottom: 10px;
}

.hero .subhead {
  margin: 0 0 6px 0;
  color: #9be7ef;
  font-size: 1.1rem;
  font-weight:600;
}

.hero .tagline {
  color: #cbd5e1;
  margin-top:6px;
  font-weight:600;
}

.hero p {
  max-width: 700px;
  margin: auto;
  color: #cbd5e1;
  line-height: 1.5;
}

.steps {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 20px;
}

.step {
  background: rgba(255,255,255,0.04);
  padding: 16px;
  border-radius: 10px;
  width: 200px;
}

.mode-card {
  background: rgba(255,255,255,0.05);
  padding: 20px;
  border-radius: 12px;
  width: 260px;
  text-align: left;
}

.mode-card h2 {
  margin-top: 0;
  color: #06b6d4;
}

.mode-card ul {
  padding-left: 18px;
  color: #cbd5e1;
}

/* Hero media placeholder */
.hero-media{width:320px; height:200px; border-radius:10px; display:flex;align-items:center;justify-content:center}
.hero-media-placeholder{width:320px;height:200px;border-radius:10px;border:2px dashed rgba(255,255,255,0.06);display:flex;align-items:center;justify-content:center;color:var(--muted);font-size:90%;text-align:center;padding:12px}

/* HERO MEDIA VIDEO */
.hero-media video{width:100%;max-width:720px;border-radius:10px;border:1px solid rgba(255,255,255,0.04);box-shadow:0 6px 18px rgba(2,6,23,0.6)}

/* TEACHER BANNER */
.teacher-banner{margin-top:18px;padding:12px;background:rgba(255,255,255,0.02);border-radius:8px;display:flex;gap:12px;align-items:center;justify-content:center}
.teacher-banner strong{color:#fff;margin-right:6px}

/* DEMO MODAL */
.overlay{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,0.7);z-index:200}
.overlay-card{background:var(--card);padding:20px;border-radius:10px;color:#fff;max-width:420px;text-align:center}
.overlay-card .muted{color:var(--muted)}

/* Replay viewer */
#replayTimeline { margin-top:10px; font-size:0.95rem; }
.replay-item { padding:8px 6px; border-bottom:1px solid rgba(255,255,255,0.04); }
.replay-time { color:var(--muted); font-size:0.85rem; margin-right:8px }

/* replay highlights */
.replay-item.wrong { color: #f87171; }
.replay-item.active { background: rgba(6,182,212,0.08); border-left:3px solid var(--accent); transition: background 220ms ease; }

.replay-summary{ margin-bottom:8px; font-size:0.95rem; color:var(--muted,#9aa); }
.tag{ margin-left:10px; font-size:0.75rem; color:#f87171; background:rgba(248,113,113,0.06); padding:2px 6px; border-radius:4px; }
/* Heatmap styles */
.heatmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.heatmap-cell {
  padding: 12px;
  border-radius: 8px;
  text-align: center;
  font-size: 0.95rem;
}
.heatmap-cell.low { background: rgba(248,113,113,0.12); }
.heatmap-cell.medium { background: rgba(250,204,21,0.12); }
.heatmap-cell.high { background: rgba(34,197,94,0.12); }
.heatmap-cell { cursor: pointer; transition: transform 120ms ease, box-shadow 120ms ease; }
.heatmap-cell:hover { transform: scale(1.03); box-shadow: 0 6px 18px rgba(0,0,0,0.4); }
.heatmap-cell.selected { outline: 2px solid rgba(6,182,212,0.25); }

.heatmap-legend { margin-top: 10px; display:flex; gap:10px; font-size:0.85rem; align-items:center }
.legend { padding:4px 8px; border-radius:6px }
.legend.low { background: rgba(248,113,113,0.12) }
.legend.medium { background: rgba(250,204,21,0.12) }
.legend.high { background: rgba(34,197,94,0.12) }

/* replay controls */
#replay-play, #replay-stop { padding:8px 10px; border-radius:6px; }
#replay-speed { padding:6px; border-radius:6px; background:rgba(255,255,255,0.03); color:#fff }

/* CTA styles */
.primary-cta{background:#06b6d4;color:#042b2e;border:none;padding:12px 16px;border-radius:8px;font-weight:600}
.ghost-cta{background:transparent;border:1px solid rgba(255,255,255,0.06);color:#fff;padding:10px 14px;border-radius:8px}
.secondary-cta{background:rgba(255,255,255,0.04);color:#fff;padding:10px 14px;border-radius:8px}

.features .feature {background: rgba(255,255,255,0.02); padding:14px; border-radius:10px; width:260px; text-align:left}

/* final CTA spacing */
#final-cta{margin-bottom:18px}

/* LANDING PAGE */
.landing {
  width: 100%;
  max-width: 1000px;
  margin: auto;
}

/* HERO */
.hero {
  text-align: center;
  padding: 60px 20px;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 10px;
}

.hero-sub {
  font-size: 1.4rem;
  color: var(--accent);
  margin-bottom: 10px;
}

.hero-desc {
  max-width: 700px;
  margin: auto;
  color: var(--muted);
}

.hero-actions {
  margin-top: 20px;
}

/* FEATURES */
.features {
  padding: 40px 20px;
  text-align: center;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.feature {
  background: rgba(255,255,255,0.04);
  padding: 16px;
  border-radius: 10px;
}

/* HOW */
.how {
  text-align: center;
  padding: 40px 20px;
}

/* MODES */
.modes {
  text-align: center;
  padding: 40px 20px;
}

.mode-grid {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.mode-card {
  background: rgba(255,255,255,0.05);
  padding: 20px;
  border-radius: 12px;
  width: 260px;
}

/* TRUST */
.trust {
  text-align: center;
  padding: 20px;
  color: var(--muted);
}

/* CTA */
.cta {
  text-align: center;
  padding: 50px 20px;
}

/* Scenario selection screen */
.scenario-card {
  background: rgba(255,255,255,0.02);
  padding: 12px;
  border-radius: 8px;
  min-height: 120px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
}
.scenario-card h4{margin:0 0 6px 0}
.scenario-meta{font-size:0.9rem;color:var(--muted)}
.scenario-actions{display:flex;gap:8px;align-items:center}
.filter-pill{background:rgba(255,255,255,0.03);padding:6px 8px;border-radius:6px;font-size:90%;color:var(--muted)}

/* Teacher student row */
.student-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px;padding:8px;border-radius:8px;border:1px solid rgba(255,255,255,0.03);background:rgba(255,255,255,0.01)}
.student-select{width:18px;height:18px}

/* NAV */
.topnav { position: sticky; top: 0; z-index: 80; width:100%; backdrop-filter: blur(6px); background: linear-gradient(180deg, rgba(11,17,23,0.6), rgba(11,17,23,0.4)); border-bottom:1px solid rgba(255,255,255,0.03); }
.topnav .nav-inner { max-width:1100px; margin:0 auto; display:flex;align-items:center;justify-content:space-between;padding:12px 20px; }
.nav-brand { font-weight:800; color:var(--text); letter-spacing:0.4px }
.nav-links { display:flex; gap:14px; align-items:center }
.nav-links a { color:var(--muted); text-decoration:none; padding:8px 10px; border-radius:6px }
.nav-links a.primary { background:var(--accent); color:#07121a }

/* HERO LAYOUT */
.hero-grid { display:grid; grid-template-columns: 1fr 420px; gap:28px; align-items:start; max-width:1100px; margin: 0 auto; }
.hero-card { background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01)); border-radius:12px; padding:18px; box-shadow: 0 8px 30px rgba(2,6,23,0.6); }
.diagnostic-card { background: linear-gradient(180deg, var(--panel), var(--panel-soft)); border-radius:12px; padding:14px; color:var(--text); }
.diagnostic-row { display:flex; justify-content:space-between; align-items:center; margin:6px 0; }
.badge { background: rgba(255,255,255,0.04); padding:6px 8px; border-radius:8px; font-size:0.85rem; color:var(--muted) }
.status-pass { color:var(--success); font-weight:700 }
.status-warn { color:var(--accent); font-weight:700 }
.status-danger { color:var(--danger); font-weight:700 }

/* FOOTER */
footer.site-footer { max-width:1100px; width:100%; margin:28px auto 6px; padding:18px 20px; border-top:1px solid rgba(255,255,255,0.03); color:var(--muted); display:flex; justify-content:space-between; align-items:center }

/* Responsive adjustments */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .topnav .nav-inner { padding:10px 12px }
}
.student-row strong{font-size:1rem}
.student-row .muted{font-size:0.9rem;color:var(--muted)}
