:root {
  --bg: #f6f8fb;
  --bg-2: #eaf0f7;
  --panel: #ffffff;
  --panel-soft: #f0f4f9;
  --surface-glass: rgba(255, 255, 255, 0.72);
  --ink: #172033;
  --muted: #536174;
  --line: #c7d2df;
  --rule: var(--line);
  --accent: #006d92;
  --accent-soft: #e0f2fe;
  --accent-2: #9a5b00;
  --ok: #16724a;
  --green: var(--ok);
  --green-bg: #e7f7ee;
  --warn: #a75c00;
  --orange: var(--warn);
  --orange-bg: #fff4df;
  --bad: #b42318;
  --purple: #7657c9;
  --purple-bg: #f1edff;
  --code-bg: #fbfcfe;
  --code-border: #c5d0dd;
  --button-bg: #f4f7fb;
  --tag-immediate-bg: #fff4df;
  --tag-immediate-ink: #9a5b00;
  --tag-header-bg: #f1edff;
  --tag-header-border: #a78bfa;
  --heap: #f97316;
  --stack: #0b7fab;
  --mode: #7657c9;
  --syntax-keyword: #9a4d00;
  --syntax-module: #006d92;
  --syntax-string: #236c3b;
  --syntax-comment: #6a7787;
  --syntax-number: #875f00;
  --syntax-operator: #516173;
  --syntax-function: #006d92;
  --syntax-type: #7a3d9a;
  --syntax-constructor: #8b5b00;
  --syntax-annotation: #9a4d00;
  --syntax-label: #8152a3;
  --oxcaml-color-scheme: light;
  --oxcaml-bg: var(--panel);
  --oxcaml-ink: var(--ink);
  --oxcaml-muted: var(--muted);
  --oxcaml-border: var(--line);
  --oxcaml-editor: var(--code-bg);
  --oxcaml-editor-ink: #1d2733;
  --oxcaml-editor-gutter: #edf2f7;
  --oxcaml-editor-gutter-ink: #687586;
  --oxcaml-editor-gutter-border: #d8e1eb;
  --oxcaml-output-bg: #eef4f8;
  --oxcaml-output-border: #c7d2df;
  --oxcaml-interface-bg: #dff4ea;
  --oxcaml-interface-ink: #123a28;
  --oxcaml-stream: #243142;
  --oxcaml-code: #2e4053;
  --oxcaml-detail: #526274;
  --oxcaml-prefix: #718095;
}

.section-slide {
  --bg: #0b1020;
  --bg-2: #111827;
  --panel: rgba(17, 24, 39, 0.78);
  --panel-soft: #111827;
  --surface-glass: rgba(17, 24, 39, 0.78);
  --ink: #f7f8fb;
  --muted: #aeb7c8;
  --line: #334155;
  --rule: var(--line);
  --accent: #70e1ff;
  --accent-soft: rgba(112, 225, 255, 0.16);
  --accent-2: #ffd166;
  --ok: #7ee787;
  --green: var(--ok);
  --green-bg: rgba(126, 231, 135, 0.12);
  --warn: #ffb86b;
  --orange: var(--warn);
  --orange-bg: rgba(255, 184, 107, 0.14);
  --bad: #ff6b6b;
  --purple: #b794f4;
  --purple-bg: rgba(183, 148, 244, 0.14);
  --code-bg: #080d18;
  --code-border: #243044;
  --button-bg: #0f172a;
  --tag-immediate-bg: rgba(255, 209, 102, 0.16);
  --tag-immediate-ink: #ffd166;
  --tag-header-bg: rgba(183, 148, 244, 0.14);
  --tag-header-border: rgba(183, 148, 244, 0.42);
}

body {
  background: var(--bg);
}

.reveal-viewport,
.reveal,
.reveal .backgrounds,
.reveal .slides,
.reveal .slide {
  background: var(--bg);
}

.reveal {
  color: var(--ink);
  font-family: Avenir Next, Segoe UI, system-ui, sans-serif;
}

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

.reveal .slide {
  box-sizing: border-box;
  height: 100%;
  padding: 50px 68px;
}

.reveal h1,
.reveal h2,
.reveal h3,
.reveal p,
.reveal li {
  letter-spacing: 0;
}

.reveal h1 {
  color: var(--ink);
  max-width: 820px;
  font-size: 54px;
  line-height: 1.02;
}

.reveal h2 {
  color: var(--ink);
  margin: 0 0 28px;
  font-size: 38px;
  line-height: 1.08;
}

.reveal h3 {
  margin: 0 0 14px;
  font-size: 25px;
  line-height: 1.12;
  color: var(--accent);
}

.reveal p,
.reveal li {
  font-size: 22px;
  line-height: 1.35;
}

.reveal code,
.reveal pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.reveal pre {
  width: 100%;
  margin: 0;
  border: 1px solid var(--code-border);
  border-radius: 8px;
  background: var(--code-bg);
  box-shadow: none;
  overflow: hidden;
}

.reveal pre code {
  display: block;
  color: var(--ink);
  max-height: none;
  padding: 16px 18px;
  font-size: 17px;
  line-height: 1.32;
  text-align: left;
  text-indent: 0;
  white-space: pre;
}

.reveal :not(pre) > code {
  padding: 0.06em 0.22em;
  border-radius: 5px;
  background: var(--panel-soft);
  color: var(--ink);
}

.reveal pre code .tok-keyword {
  color: var(--syntax-keyword);
  font-weight: 700;
}

.reveal pre code .tok-constructor {
  color: var(--syntax-constructor);
}

.reveal pre code .tok-string {
  color: var(--syntax-string);
}

.reveal pre code .tok-comment {
  color: var(--syntax-comment);
  font-style: italic;
}

.reveal pre code .tok-number {
  color: var(--syntax-number);
}

.reveal pre code .tok-operator {
  color: var(--syntax-operator);
}

.reveal pre code .tok-type {
  color: var(--syntax-type);
}

.title-lockup {
  display: grid;
  grid-template-columns: minmax(0, 690px) 440px;
  align-items: center;
  justify-content: space-between;
  gap: 72px;
  min-height: 100%;
}

.title-slide .eyebrow {
  color: var(--accent);
}

.title-slide h1 {
  max-width: 730px;
  font-size: 58px;
}

.title-slide .lede {
  max-width: 640px;
  font-size: 25px;
}

.title-mark {
  display: block;
  width: 440px;
  height: 440px;
  transform: translateX(-34px);
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(23, 32, 51, 0.16);
}

.oxcaml-closing-slide .closing-tagline {
  margin: -10px 0 28px;
  color: var(--muted);
  font-size: 30px;
  font-weight: 650;
}

.oxcaml-closing-slide .closing-mark {
  display: block;
  width: 260px;
  height: 260px;
  margin: 34px auto 0;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 18px 44px rgba(23, 32, 51, 0.16);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 24px;
  font-weight: 700;
  text-transform: uppercase;
}

.lede {
  max-width: 700px;
  color: var(--muted);
  font-size: 24px;
}

