/* Shared stylesheet — LLM course */

:root {
  --bg: #fafaf8;
  --text: #1a1a1a;
  --muted: #666;
  --accent: #2563eb;
  --accent-light: #dbeafe;
  --border: #e5e7eb;
  --correct: #16a34a;
  --correct-bg: #dcfce7;
  --wrong: #dc2626;
  --wrong-bg: #fee2e2;
  --code-bg: #1e1e2e;
  --code-text: #cdd6f4;
  --card-bg: #ffffff;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
}

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

body {
  font-family: "Georgia", "Times New Roman", serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 18px;
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 2rem 6rem;
}

h1 { font-size: 2rem; font-weight: 700; line-height: 1.2; margin-bottom: .5rem; }
h2 { font-size: 1.35rem; font-weight: 700; margin-top: 2.5rem; margin-bottom: .75rem; }
h3 { font-size: 1.1rem; font-weight: 600; margin-top: 1.5rem; margin-bottom: .4rem; }

p { margin-bottom: 1rem; }
a { color: var(--accent); }

.lesson-meta {
  font-family: system-ui, sans-serif;
  font-size: .85rem;
  color: var(--muted);
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.lesson-meta span { margin-right: 1.5rem; }

.callout {
  background: var(--accent-light);
  border-left: 3px solid var(--accent);
  padding: .9rem 1.1rem;
  border-radius: 0 6px 6px 0;
  margin: 1.5rem 0;
  font-family: system-ui, sans-serif;
  font-size: .95rem;
}

.diagram {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  box-shadow: var(--shadow);
  text-align: center;
  font-family: system-ui, sans-serif;
}

/* Quiz widget */
.quiz {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 2rem 0;
  box-shadow: var(--shadow);
  font-family: system-ui, sans-serif;
}
.quiz h3 { margin-top: 0; font-size: 1rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.quiz .question { font-size: 1.05rem; font-weight: 600; margin: .5rem 0 1rem; color: var(--text); }
.quiz .options { display: flex; flex-direction: column; gap: .5rem; }
.quiz .option {
  padding: .7rem 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
  font-size: .95rem;
  text-align: left;
  background: var(--bg);
}
.quiz .option:hover { background: var(--accent-light); border-color: var(--accent); }
.quiz .option.correct { background: var(--correct-bg); border-color: var(--correct); color: var(--correct); }
.quiz .option.wrong { background: var(--wrong-bg); border-color: var(--wrong); color: var(--wrong); }
.quiz .feedback { margin-top: .75rem; font-size: .9rem; min-height: 1.2rem; font-weight: 500; }
.quiz .next-btn {
  margin-top: 1rem;
  padding: .5rem 1.2rem;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: .9rem;
  display: none;
}
.quiz .next-btn:hover { opacity: .9; }

/* Progress */
.progress-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin-bottom: 2rem;
}
.progress-bar .fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width .3s;
}

/* Source box */
.source {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.2rem 1.4rem;
  margin: 2rem 0;
  box-shadow: var(--shadow);
  font-family: system-ui, sans-serif;
  font-size: .9rem;
}
.source .label { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: .3rem; }
.source a { font-weight: 600; font-size: 1rem; }

/* Ask your teacher */
.ask-teacher {
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  padding-top: 1.5rem;
  font-family: system-ui, sans-serif;
  font-size: .9rem;
  color: var(--muted);
}
.ask-teacher strong { color: var(--text); }

code {
  font-family: "Menlo", "Consolas", monospace;
  background: var(--code-bg);
  color: var(--code-text);
  padding: .15em .4em;
  border-radius: 3px;
  font-size: .85em;
}

/* Lesson navigation */
.lesson-nav {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border);
  font-family: system-ui, sans-serif; font-size: .9rem;
}
.lesson-nav a { color: var(--accent); text-decoration: none; font-weight: 600; }
.lesson-nav a:hover { text-decoration: underline; }
.lesson-nav span { color: var(--muted); font-size: .85rem; }

/* Mark video as watched */
.mark-video-btn {
  display: inline-flex; align-items: center; gap: .4rem;
  margin-top: .9rem; padding: .45rem 1rem;
  border: 1px solid var(--border); border-radius: 6px;
  background: transparent; cursor: pointer;
  font-family: system-ui, sans-serif; font-size: .85rem;
  color: var(--muted); transition: all .2s;
}
.mark-video-btn:hover { border-color: var(--correct); color: var(--correct); }
.mark-video-btn.done { border-color: var(--correct); color: var(--correct); background: var(--correct-bg); cursor: default; }
