/* Shared Reveal.js theme for lmstack decks. Palette tracks the docs site
   (see website/src/css/custom.css). Light theme, monospace-forward — this
   is a dev-tool deck, not a keynote. */

:root {
  --lm-bg: #ffffff;
  --lm-panel: #f5f8fa;
  --lm-fg: #0f172a;
  --lm-muted: #64748b;
  --lm-accent: #2d6f88;
  --lm-accent-strong: #1f4d5e;
  --lm-accent-soft: #e0eef4;
  --lm-rule: #e2e8f0;
}

.reveal-viewport { background: var(--lm-bg); }

.reveal {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--lm-fg);
  font-weight: 400;
}

.reveal .slides { text-align: left; }

.reveal h1, .reveal h2, .reveal h3 {
  font-family: 'JetBrains Mono', 'SF Mono', ui-monospace, monospace;
  color: var(--lm-accent-strong);
  text-transform: none;
  letter-spacing: -0.01em;
  font-weight: 600;
  margin-bottom: 0.5em;
}
.reveal h1 { font-size: 2.2em; }
.reveal h2 { font-size: 1.4em; }
.reveal h3 { font-size: 1.05em; color: var(--lm-fg); }

.reveal p, .reveal li { line-height: 1.5; }
.reveal ul, .reveal ol { margin: 0.4em 0 0.4em 1.2em; }
.reveal li { margin: 0.35em 0; }

.reveal a {
  color: var(--lm-accent);
  text-decoration: none;
  border-bottom: 1px dashed var(--lm-accent);
}
.reveal strong { color: var(--lm-accent-strong); font-weight: 600; }
.reveal em { color: var(--lm-muted); font-style: normal; }

.reveal pre {
  background: var(--lm-panel);
  border: 1px solid var(--lm-rule);
  border-radius: 4px;
  font-size: 0.55em;
  box-shadow: none;
  width: 100%;
  margin: 0.6em 0;
}
.reveal pre code {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  padding: 1em 1.2em;
  color: var(--lm-fg);
  white-space: pre;
  max-height: none;
}
.reveal code {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  color: var(--lm-accent-strong);
  background: var(--lm-accent-soft);
  padding: 0.05em 0.3em;
  border-radius: 3px;
}

.reveal blockquote {
  border-left: 3px solid var(--lm-accent);
  background: transparent;
  color: var(--lm-muted);
  padding: 0.2em 0.9em;
  box-shadow: none;
  font-style: normal;
}

.reveal .subtitle {
  color: var(--lm-muted);
  font-size: 0.85em;
  margin-top: -0.4em;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}

/* Title slide: center everything (Reveal's global center is off). */
.reveal section.title {
  text-align: center;
  height: 100%;
  display: flex !important;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.reveal section.title h1 { font-size: 3.2em; margin-bottom: 0.15em; color: var(--lm-accent-strong); }
.reveal section.title h2 {
  color: var(--lm-fg);
  font-size: 1.05em;
  font-weight: 400;
  font-family: 'Inter', system-ui, sans-serif;
  margin-bottom: 1.5em;
}
.reveal section.title .subtitle { font-size: 0.85em; }

/* Diagram slides: SVG fills the slide, minimal chrome. */
.reveal section.diagram { text-align: center; padding-top: 0; }
.reveal section.diagram h2 { font-size: 1.1em; margin-bottom: 0.3em; text-align: left; }
/* Sized in px, not vh: Reveal scales a fixed 1280x720 stage, so vh units are
   viewport-relative and let the SVG grow past the bottom of the slide.
   The wrapper <p> (markdown gives us one) is zeroed out because an inline
   image inherits the paragraph line-height and adds ~55px of baseline slack. */
.reveal section.diagram p { margin: 0; line-height: 0; }
.reveal section.diagram .stack-svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 600px;
  margin: 0 auto;
}

/* Versus slides: two stacks side by side, revealed one fragment at a time.
   The columns are deliberately unequal — the cloud stack is three boxes and
   needs no room; the local stack is the argument and gets the space. */
