/* THE CAMPUS CRISIS — design system
   Serious, editorial, classroom-ready. No gamification chrome. */

:root {
  --ink: #1c2733;
  --ink-soft: #3d4c5c;
  --ink-faint: #6b7a89;
  --paper: #f7f5f0;
  --card: #ffffff;
  --line: #e2ddd2;
  --accent: #7a3b2e;       /* deep terracotta */
  --accent-soft: #f3e7e2;
  --accent-ink: #5c2b21;
  --slate: #24455e;        /* deep slate blue */
  --slate-soft: #e8eef3;
  --gold: #8a6d3b;
  --ok: #3e6b4f;
  --warn: #9a5b23;
  --shadow: 0 1px 2px rgba(28, 39, 51, 0.06), 0 6px 24px rgba(28, 39, 51, 0.07);
  --radius: 10px;
  --font-serif: Georgia, 'Times New Roman', 'Noto Serif', serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
}

.app-shell { min-height: 100vh; display: flex; flex-direction: column; }

/* ---------- Top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--line);
  background: var(--card);
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar .brand {
  font-family: var(--font-serif);
  font-size: 15px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}
.topbar .brand em { color: var(--accent); font-style: normal; }
.topbar nav { display: flex; gap: 10px; align-items: center; }
.topbar .episode-indicator {
  font-size: 12.5px;
  color: var(--ink-faint);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 6px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
  text-decoration: none;
}
.btn:hover { background: var(--ink-soft); }
.btn:active { transform: translateY(1px); }
.btn.secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn.secondary:hover { border-color: var(--ink-faint); background: #faf9f6; }
.btn.accent { background: var(--accent); border-color: var(--accent); }
.btn.accent:hover { background: var(--accent-ink); }
.btn.ghost {
  background: transparent;
  border-color: transparent;
  color: var(--ink-faint);
  font-weight: 500;
}
.btn.ghost:hover { color: var(--ink); background: transparent; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* ---------- Layout ---------- */
.stage {
  flex: 1;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 24px 80px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  align-items: start;
}
.stage.single { grid-template-columns: minmax(0, 1fr); max-width: 860px; }

@media (max-width: 940px) {
  .stage { grid-template-columns: minmax(0, 1fr); }
  .dashboard { position: static !important; }
}

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 30px;
  margin-bottom: 20px;
}
.card h2 {
  font-family: var(--font-serif);
  font-size: 24px;
  line-height: 1.25;
  margin: 0 0 6px;
  color: var(--ink);
}
.card h3 {
  font-family: var(--font-serif);
  font-size: 17px;
  margin: 22px 0 8px;
  color: var(--slate);
  letter-spacing: 0.02em;
}
.card h3:first-of-type { margin-top: 0; }
.eyebrow {
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 10px;
}
p.narrative {
  font-family: var(--font-serif);
  font-size: 17.5px;
  line-height: 1.72;
  color: var(--ink-soft);
  margin: 0 0 14px;
}
p.narrative strong { color: var(--ink); }

/* ---------- Fact lists ---------- */
.fact-list { margin: 0; padding: 0; list-style: none; }
.fact-list li {
  padding: 8px 0 8px 22px;
  position: relative;
  font-size: 15px;
  color: var(--ink-soft);
  border-bottom: 1px dashed var(--line);
}
.fact-list li:last-child { border-bottom: none; }
.fact-list li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 16px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--slate);
}
.fact-list.uncertain li::before { background: var(--gold); }
.fact-list.uncertain li { color: var(--warn); }