.route {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.route li {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) minmax(0, 420px);
  align-items: baseline;
  gap: 28px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.route span {
  color: var(--accent-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.route em {
  color: var(--muted);
  font-style: normal;
}

.language-map-slide {
  display: flex !important;
  flex-direction: column;
}

.language-map {
  position: relative;
  display: grid;
  grid-template-columns: 140px repeat(2, minmax(0, 1fr));
  grid-template-rows: 104px repeat(2, minmax(0, 1fr));
  flex: 1 1 auto;
  gap: 0;
  min-height: 0;
  margin-top: 18px;
  border: 0;
  border-radius: 8px;
  overflow: visible;
  background: transparent;
}

.language-map > * {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.language-map > :nth-child(3n) {
  border-right: 0;
}

.language-map > :nth-last-child(-n + 3) {
  border-bottom: 0;
}

.language-map .systems-axis,
.language-map .unsafe-systems,
.language-map .safe-systems {
  border-right: 1px solid var(--line);
}

.language-map .safe-axis,
.language-map .safe-managed,
.language-map .safe-systems {
  border-bottom: 1px solid var(--line);
}

.language-map .managed-axis,
.language-map .systems-axis,
.language-map .unsafe-axis {
  border-top: 1px solid var(--line);
}

.language-map .managed-axis,
.language-map .unsafe-axis,
.language-map .safe-axis {
  border-left: 1px solid var(--line);
}

.language-map-corner,
.language-map-axis {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 4px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 750;
  text-align: center;
}

.language-map-corner {
  border: 0;
  background: transparent;
}

.language-map-axis {
  padding: 14px;
  font-size: 24px;
  line-height: 1.15;
}

.language-map-axis span {
  display: block;
  max-width: 390px;
  color: var(--muted);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.15;
}

.language-map .unsafe-axis,
.language-map .safe-axis {
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 26px;
}

.language-map .unsafe-axis span,
.language-map .safe-axis span {
  max-width: 118px;
  font-size: 17px;
}

.language-cell {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 10px;
  padding: 26px;
  text-align: center;
}

.language-cell strong,
.oxcaml-expansion strong {
  color: var(--ink);
  font-size: 46px;
  line-height: 1;
}

.language-cell span,
.oxcaml-expansion span {
  color: var(--muted);
  font-size: 22px;
  line-height: 1.2;
}

.unsafe-managed,
.unsafe-systems {
  background: color-mix(in srgb, var(--bad) 8%, var(--panel));
}

.safe-managed,
.safe-systems {
  background: color-mix(in srgb, var(--green-bg) 68%, var(--panel));
}

.oxcaml-expansion {
  position: absolute;
  grid-column: 2 / 4;
  grid-row: 3 / 4;
  inset: 0;
  width: auto;
  height: auto;
  align-self: stretch;
  justify-self: stretch;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 12px;
  padding: 24px;
  border: 0;
  border-bottom: 0;
  border-right: 0;
  background: color-mix(in srgb, var(--accent-soft) 82%, var(--green-bg));
  text-align: center;
  z-index: 2;
}

.reveal .slides section .fragment.oxcaml-expansion {
  clip-path: inset(0 calc(50% + 12px) 0 0);
  opacity: 0;
  transition: clip-path 0.55s ease, opacity 0.2s ease;
}

.reveal .slides section .fragment.oxcaml-expansion.visible {
  clip-path: inset(0 0 0 0);
  opacity: 1;
}

.oxcaml-expansion strong {
  color: var(--accent);
  font-size: 56px;
}

.oxcaml-expansion span {
  color: var(--ink);
  font-weight: 650;
}

.loop-grid,
.two-up,
.three-up,
.live-layout,
.lever-grid,
.failure-grid,
.word-grid,
.cost-ledger {
  display: grid;
  gap: 24px;
}

.loop-grid,
.two-up,
.live-layout,
.word-grid,
.cost-ledger {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.live-slide {
  display: flex !important;
  flex-direction: column;
}

.live-slide .live-layout {
  flex: 1 1 auto;
  min-height: 0;
}

.live-slide .live-copy,
.live-slide .live-editor-frame {
  min-height: 0;
  overflow: hidden;
}

.live-slide .live-editor-frame {
  display: flex;
  flex-direction: column;
}

.live-slide .live-editor-frame > oxcaml,
.live-slide .live-editor-frame > .course-scroll-anchor,
.live-slide .live-editor-frame > .oxcaml-embed {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.live-slide .live-editor-frame > .course-scroll-anchor > .oxcaml-embed {
  flex: 1 1 auto;
  height: 100%;
  min-height: 0;
}

.reveal .live-slide .oxcaml-embed {
  --oxcaml-editor-font-size: 0.78rem;
  --oxcaml-editor-max-height: 28rem;
  --oxcaml-output-min-height: 0;
  overflow: hidden;
}

.live-slide .oxcaml-embed__surface {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.live-slide .oxcaml-embed__editor-host {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.live-slide .oxcaml-embed__editor-host .cm-editor,
.live-slide .oxcaml-embed__editor-host .cm-scroller {
  height: 100%;
  min-height: 0;
}

.live-slide .oxcaml-embed__editor-host .cm-scroller {
  max-height: none;
}

.live-slide .oxcaml-embed__output {
  flex: 0 1 8rem;
  min-height: 0;
}

.live-slide.visual-live .side-image {
  max-height: 320px;
  object-fit: contain;
}

.function-arguments-slide .live-copy {
  display: flex;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
}

.function-arguments-slide .live-copy p {
  color: var(--ink);
  font-size: 38px;
  font-weight: 700;
  line-height: 1.18;
}

.function-arguments-slide .oxcaml-embed {
  --oxcaml-editor-max-height: 12rem;
  --oxcaml-output-font-size: 0.74rem;
}

.function-arguments-slide .oxcaml-embed__editor-host {
  flex: 0 0 auto;
}

.function-arguments-slide .oxcaml-embed__output {
  flex: 1 1 19rem;
  min-height: 19rem;
}

.closure-captures-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  align-items: center;
  gap: 48px;
  min-height: 470px;
}

.closure-captures-slide .oxcaml-embed {
  --oxcaml-editor-max-height: 12rem;
  --oxcaml-output-font-size: 0.74rem;
}

.closure-captures-slide .oxcaml-embed__editor-host {
  flex: 0 0 auto;
}

.closure-captures-slide .oxcaml-embed__output {
  flex: 1 1 19rem;
  min-height: 19rem;
}

.closure-captures-copy p {
  margin: 0;
  color: var(--ink);
  font-size: 50px;
  font-weight: 800;
  line-height: 1.12;
}

.parallel-map-exercise-slide .live-editor-frame {
  max-width: 960px;
  margin: 0 auto;
}

.parallel-map-exercise-slide .oxcaml-embed {
  --oxcaml-editor-max-height: 34rem;
}

.stack-sum-example-slide .oxcaml-embed {
  --oxcaml-output-font-size: 0.82rem;
}

.reveal .stack-sum-example-slide {
  padding-top: 42px;
  padding-bottom: 42px;
}

.stack-sum-example-slide h2 {
  margin-bottom: 10px;
  line-height: 1.18;
}

.stack-sum-example-slide .oxcaml-embed__output {
  flex: 0 0 14rem;
  min-height: 14rem;
}

.stack-sum-example-slide .oxcaml-embed .transcript {
  padding-right: 1.1rem;
}

.locality-in-action-slide .live-editor-frame {
  flex: 1 1 auto;
  min-height: 0;
}

.locality-in-action-slide .oxcaml-embed {
  --oxcaml-editor-max-height: 32rem;
}

.value-location-diagram {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 28px;
  margin-top: 18px;
}

.value-location-zone {
  display: grid;
  grid-template-rows: auto minmax(280px, 1fr) auto;
  gap: 18px;
  min-height: 440px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.value-location-zone h3 {
  margin: 0;
  color: var(--accent);
  font-size: 29px;
  line-height: 1.12;
}

.value-location-zone p {
  margin: 0;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.22;
}

.value-location-zone:not(.allocation-stack-zone) > .heap-field {
  grid-row: 2;
}

.value-location-zone:not(.allocation-stack-zone) > p {
  grid-row: 3;
}

.value-location-zone:not(.allocation-stack-zone) > .gc-phase-copy {
  position: relative;
  grid-row: 3;
  min-height: 58px;
}

.gc-phase-copy p {
  margin: 0;
}

.gc-phase-copy:has(.fragment.visible) > p:first-child {
  opacity: 0;
}

.gc-phase-copy p.fragment {
  position: absolute;
  inset: 0 auto auto 0;
}

.gc-pause-message {
  display: inline-grid;
  align-items: center;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid color-mix(in srgb, var(--bad) 34%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, #fff1f0 72%, var(--panel));
  color: var(--bad) !important;
  font-weight: 750;
}

.allocation-phase-copy {
  position: relative;
  min-height: 58px;
}

.allocation-phase-copy p {
  margin: 0;
}

.allocation-phase-copy:has(.fragment.visible) > p:first-child {
  opacity: 0;
}

.allocation-phase-copy p.fragment {
  position: absolute;
  inset: 0 auto auto 0;
}

.allocation-stack-note {
  margin-top: 4px !important;
  color: color-mix(in srgb, var(--accent-2) 72%, var(--muted)) !important;
  font-size: 15px !important;
  font-weight: 650;
  line-height: 1.15 !important;
}

.region-dealloc-message {
  display: inline-grid;
  align-items: center;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid color-mix(in srgb, var(--accent-2) 42%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--orange-bg) 78%, var(--panel));
  color: var(--accent-2) !important;
  font-weight: 750;
}

.value-location-badge {
  display: inline-grid;
  position: absolute;
  top: 28px;
  right: 28px;
  margin: 0;
  padding: 7px 12px;
  border: 1px solid color-mix(in srgb, var(--accent-2) 42%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--orange-bg) 70%, var(--panel));
  color: var(--accent-2) !important;
  font-size: 17px !important;
  font-weight: 750;
  line-height: 1;
}

.register-bank,
.stack-tower,
.region-tower,
.heap-field {
  min-height: 0;
}

.register-bank {
  display: grid;
  align-content: center;
  gap: 12px;
}

.register-bank span {
  display: block;
  padding: 10px 12px;
  border: 2px solid color-mix(in srgb, var(--purple) 42%, var(--line));
  border-radius: 6px;
  background: var(--purple-bg);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 22px;
  font-weight: 700;
  text-align: center;
}

.stack-tower,
.region-tower {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-start;
  gap: 8px;
  padding: 16px 14px;
  border: 2px solid color-mix(in srgb, var(--stack) 35%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent-soft) 62%, var(--panel));
}

.stack-tower span {
  display: grid;
  place-items: center;
  min-height: 54px;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--stack) 40%, var(--line));
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
  font-size: 18px;
  font-weight: 650;
  text-align: center;
}

.heap-field {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: center;
  gap: 16px;
  padding: 24px;
  border: 2px solid color-mix(in srgb, var(--ok) 34%, var(--line));
  border-radius: 16px;
  background: color-mix(in srgb, var(--green-bg) 62%, var(--panel));
}

.heap-object {
  display: grid;
  place-items: center;
  min-height: 58px;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--ok) 34%, var(--line));
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink);
  font-size: 18px;
  font-weight: 650;
  text-align: center;
  transition:
    opacity 420ms ease,
    transform 420ms ease,
    border-color 280ms ease,
    background-color 280ms ease,
    color 280ms ease;
}

.heap-object.visible {
  opacity: 1;
}

.gc-scan-trigger,
.gc-sweep-trigger {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.gc-scan-trigger.visible::before {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  top: 16px;
  height: 32px;
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--accent) 22%, transparent),
    transparent
  );
  animation: gc-scan-pass 900ms ease-out both;
}

.heap-field:has(.gc-scan-trigger.visible) .heap-object.is-live {
  border-color: color-mix(in srgb, var(--ok) 70%, var(--line));
  background: color-mix(in srgb, var(--green-bg) 78%, var(--panel));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 18%, transparent);
}

.heap-field:has(.gc-scan-trigger.visible) .heap-object.is-garbage {
  border-color: color-mix(in srgb, var(--bad) 55%, var(--line));
  background: color-mix(in srgb, #fff1f0 60%, var(--panel));
  color: color-mix(in srgb, var(--bad) 74%, var(--ink));
}

.heap-field:has(.gc-sweep-trigger.visible) .heap-object.is-garbage {
  opacity: 0;
  transform: scale(0.72);
}

.heap-field:has(.gc-sweep-trigger.visible) .heap-object.is-live {
  transform: translateY(-2px);
}

@keyframes gc-scan-pass {
  from {
    transform: translateY(0);
    opacity: 0;
  }
  18% {
    opacity: 1;
  }
  to {
    transform: translateY(222px);
    opacity: 0;
  }
}

.allocation-stack-zone {
  display: block;
  min-height: 0;
  overflow: visible;
  padding: 0;
  border: 0;
  background: transparent;
}

.allocation-stack-zone h3 {
  padding-right: 170px;
  color: var(--accent-2);
}

.allocation-stack-zone .value-location-card {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(280px, 1fr) auto;
  gap: 18px;
  box-sizing: border-box;
  height: 100%;
  min-height: 440px;
  padding: 28px;
  border: 1px solid color-mix(in srgb, var(--accent-2) 46%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--orange-bg) 42%, var(--panel));
}

.allocation-stack-zone .region-tower {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 0;
  padding: 22px 24px 0;
  border-color: color-mix(in srgb, var(--accent-2) 50%, var(--line));
  background: color-mix(in srgb, var(--orange-bg) 70%, var(--panel));
}

.allocation-region {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 16px;
  justify-self: stretch;
  align-self: stretch;
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
  min-height: 0;
  padding-top: 14px;
}

.allocation-region::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 0;
  border-top: 2px solid color-mix(in srgb, var(--accent-2) 44%, var(--line));
  pointer-events: none;
}

.allocation-region::after {
  content: attr(data-region);
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 1;
  transform: translate(-50%, -50%);
  padding: 0 8px;
  background: color-mix(in srgb, var(--orange-bg) 70%, var(--panel));
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 750;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.allocation-region span {
  display: grid;
  place-items: center;
  position: relative;
  z-index: 2;
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
  min-height: 58px;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--accent-2) 34%, var(--line));
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink);
  font-size: 18px;
  font-weight: 650;
  line-height: 1.1;
  text-align: center;
}

