/* DDLS 2026 — Lab 1 onboarding walkthrough.
   Palette + type lifted from the course portal (deck.css) so the film and the real
   thing read as one product. Everything here is deterministic: no CSS animations
   that run on their own clock — the engine seeks, the DOM follows. */

:root{
  --paper:#f7f6f3; --ink:#141a24; --ink-2:#41505f; --ink-3:#6b7a8a;
  --rule:#d9d6cf; --rule-light:#e8e5de; --blue:#0b62b4; --blue-700:#094e90;
  --brand-50:#e4eef8; --brand-100:#d3e3f4;
  --deep:#0b1220; --deep-2:#131c30;
  --ok:#15803d; --warn:#b45309; --flag:#b91c1c;
  --serif:'Source Serif 4',Georgia,serif;
  --sans:'IBM Plex Sans','Helvetica Neue',Helvetica,sans-serif;
  --mono:'IBM Plex Mono','SFMono-Regular',Menlo,monospace;
}

*,*::before,*::after{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  background:transparent; color:var(--ink); font-family:var(--sans);
  -webkit-font-smoothing:antialiased;
}

/* ---------- player shell ---------- */
.player{
  position:relative; width:100%; max-width:1600px; margin:0 auto;
  background:var(--deep); border-radius:14px; overflow:hidden;
  box-shadow:0 18px 50px -20px rgba(11,18,32,.55), 0 2px 8px rgba(11,18,32,.12);
  font-size:16px;
}
.viewport{position:relative; width:100%; aspect-ratio:16/9; overflow:hidden; background:#0b1220}
.stage{
  position:absolute; top:0; left:0; width:1600px; height:900px;
  transform-origin:top left; background:var(--paper);
}

/* ---------- scenes ---------- */
.scene{
  position:absolute; inset:0; opacity:0; pointer-events:none;
  padding:0; background:var(--paper);
}
.scene.on{opacity:1}
.scene-head{
  position:absolute; top:36px; left:56px; right:56px;
  display:flex; align-items:baseline; gap:16px;
}
.scene-kicker{
  font-family:var(--mono); font-size:15px; letter-spacing:.14em; text-transform:uppercase;
  color:var(--blue); font-weight:500;
}
.scene-title{font-family:var(--serif); font-size:38px; font-weight:600; margin:0; letter-spacing:-.01em}
.scene-sub{font-size:19px; color:var(--ink-2); margin:8px 0 0}

/* fade/rise primitive — driven by the engine, never by CSS timing */
.fx{opacity:0; transform:translateY(10px)}

/* ---------- browser chrome ---------- */
.browser{
  position:absolute; background:#fff; border-radius:12px; overflow:hidden;
  box-shadow:0 24px 60px -28px rgba(11,18,32,.55), 0 0 0 1px var(--rule-light);
}
.browser-bar{
  height:44px; background:#eceae6; border-bottom:1px solid var(--rule);
  display:flex; align-items:center; gap:12px; padding:0 14px;
}
.dots{display:flex; gap:7px}
.dot{width:11px; height:11px; border-radius:50%}
.dot.r{background:#ff5f57} .dot.y{background:#febc2e} .dot.g{background:#28c840}
.urlbar{
  flex:1; height:26px; background:#fff; border:1px solid var(--rule); border-radius:13px;
  display:flex; align-items:center; gap:8px; padding:0 12px;
  font-family:var(--mono); font-size:12.5px; color:var(--ink-2); overflow:hidden; white-space:nowrap;
}
.urlbar .lock{color:var(--ok); flex:none; display:flex}
.browser-body{background:var(--paper); height:calc(100% - 44px); overflow:hidden; position:relative}

/* ---------- portal replica ---------- */
.pt-head{
  height:46px; background:rgba(255,255,255,.85); border-bottom:1px solid var(--rule-light);
  display:flex; align-items:center; justify-content:space-between; padding:0 22px;
}
.pt-brand{display:flex; align-items:center; gap:9px; font-weight:600}
.pt-logo{
  width:27px;height:27px;border-radius:8px;background:var(--brand-50);color:var(--blue);
  display:flex;align-items:center;justify-content:center
}
.pt-brand .nm{font-family:var(--serif); font-size:17px}
.pt-brand .sub{color:var(--ink-3); font-weight:400; font-size:13px}
.pt-nav{display:flex; align-items:center; gap:16px; font-size:13px; color:var(--ink-2)}
.pt-body{padding:26px 34px}
.card{background:#fff; border:1px solid var(--rule-light); border-radius:14px}
.h-display{font-family:var(--serif); font-weight:600; letter-spacing:-.01em}

.field{
  border:1px solid var(--rule); border-radius:9px; background:rgba(247,246,243,.5);
  padding:9px 12px; font-size:14.5px; color:var(--ink); min-height:38px;
  display:flex; align-items:center; overflow:hidden;
}
/* a long typed line scrolls, the way a real input does, instead of spilling out */
.field .v{white-space:nowrap; display:inline-block}
.field.focus{border-color:var(--blue); box-shadow:0 0 0 3px rgba(11,98,180,.18); background:#fff}
.field .ph{color:#9aa5b1}
.label{font-size:13px; font-weight:500; color:var(--ink-2); margin-bottom:5px}
.btn{
  background:var(--blue); color:#fff; border-radius:9px; padding:10px 16px;
  font-size:14.5px; font-weight:500; display:inline-flex; align-items:center; justify-content:center; gap:7px;
}
.btn.press{background:var(--blue-700); transform:translateY(1px)}
.btn-ghost{
  border:1px solid var(--rule); border-radius:9px; padding:7px 12px; font-size:13.5px;
  display:inline-flex; align-items:center; gap:7px; background:#fff; color:var(--ink)
}
.btn-ghost.press{background:#f1efeb}

/* chat */
.bubble{border-radius:16px; padding:9px 13px; font-size:14.5px; line-height:1.5; max-width:86%}
.bubble.me{background:var(--blue); color:#fff; border-bottom-right-radius:5px; margin-left:auto}
.bubble.them{background:#f1f2f4; color:var(--ink); border-bottom-left-radius:5px}
.bubble code{font-family:var(--mono); font-size:12.8px; background:rgba(11,18,32,.06); padding:1px 4px; border-radius:4px}

/* ---------- user message toolbar + interview coach (portal week page) ---------- */
.umsg{display:flex; flex-direction:column; align-items:flex-end; gap:6px}
.umsg-row{display:flex; align-items:flex-end; gap:6px; justify-content:flex-end}
.msg-actions{display:flex; align-items:center; gap:4px; opacity:0}
.umsg.hovered .msg-actions,
.umsg.pinned .msg-actions{opacity:1}   /* the latest question keeps its tools out */
.mact{
  width:24px; height:24px; border-radius:6px; display:flex; align-items:center;
  justify-content:center; color:#94a3b8; flex:none;
}
.mact.wand.hot{background:#ede9fe; color:#6d28d9}
.mact.del.hot{background:#fef2f2; color:#dc2626}
.mact.edit.hot{background:#fffbeb; color:#d97706}
.coach{background:#f5f3ff; border:1px solid #ddd6fe; border-radius:12px; padding:10px 12px; max-width:88%}
.coach-h{display:flex; align-items:center; justify-content:space-between; margin-bottom:6px}
.coach-h .t{display:flex; align-items:center; gap:6px; font-size:12px; font-weight:600; color:#6d28d9}
.coach-h .x{color:#a78bfa; display:flex}
.coach-b{font-size:12.8px; line-height:1.5; color:#1f2937}
.coach-b ul{margin:0; padding-left:15px}
.coach-b li{margin-bottom:5px}
.coach-b b{color:#111827}

/* "suggest what to ask next" popover, above the composer */
.sugg{background:#f5f3ff; border:1px solid #ddd6fe; border-radius:12px; padding:9px 11px; margin:0 12px 8px}
.sugg-h{display:flex; align-items:center; justify-content:space-between; margin-bottom:5px}
.sugg-h .t{display:flex; align-items:center; gap:6px; font-size:12px; font-weight:600; color:#6d28d9}
.sugg-h .x{color:#a78bfa; display:flex}
.sugg-item{
  font-size:12.8px; line-height:1.45; color:#1f2937; border-radius:8px;
  padding:5px 8px; margin-bottom:1px;
}
.sugg-item.hot{background:#ede9fe}
.sugg-btn{
  width:40px; border:1px solid #ddd6fe; border-radius:9px; color:#7c3aed; background:#fff;
  display:flex; align-items:center; justify-content:center; flex:none;
}
.sugg-btn.press{background:#f5f3ff; transform:translateY(1px)}

/* the browser's own confirm() sheet */
.confirm{
  /* centred with a margin, not a transform: enter()/exit() drive transform */
  position:absolute; left:50%; top:0; margin-left:-270px; width:540px;
  background:#fff; border-radius:0 0 12px 12px; padding:16px 20px 14px; z-index:40;
  box-shadow:0 20px 44px -14px rgba(11,18,32,.45), 0 0 0 1px rgba(11,18,32,.08);
}
.confirm .host{font-size:12.5px; color:#6b7a8a; margin-bottom:7px}
.confirm .msg{font-size:14px; color:#141a24; line-height:1.55; white-space:pre-line}
.confirm .row{display:flex; justify-content:flex-end; gap:8px; margin-top:14px}
.confirm .b{border:1px solid var(--rule); border-radius:8px; padding:6px 15px; font-size:13.5px; background:#fff}
.confirm .b.p{background:var(--blue); color:#fff; border-color:var(--blue)}
.confirm .b.press{transform:translateY(1px)}

/* ---------- OS columns ---------- */
.os-grid{position:absolute; left:56px; right:56px; top:170px; display:grid; grid-template-columns:repeat(3,1fr); gap:22px}
.os-col{transition:none}
.os-col.dim{opacity:.32; filter:grayscale(.5)}
/* once you are inside the terminal the three platforms converge — a solo stack holds all
   three variants in one place and shows only the one the viewer is on. */
.os-solo > .os-col{display:none}
.os-solo > .os-col.show{display:block}
.os-tag{
  display:flex; align-items:center; gap:8px; font-size:14.5px; font-weight:600; margin-bottom:10px; color:var(--ink-2)
}
.os-tag .badge{
  width:22px;height:22px;border-radius:6px;display:flex;align-items:center;justify-content:center;
  background:var(--brand-50); color:var(--blue)
}
.os-note{font-size:13px; color:var(--ink-3); margin-top:10px; line-height:1.45; min-height:54px}
.os-note b{color:var(--ink-2); font-weight:600}
/* the "your menu may not have it" half of each column */
.os-note.warm{
  background:#fffbeb; border:1px solid #fde68a; border-radius:9px;
  padding:9px 11px; color:#78350f;
}
.os-note.warm b{color:#92400e}
.os-note.warm code{background:rgba(146,64,14,.1); color:#7c2d12}

/* ---------- terminals ---------- */
.term{border-radius:10px; overflow:hidden; box-shadow:0 16px 40px -22px rgba(11,18,32,.6), 0 0 0 1px rgba(11,18,32,.14)}
.term-bar{height:30px; display:flex; align-items:center; padding:0 10px; gap:8px; font-size:11.5px; font-weight:500}
.term-body{
  font-family:var(--mono); font-size:12.6px; line-height:1.62; padding:11px 13px;
  white-space:pre-wrap; word-break:break-word; overflow:hidden;
}
/* windows terminal */
.term.win .term-bar{background:#2b2b2b; color:#cfcfcf}
.term.win .term-body{background:#0c0c0c; color:#cccccc}
.term.win .p{color:#e5e5e5}
/* macOS terminal */
.term.mac .term-bar{background:linear-gradient(#e8e6e3,#d8d5d1); color:#4a4a4a; border-bottom:1px solid #bdbab6; justify-content:center}
.term.mac .term-body{background:#ffffff; color:#1d1d1f}
.term.mac .p{color:#1d1d1f}
/* linux terminal */
.term.lin .term-bar{background:#38303c; color:#dcd6db}
.term.lin .term-body{background:#300a24; color:#e6e1e5}
.term.lin .p{color:#8ae234}
.term .path{color:#729fcf}
.term .dim{opacity:.62}
.term .ok{color:#4ec9b0}
.term .warn{color:#e5c07b}
.term .err{color:#e06c75}
.term.mac .ok{color:#0a7a5a} .term.mac .warn{color:#8a5a00} .term.mac .err{color:#b00020} .term.mac .path{color:#0b62b4}
.caret{display:inline-block; width:7px; height:15px; background:currentColor; vertical-align:-3px; opacity:.9}
.caret.off{opacity:0}

/* ---------- file managers ---------- */
.fm{border-radius:10px; overflow:hidden; background:#fff; box-shadow:0 16px 40px -24px rgba(11,18,32,.55), 0 0 0 1px var(--rule-light)}
.fm-bar{height:32px; display:flex; align-items:center; gap:9px; padding:0 11px; font-size:12px}
.fm.win .fm-bar{background:#f3f3f3; border-bottom:1px solid #e2e2e2; color:#3a3a3a}
.fm.mac .fm-bar{background:linear-gradient(#f6f6f6,#ececec); border-bottom:1px solid #dcdcdc; color:#4a4a4a; justify-content:center}
.fm.lin .fm-bar{background:#3b3b3b; color:#eaeaea}
.fm-body{height:150px; padding:12px; display:flex; flex-wrap:wrap; align-content:flex-start; gap:14px; position:relative; background:#fff}
.fm.lin .fm-body{background:#fbfbfb}
.file{width:96px; text-align:center; font-size:11.5px; color:var(--ink-2); line-height:1.3;
      overflow-wrap:anywhere; padding:4px 2px}
.file .ic{height:38px; display:flex; align-items:center; justify-content:center; color:#e0a92a}
.file.sel{background:var(--brand-50); border-radius:7px; outline:2px solid var(--brand-100)}
.ctx{
  position:absolute; background:#fff; border:1px solid var(--rule); border-radius:8px;
  box-shadow:0 14px 34px -12px rgba(11,18,32,.4); padding:5px; font-size:12px; min-width:186px; z-index:5;
}
.fm.lin .ctx{background:#2f2f2f; border-color:#4a4a4a; color:#eee}
.ctx div{padding:5px 9px; border-radius:5px; color:inherit}
.ctx div.hi{background:var(--blue); color:#fff}
.fm.lin .ctx div.hi{background:var(--blue)}

/* ---------- annotations ---------- */
.note{
  position:absolute; max-width:330px; background:var(--deep); color:#fff;
  border-radius:10px; padding:11px 14px; font-size:14.5px; line-height:1.45; z-index:20;
  box-shadow:0 16px 40px -18px rgba(11,18,32,.7);
}
.note b{color:#9ec5ee; font-weight:600}
.note::after{content:''; position:absolute; width:11px; height:11px; background:var(--deep); transform:rotate(45deg)}
.note.a-left::after{left:-5px; top:calc(50% - 5px)}
.note.a-right::after{right:-5px; top:calc(50% - 5px)}
.note.a-top::after{top:-5px; left:26px}
.note.a-bottom::after{bottom:-5px; left:26px}
.note.warm{background:#7c2d12}
.note.warm b{color:#fdba74}
.note.warm::after{background:#7c2d12}

/* highlight ring around a live element */
.ring{position:absolute; border:2.5px solid var(--blue); border-radius:11px; z-index:15; pointer-events:none;
      box-shadow:0 0 0 5px rgba(11,98,180,.16)}
.ring.warm{border-color:#c2410c; box-shadow:0 0 0 5px rgba(194,65,12,.16)}

/* ---------- cursor ---------- */
.cursor{position:absolute; width:26px; height:26px; z-index:40; pointer-events:none; opacity:0;
        filter:drop-shadow(0 3px 5px rgba(11,18,32,.42))}
.cursor .ripple{position:absolute; left:-9px; top:-9px; width:44px; height:44px; border-radius:50%;
                border:2px solid var(--blue); opacity:0; transform:scale(.3)}

/* ---------- title / recap cards ---------- */
.hero{position:absolute; inset:0; display:flex; flex-direction:column; justify-content:center; padding:0 110px}
.hero h1{font-family:var(--serif); font-size:60px; line-height:1.06; margin:0 0 14px; letter-spacing:-.02em}
/* title-card lines above and below the course name */
.hero .eyebrow{
  font-family:var(--mono); font-size:16px; letter-spacing:.16em; text-transform:uppercase;
  color:var(--blue); font-weight:500; margin:0 0 16px;
}
.hero h2{
  font-family:var(--serif); font-size:33px; font-weight:600; letter-spacing:-.01em;
  color:var(--ink-2); margin:0 0 20px; line-height:1.2;
}
.hero p{font-size:23px; color:var(--ink-2); margin:0; max-width:1080px; line-height:1.5}
.steps{display:grid; grid-template-columns:repeat(6,1fr); gap:14px; margin-top:52px}
.step{background:#fff; border:1px solid var(--rule-light); border-radius:12px; padding:15px 15px 17px}
.step .n{font-family:var(--mono); font-size:12px; color:var(--blue); letter-spacing:.1em}
.step .t{font-size:15.5px; font-weight:600; margin-top:7px; line-height:1.3}
.step .d{font-size:13px; color:var(--ink-3); margin-top:5px; line-height:1.4}

.two-agents{display:grid; grid-template-columns:1fr 76px 1fr; align-items:center; gap:0; margin-top:44px}
.agent-card{background:#fff; border:1px solid var(--rule-light); border-radius:14px; padding:20px 22px}
.agent-card .who{font-family:var(--mono); font-size:12.5px; letter-spacing:.12em; text-transform:uppercase; color:var(--blue)}
.agent-card h3{font-family:var(--serif); font-size:26px; margin:8px 0 8px; font-weight:600}
.agent-card p{margin:0; font-size:15.5px; color:var(--ink-2); line-height:1.5}
.you-link{text-align:center; font-size:13px; color:var(--ink-3); font-weight:600}

/* ---------- controls ---------- */
/* every dimension below is in em so the whole strip scales with the frame:
   engine.js sets .player font-size from the rendered width. */
.controls{
  display:flex; align-items:center; gap:.88em; padding:.7em 1em;
  background:var(--deep); color:#e8ecf2;
}
.ctrl-btn{
  width:2.1em; height:2.1em; border-radius:.56em; border:1px solid rgba(255,255,255,.16);
  background:rgba(255,255,255,.07); color:#fff; display:flex; align-items:center; justify-content:center;
  cursor:pointer; flex:none; padding:0;
}
.ctrl-btn svg{width:1.05em; height:1.05em}
.ctrl-btn:hover{background:rgba(255,255,255,.15)}
.scrub{flex:1; position:relative; height:1.5em; cursor:pointer; display:flex; align-items:center}
.scrub-track{position:absolute; left:0; right:0; height:.31em; border-radius:.19em; background:rgba(255,255,255,.16)}
.scrub-fill{position:absolute; left:0; height:.31em; border-radius:.19em; background:var(--blue)}
.scrub-marks{position:absolute; left:0; right:0; height:.31em}
.scrub-mark{position:absolute; top:0; width:2px; height:.31em; background:rgba(255,255,255,.5)}
.scrub-knob{position:absolute; width:.81em; height:.81em; border-radius:50%; background:#fff; box-shadow:0 1px 4px rgba(0,0,0,.5)}
.tcode{font-family:var(--mono); font-size:.78em; color:#a9b6c6; flex:none; min-width:6.4em; text-align:right}
.chapters{
  display:flex; gap:.44em; flex-wrap:wrap; padding:.7em 1em .88em; background:var(--deep-2);
  border-top:1px solid rgba(255,255,255,.07);
}
.chip{
  border:1px solid rgba(255,255,255,.16); background:rgba(255,255,255,.05); color:#c9d4e2;
  border-radius:999px; padding:.31em .69em; font-size:.78em; cursor:pointer; white-space:nowrap;
}
.chip:hover{background:rgba(255,255,255,.13); color:#fff}
.chip.on{background:var(--blue); border-color:var(--blue); color:#fff}
.chip .num{font-family:var(--mono); opacity:.72; margin-right:.46em; font-size:.9em}

.osfilter{display:flex; gap:.38em; align-items:center; margin-left:auto}
.osfilter .lbl{color:#8b98a8; font-size:.75em; margin-right:.15em}
.oschip{
  border:1px solid rgba(255,255,255,.16); background:rgba(255,255,255,.05); color:#c9d4e2;
  border-radius:.5em; padding:.25em .62em; font-size:.78em; cursor:pointer;
}
.oschip.on{background:#fff; color:var(--deep); border-color:#fff; font-weight:600}

/* narration strip under the stage */
.narration{
  padding:.81em 1.13em; background:#101a2c; color:#dfe7f1; font-size:.94em; line-height:1.5;
  border-top:1px solid rgba(255,255,255,.07); min-height:3.6em; display:flex; align-items:center; gap:.8em;
}
.narration .badge{
  font-family:var(--mono); font-size:.77em; letter-spacing:.1em; color:#8fb8e4;
  border:1px solid rgba(143,184,228,.35); border-radius:.4em; padding:.2em .47em; flex:none;
}

/* replay/overlay */
.overlay{
  position:absolute; inset:0; z-index:60; display:flex; align-items:center; justify-content:center;
  background:rgba(11,18,32,.58); cursor:pointer; backdrop-filter:blur(2px);
}
.overlay.hidden{display:none}
.overlay .box{background:rgba(255,255,255,.96); border-radius:.88em; padding:1.6em 1.9em; text-align:center; max-width:35em; margin:0 1em}
.overlay .box h2{font-family:var(--serif); font-size:1.85em; margin:0 0 .3em}
.overlay .box p{margin:0 0 1em; color:var(--ink-2); font-size:1em; line-height:1.5}
.overlay .play{
  width:3.9em;height:3.9em;border-radius:50%;background:var(--blue);color:#fff;display:flex;
  align-items:center;justify-content:center;margin:0 auto;
}
.overlay .play svg{width:1.7em; height:1.7em}

@media (max-width:820px){
  .controls{flex-wrap:wrap}
  .tcode{min-width:0}
  .osfilter{margin-left:0; width:100%; justify-content:flex-start}
}

/* ---------- compact chrome (narrow embeds) ---------- */
.player.compact .chapters{padding:.6em .8em .7em; gap:.34em}
/* on a phone the chapter list would be taller than the picture — one scrolling rail instead */
.player.tight .chapters{
  flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; -webkit-overflow-scrolling:touch;
}
.player.tight .chapters::-webkit-scrollbar{display:none}
.player.tight .chip{flex:none}
.player:fullscreen .chapters{flex-wrap:wrap; overflow-x:visible}
.player.compact .chip{font-size:.76em; padding:.3em .62em}
.player.compact .chip .num{margin-right:.34em}
.player.compact .controls{padding:.6em .8em; gap:.66em}
.player.compact .ctrl-btn{width:1.95em; height:1.95em; border-radius:.5em}
.player.compact .narration{padding:.7em .9em; font-size:.9em; min-height:3.3em}
.player.compact .oschip{font-size:.74em; padding:.22em .52em}
.player.compact .osfilter .lbl{font-size:.7em}
.player.compact .tcode{font-size:.74em; min-width:5.4em}

/* ---------- full screen, and the standalone page ---------- */
/* .fit is what the standalone page uses: the whole player is exactly one screen tall and
   the picture takes whatever the chrome leaves, so the controls are never below the fold. */
.player:fullscreen{
  border-radius:0; width:100%; max-width:none; height:100%;
  display:flex; flex-direction:column; background:var(--deep);
}
.player:fullscreen .viewport{flex:1 1 auto; aspect-ratio:auto; min-height:0; background:#0b1220}
/* Standalone: never TALLER than the screen, but never padded out to it either. A 16/9
   picture in a portrait phone would otherwise sit in a thick band of empty dark — which
   reads as "the video is blank". Shrink only when the chrome would push us off-screen. */
.player.fit{
  border-radius:0; width:100%; max-width:none;
  height:auto; max-height:100vh;
  display:flex; flex-direction:column; background:var(--deep);
}
.player.fit .viewport{flex:0 1 auto; aspect-ratio:16/9; min-height:0; background:#0b1220}
.player.fit .chapters{max-height:26vh; overflow:auto}
.player:fullscreen .chapters{max-height:22vh; overflow:auto; flex-wrap:wrap}
.player:fullscreen .overlay .box{max-width:44em}
