/* =====================================================================
   v2 components (storyline rebuild, Nov 2026)
   ===================================================================== */

/* ---------- video pop-up ---------- */
.pop { position: fixed; inset: 0; z-index: 35; display: none; place-items: center; background: rgba(3, 4, 7, 0.86); backdrop-filter: blur(10px); }
.pop.open { display: grid; }
.pop-box { position: relative; width: min(86vw, 152vh); aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; border: 1px solid var(--line-2); box-shadow: 0 60px 160px -40px rgba(93, 139, 255, 0.45); background: #000; }
.pop-box iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pop-x { position: absolute; top: 10px; right: 12px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; background: rgba(5, 6, 10, 0.7); color: var(--ink); font-size: 26px; line-height: 1; border: 1px solid var(--line-2); }
.watch { display: inline-flex; align-items: center; gap: 16px; padding: 12px 26px 12px 12px; border: 1px solid rgba(93, 139, 255, 0.55); border-radius: 100px; font-size: 22px; color: var(--ink); background: rgba(9, 12, 20, 0.6); backdrop-filter: blur(6px); transition: background 0.25s, transform 0.25s; }
.watch:hover { background: rgba(93, 139, 255, 0.22); transform: translateY(-2px); }
.watch .pb { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--blue); flex: none; }
.watch .pb svg { width: 16px; height: 16px; margin-left: 3px; }
.watch small { display: block; font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em; color: var(--mute); margin-top: 2px; text-align: left; }
.watch span { text-align: left; line-height: 1.2; }

/* ---------- storyline roadmap ---------- */
.roadmap { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 80px; }
.roadmap::before { content: ""; position: absolute; left: 35px; right: 60px; top: 34px; height: 2px; background: linear-gradient(90deg, var(--blue) 0%, var(--blue) 48%, var(--red) 52%, var(--red) 72%, var(--blue) 76%); opacity: 0.55; }
.rm-act { position: relative; padding-right: 54px; }
.rm-act .rm-n { position: relative; width: 70px; height: 70px; border-radius: 50%; display: grid; place-items: center; background: var(--bg); border: 2px solid var(--blue); font-family: var(--serif); font-size: 32px; box-shadow: 0 0 30px rgba(93, 139, 255, 0.35); }
.rm-act.red .rm-n { border-color: var(--red); box-shadow: 0 0 30px rgba(255, 75, 62, 0.35); }
.rm-act h3 { font-family: var(--serif); font-weight: 400; font-size: 46px; line-height: 1.02; margin-top: 28px; }
.rm-act p { margin-top: 12px; font-size: 22px; line-height: 1.45; color: var(--ink-2); font-weight: 300; }
.rm-act .rm-d { margin-top: 16px; display: inline-flex; gap: 8px; align-items: center; font-family: var(--mono); font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--red-2); }
.rm-act .rm-d i { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 10px var(--red); }
.thesis { font-family: var(--serif); font-size: 46px; line-height: 1.15; max-width: 1500px; color: var(--ink); }
.thesis em { color: var(--blue-2); }

/* ---------- generic svg chart styling ---------- */
.svgc { overflow: visible; display: block; }
.svgc .ax { stroke: rgba(238, 235, 228, 0.28); stroke-width: 1; }
.svgc .gl { stroke: rgba(238, 235, 228, 0.08); stroke-dasharray: 3 7; }
.svgc text { fill: var(--mute); font-family: var(--mono); font-size: 15px; }
.svgc .lbl { fill: var(--ink); font-family: var(--sans); font-size: 21px; }
.svgc .lbl-s { fill: var(--ink-2); font-family: var(--sans); font-size: 17px; }
.svgc .big { fill: var(--ink); font-family: var(--serif); font-size: 44px; }
.svgc .ln { fill: none; stroke: var(--blue); stroke-width: 4; stroke-linecap: round; filter: drop-shadow(0 0 10px rgba(93, 139, 255, 0.8)); stroke-dasharray: 2000; stroke-dashoffset: 2000; transition: stroke-dashoffset 2.6s var(--ease) 0.5s; }
.svgc .trend { fill: none; stroke: rgba(169, 193, 255, 0.55); stroke-width: 2; stroke-dasharray: 8 10; opacity: 0; transition: opacity 1s ease 2.4s; }
.svgc .pt { fill: var(--bg); stroke: var(--blue-2); stroke-width: 3; opacity: 0; transition: opacity 0.4s ease; transition-delay: calc(var(--d, 0) * 380ms + 900ms); }
.svgc .pt.hot { fill: var(--blue); }
.svgc .tag { opacity: 0; transition: opacity 0.5s ease; transition-delay: calc(var(--d, 0) * 380ms + 1000ms); }
.slide.active .svgc .ln { stroke-dashoffset: 0; }
.slide.active .svgc .trend { opacity: 1; }
.slide.active .svgc .pt, .slide.active .svgc .tag { opacity: 1; }