.region-drop-c-trigger,
.region-drop-b-trigger {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.region-tower:has(.region-drop-c-trigger.visible) .allocation-region[data-region="region C"],
.region-tower:has(.region-drop-b-trigger.visible) .allocation-region[data-region="region B"] {
  opacity: 0 !important;
  transform: translateY(8px) scale(0.96);
  transition:
    opacity 420ms ease,
    transform 420ms ease;
}

.region-tower:has(.region-drop-c-trigger.visible)::after,
.region-tower:has(.region-drop-b-trigger.visible)::before {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 0;
  height: calc(100% / 3);
  border-radius: 0 0 8px 8px;
  background: linear-gradient(
    180deg,
    transparent,
    color-mix(in srgb, var(--orange-bg) 82%, var(--panel))
  );
  pointer-events: none;
}

.region-tower:has(.region-drop-b-trigger.visible)::before {
  bottom: calc(100% / 3);
  border-radius: 0;
}

.region-compile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px minmax(0, 1.18fr);
  gap: 18px;
  align-items: center;
}

.allocation-stack-management-slide h2 {
  padding-bottom: 4px;
  line-height: 1.2;
}

.allocation-stack-overview-slide h2 {
  margin-bottom: 12px;
}

.allocation-stack-overview-slide .region-compile-grid {
  margin-top: 27px;
}

.allocation-stack-subtitle {
  max-width: 980px;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 24px;
  line-height: 1.28;
}

.region-compile-grid article {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.region-compile-grid h3 {
  margin-bottom: 12px;
}

.region-compile-grid pre code {
  padding: 14px 16px;
  font-size: 18px;
  line-height: 1.32;
}

.region-compile-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  color: var(--accent);
  font-size: 22px;
  font-weight: 760;
  line-height: 1.22;
  text-align: center;
  text-transform: uppercase;
}

.region-pointer-note {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: -4px 0 0;
}

.region-pointer-note p {
  margin: 0;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.22;
}

.region-pointer-note code {
  color: var(--accent-2);
  font-weight: 750;
}

.region-tail-message {
  grid-column: 1 / -1;
  margin: -4px 0 0;
  color: var(--accent-2);
  font-size: 24px;
  font-weight: 760;
  line-height: 1.18;
  text-align: center;
}

.region-lowered-card pre {
  border-color: rgba(0, 109, 146, 0.34);
  background: var(--accent-soft);
}

.no-region-card pre {
  border-color: rgba(22, 114, 74, 0.34);
  background: var(--green-bg);
}

.mid-exclave-grid {
  grid-template-rows: auto auto;
}

.region-compile-note {
  grid-column: 1 / -1;
  padding: 20px 24px;
  border: 1px solid rgba(154, 91, 0, 0.32);
  border-radius: 8px;
  background: var(--orange-bg);
}

.region-compile-note p {
  margin: 0;
  color: var(--ink);
  font-size: 23px;
}

.region-compile-note p + p {
  margin-top: 8px;
}

.function-exclave-slide .exclave-boundary-code {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--code-bg);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 17px;
  line-height: 1.28;
  overflow: hidden;
}

.function-exclave-slide .exclave-boundary-code .code-line {
  white-space: nowrap;
}

.function-exclave-slide .exclave-keyword-line {
  color: var(--accent);
  font-weight: 760;
}

.function-exclave-slide .tok-comment {
  color: var(--syntax-comment);
  font-style: italic;
}

.heap-allocation-sign-slide {
  display: flex !important;
  flex-direction: column;
  justify-content: center;
}

.heap-allocation-sign-slide h2 {
  max-width: 880px;
  margin-bottom: 42px;
  font-size: 66px;
  line-height: 1;
}

.heap-allocation-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.heap-allocation-panels article {
  min-height: 260px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.heap-allocation-panels p {
  margin: 0;
  color: var(--ink);
  font-size: 42px;
  font-weight: 760;
  line-height: 1.12;
}

.heap-allocation-panels span {
  display: block;
  margin-bottom: 22px;
  color: var(--accent);
  font-size: 24px;
  font-weight: 780;
  text-transform: uppercase;
}

.fresh-buffer-slide .oxcaml-embed,
.buffer-bug-slide .oxcaml-embed {
  --oxcaml-editor-max-height: 36rem;
}

.fresh-buffer-slide .live-layout,
.buffer-bug-slide .live-layout {
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr);
}

.hidden-capture-slide .live-layout {
  grid-template-columns: minmax(0, 0.62fr) minmax(0, 1.38fr);
}

.hidden-capture-slide .live-copy {
  padding: 22px;
}

.hidden-capture-slide .live-copy p {
  font-size: 21px;
  line-height: 1.25;
}

.buffer-bug-slide .oxcaml-embed__output {
  flex-basis: 13rem;
  min-height: 13rem;
}

.fresh-buffer-slide .illustration-only,
.buffer-bug-slide .illustration-only {
  display: flex;
  align-items: center;
}

.fresh-buffer-slide .illustration-only .side-image,
.buffer-bug-slide .illustration-only .side-image {
  max-height: 520px;
  border: 0;
  border-radius: 0;
}

.three-up,
.lever-grid,
.failure-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.loop-step,
.two-up article,
.three-up article,
.lever-grid article,
.failure-grid article,
.cost-ledger article,
.word-grid article,
.live-copy,
.live-editor-frame,
.state-widget,
.annotation-card,
.signature-card,
.checklist {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.loop-step {
  min-height: 190px;
  padding: 28px;
}

.loop-step strong {
  display: block;
  margin-bottom: 16px;
  color: var(--accent);
  font-size: 34px;
}

.loop-step span {
  color: var(--muted);
  font-size: 25px;
}

.two-up article,
.three-up article,
.lever-grid article,
.failure-grid article,
.cost-ledger article,
.word-grid article,
.live-copy,
.live-editor-frame,
.annotation-card,
.signature-card,
.checklist {
  padding: 28px;
}

.two-up p,
.three-up p,
.lever-grid p,
.failure-grid p,
.cost-ledger p,
.word-grid p,
.live-copy p,
.live-copy li {
  color: var(--muted);
  font-size: 23px;
}

.live-slide .live-editor-frame {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
}

.two-up article > pre,
.three-up article > pre,
.cost-ledger article > pre,
.word-grid article > pre {
  margin: 18px 0;
}

.two-up article > pre:last-child,
.three-up article > pre:last-child,
.cost-ledger article > pre:last-child,
.word-grid article > pre:last-child {
  margin-bottom: 0;
}

.two-up article > pre + p,
.three-up article > pre + p,
.cost-ledger article > pre + p,
.word-grid article > pre + p {
  margin-top: 18px;
}

.locality-rules-slide .three-up article {
  padding: 20px;
}

.locality-rules-slide p code {
  white-space: nowrap !important;
}

.ocaml-great-slide .ocaml-great-layout,
.ocaml-limitations-slide .ocaml-limitations-layout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.ocaml-great-slide .ocaml-great-layout article,
.ocaml-limitations-slide .ocaml-limitations-layout article {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 245px;
  padding: 28px 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.ocaml-great-slide .ocaml-great-layout h3,
.ocaml-limitations-slide .ocaml-limitations-layout h3 {
  margin: 0;
  color: var(--accent);
  font-size: 28px;
  min-height: 68px;
}

.ocaml-great-slide .ocaml-great-layout p,
.ocaml-limitations-slide .ocaml-limitations-layout p {
  color: var(--muted);
  font-size: 25px;
  line-height: 1.28;
}

.optimization-module-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 14px;
}

.optimization-module-row p {
  margin: 0;
  color: var(--accent-2);
  font-size: 22px;
  font-weight: 700;
  text-align: center;
}

.mode-rules-slide .mode-rules-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.locality-propagation-slide .mode-rules-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mode-rules-slide .mode-rule-card {
  display: grid;
  align-content: start;
  gap: 18px;
  min-height: 360px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.mode-rules-slide .mode-rule-card h3 {
  margin-bottom: 0;
}

.mode-rules-slide .mode-rule-card p {
  margin: 0;
  color: var(--muted);
  font-size: 21px;
}

.mode-rules-slide .mode-rule-card pre {
  margin: 0;
}

.mode-rules-slide .mode-rule-card pre code {
  padding: 14px 16px;
  font-size: 17px;
  line-height: 1.35;
}

.mode-rules-slide .mode-rule-focus {
  border-color: color-mix(in srgb, var(--mode) 42%, var(--line));
  background: color-mix(in srgb, var(--purple-bg) 52%, var(--panel));
}

.modality-solution-slide .mode-rules-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.modality-solution-slide .mode-rule-card {
  padding: 20px;
}

.modality-solution-slide .mode-rule-card pre code {
  padding: 12px;
}

.section-slide {
  display: flex !important;
  flex-direction: column;
  justify-content: center;
}

.section-slide h1 {
  margin-bottom: 36px;
}

.goal-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 34px;
  max-width: 1260px;
  margin: 0;
  padding-left: 1.1em;
}

.goal-list li {
  color: var(--muted);
}

.side-image {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.level-mark {
  display: inline-flex;
  align-items: center;
  margin-right: 12px;
  padding: 5px 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  vertical-align: 0.18em;
}

.level-ladder {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.level-ladder article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "num title"
    "copy copy";
  column-gap: 12px;
  row-gap: 8px;
  min-height: 128px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.level-ladder span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  grid-area: num;
  width: 34px;
  height: 34px;
  margin-bottom: 0;
  border-radius: 50%;
  background: var(--accent);
  color: var(--panel);
  font-size: 19px;
  font-weight: 800;
  line-height: 1;
}

.level-ladder strong {
  display: block;
  grid-area: title;
  color: var(--accent);
  font-size: 21px;
  line-height: 1.12;
}

.level-ladder p {
  grid-area: copy;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.25;
}

.level-ladder code {
  white-space: nowrap;
}

.bad,
.bad-card {
  border-color: color-mix(in srgb, var(--bad) 55%, var(--line)) !important;
}

.ok-card {
  border-color: color-mix(in srgb, var(--ok) 55%, var(--line)) !important;
}

.caption {
  margin-top: 20px;
  color: var(--muted);
  font-size: 22px !important;
}

.takeaway {
  margin-top: 34px;
  color: var(--accent-2);
  font-weight: 650;
}

.data-race-explainer-slide {
  display: flex !important;
  align-items: center;
  justify-content: center;
}

.data-race-explainer-slide .data-race-intro {
  max-width: 1060px;
  margin-inline: auto;
  color: var(--ink);
  font-size: 54px;
  font-weight: 750;
  line-height: 1.16;
  text-align: center;
}

.data-race-explainer-slide .data-race-intro em {
  font-style: italic;
}

.compiler-race-slide .oxcaml-embed {
  --oxcaml-editor-font-size: 0.78rem;
  --oxcaml-output-font-size: 0.74rem;
}

.compiler-race-slide .oxcaml-embed__output {
  min-height: 15rem;
}

.race-check-summary-slide .two-up article {
  padding: 0;
  border: 0;
  background: transparent;
}

.annotated-code {
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--code-bg);
  overflow: hidden;
}

.annotated-code pre {
  margin: 0;
  border: 0;
  background: transparent;
}

.annotated-code pre code {
  padding: 20px 22px;
  color: var(--code-ink);
  font-size: 16px;
  line-height: 1.3;
  white-space: pre;
}

.rule-summary {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.rule-summary li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  color: var(--ink);
  font-size: 24px;
  font-weight: 650;
}

.contention-boundary-slide .boundary-code-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.contention-boundary-slide .boundary-code-grid article {
  min-width: 0;
}

.list-iter-boundary-slide .single-boundary-code {
  max-width: 820px;
  margin: 0 auto;
}

.contention-boundary-slide h3 {
  margin-bottom: 14px;
  font-size: 27px;
}

.contention-boundary-slide .boundary-reason {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 21px;
  line-height: 1.25;
}

.contention-boundary-slide .boundary-signature {
  width: fit-content;
  max-width: 100%;
  margin: 26px 0 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--code-bg);
  color: var(--ink);
  font-size: 20px;
  line-height: 1.35;
}

