/* ============================================================
   Lecture Platform — design tokens ("lab bench, not a textbook")
   Dark surface, one warm accent, visuals own the page, text is
   captions. See ~/.claude/lecture/20260909-data-science-foundations/
   lecture-design.md section 5 for the source spec.
   ============================================================ */

:root {
  /* surface */
  --bg: #14171c;
  --bg-elevated: #1b1f26;
  --bg-inset: #0f1216;
  --border: #2a2f3a;

  /* text */
  --text: #e9edf1;
  --text-muted: #9aa4b2;
  --text-faint: #6b7480;

  /* the one warm accent: amber, reserved for "Your move" + progress state */
  --accent: #e2a33d;
  --accent-strong: #f0b559;
  --accent-dim: rgba(226, 163, 61, 0.14);

  /* the one data color: teal, plus a muted secondary for chart series */
  --data-teal: #2fd4c0;
  --data-secondary: #6b7a90;
  --outlier: #ff6b6b;

  /* type */
  --font-ui: -apple-system, "SF Pro Text", "Inter", system-ui, sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", ui-monospace, "Menlo", monospace;

  /* layout */
  --prose-width: 760px;
  --visual-width: 1040px;
  --radius: 10px;
  --gap: 1.25rem;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  line-height: 1.55;
}

body { padding-bottom: 6rem; }

a { color: var(--data-teal); text-decoration: none; }
a:hover { text-decoration: underline; }

code, pre, .mono { font-family: var(--font-mono); }

/* ---------- shell ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header .brand {
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text);
}

.site-header nav a {
  color: var(--text-muted);
  margin-left: 1.25rem;
  font-size: 0.92rem;
}

.container {
  max-width: var(--visual-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.prose {
  max-width: var(--prose-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.breakout {
  max-width: var(--visual-width);
  margin: 2rem auto;
  padding: 0 1.5rem;
}

/* ---------- target banner (pinned) ---------- */

.target-banner {
  position: sticky;
  top: 57px;
  z-index: 15;
  background: linear-gradient(180deg, var(--bg-elevated), var(--bg-elevated) 90%, transparent);
  border-bottom: 1px solid var(--border);
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.target-banner .label {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.target-banner .goal { font-size: 1rem; color: var(--text); }
.target-banner .minutes {
  margin-left: auto;
  color: var(--text-faint);
  font-size: 0.85rem;
  white-space: nowrap;
}

/* ---------- session blocks ---------- */

.block { max-width: var(--prose-width); margin: 2.25rem auto; padding: 0 1.5rem; }
.block.wide { max-width: var(--visual-width); }

.block h2 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin: 0 0 0.6rem 0;
}

.block p { margin: 0 0 0.75rem 0; }

.puzzle {
  background: var(--bg-elevated);
  border-left: 3px solid var(--data-teal);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.visual {
  width: 100%;
  max-width: var(--visual-width);
  margin: 1rem auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
}
.visual img, .visual svg { max-width: 100%; height: auto; }
.visual figcaption { color: var(--text-faint); font-size: 0.85rem; margin-top: 0.5rem; }

/* ---------- code blocks ---------- */

.code-block {
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.code-block .code-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.9rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-faint);
}
.code-block pre {
  margin: 0;
  padding: 1rem;
  overflow-x: auto;
  font-size: 0.88rem;
  color: var(--text);
}
.code-block .output {
  border-top: 1px dashed var(--border);
  padding: 0.85rem 1rem;
  color: var(--data-teal);
  font-size: 0.85rem;
  white-space: pre-wrap;
  background: var(--bg);
}
.copy-btn, .notebook-link {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 6px;
  padding: 0.2rem 0.6rem;
  font-size: 0.76rem;
  cursor: pointer;
}
.copy-btn:hover, .notebook-link:hover { color: var(--text); border-color: var(--text-muted); }

/* ---------- your move / hints ---------- */

.your-move {
  border: 1px solid var(--accent-dim);
  background: var(--accent-dim);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
}
.your-move h2 { color: var(--accent-strong); }

details.hint {
  margin-top: 0.6rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 0.8rem;
  background: var(--bg-inset);
}
details.hint summary {
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.85rem;
}
details.hint[open] summary { color: var(--accent); }

details.precise {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1.1rem;
  background: var(--bg-elevated);
}
details.precise summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
}

/* ---------- notes ---------- */