/* ---------- Dialogue / messages ---------- */
.message {
  border-left: 3px solid var(--slate);
  background: var(--slate-soft);
  padding: 14px 18px;
  margin: 14px 0;
  border-radius: 0 8px 8px 0;
}
.message .speaker {
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--slate);
  font-weight: 700;
  margin-bottom: 4px;
}
.message .quote { font-family: var(--font-serif); font-style: italic; font-size: 16px; color: var(--ink); }
.message.student { border-left-color: var(--accent); background: var(--accent-soft); }
.message.student .speaker { color: var(--accent); }
.message.neutral { border-left-color: var(--ink-faint); background: #f1efe9; }

/* ---------- Inquiry ---------- */
.inquiry-box { background: #fbfaf7; border: 1px solid var(--line); border-radius: 8px; padding: 18px 20px; margin: 18px 0; }
.inquiry-box .budget { font-size: 13px; font-weight: 700; color: var(--accent); margin-bottom: 10px; letter-spacing: 0.04em; }
.inquiry-options { display: flex; flex-direction: column; gap: 8px; }
.inquiry-option {
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 14.5px;
  cursor: pointer;
  color: var(--ink-soft);
}
.inquiry-option:hover:not(:disabled) { border-color: var(--slate); color: var(--ink); }
.inquiry-option:disabled { opacity: 0.5; cursor: not-allowed; }
.inquiry-reveal {
  margin-top: 12px;
  padding: 12px 16px;
  border-left: 3px solid var(--gold);
  background: #faf6ec;
  border-radius: 0 6px 6px 0;
  font-size: 14.5px;
  color: var(--ink-soft);
}

/* ---------- Reflection ---------- */
.reflection-box {
  background: var(--slate-soft);
  border-radius: 8px;
  padding: 16px 20px;
  margin: 18px 0;
}
.reflection-box .q { font-family: var(--font-serif); font-size: 16.5px; color: var(--slate); font-style: italic; }

/* ---------- Journal ---------- */
.journal-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 20px;
  margin: 18px 0;
  background: #fdfcf9;
}
.journal-card .j-label { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); font-weight: 700; margin-bottom: 4px; }
.journal-card textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 12px;
  font-family: var(--font-sans);
  font-size: 14px;
  resize: vertical;
  background: var(--card);
  color: var(--ink);
}
.journal-card textarea:focus { outline: 2px solid var(--slate-soft); border-color: var(--slate); }
.reminder {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  padding: 12px 16px;
  border-radius: 0 6px 6px 0;
  margin: 14px 0;
  font-size: 14.5px;
  color: var(--accent-ink);
}