/* money bubbles */
.bub circle { fill: rgba(93, 139, 255, 0.07); stroke: rgba(93, 139, 255, 0.7); stroke-width: 1.5; transform-box: fill-box; transform-origin: center; transform: scale(0); transition: transform 1.3s var(--ease); transition-delay: calc(var(--d, 0) * 160ms + 500ms); }
.bub circle.red { fill: rgba(255, 75, 62, 0.07); stroke: rgba(255, 75, 62, 0.75); }
.slide.active .bub circle { transform: scale(1); }
.bub .v { fill: var(--ink); font-family: var(--serif); font-size: 42px; text-anchor: middle; }
.bub .k { fill: var(--ink-2); font-family: var(--sans); font-size: 16px; text-anchor: middle; }

/* ---------- loop stepper (anatomy slide) ---------- */
.stepper .v { display: none; }
.slide[data-step="0"] .stepper .v.k0, .slide[data-step="1"] .stepper .v.k1, .slide[data-step="2"] .stepper .v.k2,
.slide[data-step="3"] .stepper .v.k3, .slide[data-step="4"] .stepper .v.k4 { display: block; animation: vin 0.6s var(--ease); }
@keyframes vin { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.dots-nav { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }
.dots-nav span { font-family: var(--mono); font-size: 14px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); padding: 7px 14px; border: 1px solid var(--line); border-radius: 100px; transition: all 0.3s; }
.slide[data-step="1"] .dots-nav span:nth-child(1), .slide[data-step="2"] .dots-nav span:nth-child(2),
.slide[data-step="3"] .dots-nav span:nth-child(3), .slide[data-step="4"] .dots-nav span:nth-child(4) { color: var(--blue-2); border-color: rgba(93, 139, 255, 0.6); box-shadow: 0 0 18px -4px rgba(93, 139, 255, 0.6); }
.slide .f.marker { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- memos vs receipt ---------- */
.memos2 { position: relative; height: 760px; }
.memo { position: absolute; width: 480px; padding: 20px 26px 18px; background: linear-gradient(180deg, #f3efe6, #e4ddcd); color: #1d1f24; border-radius: 3px; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.9); transform: rotate(var(--r, 0deg)); }
.memo .mh { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: #6a6458; border-bottom: 1px solid #cfc7b4; padding-bottom: 8px; }
.memo .mh b { color: #1d1f24; font-weight: 600; }
.memo p { margin-top: 10px; font-family: var(--serif); font-size: 28px; line-height: 1.12; color: #1d1f24; }
.memo .by { margin-top: 8px; font-size: 15px; color: #6a6458; }
.receipt { position: absolute; right: 0; top: -10px; width: 610px; padding: 30px 38px 50px; background: #f1f0ea; color: #17181c; font-family: var(--mono); font-size: 17px; line-height: 1.5; box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.95);
  -webkit-mask: linear-gradient(#000, #000) top / 100% calc(100% - 18px) no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 26px 18px repeat-x;
  mask: linear-gradient(#000, #000) top / 100% calc(100% - 18px) no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 26px 18px repeat-x;
  clip-path: inset(0 0 100% 0); transition: clip-path 2.6s steps(26, end) 0.8s; }
.slide.active .receipt { clip-path: inset(0 0 0 0); }
.receipt .rh { text-align: center; font-weight: 500; letter-spacing: 0.22em; font-size: 20px; }
.receipt .rs { text-align: center; color: #555; font-size: 14px; margin-top: 2px; }
.receipt hr { border: 0; border-top: 2px dashed #9a978d; margin: 14px 0; }
.receipt .ri { display: grid; grid-template-columns: 1fr auto; gap: 14px; padding: 5px 0; }
.receipt .ri b { font-weight: 600; letter-spacing: 0.06em; }
.receipt .ri span { display: block; color: #3a3b40; font-size: 15px; }
.receipt .ri em { font-style: normal; color: #b4261c; font-weight: 600; white-space: nowrap; }
.receipt .rt { display: flex; justify-content: space-between; font-weight: 600; font-size: 19px; }
.receipt .rf { margin-top: 12px; text-align: center; font-size: 15px; color: #444; }

/* ---------- incident terminal ---------- */
.term { position: relative; background: rgba(4, 6, 10, 0.9); border: 1px solid rgba(255, 75, 62, 0.35); border-radius: 10px; padding: 0 0 16px; font-family: var(--mono); font-size: 17px; line-height: 1.5; box-shadow: 0 40px 120px -50px rgba(255, 75, 62, 0.45); overflow: hidden; }
.term .tb { display: flex; gap: 8px; align-items: center; padding: 12px 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.07); color: var(--mute); font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; }
.term .tb i { width: 11px; height: 11px; border-radius: 50%; background: #3a3d45; }
.term .tb i:first-child { background: var(--red); }
.term .tb span { margin-left: 10px; }
.term .tl2 { padding: 6px 22px; display: grid; grid-template-columns: 84px 64px 1fr; gap: 14px; opacity: 0; transform: translateX(-8px); transition: opacity 0.35s ease, transform 0.35s ease; transition-delay: calc(var(--d, 0) * 380ms + 500ms); }
.slide.active .term .tl2 { opacity: 1; transform: none; }
.term .tl2 .ts { color: var(--dim); }
.term .tl2 .sv { color: var(--red-2); }
.term .tl2 .sv.w { color: #e9b44c; }
.term .tl2 .sv.i { color: var(--blue-2); }
.term .tl2 .msg { color: var(--ink-2); }
.term .tl2 .msg b { color: var(--ink); font-weight: 500; }
.term .cursor { display: inline-block; width: 10px; height: 20px; background: var(--red); vertical-align: -3px; animation: blink 1s steps(2) infinite; margin: 6px 0 0 22px; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- dials ---------- */
.dial { position: relative; width: 200px; height: 200px; }
.dial svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.dial .bg { fill: none; stroke: rgba(238, 235, 228, 0.08); stroke-width: 14; }
.dial .fg { fill: none; stroke: var(--blue); stroke-width: 14; stroke-linecap: round; stroke-dasharray: 0 999; transition: stroke-dasharray 1.8s var(--ease) 0.6s; }
.dial .fg.red { stroke: var(--red); }
.slide.active .dial .fg { stroke-dasharray: var(--v) 999; }
.dial .dv { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--serif); font-size: 60px; }
.dial-k { margin-top: 14px; font-size: 21px; line-height: 1.4; color: var(--ink-2); font-weight: 300; max-width: 250px; }
.dial-k b { color: var(--ink); font-weight: 500; }

/* ---------- face-off ---------- */
.faceoff { display: grid; grid-template-columns: 1fr 110px 1fr; align-items: center; gap: 24px; margin-top: 60px; }
.faceoff .vs { font-family: var(--serif); font-style: italic; font-size: 96px; color: var(--red); text-align: center; }
.fo-side .portrait { width: 230px; height: 280px; }
.fo-side .q { font-size: 44px; margin-top: 30px; }
.fo-side .who { margin-top: 20px; }
.fo-side.r { text-align: right; }
.fo-side.r .portrait { margin-left: auto; }
.fo-side.r .who { align-items: flex-end; }
.fo-side.r .q::before { text-align: right; }
.fo-note { margin-top: 26px; font-size: 22px; line-height: 1.45; color: var(--mute); font-weight: 300; }

/* ---------- two-up company cases ---------- */
.twoup { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-top: 50px; }
.twoup > div { padding: 0 70px 0 0; }
.twoup > div + div { padding: 0 0 0 70px; border-left: 1px solid var(--line); }
.mini-chart { width: 100%; height: 250px; margin-top: 22px; }

/* ---------- science deep dives ---------- */
.formula { font-family: var(--serif); font-size: 52px; letter-spacing: 0.01em; color: var(--ink); }
.formula sup { font-size: 0.55em; }
.pipe { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin-top: 36px; }
.pipe .ps { position: relative; padding: 22px 22px 20px; border: 1px solid var(--line-2); border-radius: 6px; background: rgba(9, 12, 20, 0.72); }
.pipe .ps + .ps::before { content: "→"; position: absolute; left: -12px; top: 50%; transform: translate(-50%, -50%); color: var(--blue-2); font-size: 22px; }
.pipe .ps .pn { font-family: var(--mono); font-size: 13px; letter-spacing: 0.16em; color: var(--blue-2); text-transform: uppercase; }
.pipe .ps h4 { font-family: var(--serif); font-weight: 400; font-size: 31px; line-height: 1.05; margin-top: 8px; }
.pipe .ps p { font-size: 18px; line-height: 1.4; color: var(--ink-2); margin-top: 8px; font-weight: 300; }
.pipe .ps.ai { border-color: rgba(93, 139, 255, 0.75); box-shadow: 0 0 40px -10px rgba(93, 139, 255, 0.6); }
.bigstat { font-family: var(--serif); font-size: 140px; line-height: 0.9; letter-spacing: -0.03em; }
.bigstat small { font-size: 0.4em; }

/* ---------- org morph ---------- */
.morph .v { display: none; }
.slide[data-step="0"] .morph .v.k0, .slide[data-step="1"] .morph .v.k1, .slide[data-step="2"] .morph .v.k1 { display: block; animation: vin 0.7s var(--ease); }

/* ---------- caption swap (opening slide: tool -> worker -> loop) ---------- */
.swap { text-align: center; }
.swap .v { display: none; }
.swap .lead { max-width: 1240px; margin-left: auto; margin-right: auto; }
.swap .lead em { color: var(--ink); }
.slide[data-step="0"] .swap .v.k0, .slide[data-step="1"] .swap .v.k1, .slide[data-step="2"] .swap .v.k2 { display: block; animation: vin 0.8s var(--ease); }

/* ---------- debate votes ---------- */
.sides { position: relative; }
.side .sk { align-items: center; min-height: 72px; }
.side .sl { display: inline-flex; align-items: center; gap: 16px; }
.side .first-tag { font-style: normal; font-size: 13px; letter-spacing: 0.2em; padding: 6px 12px; border: 1px solid currentColor; border-radius: 100px; opacity: 0; transform: translateX(-8px); transition: opacity 0.4s, transform 0.4s var(--ease); }
.side.first .first-tag { opacity: 1; transform: none; }
.vote { display: inline-flex; align-items: center; gap: 12px; }
.vote .vb { width: 46px; height: 46px; border-radius: 50%; border: 1px solid currentColor; background: transparent; color: inherit; font: 400 28px/1 var(--sans); cursor: pointer; opacity: 0.55; display: grid; place-items: center; padding: 0 0 3px; transition: opacity 0.2s, background 0.2s, transform 0.12s; }
.vote .vb:hover { opacity: 1; background: rgba(93, 139, 255, 0.14); }
.side.no .vote .vb:hover { background: rgba(255, 75, 62, 0.14); }
.vote .vb:active { transform: scale(0.92); }
.side .vote .tally { width: 2.4ch; min-width: 0; padding: 0 0 2px; border: 0; border-bottom: 1px dashed transparent; background: transparent; color: var(--ink); font: 400 64px/1 var(--serif); text-align: center; outline: none; caret-color: currentColor; cursor: text; transition: border-color 0.2s; }
.side .vote .tally:hover, .side .vote .tally:focus { border-bottom-color: rgba(238, 235, 228, 0.4); }
.vote-bar { position: absolute; left: 0; right: 0; top: -3px; height: 5px; display: flex; opacity: 0; transition: opacity 0.4s; pointer-events: none; }
.sides.voted .vote-bar { opacity: 1; }
.vote-bar .va { width: var(--pa, 50%); background: var(--blue); box-shadow: 0 0 18px rgba(93, 139, 255, 0.7); transition: width 0.6s var(--ease); }
.vote-bar .vd { flex: 1; background: var(--red); box-shadow: 0 0 18px rgba(255, 75, 62, 0.7); }
.vote-bar .pa, .vote-bar .pd { position: absolute; bottom: 14px; font-family: var(--mono); font-size: 22px; letter-spacing: 0.08em; }
.vote-bar .pa { left: 0; color: var(--blue-2); }
.vote-bar .pd { right: 0; color: var(--red-2); }