.contention-boundary-slide .boundary-signature code {
  white-space: pre;
}

.shareable-capture-slide {
  --shareable: #00695c;
  --shareable-soft: rgba(0, 105, 92, 0.1);
  --shareable-border: rgba(0, 105, 92, 0.36);
  --portable: #6a1b9a;
  --portable-soft: rgba(106, 27, 154, 0.1);
  --portable-border: rgba(106, 27, 154, 0.36);
  --tok-kw: var(--syntax-keyword);
  --tok-type: var(--syntax-type);
  --tok-mode: var(--mode);
  --tok-fn: var(--syntax-function);
  --tok-num: var(--syntax-number);
  --red: var(--bad);
  --red-bg: color-mix(in srgb, var(--bad) 12%, transparent);
}

.portable-capture-slide {
  --shareable: #00695c;
  --shareable-soft: rgba(0, 105, 92, 0.1);
  --shareable-border: rgba(0, 105, 92, 0.36);
  --portable: #6a1b9a;
  --portable-soft: rgba(106, 27, 154, 0.1);
  --portable-border: rgba(106, 27, 154, 0.36);
}

.shareable-capture-slide h2 {
  margin-bottom: 14px;
}

.shareable-capture-slide .capture-card {
  max-width: 1120px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 42px rgba(23, 32, 51, 0.08);
}

.shareable-capture-slide .capture-card-header {
  display: grid;
  gap: 4px;
  padding: 10px 14px 8px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-soft);
}

.shareable-capture-slide .capture-card-header h3 {
  margin: 0;
  color: var(--shareable);
  font-size: 25px;
}

.shareable-capture-slide .capture-legend {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.25;
}

.shareable-capture-slide .capture-code {
  position: relative;
  padding: 12px 14px 14px;
}

.shareable-capture-slide .capture-overlay {
  position: absolute;
  inset: 12px 14px 14px;
  width: calc(100% - 28px);
  height: calc(100% - 26px);
  pointer-events: none;
  overflow: visible;
  z-index: 0;
}

.shareable-capture-slide .capture-overlay path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  opacity: 0.95;
}

.shareable-capture-slide .capture-code-body {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
}

.shareable-capture-slide .capture-code-block {
  display: grid;
  gap: 5px;
}

.shareable-capture-slide .capture-code-block.outer {
  padding-bottom: 4px;
}

.shareable-capture-slide .capture-code-block.api-call {
  padding-top: 1px;
}

.shareable-capture-slide .capture-line,
.shareable-capture-slide .capture-import-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: baseline;
}

.shareable-capture-slide .capture-line.is-capture-hover,
.shareable-capture-slide .capture-import-row.is-capture-hover {
  background: color-mix(in srgb, var(--panel-soft) 86%, transparent);
  border-radius: 6px;
}

.shareable-capture-slide .capture-line.is-capture-hover .capture-src,
.shareable-capture-slide .capture-import-row.is-capture-hover .capture-src {
  font-weight: 650;
}

.shareable-capture-slide .capture-src {
  display: block;
  min-width: 0;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.25;
  white-space: pre-wrap;
}

.shareable-capture-slide .capture-src.indent-1 {
  padding-left: 2ch;
}

.shareable-capture-slide .capture-src.indent-2 {
  padding-left: 4ch;
}

.shareable-capture-slide .capture-note {
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.25;
  white-space: nowrap;
}

.shareable-capture-slide .capture-note.good {
  color: var(--ok);
  background: var(--green-bg);
  border-color: color-mix(in srgb, var(--ok) 35%, var(--line));
}

.shareable-capture-slide .capture-note.warn {
  color: var(--warn);
  background: var(--orange-bg);
  border-color: color-mix(in srgb, var(--warn) 35%, var(--line));
}

.shareable-capture-slide .capture-note.bad {
  color: var(--bad);
  background: color-mix(in srgb, var(--bad) 12%, transparent);
  border-color: color-mix(in srgb, var(--bad) 35%, var(--line));
}

.shareable-capture-slide .capture-line.is-capture-hover .capture-note,
.shareable-capture-slide .capture-import-row.is-capture-hover .capture-note {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 24%, transparent);
  filter: brightness(0.98);
}

.shareable-capture-slide .capture-closure-box {
  position: relative;
  margin-left: 2ch;
  border: 1px dashed var(--line);
  border-radius: 8px;
  overflow: visible;
}

.shareable-capture-slide .capture-closure-box.shareable {
  border-color: var(--shareable-border);
}

.shareable-capture-slide .capture-closure-box.portable {
  border-color: var(--portable-border);
}

.shareable-capture-slide .capture-closure-box.is-linked-hover {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 28%, transparent);
}

.shareable-capture-slide .capture-closure-title {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 9px 5px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
  white-space: nowrap;
  transform: translate(-50%, -50%);
}

.shareable-capture-slide .capture-closure-title.shareable {
  background: var(--shareable-soft);
  color: var(--shareable);
  border-color: var(--shareable-border);
}

.shareable-capture-slide .capture-closure-title.portable {
  background: var(--portable-soft);
  color: var(--portable);
  border-color: var(--portable-border);
}

.shareable-capture-slide .capture-closure-title.is-linked-hover {
  filter: brightness(0.96);
}

.shareable-capture-slide .capture-closure-content {
  display: grid;
  gap: 5px;
  padding: 10px 10px 7px 12px;
}

.shareable-capture-slide .capture-import-list {
  display: grid;
  gap: 5px;
}

.shareable-capture-slide .capture-import-row.invalid .capture-src.capture-target {
  position: relative;
  justify-self: start;
  color: var(--muted);
}

.shareable-capture-slide .capture-import-row.invalid .capture-src.capture-target::after {
  position: absolute;
  top: 58%;
  left: 3.8ch;
  right: -0.15ch;
  height: 2px;
  content: "";
  background: color-mix(in srgb, var(--bad) 48%, transparent);
  transform: rotate(-2deg);
}

.shareable-capture-slide .tok-kw {
  color: var(--tok-kw);
}

.shareable-capture-slide .tok-type {
  color: var(--tok-type);
}

.shareable-capture-slide .tok-mode {
  color: var(--tok-mode);
}

.shareable-capture-slide .tok-mode.link-shareable {
  color: var(--shareable);
  font-weight: 700;
}

.shareable-capture-slide .tok-mode.link-portable {
  color: var(--portable, var(--shareable));
  font-weight: 700;
}

.shareable-capture-slide .tok-mode.is-linked-hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}

.shareable-capture-slide .tok-fn {
  color: var(--tok-fn);
}

.shareable-capture-slide .tok-num {
  color: var(--tok-num);
}

.closure-boundary-code {
  display: grid;
  gap: 6px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--code-bg);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  line-height: 1.3;
  overflow: hidden;
}

.closure-boundary-code .tok-keyword {
  color: var(--syntax-keyword);
  font-weight: 700;
}

.closure-boundary-code .tok-type {
  color: var(--syntax-type);
}

.closure-boundary-code .tok-comment {
  color: var(--syntax-comment);
  font-style: italic;
}

.code-line {
  white-space: nowrap;
}

.code-line.indent-1 {
  padding-left: 2ch;
}

.after-boundary {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}

.closure-argument {
  display: grid;
  grid-template-columns: auto minmax(0, max-content) auto;
  align-items: end;
  justify-content: start;
  max-width: 100%;
  margin: 3px 0 3px 2ch;
}

.closure-paren {
  align-self: start;
  padding-top: 9px;
  margin-right: -0.1ch;
  white-space: nowrap;
}

.closure-paren.close {
  align-self: end;
  margin-right: 0;
  margin-left: -0.3ch;
  padding-top: 0;
  padding-bottom: 9px;
}