/* ---------- Decision cards ---------- */
.decision-list { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.decision-option {
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--slate);
  border-radius: 8px;
  padding: 14px 18px;
  cursor: pointer;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.decision-option:hover { border-left-color: var(--accent); border-color: var(--accent); box-shadow: var(--shadow); }
.decision-option .d-title { font-weight: 700; font-size: 15px; color: var(--ink); margin-bottom: 3px; }
.decision-option .d-desc { font-size: 13.5px; color: var(--ink-faint); }
.decision-option.free { border-left-style: dashed; }

/* ---------- Consequences ---------- */
.consequence { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 14.5px; color: var(--ink-soft); }
.consequence:last-child { border-bottom: none; }
.consequence .dot { flex: none; width: 8px; height: 8px; border-radius: 50%; margin-top: 8px; background: var(--slate); }
.consequence.later .dot { background: var(--gold); }
.consequence.flag-note { color: var(--warn); }

/* ---------- Dashboard ---------- */
.dashboard {
  position: sticky;
  top: 76px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.dash-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px;
}
.dash-card h4 {
  margin: 0 0 10px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}
.dash-stat { display: flex; justify-content: space-between; font-size: 13.5px; padding: 4px 0; color: var(--ink-soft); }
.dash-stat b { color: var(--ink); font-weight: 700; }
.dash-note { font-size: 13px; color: var(--ink-faint); padding: 3px 0; }
.dash-note.climate-students::before { content: '● '; color: var(--accent); }
.dash-note.climate-recruiter::before { content: '● '; color: var(--slate); }
.dash-note.climate-faculty::before { content: '● '; color: var(--gold); }
.dash-note.climate-governing::before { content: '● '; color: var(--ink-faint); }
.dash-note.climate-parents::before { content: '● '; color: var(--warn); }
.dash-commit { font-size: 12.5px; color: var(--ink-soft); padding: 5px 0 5px 14px; position: relative; }
.dash-commit::before { content: '—'; position: absolute; left: 0; color: var(--accent); }

/* ---------- Progress ---------- */
.progress-track { display: flex; gap: 5px; padding: 0 28px 14px; background: var(--card); border-bottom: 1px solid var(--line); }
.progress-seg { flex: 1; height: 4px; border-radius: 2px; background: var(--line); }
.progress-seg.done { background: var(--slate); }
.progress-seg.current { background: var(--accent); }

/* ---------- Landing ---------- */
.landing {
  max-width: 780px;
  margin: 0 auto;
  padding: 64px 24px 90px;
  text-align: center;
}
.landing h1 {
  font-family: var(--font-serif);
  font-size: clamp(34px, 6vw, 52px);
  letter-spacing: 0.04em;
  margin: 18px 0 6px;
  color: var(--ink);
}
.landing h1 em { color: var(--accent); font-style: normal; }
.landing .tagline { font-family: var(--font-serif); font-style: italic; font-size: 19px; color: var(--ink-faint); margin: 6px 0 30px; }
.landing .sub { font-size: 15px; color: var(--ink-soft); max-width: 560px; margin: 0 auto 40px; line-height: 1.7; }
.landing .role-card {
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 28px;
  margin-bottom: 34px;
}
.landing .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.landing .fineprint { margin-top: 28px; font-size: 12.5px; color: var(--ink-faint); }

/* ---------- Facilitator ---------- */
.fac-question { padding: 12px 0; border-bottom: 1px dashed var(--line); font-family: var(--font-serif); font-size: 16.5px; color: var(--ink-soft); }
.fac-question:last-child { border-bottom: none; }

/* ---------- Summary / path ---------- */
.path-section h3 { margin-top: 26px; }
.path-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 24px; }
@media (max-width: 700px) { .path-grid { grid-template-columns: 1fr; } }
.path-item { font-size: 14.5px; color: var(--ink-soft); padding: 6px 0; }
.path-item b { color: var(--ink); }
.turning-point { display: flex; gap: 14px; margin: 12px 0; }
.turning-point .num {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: var(--slate); color: #fff; font-weight: 700;
  display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.turning-point .tp-text { font-size: 15px; color: var(--ink-soft); padding-top: 3px; }

/* ---------- Reflection questions (end) ---------- */
.end-reflect .rq { margin: 22px 0; }
.end-reflect .rq .rq-q { font-family: var(--font-serif); font-size: 16.5px; color: var(--ink); margin-bottom: 8px; }
.end-reflect textarea { width: 100%; min-height: 58px; border: 1px solid var(--line); border-radius: 6px; padding: 10px 13px; font-family: var(--font-sans); font-size: 14px; resize: vertical; background: var(--card); }

.phil-term { margin: 20px 0; padding-left: 18px; border-left: 3px solid var(--gold); }
.phil-term .term { font-family: var(--font-serif); font-weight: 700; font-size: 17px; color: var(--ink); }
.phil-term .meaning { font-size: 14px; color: var(--ink-faint); font-style: italic; margin-bottom: 6px; }
.phil-term .prompt-q { font-size: 15px; color: var(--ink-soft); }

/* ---------- Utility ---------- */
.hidden { display: none !important; }
.muted { color: var(--ink-faint); }
.small { font-size: 13px; }
.mt-20 { margin-top: 20px; }
.divider { border: none; border-top: 1px solid var(--line); margin: 24px 0; }
.footer-note { text-align: center; font-size: 12px; color: var(--ink-faint); padding: 20px; }

/* Hindi: letter-spacing and case transforms break Devanagari conjuncts. */
html[lang="hi"] * { letter-spacing: normal !important; text-transform: none !important; }
.lang-toggle { white-space: nowrap; }
