@font-face{font-family:"DM Sans";src:url(./fonts/dm-sans-400.ttf) format("truetype");font-weight:400;font-display:block}
@font-face{font-family:"Michroma";src:url(./fonts/michroma-400.ttf) format("truetype");font-weight:400;font-display:block}
:root {
  color-scheme: light;
  --bg: #f2f1ee;
  --ink: #050506;
  --muted: #66666b;
  --line: #d1d0cd;
  --surface: #e8e7e3;
  --surround: #e8e7e3;
  --focus-bar: #0069ad;
  --comparison-bar: #66666b;
  --focus-ring: #0069ad;
  --tree-accent: #006b70;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #050506;
  --ink: #f2f1ee;
  --muted: #a9a9ad;
  --line: #4c4b50;
  --surface: #17171a;
  --surround: #000;
  --focus-bar: #f2f1ee;
  --comparison-bar: #8a898e;
  --focus-ring: #f2f1ee;
  --tree-accent: #67b7ba;
}
* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; }
body { display: grid; place-items: center; background: var(--surround); color: var(--ink); font: 400 16px "DM Sans", sans-serif; }
.stage { position: relative; width: min(100vw, 177.77778vh); height: min(100vh, 56.25vw); background: var(--bg); }
.slide { display: none; position: absolute; inset: 0; }
.slide.active { display: block; }
.slide > svg { display: block; width: 100%; height: 100%; font-family: "DM Sans", sans-serif; }
.build.is-hidden { visibility: hidden; }
.build[data-motion="bar"], .build[data-motion="link"] { transform-box: fill-box; transform-origin: left center; }
.logo-dark { display: none; }
:root[data-theme="dark"] .logo-dark { display: inline; }
:root[data-theme="dark"] .logo-light { display: none; }
body:not(.show-controls) .stage { cursor: none; }
.controls { position: fixed; z-index: 5; right: max(16px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); display: flex; gap: 6px; align-items: center; max-width: calc(100vw - 32px); flex-wrap: wrap; justify-content: flex-end; opacity: 0; pointer-events: none; transition: opacity 110ms ease-out; }
.controls:has(:focus-visible), body.show-controls .controls { opacity: 1; pointer-events: auto; }
button { color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 3px; font: 400 13px "DM Sans", sans-serif; padding: 9px 12px; min-height: 36px; cursor: pointer; }
button:hover { border-color: var(--muted); }
button:disabled { opacity: .45; cursor: default; }
button[hidden], input[hidden] { display: none !important; }
#demo-player { width: min(1200px, 94vw); padding: 16px 24px; }
#demo-close { float: right; margin-left: 16px; }
#demo-label { margin: 5px 0 14px; font-size: 19px; }
#demo-video { display: block; width: 100%; max-height: 68vh; background: #050506; }
#demo-message { margin: 10px 0 0; font-size: 14px; color: var(--muted); }
button:focus-visible, a:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }
#status { padding: 0 8px; font-size: 12px; color: var(--muted); }
#help { position: fixed; z-index: 4; left: 16px; bottom: 12px; margin: 0; color: var(--muted); font-size: 12px; opacity: 0; pointer-events: none; }
#help span { padding: 0 4px; }
body.show-controls #help { opacity: 1; }
dialog { color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 3px; width: min(1080px, 86vw); max-height: 86vh; padding: 30px 44px; font-size: 19px; line-height: 1.55; }
dialog::backdrop { background: #0009; }
#notes-close { position: sticky; top: 0; float: right; margin: 0 0 10px 20px; }
#notes h2 { margin: 0 0 14px; font-size: 30px; font-weight: 400; line-height: 1.25; }
#notes p { white-space: pre-wrap; }
#notes .notes-meta, #notes .notes-sources { color: var(--muted); font-size: 15px; }
@media (max-width: 1100px) { #help { display: none; } }
@media (max-width: 600px) {
  .controls { right: 8px; bottom: max(8px, env(safe-area-inset-bottom)); max-width: calc(100vw - 16px); gap: 4px; }
  button { min-height: 42px; padding: 9px 10px; }
  #status { width: 100%; text-align: right; }
  dialog { width: 94vw; padding: 20px; font-size: 17px; }
  #notes h2 { font-size: 25px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
:root[data-motion="off"] *, :root[data-motion="off"] *::before, :root[data-motion="off"] *::after { animation: none !important; transition: none !important; }
@media print {
  html, body { height: auto; overflow: visible; display: block; background: var(--bg); print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .stage { width: 1280px; height: auto; }
  .slide, .slide.active { display: block; position: relative; width: 1280px; height: 720px; break-after: page; }
  .slide:last-child { break-after: auto; }
  .build.is-hidden { visibility: visible; }
  .slide, .build { animation: none !important; transform: none !important; opacity: 1 !important; }
  .controls, #help, dialog { display: none !important; }
  @page { size: 13.333333in 7.5in; margin: 0; }
}
/* Media sits in the same SVG coordinate system as the authored slide. */
.slide-media { width:100%; height:100%; font:400 22px 'DM Sans',sans-serif; color:var(--ink); }
.klaus-frame { position:relative; overflow:hidden; background:var(--bg); }
.klaus-frame img, .klaus-frame iframe { position:absolute; inset:0; width:100%; height:100%; border:0; object-fit:contain; }
.klaus-frame iframe { opacity:0; pointer-events:none; }
.klaus-frame.klaus-visible iframe { opacity:1; pointer-events:auto; }
.klaus-frame.klaus-visible img { opacity:0; }
.live-demo-controls button, .video-actions button { font-size:22px; padding:10px 18px; margin-right:8px; }
.live-demo-controls p { margin:12px 0 4px; font-size:19px; line-height:1.3; }
.live-demo-controls a { color:var(--muted); font-size:18px; }
.hacker-video-wrap { position:relative; background:#050506; }
.hacker-video-wrap video { width:100%; height:100%; display:block; object-fit:contain; }
.video-actions { position:absolute; left:12px; right:12px; bottom:42px; display:flex; align-items:center; gap:6px; opacity:0; transition:opacity 100ms; }
.hacker-video-wrap:hover .video-actions, .hacker-video-wrap:focus-within .video-actions, .hacker-video-wrap[data-paused="true"] .video-actions { opacity:1; }
.video-actions button { color:#f2f1ee; background:#050506dd; border-color:#666; }
.video-actions output { color:#fff; font-size:16px; }
.media-placeholder { display:grid; place-items:center; text-align:center; background:var(--surface); color:var(--muted); font-size:28px; }
body.deck-moving foreignObject iframe, body.deck-moving foreignObject video, body.deck-moving foreignObject button { pointer-events:none; }
@media print { .video-actions, .live-demo-controls, .klaus-frame iframe { display:none; } .klaus-frame img { opacity:1!important; } }