.reveal section.versus { text-align: center; padding-top: 0; }
.reveal section.versus h2 { font-size: 1.1em; margin-bottom: 0.5em; text-align: left; }
.reveal .versus-grid {
  display: grid;
  grid-template-columns: 1fr 1.85fr;
  gap: 2em;
  /* start, not center: the two column headings must sit on the same baseline,
     otherwise the short cloud column floats to the middle of the slide. */
  align-items: start;
}
.reveal .versus-grid .col { min-width: 0; }
.reveal .versus-grid h3 {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.6em;
  color: var(--lm-muted);
  text-transform: none;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--lm-rule);
  padding-bottom: 0.4em;
  margin: 0 0 0.8em;
}
.reveal .versus-grid img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 600px;
  margin: 0;
  border: none;
  box-shadow: none;
  background: none;
}

/* Demo slides: asciinema-player embed, sized to fit within the slide.
   One rule per player instance — see index.html, players are mounted lazily
   on slidechanged and keyed off .demo-player[data-cast]. */
/* Demo slides take the full slide, not the docs-page margin. The heading is
   trimmed so the player owns nearly the whole 1280x720 canvas — big enough
   that the terminal is legible from the back of the room even at a small
   fixed font size, with room below the controls bar so the last-frame dwell
   is not flush against the slide edge. */
.reveal section.demo { padding: 0.3em 0.4em; }
.reveal section.demo h2 { font-size: 1em; margin: 0 0 0.3em; }
.reveal .demo-player {
  /* Width is now purely a panel-size decision — the player is created with
     fit:false and its font size comes from data-font-size, so the terminal
     inside does not scale with this box. Cap at ~1240px (near the slide's
     usable width at Reveal's default margin) and let the terminal centre
     inside; per-slide max-width overrides via data-max-width still win. */
  max-width: 1240px;
  max-height: 640px;
  margin: 0 auto;
  overflow: hidden;
}

/* Problem slides: the claim, then what makes it true. */
.reveal section.problem h2 { font-size: 1.5em; margin-bottom: 0.7em; }
.reveal section.problem .kicker {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  color: var(--lm-accent-strong);
  font-weight: 600;
  border-top: 1px solid var(--lm-rule);
  padding-top: 0.6em;
  margin-top: 0.6em;
}
/* The claim + evidence + kicker has to clear 720px on its own. */
.reveal section.problem blockquote { margin-bottom: 0.6em; }
.reveal section.problem > ul { margin-bottom: 0; }
.reveal section.problem > ul li { margin-bottom: 0.35em; }

/* Two-column body, used by problem and proof slides. */
.reveal .two-up {
  display: flex;
  gap: 2.2em;
  align-items: flex-start;
}
.reveal .two-up .col { flex: 1 1 0; min-width: 0; }
.reveal .two-up h3 {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  color: var(--lm-accent-strong);
  font-size: 1em;
  border-bottom: 1px solid var(--lm-rule);
  padding-bottom: 0.35em;
  margin-bottom: 0.6em;
}
.reveal .two-up p { font-size: 0.8em; margin: 0.4em 0; }
.reveal .muted { color: var(--lm-muted); }

/* Solution slides: one lead claim, then the mechanics. */
.reveal section.solution h2 { font-size: 1.25em; margin-bottom: 0.4em; }
.reveal section.solution .lead {
  font-size: 1.05em;
  color: var(--lm-fg);
  border-left: 3px solid var(--lm-accent);
  padding-left: 0.8em;
  margin: 0 0 0.9em 0;
}
.reveal section.solution li { font-size: 0.78em; margin-bottom: 0.3em; }

/* Inline pipeline strip, for the classifier slide. */
.reveal .pipeline {
  display: flex;
  align-items: center;
  gap: 0.6em;
  flex-wrap: wrap;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.72em;
  margin: 0.4em 0 1em 0;
}
.reveal .pipeline > span {
  background: var(--lm-panel);
  border: 1px solid var(--lm-rule);
  border-radius: 4px;
  padding: 0.4em 0.8em;
}
.reveal .pipeline .arrow {
  background: transparent;
  border: none;
  color: var(--lm-accent);
  padding: 0;
}
.reveal .pipeline .hot {
  background: var(--lm-accent-soft);
  border-color: var(--lm-accent);
  color: var(--lm-accent-strong);
  font-weight: 600;
}