.closure-frame {
  position: relative;
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.closure-frame.shared {
  border-color: color-mix(in srgb, var(--purple) 28%, transparent);
  background: color-mix(in srgb, var(--purple-bg) 52%, transparent);
}

.closure-frame.contended {
  border-color: color-mix(in srgb, var(--orange) 28%, transparent);
  background: color-mix(in srgb, var(--orange-bg) 56%, transparent);
}

.closure-frame.uncontended {
  border-color: color-mix(in srgb, var(--green) 28%, transparent);
  background: color-mix(in srgb, var(--green-bg) 56%, transparent);
}

.closure-header {
  min-width: 0;
  padding-right: 17ch;
  white-space: nowrap;
}

.closure-title {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 3px 8px 4px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-family: Avenir Next, Segoe UI, system-ui, sans-serif;
  font-size: 11px;
  font-weight: 750;
  line-height: 1;
  text-transform: uppercase;
}

.closure-title.shared {
  color: var(--purple);
}

.closure-title.contended {
  color: var(--orange);
}

.closure-title.uncontended {
  color: var(--green);
}

.mode-use {
  display: inline-block;
  padding: 0 0.25ch;
  border-radius: 4px;
  font-weight: 700;
}

.mode-use.uncontended {
  color: var(--green);
  background: color-mix(in srgb, var(--green-bg) 70%, transparent);
}

.line-mode-label {
  display: inline-block;
  margin-left: 1ch;
  padding: 3px 8px 4px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-family: Avenir Next, Segoe UI, system-ui, sans-serif;
  font-size: 11px;
  font-weight: 750;
  line-height: 1;
  text-transform: uppercase;
  vertical-align: 0.08em;
}

.line-mode-label.uncontended {
  color: var(--green);
  background: color-mix(in srgb, var(--green-bg) 70%, transparent);
}

.mode-use.shared {
  color: var(--purple);
  background: color-mix(in srgb, var(--purple-bg) 85%, transparent);
}

.mode-use.contended {
  color: var(--orange);
  background: color-mix(in srgb, var(--orange-bg) 85%, transparent);
}

.denied {
  position: relative;
  display: inline-block;
  color: var(--muted);
}

.denied::after {
  position: absolute;
  top: 58%;
  left: -0.15ch;
  right: -0.15ch;
  height: 2px;
  content: "";
  background: color-mix(in srgb, var(--bad) 48%, transparent);
  transform: rotate(-2deg);
}

.contention-boundary-slide .takeaway {
  margin-top: 24px;
}

.big-key-slide {
  display: flex !important;
  align-items: center;
  justify-content: center;
}

.big-key-slide p {
  max-width: 1040px;
  margin: 0;
  color: var(--ink);
  font-size: 72px;
  font-weight: 800;
  line-height: 1.12;
  text-align: center;
}

.capture-matrix-slide {
  --capture-matrix-col-min: 210px;
  --shareable: var(--green);
  --shareable-soft: color-mix(in srgb, var(--green-bg) 80%, transparent);
  --shareable-border: color-mix(in srgb, var(--green) 38%, var(--line));
  --portable: var(--purple);
  --portable-soft: color-mix(in srgb, var(--purple-bg) 82%, transparent);
  --portable-border: color-mix(in srgb, var(--purple) 38%, var(--line));
}

.capture-matrix {
  margin-top: 24px;
}

.capture-matrix-transposed {
  display: grid;
  gap: 8px;
}

.capture-matrix-transposed-grid {
  display: grid;
  grid-template-columns:
    170px
    minmax(var(--capture-matrix-col-min), 1fr)
    minmax(var(--capture-matrix-col-min), 1fr)
    minmax(var(--capture-matrix-col-min), 1fr);
  gap: 12px;
  align-items: stretch;
}

.capture-matrix-transposed-rowheads {
  display: grid;
  grid-template-rows: repeat(6, minmax(0, 1fr));
  gap: 0;
  padding-top: 16px;
}

.capture-matrix-transposed-rowhead {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  padding: 3px 0;
  text-align: center;
  font-size: 20px;
}

.capture-matrix-transposed-rowhead code {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  white-space: nowrap;
}

.capture-matrix-transposed-box {
  position: relative;
  overflow: visible;
  border: 1px dashed color-mix(in srgb, var(--line) 88%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 97%, transparent);
}

.capture-matrix-transposed-box.shareable {
  border-color: var(--shareable-border);
}

.capture-matrix-transposed-box.portable {
  border-color: var(--portable-border);
}

.capture-matrix-transposed-box.nonportable {
  border-color: color-mix(in srgb, var(--muted) 42%, var(--line));
}

.capture-matrix-transposed-boxhead {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px 7px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel-soft) 88%, transparent);
  font-size: 15px;
  font-weight: 750;
  line-height: 1.1;
  text-transform: uppercase;
  white-space: nowrap;
  transform: translate(-50%, -50%);
}

.capture-matrix-transposed-boxhead.shareable {
  color: var(--shareable);
  border-color: var(--shareable-border);
  background: var(--shareable-soft);
}

.capture-matrix-transposed-boxhead.portable {
  color: var(--portable);
  border-color: var(--portable-border);
  background: var(--portable-soft);
}

.capture-matrix-transposed-boxhead.nonportable {
  color: var(--muted);
  border-color: color-mix(in srgb, var(--muted) 42%, var(--line));
  background: color-mix(in srgb, var(--muted) 10%, var(--panel-soft));
}

.capture-matrix-transposed-values {
  display: grid;
  grid-template-rows: repeat(6, minmax(0, 1fr));
  padding-top: 16px;
}

.capture-matrix-transposed-cell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  padding: 10px 14px 12px;
  text-align: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 20px;
}

.capture-matrix-transposed-cell::before {
  position: absolute;
  top: 50%;
  left: 2px;
  content: "→";
  font-size: 18px;
  line-height: 1;
  text-shadow: 0 0 0.5px color-mix(in srgb, var(--panel) 90%, transparent);
  transform: translate(-50%, -50%) scaleX(1.35);
  pointer-events: none;
}

.capture-matrix-transposed-box.shareable .capture-matrix-transposed-cell::before {
  color: var(--shareable);
}

.capture-matrix-transposed-box.portable .capture-matrix-transposed-cell::before {
  color: var(--portable);
}

.capture-matrix-transposed-box.nonportable .capture-matrix-transposed-cell::before {
  color: var(--muted);
}

.capture-matrix-transposed-cell + .capture-matrix-transposed-cell {
  border-top: 1px dashed color-mix(in srgb, var(--line) 82%, transparent);
}

.capture-matrix-transposed-cell.boundary-sep {
  border-top: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
}

.capture-matrix-transposed-cell code {
  padding: 0;
  background: none;
}

.capture-matrix-transposed-cell.good {
  color: var(--green);
}

.capture-matrix-transposed-cell.warn {
  color: var(--orange);
}

.capture-matrix-transposed-cell.bad {
  color: var(--bad);
}

.capture-matrix-slide .takeaway {
  margin-top: 26px;
}

.template-expansion-slide .two-up {
  gap: 14px;
}

.template-expansion-slide .two-up article {
  padding: 16px 18px;
}

.template-expansion-slide pre code {
  font-size: 13.5px;
  line-height: 1.18;
}

.template-expansion-slide .takeaway {
  margin-top: 12px;
  font-size: 18px;
}

.template-expansion-grid {
  display: grid;
  gap: 14px;
  min-height: 0;
}

.template-expansion-slide h3 {
  margin-bottom: 10px;
  font-size: 19px;
}

.template-call-row pre code {
  font-size: 15px;
  line-height: 1.22;
}

.callout-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 26px;
}

.callout-row p {
  margin: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
}

.repr-map {
  display: grid;
  gap: 14px;
}

.repr-row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) auto minmax(0, 1.1fr);
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--code-bg);
}

.repr-row code {
  display: block;
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--panel);
  font-size: 18px;
  text-align: center;
}

.repr-row > span:last-child {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.25;
  text-align: center;
}

.repr-arrow {
  color: var(--accent-2);
  font-size: 25px;
  font-weight: 800;
}

.repr-slide {
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 14px;
}

.repr-slide-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.58fr) minmax(0, 1.42fr);
  gap: 16px;
  min-height: 0;
}

.repr-wide-code-layout {
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
}

.repr-code-panel,
.repr-graph-panel {
  min-width: 0;
  min-height: 0;
}

.repr-code-panel h3,
.repr-graph-panel h3 {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 18px;
  font-weight: 750;
  line-height: 1.15;
}

.repr-code-panel pre {
  margin: 0;
  font-size: 16px;
  line-height: 1.23;
}

.repr-wide-code-layout .repr-code-panel pre {
  font-size: 13.5px;
  line-height: 1.18;
}

.repr-graph-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.tree-constructor-slide .takeaway {
  display: none;
}

.repr-dual-graph-slide {
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.repr-dual-graph {
  display: grid;
  grid-template-columns: minmax(0, 0.52fr) minmax(0, 1.48fr);
  gap: 18px;
  min-height: 0;
}

.repr-stack-examples {
  display: grid;
  grid-template-rows: minmax(0, 0.78fr) minmax(0, 1.22fr);
  gap: 14px;
  min-height: 0;
}

.repr-row-example {
  display: grid;
  grid-template-columns: minmax(0, 0.52fr) minmax(0, 1.48fr);
  gap: 16px;
  min-width: 0;
  min-height: 0;
}

.repr-row-example .repr-code-panel,
.repr-row-example .repr-graph-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.repr-row-example .repr-code-panel pre {
  align-self: start;
  font-size: 15px;
}

.repr-row-example .native-repr-graph {
  max-height: 230px;
}

.repr-pair-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  min-height: 0;
}

.or-null-contrast-grid {
  display: grid;
  grid-template-rows: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 14px;
  min-height: 0;
}

.or-null-four-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 76px 20px;
  min-height: 0;
}

.ordinary-option-example {
  grid-template-columns: minmax(0, 0.64fr) minmax(0, 1.36fr);
}

.reveal .or-null-contrast-slide .native-repr-graph {
  max-height: 190px;
}

.reveal .or-null-contrast-slide .repr-mini-example .native-repr-graph {
  max-height: 150px;
}

.or-null-contrast-slide .repr-mini-example {
  grid-template-rows: 22px 58px minmax(0, 1fr);
}

.or-null-contrast-slide .repr-mini-example h3,
.or-null-contrast-slide .repr-code-panel h3,
.or-null-contrast-slide .repr-graph-panel h3 {
  font-size: 16px;
}

.or-null-contrast-slide .repr-mini-example pre,
.or-null-contrast-slide .repr-code-panel pre {
  font-size: 14px;
}

.repr-mini-example {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
  min-height: 0;
}

.repr-mini-example h3 {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  font-weight: 750;
  line-height: 1.15;
}

.repr-mini-example pre {
  margin: 0;
  font-size: 17px;
  line-height: 1.22;
}

.native-repr-slot {
  min-width: 0;
  min-height: 0;
}

