/* RoboRAM project page. Built on the Nerfies template (Bulma), restyled after the paper's figures. */
:root {
  --bg: #FBF6EF;
  --paper: #FFFDF9;
  --panel: #F6EDE2;
  --panel2: #EFE2D2;
  --line: #E6D6C3;
  --ink: #33241A;
  --ink2: #6C5848;
  --ink3: #9A8676;
  --brown: #6B4226;
  --brown2: #8B5A2B;
  --bwd: #9A5E2C;
  --bwd-bg: #F4E7DA;
  --fwd: #C0675A;
  --fwd-bg: #FAEAE6;
  --unp: #5C5550;
  --unp-bg: #ECE8E4;
  --gold: #EBCB9A;
  --ok: #3B8A57;
  --ok-bg: #E3F2E6;
  --ghost: #B07A12;
  --ghost-bg: #FBF0D6;
  --bad: #BF4436;
  --bad-bg: #FBE4E0;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r: 18px;
  --shadow: 0 1px 0 rgba(107, 66, 38, .06), 0 10px 30px -12px rgba(107, 66, 38, .25);
}

html { scroll-behavior: smooth; scroll-padding-top: 70px; background: var(--bg); }
body { font-family: var(--sans); color: var(--ink); background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--brown2); }
a:hover { color: var(--fwd); }
b, strong { color: inherit; }
::selection { background: var(--gold); }

/* ---------- scroll "memory tape" ---------- */
#tape-progress { position: fixed; top: 0; left: 0; right: 0; height: 6px; z-index: 60;
  background: repeating-linear-gradient(90deg, #EADCCB 0 18px, var(--bg) 18px 21px); }
#tape-progress .tape-fill { height: 100%; width: 0; background: repeating-linear-gradient(90deg, var(--brown2) 0 18px, transparent 18px 21px); }
#tape-progress .tape-now { position: absolute; top: 0; left: 0; width: 10px; height: 10px; transform: translateX(-50%); font-size: 0;
  background: var(--fwd); border-radius: 0 0 50% 50%; box-shadow: 0 0 0 2px var(--bg); opacity: 0; transition: opacity .3s; }
#tape-progress.is-on .tape-now { opacity: 1; }

/* ---------- nav ---------- */
.topnav { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 14px clamp(16px, 4vw, 40px) 10px; background: rgba(251, 246, 239, .86); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent; transition: border-color .3s; }
.topnav.is-scrolled { border-bottom-color: var(--line); }
.brand { font: 800 20px/1 var(--mono); color: var(--ink); display: flex; align-items: center; gap: 8px; letter-spacing: -.5px; }
.brand b { color: var(--fwd); }
.brand-bot { width: 22px; height: 22px; border-radius: 7px; background: var(--brown); position: relative; box-shadow: inset 0 -4px 0 rgba(0,0,0,.15); }
.brand-bot::before, .brand-bot::after { content: ''; position: absolute; top: 8px; width: 4px; height: 6px; border-radius: 2px; background: var(--gold); animation: blink 4.5s infinite; }
.brand-bot::before { left: 5px; } .brand-bot::after { right: 5px; }
.navlinks { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.navlinks a { font: 600 13px/1 var(--mono); color: var(--ink2); padding: 8px 10px; border-radius: 99px; transition: background .2s, color .2s; }
.navlinks a:hover, .navlinks a.is-current { background: var(--panel); color: var(--ink); }
@media (max-width: 860px) { .navlinks a:not(:nth-child(5)) { display: none; } }

/* ---------- hero ---------- */
.hero-x { padding: clamp(28px, 6vw, 70px) 20px 20px; position: relative; overflow: hidden; }
.hero-x::before { content: ''; position: absolute; inset: -40% -10% auto auto; width: 620px; height: 620px; border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 123, 110, .18), transparent 65%); pointer-events: none; }
.hero-grid { display: grid; grid-template-columns: 1.35fr .9fr; gap: 30px; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } .hero-art { order: -1; max-width: 260px; margin: 0 auto; } }
.title-x { font: 800 clamp(56px, 10vw, 112px)/.95 var(--mono); letter-spacing: -4px; color: var(--ink); margin: 0 0 10px; }
.title-x .ram { color: var(--fwd); position: relative; display: inline-block; }
.title-x .ram::after { content: ''; position: absolute; left: 4px; right: 4px; bottom: 4px; height: 12px; border-radius: 6px; z-index: -1;
  background: repeating-linear-gradient(90deg, var(--gold) 0 14px, transparent 14px 18px); opacity: .8; }
.subtitle-x { font: 700 clamp(19px, 2.4vw, 27px)/1.3 var(--sans); color: var(--ink2); letter-spacing: -.3px; margin-bottom: 22px; }
.authors { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 17px; font-weight: 600; }
.author sup { color: var(--fwd); font-weight: 700; }
.affils { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--ink3); font-size: 14.5px; margin-top: 4px; }
.affils sup { color: var(--fwd); }
.linkrow { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.pill-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 99px; background: var(--ink); color: var(--bg) !important;
  font: 700 14px/1 var(--mono); transition: transform .2s cubic-bezier(.3, 1.6, .5, 1), background .2s; }
