/* Designing Data-Intensive Applications - course stylesheet
   Companion to assets/style.css. KaTeX companions per the
   katex-static-html-recipe (long formulas scroll inside, never the page). */

/* ---------- KaTeX ---------- */
.katex {
  display: inline-block;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  vertical-align: middle;
}
.katex-display {
  margin: 1rem 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.25rem 0;
}

/* ---------- figures ---------- */
figure {
  margin: 1.25rem 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem;
}
figure img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

/* ---------- problem set ---------- */
.problem-set { margin-top: 0.5rem; }
.problem {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.1rem;
  margin: 1rem 0;
}
.problem h3 {
  margin-top: 0;
  font-family: var(--sans);
  font-size: 0.9rem;
}
.problem-title { color: var(--muted); font-weight: 600; }
.problem-body { font-size: 0.95rem; }
.solution {
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--muted);
  background: #f8f9fa;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.6rem 0.8rem;
  margin-top: 0.6rem;
}
.solution summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--accent);
}
.solution-body { margin-top: 0.6rem; }
.solution-body p { margin-bottom: 0.5rem; }
.solution-body p:last-child { margin-bottom: 0; }
