/*
 * latex-custom.css
 *
 * Supplements https://latex.vercel.app/style.css with:
 *   - Admonition boxes  (tcolorbox equivalents: note, tip, warning, result, mybox, conclbox)
 *   - Pull-quote styling
 *   - Two-column grid   (multicols equivalent)
 *   - Boxed result      (fbox equivalent)
 *   - Figure/image defaults
 *   - Comments section  (giscus wrapper)
 *   - TikZ figure centering
 */

/* ── Admonition boxes ─────────────────────────────────────────── */

.admonition {
  margin: 1.5rem 0;
  padding: 0.75rem 1rem 0.75rem 1.1rem;
  border-left: 4px solid;
  border-radius: 0 4px 4px 0;
}

.admonition-title {
  display: block;
  font-weight: bold;
  margin-bottom: 0.45rem;
}

/* Colours — chosen to remain readable in both light and dark mode */
.admonition.note    { border-color: #5b9bd5; background: rgba(91,  155, 213, 0.10); }
.admonition.tip     { border-color: #4caf50; background: rgba(76,  175,  80, 0.10); }
.admonition.warning { border-color: #e65100; background: rgba(230,  81,   0, 0.09); }
.admonition.result  { border-color: #2e7d32; background: rgba( 46, 125,  50, 0.10); }
.admonition.mybox   { border-color: #1565c0; background: rgba( 21, 101, 192, 0.08); }
.admonition.conclbox { border-color: #555;   background: rgba( 85,  85,  85, 0.07); }

/* Slight tweak for dark backgrounds */
@media (prefers-color-scheme: dark) {
  .admonition.note    { background: rgba(144, 202, 249, 0.09); }
  .admonition.tip     { background: rgba(165, 214, 167, 0.09); }
  .admonition.warning { background: rgba(255, 204, 128, 0.09); }
  .admonition.result  { background: rgba(165, 214, 167, 0.09); }
  .admonition.mybox   { background: rgba(144, 202, 249, 0.07); }
  .admonition.conclbox { background: rgba(189, 189, 189, 0.07); }
}

/* ── Pull-quote ────────────────────────────────────────────────── */

.pullquote {
  font-style: italic;
  margin: 1.5rem 2rem;
  padding-left: 1rem;
  border-left: 3px solid #aaa;
  opacity: 0.85;
}

/* ── Two-column layout (multicols) ────────────────────────────── */

.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 1.5rem 0;
}

@media (max-width: 600px) {
  .two-column { grid-template-columns: 1fr; }
}

/* ── Boxed result (fbox / minipage) ───────────────────────────── */

.boxed {
  border: 1px solid #bbb;
  border-radius: 4px;
  padding: 0.8rem 1.2rem;
  margin: 1.2rem auto;
  max-width: 95%;
  text-align: center;
}

/* ── Figures ──────────────────────────────────────────────────── */

figure {
  text-align: center;
  margin: 1.5rem auto;
}

figure img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

figcaption {
  font-size: 0.875rem;
  opacity: 0.75;
  margin-top: 0.4rem;
}

/* ── Comments / Giscus section ────────────────────────────────── */

#comments {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid #ccc;
}

#comments > h2 {
  font-size: 1.2em;
  margin-bottom: 0.8rem;
}

/* ── TikZ / tikzjax figure centering ─────────────────────────── */

.tikz-figure {
  display: flex;
  justify-content: center;
  margin: 1.5rem 0;
  overflow-x: auto;
}

/* ── Inline code in headings ──────────────────────────────────── */

h2 code, h3 code, h4 code { font-size: 0.9em; }

/* ── Utility ──────────────────────────────────────────────────── */

.text-center { text-align: center; }