.pill-btn svg { width: 18px; height: 18px; }
.pill-btn:hover { transform: translateY(-2px) rotate(-1deg); background: var(--brown); }
.pill-btn em { font-style: normal; font-size: 10px; background: var(--fwd); color: #fff; border-radius: 99px; padding: 3px 6px; margin-left: 2px; }
.pill-btn.is-soon { background: var(--panel2); color: var(--ink2) !important; cursor: default; }
.pill-btn.is-soon:hover { transform: none; }
/* live links: same warm family as the "soon" pills, just more solid */
.pill-btn.is-main { background: #DDC3A5; color: var(--brown) !important; box-shadow: inset 0 -2px 0 rgba(107, 66, 38, .14); }
.pill-btn.is-main:hover { background: #D2B492; color: var(--ink) !important; }

.hero-art { position: relative; }
.m-stage { position: relative; max-width: 360px; margin: 0 auto; }
#mascot { width: 100%; display: block; overflow: visible; cursor: pointer; outline: none; transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); -webkit-tap-highlight-color: transparent; }
#mascot:hover { transform: scale(1.04) rotate(-1.5deg); }
#mascot:active { transform: scale(.95); }
#mascot:focus-visible { filter: drop-shadow(0 0 0 var(--brown)) drop-shadow(0 0 6px rgba(107, 66, 38, .45)); }
.m-bob { animation: bob 3.2s ease-in-out infinite; transform-origin: 130px 200px; }
.m-eyes { animation: blink 5s infinite; transform-origin: 130px 92px; }
.m-antenna { animation: pulse 1.6s infinite; transform-origin: 130px 18px; }
.m-reel { transform-box: fill-box; transform-origin: center; animation: spin 2.4s linear infinite; }
.bubble { position: absolute; top: 4%; right: -2%; background: var(--paper); border: 2px solid var(--brown); border-radius: 16px 16px 16px 4px;
  padding: 8px 12px; font: 700 12.5px/1.35 var(--mono); color: var(--ink); box-shadow: var(--shadow); transform: rotate(3deg);
  animation: float 4s ease-in-out infinite; }
@media (max-width: 900px) { .bubble { right: -18%; font-size: 11px; } }
@media (max-width: 520px) { .hero-art { max-width: 200px; } .bubble { right: -40%; top: -2%; } }

/* ---------- sections ---------- */
.section-x { padding: clamp(36px, 6vw, 64px) 20px; }
.h2-x { font: 800 clamp(26px, 3.4vw, 36px)/1.15 var(--mono); letter-spacing: -1px; color: var(--ink); margin-bottom: 14px; display: flex; align-items: center; gap: 12px; }
.sec-badge { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--brown); color: var(--bg);
  font: 800 20px/1 var(--mono); flex: none; box-shadow: inset 0 -4px 0 rgba(0,0,0,.18); }
.lead-x { font-size: 17.5px; color: var(--ink2); max-width: 860px; margin-bottom: 22px; }
.lead-x b { color: var(--ink); }
.card-x { background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.prose { padding: clamp(18px, 3vw, 30px); font-size: 16.5px; text-align: justify; hyphens: auto; }
.prose p + p { margin-top: 12px; }

.tldr { font-size: clamp(17px, 2vw, 20px); line-height: 1.55; max-width: 1000px; margin: 0 auto 22px; text-align: center; color: var(--ink2); }
.tldr b { color: var(--ink); }
.tldr b.bwd { color: var(--bwd); } .tldr b.fwd { color: var(--fwd); }
.tag-x { font: 800 12px/1 var(--mono); background: var(--ink); color: var(--bg); padding: 5px 8px; border-radius: 6px; vertical-align: 3px; margin-right: 6px; }

/* figures */
.teaser-card, .fig-card { padding: 14px; margin: 0; }
.zoomable { all: unset; display: block; position: relative; cursor: zoom-in; border-radius: 12px; overflow: hidden; }
.zoomable img { display: block; width: 100%; height: auto; }
.zoom-hint { position: absolute; right: 10px; bottom: 10px; font: 700 11px/1 var(--mono); color: #fff; background: rgba(51, 36, 26, .72);
  padding: 6px 9px; border-radius: 99px; opacity: 0; transition: opacity .25s; }
.zoomable:hover .zoom-hint, .zoomable:focus-visible .zoom-hint { opacity: 1; }
figcaption { font-size: 14.5px; color: var(--ink2); padding: 12px 6px 4px; line-height: 1.55; }
figcaption b { color: var(--ink); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 22px; }
@media (max-width: 760px) { .stats { grid-template-columns: 1fr; } }
.stat { background: var(--brown); color: var(--bg); border-radius: var(--r); padding: 18px 20px; position: relative; overflow: hidden; box-shadow: var(--shadow); }
.stat::after { content: ''; position: absolute; right: -20px; bottom: -26px; width: 110px; height: 110px; border-radius: 50%; background: rgba(255,255,255,.06); }
.stat-k { font: 700 12.5px/1 var(--mono); opacity: .8; letter-spacing: .04em; }
.stat-v { font: 800 46px/1.1 var(--mono); letter-spacing: -2px; margin: 8px 0 4px; color: #FFE7C4; }
.stat-s { font-size: 13.5px; opacity: .85; }
.stat-s b { color: #F6C2B8; }

/* ---------- playground ---------- */
.playground { padding: clamp(14px, 2.4vw, 24px); }
.pg-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; align-items: flex-start; }
.pg-title { font: 800 19px/1.3 var(--mono); }
.pg-sub { color: var(--ink2); font-size: 14.5px; }
.pg-controls { display: flex; flex-wrap: wrap; gap: 8px; }
.scn, .replay { font: 700 13px/1 var(--mono); border: 2px solid var(--line); background: var(--paper); color: var(--ink2); padding: 9px 13px; border-radius: 99px; cursor: pointer;
  transition: transform .15s, background .2s, border-color .2s, color .2s; }
.scn:hover, .replay:hover { transform: translateY(-1px); border-color: var(--ink3); }
.scn .sym { letter-spacing: -2px; margin-right: 3px; }
.scn.is-active { background: var(--unp); border-color: var(--unp); color: #fff; }
.scn.bwd.is-active { background: var(--bwd); border-color: var(--bwd); }
.scn.fwd.is-active { background: var(--fwd); border-color: var(--fwd); }
.replay { border-style: dashed; }
.pg-story { margin: 14px 0 10px; min-height: 44px; padding: 10px 14px; border-radius: 12px; background: var(--panel); font: 600 14px/1.45 var(--mono); color: var(--ink);
  display: flex; align-items: center; gap: 10px; transition: background .3s; }
.pg-story.is-shift { background: var(--fwd-bg); }
.pg-story.is-shift.bwd { background: var(--bwd-bg); }
.pg-story .clock { font-size: 12px; color: var(--ink3); white-space: nowrap; }
.pg-lanes { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 980px) { .pg-lanes { grid-template-columns: 1fr; } }
.lane { border-radius: 14px; background: var(--bg); border: 1.5px solid var(--line); padding: 12px; }
.lane.ours { background: #FFF7EC; border-color: var(--gold); }
.lane-name { font: 800 15px/1.2 var(--mono); margin-bottom: 8px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.lane-name small { font: 500 12px/1.2 var(--sans); color: var(--ink3); }
.lane-ico { color: var(--ink3); } .lane.ours .lane-ico { color: var(--fwd); }
.lane-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: start; }
@media (max-width: 520px) { .lane-body { grid-template-columns: 1fr; } }
.scene { width: 100%; height: auto; background: #2C2622; border-radius: 10px; display: block; }
.tape-label { font: 700 11px/1 var(--mono); color: var(--ink3); text-transform: uppercase; letter-spacing: .06em; margin: 2px 0 6px; }
.tape-label small { text-transform: none; letter-spacing: 0; font-weight: 500; }
.tape { display: flex; flex-wrap: wrap; gap: 4px; min-height: 30px; margin-bottom: 10px; }
.cell { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 4px; border-radius: 7px; font: 800 12px/1 var(--mono); font-style: normal;
  background: var(--brown); color: #FFE9CC; border: 2px solid var(--brown); transition: all .35s; animation: pop .35s cubic-bezier(.3, 1.6, .5, 1); }
.cell.pred { background: var(--fwd-bg); color: var(--fwd); border: 2px dashed var(--fwd); }
.cell.cut { background: transparent; color: var(--ink3); border: 2px dashed var(--ink3); text-decoration: line-through; opacity: .55; }
.cell.ghost { background: #EFE7FF; color: #5B4A8A; border-color: #8C7BC0; }
.cell.now { position: relative; }
.cell.now::after { content: 'now'; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 3px; font: 800 9px/1 var(--mono);
  color: #fff; background: var(--fwd); border-radius: 99px; padding: 2px 4px; }
.tape:has(.now) { margin-bottom: 22px; }
.loc { display: flex; align-items: flex-end; gap: 4px; height: 46px; margin-bottom: 10px; }
.loc .bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.loc .bar i { display: block; width: 100%; border-radius: 5px 5px 2px 2px; background: var(--gold); transition: height .5s cubic-bezier(.3, 1.3, .5, 1), background .3s; min-height: 3px; }
.loc .bar.peak i { background: var(--fwd); }
.loc .bar span { font: 700 10px/1 var(--mono); color: var(--ink3); margin-top: 3px; }
.status { font: 600 13px/1.45 var(--sans); padding: 8px 10px; border-radius: 10px; background: var(--paper); border: 1.5px solid var(--line); min-height: 40px; }
.status.ok { background: var(--ok-bg); border-color: #B9DCC2; color: #24583A; }
.status.bad { background: var(--bad-bg); border-color: #EDBDB5; color: #8A2E23; }
.status.ghost { background: #EFE7FF; border-color: #CFC2EE; color: #4A3A7A; }
.status.jump { background: var(--fwd-bg); border-color: #EBC2BA; color: #8C3D31; }
.status.jump.bwd { background: var(--bwd-bg); border-color: #DFC4A8; color: #6E4219; }
.status.pause { background: var(--unp-bg); border-color: #D6D0CA; }
.pg-btn { font: 700 13px/1 var(--mono); border: 2px solid var(--line); background: var(--paper); color: var(--ink2); padding: 9px 13px; border-radius: 99px; cursor: pointer;
  transition: transform .15s, background .2s, border-color .2s, color .2s; }
.pg-btn:hover { transform: translateY(-1px); border-color: var(--ink3); }
.pg-btn.tour-btn { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.pg-btn.tour-btn.is-on { background: var(--fwd); border-color: var(--fwd); }
.pg-speed { align-self: center; }
.pg-tour { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; min-height: 0; }
.pg-tour:empty { display: none; }
.tdot { border: 0; cursor: pointer; font: 700 11.5px/1 var(--mono); padding: 6px 9px; border-radius: 99px; background: var(--panel); color: var(--ink2); transition: background .2s, color .2s; }
.tdot .n { opacity: .6; margin-right: 3px; }
.tdot.fwd.is-current { background: var(--fwd); color: #fff; }
.tdot.bwd.is-current { background: var(--bwd); color: #fff; }
.tdot.is-done { background: var(--panel2); }
.tdot.is-done::after { content: ' ✓'; color: var(--ok); }
.pg-palette-label { font: 800 13px/1.3 var(--mono); margin: 4px 0 8px; display: flex; align-items: center; gap: 6px; }
.hand-ico { display: inline-block; animation: wave 2.2s ease-in-out infinite; transform-origin: 70% 80%; }
.pg-palette { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
@media (max-width: 860px) { .pg-palette { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) {
  .pg-palette { grid-template-columns: 1fr 1fr; gap: 6px; }
  .act { padding: 7px 8px; gap: 6px; flex-direction: column; align-items: flex-start; }
  .act-ico { padding: 5px; }
  .act-txt b { font-size: 12px; }
  .act:disabled .act-txt small { display: none; }
}
.pal-hint { font: 600 12px/1.3 var(--sans); color: var(--ink3); }
.act { display: flex; align-items: center; gap: 10px; text-align: left; padding: 8px 11px; border-radius: 13px; border: 2px solid var(--line); background: var(--paper);
  cursor: pointer; color: var(--ink); transition: transform .18s cubic-bezier(.3, 1.6, .5, 1), opacity .25s, border-color .2s, box-shadow .2s; font: inherit; }
.act.fwd { border-color: #EFCFC8; background: var(--fwd-bg); }
.act.bwd { border-color: #E3CDB7; background: var(--bwd-bg); }
.act:hover:not(:disabled) { transform: translateY(-2px) rotate(-.5deg); box-shadow: var(--shadow); }
.act:focus-visible { outline: 3px solid var(--fwd); outline-offset: 2px; }
.act:disabled { opacity: .4; cursor: not-allowed; filter: grayscale(.5); }
.act.is-queued { animation: queued .9s ease-in-out infinite; }
.act.is-running { border-color: var(--ink); }
.act-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.act-txt b { font: 700 13px/1.25 var(--sans); }
.act-txt small { font: 800 11px/1 var(--mono); color: var(--fwd); letter-spacing: -.2px; }
.act.bwd .act-txt small { color: var(--bwd); }
.act:disabled .act-txt small { color: var(--ink3); font-weight: 600; }
.act-ico { flex: none; display: inline-flex; align-items: center; gap: 3px; background: var(--paper); border-radius: 9px; padding: 7px 7px; font: 800 11px/1 var(--mono); color: var(--ink3); }
.g { display: inline-block; flex: none; }
.g.lime { width: 14px; height: 11px; border-radius: 50%; background: #5AA832; border: 2px solid #2F6A1A; }
.g.basket { width: 17px; height: 13px; border-radius: 4px; background: radial-gradient(circle, #777 1.2px, transparent 1.6px) 0 0 / 5px 5px, #A3A3A3; border: 1.5px solid #6E6E6E; }
.g.plate { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 2px solid #CFC8BF; box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 4px #EEE8E0; }
.g.sponge { width: 16px; height: 11px; border-radius: 3px; background: linear-gradient(#F6D04D 0 38%, #3D9BE0 38%); border: 1.5px solid #1F5F96; }
.g.rack { width: 17px; height: 13px; border: 1.5px solid #4a4a4a; border-radius: 2px; background: repeating-linear-gradient(90deg, #4a4a4a 0 2px, #B9AFA3 2px 5px); }
.cell.future { background: transparent; color: rgba(192, 103, 90, .7); border: 2px dashed rgba(192, 103, 90, .35); animation: none; }
.status.note { background: var(--unp-bg); border-color: #D6D0CA; color: var(--ink2); }
@keyframes queued { 0%, 100% { box-shadow: 0 0 0 0 rgba(192, 103, 90, .45); } 50% { box-shadow: 0 0 0 5px rgba(192, 103, 90, 0); } }
@keyframes wave { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(14deg); } 20%, 40% { transform: rotate(-8deg); } }
.pg-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; font-size: 12.5px; color: var(--ink2); }
.pg-legend .cell { min-width: 20px; height: 20px; font-size: 10px; vertical-align: -5px; margin-right: 4px; animation: none; }

.ops { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 18px 0 26px; }
@media (max-width: 980px) { .ops { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .ops { grid-template-columns: 1fr; } }
.op { display: flex; gap: 12px; padding: 14px; border-radius: 14px; background: var(--paper); border: 1.5px solid var(--line); transition: transform .2s; }
.op:hover { transform: translateY(-3px) rotate(-.4deg); }
.op b { font-family: var(--mono); }
.op p { font-size: 13.5px; color: var(--ink2); line-height: 1.45; }
.op-ico { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font: 800 14px/1 var(--mono); color: #fff; letter-spacing: -2px; }
.op-ico.keep { background: var(--unp); } .op-ico.bwd { background: var(--bwd); } .op-ico.fwd { background: var(--fwd); } .op-ico.pause { background: var(--ink3); letter-spacing: 0; }

.stages { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 20px; }
@media (max-width: 900px) { .stages { grid-template-columns: 1fr; } }
.stage { display: flex; gap: 12px; padding: 16px; background: var(--panel); border-radius: 14px; }
.stage-n { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--fwd); color: #fff; font: 800 15px/1 var(--mono); }
.stage b { font-family: var(--mono); font-size: 15px; }
.stage p { font-size: 14px; color: var(--ink2); line-height: 1.5; margin-top: 4px; }

/* ---------- charts ---------- */
.chart { padding: 16px 18px; }
.chart-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.chart-title { font: 800 15px/1.2 var(--mono); }
.chart-title small { display: block; font: 500 12px/1.4 var(--sans); color: var(--ink3); margin-top: 3px; }
.seg { display: inline-flex; background: var(--panel); border-radius: 99px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; font: 700 12px/1 var(--mono); color: var(--ink2); padding: 7px 11px; border-radius: 99px; cursor: pointer; white-space: nowrap; }
.seg button.is-active { background: var(--paper); color: var(--ink); box-shadow: 0 1px 4px rgba(107,66,38,.18); }
.seg button.is-active[data-m="bsr"] { color: var(--bwd); }
.seg button.is-active[data-m="fsr"] { color: var(--fwd); }
.bars { display: grid; gap: 7px; }
.brow { display: grid; grid-template-columns: 138px 1fr 74px; align-items: center; gap: 10px; font-size: 13.5px; }
.brow .nm { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brow .tr { display: block; height: 16px; background: var(--panel); border-radius: 99px; overflow: hidden; }
.brow .fl { display: block; height: 100%; width: 0; border-radius: 99px; background: #D8C3AA; transition: width .8s cubic-bezier(.25, 1.2, .4, 1); }
.brow .vl { font: 700 13px/1 var(--mono); text-align: right; white-space: nowrap; }
.brow .vl small { font-weight: 500; color: var(--ink3); font-size: 10.5px; }
.brow.ours .nm { color: var(--brown); font-weight: 800; }
.brow.ours .fl { background: var(--brown); }
.chart[data-m="bsr"] .brow.ours .fl { background: var(--bwd); }
.chart[data-m="fsr"] .brow.ours .fl { background: var(--fwd); }
.ghost-toggle { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink2); margin-top: 12px; }
.ghost-note { font-size: 12px; color: var(--ink3); margin-top: 6px; min-height: 18px; }

/* switch */
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; color: var(--ink2); user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { width: 36px; height: 20px; border-radius: 99px; background: var(--panel2); position: relative; transition: background .2s; flex: none; }
.switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + .track { background: var(--brown); }
.switch input:checked + .track::after { transform: translateX(16px); }
.switch input:focus-visible + .track { outline: 2px solid var(--fwd); outline-offset: 2px; }

/* ---------- simulation ---------- */
.bench-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .bench-grid { grid-template-columns: 1fr; } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chip { border: 2px solid var(--line); background: var(--paper); border-radius: 99px; padding: 8px 14px; font: 700 13px/1 var(--mono); color: var(--ink2); cursor: pointer;
  transition: transform .15s, background .2s, color .2s, border-color .2s; }
.chip:hover { transform: translateY(-1px); border-color: var(--ink3); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip .num { opacity: .6; margin-right: 4px; }
.sim-desc { font-size: 15px; color: var(--ink2); margin: 4px 2px 12px; }
.sim-desc b { color: var(--ink); font-family: var(--mono); }
.sim-videos { display: grid; gap: 12px; }
.sim-videos.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sim-videos.n4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 860px) { .sim-videos.n3, .sim-videos.n4 { grid-template-columns: 1fr; } }
.sim-card { background: var(--paper); border: 1.5px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.sim-card .cond { display: flex; align-items: center; gap: 6px; padding: 9px 12px; font: 800 13px/1 var(--mono); color: #fff; background: var(--unp); }
.sim-card.c-backward .cond { background: var(--bwd); }
.sim-card.c-forward .cond, .sim-card.c-forward2 .cond { background: var(--fwd); }
.sim-card .sd { padding: 10px 12px 12px; font-size: 13.5px; color: var(--ink2); line-height: 1.45; }
.sim-card .sd b { color: var(--ink); }

/* video frames shared */
.vframe { position: relative; background: linear-gradient(110deg, #EDE2D5 8%, #F6EFE6 18%, #EDE2D5 33%); background-size: 200% 100%; animation: shimmer 1.6s linear infinite; }
.vframe.is-loaded { animation: none; background: #2C2622; }
.vframe video { display: block; width: 100%; height: 100%; object-fit: cover; }
.ar-16-9 { aspect-ratio: 16 / 9; }
.ar-16-10 { aspect-ratio: 16 / 10; }
.vframe .corner { position: absolute; font: 800 11px/1 var(--mono); color: #fff; background: rgba(51, 36, 26, .72); padding: 4px 7px; border-radius: 99px; pointer-events: none; }
.vframe .c-tl { top: 8px; left: 8px; } .vframe .c-tr { top: 8px; right: 8px; } .vframe .c-br { bottom: 8px; right: 8px; }
.vframe .expand { position: absolute; bottom: 8px; left: 8px; border: 0; width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 253, 249, .92); color: var(--ink);
  font-size: 15px; cursor: pointer; opacity: 0; transform: scale(.8); transition: opacity .2s, transform .2s; display: grid; place-items: center; }
.vframe:hover .expand, .vframe .expand:focus-visible { opacity: 1; transform: scale(1); }
@media (hover: none) { .vframe .expand { opacity: 1; transform: scale(1); } }

/* ---------- real robot ---------- */
.real-top { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; margin-bottom: 26px; }
@media (max-width: 980px) { .real-top { grid-template-columns: 1fr; } }
.legend-card { padding: 16px 18px; }
.legend-title { font: 800 15px/1.2 var(--mono); margin-bottom: 10px; }
.outcome-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 13.5px; color: var(--ink2); }
.legend-note { font-size: 13px; color: var(--ink3); margin-top: 12px; }
.ghost-def { margin-top: 12px; padding: 9px 12px; border-radius: 10px; background: #FFF3D8; border: 1.5px solid #EBCB85; font-size: 13.5px; line-height: 1.45; color: var(--ink2); }
.ghost-def b { color: var(--ink); }
.legend-note b { color: var(--ink); }
.badge { display: inline-flex; align-items: center; gap: 4px; font: 800 11.5px/1 var(--mono); padding: 5px 8px; border-radius: 99px; white-space: nowrap; }
.badge.o-success { background: var(--ok-bg); color: var(--ok); }
.badge.o-ghost { background: var(--ghost-bg); color: var(--ghost); }
.badge.o-failure { background: var(--bad-bg); color: var(--bad); }

.ex-step { font: 800 16px/1.2 var(--mono); margin: 22px 0 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ex-n { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--fwd); color: #fff; font-size: 13px; }
.view-switch { margin-left: auto; display: inline-flex; background: var(--panel); border-radius: 99px; padding: 3px; }
.view-switch button { border: 0; background: transparent; font: 700 12.5px/1 var(--mono); color: var(--ink2); padding: 8px 12px; border-radius: 99px; cursor: pointer; }
.view-switch button.is-active { background: var(--ink); color: var(--bg); }

.task-cards { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1100px) { .task-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .task-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tcard { all: unset; cursor: pointer; border-radius: 14px; overflow: hidden; background: var(--paper); border: 2px solid var(--line); box-shadow: var(--shadow);
  transition: transform .2s cubic-bezier(.3, 1.6, .5, 1), border-color .2s; position: relative; }
.tcard:hover { transform: translateY(-3px) rotate(-.6deg); }
.tcard:focus-visible { outline: 3px solid var(--fwd); outline-offset: 2px; }
.tcard img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.tcard .tn { padding: 8px 10px 10px; font: 800 13px/1.2 var(--mono); }
.tcard .tm { position: absolute; top: 8px; left: 8px; font: 800 10px/1 var(--mono); padding: 4px 7px; border-radius: 99px; background: rgba(255, 253, 249, .92); color: var(--brown2); }
.tcard .tm.nomem { color: var(--ink3); }
.tcard.is-active { border-color: var(--brown); transform: translateY(-3px); }
.tcard.is-active .tn { background: var(--brown); color: var(--bg); }

.task-info { margin-top: 14px; padding: 16px 18px; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 18px; }
@media (max-width: 860px) { .task-info { grid-template-columns: 1fr; } }
.ti-name { font: 800 20px/1.2 var(--mono); margin-bottom: 6px; }
.ti-desc { font-size: 15px; color: var(--ink2); }
.ti-mem { margin-top: 10px; font-size: 13.5px; color: var(--ink2); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ti-mem .k { font: 800 11px/1 var(--mono); text-transform: uppercase; color: var(--ink3); letter-spacing: .05em; }
.why { font: 700 11px/1 var(--mono); padding: 4px 7px; border-radius: 6px; }
.why.hidden { background: #DCE5F1; color: #274468; } .why.alike { background: #F3E8CC; color: #684C0F; }
.why.trace { background: #EADFF1; color: #4F366C; } .why.view { background: #E1EEE2; color: #2F5A36; }
.ti-shifts { display: grid; gap: 6px; font-size: 13.5px; align-content: start; }
.ti-shift { display: grid; grid-template-columns: 130px 1fr; gap: 8px; align-items: baseline; }
.ti-shift .lbl { font: 800 11.5px/1.3 var(--mono); }
.ti-shift .lbl.bwd { color: var(--bwd); } .ti-shift .lbl.fwd { color: var(--fwd); } .ti-shift .lbl.none { color: var(--unp); }
.ti-shift .tx { color: var(--ink2); }

.model-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.mtab { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px 8px 14px; border-radius: 99px; border: 2px solid var(--line);
  background: var(--paper); font: 700 13.5px/1 var(--mono); color: var(--ink2); transition: transform .15s, background .2s, color .2s, border-color .2s; }
.mtab:hover { transform: translateY(-1px); border-color: var(--ink3); }
.mtab:focus-visible { outline: 3px solid var(--fwd); outline-offset: 2px; }
.mtab.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.mtab.ours { border-color: var(--gold); }
.mtab.ours.is-active { background: var(--brown); border-color: var(--brown); }
.mtab .ours-tag { font-size: 10px; background: var(--fwd); color: #fff; padding: 3px 6px; border-radius: 99px; }
.mtab .tally { display: inline-flex; gap: 3px; }
.mtab .tally i { width: 7px; height: 7px; border-radius: 50%; display: block; }
.mtab .cnt { font-size: 11px; opacity: .65; }
.mtab.is-empty { opacity: .55; }
.side .model-tabs { display: none; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 16px 0 6px; padding: 10px 12px;
  border-radius: 14px; background: var(--panel); position: sticky; top: 56px; z-index: 20; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filters button { border: 0; background: var(--paper); font: 700 12.5px/1 var(--mono); color: var(--ink2); padding: 8px 11px; border-radius: 99px; cursor: pointer; }
.filters button.is-active { background: var(--ink); color: var(--bg); }

.test { margin-top: 22px; }
.test-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 4px; }
.test-tag { font: 800 13px/1 var(--mono); color: #fff; padding: 7px 11px; border-radius: 9px; background: var(--unp); letter-spacing: -.2px; }
.test-tag.bwd { background: var(--bwd); } .test-tag.fwd { background: var(--fwd); }
.test-sum { display: flex; gap: 6px; flex-wrap: wrap; }
.test-desc { font-size: 14px; color: var(--ink2); margin: 2px 0 10px; }
.trials { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.trial { background: var(--paper); border: 1.5px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); transition: transform .2s; }
.trial:hover { transform: translateY(-2px); }
.trial .cap { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 8px 10px; }
.trial .tnum { font: 800 13px/1 var(--mono); }
.trial.o-success { border-bottom: 4px solid var(--ok); }
.trial.o-ghost { border-bottom: 4px solid var(--ghost); }
.trial.o-failure { border-bottom: 4px solid var(--bad); }
.empty { padding: 18px; border: 2px dashed var(--line); border-radius: 14px; color: var(--ink3); font-size: 14px; text-align: center; background: rgba(255,253,249,.5); }
.empty .em { font-size: 22px; display: block; margin-bottom: 4px; }

/* compare view */
.cmp-grid { display: grid; grid-template-columns: repeat(6, minmax(168px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.cmp-col .cmp-name { font: 800 12.5px/1.2 var(--mono); margin-bottom: 6px; display: flex; align-items: center; justify-content: space-between; gap: 4px; min-height: 22px; }
.cmp-col .cmp-name > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.cmp-col .cap { flex-wrap: wrap; }
.cmp-col .badge { font-size: 10.5px; }
.cmp-col.ours .cmp-name { color: var(--brown); }
.cmp-col .cyc { display: inline-flex; gap: 2px; }
.cmp-col .cyc button { border: 0; background: var(--panel); border-radius: 6px; width: 22px; height: 22px; cursor: pointer; font-weight: 800; color: var(--ink2); }
.cmp-col .cyc button:disabled { opacity: .35; cursor: default; }
.cmp-col .empty { padding: 26px 8px; font-size: 12.5px; aspect-ratio: 16 / 10; display: grid; place-items: center; }

/* ---------- bibtex / footer ---------- */
.bib { position: relative; padding: 4px; background: var(--ink); border-color: var(--ink); }
.bib pre { background: transparent; color: #F3E6D6; font: 500 13.5px/1.6 var(--mono); padding: 18px 20px; white-space: pre-wrap; word-break: break-word; }
@media (min-width: 769px) { .bib pre { font-size: 12.6px; padding: 18px 16px; } }   /* keeps the author line on one line in the 960px container */
.copy { position: absolute; top: 12px; right: 12px; border: 0; background: var(--fwd); color: #fff; font: 800 12px/1 var(--mono); padding: 8px 12px; border-radius: 99px; cursor: pointer; }
.footer-x { padding: 34px 20px 50px; text-align: center; font-size: 13px; color: var(--ink3); }

/* ---------- lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; }
.lightbox[hidden] { display: none; }
.lb-backdrop { position: absolute; inset: 0; background: rgba(40, 28, 20, .72); backdrop-filter: blur(4px); animation: fade .2s; }
.lb-panel { position: relative; width: min(1100px, 100%); max-height: 100%; background: var(--paper); border-radius: 20px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.4);
  animation: rise .28s cubic-bezier(.3, 1.4, .5, 1); display: flex; flex-direction: column; }
.lb-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; }
.lb-title { font: 800 14.5px/1.4 var(--mono); display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.lb-title .sep { color: var(--ink3); }
.lb-x { border: 0; background: var(--panel); width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 14px; flex: none; }
.lb-media { background: #1E1814; display: grid; place-items: center; min-height: 200px; }
.lb-media video, .lb-media img { display: block; max-width: 100%; max-height: calc(100vh - 150px); width: 100%; object-fit: contain; }
.lb-media.is-image { background: var(--paper); overflow: auto; max-height: calc(100vh - 110px); }
.lb-media.is-image img { max-height: none; width: 100%; min-width: 900px; }
.lb-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; }
.lb-nav { border: 0; background: var(--panel); font: 800 13px/1 var(--mono); padding: 9px 14px; border-radius: 99px; cursor: pointer; color: var(--ink); }
.lb-nav:disabled { opacity: .35; cursor: default; }
.lb-speed { display: inline-flex; background: var(--panel); border-radius: 99px; padding: 3px; gap: 2px; }
.lb-speed button { border: 0; background: transparent; font: 800 12.5px/1 var(--mono); color: var(--ink2); padding: 8px 11px; border-radius: 99px; cursor: pointer; }
.lb-speed button.is-active { background: var(--ink); color: var(--bg); }
.lightbox.is-image .lb-foot { display: none; }

/* ---------- reveal & keyframes ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .9, .3, 1); }
.reveal.is-in { opacity: 1; transform: none; }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.25); opacity: .7; } }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-8px) rotate(1deg); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 0%, 100% { transform: rotate(3deg) translateY(0); } 50% { transform: rotate(1deg) translateY(-6px); } }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(24px) scale(.97); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- playground: demo chooser ---------- */
.pg-choose { display: grid; grid-template-columns: minmax(0, 4.2fr) minmax(0, 3.2fr) minmax(0, 1fr); gap: 12px; margin: 14px 0 4px; }
@media (max-width: 1100px) { .pg-choose { grid-template-columns: 1fr; } }
.demo-grp-t { font: 800 11.5px/1.2 var(--mono); color: var(--ink3); margin-bottom: 6px; text-transform: none; }
.demo-grp.fwd .demo-grp-t { color: var(--fwd); } .demo-grp.bwd .demo-grp-t { color: var(--bwd); }
.demo-row { display: flex; flex-wrap: wrap; gap: 6px; }
.demo-grp.fwd .demo-row, .demo-grp.bwd .demo-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
@media (max-width: 700px) { .demo-grp.fwd .demo-row, .demo-grp.bwd .demo-row { grid-auto-flow: row; grid-template-columns: 1fr 1fr; } }
.demo { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; padding: 9px 10px; border-radius: 12px; border: 2px solid var(--line); background: var(--paper);
  cursor: pointer; font: inherit; color: var(--ink); text-align: left; transition: transform .18s cubic-bezier(.3, 1.6, .5, 1), background .2s, border-color .2s, color .2s; min-width: 0; }
.demo:hover { transform: translateY(-2px); }
.demo:focus-visible { outline: 3px solid var(--fwd); outline-offset: 2px; }
.demo.fwd { background: var(--fwd-bg); border-color: #EFCFC8; }
.demo.bwd { background: var(--bwd-bg); border-color: #E3CDB7; }
.demo.none { width: 100%; }
.demo-sym { font: 800 11px/1 var(--mono); letter-spacing: -2px; color: var(--ink3); }
.demo.fwd .demo-sym { color: var(--fwd); } .demo.bwd .demo-sym { color: var(--bwd); }
.demo-ico { display: inline-flex; align-items: center; gap: 3px; font: 800 11px/1 var(--mono); color: var(--ink3); background: var(--paper); border-radius: 8px; padding: 5px 6px; }
.demo-name { font: 700 13px/1.2 var(--sans); }
.demo.is-active { transform: translateY(-2px); box-shadow: var(--shadow); }
.demo.fwd.is-active { background: var(--fwd); border-color: var(--fwd); color: #fff; }
.demo.bwd.is-active { background: var(--bwd); border-color: var(--bwd); color: #fff; }
.demo.none.is-active { background: var(--unp); border-color: var(--unp); color: #fff; }
.demo.is-active .demo-sym { color: #fff; }
.pg-story .clock { font-weight: 800; color: var(--ink2); margin-right: 4px; }
.pg-story .next-hint { color: var(--ink3); font-weight: 500; }

/* ---------- real robot: side-by-side comparison ---------- */
.cmp-link { margin-left: auto; border: 0; background: transparent; font: 700 12.5px/1 var(--mono); color: var(--brown2); cursor: pointer; padding: 6px 8px; border-radius: 99px; }
.cmp-link:hover { background: var(--panel); }
.side-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 8px; }
.stab { font: 800 13px/1 var(--mono); padding: 9px 12px; border-radius: 10px; border: 2px solid var(--line); background: var(--paper); color: var(--ink2); cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .15s; }
.stab:hover { transform: translateY(-1px); }
.stab small { font-size: 10.5px; opacity: .6; margin-left: 3px; }
.stab.none { border-color: #DAD5CF; } .stab.bwd { border-color: #E3CDB7; } .stab.fwd { border-color: #EFCFC8; }
.stab.none.is-active { background: var(--unp); border-color: var(--unp); color: #fff; }
.stab.bwd.is-active { background: var(--bwd); border-color: var(--bwd); color: #fff; }
.stab.fwd.is-active { background: var(--fwd); border-color: var(--fwd); color: #fff; }
.side-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.side-head .test-desc { margin: 0; }
.side-rows { display: grid; gap: 10px; }
.side-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; align-items: start; padding: 12px; border-radius: 14px; background: rgba(255, 253, 249, .6); border: 1.5px solid var(--line); }
.side-row.ours { background: #FFF7EC; border-color: var(--gold); }
@media (max-width: 700px) { .side-row { grid-template-columns: 1fr; } }
.side-name { font: 800 14px/1.25 var(--mono); padding-top: 4px; }
.side-row.ours .side-name { color: var(--brown); }
.side-name .ours-tag { font-size: 10px; background: var(--fwd); color: #fff; padding: 3px 6px; border-radius: 99px; vertical-align: 2px; }
.side-sum { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.side-none { font: 600 12px/1 var(--sans); color: var(--ink3); }
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: 232px; gap: 10px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; }
.strip > * { scroll-snap-align: start; }
.strip .empty { padding: 26px 14px; min-width: 232px; }

/* ---------- real robot: comparison matrix (task -> shift rows -> method cells) ---------- */
.ex-note { font-size: 14px; color: var(--ink2); margin: -4px 0 4px; max-width: 900px; }
.mx-test { margin-top: 22px; }
.mx-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 8px; }
.mx-desc { font-size: 14px; color: var(--ink2); }
.mx-sync { margin-left: auto; border: 0; background: transparent; font: 700 12px/1 var(--mono); color: var(--brown2); cursor: pointer; padding: 6px 9px; border-radius: 99px; }
.mx-sync:hover { background: var(--panel); }
.mx-row { display: grid; grid-template-columns: repeat(6, minmax(168px, 1fr)); gap: 10px; overflow-x: auto; padding: 2px 2px 6px; }
.mx-cell { display: flex; flex-direction: column; background: var(--paper); border: 1.5px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s; }
.mx-cell:hover { transform: translateY(-2px); }
.mx-cell.ours { background: #FFF7EC; border-color: var(--gold); }
.mx-cell.o-success { border-bottom: 4px solid var(--ok); }
.mx-cell.o-ghost { border-bottom: 4px solid var(--ghost); }
.mx-cell.o-failure { border-bottom: 4px solid var(--bad); }
.mx-cell.is-open { box-shadow: 0 0 0 3px var(--ink), var(--shadow); }
.mx-name { display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 7px 9px; font: 800 12.5px/1.2 var(--mono); min-height: 34px; }
.mx-name > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.mx-cell.ours .mx-name { color: var(--brown); }
.mx-tally { display: flex; gap: 3px; flex: none; }
.mx-tally .badge { font-size: 10px; padding: 3px 5px; }
.mx-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px; padding: 7px 9px 2px; }
.mx-foot .tnum { font: 800 12.5px/1 var(--mono); }
.mx-foot .badge { font-size: 10.5px; }
.mx-more { margin: 6px 8px 9px; border: 0; border-radius: 99px; background: var(--panel); font: 700 12px/1 var(--mono); padding: 8px; cursor: pointer; color: var(--ink); transition: background .2s, color .2s; }
.mx-more:hover, .mx-cell.is-open .mx-more { background: var(--ink); color: var(--bg); }
.mx-empty { flex: 1; min-height: 120px; margin: 0 8px 8px; display: grid; place-items: center; border: 2px dashed var(--line); border-radius: 10px; color: var(--ink3); font-size: 12.5px; }
.mx-drawer { margin-top: 10px; padding: 14px; border-radius: 16px; background: var(--panel); border: 2px solid var(--ink); animation: rise .25s cubic-bezier(.3, 1.4, .5, 1); }
.mx-drawer.ours { background: #FFF3E2; }
.mx-drawer-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font: 800 14px/1.3 var(--mono); margin-bottom: 12px; }
.mx-drawer-head .sep { color: var(--ink3); }
.mx-close { margin-left: auto; border: 0; background: var(--paper); font: 700 12px/1 var(--mono); padding: 8px 12px; border-radius: 99px; cursor: pointer; color: var(--ink); }
.mx-close:hover { background: var(--ink); color: var(--bg); }

/* ---------- variable-speed real-robot clips ---------- */
/* the speed strip sits above the video, so it never covers the scene */
.vwrap { container-type: inline-size; }
.vbar { display: flex; align-items: center; gap: 7px; padding: 5px 8px 6px; font: 800 11px/1 var(--mono); color: var(--ink2); }
.vbar .spd { flex: none; padding: 4px 7px; border-radius: 99px; background: var(--panel2); color: var(--ink2); white-space: nowrap; transition: background .2s, color .2s; }
.vbar .spd.is-slow { background: var(--fwd); color: #fff; }
.vbar .spd { display: inline-grid; }
.vbar .spd > span { grid-area: 1 / 1; text-align: center; }
.vbar .spd > .s-slow, .vbar .spd.is-slow > .s-fast { visibility: hidden; }
.vbar .spd.is-slow > .s-slow { visibility: visible; }
.vbar .vdur { flex: none; color: var(--ink3); font-weight: 700; }
.vtl { position: relative; flex: 1; min-width: 24px; height: 6px; border-radius: 99px; background: var(--panel2); cursor: pointer; touch-action: none; outline: none;
  transition: height .15s; }
.vtl::before { content: ''; position: absolute; left: -8px; right: -8px; top: -12px; bottom: -12px; }   /* bigger grab area */
.vtl em { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 99px; background: rgba(107, 66, 38, .28); pointer-events: none; }
.vtl i { position: absolute; top: 0; bottom: 0; background: var(--fwd); border-radius: 99px; opacity: .55; pointer-events: none; }
.vbar.is-slow .vtl i { opacity: 1; }
/* the handle stays a small quiet dot, and grows into an easy-to-grab knob only when the pointer is on the strip */
.vtl b { position: absolute; top: 50%; width: 6px; height: 6px; border-radius: 50%; background: rgba(107, 66, 38, .5); border: 0 solid var(--ink); box-sizing: border-box;
  transform: translate(-50%, -50%); pointer-events: none; transition: width .18s, height .18s, background .18s, border-width .18s, box-shadow .18s; }
.vbar:hover .vtl, .vtl.is-drag, .vtl:focus-visible { height: 8px; }
.vbar:hover .vtl b, .vtl.is-drag b, .vtl:focus-visible b { width: 17px; height: 17px; background: var(--paper); border-width: 2.5px; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }
.vtl.is-drag b { width: 19px; height: 19px; }
.vtl.is-drag { cursor: grabbing; }
.vtl:focus-visible { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--fwd); }
@container (max-width: 250px) { .vbar .rt { display: none; } }
.lb-panel > .vbar { padding: 0 16px 10px; font-size: 12.5px; gap: 10px; }
.lb-panel > .vbar .spd { padding: 6px 10px; }
.lb-panel > .vbar .vtl { height: 6px; }
.lb-spd-lbl { font: 700 11px/1 var(--mono); color: var(--ink3); padding: 0 6px 0 8px; align-self: center; }
.spd-demo { font: 800 11px/1 var(--mono); color: #fff; background: var(--fwd); padding: 2px 6px; border-radius: 99px; }

/* ---------- mascot moods (the hero robot and its mini twin in the playground) ---------- */
.mascot .mp { display: none; }
.mascot .mp.on { display: inline; }
.mascot .fx.on { animation: m-pop .4s cubic-bezier(.3, 1.6, .5, 1) both; transform-box: fill-box; transform-origin: center; }
.m-squash { transform-origin: 130px 228px; }
.m-squash.go { animation: m-squash .45s cubic-bezier(.3, 1.5, .5, 1); }
.m-head { transform-origin: 130px 150px; }
.m-face { transition: transform .18s ease-out; }
.m-cheeks ellipse { transform-box: fill-box; transform-origin: center; transition: transform .3s, fill .3s; }
.m-antenna { transition: fill .3s; }
.m-heart { transform-box: fill-box; transform-origin: center; animation: m-beat .9s ease-in-out infinite; }
.ar-wave { transform-origin: 198px 168px; animation: m-wave 1.3s ease-in-out infinite; }
.mascot .tw, .mascot .spin, .mascot .pulse, .mascot .drip, .mascot .fall, .mascot .look, .mascot .pup,
.mascot .h1, .mascot .h2, .mascot .h3, .mascot .s1, .mascot .s2, .mascot .s3,
.mascot .n1, .mascot .n2, .mascot .n3, .mascot .d1, .mascot .d2, .mascot .d3, .mascot .tremble { transform-box: fill-box; transform-origin: center; }
.mascot .tw { animation: m-twinkle .9s ease-in-out infinite; }
.mascot .spin { animation: spin 1.1s linear infinite; }
.mascot .pulse { animation: m-beat .6s ease-in-out infinite; }
.mascot .drip { animation: m-drip 1.1s ease-in infinite; } .mascot .drip.d2 { animation-delay: .5s; }
.mascot .fall { animation: m-fall 1.4s ease-in infinite; } .mascot .fall.f2 { animation-delay: .7s; }
.mascot .h1, .mascot .h2, .mascot .h3, .mascot .n1, .mascot .n2, .mascot .n3 { animation: m-float 1.8s ease-out infinite; }
.mascot .h2, .mascot .n2 { animation-delay: .6s; } .mascot .h3, .mascot .n3 { animation-delay: 1.2s; }
.mascot .s1, .mascot .s2, .mascot .s3 { animation: m-twinkle 1.1s ease-in-out infinite; }
.mascot .s2 { animation-delay: .35s; } .mascot .s3 { animation-delay: .7s; }
.mascot .d1, .mascot .d2, .mascot .d3 { animation: m-dot 1.2s ease-in-out infinite; }
.mascot .d2 { animation-delay: .2s; } .mascot .d3 { animation-delay: .4s; }
.mascot .look { animation: m-look 2.4s ease-in-out infinite; }
.mascot .tremble { animation: m-tremble .25s linear infinite; }
.mascot .slide-r { animation: m-slide 0.7s ease-in-out infinite; }
.mascot .slide-l { animation: m-slide 0.7s ease-in-out infinite reverse; }

/* per-mood body language */
.mascot[data-mood="work"] .m-head { animation: m-sway 1.4s ease-in-out infinite; }
.mascot[data-mood="surprised"] .m-bob, .mascot[data-mood="starstruck"] .m-bob { animation: m-hop .55s cubic-bezier(.3, 1.6, .5, 1), bob 3.2s ease-in-out .55s infinite; }
.mascot[data-mood="surprised"] .m-antenna, .mascot[data-mood="panic"] .m-antenna { fill: #F2B33D; animation: pulse .5s infinite; }
.mascot[data-mood="touched"] .m-head { animation: m-sway 2.6s ease-in-out infinite; }
.mascot[data-mood="touched"] .m-cheeks ellipse, .mascot[data-mood="joy"] .m-cheeks ellipse { fill: #F29A8E; transform: scale(1.2); }
.mascot[data-mood="dizzy"] .m-head { animation: m-wobble 1.1s ease-in-out infinite; }
.mascot[data-mood="starstruck"] .m-bob, .mascot[data-mood="joy"] .m-bob { animation: m-bounce .45s ease-in-out infinite alternate; }
.mascot[data-mood="grumpy"] .m-bob { animation: m-shake .12s linear 6, bob 3.2s ease-in-out .72s infinite; }
.mascot[data-mood="grumpy"] .m-cheeks ellipse { fill: #EE8A7E; transform: scale(1.45, 1.6); }
.mascot[data-mood="grumpy"] .m-antenna { fill: #D9534F; }
.mascot[data-mood="panic"] .m-bob { animation: m-shiver .09s linear infinite; }
.mascot[data-mood="panic"] .pup { animation: m-shiver .1s linear infinite; }
.mascot[data-mood="sad"] .m-head { animation: m-droop 2.8s ease-in-out infinite; }
.mascot[data-mood="sad"] .m-bob { animation-duration: 5s; }
.mascot[data-mood="sad"] .m-antenna { fill: #B9AFA3; }
.mascot[data-mood="think"] .m-head { animation: m-tilt 2.4s ease-in-out infinite; }
.mascot[data-mood="think"] .m-reel { animation-duration: 6s; }
.mascot[data-mood="dizzy"] .m-reel { animation-duration: .7s; }
.mascot[data-mood="rewind"] .m-reel { animation-direction: reverse; animation-duration: .45s; }
.mascot[data-mood="rewind"] .m-head { animation: m-lean-b .7s ease-in-out infinite alternate; }
.mascot[data-mood="ffwd"] .m-reel { animation-duration: .35s; }
.mascot[data-mood="ffwd"] .m-head { animation: m-lean-f .7s ease-in-out infinite alternate; }

/* the mini twin next to the playground story */
.pg-now { display: grid; grid-template-columns: 100px minmax(170px, 250px) 1fr; gap: 16px; align-items: center; margin: 16px 0 12px; }
.pg-now .pg-story { margin: 0; align-self: stretch; }
.pg-buddy { all: unset; display: block; width: 100px; cursor: pointer; padding-top: 6px; -webkit-tap-highlight-color: transparent; }
.pg-buddy:focus-visible { outline: 2px solid var(--brown); outline-offset: 4px; border-radius: 12px; }
.pg-buddy .mascot { width: 100%; height: auto; display: block; overflow: visible; }
.pg-say { position: relative; justify-self: start; background: var(--paper); border: 2px solid var(--brown); border-radius: 14px; padding: 9px 13px;
  font: 700 13px/1.4 var(--mono); color: var(--ink); box-shadow: var(--shadow); }
.pg-say::before { content: ''; position: absolute; left: -8px; top: 50%; width: 12px; height: 12px; margin-top: -7px; background: var(--paper);
  border-left: 2px solid var(--brown); border-bottom: 2px solid var(--brown); transform: rotate(45deg); }
.pg-say.pop { animation: m-pop .35s cubic-bezier(.3, 1.6, .5, 1); }
.bubble.pop { animation: m-pop .35s cubic-bezier(.3, 1.6, .5, 1), float 4s ease-in-out .35s infinite; }
@media (max-width: 520px) { .mood-dex { gap: 7px; padding: 5px 10px 5px 8px; } .md-dots { gap: 3px; } .md-dots i { width: 15px; height: 15px; font-size: 9.5px; } }
@media (max-width: 760px) {
  .pg-now { grid-template-columns: 80px 1fr; gap: 12px; }
  .pg-buddy { width: 80px; }
  .pg-now .pg-story { grid-column: 1 / -1; }
}

@keyframes m-pop { from { transform: scale(.3); opacity: 0; } }
@keyframes m-squash { 0% { transform: scale(1); } 30% { transform: scale(1.07, .9); } 60% { transform: scale(.96, 1.05); } 100% { transform: scale(1); } }
@keyframes m-sway { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
@keyframes m-hop { 0% { transform: translateY(0); } 40% { transform: translateY(-22px); } 100% { transform: translateY(0); } }
@keyframes m-wobble { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg); } }
@keyframes m-bounce { from { transform: translateY(0); } to { transform: translateY(-10px); } }
@keyframes m-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
@keyframes m-shiver { 0%, 100% { transform: translateX(-1.5px); } 50% { transform: translateX(1.5px); } }
@keyframes m-droop { 0%, 100% { transform: rotate(5deg) translateY(4px); } 50% { transform: rotate(7deg) translateY(6px); } }
@keyframes m-tilt { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(-5deg); } }
@keyframes m-lean-f { from { transform: rotate(2deg); } to { transform: rotate(6deg); } }
@keyframes m-lean-b { from { transform: rotate(-2deg); } to { transform: rotate(-6deg); } }
@keyframes m-wave { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-18deg); } }
@keyframes m-beat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.18); } }
@keyframes m-twinkle { 0%, 100% { transform: scale(1) rotate(0); } 50% { transform: scale(.6) rotate(25deg); } }
@keyframes m-float { 0% { transform: translateY(6px) scale(.6); opacity: 0; } 25% { opacity: 1; } 100% { transform: translateY(-24px) scale(1); opacity: 0; } }
@keyframes m-drip { 0% { transform: translateY(-4px); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(14px); opacity: 0; } }
@keyframes m-fall { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(26px); opacity: 0; } }
@keyframes m-dot { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@keyframes m-look { 0%, 100% { transform: translate(0, 0); } 35% { transform: translate(-7px, 1px); } 65% { transform: translate(1px, -2px); } }
@keyframes m-tremble { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(1px); } }
@keyframes m-slide { 0% { transform: translateX(-6px); opacity: .35; } 50% { opacity: 1; } 100% { transform: translateX(8px); opacity: .35; } }

/* ---------- "poke me" affordances ---------- */
.mood-dex { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; margin: 2px 0 0; width: max-content; max-width: 94vw;
  position: relative; left: 50%; transform: translateX(-50%);
  padding: 6px 12px 6px 10px; border-radius: 99px; background: var(--paper); border: 1.5px dashed var(--gold); font: 700 11.5px/1 var(--mono); color: var(--ink2); }
.md-lbl { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.md-tap { display: inline-block; animation: m-tap 1.4s ease-in-out infinite; }
.hero-art.poked .md-tap { display: none; }
.md-dots { display: inline-flex; gap: 4px; }
.md-dots i { width: 18px; height: 18px; border-radius: 50%; background: var(--panel2); display: grid; place-items: center; font: 400 11px/1 var(--sans); font-style: normal; }
.md-dots i.got { background: var(--fwd-bg); animation: m-pop .35s cubic-bezier(.3, 1.6, .5, 1); }
.md-dots i.now { box-shadow: 0 0 0 2px var(--fwd); }
.mood-dex.all { border-style: solid; border-color: var(--fwd); }
.burst { position: absolute; left: 0; top: 0; pointer-events: none; font: 800 19px/1 var(--sans); z-index: 3; text-shadow: 0 1px 0 #fff;
  animation: m-burst .75s cubic-bezier(.2, .8, .3, 1) forwards; }
.pg-buddy { position: relative; }
.pg-buddy .mascot { transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.pg-buddy:hover .mascot { transform: scale(1.07) rotate(-3deg); }
.pg-buddy:active .mascot { transform: scale(.93); }
@keyframes m-tap { 0%, 100% { transform: translateY(0) scale(1); } 45% { transform: translateY(-3px) scale(1); } 60% { transform: translateY(1px) scale(.88); } }
@keyframes m-burst { 0% { transform: translate(var(--x0), var(--y0)) scale(.4); opacity: 1; }
  100% { transform: translate(calc(var(--x0) + var(--dx)), calc(var(--y0) + var(--dy))) scale(1.1) rotate(var(--r)); opacity: 0; } }
/* hover cue: one soft glow behind the mascot (no expanding rings) */
.m-stage::before { content: ''; position: absolute; left: 50%; top: 40%; width: 78%; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%) scale(.9);
  background: radial-gradient(circle, rgba(235, 203, 154, .55), rgba(235, 203, 154, 0) 68%); opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s; }
.m-stage:hover::before, .m-stage:focus-within::before { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* ---------- formal header ---------- */
.hero-formal { padding: clamp(40px, 6vw, 76px) 20px 14px; text-align: center; }
.hero-formal::before { display: none; }
.hero-inner { max-width: 1400px; margin: 0 auto; }
.title-f { font: 800 clamp(24px, 2.4vw, 35px)/1.25 var(--sans); letter-spacing: -.02em; color: var(--ink); margin: 0 0 20px; text-wrap: balance; }
.title-f .ram-name { color: var(--fwd); }
@media (min-width: 1080px) { .title-f { white-space: nowrap; } }
.authors-f { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 24px; font: 600 clamp(16px, 1.35vw, 19px)/1.5 var(--sans); color: var(--ink); }
.affils-f { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 22px; font-size: clamp(14px, 1.1vw, 16px); color: var(--ink2); margin-top: 6px; }
.authors-f sup, .affils-f sup { color: var(--fwd); font-weight: 700; margin-left: 1px; }
.hero-formal .linkrow { justify-content: center; margin-top: 24px; }

/* small mascot in front of the title */

/* ---------- task chooser: make the cards read as "pick one" ---------- */
.ex-hint { font: 600 12.5px/1.2 var(--sans); color: var(--ink3); }
.tcard { overflow: visible; position: relative; isolation: isolate; transition: transform .2s, border-color .2s, box-shadow .2s; }
.tcard:hover { border-color: var(--fwd); box-shadow: 0 0 0 3px rgba(192, 103, 90, .14), var(--shadow); }
.tc-img { position: relative; display: block; border-radius: 12px 12px 0 0; overflow: hidden; }
.tcard img { transition: filter .25s, transform .4s; filter: saturate(.5) brightness(.98); }
.tcard:hover img, .tcard:focus-visible img, .tcard.is-active img { filter: none; }
.tcard:hover img { transform: scale(1.05); }
.tc-go, .tc-on { position: absolute; right: 8px; bottom: 8px; font: 800 10.5px/1 var(--mono); padding: 5px 8px; border-radius: 99px; pointer-events: none; }
.tc-go { background: var(--ink); color: var(--bg); opacity: 0; transform: translateY(5px); transition: opacity .2s, transform .2s; }
.tcard:hover .tc-go, .tcard:focus-visible .tc-go { opacity: 1; transform: none; }
.tc-on { display: none; background: var(--fwd); color: #fff; }
.tcard.is-active .tc-go { display: none; }
.tcard.is-active .tc-on { display: inline-block; }
.tcard .tn { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 7px; row-gap: 2px; border-radius: 0 0 12px 12px; transition: background .2s, color .2s; }
.tcard .tn small { grid-column: 2; font: 600 11px/1.2 var(--mono); opacity: .65; }
.tcard .radio { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--ink3); box-sizing: border-box; transition: border .2s, background .2s; }
.tcard:hover .radio { border-color: var(--fwd); }
.tcard.is-active .radio { border: 3px solid var(--bg); background: var(--fwd); }
/* a little pointer from the chosen card down to its details */
.tcard.is-active::after { content: ''; position: absolute; left: 50%; bottom: -9px; width: 16px; height: 16px; background: var(--brown); border-radius: 3px;
  transform: translateX(-50%) rotate(45deg); z-index: -1; }
.task-info { border-top: 3px solid var(--brown); }
.task-info.is-new { animation: rise .3s cubic-bezier(.3, 1.4, .5, 1); }
.tcard.nudge { animation: tc-hop .5s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes tc-hop { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-7px); } }

/* ---------- shift chooser: every card has the same width and height ---------- */
.pg-choose .demo { box-sizing: border-box; width: 100%; height: 100%; }
.pg-choose .demo.is-active { transform: none; }
@media (min-width: 1101px) {      /* one shared row of 8 equal columns, so all cards line up */
  .pg-choose { grid-template-columns: repeat(6, minmax(0, 1fr)); grid-template-rows: auto auto; column-gap: 8px; row-gap: 6px; }
  .pg-choose .demo-grp { display: grid; grid-template-columns: subgrid; grid-template-rows: subgrid; grid-row: span 2; }
  .pg-choose .demo-grp.fwd { grid-column: span 3; } .pg-choose .demo-grp.bwd { grid-column: span 2; } .pg-choose .demo-grp.none { grid-column: span 1; }
  .pg-choose .demo-grp-t { grid-column: 1 / -1; margin: 0; }
  .pg-choose .demo-grp .demo-row { display: contents; }
}
@media (max-width: 1100px) {      /* smaller screens: four equal columns per group, same card height everywhere */
  .pg-choose .demo-grp .demo-row { display: grid; grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .pg-choose .demo { min-height: 106px; }
}
@media (max-width: 700px) { .pg-choose .demo-grp .demo-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pg-choose .demo-ico { box-sizing: border-box; height: 28px; }   /* same chip height, so every name sits on the same line */

/* author links: same look as the names, underline on hover */
.authors-f a { color: inherit; text-decoration: none; border-bottom: 1.5px solid transparent; transition: color .2s, border-color .2s; }
.authors-f a:hover, .authors-f a:focus-visible { color: var(--fwd); border-bottom-color: currentColor; }

/* ---------- playground: two look-alike plates, memory made visible ---------- */
.pg-mem { display: inline-block; vertical-align: 3px; margin-left: 6px; font: 800 11px/1 var(--mono); padding: 5px 8px; border-radius: 99px; background: #FFF0DA; border: 1.5px solid var(--gold); color: var(--brown); }
.pg-sub b { color: var(--ink); }
.lane-body { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
@media (max-width: 520px) { .lane-body { grid-template-columns: 1fr; } }
.facts { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; }
.fact { font: 700 11px/1 var(--mono); padding: 5px 7px; border-radius: 7px; background: var(--panel); color: var(--ink3); border: 1.5px solid transparent; transition: background .25s, color .25s; }
.fact.yes { color: var(--ink); }
.fact.key { flex-basis: 100%; background: #FFF0DA; border-color: var(--gold); color: var(--ink); font-size: 11.5px; line-height: 1.3; }
.fact.wrong { background: var(--bad-bg); border-color: #EDBDB5; color: #8A2E23; }
.fact em { font-style: normal; font-size: 9px; text-transform: uppercase; letter-spacing: .04em; margin-left: 5px; }
.cell.lost { background: var(--bad-bg); color: var(--bad); border: 2px dashed var(--bad); }
.lg-ring { display: inline-block; width: 18px; height: 18px; border-radius: 50%; border: 2.5px dashed #E89A45; vertical-align: -4px; }
.lg-note { flex-basis: 100%; color: var(--ink3); font-style: italic; }

/* ---------- ghost actions: same amber as the real-robot "Success w/ ghost" label ---------- */
.status.ghost { background: var(--ghost-bg); border-color: #E8CD85; color: #6E4A06; }
.status .badge { margin-right: 4px; }
.status.ok .badge, .status.bad .badge, .status.ghost .badge { background: var(--paper); }
.cell.ghost { background: var(--ghost-bg); color: #8A5E0A; border-color: var(--ghost); }
.lane.is-ghosting { border-color: #F2A81D; background: #FFF8E6; animation: ghost-pulse 1s ease-in-out infinite; }
.lane.is-ghosting .status.ghost { border: 2px solid var(--ghost); }
@keyframes ghost-pulse { 0%, 100% { box-shadow: 0 0 0 2px rgba(242, 168, 29, .45); } 50% { box-shadow: 0 0 0 7px rgba(242, 168, 29, .16); } }
.lg-phantom { display: inline-block; width: 18px; height: 14px; border-radius: 50%; border: 2px dashed var(--ghost); background: #FFE29A; vertical-align: -2px; }
.pg-story .badge { margin: 0 2px; vertical-align: 1px; }
