:root {
  --lul-black: #000;
  --lul-ink: #05070d;
  --lul-panel: #0a0b10;
  --lul-panel-2: #0d1018;
  --lul-white: #fff;
  --lul-muted: #fff;
  --lul-faint: rgba(255, 255, 255, 0.08);
  --lul-line: rgba(255, 255, 255, 0.18);
  --lul-blue: #0048e3;
  --lul-blue-bright: #2b63ff;
  --lul-cyan: #69a5ff;
  --lul-green: #69e6ba;
  --lul-amber: #ffbd68;
  --lul-red: #ff6e7a;
  --lul-sans: Manrope, "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  --lul-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --stage-width: 1600px;
  --stage-height: 900px;
  --slide-pad-x: 84px;
  --slide-head: 72px;
  --slide-foot: 42px;
  --ease-out: cubic-bezier(0.2, 0.75, 0.2, 1);
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--lul-black);
  color: var(--lul-white);
}

body {
  font-family: var(--lul-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
a { font: inherit; }

a { color: inherit; }

.deck {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--stage-width);
  height: var(--stage-height);
  overflow: hidden;
  background: var(--lul-black);
  transform-origin: 0 0;
  will-change: transform;
}

.deck::before {
  position: absolute;
  z-index: 0;
  inset: 0;
  background-image:
    linear-gradient(var(--lul-faint) 1px, transparent 1px),
    linear-gradient(90deg, var(--lul-faint) 1px, transparent 1px);
  background-size: 12.5% 100%, 100% 12.5%;
  content: "";
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.65), transparent 72%);
  pointer-events: none;
}

.slide {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: grid;
  grid-template-rows: var(--slide-head) minmax(0, 1fr) var(--slide-foot);
  padding: 0 var(--slide-pad-x);
  overflow: hidden;
  background: transparent;
  opacity: 0;
  visibility: hidden;
  transform: translateX(36px);
  transition:
    opacity 260ms ease,
    transform 340ms var(--ease-out),
    visibility 0s 340ms;
}

.slide::after {
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 0;
  background: var(--lul-blue);
  content: "";
  transition: height 700ms 140ms var(--ease-out);
}

.slide.is-active {
  z-index: 2;
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  transition-delay: 0s;
}

.slide.is-active::after { height: 100%; }
.slide.is-before { transform: translateX(-36px); }

.slide-head,
.slide-foot {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
}

.slide-head { border-bottom: 1px solid var(--lul-line); }

