/* =====================================================================
   Lab layer: test-equipment explorer, PLM release demo, AR assembly demo,
   wind tunnel, microscope viewers and the design card.
   ===================================================================== */

/* ---------- shared bits ---------- */
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); text-decoration: underline; cursor: pointer; }
.sub-head { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 3vw, 38px); margin: 64px 0 24px; letter-spacing: -.01em; }

/* ---------- media tabs (PLM card) ---------- */
.mtabs { position: absolute; top: 12px; left: 12px; z-index: 3; display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.mtabs button { font: inherit; font-size: 12.5px; font-weight: 500; border: 0; background: transparent; color: var(--muted); padding: 6px 12px; border-radius: 999px; cursor: pointer; }
.mtabs button[aria-selected="true"] { background: var(--text); color: var(--bg); }
.mpane { position: absolute; inset: 0; }
.mpane .diagram { padding-top: 52px; }

/* ---------- instrument explorer ---------- */
.ins { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 16px 18px; gap: 10px; }
.ins-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.ins-tabs button { font: inherit; font-size: 12.5px; font-weight: 500; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; transition: all .2s; }
.ins-tabs button:hover { color: var(--text); }
.ins-tabs button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.ins-stage { flex: 1; min-height: 170px; position: relative; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.ins-scene { position: absolute; inset: 8px; width: calc(100% - 16px); height: calc(100% - 16px); }
.ins-scene[hidden] { display: none; }
.ins-cap b { font-size: 15px; }
.ins-cap p { margin: 4px 0 0; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.ins-cap .ins-used { color: var(--text); }
.ins-used span { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin-right: 8px; }
.work .media:has(.ins) { min-height: 520px; }
@media (max-width: 900px) { .work .media:has(.ins) { min-height: 600px; } }

/* scene palette */
.ins-scene { --d: 6s; }
.ins-fi { fill: var(--surface); stroke: var(--text); stroke-width: 1.4; }
.ins-ink { stroke: var(--text); stroke-width: 1.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ins-ax { stroke: var(--muted); stroke-width: 1.2; fill: none; }
.ins-lbl { font: 500 11px var(--sans); fill: var(--muted); }
.ins-small { font-size: 9.5px; }
.ins-strong { font: 600 14px var(--sans); fill: var(--text); }
.ins-big { font: 400 30px var(--serif); fill: var(--text); }
.ins-acc { stroke: var(--accent); stroke-width: 2.4; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ins-acc2 { stroke-dasharray: none; opacity: .75; }
.ins-sample { fill: color-mix(in srgb, #b5653f 45%, var(--surface)); stroke: color-mix(in srgb, #b5653f 60%, var(--line)); }
.ins-film { fill: var(--accent-soft); stroke: var(--accent); }
.ins-sub { fill: color-mix(in srgb, var(--muted) 22%, var(--surface)); stroke: var(--line); }
.ins-metal { fill: color-mix(in srgb, var(--muted) 35%, var(--surface)); stroke: var(--muted); }
.ins-coil { fill: var(--accent-soft); stroke: var(--accent); }
.ins-beam { stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; }
.ins-tip { fill: color-mix(in srgb, var(--accent) 30%, var(--surface)); stroke: var(--text); stroke-width: 1.3; stroke-linejoin: round; }
.ins-heat, .ins-glow { fill: #d9822b; }
.ins-hot { fill: color-mix(in srgb, #d9822b 65%, var(--surface)); }
.ins-cold { fill: color-mix(in srgb, #3b82f6 50%, var(--surface)); }
.ins-fluid { fill: color-mix(in srgb, #3b82f6 35%, transparent); }
.ins-drop { fill: color-mix(in srgb, var(--accent) 28%, transparent); stroke: var(--accent); stroke-width: 1.5; }
.ins-light { fill: #fff6cf; stroke: #e3c35a; }
.ins-wave { stroke: #d9822b; stroke-width: 1.6; fill: none; stroke-dasharray: 3 3; animation: ins-flow .8s linear infinite; }
.ins-bar { fill: var(--accent); }

/* generic timeline helpers (all scenes share --d) */
.draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: ins-draw var(--d) ease-in-out infinite; }
.late { opacity: 0; animation: ins-late var(--d) ease infinite; }
@keyframes ins-draw { 0%, 8% { stroke-dashoffset: 1; } 72%, 100% { stroke-dashoffset: 0; } }
@keyframes ins-late { 0%, 70% { opacity: 0; } 80%, 100% { opacity: 1; } }
@keyframes ins-flow { to { stroke-dashoffset: -12; } }

/* SEM */
.sem-beam { transform-origin: 100px 90px; animation: sem-raster .45s ease-in-out infinite alternate; }
@keyframes sem-raster { from { transform: rotate(-14deg); } to { transform: rotate(14deg); } }
.sem-x { animation-duration: .6s; }
.sem-cover { fill: var(--surface); transform-origin: 284px 104px; animation: sem-reveal var(--d) linear infinite; }
@keyframes sem-reveal { 0% { transform: scaleY(1); } 72%, 96% { transform: scaleY(0); } 100% { transform: scaleY(1); } }
.sem-scan { stroke: var(--accent); stroke-width: 2; animation: sem-scan var(--d) linear infinite; }
@keyframes sem-scan { 0% { transform: translateY(0); opacity: 1; } 72% { transform: translateY(84px); opacity: 1; } 73%, 100% { opacity: 0; transform: translateY(84px); } }
.sem-bar { animation: sem-bar var(--d) ease-out infinite; }
@keyframes sem-bar { 0%, 70% { transform: scaleY(0); } 86%, 100% { transform: scaleY(1); } }

/* nanoindentation */
.nano-tip { animation: nano-tip var(--d) ease-in-out infinite; }
@keyframes nano-tip { 0%, 4% { transform: translateY(0); } 40%, 55% { transform: translateY(24px); } 88%, 100% { transform: translateY(0); } }
.nano-dent { opacity: 0; animation: nano-dent var(--d) linear infinite; }
@keyframes nano-dent { 0%, 38% { opacity: 0; } 42%, 94% { opacity: 1; } 100% { opacity: 0; } }
.nano-load { animation-name: nano-load; }
.nano-unload { animation-name: nano-unload; }
@keyframes nano-load { 0%, 4% { stroke-dashoffset: 1; } 40%, 100% { stroke-dashoffset: 0; } }
@keyframes nano-unload { 0%, 55% { stroke-dashoffset: 1; } 88%, 100% { stroke-dashoffset: 0; } }

/* TGA */
.tga-glow { animation: tga-glow var(--d) ease-in-out infinite; }
@keyframes tga-glow { 0% { opacity: .05; } 80% { opacity: .5; } 100% { opacity: .05; } }
.tga-s { transform-origin: 100px 111px; animation: tga-s var(--d) ease-in-out infinite; }
@keyframes tga-s { 0%, 28% { transform: scaleY(1); } 36%, 52% { transform: scaleY(.75); } 62%, 94% { transform: scaleY(.42); } 100% { transform: scaleY(1); } }
.tga-t { transform-origin: 171px 150px; animation: tga-t var(--d) ease-in-out infinite; }
@keyframes tga-t { 0% { transform: scaleY(.12); } 80%, 94% { transform: scaleY(1); } 100% { transform: scaleY(.12); } }

/* DSC */
.dsc-s { transform-origin: 63px 112px; animation: dsc-s var(--d) ease-in-out infinite; }
@keyframes dsc-s { 0%, 36% { transform: none; } 48%, 94% { transform: scale(1.4, .45); } 100% { transform: none; } }

/* rheometer */
.rheo-rot { fill: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 8 6; animation: ins-spin 1.2s linear infinite; }
@keyframes ins-spin { to { stroke-dashoffset: -28; } }
.rheo-shear { stroke: color-mix(in srgb, #3b82f6 80%, var(--text)); stroke-width: 1.4; fill: none; stroke-dasharray: 5 5; animation: ins-flow .9s linear infinite; }

/* contact angle */
.ca-drip { transform-origin: 100px 60px; animation: ca-drip var(--d) ease-in infinite; }
@keyframes ca-drip { 0% { transform: translateY(0) scale(0); opacity: 1; } 25% { transform: translateY(0) scale(1); opacity: 1; } 38% { transform: translateY(62px) scale(1); opacity: 1; } 40%, 100% { transform: translateY(62px) scale(1); opacity: 0; } }
.ca-bead { opacity: 0; animation: ca-bead var(--d) ease infinite; }
@keyframes ca-bead { 0%, 38% { opacity: 0; } 41%, 95% { opacity: 1; } 100% { opacity: 0; } }
.ca-ang { opacity: 0; animation: ca-ang var(--d) ease infinite; }
@keyframes ca-ang { 0%, 50% { opacity: 0; } 58%, 95% { opacity: 1; } 100% { opacity: 0; } }

/* thermal diffusivity (flash method) */
.fl-lamp { animation: fl-lamp var(--d) ease-out infinite; }
@keyframes fl-lamp { 0%, 6% { fill: #fff6cf; } 9% { fill: #fff; filter: drop-shadow(0 0 6px #ffd84d); } 16%, 100% { fill: #fff6cf; filter: none; } }
.fl-ray { stroke: #e3b02b; stroke-width: 2.4; stroke-linecap: round; fill: none; }
.fl-pulse { opacity: 0; animation: fl-pulse var(--d) ease-out infinite; }
@keyframes fl-pulse { 0%, 6% { opacity: 0; transform: translateX(-10px); } 9% { opacity: 1; } 16% { opacity: 0; transform: translateX(6px); } 100% { opacity: 0; } }
.fl-front { transform-origin: 92px 100px; animation: fl-front var(--d) ease-in-out infinite; }
@keyframes fl-front { 0%, 9% { transform: scaleX(0); opacity: .9; } 70% { transform: scaleX(1); opacity: .55; } 92% { transform: scaleX(1); opacity: .45; } 100% { transform: scaleX(1); opacity: 0; } }
.fl-ir { opacity: 0; animation: fl-ir var(--d) linear infinite; }
@keyframes fl-ir { 0%, 30% { opacity: 0; } 45%, 94% { opacity: 1; } 100% { opacity: 0; } }
.fl-led { animation: fl-led var(--d) linear infinite; }
@keyframes fl-led { 0%, 30% { opacity: .15; } 72%, 94% { opacity: 1; } 100% { opacity: .15; } }

/* impact testing (pendulum) */
.imp-frame { opacity: .7; }
.imp-pend { transform-origin: 115px 26px; animation: imp-swing var(--d) infinite; }
@keyframes imp-swing {
  0%, 10% { transform: rotate(-100deg); animation-timing-function: cubic-bezier(.45, 0, .9, .6); }
  38% { transform: rotate(-6deg); animation-timing-function: linear; }
  40% { transform: rotate(0deg); animation-timing-function: cubic-bezier(.2, .6, .4, 1); }
  60%, 72% { transform: rotate(55deg); animation-timing-function: ease-in-out; }
  100% { transform: rotate(-100deg); }
}
.imp-piece { transform-origin: 115px 122px; animation: imp-piece var(--d) infinite; }
@keyframes imp-piece { 0%, 38% { transform: none; opacity: 1; } 54% { transform: translate(-74px, 14px) rotate(-150deg); opacity: 1; } 62%, 96% { transform: translate(-82px, 34px) rotate(-170deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
.imp-h1 { opacity: .9; }
.imp-h2 { opacity: 0; animation: ca-ang var(--d) ease infinite; }

/* roughness: SMIL moves the stylus; the trace draws in step */
.rough-trace { animation: rough-trace 6s linear infinite; }
@keyframes rough-trace { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
  .ins-scene *, .ins-scene { animation: none !important; }
  .ins-scene .draw { stroke-dashoffset: 0; }
  .ins-scene .late, .ca-bead, .ca-ang, .nano-dent, .imp-h2, .fl-ir { opacity: 1; }
  .ins-scene .fl-front { transform: scaleX(.6); opacity: .5; }
  .sem-cover, .sem-scan, .ca-drip { display: none; }
}

/* ---------- PLM release demo ---------- */
.plm { position: absolute; inset: 0; padding: 60px 20px 18px; display: flex; flex-direction: column; gap: 12px; overflow: auto; }
.plm-part { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.plm-part svg { width: 38px; height: 38px; flex: none; }
.plm-part b { display: block; font-size: 15px; }
.plm-part small { color: var(--muted); font-size: 12.5px; }
.plm-state { margin-left: auto; font-size: 12px; font-weight: 600; padding: 5px 11px; border-radius: 999px; white-space: nowrap; transition: background .3s, color .3s; }
.plm-state[data-s="inwork"] { background: color-mix(in srgb, #d9822b 18%, var(--surface)); color: #b8671a; }
.plm-state[data-s="review"] { background: color-mix(in srgb, #7c5cff 18%, var(--surface)); color: #6a4ee0; }
.plm-state[data-s="released"] { background: color-mix(in srgb, #22a06b 18%, var(--surface)); color: #1b8a5a; }
:root[data-theme="dark"] .plm-state[data-s="inwork"] { color: #f0a55c; }
:root[data-theme="dark"] .plm-state[data-s="review"] { color: #b3a1ff; }
:root[data-theme="dark"] .plm-state[data-s="released"] { color: #5fd39f; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .plm-state[data-s="inwork"] { color: #f0a55c; }
  :root:not([data-theme="light"]) .plm-state[data-s="review"] { color: #b3a1ff; }
  :root:not([data-theme="light"]) .plm-state[data-s="released"] { color: #5fd39f; }
}
.plm-hint { margin: 0; font-size: 13.5px; color: var(--muted); min-height: 2.6em; }
.plm-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.plm-actions button { font: inherit; font-size: 13.5px; font-weight: 500; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); cursor: pointer; }
.plm-actions button.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.plm-cols { display: grid; grid-template-columns: 1.3fr 1fr; gap: 12px; flex: 1; min-height: 0; }
.plm-cols > div { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--surface); min-height: 0; overflow: auto; }
.plm-cols small { display: block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 6px; }
.plm-hist { margin: 0; padding: 0; list-style: none; font-size: 12.5px; display: grid; gap: 5px; }
.plm-hist li { display: flex; gap: 8px; animation: swapIn .3s ease both; }
.plm-hist li b { font-variant-numeric: tabular-nums; color: var(--accent); min-width: 30px; }
.plm-vis { margin: 0; padding: 0; list-style: none; font-size: 12.5px; display: grid; gap: 7px; }
.plm-vis li { display: flex; justify-content: space-between; gap: 8px; }
.plm-vis li span:last-child { font-weight: 600; font-variant-numeric: tabular-nums; }
.plm-vis .none { color: var(--muted); font-weight: 400 !important; }
@media (max-width: 900px) { .work .media:has(.mtabs) { min-height: 520px; } }
@media (max-width: 520px) { .plm-cols { grid-template-columns: 1fr; } }

/* ---------- AR assembly demo ---------- */
.ar { position: absolute; inset: 0; overflow: hidden; background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--accent) 10%, var(--surface-2)), var(--surface-2)); }
.ar canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.ar video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ar.cam { background: #000; }
.ar-top { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; align-items: center; gap: 8px; z-index: 2; pointer-events: none; }
.ar-top > * { pointer-events: auto; }
.ar-mode { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; }
.ar-btn { margin-left: auto; font: inherit; font-size: 12.5px; font-weight: 500; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; }
.ar-panel {
  position: absolute; left: 12px; top: 54px; z-index: 2; width: min(260px, calc(100% - 24px)); padding: 12px 14px; border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); box-shadow: var(--shadow); transition: border-color .2s, background .2s;
}
.ar-panel b { display: block; font-size: 13px; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; }
.ar-panel p { margin: 4px 0 6px; font-size: 14px; line-height: 1.45; }
.ar-panel small { display: block; font-size: 11.5px; color: var(--muted); font-family: ui-monospace, Consolas, monospace; }
.ar-panel.err { border-color: #e5484d; background: color-mix(in srgb, #e5484d 14%, var(--surface)); animation: ar-shake .35s; }
.ar-panel.ok { border-color: #22a06b; }
@keyframes ar-shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.ar-tray { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 2; display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 2px; }
.ar-tray button {
  flex: none; font: inherit; font-size: 12px; font-weight: 500; padding: 7px 11px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 90%, transparent); color: var(--text);
}
.ar-tray button:disabled { opacity: .35; cursor: default; text-decoration: line-through; }
.ar-tray button.bad { border-color: #e5484d; animation: ar-shake .35s; }
.ar-tray .reset { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.work .media:has(.ar) { min-height: 480px; }
@media (max-width: 900px) { .work .media:has(.ar) { min-height: 520px; } }

/* ---------- design duo ---------- */
.duo { position: absolute; inset: 0; display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px; padding: 14px; }
.duo button { position: relative; border: 0; padding: 0; border-radius: 12px; overflow: hidden; cursor: zoom-in; background: #f4f4f4; }
.duo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease; }
.duo button:hover img { transform: scale(1.04); }
.duo span { position: absolute; left: 8px; bottom: 8px; font-size: 11.5px; font-weight: 500; padding: 3px 9px; border-radius: 999px; background: rgba(0,0,0,.55); color: #fff; }
.work .media:has(.duo) { min-height: 340px; }

/* ---------- inside the lab: wind tunnel ---------- */
.wt { display: grid; grid-template-columns: 1.5fr 1fr; gap: 0; border: 1px solid var(--line); border-radius: 24px; overflow: hidden; background: var(--surface); }
.wt-stage { position: relative; background: #fff; align-self: start; }
.wt-stage img { display: block; width: 100%; height: auto; }
.wt-over { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.wt-flow-line { stroke: #ffffff; stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 16 30; opacity: .85; fill: none; filter: drop-shadow(0 0 2px rgba(0,0,0,.35)); }
.hs {
  position: absolute; transform: translate(-50%, -50%); width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff;
  background: var(--accent); color: #fff; font: 600 12px var(--sans); cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.3); padding: 0;
}
.hs::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--accent); opacity: 0; animation: hs-ping 2.4s ease-out infinite; }
.hs.on { background: #111318; }
@keyframes hs-ping { 0% { transform: scale(.6); opacity: .8; } 100% { transform: scale(1.5); opacity: 0; } }
.wt-side { padding: 28px; display: flex; flex-direction: column; gap: 12px; border-left: 1px solid var(--line); }
.wt-side h3 { font-family: var(--serif); font-weight: 400; font-size: 32px; line-height: 1.1; margin: 0; }
.wt-lede { margin: 0; color: var(--muted); font-size: 15px; }
.wt-ctrl { display: flex; align-items: center; gap: 12px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); }
.wt-ctrl label { font-size: 13.5px; font-weight: 600; }
.wt-ctrl input { flex: 1; accent-color: var(--accent); }
.wt-ctrl output { font-size: 13px; color: var(--muted); min-width: 56px; text-align: right; }
.wt-chart { width: 100%; height: auto; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; }
.wt-note { margin: 0; font-size: 12px; color: var(--muted); }
.wt-info { border-left: 3px solid var(--accent); padding: 4px 0 4px 12px; }
.wt-info b { font-size: 15px; }
.wt-info p { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
@media (max-width: 900px) { .wt { grid-template-columns: 1fr; } .wt-side { border-left: 0; border-top: 1px solid var(--line); padding: 22px; } }

/* ---------- biofouling rig (reuses the wind-tunnel card layout) ---------- */
.rig { margin-top: 28px; }
.wt.rig .rig-stage { align-self: stretch; min-height: 340px; background: #d9d9d9; overflow: hidden; }
.rig-stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.rig-full { position: absolute; right: 14px; bottom: 14px; z-index: 2; }
.rig-kv li { grid-template-columns: 74px 1fr; font-size: 14px; }
@media (max-width: 900px) { .wt.rig .rig-stage { min-height: 0; aspect-ratio: 16 / 9; } }

/* ---------- microscope eyepieces ---------- */
.scopes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px 28px; }
.scope { margin: 0; text-align: center; }
.eyepiece {
  position: relative; display: block; width: min(100%, 260px); aspect-ratio: 1; margin: 0 auto 16px; padding: 0; border-radius: 50%; overflow: hidden;
  border: 10px solid #1d2026; box-shadow: 0 0 0 1px var(--line), 0 18px 40px rgba(0,0,0,.25), inset 0 0 30px rgba(0,0,0,.6); background: #000; cursor: zoom-in;
}
.eyepiece img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(10px) brightness(.7); transform: scale(1.15); transition: filter 1.4s cubic-bezier(.2,.8,.2,1), transform 1.4s cubic-bezier(.2,.8,.2,1); }
.scope.focused .eyepiece img { filter: none; transform: none; }
.eyepiece::after { content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: linear-gradient(rgba(255,255,255,.35), rgba(255,255,255,.35)) center/1px 22% no-repeat, linear-gradient(rgba(255,255,255,.35), rgba(255,255,255,.35)) center/22% 1px no-repeat,
              radial-gradient(circle, transparent 62%, rgba(0,0,0,.45)); }
.lens { position: absolute; width: 110px; height: 110px; border-radius: 50%; border: 2px solid rgba(255,255,255,.85); box-shadow: 0 6px 20px rgba(0,0,0,.45);
  pointer-events: none; opacity: 0; transform: translate(-50%, -50%); background-repeat: no-repeat; transition: opacity .15s; z-index: 2; }
.eyepiece:hover .lens { opacity: 1; }
.scope figcaption b { display: block; font-size: 16px; margin-bottom: 4px; }
.scope figcaption span { font-size: 14px; color: var(--muted); }
@media (max-width: 800px) { .scopes { grid-template-columns: 1fr; gap: 36px; } }
@media (prefers-reduced-motion: reduce) { .eyepiece img { filter: none; transform: none; transition: none; } .hs::after { animation: none; } }

/* ---------- featured card: Isaac Lab robot learning ---------- */
.work.feature { grid-template-columns: 1fr; }
.work.feature .media { order: 0 !important; min-height: 0; aspect-ratio: 16 / 9; background: #111; }
.work.feature .media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.work.feature .body { display: grid; grid-template-columns: 1fr 1.15fr; gap: 10px 48px; align-items: start; padding: 34px 40px 38px; }
.work.feature .body > .meta, .work.feature .body > h3, .work.feature .body > p { grid-column: 1; }
.work.feature .body > .kv { grid-column: 2; grid-row: 1 / span 3; margin: 0; }
.feat-tools { position: absolute; top: 14px; right: 14px; display: flex; gap: 6px; z-index: 2; }
.feat-btn { font: inherit; font-size: 12.5px; font-weight: 500; padding: 7px 12px; border-radius: 999px; border: 0; cursor: pointer;
  background: rgba(0,0,0,.55); color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.feat-btn:hover { background: rgba(0,0,0,.75); }
#isaac-play { width: 34px; padding: 7px 0; letter-spacing: -1px; }
.feat-tag { position: absolute; left: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500;
  padding: 6px 12px; border-radius: 999px; background: rgba(0,0,0,.55); color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
@media (max-width: 900px) {
  .work.feature .body { grid-template-columns: 1fr; padding: 24px 22px; }
  .work.feature .body > .kv { grid-column: 1; grid-row: auto; }
  .feat-tools .feat-btn:not(#isaac-play) { display: none; }
  .feat-tag { font-size: 11.5px; }
}

/* ---------- Gaussian splat feature (3D section) ---------- */
.splat { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; background: var(--surface); margin-bottom: 40px; }
.splat-media { position: relative; min-height: 340px; background: #111; }
.splat-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.splat-src { position: absolute; right: 14px; bottom: 14px; margin: 0; width: 26%; min-width: 120px; border-radius: 10px; overflow: hidden; border: 2px solid rgba(255,255,255,.85); box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.splat-src img { display: block; width: 100%; height: auto; }
.splat-src figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 8px 5px; font-size: 11px; font-weight: 500; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.7)); }
.splat-tools { position: absolute; top: 14px; right: 14px; display: flex; gap: 6px; z-index: 3; }
.splat-live { position: absolute; inset: 0; z-index: 2; background: #0d0f12; }
.splat-live canvas { display: block; }
.splat-live-bar { position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 4; display: flex; justify-content: space-between; align-items: center; gap: 8px; pointer-events: none; }
.splat-live-bar > * { pointer-events: auto; position: static; }
.splat-media.live .splat-tools, .splat-media.live .splat-src, .splat-media.live > .feat-tag { display: none; }
.splat-body { padding: 30px 32px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.splat-body h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(26px, 2.6vw, 34px); line-height: 1.1; margin: 0; }
.splat-body p { margin: 0; color: var(--muted); }
.splat-body .kv { margin-top: 4px; }
@media (max-width: 900px) { .splat { grid-template-columns: 1fr; } .splat-media { min-height: 0; aspect-ratio: 16 / 9; } .splat-body { padding: 22px; } }

/* ---------- robot card: tabs over the gallery ---------- */
.mpane-pad .gallery { padding-top: 56px; }

/* ---------- ACRoBoT: a tiny rider on the reading-progress line under the header ---------- */
.bot { position: fixed; left: 0; top: 48px; z-index: 71; width: 15px; height: 18px; will-change: transform; pointer-events: none; }
.bot-body { pointer-events: auto; position: absolute; inset: -6px -8px; width: auto; height: auto; padding: 6px 8px; border: 0; background: none; cursor: pointer; }
.bot-body svg { display: block; width: 15px; height: 18px; overflow: visible; }
.bot.hop .bot-body { animation: bot-hop .45s cubic-bezier(.3,1.5,.5,1); }
@keyframes bot-hop { 40% { transform: translateY(-6px); } }
.bot-say {
  position: absolute; top: 28px; left: 50%; width: max-content; max-width: 240px; padding: 8px 12px; border-radius: 12px;
  background: var(--text); color: var(--bg); font-size: 13px; line-height: 1.35; box-shadow: var(--shadow); opacity: 0;
  transform: translate(-50%, -4px); transition: opacity .2s, transform .2s; pointer-events: none;
}
.bot.talk .bot-say { opacity: 1; transform: translate(-50%, 0); }
.bot.edge-l .bot-say { left: 0; transform: none; }
.bot.edge-r .bot-say { left: auto; right: 0; transform: none; }
@media print { .bot { display: none; } }

/* ---------- easter egg ---------- */
.kick .id-card { animation: kick .6s cubic-bezier(.3,1.6,.5,1); }
@keyframes kick { 30% { transform: rotate(-4deg) translateX(-10px); } 60% { transform: rotate(3deg) translateX(8px); } }

/* ---------- Ask about James assistant ---------- */
.ask { position: fixed; right: 20px; bottom: 20px; z-index: 80; width: min(400px, calc(100vw - 24px)); height: min(600px, calc(100vh - 100px)); display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 30px 80px rgba(0,0,0,.3); opacity: 0; transform: translateY(16px); transition: opacity .25s, transform .25s; }
.ask.open { opacity: 1; transform: none; }
.ask-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.ask-head b { display: block; font-size: 15px; } .ask-head small { color: var(--muted); font-size: 12px; }
.ask-x { border: 0; background: var(--surface-2); color: var(--text); width: 32px; height: 32px; border-radius: 50%; cursor: pointer; }
.ask-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.ask-msg { max-width: 92%; padding: 10px 13px; border-radius: 14px; font-size: 14px; line-height: 1.5; }
.ask-msg p { margin: 0 0 8px; } .ask-msg p:last-child { margin-bottom: 0; }
.ask-msg.ask-me { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 4px; }
.ask-msg.ask-bot { align-self: flex-start; background: var(--bg); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.ask-guess, .ask-small { font-size: 12.5px; color: var(--muted); }
.ask-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ask-btn { font: inherit; font-size: 12.5px; font-weight: 500; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); text-decoration: none; cursor: pointer; }
.ask-btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.ask-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 8px; }
.ask-chip { font: inherit; font-size: 12.5px; padding: 6px 11px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line)); background: var(--accent-soft); color: var(--accent); cursor: pointer; text-align: left; }
.ask-form { display: flex; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line); }
.ask-form input { flex: 1; font: inherit; font-size: 14px; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }
.ask-form button { width: 38px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); font-size: 16px; cursor: pointer; }
.ask-note { margin: 0; padding: 0 14px 10px; font-size: 11px; color: var(--muted); }
@media (max-width: 600px) { .ask { right: 0; bottom: 0; width: 100vw; height: 100dvh; border-radius: 0; } }

/* ---------- MARS Mk1 arm in 3D ---------- */
#robots .media { min-height: 640px; }
@media (max-width: 900px) { #robots .media { min-height: 700px; } }
.mars { position: absolute; inset: 0; padding: 56px 14px 14px; display: flex; flex-direction: column; gap: 10px; }
.mars-view { position: relative; flex: 1; min-height: 260px; border-radius: 14px; border: 1px solid var(--line); overflow: hidden;
  background: radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--accent) 9%, var(--surface)), var(--surface-2)); }
.mars-view canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.mars-view canvas:active { cursor: grabbing; }
.mars-hud { position: absolute; left: 12px; top: 10px; display: grid; gap: 2px; pointer-events: none; font: 600 11.5px ui-monospace, Consolas, monospace; color: var(--muted); white-space: pre; }
.mars-hud b { font: 600 11px var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.mars-pre { position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.mars-pre button { font: inherit; font-size: 12px; font-weight: 500; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; transition: border-color .2s; }
.mars-pre button:hover { border-color: var(--accent); }
.mars-pre .mars-go { margin-left: auto; background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.mars-sliders { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 18px; }
.mars-sliders label { display: grid; grid-template-columns: 118px 1fr 42px; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.mars-sliders label[hidden] { display: none; }
.mars-sliders input { width: 100%; accent-color: var(--accent); margin: 4px 0; }
.mars-sliders output { text-align: right; font: 600 12px ui-monospace, Consolas, monospace; color: var(--text); }
.mars-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; font-size: 12.5px; }
.mars-foot small { color: var(--muted); font-size: 11.5px; }
@media (max-width: 640px) { .mars-sliders { grid-template-columns: 1fr; } .mars-sliders label { grid-template-columns: 110px 1fr 40px; } }

/* ---------- lab kit strip ---------- */
.kit { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.kit figure { margin: 0; }
.kit button { display: block; width: 100%; padding: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface-2); cursor: zoom-in; aspect-ratio: 4 / 3; }
.kit img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.kit button:hover img, .kit button:focus-visible img { transform: scale(1.06); }
.kit figcaption { padding: 10px 2px 0; }
.kit figcaption b { display: block; font-size: 14.5px; margin-bottom: 3px; }
.kit figcaption span { display: block; font-size: 13px; line-height: 1.45; color: var(--muted); }
@media (max-width: 1100px) { .kit { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .kit { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }

/* ---------- teaching materials + sample plan ---------- */
.teach-extra { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 48px; align-items: start; }
.teach-h { font-family: var(--serif); font-weight: 400; font-size: 26px; margin: 0 0 14px; }
.res-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.res-list li { display: grid; gap: 2px; padding: 0 0 12px; border-bottom: 1px solid var(--line); }
.res-list b { font-size: 15px; }
.res-list span { font-size: 14px; color: var(--muted); line-height: 1.5; }
.plan .plan-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: 0 22px 8px; }
.plan .plan-cols b { display: block; font-size: 13.5px; margin-bottom: 8px; color: var(--accent); }
.plan ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; font-size: 13.5px; }
.plan ol li { display: grid; grid-template-columns: 54px 1fr; gap: 6px; margin: 0; }
.plan ol li span { font: 600 11.5px ui-monospace, Consolas, monospace; color: var(--muted); padding-top: 2px; }
.plan small { display: inline-block; margin-top: 10px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
@media (max-width: 900px) { .teach-extra { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .plan .plan-cols { grid-template-columns: 1fr; } }
.mtabs button { white-space: nowrap; }
@media (max-width: 600px) { #robots .mtabs .try { display: none; } #robots .mtabs button { padding: 6px 10px; } }
.wt-side > .chip { align-self: flex-start; }
.ar-btn + .ar-btn { margin-left: 0; }
.ar-mode { max-width: 48%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 600px) { .ar-top { flex-wrap: wrap; } .ar-mode { max-width: 60%; } }

/* ---------- camera permission dialog (AR demo) ---------- */
.cam-dlg { width: min(420px, calc(100vw - 32px)); padding: 26px 26px 22px; border: 1px solid var(--line); border-radius: 20px;
  background: var(--surface); color: var(--text); box-shadow: 0 30px 80px rgba(0,0,0,.35); font: inherit; }
.cam-dlg::backdrop { background: rgba(10, 12, 16, .55); backdrop-filter: blur(3px); }
.cam-dlg-ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); margin-bottom: 14px; }
.cam-dlg-ic svg { width: 30px; height: 30px; fill: none; stroke: var(--accent); stroke-width: 3; stroke-linejoin: round; }
.cam-dlg[data-state="denied"] .cam-dlg-ic, .cam-dlg[data-state="error"] .cam-dlg-ic, .cam-dlg[data-state="dismissed"] .cam-dlg-ic { background: color-mix(in srgb, #e5484d 14%, var(--surface)); }
.cam-dlg[data-state="denied"] .cam-dlg-ic svg, .cam-dlg[data-state="error"] .cam-dlg-ic svg, .cam-dlg[data-state="dismissed"] .cam-dlg-ic svg { stroke: #e5484d; }
.cam-dlg h3 { font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1.15; margin: 0 0 8px; }
.cam-dlg-body p { margin: 0 0 10px; font-size: 15px; line-height: 1.55; }
.cam-dlg-body ol { margin: 0 0 12px; padding-left: 22px; font-size: 15px; line-height: 1.55; }
.cam-dlg-body li { margin-bottom: 4px; }
.cam-dlg-note { font-size: 13px !important; color: var(--muted); }
.cam-dlg-btns { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.cam-dlg-btns button { font: inherit; font-size: 14px; font-weight: 600; padding: 10px 18px; border-radius: 999px; cursor: pointer; border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.cam-dlg-go { background: var(--accent) !important; border-color: var(--accent) !important; color: var(--accent-ink) !important; }
.cam-dlg-btns button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cam-dlg-spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: cam-spin .9s linear infinite; margin: 6px 0 2px; }
@keyframes cam-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .cam-dlg-spin { animation-duration: 3s; } }

/* ---------- AR view controls and marker tracking status ---------- */
.ar-zoom { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); z-index: 2; display: flex; flex-direction: column; gap: 6px; }
.ar-zoom button { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 92%, transparent);
  color: var(--text); font: 600 18px/1 var(--sans); cursor: pointer; display: grid; place-items: center; padding: 0; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.ar-zoom button:hover { border-color: var(--accent); color: var(--accent); }
.ar-zoom svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ar.track .ar-zoom { display: none; }
.ar-track { position: absolute; right: 12px; top: 52px; z-index: 2; font-size: 12.5px; font-weight: 600; padding: 6px 12px; border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 92%, transparent); border: 1px solid var(--line); color: var(--text); max-width: calc(100% - 24px); }
.ar-track[data-state="locked"] { border-color: #22a06b; color: #1a7f55; }
.ar-track[data-state="lost"], .ar-track[data-state="offline"] { border-color: #d9822b; }
.ar-track .linklike { font-weight: 600; }
@media (max-width: 600px) { .ar-zoom { top: auto; bottom: 108px; transform: none; } .ar-zoom button { width: 32px; height: 32px; } }

/* ---------- MARS crate game ---------- */
.mars-pre .mars-game-btn { margin-left: 0; background: #22a06b; border-color: #22a06b; color: #fff; }
.mars.gaming .mars-pre > button:not(#mars-game) { display: none; }
.mars.gaming .mars-pre { left: auto; }
.mars.gaming .mars-pre .mars-game-btn { background: var(--surface); color: var(--text); border-color: var(--line); }
.mars-view canvas:focus { outline: none; }
.mars-game { position: absolute; right: 10px; top: 10px; width: 184px; padding: 10px; border-radius: 14px; z-index: 2;
  background: color-mix(in srgb, var(--surface) 94%, transparent); border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(0,0,0,.14); }
.mars-game[hidden], .mars-pad[hidden], .mars-sliders[hidden] { display: none; }
.mg-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; }
.mg-top b { color: #1a7f55; }
.mg-time { font: 600 12px ui-monospace, Consolas, monospace; color: var(--muted); }
.mg-msg { margin: 4px 0 8px; font-size: 12px; line-height: 1.35; color: var(--muted); }
.mg-reset { font: inherit; font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; }
.mg-reset:hover { border-color: var(--accent); }
/* bottom panel: Buttons / Sliders */
.mars-ctl { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.mars-ctl span { margin-right: 4px; }
.mars-ctl button { font: inherit; font-size: 12px; font-weight: 600; padding: 4px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; }
.mars-ctl button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.mg-pad { display: grid; gap: 6px; grid-template-columns: repeat(4, minmax(38px, 1fr)) repeat(2, minmax(56px, 1.3fr)) minmax(76px, 1.6fr); }
.mg-pad button { font: 600 16px/1 var(--sans); min-height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface);
  color: var(--text); cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; }
.mg-pad button:hover { border-color: var(--accent); }
.mg-pad button:active { background: var(--accent-soft); }
.mg-pad [data-jog="up"], .mg-pad [data-jog="down"], .mg-pad .mg-grab { font-size: 12.5px; }
.mg-pad .mg-grab { background: #22a06b; border-color: #22a06b; color: #fff; }
.mg-pad .mg-grab:disabled { opacity: .45; cursor: default; background: var(--surface); color: var(--muted); border-color: var(--line); }
.mg-pad .mg-grab[hidden] { display: none; }
.mg-keys { display: block; margin-top: 6px; font-size: 11px; color: var(--muted); }
.mars-toast { position: absolute; left: 50%; top: 48px; transform: translate(-50%, -6px); padding: 6px 12px; border-radius: 999px; z-index: 3;
  background: rgba(17, 19, 24, .82); color: #fff; font-size: 12.5px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; white-space: nowrap; }
.mars-toast.on { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 640px) {
  .mars.gaming .mars-pre { top: 8px; bottom: auto; right: 8px; }
  .mars-game { top: auto; right: auto; left: 6px; bottom: 6px; width: auto; padding: 6px 10px; }
  .mg-msg, .mg-keys { display: none; }
  .mg-top { gap: 10px; }
  .mg-reset { margin-top: 4px; }
  .mg-pad { gap: 4px; grid-template-columns: repeat(4, 1fr) repeat(2, 1.2fr) 1.5fr; }
  .mg-pad button { min-height: 40px; padding: 0; }
  .mg-pad [data-jog="up"], .mg-pad [data-jog="down"], .mg-pad .mg-grab { font-size: 11px; }
  .mars-toast { white-space: normal; max-width: 86%; text-align: center; }
}
}
.work.feature .fea-media { background: #11141a; }
#fea .feat-tag { top: 14px; bottom: auto; }
@media (max-width: 640px) { #fea .feat-tag { display: none; } }

/* AR: the step instructions are a single small chip, not a balloon over the model (it covered the view on phones) */
.ar-panel { top: auto; bottom: 64px; left: 12px; width: auto; max-width: calc(100% - 24px); padding: 5px 12px; border-radius: 999px; pointer-events: none; }
.ar-panel b { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ar-panel p, .ar-panel small { display: none; }
@media (max-width: 600px) { .ar-panel { bottom: 100px; } }
.ar-panel { display: none; }   /* step chip removed: the tray labels and fitted parts already show progress */

/* Gaussian splat: YouTube fly-through filling the card (cover-cropped), poster underneath until it loads */
.splat-media { container-type: size; }
.splat-yt { position: absolute; inset: 0; overflow: hidden; background: #111 center / cover no-repeat; }
.splat-yt iframe { position: absolute; top: 50%; left: 50%; width: max(112cqw, 199cqh); height: max(112cqh, 63cqw); transform: translate(-50%, -50%); border: 0; pointer-events: none; opacity: 0; transition: opacity .6s; }
.splat-yt iframe.on { opacity: 1; }
.splat-media.live .splat-yt { display: none; }

/* biofouling rig: photos and renders of the samples */
.rig-pics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.rig-pics button { position: relative; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; cursor: zoom-in; background: var(--surface-2); aspect-ratio: 3 / 2; }
.rig-pics img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.rig-pics button:hover img { transform: scale(1.05); }
.rig-pics span { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 6px 4px; font-size: 10.5px; font-weight: 600; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.65)); text-align: left; }

.sim-pics { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 520px; }
@media (max-width: 520px) { .sim-pics { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
