/* v4 skin for project pages: always night, Outfit + Space Mono, hairlines, tracked mono labels */
html, html[data-theme="dark"] {
  --bg: #000; --bg-2: #0e0e10; --bg-3: #070708;
  --ink: #f4f4f6; --ink-2: #b4b4ba; --ink-3: #7c7c84; --ink-4: #4a4a50;
  --line: rgba(255,255,255,.12); --line-2: rgba(255,255,255,.07);
  --blue: #ff4fb0; --blue-2: #ff6fc0;
  --font: "Outfit", system-ui, sans-serif;
  --mono: "Space Mono", ui-monospace, Menlo, Consolas, monospace;
  --nav: 64px;
}
body { background: var(--bg); color: var(--ink); font-weight: 300; letter-spacing: 0; }
b, strong { font-weight: 500; }
.nav { background: rgba(0,0,0,.78) !important; border-bottom-color: var(--line-2) !important; }
.nav__brand { font-weight: 400; font-size: 13px; letter-spacing: .2em; text-transform: uppercase; }
.nav__links a { font-size: 12.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.nav__links a:hover { color: var(--ink); text-decoration: none; }
.nav__links .pill { background: transparent !important; color: var(--ink) !important; border: 1px solid var(--line); border-radius: 0; font-family: var(--mono); font-size: 11px; letter-spacing: .2em; }
.nav__links .pill:hover { border-color: var(--blue); color: var(--blue) !important; }

.marks { display: none; }
.t-hero { font-weight: 300; letter-spacing: -.02em; }
.t-hero--sub, .t-title, .t-head { font-weight: 300; letter-spacing: -.01em; }
.t-lead { font-weight: 300; letter-spacing: 0; color: var(--ink-2); }
.eyebrow, .show__num, .feat__src, .feat__when, .demo__badge { font-family: var(--mono); font-weight: 400; letter-spacing: .22em; font-size: 11px; }
.btn { border-radius: 0 !important; font-family: var(--mono); font-weight: 400; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.seg { border-radius: 0 !important; }
.seg button { border-radius: 0 !important; font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.rule { background: var(--line); }
.footer { font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; }
::selection { background: rgba(255,79,176,.35); }

/* ---------- interactive lab band ---------- */
.lab { display: grid; grid-template-columns: minmax(300px, 380px) 1fr; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: clamp(40px, 5vw, 70px); background: #000; }
.lab__t { padding: 40px clamp(20px, 3vw, 44px); border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.lab__k { color: var(--blue); font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase; }
.lab h2 { margin-top: 14px; font-weight: 300; font-size: clamp(28px, 2.6vw, 38px); line-height: 1.1; color: var(--ink); }
.lab__d { margin-top: 14px; color: var(--ink-2); font-size: 15px; line-height: 1.55; }
.lab__ctl { margin-top: 22px; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); width: 100%; max-width: 340px; }
.lab__ctl:has(> :nth-child(4)) { grid-auto-flow: row; grid-template-columns: 1fr 1fr; }
.lab__ctl button { background: #000; border: 0; text-align: center; white-space: nowrap; color: var(--ink-3); font-family: var(--mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; padding: 10px 14px; cursor: pointer; transition: color .2s, background .2s; }
.lab__ctl button:hover { color: var(--ink); }
.lab__ctl button.on { color: var(--bg); background: var(--ink); }
.lab__log { list-style: none; margin: 22px 0 0; padding: 0; font-family: var(--mono); font-size: 11px; line-height: 1.75; max-height: 230px; overflow: auto; border-top: 1px solid var(--line-2); padding-top: 10px; }
.lab__log li { display: grid; grid-template-columns: 26px 128px 1fr; color: var(--ink-3); animation: labIn .35s ease; }
.lab__log li span { color: var(--ink-4); }
.lab__log li b { font-weight: 400; color: var(--blue); }
.lab__log li:last-child i { color: var(--ink); }
.lab__log i { font-style: normal; }
@keyframes labIn { from { opacity: 0; transform: translateY(4px); } }
.lab__hud { margin-top: auto; padding-top: 22px; color: var(--ink-3); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; line-height: 2; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.lab__hud i { display: inline-block; width: 7px; height: 7px; margin-right: 6px; vertical-align: 0; }
.lab__c { position: relative; min-height: 560px; }
.lab__c canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; touch-action: none; }
.nav__brand { display: inline-flex; align-items: center; gap: 12px; }
.nav__logo { width: 22px; height: 22px; }
@media (max-width: 900px) { .lab { grid-template-columns: 1fr; } .lab__t { border-right: 0; border-bottom: 1px solid var(--line); } .lab__c { min-height: 440px; } }

/* ---------- v4 media system: square plates, hairline grid, no gaps ---------- */
:root { --plate: #ffffff; }
.wrap { width: min(100% - 2 * clamp(18px, 3vw, 44px), 1360px); }
.sec { padding-block: clamp(64px, 8vw, 112px); }
.chap { grid-template-columns: 1fr 1.2fr; margin-bottom: 0; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.chap .eyebrow { color: var(--blue); }
.chap .t-body { color: var(--ink-2); font-size: 15.5px; }
.gal { gap: 0 !important; border-left: 1px solid var(--line); border-top: 0; }
.gal > * { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #000; }
.g .m, .show__media, .show__media--916, .show__media--45, .phone, .feat__m, .about__photo, .board__full, .board__rows, .pages figure .media, .scroller .m, .bk-hero__cover { border-radius: 0 !important; box-shadow: none !important; }
.g .m::after { display: none !important; }
.g .m { background: var(--plate) !important; }

.board__full, .board__rows, .board { background: var(--plate) !important; border-color: transparent !important; }
.show__media, .show__media--916, .show__media--45 { background: var(--plate) !important; }
.show__media--grey, .show__media--dark { background: #0b0b0c !important; }
.g .cap { margin: 0; padding: 12px 14px 14px; font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); line-height: 1.6; }
.g .cap b { color: var(--ink); font-weight: 400; }
.show__cap { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.show__link { font-family: var(--mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; }
.show__stage { border: 1px solid var(--line); padding: 0 0 16px; background: #000; }
.show__stage .show__media { border-bottom: 1px solid var(--line); }
.show__stage:has(.show__media--916), .show__stage:has(.show__media--45) { background: var(--plate); }
.show__stage:has(.show__media--916) .show__cap, .show__stage:has(.show__media--45) .show__cap { color: #6e6e73; }
.seg { background: transparent !important; border: 1px solid var(--line); padding: 0; }
.seg button { color: var(--ink-3); background: transparent; }
.seg button.on { background: var(--ink) !important; color: var(--bg) !important; }
.phones { column-gap: 0 !important; columns: 3; border-left: 1px solid var(--line); border-top: 1px solid var(--line); }
.phones figure { margin: 0 !important; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.phone { background: #0b0b0c !important; }
.phones figcaption { margin: 0 !important; padding: 12px 14px 14px; font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.feat__m { background: var(--plate); }
.next { border-top: 1px solid var(--line); }

/* square everything; light media sits on the plate */
body *:not(.nav__logo):not(svg):not(svg *) { border-radius: 0 !important; }
.seq__stage { background: var(--plate) !important; isolation: isolate; }

.ug .card, .ug [class*="box"], .ug [class*="panel"] { box-shadow: none !important; }

/* ---------- stadium cinematic (STF Agent) ---------- */
.stad { position: relative; width: 100%; height: 100%; background: #000; overflow: hidden; cursor: grab; }
.stad:active { cursor: grabbing; }
.stad__c { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stad__v { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(0,0,0,.75)), linear-gradient(0deg, rgba(0,0,0,.6), transparent 26%); }
.stad__log { position: absolute; left: 18px; top: 18px; margin: 0; padding: 10px 14px; list-style: none; font-size: 11px; line-height: 1; letter-spacing: 0 !important; text-transform: none !important; pointer-events: none; background: rgba(0,0,0,.74); }
.stad__log li { display: grid; grid-template-columns: 118px 230px 64px; gap: 10px; white-space: nowrap; padding: 6px 0; color: rgba(255,255,255,.22); transition: color .4s; }
.stad__log li b { font-weight: 400; }
.stad__log li.past { color: rgba(255,255,255,.55); }
.stad__log li.on { color: #f4f4f6; }
.stad__log li.on b { color: #ff4fb0; }
.stad__log li i { font-style: normal; color: inherit; opacity: .7; text-align: right; }
.stad__hud { position: absolute; left: 22px; right: 22px; bottom: 18px; margin: 0; display: flex; justify-content: space-between; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.6); pointer-events: none; }
@media (max-width: 760px) { .stad__log li { grid-template-columns: 96px 1fr; } .stad__log li i { display: none; } }
.stad-band { height: min(78vh, 760px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }


/* light theme for project pages: same type and layout, white ground */
html[data-theme="light"] {
  --bg: #ffffff; --bg-2: #f3f3f4; --bg-3: #e9e9ec;
  --ink: #111113; --ink-2: #3a3a40; --ink-3: #6e6e76; --ink-4: #a6a6ad;
  --line: rgba(0,0,0,.12); --line-2: rgba(0,0,0,.07); --blue: #d0107a; --blue-2: #b80e6b;
  --font: "Outfit", system-ui, sans-serif; --mono: "Space Mono", ui-monospace, Menlo, Consolas, monospace; --nav: 64px;
}
html[data-theme="light"] .nav { background: rgba(255,255,255,.84) !important; }
html[data-theme="light"] .lab, html[data-theme="light"] .gal > *, html[data-theme="light"] .show__stage { background: #fff; }
html[data-theme="light"] .nav__links .pill { color: #111 !important; }
html[data-theme="light"] .lab__ctl button { background: #fff; }
html[data-theme="light"] .lab__ctl button.on { background: #111; color: #fff; }
html[data-theme="light"] .stad { background: #fff; }
.theme { border-radius: 0 !important; }

/* VoxelMorph map (static three.js render) */
.vmx { position: absolute; inset: 0; background: var(--bg); overflow: hidden; cursor: grab; }
.vmx:active { cursor: grabbing; }
.vmx canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.vmx__info { position: absolute; right: 12px; top: 12px; width: 210px; padding: 10px 12px; background: var(--bg); border: 1px solid var(--line); font-size: 9.5px; letter-spacing: .04em; text-transform: none; color: var(--ink-2); display: grid; gap: 6px; opacity: 0; transition: opacity .15s; pointer-events: none; }
.vmx__info.on { opacity: 1; }
.vmx__info b { font-weight: 400; color: #ff4fb0; }
.vmx__info span { position: relative; padding-bottom: 4px; }
.vmx__info i { position: absolute; left: 0; bottom: 0; height: 2px; }
.vmx__foot { position: absolute; left: 12px; bottom: 6px; margin: 0; font-size: 9.5px; letter-spacing: .06em; text-transform: none; color: var(--ink-3); pointer-events: none; }

.vmx canvas.vmx__map { left: 0; right: 0; }
.vmx--left canvas.vmx__map { left: 26%; width: 74%; }
.vmx--left canvas.vmx__side { position: absolute; left: 0; top: 0; width: 26%; height: 100%; inset: auto; }
.vmx--panel canvas.vmx__map { width: 64%; }
.vmx--panel canvas.vmx__side { position: absolute; inset: auto; top: 14px; left: calc(64% + 22px); width: calc(36% - 36px); height: calc(100% - 28px); }
.vmx--panel::after { content: ""; position: absolute; left: calc(64% + 8px); top: 10px; bottom: 10px; width: 1px; background: var(--line); }
.vmx--panel .vmx__info { display: none; }
.vmx--left .vmx__info { right: 8px; top: 4px; }

/* STF demo viewport */
.stfv-wrap { position: relative; margin-top: 20px; aspect-ratio: 4 / 3; border: 1px solid var(--line); }
.stfv { position: absolute; inset: 0; overflow: hidden; cursor: grab; background: #14161a; }
.stfv canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stfv__bar { position: absolute; left: 0; right: 0; top: 0; margin: 0; padding: 8px 12px; display: flex; justify-content: space-between; font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.6); background: rgba(0,0,0,.35); pointer-events: none; }
html[data-theme="light"] .stfv__bar { color: rgba(0,0,0,.6); background: rgba(255,255,255,.6); }
.stfv__layers { position: absolute; left: 12px; bottom: 10px; margin: 0; padding: 0; list-style: none; font-size: 9.5px; letter-spacing: .06em; line-height: 1.6; color: rgba(255,255,255,.35); pointer-events: none; }
html[data-theme="light"] .stfv__layers { color: rgba(0,0,0,.35); }
.stfv__layers li { display: flex; align-items: center; gap: 7px; transition: color .3s; }
.stfv__layers li i { width: 7px; height: 7px; display: inline-block; }
.stfv__layers li b { font-weight: 400; margin-left: 6px; opacity: .7; }
.stfv__layers li.past { color: rgba(255,255,255,.7); } html[data-theme="light"] .stfv__layers li.past { color: rgba(0,0,0,.7); }
.stfv__layers li.on { color: #ff4fb0; }
html[data-theme="light"] .panel { background: #f4f5f7; box-shadow: none; border: 1px solid var(--line); }
html[data-theme="light"] .panel__bar { background: #eceef1; border-bottom-color: rgba(0,0,0,.08); }
html[data-theme="light"] .panel__bar span { background: #cfd3d9; }
html[data-theme="light"] .panel__bar b { color: #6b727c; }
.lab__3d { position: absolute; inset: 0; transition: opacity .4s; cursor: grab; } .lab__3d .u3d { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* STF briefs: read as buttons */
.prompts { display: flex; flex-wrap: wrap; gap: 10px; }
.prompts button { display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px 12px 14px; border-radius: 0; font-family: var(--font); font-size: 15px; cursor: pointer; }
.prompts button::before { content: ""; width: 0; height: 0; border-left: 8px solid #ff4fb0; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.prompts button.on::before { border-left-color: #fff; }
.prompts button:focus-visible { outline: 2px solid #ff4fb0; outline-offset: 2px; }
/* full site plans, never cropped */
.g--site .m { aspect-ratio: 1600 / 781 !important; background: #fff !important; }
.g--site .m img { object-fit: contain !important; }

/* ---------- phones: project pages ---------- */
@media (max-width: 640px) {
  .nav__brand { font-size: 0 !important; gap: 0 !important; }
  .nav__brand .nav__logo { width: 24px; height: 24px; }
  .nav__links { gap: 14px !important; }
  .stad__log li { grid-template-columns: 1fr !important; } .stad__log li span, .stad__log li i { display: none; }
  .prompts button { font-size: 14px; padding: 10px 14px 10px 12px; }
  .vmx__info { width: 170px; }
}


/* facades training renders, redrawn live */
.g--train canvas { position: absolute; inset: 14px; width: calc(100% - 28px); height: calc(100% - 28px); display: block; }
@media (max-width: 640px) { .gal .g--train { grid-column: 1 / -1; } }


/* facades: RL loop, drawn as a diagram on the page itself (no plate) */
.show__media.show__media--rl { background: transparent !important; aspect-ratio: auto; display: flex; align-items: center; justify-content: center; padding: 8px 0; }
.show__media--rl > .rlx { position: relative; inset: auto; width: 100%; height: auto; opacity: 1; display: block; overflow: visible; color: var(--ink); }
.rlx__box rect, .rlx__flow path { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-dasharray: 8 6; stroke-linecap: round; }
.rlx__box rect { opacity: .9; }
.rlx__flow path { animation: rlxflow 1.6s linear infinite; }
.rlx__arw { fill: currentColor; }
.rlx__t text { fill: currentColor; text-anchor: middle; font-family: var(--sans); }
.rlx__t .b { font-size: 24px; letter-spacing: .16em; font-weight: 400; }
.rlx__t .s { font-size: 21px; letter-spacing: .02em; font-weight: 400; }
.rlx__t text[x="958"] { text-anchor: middle; }
.rlx__m { fill: #e93cc8; }
.rlx__c { fill: #2ac6e6; }
.rlx__gh { fill: #fff; font: 600 17px "Space Mono", monospace; text-anchor: middle; }
.rlx__ap { transform-box: fill-box; transform-origin: center; }
.rlx__ap1 { transform: scale(.17); } .rlx__ap2 { transform: scale(.68); } .rlx__ap3 { transform: scale(1); }
@keyframes rlxflow { to { stroke-dashoffset: -28; } }
@media (prefers-reduced-motion: reduce) { .rlx__flow path { animation: none; } }

/* fit to the screen: no block taller than the viewport */
.show__media--916 { width: min(100%, calc(min(62vh, 600px) * 9 / 16)); }
.show__media--45 { width: min(100%, calc(min(62vh, 580px) * 4 / 5)); }
.stfv-wrap { aspect-ratio: 16 / 10; max-height: 56vh; }
.panel iframe { height: clamp(480px, 68vh, 620px); }
.seq__stage { height: min(74vh, 74svh); }
.reel { max-width: calc(2 * min(64vh, 600px) * 4 / 5 + 18px); margin-inline: auto; }
.board__full { width: fit-content; max-width: 100%; margin-inline: auto; }
.board__full img { width: auto; max-width: 100%; max-height: 72vh; margin-inline: auto; }
.g--sq .m { width: min(100%, 62vh); margin-inline: auto; }
.g--sq .cap { width: min(100%, 62vh); margin-inline: auto; }
.i3d { max-width: min(100%, 960px); margin-inline: auto; }
[data-demo="raycastDemo"] .demo__stage canvas { width: min(100%, calc(58vh * 900 / 460)); margin-inline: auto; display: block; }
.g--cap .m { width: min(100%, calc(70vh * 16 / 9)); margin-inline: auto; }
.g--cap .cap { width: min(100%, calc(70vh * 16 / 9)); margin-inline: auto; }

/* UrbanGPT: the boundary tool reads as the main control */
.lab__ctl:has(> .lab__draw) { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); max-width: 420px; }
.lab__ctl .lab__draw { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--acc, #ff4fb0); box-shadow: inset 0 0 0 1px var(--acc, #ff4fb0); padding: 13px 14px; font-size: 11px; }
.lab__ctl .lab__draw svg { width: 15px; height: 15px; flex: none; }
.lab__ctl .lab__draw:hover { background: var(--acc, #ff4fb0); color: #000; }
.lab__ctl .lab__draw:not(.used) { animation: drawcall 2.4s ease-in-out infinite; }
@keyframes drawcall { 0%, 100% { box-shadow: inset 0 0 0 1px var(--acc, #ff4fb0); } 50% { box-shadow: inset 0 0 0 1px var(--acc, #ff4fb0), 0 0 0 4px rgba(255, 79, 176, .18); } }
@media (prefers-reduced-motion: reduce) { .lab__ctl .lab__draw { animation: none; } }
html[data-theme="light"] .lab__ctl .lab__draw:hover { color: #fff; }

/* next / index and footer share the content margins */
.narrow:has(> .next), .footer .narrow { width: min(100% - 2 * clamp(18px, 3vw, 44px), 1360px); }
.sec:has(> .narrow > .next) { padding-top: 0; }

/* the boundary button invites a click: it bobs, and three chevrons run toward the drawing area */
.lab__ctl .lab__draw { position: relative; }
.lab__ctl .lab__draw:not(.used) { animation: drawcall 2.4s ease-in-out infinite, drawbob 1.6s ease-in-out infinite; }
.lab__go { display: inline-flex; margin-left: 4px; font-size: 15px; line-height: 1; letter-spacing: 0; }
.lab__go i { font-style: normal; opacity: .2; animation: drawgo 1.2s linear infinite; }
.lab__go i:nth-child(2) { animation-delay: .2s; } .lab__go i:nth-child(3) { animation-delay: .4s; }
.lab__draw.used .lab__go { display: none; }
@keyframes drawbob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes drawgo { 0%, 100% { opacity: .2; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .lab__ctl .lab__draw:not(.used) { animation: none; } .lab__go i { animation: none; opacity: .8; } }

/* lab buttons: icon, magenta sweep on hover, press ripple */
.lab__ctl button { position: relative; overflow: hidden; isolation: isolate; display: flex; align-items: center; justify-content: center; gap: 8px; transition: color .25s, background .25s, transform .12s; }
.lab__ctl button::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--acc, #ff4fb0); transform: scaleX(0); transform-origin: left; transition: transform .38s cubic-bezier(.2, .7, .2, 1); }
.lab__ctl button:hover::before { transform: scaleX(1); }
.lab__ctl button:hover, .lab__ctl button.on:hover { color: #000; }
.lab__ctl button:active { transform: scale(.97); }
.lab__ctl button:focus-visible { outline: 1px solid var(--acc, #ff4fb0); outline-offset: -3px; }
.lab__ctl .ic { width: 13px; height: 13px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; stroke-linecap: round; transition: transform .45s cubic-bezier(.2, .7, .2, 1); }
.lab__ctl [data-act="play"] .ic { fill: currentColor; stroke: none; }
.lab__ctl [data-act="regen"]:hover .ic { transform: rotate(-200deg); }
.lab__ctl [data-act="plan"]:hover .ic { transform: scale(1.2); }
.lab__ctl [data-act="massing"]:hover .ic { transform: translateY(-2px) rotate(-8deg); }
.lab__ctl [data-act="play"]:hover .ic { transform: translateX(2px); }
.lab__ctl [data-act="scrub"]:hover .ic { transform: translateX(-2px); }
.lab__ctl [data-act="learned"]:hover .ic { transform: rotate(60deg); }
.lab__ctl [data-act="fixed"]:hover .ic { transform: scaleY(.55); }
.lab__ctl [data-act="regen"].tap .ic { animation: icspin .6s cubic-bezier(.2, .7, .2, 1); }
@keyframes icspin { from { transform: rotate(0); } to { transform: rotate(-360deg); } }
.lab__rip { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: rgba(255, 255, 255, .55); pointer-events: none; animation: labrip .6s ease-out forwards; }
html[data-theme="light"] .lab__rip { background: rgba(0, 0, 0, .25); }
@keyframes labrip { to { transform: scale(36); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .lab__ctl button::before, .lab__ctl .ic { transition: none; } .lab__rip { display: none; } }
.lab__ctl:has(> .lab__draw) { grid-template-columns: 1.45fr 1fr 1fr; }
.lab__ctl:has(> .lab__draw) button:not(.lab__draw) { letter-spacing: .12em; padding-inline: 8px; gap: 7px; }

/* STF briefs: magenta sweep on hover, markers nudge until a brief is picked, build progress under the active one */
.prompts button:hover::before { border-left-color: #fff; }
.prompts button:active { transform: scale(.97); }
.prompts button::before { transition: transform .3s, border-color .25s; }
.prompts button:hover::before { transform: translateX(3px); }
.prompts:not(.used) button:not(.on)::before { animation: pnudge 2.4s ease-in-out infinite; }
.prompts:not(.used) button:nth-child(3)::before { animation-delay: .3s; }
@keyframes pnudge { 0%, 30%, 100% { transform: translateX(0); } 15% { transform: translateX(5px); } }
.prompts button::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: calc(var(--p, 0) * 100%); background: #fff; opacity: 0; transition: opacity .4s; }
.prompts button.on::after { opacity: .85; }
@media (prefers-reduced-motion: reduce) { .prompts button::before { animation: none !important; } }

/* STF briefs read as buttons at rest: magenta outline, a light that runs across each in turn; hover fills, the active one shows build progress */
#try .prompts button { position: relative; overflow: hidden; color: var(--ink); border: 1px solid rgba(255, 79, 176, .6); background-color: rgba(255, 79, 176, .06);
  background-image: linear-gradient(#ff4fb0, #ff4fb0), linear-gradient(105deg, transparent 30%, rgba(255, 79, 176, .38) 50%, transparent 70%);
  background-repeat: no-repeat; background-size: 0 100%, 60% 100%; background-position: left center, -160% 0;
  transition: background-size .38s cubic-bezier(.2, .7, .2, 1), color .25s, border-color .25s, transform .12s; animation: pglint 3.6s ease-in-out infinite; }
#try .prompts button:nth-child(2) { animation-delay: .5s; } #try .prompts button:nth-child(3) { animation-delay: 1s; }
@keyframes pglint { 0%, 50% { background-position: left center, -160% 0; } 100% { background-position: left center, 260% 0; } }
#try .prompts button:hover { background-size: 100% 100%, 60% 100%; color: #fff; border-color: #ff4fb0; }
#try .prompts button.on { background-color: #ff4fb0; color: #fff; border-color: #ff4fb0; animation: none; background-size: 0 100%, 0 0; }
html[data-theme="light"] #try .prompts button:not(.on):not(:hover) { color: #111; }
@media (prefers-reduced-motion: reduce) { #try .prompts button { animation: none; } }

@media (max-width: 900px) { .lab__c:has(> [data-sim="l-lora"]) { min-height: 580px; } }
/* LoRA lab: the canvas is as tall as its content needs at this width, so its margins stay even on all four sides */
@media (min-width: 901px) { .lab__c:has(> [data-sim="l-lora"]) { min-height: max(480px, calc(.625 * (min(100vw - 2 * clamp(18px, 3vw, 44px), 1360px) - 711px) + 111px)); } }
/* lab frames: the top and bottom rules stop at the page margins, like the section rules above them; drawn on top so no 3D view covers them */
.lab { border-top: 0; border-bottom: 0; position: relative; }
.lab::before, .lab::after { content: ""; position: absolute; z-index: 3; height: 1px; background: var(--line); pointer-events: none;
  left: calc((100% - min(100% - 2 * clamp(18px, 3vw, 44px), 1360px)) / 2); right: calc((100% - min(100% - 2 * clamp(18px, 3vw, 44px), 1360px)) / 2); }
.lab::before { top: 0; } .lab::after { bottom: 0; }
/* on desktop the lab box sits in the page column, so its text starts where its rules start */
@media (min-width: 901px) {
  .lab { width: min(100% - 2 * clamp(18px, 3vw, 44px), 1360px); margin-inline: auto; }
  .lab::before, .lab::after { left: 0; right: 0; }
  .lab__t { padding-left: 0; }
}
.lab + .sec--line { border-top: 0; }   /* the lab already closes with its own rule */

/* Jeddah: the method as one exploded axonometric, drawn live, with a panel that opens each part */
.lab--axo .lab__c { min-height: 0; }
.axo { display: grid; grid-template-columns: auto minmax(260px, 1fr); height: 100%; }
.axo__stage { position: relative; width: min(620px, 56vw, calc((100svh - 120px) * .8)); aspect-ratio: 4 / 5; background: #000; }
html[data-theme="light"] .axo__stage { background: #fff; }
.axo__cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; cursor: grab; }
.axo__panel { display: flex; flex-direction: column; padding: 34px clamp(20px, 2.4vw, 36px); border-left: 1px solid var(--line); min-width: 0; }
.axo__n { font-size: 10.5px; letter-spacing: .16em; color: #ff4fb0; }
.axo__h { margin-top: 12px; font-weight: 300; font-size: clamp(22px, 1.9vw, 30px); line-height: 1.12; color: var(--ink); }
.axo__d { margin-top: 12px; font-size: 14.5px; line-height: 1.6; color: var(--ink-2, rgba(255,255,255,.72)); min-height: 4.8em; }
.axo__fig { margin: 18px 0 0; border: 1px solid var(--line); background: #000; aspect-ratio: 16 / 10; overflow: hidden; }
.axo__fig img { width: 100%; height: 100%; object-fit: contain; display: block; animation: axoin .5s ease both; }
.axo__fig.crop img { object-fit: cover; }
@keyframes axoin { from { opacity: 0; transform: scale(1.03); } }
.axo__list { list-style: none; margin: auto 0 0; padding: 22px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.axo__list li { border-top: 1px solid var(--line); }
.axo__list button { all: unset; box-sizing: border-box; display: flex; gap: 8px; width: 100%; padding: 7px 0; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3, rgba(255,255,255,.5)); cursor: pointer; transition: color .2s, padding .2s; }
.axo__list button span { color: #ff4fb0; opacity: .7; }
.axo__list button:hover, .axo__list li.on button { color: var(--ink); }
.axo__list li.on button span { opacity: 1; }
.axo__list li.on button { box-shadow: inset 2px 0 0 #ff4fb0; padding-left: 8px; }
.axo__list button:focus-visible { outline: 1px solid #ff4fb0; outline-offset: 2px; }
html[data-theme="light"] .axo__fig { background: #fff; }
@media (max-width: 1180px) { .axo__list { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .axo { grid-template-columns: 1fr; } .axo__stage { width: 100%; } .axo__panel { border-left: 0; border-top: 1px solid var(--line); padding: 24px 20px 28px; } .axo__list { display: none; } .axo__d { min-height: 0; } }