.native-repr-slot:empty {
  min-height: 220px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.native-repr-missing {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  border: 1px dashed var(--bad);
  border-radius: 8px;
  background: color-mix(in srgb, var(--bad) 10%, var(--panel));
  color: var(--bad);
  font-size: 18px;
  line-height: 1.3;
  text-align: center;
}

.reveal .repr-slide .native-repr-graph {
  max-width: 100%;
  max-height: 540px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  font-size: 16px;
  position: relative;
}

.reveal .repr-slide .native-repr-pointer-overlay {
  height: 100vh;
  inset: 0;
  overflow: visible;
  pointer-events: none;
  position: fixed;
  width: 100vw;
  z-index: 4;
}

.reveal .repr-slide .native-repr-pointer-line {
  fill: none;
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}

.reveal .repr-slide .native-repr-pointer-tail {
  fill: var(--accent);
  stroke: var(--accent);
  stroke-width: 0;
  vector-effect: non-scaling-stroke;
}

.reveal .repr-slide .native-repr-pointer-head {
  fill: var(--accent);
}

.reveal .repr-slide .native-repr-graph-uniform-tags {
  gap: 28px;
}

.reveal .repr-slide .native-repr-graph-uniform-tags .native-repr-heap-blocks {
  gap: 27px;
}

.reveal .repr-slide .native-repr-graph-uniform-tags .native-repr-block {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
  padding: 0;
}

.reveal .repr-slide .native-repr-graph-uniform-tags .native-repr-block-title {
  display: none;
}

.reveal .repr-slide .native-repr-graph-uniform-tags .native-repr-mem {
  gap: 6px;
  padding: 0;
}

.reveal .repr-slide .native-repr-region {
  gap: 9px;
  grid-template-columns: 27px minmax(0, max-content);
  max-width: 100%;
  position: relative;
}

.reveal .repr-slide .native-repr-region-label {
  border-radius: 6px;
  font-size: 12px;
  min-height: 42px;
  padding: 9px 0;
}

.reveal .repr-slide .native-repr-root-name {
  font-size: 16.5px;
  max-width: 450px;
}

.reveal .repr-slide .native-repr-block-title {
  gap: 6px;
}

.reveal .repr-slide .native-repr-size {
  font-size: 20.25px;
}

.reveal .repr-slide .native-repr-word {
  border-radius: 4.5px;
  grid-template-columns: repeat(var(--bytes), 33px);
}

.reveal .repr-slide .native-repr-layout-words {
  gap: 18px;
}

.reveal .repr-slide .native-repr-uniform-tags-word {
  grid-template-columns: minmax(0, 87px) 27px;
  grid-template-rows: 39px;
  height: 42px;
  width: max-content;
}

.reveal .repr-slide .native-repr-no-low-bit-marker {
  grid-template-columns: minmax(0, 132px);
}

.reveal .repr-slide .native-repr-header-word {
  grid-template-columns: 54px 44px 90px 54px;
  width: 242px;
}

.reveal .repr-slide .native-repr-simple-header-word {
  grid-template-columns: minmax(0, 225px);
  grid-template-rows: 39px;
  height: 42px;
  width: max-content;
}

.reveal .repr-slide .native-repr-simple-header-word .native-repr-label {
  grid-column: 1 / -1;
  grid-row: 1;
}

.reveal .repr-slide .native-repr-byte {
  font-size: 18px;
  min-width: 33px;
}

.reveal .repr-slide .native-repr-label {
  font-size: 19.5px;
  padding: 0 3px;
}

.reveal .repr-slide .native-repr-uniform-tags-word .native-repr-label {
  background: var(--panel);
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}

.reveal .repr-slide .native-repr-no-low-bit-marker .native-repr-label {
  grid-column: 1 / -1;
}

.reveal .repr-slide .native-repr-low-bit-marker {
  display: flex;
  grid-column: 2;
  grid-row: 1;
  align-items: center;
  justify-content: center;
  border-left: 1px solid var(--line);
  padding: 0 3px;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
}

.reveal .repr-slide .native-repr-imm .native-repr-low-bit-marker {
  background: var(--tag-immediate-bg);
  color: var(--tag-immediate-ink);
}

.reveal .repr-slide .native-repr-edge .native-repr-low-bit-marker,
.reveal .repr-slide .native-repr-null .native-repr-low-bit-marker {
  background: var(--accent-soft);
  color: var(--accent);
}

.reveal .repr-wide-code-layout .native-repr-graph {
  font-size: 19.5px;
}

.reveal .repr-wide-code-layout .native-repr-root-name {
  font-size: 13.5px;
  max-width: 375px;
}

.reveal .repr-wide-code-layout .native-repr-size {
  font-size: 16.5px;
}

.reveal .repr-wide-code-layout .native-repr-word {
  grid-template-columns: repeat(var(--bytes), 24px);
}

.reveal .repr-wide-code-layout .native-repr-layout-words {
  gap: 14px;
}

.reveal .repr-wide-code-layout .native-repr-uniform-tags-word {
  grid-template-columns: minmax(0, 72px) 24px;
  grid-template-rows: 33px;
  height: 36px;
}

.reveal .repr-wide-code-layout .native-repr-no-low-bit-marker {
  grid-template-columns: minmax(0, 108px);
}

.reveal .repr-wide-code-layout .native-repr-header-word {
  grid-template-columns: 40px 32px 66px 40px;
  width: 178px;
}

.reveal .repr-wide-code-layout .native-repr-simple-header-word {
  grid-template-columns: minmax(0, 177px);
  grid-template-rows: 33px;
  height: 36px;
}

.reveal .repr-wide-code-layout .native-repr-byte {
  font-size: 13.5px;
  min-width: 24px;
}

.reveal .repr-wide-code-layout .native-repr-label {
  font-size: 15.75px;
}

.reveal .repr-wide-code-layout .native-repr-low-bit-marker {
  font-size: 15px;
}

.axis-strip {
  display: grid;
  gap: 16px;
  max-width: 1260px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 16px 48px rgba(18, 33, 56, 0.08);
}

.axis-strip-modes,
.mode-axis {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: stretch;
  gap: 12px;
}

.locality-axis-slide h2 {
  padding-bottom: 4px;
  line-height: 1.18;
}

.locality-axis-slide .axis-context {
  padding-bottom: 2px;
  line-height: 1.18;
}

.locality-axis-slide .axis-strip-modes.locality {
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  max-width: 900px;
  margin: 0 auto;
}

.locality-axis-slide .axis-strip-note {
  text-align: center;
}

.axis-mode {
  min-width: 0;
  min-height: 220px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.axis-mode-wrap {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
}

.axis-context {
  color: var(--muted);
  font-size: 20px;
  font-weight: 700;
  text-align: center;
}

.axis-mode code {
  display: block;
  margin-bottom: 12px;
  padding: 0;
  background: transparent;
  color: inherit;
  font-size: 25px;
  font-weight: 700;
  white-space: nowrap;
}

.axis-mode ul {
  margin: 0;
  padding-left: 1.15em;
  color: var(--muted);
  font-size: 22px;
  line-height: 1.28;
}

.axis-mode li + li {
  margin-top: 6px;
}

.axis-mode.good {
  color: var(--green);
  border-color: color-mix(in srgb, var(--green) 35%, var(--line));
  background: var(--green-bg);
}

.axis-mode.note {
  color: var(--purple);
  border-color: color-mix(in srgb, var(--purple) 35%, var(--line));
  background: var(--purple-bg);
}

.axis-mode.warn {
  color: var(--orange);
  border-color: color-mix(in srgb, var(--orange) 35%, var(--line));
  background: var(--orange-bg);
}

.axis-arrow {
  align-self: center;
  color: var(--muted);
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
}

.axis-strip-note {
  margin: 0;
  color: var(--muted);
  font-size: 20px !important;
}

.axis-strip-note + .axis-strip-note {
  margin-top: -8px;
}

.boundary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.boundary-card {
  display: grid;
  gap: 14px;
  min-height: 420px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.boundary-card h3 {
  margin-bottom: 0;
}

.boundary-card p {
  margin: 0;
  color: var(--muted);
  font-size: 22px;
}

.boundary-signature {
  padding: 12px 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--code-bg);
}

.boundary-signature code {
  display: block;
  padding: 0;
  background: transparent;
  color: var(--ink);
  font-size: 19px;
  white-space: nowrap;
}

.boundary-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.boundary-flow code {
  display: block;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--ink);
  font-size: 19px;
  text-align: center;
  white-space: nowrap;
}

.boundary-flow span {
  color: var(--accent-2);
  font-size: 28px;
  font-weight: 800;
}

.boundary-functions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding-top: 2px;
}

.boundary-functions strong {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.15;
}

.boundary-functions code {
  display: block;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--ink);
  font-size: 16px;
  text-align: center;
  white-space: nowrap;
}

.shareable-boundary {
  border-color: color-mix(in srgb, var(--purple) 45%, var(--line));
}

.shareable-boundary h3 {
  color: var(--purple);
}

.portable-boundary {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}

.position-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.position-grid article {
  min-height: 138px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.position-grid code {
  display: block;
  padding: 0;
  background: transparent;
  color: var(--accent);
  font-size: 21px;
  font-weight: 750;
}

.position-grid p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 21px;
}

.capstone-signature {
  margin-bottom: 20px;
}

.type-callouts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.type-callouts p {
  margin: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  font-size: 21px;
}

.matrix {
  width: min(980px, 100%);
  border-collapse: collapse;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
}

.matrix th,
.matrix td {
  padding: 30px 36px;
  border: 1px solid var(--line);
  font-size: 30px;
  text-align: center;
}

.matrix th {
  color: var(--muted);
}

.matrix .ok {
  color: var(--ok);
}

.matrix .bad {
  color: var(--bad);
}

.compact-matrix th,
.compact-matrix td {
  padding: 14px 16px;
  font-size: 22px;
}

.overlap-matrix {
  border-collapse: separate;
  border-spacing: 0;
}

.overlap-matrix th,
.overlap-matrix td {
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.overlap-matrix tr > :last-child {
  border-right: 0;
}

.overlap-matrix tbody tr:last-child > * {
  border-bottom: 0;
}

.overlap-matrix thead th,
.overlap-matrix tbody th {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}

.overlap-matrix .axis-label {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.1;
}

.overlap-matrix td {
  background: var(--panel);
  font-weight: 700;
}

.overlap-matrix .safe-cell {
  background: color-mix(in srgb, var(--green-bg) 70%, var(--panel));
  color: var(--ok);
}

.overlap-matrix .race-cell {
  background: color-mix(in srgb, var(--bad) 10%, var(--panel));
  color: var(--bad);
}

.matrix + .matrix-note {
  margin-top: 28px;
}

.checklist {
  display: grid;
  gap: 18px;
}

.checklist p {
  margin: 0;
  color: var(--muted);
}

.checklist .checklist-item {
  display: grid;
  gap: 10px;
}

.checklist ul {
  margin: 0;
  padding-left: 44px;
  color: var(--muted);
}

.checklist li {
  margin: 4px 0;
}

.parallelism-recap-layout {
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  max-width: 1120px;
}

.recap-highlight-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 28px;
}

.recap-highlight-card h3 {
  margin: 0 0 16px;
}

.recap-highlight-card ul {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 1.35em;
  color: var(--muted);
  font-size: 23px;
}

.recap-highlight-card li {
  padding-left: 0.2em;
}

.value-model-figure {
  max-width: 1260px;
}

.value-model-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.25fr;
  gap: 24px;
}

.value-model-panel {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-glass);
}

.value-model-panel p {
  margin: 18px 0 0;
  color: var(--muted);
}

.value-invariant-slide h2 {
  padding-bottom: 4px;
  line-height: 1.18;
}

.value-word {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px;
  min-height: 74px;
  overflow: hidden;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 22px;
  font-weight: 700;
  text-align: center;
}

.value-word-main,
.value-word-tag {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  border: 1px solid var(--line);
}

.value-word-main {
  border-radius: 8px 0 0 8px;
  background: var(--panel);
}

.value-word-tag {
  border-left: 0;
  border-radius: 0 8px 8px 0;
}

.value-word-immediate .value-word-tag {
  background: var(--tag-immediate-bg);
  color: var(--tag-immediate-ink);
}

.value-word-pointer .value-word-tag {
  background: var(--accent-soft);
  color: var(--accent);
}

.value-pointer-line {
  position: relative;
  z-index: 1;
  width: 0;
  height: 32px;
  margin: 6px auto;
  border-left: 3px solid var(--accent);
}

.value-pointer-line::after {
  position: absolute;
  bottom: -1px;
  left: -7px;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid var(--accent);
  content: "";
}

