/* ==========================================================
   STUDIO CANVAS — one dataset in, slides generated, a story out.
   A black workflow board: input card, thin wires, a 2x2 of
   generated slides, two moving outputs.
   ========================================================== */
.st-section { position: relative; padding: clamp(36px, 5vw, 70px) 0 clamp(20px, 3vw, 40px); }
.st-shell { margin-top: clamp(16px, 2vw, 26px); border-radius: 22px; background: #000; border: 1px solid rgba(255,255,255,.1);
  overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.st-shell::-webkit-scrollbar { display: none; }
.stg { position: relative; width: 1400px; height: 600px; transform-origin: 0 0; color: #e9e9ea; font-family: var(--sans); }
.st-wires { position: absolute; inset: 0; pointer-events: none; }
.st-wires path { fill: none; stroke: rgba(255,255,255,.42); stroke-width: 1.3; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.1s cubic-bezier(.4,.1,.2,1); }
.stg.w1 .st-wires .a, .stg.w2 .st-wires .b { stroke-dashoffset: 0; }
.st-lab { position: absolute; display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: #d9d9db; white-space: nowrap; opacity: 0; transition: opacity .5s; }
.st-lab i { font-style: normal; color: #8b8b90; margin-left: 8px; display: inline-flex; align-items: center; gap: 5px; }
.st-lab svg { width: 13px; height: 13px; flex: none; }
.st-lab.show { opacity: 1; }

/* the dataset card */
.st-in { position: absolute; left: 24px; top: 96px; width: 300px; height: 388px; border-radius: 12px; background: #fff; color: #1b1f27; overflow: hidden;
  opacity: 0; transform: translateY(10px) scale(.97); transition: opacity .6s, transform .6s cubic-bezier(.2,.8,.2,1); box-shadow: 0 0 0 1px rgba(255,255,255,.2); }
.stg.in .st-in { opacity: 1; transform: none; }
.st-in .bar { background: #1f7a4d; color: #fff; font-size: 11px; font-weight: 600; padding: 8px 10px; display: flex; justify-content: space-between; }
.st-in .bar em { font-style: normal; font-weight: 400; opacity: .75; font-family: var(--mono); font-size: 9.5px; }
.st-in .row { display: grid; grid-template-columns: 28px 1.25fr 40px .9fr .8fr; gap: 5px; padding: 0 10px; height: 21px; align-items: center; font-family: var(--mono); font-size: 9px; border-bottom: 1px solid #eceef2; }
.st-in .row.h { background: #f1f3f6; font-family: var(--sans); font-weight: 600; font-size: 9px; color: #5a6272; }
.st-in .row span:first-child { color: #9aa1ad; }
.st-in .rows-wrap { overflow: hidden; height: 330px; }
.st-in .rows { animation: stScroll 14s linear infinite; }
@keyframes stScroll { to { transform: translateY(-50%); } }
.st-in::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 46px; background: linear-gradient(transparent, #fff); }

/* generated tiles */
.st-tile { position: absolute; width: 250px; height: 150px; border-radius: 10px; overflow: hidden; background: #111; box-shadow: 0 0 0 1px rgba(255,255,255,.1); opacity: 0; transition: opacity .4s; }
.st-tile.gen, .st-tile.done { opacity: 1; }
.st-tile img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transform: scale(1.06); transition: opacity .7s, transform 1.2s cubic-bezier(.2,.7,.2,1); }
.st-tile.done img { opacity: 1; transform: none; }
.st-tile::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, #151515 30%, #2a2a2e 50%, #151515 70%); background-size: 220% 100%; animation: stShim 1.1s linear infinite; }
.st-tile.done::before { opacity: 0; transition: opacity .4s; animation: none; }
@keyframes stShim { from { background-position: 120% 0; } to { background-position: -120% 0; } }
.st-tile .tag { position: absolute; left: 8px; bottom: 7px; z-index: 2; font-size: 10.5px; color: #fff; background: rgba(0,0,0,.55); padding: 2px 7px; border-radius: 100px; opacity: 0; transition: opacity .4s .3s; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.st-tile.done .tag { opacity: 1; }
.st-tile.sel { box-shadow: 0 0 0 2px #fff; }
.st-tile .genl { position: absolute; left: 0; right: 0; top: 50%; text-align: center; margin-top: -8px; font-family: var(--mono); font-size: 10px; letter-spacing: .14em; color: #8b8b90; z-index: 1; }
.st-tile.done .genl { display: none; }

/* outputs */
.st-out { position: absolute; width: 190px; height: 250px; border-radius: 10px; overflow: hidden; background: #111; box-shadow: 0 0 0 1px rgba(255,255,255,.1); opacity: 0; transition: opacity .5s; }
.st-out.done { opacity: 1; }
.st-deck img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .8s; }
.st-deck img.on { opacity: 1; animation: stKen 3.4s ease-out forwards; }
@keyframes stKen { from { transform: scale(1.18) translateX(-4%); } to { transform: scale(1.04) translateX(3%); } }
.st-reel { background: linear-gradient(160deg, #123b2c, #0b241b); padding: 18px 16px; display: flex; flex-direction: column; justify-content: flex-end; }
.st-reel .k { font-family: var(--mono); font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; color: #9fd2b8; }
.st-reel .n { font-family: var(--serif); font-size: 60px; line-height: 1; color: #fff; margin: 6px 0 8px; font-variant-numeric: tabular-nums; }
.st-reel .t { font-size: 13px; line-height: 1.4; color: #d7ebe1; min-height: 3.6em; }
.st-reel .bar { height: 6px; border-radius: 3px; background: rgba(255,255,255,.14); margin-top: 12px; overflow: hidden; }
.st-reel .bar i { display: block; height: 100%; width: 0; background: #e8b872; border-radius: 3px; transition: width 1.3s cubic-bezier(.3,.8,.2,1); }
.st-reel .dots { position: absolute; left: 16px; right: 16px; top: 18px; display: grid; grid-template-columns: repeat(18, 1fr); gap: 3px; }
.st-reel .dots b { aspect-ratio: 1; border-radius: 50%; background: #2f6b54; opacity: .25; transition: opacity .3s, background .3s; }
.st-reel .dots b.on { opacity: 1; } .st-reel .dots b.x { background: #e8b872; opacity: 1; }

/* title panel + toolbar, like a workflow header */
.st-head { position: absolute; right: 22px; top: 16px; display: flex; align-items: center; gap: 14px; background: #141416; border: 1px solid rgba(255,255,255,.1); border-radius: 12px; padding: 9px 10px 9px 16px; }
.st-head b { display: block; font-size: 13.5px; color: #fff; font-weight: 600; }
.st-head span { display: block; font-size: 12px; color: #8b8b90; }
.st-head a { font-size: 13px; color: #fff; background: #26262a; border-radius: 9px; padding: 8px 14px; white-space: nowrap; }
.st-head a:hover { background: #3a3a40; }
.st-tool { position: absolute; display: flex; gap: 14px; align-items: center; background: #1a1a1d; border: 1px solid rgba(255,255,255,.12); border-radius: 10px; padding: 7px 13px; font-size: 12px; color: #cfcfd3; opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .3s; white-space: nowrap; }
.st-tool.show { opacity: 1; transform: none; }
.st-tool em { font-style: normal; color: #9c8cff; }
.st-cur { position: absolute; left: 260px; top: 250px; width: 20px; height: 20px; z-index: 9; transition: left 1.2s cubic-bezier(.45,.05,.2,1), top 1.2s cubic-bezier(.45,.05,.2,1); pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .st-in .rows, .st-tile::before { animation: none; } .st-wires path { transition: none; } }

.st-head span img { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; vertical-align: -4px; margin-right: 6px; }

/* second story: thesis study slides drawn in HTML */
.sl-wrap { position: absolute; inset: 0; display: none; opacity: 0; transition: opacity .7s; }
.stg.s2 .st-tile img { display: none; }
.stg.s2 .st-tile .sl-wrap { display: block; }
.stg.s2 .st-tile.done .sl-wrap { opacity: 1; }
.stg.s2 .st-deck img { display: none; }
.st-deck .sl-wrap.dk { display: none; }
.stg.s2 .st-deck .sl-wrap.dk { display: block; }
.stg.s2 .st-deck .sl-wrap.dk.on { opacity: 1; }
.sl { position: absolute; inset: 0; background: linear-gradient(160deg, #f5f3ee, #ebe7de); color: #1d1f27; padding: 12px 14px; display: flex; flex-direction: column; }
.sl p { order: -2; margin: 0; font-family: var(--serif); font-size: 18px; line-height: 1.05; }
.sl span { order: -1; margin: 3px 0 0; font-family: var(--mono); font-size: 8.5px; letter-spacing: .08em; text-transform: uppercase; color: #6b6f7c; }
.sl-gauge { position: relative; margin: 8px auto 0; width: 92px; height: 52px; overflow: hidden; }
.sl-gauge::before { content: ""; position: absolute; left: 0; top: 0; width: 92px; height: 92px; border-radius: 50%; background: conic-gradient(from -90deg, #12805A calc(var(--v) * 180deg), #d9d4ea 0 180deg, transparent 0); -webkit-mask: radial-gradient(circle, transparent 54%, #000 55%); mask: radial-gradient(circle, transparent 54%, #000 55%); }
.sl-gauge b { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; font-family: var(--serif); font-size: 19px; font-weight: 400; }
.sl-bars { margin-top: 10px; height: 56px; display: flex; align-items: flex-end; gap: 4px; }
.sl-bars i { flex: 1; height: var(--h); background: #2f6b54; border-radius: 2px 2px 0 0; } .sl-bars i:nth-child(5n) { background: #c99a3f; }
.sl-heat { margin: 8px 0 0; width: 70px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; }
.sl-heat i { aspect-ratio: 1; background: rgba(18,128,90,var(--o)); border-radius: 1px; }
.sl-steps { margin-top: 10px; display: grid; gap: 5px; }
.sl-steps i { display: block; width: var(--w); font-style: normal; font-family: var(--mono); font-size: 8.5px; color: #fff; background: #1f4d3d; padding: 3px 6px; border-radius: 3px; }
.sl-steps i:nth-child(3) { background: #12805A; }
.st-deck .sl p { font-size: 22px; } .st-deck .sl { padding: 16px; }
.st-deck .sl-gauge { width: 120px; height: 66px; } .st-deck .sl-gauge::before { width: 120px; height: 120px; }
.st-deck .sl-bars { height: 110px; } .st-deck .sl-heat { width: 120px; }
