/* Layout rules for the deck. Typography and code styling come from
   custom.css (taken from Leo's SViL 2026 deck). */

/* ── Inline SVG figures ── */
.reveal section svg[role="img"] {
  display: block;
  margin: 0.3em auto;
  max-width: 100%;
  max-height: 46vh;
  height: auto;
}
.reveal section svg.fig-large { max-height: 62vh; width: 100% !important; }
.reveal section svg.fig-medium { max-height: 40vh; }
.reveal section svg.fig-small { max-height: 34vh; width: 100% !important; }
.reveal section svg.fig-chart { width: 100% !important; max-height: 50vh; }
.reveal svg.fig-full { max-height: 76vh !important; width: 100% !important; height: auto; }
.reveal .r-hstack > .r-vstack { flex: 1; }

/* ── Footer with sources ── */
.reveal .slides section .slide-footer {
  position: absolute;
  left: 3vw;
  right: 3vw;
  bottom: 2.6vh;
  margin: 0;
  font-size: 0.58em;
  line-height: 1.4;
  color: var(--text-muted);
}
.reveal .slides section .slide-footer p { margin: 0; }

/* ── Principal result in large type ── */
.reveal .big-result {
  font-size: 1em;
  font-weight: 600;
  color: var(--lean-blue);
  margin: 0.4em 0 0.5em;
}

/* ── Tables ── */
.reveal .slides section table {
  margin: 0.5em 0;
  font-size: 0.95em;
  border-collapse: collapse;
}
.reveal .slides section table th,
.reveal .slides section table td {
  padding: 0.3em 0.8em;
  text-align: left;
  vertical-align: top;
}
.reveal .slides section table th { font-weight: 600; }
.reveal .slides section table td p,
.reveal .slides section table th p { margin: 0; }

/* ── Full-slide figures ── */
.reveal .slides section[data-state="full-figure"] { padding: 0; }
.reveal section[data-state="full-figure"] > h2 { display: none; }
.reveal section[data-state="full-figure"] > p {
  position: absolute;
  inset: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.reveal section[data-state="full-figure"] > p > img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
  object-fit: contain;
}

/* ── Plain (non-Lean) code excerpts ── */
.reveal .slides section > pre {
  width: 100%;
  margin: 0.4em 0;
  padding: 0.8em 1em;
  box-sizing: border-box;
  font-size: 0.68em;
  line-height: 1.55;
  box-shadow: none;
  border: 1px solid var(--border-code);
  border-radius: 6px;
  background: var(--bg-code);
}

/* Larger base type for the projector. */
.reveal { font-size: 3.9vh; }

/* Inline code uses the same face as Lean blocks. */
.reveal code { font-family: var(--verso-code-font-family); font-weight: 400; }
/* No warning squiggles on slides (e.g. a `sorry` in a statement). */
.reveal .hl.lean .has-info.warning .token, .reveal .hl.lean .has-info.warning .inter-text,
.reveal .hl.lean .has-info.warning { text-decoration: none !important; }
.command-output.information { font-size: 1em; }

/* Handwriting in the xkcd-style figures (xkcd Script, github.com/ipython/xkcd-font, CC BY-NC 3.0). */
@font-face {
  font-family: 'xkcd Script';
  src: url(fonts/xkcd-script.ttf) format('truetype');
}

/* Struck-through words, e.g. in a title. */
.reveal .strike { text-decoration: line-through; text-decoration-thickness: 0.08em; color: var(--text-muted); }

/* Hover boxes: verso-slides sets 1.8vw, too large for multi-paragraph docstrings. */
.tippy-box { font-size: 1.05vw; }

/* Further reading on the closing slide. */
.reveal .slides > section[data-state="title"] > .further-reading-title { margin-top: 1.2em; font-weight: 600; }
.reveal .slides > section[data-state="title"] > ul { margin-top: 0.2em; padding-left: 1.2em; line-height: 1.5; font-weight: 400; }

/* With disableLayout, reveal.js does not size r-stretch boxes, so a long
   Lean block would grow past the slide; cap it and let it scroll. */
.reveal .slides section .code-with-panel.r-stretch { max-height: 68vh; }
.reveal .slides section .code-with-panel.r-stretch > code.hl.lean.block,
.reveal .slides section .code-with-panel.r-stretch > .panel-cell,
.reveal .slides section code.hl.lean.block.r-stretch { max-height: 68vh; overflow: auto; box-sizing: border-box; }