.heap-block-model {
  position: relative;
  margin-top: -1px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-glass);
}

.heap-block-slide {
  max-width: 1260px;
}

.heap-block-label {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 18px;
  font-weight: 750;
  line-height: 1;
  text-transform: uppercase;
}

.heap-model {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) 54px minmax(0, 1fr);
  align-items: stretch;
  gap: 10px;
}

.heap-block-slide .heap-model {
  grid-template-columns: minmax(0, 1.1fr) repeat(3, minmax(0, 1fr));
}

.heap-model-word {
  min-height: 112px;
  padding: 20px 16px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
}

.heap-model-word strong,
.heap-model-word span {
  display: block;
}

.heap-model-word strong {
  font-size: 22px;
}

.heap-model-word span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.25;
}

.heap-model-header {
  border-color: var(--tag-header-border);
  background: var(--tag-header-bg);
}

.heap-model-ellipsis {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 28px;
}

.runtime-note,
.diagnostic-callout,
.browser-note {
  border-left: 4px solid var(--accent-2);
  padding-left: 18px;
}

.or-null-error-slide .live-layout {
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
}

.kind-polymorphism-slide .live-layout {
  grid-template-columns: minmax(0, 0.58fr) minmax(0, 1.42fr);
}

.local-container-slide .live-layout,
.ordinary-polymorphic-slide .live-layout,
.kind-polymorphism-ok-slide .live-layout {
  grid-template-columns: minmax(0, 0.5fr) minmax(0, 1.5fr);
}

.modality-preserve-slide .live-layout {
  grid-template-columns: minmax(0, 0.35fr) minmax(0, 1.65fr);
}

.local-container-slide .live-copy,
.ordinary-polymorphic-slide .live-copy,
.kind-polymorphism-ok-slide .live-copy,
.modality-preserve-slide .live-copy {
  padding: 20px;
}

.local-container-slide .live-copy p,
.ordinary-polymorphic-slide .live-copy p,
.kind-polymorphism-ok-slide .live-copy p,
.modality-preserve-slide .live-copy p {
  font-size: 20px;
  line-height: 1.22;
}

.local-container-slide .oxcaml-embed,
.ordinary-polymorphic-slide .oxcaml-embed,
.modality-preserve-slide .oxcaml-embed {
  --oxcaml-editor-font-size: 0.7rem;
  --oxcaml-output-font-size: 0.58rem;
  --oxcaml-editor-max-height: 12rem;
}

.local-container-slide .oxcaml-embed__editor-host,
.ordinary-polymorphic-slide .oxcaml-embed__editor-host,
.modality-preserve-slide .oxcaml-embed__editor-host {
  flex: 0 0 auto;
}

.local-container-slide .oxcaml-embed__output,
.ordinary-polymorphic-slide .oxcaml-embed__output,
.modality-preserve-slide .oxcaml-embed__output {
  flex: 1 1 13rem;
  min-height: 13rem;
}

.kind-polymorphism-slide .live-copy {
  padding: 22px;
}

.kind-polymorphism-slide .live-copy p {
  font-size: 21px;
  line-height: 1.25;
}

.kind-polymorphism-slide .oxcaml-embed {
  --oxcaml-editor-font-size: 0.72rem;
  --oxcaml-output-font-size: 0.62rem;
}

.kind-polymorphism-slide .oxcaml-embed .transcript {
  padding-right: 0.75rem;
}

.kind-polymorphism-error-slide .oxcaml-embed {
  --oxcaml-editor-max-height: 10rem;
  --oxcaml-output-min-height: 13rem;
}

.kind-polymorphism-error-slide .oxcaml-embed__editor-host,
.kind-polymorphism-ok-slide .oxcaml-embed__editor-host {
  flex: 0 0 auto;
}

.kind-polymorphism-error-slide .oxcaml-embed__output {
  flex: 1 1 13rem;
  min-height: 13rem;
}

.kind-polymorphism-ok-slide .oxcaml-embed {
  --oxcaml-editor-max-height: 20rem;
  --oxcaml-output-min-height: 3rem;
}

.kind-polymorphism-ok-slide .oxcaml-embed__output {
  flex: 0 0 auto;
  min-height: 3rem;
}

.or-null-error-slide .oxcaml-embed {
  --oxcaml-editor-min-height: 4.6rem;
  --oxcaml-editor-max-height: 4.6rem;
  --oxcaml-output-font-size: 0.94rem;
  --oxcaml-output-min-height: 10rem;
}

.or-null-error-slide .oxcaml-embed .transcript {
  padding-right: 1.1rem;
}

.or-null-error-slide .oxcaml-embed__editor-host {
  flex: 0 0 auto;
}

.or-null-error-slide .oxcaml-embed__editor-host .cm-editor,
.or-null-error-slide .oxcaml-embed__editor-host .cm-scroller {
  height: auto;
  min-height: var(--_oxcaml-editor-min-height);
}

.or-null-error-slide .oxcaml-embed__editor-host .cm-scroller {
  max-height: var(--_oxcaml-editor-max-height);
}

.or-null-error-slide .oxcaml-embed__output {
  flex: 1 1 auto;
}

.code-label {
  display: inline-flex;
  margin-bottom: 12px;
  color: var(--accent-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 19px;
}

.live-slide .code-label {
  display: none;
}

oxcaml,
.oxcaml-embed {
  --oxcaml-accent: var(--accent);
  --oxcaml-ok: var(--ok);
  --oxcaml-warn: var(--warn);
  --oxcaml-error: var(--bad);
  --oxcaml-radius: 8px;
  --oxcaml-font-family: Avenir Next, Segoe UI, system-ui, sans-serif;
  --oxcaml-mono-font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  display: block;
  font-size: 18px;
}

.reveal .oxcaml-embed {
  --oxcaml-editor-font-size: 0.9rem;
  --oxcaml-output-font-size: 0.86rem;
}

.reveal .compact-live .oxcaml-embed {
  --oxcaml-editor-font-size: 0.78rem;
  --oxcaml-output-font-size: 0.74rem;
}

.reveal .oxcaml-embed .cm-gutters {
  display: flex;
  flex-shrink: 0;
  padding-top: 0.45rem;
  padding-bottom: 0.45rem;
  border-right: 1px solid var(--oxcaml-editor-gutter-border);
  background: var(--oxcaml-editor-gutter);
  color: var(--oxcaml-editor-gutter-ink);
}

.reveal .oxcaml-embed .cm-lineNumbers .cm-gutterElement {
  min-width: 1.75ch;
  padding: 0 0.32rem 0 0.18rem;
  text-align: right;
  user-select: none;
}

.reveal .oxcaml-embed .cm-content {
  padding-top: 0.45rem;
  padding-left: 0.4rem;
  padding-right: 0.65rem;
  padding-bottom: 0.45rem;
}

.reveal .oxcaml-embed .cm-line {
  padding-left: 0;
  padding-right: 0;
}

.reveal .oxcaml-embed .transcript {
  padding-left: 0.75rem;
  padding-right: 3.4rem;
}

.reveal .oxcaml-embed .interface-output {
  display: none;
}

.reveal .oxcaml-embed[data-show-interface] {
  --oxcaml-output-font-size: 0.86rem;
}

.reveal .oxcaml-embed[data-show-interface] .transcript:has(.placeholder) {
  display: none;
}

.reveal .oxcaml-embed[data-show-interface] .interface-output {
  display: block;
  margin: 0 14px 14px;
  border-color: color-mix(in srgb, var(--ok), white 66%);
  border-left-width: 3px;
  background: #f3fbf7;
  padding: 10px 12px;
}

.reveal .oxcaml-embed[data-show-interface] .interface-output__label {
  margin-bottom: 7px;
  color: var(--ok);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.reveal .oxcaml-embed[data-show-interface] .interface-output__body {
  color: #173829;
  font-size: var(--oxcaml-output-font-size);
  line-height: 1.38;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.prediction-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.prediction-table th,
.prediction-table td {
  padding: 22px;
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
  font-size: 24px;
}

.prediction-table th:first-child,
.prediction-table td:first-child {
  border-left: 0;
}

.prediction-table tr:last-child th,
.prediction-table tr:last-child td {
  border-bottom: 0;
}

.exercise-with-reference {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.18fr);
  gap: 18px;
  align-items: start;
}

.helper-calls-exercise-slide > p {
  margin-bottom: 34px;
}

.exercise-table-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.exercise-reference {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 18px;
}

.exercise-reference h3 {
  margin-bottom: 12px;
  font-size: 20px;
}

.exercise-reference pre code {
  padding: 14px;
  font-size: 15px;
  line-height: 1.28;
}

.compact-prediction th,
.compact-prediction td {
  padding: 15px 13px;
  font-size: 19px;
}

.prediction-table button,
.exercise-controls button,
.state-tabs button {
  min-width: 78px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--button-bg);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.prediction-table button {
  padding: 8px 14px;
}

.compact-prediction button {
  min-width: 58px;
  padding: 6px 10px;
}

.prediction-table button.is-correct {
  border-color: var(--ok);
  color: var(--ok);
}

.prediction-table button.is-incorrect {
  border-color: var(--bad);
  color: var(--bad);
}

.exercise-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 0;
}

.exercise-table-panel .exercise-controls {
  justify-content: flex-end;
}

.exercise-controls button,
.state-tabs button {
  padding: 10px 16px;
  font-size: 22px;
}

.exercise-controls span {
  min-width: 190px;
  color: var(--muted);
  font-size: 22px;
  text-align: right;
}

.exercise-context {
  max-width: 1120px;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 20px;
}

.annotation-stack {
  display: grid;
  gap: 22px;
}

.big-annotations {
  max-width: 1180px;
}

.big-annotations pre code {
  padding: 24px 28px;
  font-size: 31px;
  line-height: 1.2;
}

.takeaway {
  color: var(--accent-2);
}

.state-widget,
.allocation-figure {
  --lifetime-caller-row: 116px;
  --lifetime-current-row: 116px;
  --lifetime-row-gap: 8px;
  --allocation-surface: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.58));
  --allocation-memory-panel: rgba(255, 255, 255, 0.72);
  --allocation-heap-accent: #8b5cf6;
  --allocation-call-accent: #d97706;
  --allocation-call-bg: #fffbeb;
  --allocation-call-border: #fbbf24;
  --allocation-callee-bg: #fff7ed;
  --allocation-callee-border: #fdba74;
  --allocation-region-bg: #f0fdfa;
  --allocation-region-border: rgba(15, 118, 110, 0.34);
  --allocation-parent-region-bg: #ecfdf5;
  --allocation-callee-region-bg: #f8fafc;
  --allocation-callee-region-border: #cbd5e1;
  --allocation-empty-region-bg: rgba(248, 250, 252, 0.62);
  --allocation-empty-region-border: rgba(148, 163, 184, 0.45);
  --allocation-boundary-bg: #fef3c7;
  --allocation-boundary-border: #d97706;
  --allocation-boundary-ring: rgba(217, 119, 6, 0.18);
  --allocation-current-row-bg: rgba(217, 119, 6, 0.045);
  --allocation-caller-row-bg: rgba(15, 118, 110, 0.045);
  --allocation-heap-empty-bg: rgba(248, 250, 252, 0.4);
  --allocation-heap-empty-border: rgba(148, 163, 184, 0.32);
  --allocation-heap-empty-ink: rgba(100, 116, 139, 0.82);
  --allocation-list-bg: #f5f3ff;
  --allocation-list-border: #c4b5fd;
  --allocation-invalid-bg: #fff1f2;
  --allocation-invalid-border: #fb7185;
  --allocation-invalid-ink: #9f1239;
  --allocation-rejected: #be123c;
  box-sizing: border-box;
  max-width: 1180px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--allocation-surface);
}