textarea.your-notes {
  width: 100%;
  min-height: 120px;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-ui);
  padding: 0.75rem;
  resize: vertical;
}
.notes-actions { margin-top: 0.5rem; display: flex; gap: 0.5rem; }
.notes-actions button {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 6px;
  padding: 0.3rem 0.7rem;
  font-size: 0.8rem;
  cursor: pointer;
}

/* ---------- progress marker ---------- */

.progress-marker {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.mark-done {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.88rem;
}
.mark-done.done { color: var(--bg); background: var(--accent); border-color: var(--accent); }

.next-session-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--accent);
  color: var(--bg);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
}
.next-session-btn:hover { background: var(--accent-strong); }

/* ---------- next puzzle ---------- */

.next-puzzle {
  color: var(--text-muted);
  font-style: italic;
  border-top: 1px dashed var(--border);
  padding-top: 1rem;
}

/* ---------- sliders / steppers ---------- */

.chart-swap { text-align: center; }
.chart-swap .frame { min-height: 320px; }
.chart-swap input[type="range"] { width: 80%; accent-color: var(--accent); }
.chart-swap .swap-label { color: var(--text-faint); font-size: 0.85rem; margin-top: 0.4rem; }
.stepper-controls { display: flex; justify-content: center; gap: 0.5rem; margin-top: 0.6rem; }
.stepper-controls button {
  background: var(--bg-inset);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  padding: 0.3rem 0.8rem;
  cursor: pointer;
}
.stepper-controls button.active { border-color: var(--accent); color: var(--accent); }

/* ---------- tangent offset ---------- */

.tangent {
  border: 1px dashed var(--data-secondary);
  border-radius: var(--radius);
  padding: 0 0 1rem 0;
  background: repeating-linear-gradient(135deg, var(--bg-elevated), var(--bg-elevated) 12px, var(--bg) 12px, var(--bg) 24px);
}
.tangent .back-link {
  display: block;
  padding: 0.6rem 1.5rem;
  color: var(--data-secondary);
  font-size: 0.85rem;
}

/* ---------- cards / roadmap ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--gap);
}
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.card h3 { margin: 0 0 0.4rem 0; }
.card .meta { color: var(--text-faint); font-size: 0.82rem; }
.card.planned { opacity: 0.55; }

.progress-bar {
  height: 8px;
  background: var(--bg-inset);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.progress-bar .fill { height: 100%; background: var(--data-teal); }

.resume-btn {
  display: inline-block;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  border-radius: 999px;
  padding: 0.6rem 1.4rem;
  border: none;
}

.session-list { list-style: none; padding: 0; margin: 0; }
.session-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
}
.session-list .status-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--text-faint); flex-shrink: 0;
}
.session-list .status-dot.touched { background: var(--data-secondary); }
.session-list .status-dot.done { background: var(--data-teal); }
.session-list .est { margin-left: auto; color: var(--text-faint); font-size: 0.8rem; }

/* ---------- checkpoints (project page) ---------- */

.checkpoint {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}
.checkpoint.checked { border-color: var(--data-teal); }
.checkpoint .checkpoint-head { display: flex; align-items: center; gap: 0.75rem; }
.checkpoint input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--data-teal); }

/* ---------- Module 05: pipeline map + three-briefs board ---------- */
/* The pipeline map is one reusable diagram (six-step spine, hazard tags)
   embedded per session with its current step already lit at generation time;
   `.pmap-step.active` is the shared convention (kept here so any future
   inline/JS-driven instance of the same SVG lights up the same way). */
.pmap-step.active rect { filter: drop-shadow(0 0 6px var(--accent-dim)); }
.briefs-board { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }
.briefs-board .brief-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 0.9rem; }
.briefs-board .brief-card h4 { margin: 0 0 0.4rem; font-size: 0.95rem; }
.briefs-board textarea { width: 100%; min-height: 90px; background: var(--bg-inset); color: var(--text);
  border: 1px solid var(--border); border-radius: 6px; padding: 0.5rem; font-family: var(--font-ui); font-size: 0.85rem; }
.briefs-board .hazard-stickers { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.5rem; }
.briefs-board .hazard-sticker { font-size: 0.72rem; padding: 0.2rem 0.5rem; border-radius: 999px; border: 1px solid var(--border);
  background: var(--bg-elevated); color: var(--text-muted); cursor: pointer; }
.briefs-board .hazard-sticker.stuck { background: var(--accent-dim); color: var(--accent-strong); border-color: var(--accent); }
@media (max-width: 900px) { .briefs-board { grid-template-columns: 1fr; } }
