/* assets/style.css — shared stylesheet for all lessons & reference docs.
   Kept minimal and print-friendly (Tufte-ish: restrained typography, one accent). */
:root {
  --bg: #fbfaf7;
  --ink: #1c1b19;
  --muted: #6b665d;
  --accent: #2f6f5e;
  --rule: #e3ded3;
  --code-bg: #f1eee6;
  --maxw: 46rem;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  display: flex;
  justify-content: center;
}
main {
  width: 100%;
  max-width: var(--maxw);
  padding: 3rem 1.5rem 5rem;
}
h1, h2, h3 { line-height: 1.25; font-weight: 650; letter-spacing: -0.01em; }
h1 { font-size: 1.9rem; margin: 0 0 0.25rem; }
h2 { font-size: 1.3rem; margin: 2.5rem 0 0.75rem; }
h3 { font-size: 1.05rem; margin: 1.5rem 0 0.5rem; }
.subtitle { color: var(--muted); margin: 0 0 2rem; font-size: 0.98rem; }
p { margin: 0.75rem 0; }
a { color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--rule); }
a:hover { border-bottom-color: var(--accent); }
code, pre, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
code { background: var(--code-bg); padding: 0.1em 0.35em; border-radius: 4px; font-size: 0.9em; }
pre {
  background: var(--code-bg);
  padding: 1rem 1.1rem;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.86rem;
  line-height: 1.5;
  border: 1px solid var(--rule);
}
pre code { background: none; padding: 0; }
hr { border: none; border-top: 1px solid var(--rule); margin: 2.5rem 0; }
.note {
  background: #f4f1e9;
  border-left: 3px solid var(--accent);
  padding: 0.75rem 1rem;
  border-radius: 0 6px 6px 0;
  margin: 1.25rem 0;
  color: #2a2823;
}
.tag {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0.1rem 0.6rem;
  margin-bottom: 0.5rem;
}
/* Quiz widget */
.quiz { margin: 1.5rem 0; border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; }
.quiz .q { padding: 0.9rem 1rem; background: #f4f1e9; font-weight: 600; }
.quiz .opts { padding: 0.5rem 1rem 1rem; }
.quiz button {
  display: block; width: 100%; text-align: left; margin: 0.4rem 0;
  padding: 0.55rem 0.8rem; font: inherit; cursor: pointer;
  background: #fff; border: 1px solid var(--rule); border-radius: 6px; color: var(--ink);
}
.quiz button:hover { border-color: var(--accent); }
.quiz button.correct { background: #e3f0e8; border-color: var(--accent); }
.quiz button.wrong { background: #f7e3e3; border-color: #b45454; }
.quiz .fb { padding: 0 1rem 1rem; color: var(--muted); font-size: 0.92rem; }
footer { margin-top: 3rem; color: var(--muted); font-size: 0.85rem; }
ul { padding-left: 1.2rem; }
li { margin: 0.35rem 0; }
@media print {
  body { background: #fff; }
  .quiz button { border: 1px solid #ccc; }
  a { border: none; }
}
