/* =========================================================
   Chapter transitions — six different film scenes.
   Built and animated by js/cuts.js. Laptop look is shared
   with the intro (css/intro.css: .laptop, .lid, .base, .kbd …).
   ========================================================= */

.cut { display: none; position: relative; background: #05070c; }
.cut.is-built { display: block; }
.cut__sticky {
  --w: min(700px, 60vw, 88vh);
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 15%, #0c111d 0%, #05070c 55%, #020305 100%);
}
.cut__room { position: absolute; inset: 0; pointer-events: none; }
.cut__cam { position: absolute; inset: 0; perspective: 2400px; perspective-origin: 50% 20%; display: grid; place-items: center; will-change: transform; }
.cut__flash { position: absolute; inset: 0; pointer-events: none; opacity: 0; background: var(--bg); z-index: 20; }
.cut .lid { transform: rotateX(20deg); }
.cut .laptop { transform: rotateX(-18deg); }
.cut .base__glow { opacity: 1; }
.fx { position: absolute; inset: 0; pointer-events: none; opacity: 0; z-index: 15; }
.vs { position: absolute; left: 0; top: 0; transform-origin: 0 0; overflow: hidden; }
.vs * { box-sizing: border-box; }
.g { color: var(--mint); }
.cut:not(.is-live) .clip *, .cut:not(.is-live) .cv__gen i, .cut:not(.is-live) .cv__cur,
.cut:not(.is-live) .s3-unit i, .cut:not(.is-live) .s6-stars i { animation-play-state: paused !important; }
.in-cut .rail { opacity: 0; pointer-events: none; }
.spark__text .hl { color: var(--mint); }

/* ---------- movie caption (lower third) ---------- */
.cut__lower { position: absolute; left: clamp(16px, 4vw, 64px); bottom: clamp(20px, 6vh, 64px); z-index: 12; pointer-events: none; }
.cut__lower p { margin: 0; }
.cut__label { font: 600 12px/1 var(--mono); letter-spacing: .3em; text-transform: uppercase; color: var(--amber); margin-bottom: 10px !important; display: flex; align-items: center; gap: 10px; }
.cut__label::before { content: ""; width: 26px; height: 2px; background: var(--amber); }
.cut__title { font-size: clamp(30px, 4.4vw, 60px); font-weight: 700; letter-spacing: -.035em; line-height: 1; color: #fff; text-shadow: 0 4px 30px rgba(0, 0, 0, .8); }
.cut__place { font: 500 13px/1.4 var(--mono); color: #9aa3b8; margin-top: 10px !important; text-shadow: 0 2px 10px #000; }

/* ---------- devices ---------- */
.mon { position: relative; width: var(--mw, 560px); }
.mon__panel { background: #0a0b0e; border-radius: 10px; padding: 1.4%; box-shadow: 0 0 0 1px #2c3038, 0 40px 80px -30px rgba(0, 0, 0, .9); }
.mon__scr { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 3px; background: #000; }
.mon__neck { width: 10%; height: calc(var(--mw, 560px) * .1); margin: 0 auto; background: linear-gradient(90deg, #22262d, #3a3f48, #22262d); }
.mon__foot { width: 34%; height: 10px; margin: 0 auto; border-radius: 8px 8px 3px 3px; background: linear-gradient(#3a3f48, #1b1e23); }
.phone { position: relative; width: var(--pw, 170px); padding: 3.2%; border-radius: 15% / 7%; background: #0b0d12; box-shadow: inset 0 0 0 2px #2c3140, 0 0 0 1px #000, 0 40px 70px -20px rgba(0, 0, 0, .9); }
.phone__scr { position: relative; aspect-ratio: 390 / 844; overflow: hidden; border-radius: 12% / 5.6%; background: #000; }
.phone__notch { position: absolute; left: 50%; top: 4.5%; width: 30%; height: 2.6%; margin-left: -15%; border-radius: 99px; background: #000; }
.tablet { position: relative; width: var(--tw, 360px); padding: 3%; border-radius: 6%; background: #0b0d12; box-shadow: inset 0 0 0 2px #2c3140, 0 40px 70px -20px rgba(0, 0, 0, .9); }
.tablet__scr { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 2%; background: #000; }

/* ---------- simple terminal screen (scenes 1 & 6) ---------- */
.pyt { width: 100%; height: 100%; background: #0c0c0c; display: flex; flex-direction: column; font: 26px/1.55 var(--mono); color: #cccccc; }
.pyt__bar { height: 46px; flex: none; display: flex; justify-content: space-between; align-items: center; padding: 0 18px; background: #1f1f1f; font: 17px/1 "Segoe UI", system-ui, sans-serif; color: #ddd; }
.pyt__body { padding: 22px 28px; }
.pyt__body p { margin: 0 0 4px; white-space: pre; }
.pyt__p { color: #8b8b8b; }
.pyt__o { color: #9d9d9d; }
.pyt__o--hi { color: #fff; font-weight: 700; text-shadow: 0 0 18px rgba(255, 255, 255, .4); }
.pyt__o--go { color: var(--mint); }
.pyt--ps { background: #012456; }
.pyt--ps .pyt__p { color: #e8e8e8; }

/* ---------- small terminal card (scenes 3 & 5) ---------- */
.s3-term, .s5-term {
  position: absolute; z-index: 8; width: min(400px, 40vw); padding-bottom: 12px; border-radius: 12px; overflow: hidden;
  background: rgba(10, 13, 22, .94); border: 1px solid rgba(255, 255, 255, .12); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .9);
  font: 13px/1.8 var(--mono); color: #c9d1e3;
}
.s3-term p, .s5-term p { margin: 0; padding: 0 16px; white-space: pre-wrap; }
.s3-term__bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; margin-bottom: 8px; border-bottom: 1px solid rgba(255, 255, 255, .08); color: #6b7386; font-size: 11px; }
.s3-term__bar i { width: 9px; height: 9px; border-radius: 50%; background: #ff5f57; }
.s3-term__bar i:nth-child(2) { background: #febc2e; } .s3-term__bar i:nth-child(3) { background: #28c840; }
.s3-term__bar span { margin-left: 6px; }

/* ---------- clips ---------- */
.clip {
  position: absolute; z-index: 9; margin: 0; width: clamp(200px, 20vw, 290px); border-radius: 12px; overflow: hidden;
  background: rgba(12, 15, 24, .92); border: 1px solid rgba(255, 255, 255, .12); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .9);
}
.clip--a { left: clamp(12px, 3.5vw, 60px); top: clamp(84px, 14vh, 150px); }
.clip--b { right: clamp(12px, 3.5vw, 60px); top: clamp(84px, 14vh, 150px); }
.clip figcaption { display: flex; align-items: center; gap: 7px; padding: 8px 12px; border-bottom: 1px solid rgba(255, 255, 255, .08); font: 600 10px/1 var(--mono); letter-spacing: .12em; color: #ff6b6b; }
.clip figcaption i { width: 7px; height: 7px; border-radius: 50%; background: #ff4d4d; animation: blink 1.2s steps(1) infinite; }
.clip figcaption span { color: #9aa3b8; letter-spacing: .02em; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clip__tc { margin-left: auto; font-style: normal; color: #cfd6e6; font-variant-numeric: tabular-nums; }
.clip__body { position: relative; padding: 14px; font: 12px/1.6 var(--mono); color: #c9d1e3; }
.clip__body::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .25; background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .04) 0 1px, transparent 1px 3px); }
.clip__cap { margin: 8px 0 0; font-size: 11px; color: #8b93a7; }
.clip__svg { display: block; width: 100%; height: auto; }
.clip__svg .ax { fill: none; stroke: rgba(255, 255, 255, .18); stroke-width: 1.5; }
.clip__svg .draw { fill: none; stroke: var(--mint); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 320; stroke-dashoffset: 320; animation: cDraw 3.2s ease-in-out infinite; filter: drop-shadow(0 0 6px rgba(94, 242, 194, .6)); }
@keyframes cDraw { 0% { stroke-dashoffset: 320; } 60%, 90% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 0; opacity: 0; } }
.clip__svg .dot { fill: #fff; animation: cDot 3.2s ease-in-out infinite; }
@keyframes cDot { 0% { transform: translate(0, 0); } 60% { transform: translate(180px, 0); } 100% { transform: translate(180px, 0); opacity: 0; } }
.clip__slide { background: #f4f2ea; color: #1b1e27; border-radius: 6px; padding: 12px 14px; font-family: var(--font); }
.clip__slide b { display: block; font-size: 14px; margin-bottom: 8px; }
.clip__slide p { margin: 0 0 4px; font-size: 13px; opacity: 0; animation: cLine 3.6s var(--d) ease-out infinite; }
@keyframes cLine { 0% { opacity: 0; transform: translateX(-8px); } 15%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.clip__grid { display: grid; grid-template-columns: repeat(14, 1fr); gap: 3px; }
.clip__grid i { aspect-ratio: 1; border-radius: 2px; background: rgba(255, 255, 255, .06); animation: cCell 3s var(--d) ease-out infinite; }
@keyframes cCell { 0%, 20% { background: rgba(255, 255, 255, .06); } 40%, 90% { background: rgba(94, 242, 194, calc(.25 + var(--l) * .22)); } 100% { background: rgba(255, 255, 255, .06); } }

/* =========================================================
   Scene 1 — night study desk
   ========================================================= */
.cut--1 { background: radial-gradient(70% 60% at 62% 40%, #1a1508 0%, #07070a 60%, #030305 100%); }
.s1-lamp { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(40% 50% at 70% 35%, rgba(255, 196, 110, .16), transparent 70%); animation: s1Flicker 6s infinite; }
@keyframes s1Flicker { 0%, 100% { opacity: 1; } 47% { opacity: 1; } 48% { opacity: .82; } 49% { opacity: 1; } 72% { opacity: .9; } 73% { opacity: 1; } }
.s1-desk {
  position: absolute; left: -75%; width: 250%; top: 100%; height: calc(var(--w) * 1.25);
  transform-origin: 50% 0; transform: rotateX(90deg) translateY(-30%) translateZ(calc(var(--w) * -.019));
  background:
    radial-gradient(40% 45% at 72% 30%, rgba(255, 196, 110, .22), transparent 70%),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .06) 0 2px, transparent 2px 46px),
    linear-gradient(180deg, #3a2a1c, #2a1d13 60%, #1c130c);
  border-radius: 8px;
}
.s1-book { position: absolute; left: 70%; top: 26%; width: 20%; aspect-ratio: 1.45; display: flex; transform: rotate(-9deg); box-shadow: 0 20px 30px rgba(0, 0, 0, .55); }
.s1-page { flex: 1; padding: 6% 7%; background: repeating-linear-gradient(180deg, #f3eedf 0 calc(var(--w) * .022), #c9d6e8 calc(var(--w) * .022) calc(var(--w) * .023)); color: #1d3a8a; font: 600 calc(var(--w) * .022) / 1.05 "Caveat", "Segoe Print", cursive; border-radius: 3px 0 0 3px; }
.s1-page--r { border-radius: 0 3px 3px 0; border-left: 2px solid rgba(0, 0, 0, .15); }
.s1-page p { margin: 0 0 4%; }
.s1-q { color: #c0392b; }
.s1-page svg { width: 100%; height: auto; fill: none; stroke: #c0392b; stroke-width: 2.5; }
.s1-mug { position: absolute; left: 25%; top: 30%; width: 5%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, #3b2414 40%, #e8e2d6 42% 60%, #c8c0b2 62%); box-shadow: 0 10px 20px rgba(0, 0, 0, .6); }
.s1-pencil { position: absolute; left: 66%; top: 70%; width: 12%; height: .7%; border-radius: 3px; background: linear-gradient(90deg, #f6c445 0 85%, #e8c39e 85% 95%, #333 95%); transform: rotate(18deg); }
.fx-bloom { background: radial-gradient(circle at 50% 38%, #fff 0%, rgba(160, 255, 225, .9) 12%, rgba(94, 242, 194, .3) 30%, transparent 55%); transform-origin: 50% 38%; }

/* =========================================================
   Scene 2 — dual monitors, pull request
   ========================================================= */
.cut--2 { background: radial-gradient(90% 70% at 50% 30%, #0f1424 0%, #06080e 60%, #030406 100%); }
.cut--2 .cut__room { background: linear-gradient(180deg, transparent 72%, #0d1018 72%, #07090d 100%); }
.s2-cam { perspective: 1800px; }
.s2-rig { --mw: min(560px, 42vw); position: relative; display: flex; gap: 2.4vw; align-items: flex-end; transform-style: preserve-3d; margin-top: -6vh; }
.s2-left { transform: rotateY(10deg); transform-origin: 100% 50%; }
.s2-right { transform: rotateY(-10deg); transform-origin: 0 50%; }
.s2-desk { position: absolute; left: -12%; right: -12%; bottom: -14vh; height: 14vh; }
.s2-kbd { position: absolute; left: 32%; top: 22%; width: 36%; height: 26%; border-radius: 6px; background: repeating-linear-gradient(90deg, #1c1f25 0 14px, #121418 14px 16px), #1c1f25; box-shadow: 0 10px 20px rgba(0, 0, 0, .5), inset 0 0 0 1px #2c3038; }
.s2-mouse { position: absolute; left: 72%; top: 24%; width: 3%; height: 30%; border-radius: 40% 40% 45% 45%; background: #23262d; box-shadow: inset 0 0 0 1px #34383f; }
.s2-cup { position: absolute; left: 16%; top: 10%; width: 2.2%; aspect-ratio: .8; border-radius: 4px 4px 10px 10px; background: linear-gradient(90deg, #d9d4ca, #f4efe5, #c8c0b2); }
.pr { width: 100%; height: 100%; background: #0d1117; color: #e6edf3; font: 16px/1.5 "Segoe UI", system-ui, sans-serif; }
.pr__nav { height: 56px; display: flex; align-items: center; gap: 16px; padding: 0 24px; background: #010409; border-bottom: 1px solid #30363d; font-size: 15px; }
.pr__nav b { color: #fff; }
.pr__nav i { font-style: normal; margin-left: auto; color: #9198a1; }
.pr__nav u { color: #fff; text-decoration: none; box-shadow: inset 0 -2px 0 #f78166; padding-bottom: 14px; }
.pr__head { padding: 22px 32px 0; border-bottom: 1px solid #30363d; }
.pr__head h4 { margin: 0 0 10px; font-size: 30px; font-weight: 500; }
.pr__head h4 span { color: #9198a1; font-weight: 300; }
.pr__head p { margin: 0 0 18px; color: #9198a1; position: relative; }
.pr__head code, .pr__feed code { font: 13px/1 var(--mono); background: #1f2937; color: #79c0ff; padding: 3px 7px; border-radius: 6px; }
.pr__state { font-style: normal; display: inline-block; padding: 5px 14px; border-radius: 99px; background: #238636; color: #fff; font-weight: 600; margin-right: 8px; }
.pr__state--m { position: absolute; left: 0; top: 0; background: #8957e5; }
.pr__tabs { display: flex; gap: 28px; font-size: 15px; color: #9198a1; }
.pr__tabs u { text-decoration: none; color: #fff; box-shadow: inset 0 -2px 0 #f78166; padding-bottom: 10px; }
.pr__feed { padding: 18px 32px; display: grid; gap: 12px; }
.pr__item { display: flex; align-items: center; gap: 12px; color: #c9d1d9; }
.pr__item i { font-style: normal; color: #9198a1; font-size: 12px; }
.pr__item code { margin-left: auto; }
.pr__check { padding: 12px 16px; border: 1px solid #238636; border-radius: 8px; color: #3fb950; font-weight: 600; }
.pr__check small { color: #9198a1; font-weight: 400; margin-left: 8px; }
.pr__review { display: flex; gap: 14px; align-items: flex-start; }
.pr__review > b { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--violet); color: #fff; font-size: 14px; }
.pr__review p { margin: 0; color: #9198a1; }
.pr__review strong { color: #fff; }
.pr__bubble { margin-top: 6px !important; padding: 10px 14px; border: 1px solid #30363d; border-radius: 8px; color: #e6edf3 !important; background: #161b22; }
.pr__merged { padding: 12px 16px; border-radius: 8px; background: rgba(137, 87, 229, .15); border: 1px solid #8957e5; color: #d2a8ff; }
.fx-wipe { opacity: 1; transform: translateX(-101%); background: var(--bg); }
.fx-wipe i { position: absolute; right: 0; top: 0; bottom: 0; width: 8px; background: var(--grad); box-shadow: 0 0 40px 10px rgba(94, 242, 194, .5); }

/* =========================================================
   Scene 3 — server room, campus dashboard
   ========================================================= */
.cut--3 { background: radial-gradient(80% 70% at 50% 50%, #08141a 0%, #04080b 60%, #020304 100%); }
.s3-cam { perspective: 900px; }
.s3-room { position: absolute; inset: 0; transform-style: preserve-3d; perspective: 700px; }
.s3-row { position: absolute; top: 8%; height: 84%; width: 60%; display: flex; gap: 2%; transform-style: preserve-3d; }
.s3-row--l { left: -12%; transform-origin: 0 50%; transform: rotateY(68deg); }
.s3-row--r { right: -12%; transform-origin: 100% 50%; transform: rotateY(-68deg); flex-direction: row-reverse; }
.s3-rack { flex: 1; display: flex; flex-direction: column; gap: 3%; padding: 2%; background: linear-gradient(90deg, #0d1217, #151b22, #0d1217); border: 1px solid #1f2830; border-radius: 4px; }
.s3-unit { flex: 1; display: flex; align-items: center; gap: 6%; padding: 0 8%; background: #0a0e12; border-radius: 2px; box-shadow: inset 0 0 0 1px #1a222a; }
.s3-unit i { width: 7%; aspect-ratio: 1; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); animation: s3Led 1.7s var(--d) steps(1) infinite; }
@keyframes s3Led { 50% { opacity: .15; box-shadow: none; } }
.s3-floor { position: absolute; left: 0; right: 0; bottom: 0; height: 30%; background: linear-gradient(180deg, transparent, rgba(94, 242, 194, .05)), repeating-linear-gradient(90deg, rgba(94, 242, 194, .08) 0 1px, transparent 1px 80px); }
.s3-mon { --mw: min(760px, 66vw); z-index: 3; }
.s3-term { left: clamp(12px, 4vw, 64px); bottom: clamp(140px, 24vh, 240px); }
.s3-o { color: #9aa3b8; }
.dash { width: 100%; height: 100%; padding: 28px 32px; background: linear-gradient(160deg, #0c1220, #0a0f19); color: #e6edf3; font: 18px/1.4 "Segoe UI", system-ui, sans-serif; position: relative; }
.dash__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.dash__top b { font-size: 26px; }
.dash__top span { color: var(--mint); font: 15px/1 var(--mono); }
.dash__cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.dash__card { padding: 18px; border-radius: 14px; background: #111827; border: 1px solid #1f2a3a; }
.dash__card p { margin: 0; color: #8b93a7; font-size: 14px; }
.dash__card b { display: block; font: 700 34px/1.2 var(--mono); margin: 6px 0 8px; }
.dash__card svg { width: 100%; height: 60px; }
.dash__card path { fill: none; stroke: var(--mint); stroke-width: 3; stroke-dasharray: 400; filter: drop-shadow(0 0 6px rgba(94, 242, 194, .5)); }
.dash__card em { font-style: normal; color: var(--mint); font: 13px/1 var(--mono); }
.dash__xp { margin-top: 26px; padding: 22px; border-radius: 14px; background: #111827; border: 1px solid #1f2a3a; }
.dash__xptop { display: flex; align-items: baseline; gap: 16px; margin-bottom: 14px; }
.dash__xptop span { color: #8b93a7; font: 14px/1 var(--mono); letter-spacing: .1em; }
.dash__role { font-size: 32px; }
.dash__date { margin-left: auto; }
.dash__bar { height: 14px; border-radius: 8px; background: #1f2a3a; overflow: hidden; }
.dash__bar i { display: block; height: 100%; background: var(--grad); transform-origin: 0 50%; }
.dash__steps { display: flex; justify-content: space-between; margin-top: 10px; color: #8b93a7; font: 14px/1 var(--mono); }
.dash__lvl { position: absolute; right: 40px; bottom: 150px; padding: 12px 22px; border-radius: 99px; background: var(--mint); color: #04130e; font: 800 24px/1 var(--mono); letter-spacing: .06em; box-shadow: 0 0 40px rgba(94, 242, 194, .7); }
.fx-glitch { background: repeating-linear-gradient(0deg, rgba(94, 242, 194, .12) 0 2px, transparent 2px 5px), linear-gradient(90deg, rgba(255, 0, 80, .15), transparent 30%, rgba(0, 200, 255, .15)); mix-blend-mode: screen; }

/* =========================================================
   Scene 4 — device orbit
   ========================================================= */
.cut--4 { background: radial-gradient(80% 70% at 50% 40%, #121028 0%, #07070f 60%, #030306 100%); }
.s4-count { position: absolute; right: 4vw; top: 50%; transform: translateY(-50%); font: 700 clamp(160px, 30vw, 440px) / 1 var(--font); letter-spacing: -.06em; color: transparent; -webkit-text-stroke: 1.5px rgba(255, 255, 255, .08); pointer-events: none; }
.s4-cam { perspective: 2000px; }
.s4-set { --w: min(560px, 46vw, 72vh); position: relative; width: var(--w); height: calc(var(--w) * .9); transform-style: preserve-3d; }
.s4-lap { position: absolute; inset: 0; display: grid; place-items: center; transform-style: preserve-3d; }
.s4-phone { --pw: calc(var(--w) * .28); position: absolute; left: -24%; bottom: 2%; transform: translateZ(140px) rotateY(16deg); }
.s4-tab { --tw: calc(var(--w) * .6); position: absolute; right: -66%; top: -14%; transform: translateZ(-40px) rotateY(-18deg); }
.app { width: 100%; height: 100%; padding: 60px 26px 26px; background: linear-gradient(170deg, #161233, #0b0e17); color: #fff; font: 20px/1.4 "Segoe UI", system-ui, sans-serif; }
.app__top { position: absolute; left: 30px; right: 30px; top: 18px; display: flex; justify-content: space-between; font-size: 16px; }
.app__h { margin: 10px 0 0; font-size: 34px; font-weight: 700; }
.app__s { margin: 0 0 24px; color: #8b93a7; }
.app__best { padding: 22px; border-radius: 22px; background: linear-gradient(135deg, rgba(139, 123, 255, .35), rgba(94, 242, 194, .2)); margin-bottom: 22px; }
.app__best small { color: #c9d1e3; }
.app__best b { display: block; font-size: 28px; margin: 4px 0 12px; }
.app__best em { font-style: normal; font: 700 30px/1 var(--mono); color: var(--mint); }
.app__bar { height: 10px; border-radius: 6px; background: rgba(255, 255, 255, .12); overflow: hidden; margin-bottom: 8px; }
.app__bar i { display: block; height: 100%; background: var(--grad); transform-origin: 0 50%; }
.app__row { padding: 14px 4px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.app__row span { display: block; margin-bottom: 6px; color: #c9d1e3; }
.app__btn { margin-top: 26px; padding: 18px; border-radius: 16px; background: var(--mint); color: #04130e; font-weight: 700; text-align: center; }
.nb { width: 100%; height: 100%; padding: 22px 26px; background: #fafafa; color: #1b1e27; font: 18px/1.5 "Segoe UI", system-ui, sans-serif; }
.nb__top { display: flex; justify-content: space-between; padding-bottom: 12px; border-bottom: 1px solid #e3e3e3; margin-bottom: 16px; }
.nb__top span { color: #2e7d32; }
.nb__cell { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.nb__cell span { color: #303f9f; font: 15px/1 var(--mono); }
.nb__cell code { flex: 1; padding: 12px 14px; background: #f0f2f5; border-radius: 6px; font: 16px/1.4 var(--mono); }
.nb__chart svg { width: 100%; height: auto; }
.nb__ax { fill: none; stroke: #bbb; stroke-width: 2; }
.nb__loss, .nb__acc { fill: none; stroke-width: 5; stroke-linecap: round; stroke-dasharray: 700; }
.nb__loss { stroke: #e65100; } .nb__acc { stroke: #2e7d32; }
.nb__log { margin: 10px 0 0; font: 18px/1 var(--mono); }
.nb__l { color: #e65100; } .nb__a { color: #2e7d32; }

/* =========================================================
   Scene 5 — exploded skills stack
   ========================================================= */
.cut--5 { background: radial-gradient(80% 70% at 40% 50%, #0b1a1a 0%, #050a0b 60%, #020304 100%); }
.s5-cam { perspective: 2200px; }
.s5-iso { position: relative; width: min(400px, 56vw); aspect-ratio: 2.3; transform-style: preserve-3d; margin: 30vh 22vw 0 0; }
.s5-layer {
  position: absolute; inset: 0; padding: 18px 20px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(20, 30, 42, .86), rgba(12, 18, 28, .86));
  border: 1px solid rgba(94, 242, 194, .25); box-shadow: 0 0 0 1px rgba(0, 0, 0, .4), 0 20px 40px -10px rgba(0, 0, 0, .8);
  transition: border-color .4s, box-shadow .4s;
}
.s5-layer.is-on { border-color: rgba(94, 242, 194, .7); box-shadow: 0 0 40px -6px rgba(94, 242, 194, .45), 0 20px 40px -10px rgba(0, 0, 0, .8); }
.s5-layer b { display: block; font: 700 18px/1.2 var(--font); color: #fff; margin-bottom: 12px; }
.s5-layer div { display: flex; flex-wrap: wrap; gap: 6px; }
.s5-layer span { padding: 4px 10px; border-radius: 99px; background: rgba(94, 242, 194, .1); border: 1px solid rgba(94, 242, 194, .3); color: var(--mint); font: 12px/1.4 var(--mono); }
.s5-term { right: clamp(12px, 5vw, 90px); top: 50%; transform: translateY(-50%); width: min(430px, 38vw); }
.s5-o .d { color: #6b7386; }
.s5-o--end b { color: #fff; }

/* =========================================================
   Scene 6 — sunrise window
   ========================================================= */
.cut--6 { background: #04050a; }
.s6-sky { position: absolute; left: 50%; top: 6vh; width: min(1100px, 92vw); height: 62vh; transform: translateX(-50%); overflow: hidden; border-radius: 6px; }
.s6-sky > i { position: absolute; }
.s6-night, .s6-dawn { inset: 0; }
.s6-night { background: linear-gradient(180deg, #050816 0%, #0c1230 60%, #1a1a3a 100%); }
.s6-dawn { opacity: 0; background: linear-gradient(180deg, #2b3a78 0%, #8a5a9c 38%, #f08a5d 70%, #ffd29a 100%); }
.s6-sun { left: 50%; bottom: 8%; width: 18%; aspect-ratio: 1; margin-left: -9%; border-radius: 50%; background: radial-gradient(circle, #fff6d8 0%, #ffd27a 40%, rgba(255, 170, 90, .6) 60%, transparent 72%); filter: blur(1px); }
.s6-stars { position: absolute; inset: 0; }
.s6-stars i { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #fff; animation: blink 2.4s var(--d) steps(1) infinite; }
.s6-city { position: absolute; left: 0; bottom: 0; width: 100%; height: 34%; fill: #04050a; }
.s6-frame { position: absolute; inset: 0; border: 14px solid #0b0d12; box-shadow: inset 0 0 0 2px #1d2128; }
.s6-frame i { position: absolute; background: #0b0d12; }
.s6-frame i:first-child { left: 50%; top: 0; bottom: 0; width: 12px; margin-left: -6px; }
.s6-frame i:last-child { left: 0; right: 0; top: 46%; height: 12px; }
.cut--6 .cut__room { background: linear-gradient(180deg, transparent calc(6vh + 62vh), #0b0d12 calc(6vh + 62vh), #050608 100%); }
.s6-cam { top: 12vh; }
.cut--6 .cut__sticky, .cut__sticky.cut--6 { --w: min(620px, 54vw, 80vh); }
.s6-msg {
  position: absolute; z-index: 12; right: clamp(12px, 4vw, 64px); top: clamp(84px, 13vh, 140px); width: min(360px, 86vw);
  display: flex; gap: 14px; padding: 16px 18px; border-radius: 16px;
  background: rgba(20, 22, 30, .92); border: 1px solid rgba(255, 255, 255, .14); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .9); backdrop-filter: blur(10px);
}
.s6-msg > b { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--grad); color: #04130e; font-size: 18px; }
.s6-msg p { margin: 0; color: #fff; font-size: 15px; line-height: 1.45; }
.s6-msg .s6-msg__h { font: 600 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--amber); margin-bottom: 6px; }
.s6-msg__dots { display: flex; gap: 5px; margin-top: 8px !important; }
.s6-msg__dots i { width: 7px; height: 7px; border-radius: 50%; background: #8b93a7; animation: s6Dots 1.2s infinite; }
.s6-msg__dots i:nth-child(2) { animation-delay: .2s; } .s6-msg__dots i:nth-child(3) { animation-delay: .4s; }
@keyframes s6Dots { 0%, 60%, 100% { transform: none; opacity: .4; } 30% { transform: translateY(-4px); opacity: 1; } }
.fx-sunrise { background: radial-gradient(70% 70% at 50% 40%, #fff7e0 0%, #ffd8a0 40%, rgba(255, 180, 120, .4) 70%, transparent 100%); }

/* ---------- small screens ---------- */
@media (max-width: 760px) {
  .cut__sticky { --w: 90vw; }
  .clip { width: 46vw; }
  .clip__body { padding: 10px; font-size: 10.5px; }
  .s2-rig { --mw: 78vw; }
  .s2-right { position: absolute; left: 0; top: 0; } /* phones: one monitor at a time */
  .cut--5 .clip { display: none; }
  .s3-term { width: 78vw; bottom: 150px; }
  .s3-mon { --mw: 92vw; }
  .s4-set { --w: 64vw; }
  .s4-tab { right: -22%; top: -30%; }
  .s4-phone { left: -12%; }
  .s5-iso { margin: -6vh 0 0; width: 74vw; }
  .s5-term { top: auto; bottom: 140px; transform: none; width: auto; left: 12px; right: 12px; font-size: 11px; }
  .s6-sky { height: 46vh; }
  .s6-cam { top: 6vh; }
  .cut--6 .cut__sticky, .cut__sticky.cut--6 { --w: 86vw; }
  .cut__lower { bottom: 26px; }
}
@media (max-height: 560px) { .clip { display: none; } }

/* =========================================================
   VS Code (fills its virtual screen)
   ========================================================= */
.cv {
  position: relative; width: 100%; height: 100%;
  display: flex; flex-direction: column; background: #1f1f1f; color: #cccccc;
  font: 15px/1.4 "Segoe UI", system-ui, sans-serif; overflow: hidden;
}
.cv * { box-sizing: border-box; }
.cv__title { height: 36px; flex: none; display: flex; align-items: center; gap: 16px; padding-left: 14px; background: #181818; border-bottom: 1px solid #2b2b2b; font-size: 14px; white-space: nowrap; }
.cv__logo { font: 700 12px/1 var(--mono); color: #3aa0ff; }
.cv__search { position: absolute; left: 50%; width: 420px; margin-left: -210px; height: 24px; border-radius: 6px; background: #242424; border: 1px solid #333; display: grid; place-items: center; color: #9d9d9d; font-size: 13px; }
.cv__ctrl { margin-left: auto; padding-right: 16px; }
.cv__main { flex: 1; min-height: 0; display: flex; }
.cv__act { width: 52px; flex: none; background: #181818; border-right: 1px solid #2b2b2b; display: flex; flex-direction: column; align-items: center; padding-top: 6px; }
.cv__act i { font-style: normal; width: 52px; height: 48px; display: grid; place-items: center; font-size: 22px; color: #868686; }
.cv__act i.on { color: #fff; box-shadow: inset 2px 0 0 #0078d4; }
.cv__side { width: 250px; flex: none; background: #181818; border-right: 1px solid #2b2b2b; }
.cv__side p { margin: 0; padding: 10px 20px; font-size: 12px; letter-spacing: .05em; }
.cv__side .cv__proj { padding: 2px 10px 6px; font-weight: 700; }
.cv__side ul { list-style: none; margin: 0; padding: 0; }
.cv__side li { height: 26px; display: flex; align-items: center; gap: 8px; padding-left: 28px; white-space: nowrap; color: #cccccc; font-size: 14px; }
.cv__side li b { width: 18px; font: 700 10px/1 var(--mono); color: #f1dd3f; text-align: center; }
.cv__side li:first-child b { color: #42a5f5; }
.cv__side li.on { background: #04395e; box-shadow: inset 0 0 0 1px #0078d4; color: #fff; }
.cv__ed { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cv__tabs { height: 38px; flex: none; display: flex; background: #181818; border-bottom: 1px solid #2b2b2b; }
.cv__tabs span { display: flex; align-items: center; gap: 8px; padding: 0 16px; background: #1f1f1f; color: #fff; box-shadow: inset 0 1px 0 #0078d4; border-right: 1px solid #2b2b2b; font-size: 14px; }
.cv__tabs b { font: 700 10px/1 var(--mono); color: #f1dd3f; }
.cv__tabs i { font-style: normal; color: #ccc; margin-left: 8px; }
.cv__crumbs { height: 24px; flex: none; padding-left: 18px; font-size: 13px; color: #a9a9a9; display: flex; align-items: center; }
.cv__body { position: relative; flex: 1; min-height: 0; }
.cv__code { padding-top: 6px; font: 17px/27px var(--mono); color: #d4d4d4; }
.cv__ln { display: none; white-space: pre; }
.cv__ln.is-shown { display: flex; }
.cv__ln.is-cur { background: #262626; }
.cv__ln u { text-decoration: none; width: 64px; flex: none; text-align: right; padding-right: 26px; color: #6e7681; }
.cv__ln.is-cur u { color: #cccccc; }
.cv__code .ch { display: none; font-style: normal; }
.cv__code .ch.on { display: inline; }
.cv__cur { display: inline-block; width: 2px; height: 22px; background: #aeafad; vertical-align: -5px; margin-left: 1px; animation: blink 1.05s steps(1) infinite; }
.cv__gen {
  position: absolute; right: 24px; top: 10px; display: flex; align-items: center; gap: 10px;
  padding: 8px 14px; border-radius: 8px; background: #252526; border: 1px solid #3c3c3c; box-shadow: 0 8px 24px rgba(0, 0, 0, .5);
  font-size: 14px; color: #ddd;
}
.cv__gen i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(139, 123, 255, .3); border-top-color: var(--violet); animation: spin .8s linear infinite; }
.cv__gen b { color: #fff; font-weight: 600; }
.cv__gen em { font-style: normal; color: #8b8b8b; font-size: 12px; }
.cv__term { height: 40%; flex: none; display: flex; flex-direction: column; background: #181818; border-top: 1px solid #2b2b2b; }
.cv__thead { height: 36px; flex: none; display: flex; align-items: center; gap: 24px; padding: 0 18px; font-size: 12px; color: #9d9d9d; letter-spacing: .03em; }
.cv__thead .on { color: #e7e7e7; box-shadow: inset 0 -1px 0 #e7e7e7; padding: 10px 0; }
.cv__thead em { font-style: normal; margin-left: auto; }
.cv__tbody { flex: 1; padding: 6px 20px; font: 16px/26px var(--mono); color: #cccccc; }
.cv__tbody p { margin: 0; white-space: pre-wrap; }
.cv__cmd { color: #fff; }
.cv__caret { display: inline-block; width: 9px; height: 19px; background: #cccccc; vertical-align: -3px; margin-left: 2px; }
.cv__out { color: #9d9d9d; }
.cv__out b { color: var(--mint); font-weight: 600; }
.cv__bar { height: 5px; margin: 10px 0; max-width: 480px; border-radius: 4px; background: #2b2b2b; overflow: hidden; }
.cv__bar span { display: block; height: 100%; background: var(--grad); transform-origin: 0 50%; }
.cv__go { color: var(--mint) !important; font-weight: 600; }
.cv__go span { margin-right: 8px; }
.cv__status { height: 26px; flex: none; display: flex; align-items: center; gap: 16px; padding-right: 14px; background: #181818; border-top: 1px solid #2b2b2b; font-size: 13px; }
.cv__remote { align-self: stretch; display: grid; place-items: center; padding: 0 12px; background: #0078d4; color: #fff; font: 700 12px/1 var(--mono); }
.cv__run { color: var(--mint); }
.cv__r { margin-left: auto; }
.cv__toasts { position: absolute; right: 18px; bottom: 40px; display: grid; gap: 10px; justify-items: end; }
.cv__toast {
  grid-area: 1 / 1; display: flex; gap: 12px; align-items: center; width: 380px; padding: 14px 16px;
  background: #252526; border: 1px solid #3c3c3c; border-radius: 8px; box-shadow: 0 10px 30px rgba(0, 0, 0, .6); font-size: 14px;
}
.cv__toast b { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; background: rgba(94, 242, 194, .14); color: var(--mint); font-size: 14px; }
.cv__toast strong { display: block; color: #fff; font-weight: 600; margin-bottom: 2px; }

