/* deck.css — the look of the "Agentes Autônomos na Prática" deck, shared by every slide page.
   Red Hat brand (white, #151515 text, #ee0000 red, Red Hat Display/Text/Mono from ../assets/fonts/),
   the slide components, the motion, the chrome deck.js draws, the dark 3D pages and the Ato 5 frame.
   The same model as the other decks in docs/presentation (see .claude/skills/deck/SKILL.md). */
  /* Red Hat brand type — self-hosted (latin subset) in assets/fonts/ */
  @font-face { font-family: "Red Hat Display"; font-style: normal; font-weight: 300 900; font-display: swap; src: url("../assets/fonts/RedHatDisplay-VF.woff2") format("woff2"); }
  @font-face { font-family: "Red Hat Text"; font-style: normal; font-weight: 300 700; font-display: swap; src: url("../assets/fonts/RedHatText-VF.woff2") format("woff2"); }
  @font-face { font-family: "Red Hat Mono"; font-style: normal; font-weight: 300 700; font-display: swap; src: url("../assets/fonts/RedHatMono-VF.woff2") format("woff2"); }
  h1, h2, h3, .thesis, .big-num, .stat .v, .brand { font-family: "Red Hat Display", "Red Hat Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
  :root {
    --rh-red: #ee0000;
    --rh-red-soft: #ee0000;
    --bg: #ffffff;
    --bg-2: #f5f5f5;
    --panel: #f5f5f5;
    --line: #d2d2d2;
    --text: #151515;
    --muted: #6a6e73;
    --ok: #3e8635;
    --accent: #0066cc;
    --warn: #b98412;
    --violet: #6753ac;
    /* cast colours (same as the Situation Room) */
    --maestro: #5752d1;
    --atlas: #008bad;
    --sentinel: #3e8635;
    --loki: #c9190b;
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  html, body { height: 100%; }
  body {
    background: var(--bg);
    color: var(--text);
    font-family: "Red Hat Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, sans-serif;
    overflow: hidden;
  }
  .slide {
    position: absolute; inset: 0;
    display: none; flex-direction: column; justify-content: center;
    padding: 6vh 9vw;
    opacity: 0; transition: opacity .35s ease;
  }
  .slide.active { display: flex; opacity: 1; }
  .kicker {
    display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
    text-transform: uppercase; letter-spacing: 2px; font-size: 13px; font-weight: 700;
    color: var(--rh-red-soft); margin-bottom: 18px;
  }
  .kicker::before { content: "🎩"; }
  h1 { font-size: clamp(30px, 5vw, 62px); line-height: 1.05; font-weight: 800; letter-spacing: -1px; }
  h2 { font-size: clamp(26px, 3.6vw, 44px); line-height: 1.1; font-weight: 800; letter-spacing: -.5px; margin-bottom: 10px; }
  h1 .hl, h2 .hl { color: var(--rh-red-soft); }
  .lead { font-size: clamp(17px, 1.9vw, 23px); color: var(--muted); max-width: 60ch; margin-top: 14px; line-height: 1.5; }
  .lead b { color: var(--text); }
  .cols { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; margin-top: 26px; }
  @media (max-width: 900px) { .cols { grid-template-columns: 1fr; gap: 24px; } }
  ul.points { list-style: none; margin-top: 18px; display: flex; flex-direction: column; gap: 14px; }
  ul.points li { display: flex; gap: 12px; font-size: clamp(15px,1.7vw,20px); line-height: 1.4; }
  ul.points li b { color: var(--text); }
  ul.points .ic { flex-shrink: 0; width: 30px; text-align: center; }

  /* callout */
  .try {
    margin-top: 26px; align-self: flex-start;
    display: flex; gap: 14px; align-items: flex-start;
    background: linear-gradient(180deg, #f0f0f0, #f5f5f5);
    border: 1px solid var(--line); border-left: 4px solid var(--ok);
    border-radius: 12px; padding: 16px 20px; max-width: 76ch;
  }
  .try .t-ic { font-size: 22px; }
  .try .t-title { font-weight: 800; color: var(--ok); font-size: 13px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
  .try .t-body { font-size: clamp(14px,1.5vw,17px); color: var(--text); line-height: 1.5; }
  .try.warn { border-left-color: var(--warn); }
  .try.warn .t-title { color: var(--warn); }
  .try.red { border-left-color: var(--rh-red-soft); }
  .try.red .t-title { color: var(--rh-red-soft); }
  .chip { display: inline-block; background: #ffffff; border: 1px solid var(--line); border-radius: 7px; padding: 1px 8px; font-weight: 700; }

  /* pill row */
  .pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
  .pill { background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-size: 15px; font-weight: 600; color: var(--muted); }
  .pill b { color: var(--text); }

  /* steps */
  .loop { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
  .loop .step {
    flex: 1 1 180px; background: var(--panel); border: 1px solid var(--line);
    border-radius: 14px; padding: 20px; position: relative;
  }
  .loop .step .n { font-size: 12px; color: var(--rh-red-soft); font-weight: 800; letter-spacing: 1px; }
  .loop .step .s-t { font-size: 19px; font-weight: 800; margin: 6px 0; }
  .loop .step .s-d { font-size: 14px; color: var(--muted); line-height: 1.4; }
  .loop .step.hot { border-color: var(--rh-red-soft); box-shadow: 0 0 0 1px var(--rh-red-soft), 0 10px 30px -12px var(--rh-red-soft); }

  /* cards */
  .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 24px; }
  .grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 24px; }
  @media (max-width: 900px){ .grid2, .grid4 { grid-template-columns: 1fr; } }
  .card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; }
  .card h3 { font-size: 19px; margin-bottom: 8px; display: flex; align-items: center; gap: 10px; }
  .card p { color: var(--muted); font-size: 15px; line-height: 1.5; }
  .card .tag { font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--rh-red-soft); font-weight: 800; margin-bottom: 8px; }
  .card.c { --c: var(--accent); border-color: var(--c); box-shadow: 0 0 0 1px var(--c), 0 10px 24px -18px var(--c); }
  .card.c .tag { color: var(--c); }
  .big-num { font-size: clamp(40px,6vw,72px); font-weight: 800; color: var(--rh-red-soft); line-height: 1; }
  .center { align-items: center; text-align: center; }
  .center .lead { margin-left: auto; margin-right: auto; }
  .center .kicker { align-self: center; }

  /* clock tag (the same Friday, act by act) */
  .clock {
    position: absolute; top: 5vh; right: 9vw;
    font-family: "Red Hat Mono", ui-monospace, Menlo, monospace; font-size: clamp(14px,1.4vw,18px);
    color: var(--rh-red-soft); background: #f5f5f5; border: 1px solid var(--line);
    border-radius: 10px; padding: 8px 14px; letter-spacing: 1px;
  }
  .clock::before { content: "⏱ "; }

  /* agenda rows */
  .agenda { display: flex; flex-direction: column; gap: 10px; margin-top: 26px; max-width: 900px; }
  .agenda .row {
    display: grid; grid-template-columns: 110px 1fr auto; gap: 18px; align-items: center;
    background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px;
  }
  .agenda .t { font-family: "Red Hat Mono", ui-monospace, Menlo, monospace; color: var(--rh-red-soft); font-weight: 800; }
  .agenda .w { font-size: clamp(16px,1.7vw,20px); font-weight: 700; }
  .agenda .who { color: var(--muted); font-size: 14px; white-space: nowrap; }

  /* compare panels */
  .compare { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 26px; }
  @media (max-width: 900px){ .compare { grid-template-columns: 1fr; } }
  .compare .panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; }
  .compare .panel.hot { border-color: var(--rh-red-soft); box-shadow: 0 0 0 1px var(--rh-red-soft), 0 12px 30px -16px var(--rh-red-soft); }
  .compare h3 { font-size: 20px; margin-bottom: 2px; }
  .compare .sub { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 12px; }
  .compare ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
  .compare li { font-size: clamp(14px,1.5vw,17px); line-height: 1.4; color: var(--text); padding-left: 18px; position: relative; }
  .compare li::before { content: "▸"; position: absolute; left: 0; color: var(--muted); }
  .compare .panel.hot li::before { color: var(--rh-red-soft); }
  .thesis {
    margin-top: 22px; align-self: center; text-align: center;
    font-size: clamp(18px,2.2vw,28px); font-weight: 800; letter-spacing: -.3px;
  }
  .thesis .hl { color: var(--rh-red-soft); }

  /* table */
  .tbl { width: 100%; border-collapse: separate; border-spacing: 0; margin-top: 22px; font-size: clamp(13px,1.35vw,16px); }
  .tbl th, .tbl td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.35; }
  .tbl th { font-size: 12px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); font-weight: 800; }
  .tbl td:first-child { font-weight: 800; white-space: nowrap; }
  .tbl tr:nth-child(even) td { background: #f5f5f5; }
  .tbl td.rh { color: var(--rh-red-soft); font-weight: 800; }

  /* stat tiles */
  .stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 24px; }
  @media (max-width: 900px){ .stats { grid-template-columns: 1fr 1fr; } }
  .stat { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
  .stat .v { font-size: clamp(26px,3vw,40px); font-weight: 800; color: var(--rh-red-soft); line-height: 1; }
  .stat .l { font-size: 14px; color: var(--muted); margin-top: 10px; line-height: 1.45; }
  .stat .ic { font-size: 24px; margin-bottom: 8px; }

  /* platform layers */
  .layers { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
  .layer {
    display: grid; grid-template-columns: 190px 1fr; gap: 16px; align-items: center;
    background: var(--panel); border: 1px solid var(--l-color, var(--line)); border-radius: 14px; padding: 12px 18px;
    box-shadow: 0 0 0 1px var(--l-color, transparent);
  }
  .layer .l-name { font-weight: 800; font-size: 16px; color: var(--l-color, var(--text)); }
  .layer .l-items { display: flex; flex-wrap: wrap; gap: 8px; }
  .layer .l-items span { background: #ffffff; border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px; font-size: 13px; font-weight: 600; }
  .layer.ag { --l-color: var(--rh-red-soft); }
  .layer.gw { --l-color: var(--warn); }
  .layer.ev { --l-color: var(--violet); }
  .layer.hd { --l-color: var(--ok); }
  .layer.pl { --l-color: var(--accent); }

  /* presenter notes (press N) */
  .notes { display: none; }
  body.show-notes .slide.active .notes {
    display: block; position: fixed; left: 0; right: 0; bottom: 46px; max-height: 34vh; overflow: auto;
    background: rgba(255,255,255,.97); border-top: 2px solid var(--warn); padding: 14px 26px;
    font-size: 15px; line-height: 1.5; color: var(--text); z-index: 20;
  }
  .notes b { color: var(--warn); }

  /* footer / nav */
  .footer {
    position: fixed; bottom: 0; left: 0; right: 0;
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 26px; font-size: 12px; color: var(--muted);
    pointer-events: none;
  }
  .dots { display: flex; gap: 7px; pointer-events: auto; }
  .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); cursor: pointer; transition: all .2s; }
  .dot.active { background: var(--rh-red); transform: scale(1.25); }
  .brand { font-weight: 800; letter-spacing: .5px; }
  .brand span { color: var(--rh-red-soft); }
  .progress { position: fixed; top: 0; left: 0; height: 3px; background: var(--rh-red); transition: width .35s ease; z-index: 10; }
  .arrow-btn {
    position: fixed; top: 50%; transform: translateY(-50%);
    background: var(--panel); border: 1px solid var(--line); color: var(--text);
    width: 46px; height: 46px; border-radius: 50%; font-size: 20px; cursor: pointer;
    display: flex; align-items: center; justify-content: center; z-index: 10; opacity: .55;
    transition: opacity .2s;
  }
  .arrow-btn:hover { opacity: 1; }
  #prev { left: 18px; } #next { right: 18px; }

  /* deck-specific: motion ------------------------------------------------
     Every entrance is CSS-only and restarts when a slide becomes .active
     (display:none -> flex re-runs the animations). The whole sequence of a
     slide finishes in < 1.4 s so shots.sh (1.5 s virtual budget) still
     captures the final state. */
  :root { --ease: cubic-bezier(.2, .7, .2, 1); }
  @keyframes fade      { from { opacity: 0; } to { opacity: 1; } }
  @keyframes rise      { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
  @keyframes hero      { from { opacity: 0; transform: translateY(26px) scale(.96); } to { opacity: 1; transform: none; } }
  @keyframes slide-l   { from { opacity: 0; transform: translateX(-22px); } to { opacity: 1; transform: none; } }
  @keyframes slide-r   { from { opacity: 0; transform: translateX(22px); } to { opacity: 1; transform: none; } }
  @keyframes pop       { 0% { opacity: 0; transform: scale(.7); } 70% { opacity: 1; transform: scale(1.05); } 100% { opacity: 1; transform: none; } }
  @keyframes big-pop   { 0% { opacity: 0; transform: scale(.3) rotate(-8deg); } 60% { opacity: 1; transform: scale(1.15) rotate(2deg); } 100% { opacity: 1; transform: none; } }
  @keyframes underline { from { background-size: 0% .12em; } to { background-size: 100% .12em; } }
  @keyframes tip-hat   { 0%, 100% { transform: none; } 30% { transform: rotate(-22deg) translateY(-3px); } 60% { transform: rotate(8deg); } }
  @keyframes ping      { 0% { box-shadow: 0 0 0 0 rgba(238, 0, 0, .35); } 100% { box-shadow: 0 0 0 12px rgba(238, 0, 0, 0); } }
  @keyframes drift     { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-5%, 4%) scale(1.06); } }
  @keyframes grow-w    { from { transform: scaleX(0); } to { transform: scaleX(1); } }


  /* slide entrance */
  .slide.active { animation: fade .4s ease both; }
  .slide.active .kicker { animation: slide-l .45s var(--ease) both; }
  .slide.active .kicker::before { animation: tip-hat .7s ease .45s both; }
  .slide.active h1, .slide.active h2 { animation: rise .5s var(--ease) .08s both; }
  .slide.center.active h1 { animation: hero .6s var(--ease) .08s both; }
  .slide.active .lead { animation: rise .5s var(--ease) .25s both; }
  .slide.active .lead + .lead { animation-delay: .55s; }
  .slide.active .clock { animation: slide-r .5s var(--ease) .35s both; }

  /* builds: a .frag waits for → (one per press — deck.js). Arriving by ←, dot, menu or URL shows them all;
     while hidden nothing inside it animates, so its entrance (and the .hl underline) plays on reveal. */
  .slide.active .frag:not(.shown) { opacity: 0 !important; pointer-events: none; }
  .slide.active .frag:not(.shown), .slide.active .frag:not(.shown) *,
  .slide.active .frag:not(.shown) *::before, .slide.active .frag:not(.shown) *::after { animation: none !important; }
  .slide.active .frag.shown { animation: rise .5s var(--ease) both; }
  .slide.center.active h1.frag.shown { animation: hero .6s var(--ease) both; }

  /* the red highlight underlines itself after the title lands */
  h1 .hl, h2 .hl {
    background-image: linear-gradient(rgba(238, 0, 0, .18), rgba(238, 0, 0, .18));
    background-repeat: no-repeat; background-position: 0 92%; background-size: 100% .12em;
  }
  .slide.active h1 .hl, .slide.active h2 .hl { animation: underline .55s var(--ease) .55s both; }

  /* staggered groups: rows, steps, cards, bullets, panels, tiles, pills */
  .slide.active :is(.agenda .row, .loop .step, .grid2 > .card, .grid4 > .card, ul.points > li, .compare .panel, .stats .stat) {
    animation: rise .5s var(--ease) both;
  }
  .slide.active .pills .pill { animation: pop .45s var(--ease) both; }
  .slide.active .tbl tbody tr { animation: fade .5s ease both; }
  .slide.active .tbl thead tr { animation: fade .4s ease .3s both; }
  .slide.active :is(.agenda .row, .loop .step, .grid2 > .card, .grid4 > .card, ul.points > li, .compare .panel, .stats .stat, .pills .pill, .tbl tbody tr):nth-child(1) { animation-delay: .32s; }
  .slide.active :is(.agenda .row, .loop .step, .grid2 > .card, .grid4 > .card, ul.points > li, .compare .panel, .stats .stat, .pills .pill, .tbl tbody tr):nth-child(2) { animation-delay: .40s; }
  .slide.active :is(.agenda .row, .loop .step, .grid2 > .card, .grid4 > .card, ul.points > li, .compare .panel, .stats .stat, .pills .pill, .tbl tbody tr):nth-child(3) { animation-delay: .48s; }
  .slide.active :is(.agenda .row, .loop .step, .grid2 > .card, .grid4 > .card, ul.points > li, .compare .panel, .stats .stat, .pills .pill, .tbl tbody tr):nth-child(4) { animation-delay: .56s; }
  .slide.active :is(.agenda .row, .loop .step, .grid2 > .card, .grid4 > .card, ul.points > li, .compare .panel, .stats .stat, .pills .pill, .tbl tbody tr):nth-child(5) { animation-delay: .64s; }
  .slide.active :is(.agenda .row, .loop .step, .grid2 > .card, .grid4 > .card, ul.points > li, .compare .panel, .stats .stat, .pills .pill, .tbl tbody tr):nth-child(6) { animation-delay: .72s; }
  .slide.active :is(.agenda .row, .loop .step, .grid2 > .card, .grid4 > .card, ul.points > li, .compare .panel, .stats .stat, .pills .pill, .tbl tbody tr):nth-child(7) { animation-delay: .80s; }
  .slide.active :is(.agenda .row, .loop .step, .grid2 > .card, .grid4 > .card, ul.points > li, .compare .panel, .stats .stat, .pills .pill, .tbl tbody tr):nth-child(8) { animation-delay: .88s; }
  /* the second row of pills on the last slide comes after the first */
  .slide.active .pills + .pills .pill { animation-delay: .8s; }

  /* two-column slides: the side card pops in after the bullets */
  .slide.active .cols > .card { animation: pop .55s var(--ease) .6s both; }
  .slide.active .big-num { animation: big-pop .7s var(--ease) .8s both; }

  /* the platform stack builds itself from the bottom up */
  .slide.active .layers .layer { animation: slide-l .5s var(--ease) both; }
  .slide.active .layers .layer:nth-last-child(1) { animation-delay: .30s; }
  .slide.active .layers .layer:nth-last-child(2) { animation-delay: .42s; }
  .slide.active .layers .layer:nth-last-child(3) { animation-delay: .54s; }
  .slide.active .layers .layer:nth-last-child(4) { animation-delay: .66s; }
  .slide.active .layers .layer:nth-last-child(5) { animation-delay: .78s; }

  /* takeaways come last */
  .slide.active .try { animation: rise .5s var(--ease) .85s both; }
  .slide.active .thesis { animation: pop .55s var(--ease) .85s both; }
  .stat .v { display: inline-block; }
  .slide.active .stat .v { animation: pop .5s var(--ease) both; }
  .slide.active .stat:nth-child(1) .v { animation-delay: .55s; }
  .slide.active .stat:nth-child(2) .v { animation-delay: .63s; }
  .slide.active .stat:nth-child(3) .v { animation-delay: .71s; }
  .slide.active .stat:nth-child(4) .v { animation-delay: .79s; }

  /* the "hot" element keeps a soft red ping while the slide is on screen */
  .compare .panel { position: relative; }
  .loop .step.hot::after, .compare .panel.hot::after {
    content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
    animation: ping 2.4s ease-out 1.4s infinite;
  }

  /* pointer feedback (also nice on the touch screen) */
  .card, .loop .step, .stat, .agenda .row, .layer { transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
  .card:hover, .loop .step:hover, .stat:hover, .agenda .row:hover, .layer:hover { transform: translateY(-4px); box-shadow: 0 16px 30px -18px rgba(21, 21, 21, .35); }
  /* once the entrance has played, let hover own the transform again */
  .slide.active :is(.card, .loop .step, .stat, .agenda .row, .layer):hover { animation-fill-mode: backwards; }
  .card.c:hover { box-shadow: 0 0 0 1px var(--c), 0 18px 32px -16px var(--c); }
  .arrow-btn { transition: opacity .2s, transform .2s var(--ease); }
  .arrow-btn:hover { transform: translateY(-50%) scale(1.12); }
  .dot.active { animation: ping 1.2s ease-out both; }

  @media (prefers-reduced-motion: reduce) {
    .bg, .slide.active, .slide.active *, .slide.active *::before, .slide.active *::after, .dot.active { animation: none !important; }
  }





  /* Ato 5 · the animated slides run in an isolated frame (its document is the art-src block below);
     the deck's slides here are slots that keep dots, counter, notes and deep links in sync. */
  .slide.embed { pointer-events: none; z-index: 6; }   /* above the frame, so the presenter notes (N) stay readable */
  .slide.embed .notes { pointer-events: auto; }
  .art-frame {
    position: fixed; left: 0; top: 0; width: 100%; height: calc(100% - 46px); border: 0; background: transparent;
    z-index: 5; visibility: hidden; opacity: 0; transition: opacity .3s ease;
  }
  .art-frame.on { visibility: visible; opacity: 1; }

  /* deck-specific: 3D scene (cover + playground) -------------------------
     Two slides carry class .scene3d and go dark: the cover and the Ato 2 playground (.play).
     The three.js canvas sits under the deck; body.dark flips the tokens and fades it in,
     body.play lets pointer events through to the canvas (drag to orbit, click an agent). */
  /* z-index 0, not -1: a negative z-index would paint (and hit-test) under the body box, so the
     canvas would never receive the pointer on the playground slides */
  #scene { position: fixed; inset: 0; z-index: 0; display: block; pointer-events: none; }
  body.dark, body:has(.slide.scene3d), body:has(.slide.dark) { --bg: #151515; --text: #f0f0f0; --muted: #b8bbbe; --bg-2: rgba(255,255,255,.06); --panel: rgba(20,20,28,.72); --line: rgba(255,255,255,.16); }
  body.play #scene, body:has(.slide.play) #scene { pointer-events: auto; }
  /* cover only: a soft dark pool behind the title so it reads over the scene */
  #vignette { position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background: radial-gradient(ellipse 46% 40% at 50% 50%, rgba(21,21,21,.72) 0%, rgba(21,21,21,.4) 55%, rgba(21,21,21,0) 100%); }
  body.play #vignette { display: none; }
  @media (prefers-reduced-motion: reduce) { body, #scene, #vignette, #info { transition: none !important; } }
  body.dark .bg, body:has(.slide.scene3d) .bg, body:has(.slide.dark) .bg { display: none; }
  body.dark .clock { background: rgba(20,20,28,.7); }
  body.dark .arrow-btn { background: rgba(255,255,255,.06); }
  body.dark .pill { backdrop-filter: blur(6px); }
  body.dark h1 .hl { background-image: linear-gradient(rgba(238,0,0,.38), rgba(238,0,0,.38)); }
  body.play .slide.active { pointer-events: none; }
  body.play .slide.active > * { pointer-events: auto; }
  .slide.play { justify-content: flex-start; padding-top: 6vh; }
  .slide.play h1 { font-size: clamp(26px, 3.6vw, 44px); }
  .slide.play .lead { margin-top: 8px; }
  .slide.play .hint3d { margin-top: 12px; }
  .hint3d { font-family: "Red Hat Mono", ui-monospace, Menlo, monospace; font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); margin-top: 18px; }
  .hint3d b { color: var(--text); }
  .slide.active .hint3d { animation: rise .5s var(--ease) .5s both; }
  /* no WebGL (or module blocked on file://): the dark slides still get a red glow behind the text */
  body.dark.no-webgl .bg, body.dark.no-scene .bg {
    display: block; animation: none;
    background: radial-gradient(900px 600px at 50% 60%, rgba(238,0,0,.16), rgba(21,21,21,0) 60%);
  }

  /* info dialog (playground): the agent's card */
  #info {
    position: fixed; top: 50%; right: 3vw; transform: translateY(-50%) translateX(30px);
    width: min(360px, 86vw); max-height: 80vh; overflow-y: auto;
    background: rgba(16,16,24,.88); backdrop-filter: blur(14px); color: #f0f0f0;
    border: 1px solid rgba(255,255,255,.12); border-left: 3px solid var(--accent, #ee0000);
    border-radius: 12px; padding: 24px 26px; z-index: 20;
    opacity: 0; pointer-events: none; transition: opacity .35s ease, transform .35s ease;
  }
  #info.open { opacity: 1; pointer-events: auto; transform: translateY(-50%) translateX(0); }
  #info .i-kicker { font-family: "Red Hat Mono", ui-monospace, Menlo, monospace; font-size: 11px; letter-spacing: 4px; text-transform: uppercase; color: var(--accent, #ee0000); margin-bottom: 8px; }
  #info h3 { font-size: 24px; font-weight: 900; margin-bottom: 3px; }
  #info .i-role { font-size: 15px; color: #b8bbbe; margin-bottom: 14px; }
  #info p { font-size: 15px; color: #d2d2d2; line-height: 1.6; margin-bottom: 16px; }
  #info .i-row { display: grid; grid-template-columns: 96px 1fr; gap: 10px; padding: 7px 0; border-top: 1px solid rgba(255,255,255,.08); font-family: "Red Hat Mono", ui-monospace, Menlo, monospace; font-size: 12.5px; }
  #info .i-row .k { color: #8a8d90; text-transform: uppercase; letter-spacing: 1px; }
  #info .i-row .v { color: #f0f0f0; word-break: break-word; }
  #info .i-hint { margin-top: 14px; font-size: 12.5px; color: #8a8d90; font-style: italic; }
  #infoClose { position: absolute; top: 11px; right: 14px; background: none; border: none; color: #8a8d90; font-size: 22px; cursor: pointer; line-height: 1; }
  #infoClose:hover { color: #fff; }

  /* deck-specific: pages ------------------------------------------------
     Each slide is its own page: body holds one .slide, deck.js draws the chrome around it.
     The dark tokens are keyed on the slide's class (via :has) so a 3D page never flashes white. */
  body { position: relative; }
  .bg {
    position: absolute; inset: -15%; z-index: -1; pointer-events: none;
    background: radial-gradient(1200px 800px at 70% 5%, #fdecec 0%, rgba(255,255,255,0) 55%);
    animation: drift 22s ease-in-out infinite;
  }
  .dot { display: block; }
  .counter-wrap { display: flex; align-items: center; gap: 12px; pointer-events: auto; }
  .acts-btn {
    font: inherit; font-size: 12px; font-weight: 700; letter-spacing: .5px; color: var(--muted);
    background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; cursor: pointer;
    transition: color .2s, border-color .2s;
  }
  .acts-btn:hover, .acts[aria-expanded="true"] { color: var(--rh-red); border-color: var(--rh-red); }
  .acts {
    position: fixed; right: 26px; bottom: 44px; z-index: 30; min-width: 260px;
    background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 8px;
    box-shadow: 0 18px 40px -18px rgba(21, 21, 21, .45);
    display: none; flex-direction: column; gap: 2px;
  }
  .acts.open { display: flex; }
  .acts a {
    display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
    padding: 9px 12px; border-radius: 9px; text-decoration: none; color: var(--text); font-size: 14px; font-weight: 600;
  }
  .acts a small { color: var(--muted); font-weight: 500; font-size: 12px; white-space: nowrap; }
  .acts a:hover { background: var(--bg-2); }
  .acts a.cur { color: var(--rh-red); }
  .acts a.cur::before { content: "▸ "; }
  body.dark .acts { background: rgba(20,20,28,.96); }
  @media (prefers-reduced-motion: reduce) { .bg { animation: none !important; } }