.allocation-diagram-only {
  margin: 0;
}

.diagram-caption {
  max-width: 1050px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 20px;
}

.allocation-slide-code {
  min-width: 0;
}

.allocation-workspace {
  display: grid;
  grid-template-columns: minmax(400px, 0.54fr) minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}

.allocation-workspace .memory-column {
  height: 390px;
}

.allocation-slide-code [data-visible-states].is-visible {
  display: block !important;
}

.allocation-slide-code-panel {
  box-sizing: border-box;
  height: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.allocation-slide-code-panel h3 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.15;
}

.allocation-slide-code-panel pre {
  margin: 0;
}

.allocation-slide-code-panel pre code {
  display: block;
  padding: 10px 12px;
  border-radius: 7px;
  font-size: 14px;
  line-height: 1.18;
}

.state-tabs,
.allocation-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.allocation-controls {
  gap: 8px;
  margin-bottom: 16px;
}

.allocation-step-button,
.state-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--button-bg);
  color: var(--ink);
  cursor: pointer;
  font-weight: 700;
}

.allocation-controls .allocation-step-button,
.allocation-controls button {
  padding: 8px 11px;
  font-size: 18px;
}

.state-tabs button[aria-selected="true"],
.allocation-step-button[aria-selected="true"] {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.memory-map {
  display: grid;
  grid-template-columns: repeat(3, minmax(128px, 1fr));
  gap: 10px;
  min-width: 0;
}

[data-visible-states] {
  display: none !important;
}

[data-visible-states][hidden] {
  display: none !important;
}

.memory-map [data-visible-states].is-visible {
  display: block !important;
}

.memory-map .memory-stack[data-visible-states].is-visible,
.memory-map .region-stack[data-visible-states].is-visible {
  display: grid !important;
}

.memory-map .empty-space[data-visible-states].is-visible {
  display: flex !important;
}

.memory-column {
  position: relative;
  box-sizing: border-box;
  height: 330px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--allocation-memory-panel);
  border-top-width: 5px;
}

.call-column {
  border-top-color: var(--allocation-call-accent);
}

.alloc-column {
  border-top-color: var(--accent);
}

.heap-column {
  border-top-color: var(--allocation-heap-accent);
}

.memory-title {
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 12px;
}

.memory-subtitle,
.memory-title span {
  display: block;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  margin-top: 3px;
}

.memory-stack,
.region-stack {
  position: relative;
  isolation: isolate;
  display: grid;
  align-content: start;
  grid-template-rows: var(--lifetime-current-row) var(--lifetime-caller-row);
  gap: var(--lifetime-row-gap);
  min-height: calc(var(--lifetime-current-row) + var(--lifetime-row-gap) + var(--lifetime-caller-row));
}

.memory-stack > *,
.region-stack > * {
  position: relative;
  z-index: 1;
}

.allocation-figure:not([data-allocation-state="heap"]) .memory-stack::before,
.allocation-figure:not([data-allocation-state="heap"]) .region-stack::before {
  position: absolute;
  z-index: 0;
  inset: -4px -6px;
  border-radius: 8px;
  background: linear-gradient(
    180deg,
    var(--allocation-current-row-bg) 0 var(--lifetime-current-row),
    transparent var(--lifetime-current-row) calc(var(--lifetime-current-row) + var(--lifetime-row-gap)),
    var(--allocation-caller-row-bg) calc(var(--lifetime-current-row) + var(--lifetime-row-gap)) 100%
  );
  content: "";
  pointer-events: none;
}

.region-row {
  min-width: 0;
}

.region-row > :first-child {
  margin-top: 0;
}

.region-row > :last-child {
  margin-bottom: 0;
}

.call-frame,
.region-frame,
.region-boundary,
.empty-space {
  min-height: 46px;
  padding: 9px 10px;
  border-radius: 7px;
  font-size: 17px;
  line-height: 1.18;
}

.call-frame strong,
.region-frame strong,
.region-boundary strong {
  display: block;
}

.call-frame span,
.region-frame span,
.region-boundary span,
.empty-space span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.2;
}

.call-frame {
  border: 1px solid var(--allocation-call-border);
  background: var(--allocation-call-bg);
}

.call-frame.callee {
  border-color: var(--allocation-callee-border);
  background: var(--allocation-callee-bg);
}

.call-frame.exiting,
.region-frame.exiting {
  opacity: 0.64;
}

.region-frame {
  position: relative;
  border: 1px solid var(--allocation-region-border);
  background: var(--allocation-region-bg);
}

.region-frame.parent {
  background: var(--allocation-parent-region-bg);
}

.region-frame.callee-region {
  border-color: var(--allocation-callee-region-border);
  background: var(--allocation-callee-region-bg);
}

.region-frame.empty-region {
  border-color: var(--allocation-empty-region-border);
  border-style: dashed;
  background: var(--allocation-empty-region-bg);
  color: var(--muted);
}

.region-frame.empty-region.allocation-gap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 8px;
  text-align: center;
  opacity: 0.76;
}

.region-frame.empty-region.allocation-gap span {
  margin-top: 0;
}

.region-boundary {
  border: 1px dashed var(--allocation-boundary-border);
  background: var(--allocation-boundary-bg);
  box-shadow: inset 0 0 0 1px var(--allocation-boundary-ring);
  text-align: center;
}

.empty-space {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 94px;
  border: 1px dashed var(--line);
  color: var(--muted);
  text-align: center;
}

.heap-column .empty-space {
  min-height: 82px;
  border-color: var(--allocation-heap-empty-border);
  background: var(--allocation-heap-empty-bg);
  color: var(--allocation-heap-empty-ink);
}

.stack-pointer {
  display: block;
  margin: 8px 0 10px;
  padding: 4px 0;
  border-top: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  text-transform: uppercase;
}

.memory-note {
  margin-top: 10px;
  padding: 8px;
  border-radius: 7px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 15px;
  line-height: 1.3;
}

.list-spine {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.list-spine-label {
  flex-basis: 100%;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.25;
}

.list-cell {
  position: relative;
  display: grid;
  grid-template-columns: 24px 18px;
  min-height: 30px;
  overflow: hidden;
  border: 1px solid var(--allocation-list-border);
  border-radius: 7px;
  background: var(--allocation-list-bg);
  font-size: 15px;
}

.list-cell.stack-cell {
  border-color: var(--allocation-region-border);
  background: var(--allocation-parent-region-bg);
}

.list-cell.invalid {
  border-color: var(--allocation-invalid-border);
  background: var(--allocation-invalid-bg);
  color: var(--allocation-invalid-ink);
}

.list-cell-head,
.list-cell-tail {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 4px;
}

.list-cell-head {
  border-right: 1px solid currentColor;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 800;
}

.list-cell-tail {
  color: currentColor;
  font-weight: 800;
  opacity: 0.72;
}

.list-nil {
  padding: 6px 8px;
  border: 1px dashed var(--line);
  border-radius: 7px;
  background: var(--panel-soft);
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  font-weight: 800;
  text-align: center;
}

.memory-arrow {
  display: grid;
  grid-template-columns: max-content minmax(26px, 1fr);
  align-items: center;
  gap: 5px;
  margin: 8px 0;
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
}

.memory-arrow::after {
  height: 2px;
  background: currentColor;
  content: "";
}

.memory-arrow.rejected {
  color: var(--allocation-rejected);
}

.memory-arrow.rejected::after {
  background: repeating-linear-gradient(90deg, currentColor 0 8px, transparent 8px 12px);
}

.storage-triad p.is-visible {
  display: block;
}

.modality-picture-slide {
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 18px;
}

.modality-figure {
  min-height: 0;
  margin: 0;
}

.modality-figure img {
  display: block;
  width: 100%;
  max-height: 620px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.compact-cards {
  gap: 14px;
}

.compact-cards article {
  padding: 16px 18px;
}

.compact-cards h3 {
  margin-bottom: 8px;
  font-size: 21px;
}

.compact-cards p {
  margin: 0;
  font-size: 19px;
  line-height: 1.25;
}

.allocation-figure[data-allocation-state="escape"] .list-cell.invalid::after,
.allocation-figure[data-allocation-state="escape"] .region-frame.exiting::after {
  position: absolute;
  top: 50%;
  right: 8px;
  left: 8px;
  height: 2px;
  background: var(--allocation-rejected);
  content: "";
  transform: rotate(-4deg);
}

.summary-slide ul {
  max-width: 980px;
}

/* Keep static numbered code visually aligned with the CodeMirror editors. */
.reveal pre code[data-line-numbers="true"] {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  padding: 0;
  overflow-x: auto;
}

.reveal pre code[data-line-numbers="true"] .code-line-row {
  display: flex;
  align-items: stretch;
  min-width: max-content;
}

.reveal pre code[data-line-numbers="true"] .code-line-number {
  min-width: 1.75ch;
  padding: 0 0.32rem 0 0.18rem;
  border-right: 1px solid var(--oxcaml-editor-gutter-border);
  background: var(--oxcaml-editor-gutter);
  color: var(--oxcaml-editor-gutter-ink);
  text-align: right;
  user-select: none;
}

.reveal pre code[data-line-numbers="true"] .code-line-source {
  min-width: max-content;
  padding: 0 0.65rem 0 0.4rem;
}

.reveal pre code[data-line-numbers="true"] .code-line-row:first-child .code-line-number,
.reveal pre code[data-line-numbers="true"] .code-line-row:first-child .code-line-source {
  padding-top: 0.45rem;
}

.reveal pre code[data-line-numbers="true"] .code-line-row:last-child .code-line-number,
.reveal pre code[data-line-numbers="true"] .code-line-row:last-child .code-line-source {
  padding-bottom: 0.45rem;
}

kbd {
  display: inline-block;
  min-width: 1.7em;
  padding: 0 0.35em;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--button-bg);
  color: var(--accent-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-align: center;
}