/* Proof slide: two screenshots side by side with captions. */
.reveal section.proof h2 { font-size: 1.3em; margin-bottom: 0.5em; }
.reveal section.proof img {
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: contain;
  border: 1px solid var(--lm-rule);
  border-radius: 4px;
  background: var(--lm-panel);
}
.reveal section.proof .cap {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.62em;
  color: var(--lm-muted);
  margin-top: 0.5em;
  text-align: center;
}

/* A repo URL under the heading, above the screenshot. Small on purpose: it is
   there so the audience can write it down, not to compete with the image. */
.reveal section.proof .repo-link {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.62em;
  margin: 0 0 0.5em;
  text-align: center;
}
.reveal section.proof .repo-link a { color: var(--lm-accent-strong); }

/* One screenshot, not two. Height is the binding constraint here, not width:
   the clawrium PR crop is 1216x660, so capping height at 470 leaves the image
   ~865px wide — still readable from the back of a room — and buys the headroom
   the repo-link line needs. At 560 the caption collided with Reveal's slide
   counter in the bottom-right corner. */
.reveal section.proof.single { text-align: center; }
.reveal section.proof.single img {
  width: auto;
  max-width: 100%;
  max-height: 470px;
  margin: 0 auto;
}

/* Definition slide: centered term with meaning + punchline.
   Background motif: anvil silhouette + embers, very low opacity. */
.reveal section.definition {
  text-align: center;
  height: 100%;
  display: flex !important;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-image: url('lmstack-forge.svg');
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}
.reveal section.definition h2 {
  font-size: 2.8em;
  margin: 0 0 0.8em 0;
  color: var(--lm-accent-strong);
}
.reveal section.definition .pos {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  color: var(--lm-muted);
  font-size: 0.9em;
  margin: 0 0 1.4em 0;
  letter-spacing: 0.02em;
}
.reveal section.definition .def {
  font-size: 1.1em;
  max-width: 22em;
  line-height: 1.55;
  color: var(--lm-fg);
  margin: 0 0 1.2em 0;
}
.reveal section.definition .def strong { color: var(--lm-accent-strong); }

.reveal section.definition .traits {
  display: flex;
  gap: 0.8em;
  margin: 0 0 1.6em 0;
  flex-wrap: wrap;
  justify-content: center;
}
.reveal section.definition .traits span {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.75em;
  color: var(--lm-accent-strong);
  background: var(--lm-accent-soft);
  padding: 0.35em 0.9em;
  border-radius: 999px;
  border: 1px solid var(--lm-accent);
  white-space: nowrap;
}
.reveal section.definition .punch {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  color: var(--lm-accent-strong);
  font-size: 0.95em;
  font-weight: 600;
  border-top: 1px solid var(--lm-rule);
  padding-top: 0.8em;
  min-width: 18em;
}
.reveal section.definition .punch .hot { color: #ea580c; }

/* Closer: QR + links, centered. */
.reveal section.closer {
  text-align: center;
  height: 100%;
  display: flex !important;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
/* nowrap keeps the equation on one line, so the size has to fit the stage:
   33 characters at 1.8em measured ~1540px against a 1280px stage and was
   clipped at both edges. 1.35em lands at ~1150px. Lengthen the title and
   this needs recomputing — check the horizontal extent, not just the bottom. */
.reveal section.closer h1 { font-size: 1.35em; margin-bottom: 0.4em; white-space: nowrap; }
.reveal section.closer img {
  max-height: 340px;
  margin: 0.4em 0;
  border: 1px solid var(--lm-rule);
  border-radius: 6px;
}
.reveal section.closer .hashtag {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.95em;
  font-weight: 600;
  color: var(--lm-accent-strong);
  letter-spacing: 0.02em;
  margin-top: 0.35em;
}
.reveal section.closer .links {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.7em;
  color: var(--lm-muted);
  margin-top: 0.4em;
}
.reveal section.closer .links a { color: var(--lm-accent); border: none; }

.reveal .progress { color: var(--lm-accent); }
.reveal .controls { color: var(--lm-accent); }
.reveal .slide-number {
  color: var(--lm-muted);
  background: transparent;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}