.slide-foot {
  border-top: 1px solid var(--lul-line);
  color: var(--lul-white);
  font: 700 14px / 1.2 var(--lul-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.slide-body {
  position: relative;
  z-index: 1;
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  justify-content: center;
  padding: 28px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.brand img { display: block; width: 200px; height: auto; }

.section-tag,
.slide-number {
  overflow: hidden;
  color: var(--lul-white);
  font: 700 14px / 1 var(--lul-mono);
  letter-spacing: 0.13em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.section-tag b { color: var(--lul-cyan); }

h1,
h2,
h3,
p,
figure,
pre { margin: 0; }

h1 {
  max-width: 10ch;
  font-size: 124px;
  font-weight: 750;
  letter-spacing: -0.062em;
  line-height: 0.9;
}

h2 {
  max-width: 16ch;
  font-size: 92px;
  font-weight: 730;
  letter-spacing: -0.052em;
  line-height: 0.96;
}

h3 {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.accent { color: var(--lul-blue-bright); }
.cool { color: var(--lul-cyan); }
.success { color: var(--lul-green); }
.warning { color: var(--lul-amber); }
.risk { color: var(--lul-red); }
.muted { color: var(--lul-muted); }

.eyebrow {
  margin-bottom: 18px;
  color: var(--lul-white);
  font: 800 16px / 1 var(--lul-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.lede {
  max-width: 46ch;
  margin-top: 28px;
  color: var(--lul-white);
  font-size: 32px;
  letter-spacing: -0.018em;
  line-height: 1.38;
}

.source-note {
  color: var(--lul-white);
  font: 600 14px / 1.35 var(--lul-mono);
}

.source-citation {
  margin-top: 10px;
  color: var(--lul-white);
  font: 650 14px / 1.35 var(--lul-mono);
  letter-spacing: 0.01em;
  overflow-wrap: anywhere;
}

.source-citation a {
  text-decoration-color: var(--lul-cyan);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.reveal { opacity: 0; transform: translateY(16px); }
.is-active .reveal { animation: rise 500ms var(--ease-out) forwards; }
.is-active .reveal:nth-child(2) { animation-delay: 70ms; }
.is-active .reveal:nth-child(3) { animation-delay: 140ms; }
.is-active .reveal:nth-child(4) { animation-delay: 210ms; }

@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

.has-step-builds .slide.is-active [data-step] {
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 240ms ease, transform 300ms var(--ease-out), visibility 0s 300ms;
}

.has-step-builds .slide.is-active [data-step].is-revealed {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition-delay: 0s;
}

.layout-cover .slide-body,
.layout-split .slide-body {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 80px;
  align-items: center;
}

.cover-copy { position: relative; z-index: 2; }

.cover-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-top: 30px;
  color: var(--lul-white);
  font: 700 16px / 1.4 var(--lul-mono);
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.layout-statement .slide-body { align-items: flex-start; }
.layout-statement h2 { max-width: 18ch; font-size: 114px; line-height: 0.92; }

.media-frame {
  padding: 10px;
  border: 1px solid var(--lul-line);
  background: #07090d;
  box-shadow: 0 28px 86px rgba(0, 0, 0, 0.46);
}

.media-frame img,
.media-frame video { display: block; width: 100%; max-height: 540px; object-fit: contain; }
.media-frame figcaption { margin-top: 10px; color: var(--lul-white); font: 650 14px / 1.35 var(--lul-mono); }

.code-frame {
  padding: 22px 24px;
  border: 1px solid var(--lul-line);
  background: var(--lul-panel);
  color: rgba(255, 255, 255, 0.86);
  font: 600 18px / 1.55 var(--lul-mono);
  white-space: pre-wrap;
}

.code-frame mark { padding: 0 3px; background: rgba(43, 99, 255, 0.25); color: var(--lul-white); }

.speaker-notes { display: none; }

.notes-panel {
  position: fixed;
  z-index: 10;
  right: 18px;
  bottom: 74px;
  display: none;
  width: min(460px, calc(100vw - 36px));
  max-height: min(50vh, 420px);
  padding: 22px 24px;
  overflow: auto;
  border: 1px solid var(--lul-line);
  background: rgba(10, 11, 16, 0.97);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.64);
  color: rgba(255, 255, 255, 0.88);
  font-size: 15px;
  line-height: 1.55;
}

body.notes-open .notes-panel { display: block; }

.deck-ui {
  position: fixed;
  z-index: 20;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(14px, env(safe-area-inset-bottom));
  left: max(16px, env(safe-area-inset-left));
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.deck-ui button {
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--lul-line);
  border-radius: 50%;
  background: rgba(10, 11, 16, 0.88);
  color: var(--lul-white);
  cursor: pointer;
  opacity: 0.55;
  place-items: center;
  pointer-events: auto;
  transition: opacity 160ms ease, border-color 160ms ease;
}

.deck-ui button:hover,
.deck-ui button:focus-visible { border-color: var(--lul-blue-bright); opacity: 1; outline: none; }
.deck-ui button:disabled { cursor: default; opacity: 0.22; }

.deck-status {
  display: flex;
  min-width: 112px;
  height: 44px;
  align-items: center;
  gap: 10px;
  padding: 0 13px;
  border: 1px solid var(--lul-line);
  background: rgba(10, 11, 16, 0.88);
  color: var(--lul-muted);
  font: 700 10px / 1 var(--lul-mono);
  pointer-events: auto;
}

.deck-progress { position: relative; flex: 1; height: 2px; overflow: hidden; background: var(--lul-line); }
.deck-progress > span { display: block; width: 0; height: 100%; background: var(--lul-blue-bright); transition: width 260ms var(--ease-out); }
.deck-spacer { flex: 1; }

.help-dialog {
  position: fixed;
  z-index: 30;
  inset: 0;
  display: none;
  place-items: center;
  background: rgba(0, 0, 0, 0.78);
}

.help-dialog[open] { display: grid; }

.help-card {
  width: min(560px, calc(100vw - 36px));
  padding: 26px;
  border: 1px solid var(--lul-line);
  background: var(--lul-panel);
}

.help-card h2 { font-size: 30px; }
.help-card dl { display: grid; grid-template-columns: 110px 1fr; gap: 12px 20px; margin: 24px 0 0; }
.help-card dt { color: var(--lul-cyan); font: 800 11px / 1.4 var(--lul-mono); }
.help-card dd { margin: 0; color: var(--lul-muted); font-size: 14px; }

body.presenter-mode .notes-panel {
  top: 24px;
  right: 24px;
  bottom: 24px;
  display: block;
  width: calc(32vw - 48px);
  max-height: none;
}

@media (max-width: 700px) {
  .deck-status { min-width: 96px; }
  .deck-ui .optional-control { display: none; }
  .notes-panel { bottom: 70px; max-height: 62vh; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .reveal { opacity: 1; transform: none; }
  .has-step-builds .slide.is-active [data-step] { opacity: 1; transform: none; }
}

@page { size: 16in 9in; margin: 0; }

@media print {
  html,
  body { height: auto; overflow: visible; background: var(--lul-black); print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .deck { position: static; width: 16in; height: auto; transform: none !important; overflow: visible; }
  .deck::before,
  .deck-ui,
  .notes-panel,
  .help-dialog { display: none !important; }
  .slide {
    position: relative;
    display: grid;
    width: 16in;
    height: 9in;
    break-after: page;
    page-break-after: always;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
  }
  .slide::after { height: 100%; }
  .reveal { opacity: 1 !important; transform: none !important; }
  [data-step] { opacity: 1 !important; transform: none !important; }
}
