/* Escape the AI Lab – dark "lab" look on top of style.css (same font, colours and buttons). */
.lab { --lab: #0b0a2a; --lab-2: #16144a; --lab-line: rgba(165, 180, 252, .22); --lab-ink: #eef2ff; --lab-muted: #c7d2fe; --neon: #5eead4;
  background: radial-gradient(1000px 500px at 80% -10%, rgba(20, 184, 166, .22), transparent 60%),
              radial-gradient(900px 600px at -10% 30%, rgba(67, 56, 202, .35), transparent 60%), var(--lab);
  color: var(--lab-ink); min-height: 100vh; }
.lab a { color: var(--neon); }
.lab :focus-visible { outline-color: var(--neon); }
.lab__top .logo { color: #fff; text-decoration: none; }
.lab__top nav a { color: #fff; }
.lab__top nav a[aria-current="page"] { border-bottom-color: var(--neon); }

.lab__main { max-width: 1080px; margin: 0 auto; padding: 1rem 1.5rem 2rem; }
.lab__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem 1rem; margin-bottom: 1.2rem;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--lab-line); border-radius: 16px; padding: .7rem 1rem; }
.code { margin: 0; display: flex; align-items: center; gap: .7rem; }
.code__label { font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--lab-muted); }
.code__letters { display: inline-flex; gap: .4rem; }
.code__letters span { display: grid; place-items: center; width: 2.5rem; height: 2.8rem; border-radius: 10px; font-family: var(--mono); font-weight: 800; font-size: 1.25rem; position: relative; }
.code__off { border: 1px dashed var(--lab-line); color: transparent; background: rgba(255, 255, 255, .03); }
.code__off::before { content: "🔒"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--lab-muted); font-size: .95rem; }
.code__off:first-child, .code__on + .code__off { border-color: var(--sun); border-style: solid; box-shadow: 0 0 0 1px var(--sun); animation: codeCurrent 2.4s ease-in-out infinite; }
@keyframes codeCurrent { 50% { box-shadow: 0 0 0 1px var(--sun), 0 0 14px -3px var(--sun); } }
@media (prefers-reduced-motion: reduce) { .code__off:first-child, .code__on + .code__off { animation: none; } }
.code__on { background: var(--neon); color: var(--lab); box-shadow: 0 0 18px rgba(94, 234, 212, .55); }
.listen { display: inline-flex; align-items: center; gap: .45rem; font: inherit; font-weight: 700; color: #fff; background: rgba(255, 255, 255, .1); border: 1px solid var(--lab-line); border-radius: 999px; padding: .45rem 1rem; min-height: 44px; cursor: pointer; }
.listen:hover { background: rgba(255, 255, 255, .18); }

.stage { background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02)); border: 1px solid var(--lab-line);
  border-radius: 22px; padding: 2rem; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .7); }
.stage:empty { min-height: 75vh; }   /* room for the first screen before the script fills it: the footer does not jump (CLS) */
.stage:focus { outline: none; }
.stage h1:focus, .stage h2:focus { outline: none; }
.eyebrow--lab { color: var(--neon); }
.lab__title { margin: 0 0 1rem; font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.lab__title--s { font-size: clamp(1.6rem, 4vw, 2.2rem); }
.lab__h2 { margin: 2rem 0 .8rem; font-size: 1.3rem; font-weight: 800; }
.lab__lede, .story p, .rules { color: var(--lab-muted); font-size: 1.05rem; }
.story p { margin: 0 0 .7rem; }
.story strong { color: #fff; }
.small { margin: 1.5rem 0 0; font-size: .92rem; }
.link-button--lab { color: var(--lab-muted); }

/* Cyprus fact */
.fact { margin: 1.4rem 0; padding: 1.2rem 1.4rem; border-radius: 16px; background: rgba(245, 158, 11, .1); border: 1px solid rgba(245, 158, 11, .4); }
.fact__nums { display: flex; gap: 2.5rem; flex-wrap: wrap; }
.fact__nums p { margin: 0; font-weight: 700; color: var(--lab-muted); }
.fact__big { display: block; font-size: 2.6rem; font-weight: 800; line-height: 1; color: var(--sun); }
.fact__big--eu { color: #fff; }
.fact figcaption { margin-top: .7rem; font-size: .92rem; color: var(--lab-muted); }

/* mode + buttons */
.mode { margin: 1.4rem 0 .6rem; padding: 0; border: 0; }
.mode legend { font-weight: 800; margin-bottom: .6rem; font-size: 1.05rem; }
.mode__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: .8rem; }
.mode label { display: flex; gap: .7rem; align-items: flex-start; padding: 1rem 1.1rem; cursor: pointer; color: var(--lab-muted);
  border: 1px solid var(--lab-line); border-radius: 16px; background: var(--lab-2); transition: border-color .15s, background .15s; }
.mode label:hover { border-color: var(--lab-muted); }
.mode label:has(input:checked) { border-color: var(--neon); background: rgba(94, 234, 212, .1); }
.mode strong { color: #fff; display: block; margin-bottom: .2rem; font-size: 1.05rem; }
.mode input, .opt input { width: 1.2rem; height: 1.2rem; accent-color: var(--neon); flex: none; margin-top: .15rem; }
.actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.4rem; }
.btn--line { background: transparent; color: #fff; border: 2px solid var(--lab-line); }
.btn--line:hover { border-color: var(--lab-muted); }
.btn--s { min-height: 40px; padding: .35rem .9rem; font-size: .92rem; }
.btn--picked { background: rgba(94, 234, 212, .18); border-color: var(--neon); }
.btn:disabled { cursor: default; }

/* map */
.doors { list-style: none; margin: 1.2rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; }
.door { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: .2rem; text-align: left; font: inherit; color: #fff; cursor: pointer;
  padding: 1rem; border-radius: 16px; background: var(--lab-2); border: 1px solid var(--lab-line); border-top: 5px solid var(--c); transition: transform .15s, box-shadow .15s; }
.door:hover:not(:disabled) { transform: translateY(-3px); box-shadow: 0 0 0 1px var(--c), 0 18px 40px -16px var(--c); }
.door:disabled { opacity: .55; cursor: not-allowed; }
.door--done { background: color-mix(in srgb, var(--c) 22%, var(--lab-2)); }
.door__n { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; margin-bottom: .4rem; border-radius: 10px; background: rgba(255, 255, 255, .1); font-weight: 800; font-family: var(--mono); }
.door--done .door__n { background: var(--neon); color: var(--lab); }
.door__name { font-weight: 800; line-height: 1.25; }
.door__topic { font-size: .85rem; color: var(--lab-muted); }
.door__status { margin-top: auto; padding: .25rem .65rem; font-size: .76rem; font-weight: 800; letter-spacing: .02em; border-radius: 999px; background: rgba(255, 255, 255, .08); color: var(--lab-muted); }
.door__status--done { background: rgba(94, 234, 212, .18); color: var(--neon); }
.door__status--open { background: rgba(245, 158, 11, .18); color: var(--sun); }
.door__status--locked { background: rgba(255, 255, 255, .06); color: var(--lab-muted); }
.door__cta { margin-top: .6rem; align-self: stretch; text-align: center; padding: .5rem .8rem; border-radius: 10px; background: var(--neon); color: var(--lab); font-weight: 800; font-size: .88rem; }

/* ARIA */
.aria { display: flex; gap: 1rem; align-items: flex-start; margin: 1rem 0; }
.aria__face { flex: none; width: 3.2rem; height: 3.2rem; border-radius: 50%; background: radial-gradient(circle at 50% 45%, #fff 0 12%, var(--neon) 13% 30%, #0f766e 31% 60%, var(--lab-2) 61%);
  box-shadow: 0 0 24px rgba(94, 234, 212, .6); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 6px rgba(94, 234, 212, .3); } }
.aria__line { margin: 0; padding: .9rem 1.1rem; border-radius: 4px 16px 16px 16px; background: rgba(94, 234, 212, .1); border: 1px solid rgba(94, 234, 212, .35); font-size: 1.08rem; }
.aria__line--end { margin-bottom: 1rem; }
.chat { list-style: none; margin: 1.2rem 0 0; padding: 0; display: grid; gap: .9rem; }
.msg { padding: 1rem 1.1rem; border-radius: 4px 16px 16px 16px; background: var(--lab-2); border: 1px solid var(--lab-line); animation: in .35s ease-out; }
@keyframes in { from { opacity: 0; transform: translateY(8px); } }
.msg__who { margin: 0 0 .2rem; font-size: .78rem; font-weight: 800; letter-spacing: .08em; color: var(--neon); }
.msg__text { margin: 0 0 .7rem; font-size: 1.05rem; }
.msg__act { display: flex; gap: .5rem; flex-wrap: wrap; }
.msg__why { margin: .7rem 0 0; padding: .6rem .8rem; border-radius: 10px; font-size: .95rem; }

/* questions */
.qhead { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: baseline; }
.qcount { margin: 0; font-weight: 700; color: var(--lab-muted); }
.progress { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .1); margin: .4rem 0 1.4rem; overflow: hidden; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--neon), var(--sun)); transition: width .4s; }
.watch { margin: 0 0 1rem; }
.watch a { display: inline-block; padding: .5rem .9rem; border-radius: 10px; background: rgba(94, 234, 212, .1); border: 1px solid rgba(94, 234, 212, .35); font-weight: 700; text-decoration: none; }
/* style.css has its own ".q" (a catalogue quiz row: display:flex + a border-bottom) and ".q legend" (floated beside
   its answers) that would otherwise leak onto this page's question form (also "form.q#q") since both pages share
   that stylesheet – reset both back to a plain block, or the fieldset collapses the options to zero width */
.q { display: block; margin: 0; padding: 0; border: 0; min-width: 0; }
.q legend { float: none; flex: none; font-weight: 700; }
.q fieldset { margin: 0; padding: 0; border: 0; }
.q__text { font-size: 1.3rem; font-weight: 700; line-height: 1.35; margin-bottom: .8rem; padding: 0; }
.q__help { margin: 0 0 .8rem; color: var(--lab-muted); }
.opts { display: grid; grid-template-columns: 1fr; gap: .6rem; counter-reset: opt; }
.opt { display: flex; gap: .8rem; align-items: center; padding: .85rem 1rem .85rem 3.5rem; border-radius: 12px; background: var(--lab-2); border: 1px solid var(--lab-line); cursor: pointer; position: relative; counter-increment: opt; }
.opt:hover { border-color: var(--lab-muted); }
.opt span, .sort label { color: var(--lab-ink); }
.opt::before { content: counter(opt, upper-alpha); position: absolute; left: .85rem; top: 50%; transform: translateY(-50%);
  width: 1.9rem; height: 1.9rem; border-radius: 8px; background: rgba(255, 255, 255, .08); border: 1px solid var(--lab-line);
  display: grid; place-items: center; font-weight: 800; font-family: var(--mono); font-size: .92rem; color: var(--lab-muted); }
.opt:has(input:checked) { border-color: var(--neon); background: rgba(94, 234, 212, .1); }
.opt:has(input:checked)::before { background: var(--neon); color: var(--lab); border-color: var(--neon); }
.opt:has(input:checked)::after { content: "✓"; position: absolute; top: .5rem; right: .6rem; color: var(--neon); font-weight: 900; font-size: 1.1rem; }
.sorts { display: grid; grid-template-columns: 1fr; gap: .6rem; }
.sort { display: grid; grid-template-columns: 1fr minmax(180px, 40%); gap: .8rem; align-items: center; padding: .7rem 1rem; border-radius: 12px; background: var(--lab-2); border: 1px solid var(--lab-line); }
.sort select, .door-form input, .cert-form input, .reflect textarea { font: inherit; color: var(--ink); background: #fff; border: 2px solid transparent; border-radius: 10px; padding: .55rem .7rem; min-height: 44px; }
.q__error, .door-msg { color: #fecaca; font-weight: 700; }
.feedback { margin-top: 1.4rem; padding: 1.2rem 1.3rem; border-radius: 16px; }
.feedback:focus { outline: 3px solid var(--neon); outline-offset: 3px; }
.feedback p { margin: 0 0 .5rem; }
.feedback__head { font-size: 1.2rem; font-weight: 800; }
.ok { background: rgba(255, 255, 255, .05); border: 1px solid var(--lab-line); border-top: 4px solid var(--neon); }
.no { background: rgba(255, 255, 255, .05); border: 1px solid var(--lab-line); border-top: 4px solid #f87171; }
.feedback .btn { margin-top: 1rem; min-width: 11rem; justify-content: center; }
.feedback__res { margin: .9rem 0 !important; padding: .8rem 1rem; border-radius: 12px; background: rgba(255, 255, 255, .05); border: 1px solid var(--lab-line); }
.feedback__res a { font-weight: 700; }

/* room result + reflection */
.score { margin: .4rem 0; font-size: 1.1rem; color: var(--lab-muted); }
.score span { font-size: 3rem; font-weight: 800; color: #fff; margin-right: .3rem; }
.big-letter { display: inline-grid; place-items: center; width: 2.6rem; height: 2.9rem; border-radius: 10px; background: var(--neon); color: var(--lab); font-family: var(--mono); box-shadow: 0 0 24px rgba(94, 234, 212, .7); vertical-align: middle; }
.reflect { margin-top: 1.4rem; padding: 1rem 1.2rem; border-radius: 14px; background: var(--lab-2); border: 1px solid var(--lab-line); }
.reflect summary { cursor: pointer; font-weight: 700; }
.reflect textarea { width: 100%; margin: .8rem 0; }
.rubric { width: 100%; border-collapse: collapse; font-size: .88rem; }
.rubric caption { text-align: left; font-weight: 700; margin-bottom: .4rem; color: var(--lab-muted); }
.rubric th, .rubric td { border: 1px solid var(--lab-line); padding: .45rem .55rem; text-align: left; vertical-align: top; }

/* exit door */
.door-form { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; }
.door-form label { font-weight: 700; }
.door-form input { font-family: var(--mono); font-size: 1.5rem; letter-spacing: .4em; text-transform: uppercase; width: 11rem; }
.door-msg { flex-basis: 100%; margin: 0; }

/* results */
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.bars li { display: grid; grid-template-columns: minmax(0, 1fr) 40% auto; gap: .8rem; align-items: center; }
.bars__track { height: 12px; border-radius: 99px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.bars__track span { display: block; height: 100%; background: var(--c); filter: brightness(1.4); }
.bars__n { font-weight: 800; font-family: var(--mono); }
.next { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
.next > li { padding: 1rem 1.2rem; border-radius: 14px; background: var(--lab-2); border: 1px solid var(--lab-line); }
.next__topic { margin: 0 0 .4rem; font-weight: 800; }
.next ul { margin: 0 0 .5rem; padding-left: 1.2rem; }
.next__type { font-size: .82rem; color: var(--lab-muted); }
.next__more { font-weight: 700; font-size: .92rem; }
.cert-form { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; margin-bottom: 1rem; }
.cert-form label { font-weight: 700; }
.cert { padding: 2rem; border-radius: 16px; text-align: center; color: var(--ink); background: #fff;
  border: 10px double #c7d2fe; }
.cert p { margin: 0 0 .5rem; }
.cert__small { font-size: .85rem; color: var(--muted); letter-spacing: .03em; }
.cert__title { font-family: Georgia, "Times New Roman", serif; font-size: 2.1rem; font-weight: 800; color: var(--brand); }
.cert__name { font-family: Georgia, "Times New Roman", serif; font-size: 1.8rem; font-weight: 800; border-bottom: 2px solid var(--rule); display: inline-block; padding: 0 1rem .2rem; }
.cert__topics { list-style: none; padding: 0; margin: .9rem 0 0; display: flex; flex-wrap: wrap; gap: .4rem .6rem; justify-content: center; font-size: .85rem; color: var(--muted); }
.cert__topics li { padding: .3rem .8rem; border-radius: 999px; background: #eef2ff; border: 1px solid var(--rule); }

.colophon--lab { color: var(--lab-muted); }

@media (max-width: 560px) {
  .lab__main { padding: 1rem 1rem 2rem; }
  .stage { padding: 1.2rem; border-radius: 16px; }
  .code__letters span { width: 1.8rem; height: 2.1rem; font-size: 1rem; }
  .sort { grid-template-columns: 1fr; }
  .bars li { grid-template-columns: 1fr auto; }
  .bars__track { grid-column: 1 / -1; grid-row: 2; }
}
@media print {
  body.lab { background: #fff; }
  .lab__top, .lab__bar, .colophon { display: none !important; }
  body:not([data-print="notes"]) .stage > :not(.cert) { display: none !important; }
  .stage { border: 0; box-shadow: none; padding: 0; background: none; }
  .cert { border-color: #4338ca; }
}

/* welcome screen (one click so the browser allows the voice) */
.welcome { text-align: center; padding: 1.5rem 0; }
.aria__face--big { display: block; width: 6rem; height: 6rem; margin: 0 auto 1.4rem; }
.actions--center { justify-content: center; }
.cheer { font-weight: 700; color: var(--sun); }

/* levels, difficulty and hints */
.door__level { font-size: .82rem; font-weight: 700; color: var(--sun); }
.diff { display: inline-block; margin-left: .5rem; padding: .1rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 800; vertical-align: middle; }
.diff--easy { background: rgba(74, 222, 128, .18); color: #86efac; }
.diff--medium { background: rgba(245, 158, 11, .18); color: #fcd34d; }
.diff--hard { background: rgba(248, 113, 113, .2); color: #fca5a5; }
.hint { margin: 1rem 0 0; padding: .7rem 1rem; border-radius: 12px; background: rgba(245, 158, 11, .12); border: 1px solid rgba(245, 158, 11, .45); }
.hint--aria small { display: block; margin-top: .25rem; font-size: .74rem; color: #cbd5e1; }
.hint--caught { background: rgba(239, 68, 68, .14); border-color: rgba(248, 113, 113, .7); }
.hint--caught strong { color: #fca5a5; }
.opt__poll--fake { color: #fca5a5; } .opt__poll--fake span { background: #f87171; }
.tricks { margin: .4rem 0 1rem; padding: .7rem 1rem; border-radius: 12px; background: rgba(250, 204, 21, .1); border: 1px solid rgba(250, 204, 21, .4); }
.opt { position: relative; } .opt:has(.opt__poll) { padding-bottom: 1.35rem; }
.opt__poll { position: absolute; left: 1rem; right: 1rem; bottom: .2rem; display: flex; align-items: center; gap: .4rem; font-size: .66rem; color: #a5b4fc; pointer-events: none; }
.opt__poll span { display: block; height: 3px; border-radius: 3px; background: #facc15; flex: 0 0 auto; max-width: 60%; }
.hint:focus { outline: 3px solid var(--neon); outline-offset: 3px; }
.nohint { margin: 0; align-self: center; font-size: .92rem; color: var(--lab-muted); }

/* fake video reach (story mode) */
.reach[hidden] { display: none; }
.reach { margin: 0; display: flex; align-items: center; gap: .6rem; font-size: .85rem; font-weight: 700; color: var(--lab-muted); }
.reach__track { width: 120px; height: 10px; border-radius: 99px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.reach__track { position: relative; overflow: visible; }
#reach-bar { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #84cc16, #a855f7); box-shadow: 0 0 8px rgba(168, 85, 247, .6); transition: width .6s; }
.reach__germs { position: absolute; inset: -7px 0; pointer-events: none; }
.reach__germs i { position: absolute; top: 0; font-style: normal; font-size: .95rem; line-height: 1; animation: germ 2.4s ease-in-out infinite; }
@keyframes germ { 50% { transform: translateY(-3px) rotate(25deg) scale(1.15); } }
.reach--grow .reach__track { animation: infect .6s ease-out; }
@keyframes infect { 40% { transform: scale(1.12); filter: drop-shadow(0 0 6px #a855f7); } }
@media (prefers-reduced-motion: reduce) { .reach__germs i, .reach--grow .reach__track { animation: none; } }
.reach__n { font-family: var(--mono); color: #fff; min-width: 3ch; }
.reach--high .reach__n { color: #d8b4fe; }

/* ARIA reacts */
.aria--chat { align-items: center; }
.aria--chat .lab__lede { margin: 0; }
.aria__face--caught { animation: glitch .6s steps(2) 1; background: radial-gradient(circle at 50% 45%, #fff 0 12%, #f87171 13% 30%, #991b1b 31% 60%, var(--lab-2) 61%) !important; }
.aria__face--won { animation: bounce .6s ease-out 1; }
@keyframes glitch { 25% { transform: translate(-3px, 1px) skewX(8deg); } 50% { transform: translate(3px, -1px); } 75% { transform: translate(-1px, 2px) skewX(-8deg); } }
@keyframes bounce { 40% { transform: translateY(-8px) scale(1.08); } 70% { transform: translateY(2px); } }
.quip { display: block; margin: .25rem 0; font-style: italic; color: var(--neon); }

/* evidence cards */
.evcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: .8rem; }
.evcard { padding: 1rem 1.1rem; border-radius: 14px; background: var(--lab-2); border: 1px solid var(--lab-line); border-left: 6px solid var(--c); }
.evcard--new { margin: 1rem 0; animation: in .5s ease-out; }
.evcard__tag { margin: 0 0 .3rem; font-size: .8rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--sun); }
.evcard__title { margin: 0 0 .4rem; font-weight: 800; }
.evcard ul { margin: 0; padding-left: 1.1rem; }
.evcard li { margin-bottom: .3rem; }

/* badges */
.lab__count { font-size: .9rem; font-weight: 700; color: var(--lab-muted); margin-left: .4rem; }
.badges { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .7rem; }
.badge { display: grid; grid-template-columns: auto 1fr; gap: .1rem .7rem; align-items: center; padding: .8rem 1rem; border-radius: 14px; background: var(--lab-2); border: 1px dashed var(--lab-line); opacity: .55; }
.badge--on { opacity: 1; border: 1px solid var(--sun); box-shadow: 0 0 18px -6px rgba(245, 158, 11, .6); }
.badge__icon { grid-row: span 2; font-size: 1.8rem; filter: grayscale(1); }
.badge--on .badge__icon { filter: none; }
.badge__name { font-weight: 800; }
.badge__why { font-size: .85rem; color: var(--lab-muted); }
.cert__badges { margin-top: .6rem !important; font-size: .9rem; display: flex; flex-wrap: wrap; gap: .3rem .9rem; justify-content: center; }

@media print {
  body[data-print="notes"] .stage > :not(#notes) { display: none !important; }
  body[data-print="notes"] #notes { display: block; color: #000; }
  body[data-print="notes"] .evcard { background: #fff; color: #000; border-color: #999; margin-bottom: 1rem; break-inside: avoid; }
  body[data-print="notes"] #notes::before { content: "Escape the AI Lab – study notes (evidence cards)"; display: block; font-size: 1.4rem; font-weight: 800; margin-bottom: 1rem; }
}
@media (prefers-reduced-motion: reduce) { .aria__face, .aria__face--caught, .aria__face--won, .msg, .evcard--new { animation: none !important; } }

/* ---------- ARIA the cartoon robot (assets/aria.js) ---------- */
.bot { position: fixed; left: 0; top: 0; z-index: 20; width: 120px; pointer-events: none; will-change: transform; }
.bot[hidden] { display: none; }
.bot__svg { width: 120px; display: block; overflow: visible; filter: drop-shadow(0 0 14px rgba(94, 234, 212, .45)); animation: float 3.2s ease-in-out infinite; }
.bot--corner, .bot--corner .bot__svg { width: 80px; }
@keyframes float { 50% { transform: translateY(-8px); } }
.bot__svg * { transform-box: fill-box; transform-origin: center; transition: fill .4s, opacity .3s; }
.bot__antenna { stroke: #5eead4; stroke-width: 3; stroke-linecap: round; }
.bot__bulb { fill: var(--sun); animation: bulb 1.6s ease-in-out infinite; }
@keyframes bulb { 50% { opacity: .35; } }
.bot__face { fill: #0f766e; }
.bot__screen { fill: #0b0a2a; }
.bot__eye { fill: #5eead4; }
.bot__pupil { fill: #0b0a2a; }
.bot__eyes { transition: transform .12s; }
.bot--blink .bot__eyes { transform: scaleY(.1); }
.bot__brow { stroke: #5eead4; stroke-width: 4; stroke-linecap: round; fill: none; transition: transform .3s; }
.bot__mouth { display: none; stroke: #5eead4; stroke-width: 4; stroke-linecap: round; fill: none; }
.m-laugh { fill: rgba(94, 234, 212, .35); }
.bot__shut path { stroke: #5eead4; stroke-width: 4; stroke-linecap: round; fill: none; }
.bot__shut, .bot__tears, .bot__steam { display: none; }
.bot__cheek { fill: #f472b6; opacity: 0; }
.bot__body { fill: #115e59; }
.bot__core { fill: #5eead4; animation: bulb 2.4s ease-in-out infinite; }
.bot__arm { stroke: #0f766e; stroke-width: 7; stroke-linecap: round; fill: none; }
.bot__bubble { position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); width: max-content; max-width: 210px;
  padding: .5rem .75rem; border-radius: 14px; background: #fff; color: var(--ink); font-size: .86rem; font-weight: 700; line-height: 1.3;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .6); animation: pop .25s ease-out; }
.bot__bubble::after { content: ""; position: absolute; top: 100%; left: 50%; margin-left: -7px; border: 7px solid transparent; border-top-color: #fff; }
.bot__bubble[hidden] { display: none; }
@keyframes pop { from { transform: translateX(-50%) scale(.6); opacity: 0; } }
.bot--corner .bot__bubble { left: auto; right: 0; transform: none; animation: none; }
.bot--corner .bot__bubble::after { left: auto; right: 24px; }

/* idle */
[data-mood="idle"] .m-smirk { display: inline; }
/* laugh: squinting eyes, pink cheeks, shaking with laughter */
[data-mood="laugh"] .m-laugh { display: inline; }
[data-mood="laugh"] .bot__eyes { display: none; }
[data-mood="laugh"] .bot__shut { display: inline; }
[data-mood="laugh"] .bot__cheek { opacity: .7; }
[data-mood="laugh"] .bot__head { animation: laughing .22s ease-in-out 8; }
[data-mood="laugh"] .bot__arm--l { transform: rotate(-25deg); } [data-mood="laugh"] .bot__arm--r { transform: rotate(25deg); }
@keyframes laughing { 50% { transform: translateY(-3px) rotate(-3deg); } }
/* angry: red face, frowning brows, steam */
[data-mood="angry"] .m-angry { display: inline; }
[data-mood="angry"] .bot__face { fill: #b91c1c; }
[data-mood="angry"] .bot__eye { fill: #fecaca; }
[data-mood="angry"] .bot__brow--l { transform: translateY(4px) rotate(18deg); } [data-mood="angry"] .bot__brow--r { transform: translateY(4px) rotate(-18deg); }
[data-mood="angry"] .bot__steam { display: inline; fill: #e5e7eb; }
[data-mood="angry"] .bot__steam circle { animation: steam 1s ease-out infinite; }
[data-mood="angry"] .bot__steam circle:nth-child(2) { animation-delay: .3s; } [data-mood="angry"] .bot__steam circle:nth-child(3) { animation-delay: .6s; }
[data-mood="angry"] .bot__head { animation: fume .12s linear 10; }
@keyframes steam { from { transform: translateY(6px) scale(.4); opacity: .9; } to { transform: translateY(-14px) scale(1.4); opacity: 0; } }
@keyframes fume { 50% { transform: translateX(2px); } }
/* cry: closed eyes, sad brows, falling tears, sobbing, dim lights */
[data-mood="cry"] .m-cry { display: inline; }
[data-mood="cry"] .bot__eyes { display: none; }
[data-mood="cry"] .bot__shut { display: inline; transform: scaleY(-1); }
[data-mood="cry"] .bot__brow--l { transform: rotate(-16deg); } [data-mood="cry"] .bot__brow--r { transform: rotate(16deg); }
[data-mood="cry"] .bot__screen { fill: #172554; }
[data-mood="cry"] .bot__tears { display: inline; fill: #60a5fa; }
[data-mood="cry"] .bot__tears path { animation: tear 1s ease-in infinite; }
[data-mood="cry"] .bot__tears path:nth-child(2) { animation-delay: .45s; }
[data-mood="cry"] .bot__svg, [data-mood="cry"] .bot__head { animation: sob .5s ease-in-out infinite; }
[data-mood="cry"] .bot__bulb { animation: none; opacity: .3; }
[data-mood="cry"] .bot__arm--l { transform: rotate(35deg) translateY(-6px); } [data-mood="cry"] .bot__arm--r { transform: rotate(-35deg) translateY(-6px); }
@keyframes tear { from { transform: translateY(0); opacity: 1; } to { transform: translateY(46px) scaleY(1.3); opacity: 0; } }
@keyframes sob { 30% { transform: translateY(2px) scaleY(.97); } 60% { transform: translateY(-1px); } }

.botctl { display: inline-flex; align-items: center; gap: .45rem; font: inherit; font-weight: 700; color: #fff; background: rgba(255, 255, 255, .1); border: 1px solid var(--lab-line); border-radius: 999px; padding: .45rem 1rem; min-height: 44px; cursor: pointer; }
.botctl:hover { background: rgba(255, 255, 255, .18); }
.botctl[hidden] { display: none; }
.lab__tools { display: flex; gap: .5rem; flex-wrap: wrap; }
.listen[hidden] { display: none; }
.mic-status--lab { margin: -.4rem 0 .8rem; min-height: 1.2em; color: #c7d2fe; text-align: right; }
.mic-status--bad { display: block; width: fit-content; margin-left: auto; padding: .55rem .9rem; border-radius: 12px; text-align: left;
  background: #fde68a; color: #1e1b4b; font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .bot__svg, .bot__svg *, .bot__bubble { animation: none !important; } }
@media print { .bot { display: none !important; } }

/* poke ARIA */
.bot__svg { pointer-events: auto; cursor: pointer; }
.bot__xeyes { display: none; }
.bot__xeyes path { stroke: #5eead4; stroke-width: 4; stroke-linecap: round; }
[data-mood="hurt"] .m-hurt { display: inline; }
[data-mood="hurt"] .bot__eyes { display: none; }
[data-mood="hurt"] .bot__xeyes { display: inline; }
[data-mood="hurt"] .bot__head { animation: squash .35s ease-out 1; }
@keyframes squash { 30% { transform: scale(1.12, .86); } 60% { transform: scale(.95, 1.06); } }
@keyframes zap { 50% { opacity: .3; transform: translateX(2px); } }

/* the screen switches off like an old TV (squeezes to a line, then a dot), stays dark, flickers and comes back */
.power .lab__top, .power .lab__main, .power .colophon { animation: tvoff 1.9s ease-in-out forwards; transform-origin: 50% 40vh; }
@keyframes tvoff {
  0% { transform: none; } 22% { transform: scale(1, .004); filter: brightness(1.6); } 34% { transform: scale(0, .004); }
  70% { transform: scale(0, .004); } 80% { transform: scale(1, .004); } 88% { transform: scale(1, .4); opacity: .5; } 100% { transform: none; opacity: 1; } }
.blackout { position: fixed; inset: 0; z-index: 35; pointer-events: none; background: #000; animation: blackout 1.9s ease-in-out forwards; }
.blackout::after { content: ""; position: absolute; left: 50%; top: 40%; width: 10px; height: 10px; margin: -5px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 22px 8px rgba(255, 255, 255, .7); opacity: 0; animation: dot 1.9s ease-out forwards; }
@keyframes blackout { 0% { opacity: 0; } 18% { opacity: 1; } 76% { opacity: 1; } 82% { opacity: .85; } 86% { opacity: 1; } 100% { opacity: 0; } }
@keyframes dot { 30% { opacity: 0; } 36% { opacity: 1; } 62% { opacity: .2; transform: scale(.4); } 70% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .quake, .power *, .blackout { animation: none !important; } .blackout { display: none; } }
.power .bot { z-index: 50; }   /* ARIA keeps glowing in the dark */

/* ARIA points at an option to confuse you */
.opt--aria { border-color: #facc15; box-shadow: 0 0 0 1px #facc15, 0 0 22px -6px #facc15; animation: wiggle .5s ease-in-out 2; }
.opt__aria { margin-left: auto; padding: .1rem .55rem; border-radius: 999px; background: #facc15; color: #1e1b4b; font-size: .78rem; font-weight: 800; white-space: nowrap; }
@keyframes wiggle { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
@media (prefers-reduced-motion: reduce) { .opt--aria { animation: none; } }
.btn--aria:not(:disabled) { border-color: #facc15; box-shadow: 0 0 0 1px #facc15, 0 0 22px -6px #facc15; animation: wiggle .5s ease-in-out 2; }
@media (prefers-reduced-motion: reduce) { .btn--aria { animation: none; } }

/* costumes: angel (halo, wings, soft light) when she tries to fool you, devil (horns, tail, red) when she is angry */
.bot__halo, .bot__wings, .bot__horns, .bot__tail { display: none; }
.bot--angel .bot__halo { display: inline; fill: none; stroke: #fde68a; stroke-width: 4; filter: drop-shadow(0 0 6px #fde68a); animation: halo 2s ease-in-out infinite; }
.bot--angel .bot__wings { display: inline; fill: #f8fafc; stroke: #cbd5e1; stroke-width: 1.5; animation: flap .5s ease-in-out infinite; }
.bot--angel .bot__face { fill: #a5f3fc; } .bot--angel .bot__body { fill: #e0f2fe; } .bot--angel .bot__arm { stroke: #a5f3fc; }
.bot--angel .bot__eye { fill: #fff; } .bot--angel .bot__cheek { opacity: .8; fill: #f9a8d4; }
.bot--angel .bot__svg, .bot--angel { filter: drop-shadow(0 0 18px rgba(255, 255, 255, .7)); }
@keyframes halo { 50% { transform: translateY(-3px); } }
@keyframes flap { 50% { transform: scaleY(.8) rotate(-4deg); } }
.bot--devil .bot__horns { display: inline; fill: #7f1d1d; stroke: #450a0a; stroke-width: 2; stroke-linejoin: round; }
.bot--devil .bot__tail { display: inline; fill: #b91c1c; animation: tail .4s ease-in-out infinite; transform-origin: 0 50%; }
.bot--devil .bot__face { fill: #dc2626; } .bot--devil .bot__body { fill: #991b1b; } .bot--devil .bot__arm { stroke: #b91c1c; }
.bot--devil .bot__eye { fill: #fde047; } .bot--devil .bot__antenna { stroke: #fca5a5; } .bot--devil .bot__bulb { fill: #ef4444; }
.bot--devil .bot__svg, .bot--devil { filter: drop-shadow(0 0 16px rgba(239, 68, 68, .8)); }
@keyframes tail { 50% { transform: rotate(12deg); } }
@media (prefers-reduced-motion: reduce) { .bot__halo, .bot__wings, .bot__tail { animation: none !important; } }
.bot { transition: opacity .25s; }
.bot--hop { opacity: 0; }

/* anger that grows during the game: bigger and shaking (furious), then even bigger with a red glow and a rumbling page (rage) */
.bot--furious .bot__svg { animation: fury .14s linear infinite; transform: scale(1.3); filter: drop-shadow(0 0 18px rgba(239, 68, 68, .8)); }
.bot--rage .bot__svg { animation: fury .1s linear infinite; transform: scale(1.6); filter: drop-shadow(0 0 30px #ef4444) drop-shadow(0 0 60px #f97316); }
@keyframes fury { 25% { translate: -2px 1px; } 75% { translate: 2px -1px; } }
.rumble { animation: rumble .9s linear; }
@keyframes rumble { 20%, 60% { transform: translate(-3px, 1px); } 40%, 80% { transform: translate(3px, -1px); } 100% { transform: none; } }
@media (prefers-reduced-motion: reduce) { .bot--furious .bot__svg, .bot--rage .bot__svg, .rumble { animation: none !important; } }

/* the next question comes by itself */
.auto--paused .auto__bar { display: none; }
.auto { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; margin: .9rem 0 0; font-size: .85rem; color: #c7d2fe; }
.auto__bar { position: relative; flex: 0 0 140px; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.auto__bar span { position: absolute; inset: 0; width: 0; background: var(--sun); border-radius: 6px; }
.auto--run .auto__bar span { animation: autobar linear forwards; }
@keyframes autobar { to { width: 100%; } }

/* pressure tricks: knocking on the glass, sleeping */
.bot--knock .bot__svg { animation: knock .33s ease-in-out 3; transform: scale(2); filter: drop-shadow(0 20px 30px rgba(0, 0, 0, .6)); }
@keyframes knock { 0%, 100% { transform: scale(2); } 40% { transform: scale(2.15) translateY(-2px); } }
.bot--knock::after { content: ""; position: absolute; left: 50%; top: 55%; width: 40px; height: 40px; margin: -20px; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .6); animation: ripple .33s ease-out 3; pointer-events: none; }
@keyframes ripple { from { transform: scale(.3); opacity: 1; } to { transform: scale(2.6); opacity: 0; } }
.bot__zz { display: none; position: absolute; right: -6px; top: -10px; font-weight: 800; color: #c7d2fe; }
.bot__zz span { position: absolute; animation: zz 2.4s ease-in infinite; opacity: 0; }
.bot__zz span:nth-child(2) { animation-delay: .8s; font-size: .85em; } .bot__zz span:nth-child(3) { animation-delay: 1.6s; font-size: .7em; }
@keyframes zz { 0% { transform: translate(0, 0); opacity: 0; } 20% { opacity: 1; } 100% { transform: translate(18px, -40px); opacity: 0; } }
.bot--sleep .bot__zz { display: block; }
.bot--sleep .bot__eyes { display: none; } .bot--sleep .bot__shut { display: inline; }
.bot--sleep .bot__bulb { animation: none; opacity: .2; }
@media (prefers-reduced-motion: reduce) { .bot--knock .bot__svg, .bot--knock::after, .bot__zz span { animation: none !important; } }
.bot__bubble { z-index: 2; }
.bot--knock .bot__bubble { bottom: calc(100% + 70px); }
.bot--rage .bot__bubble, .bot--furious .bot__bubble { bottom: calc(100% + 40px); }   /* above her bigger angry face */   /* above her big face while she knocks */
.bot__zz { font-size: 1.4rem; z-index: 2; }

/* inferno: a giant devil ARIA, fireballs, burning screen (soft flicker, no flashes) */
.bot--giant { z-index: 45; }
.bot--giant .bot__svg { animation: giant .5s ease-out forwards, fume .1s linear .5s 30; }
@keyframes giant { to { transform: scale(3.2) translate(-20%, 10%); } }
.bot--inferno .bot__face { fill: #7f1d1d; } .bot--inferno .bot__eye { fill: #fb923c; }
.bot--inferno, .bot--inferno .bot__svg { filter: drop-shadow(0 0 30px #f97316) drop-shadow(0 0 60px #dc2626); }
.hell { position: fixed; inset: 0; z-index: 42; pointer-events: none; overflow: hidden;
  background: radial-gradient(ellipse at 50% 120%, rgba(220, 38, 38, .55), rgba(124, 45, 18, .35) 45%, rgba(20, 0, 0, .55)); animation: burn 3.3s ease-in forwards; }
@keyframes burn { 0% { opacity: 0; } 15% { opacity: 1; } 40% { opacity: .85; } 60% { opacity: 1; } 80% { opacity: .9; } 100% { opacity: 1; } }
.hell__flames { position: absolute; left: -10%; right: -10%; bottom: -20px; height: 55vh;
  background: radial-gradient(40px 120px at 10% 100%, #fde047, transparent 70%), radial-gradient(60px 180px at 25% 100%, #fb923c, transparent 70%),
    radial-gradient(50px 150px at 40% 100%, #f97316, transparent 70%), radial-gradient(70px 210px at 55% 100%, #fde047, transparent 70%),
    radial-gradient(55px 170px at 70% 100%, #ef4444, transparent 70%), radial-gradient(65px 190px at 85% 100%, #fb923c, transparent 70%),
    linear-gradient(to top, rgba(234, 88, 12, .9), rgba(220, 38, 38, .4) 40%, transparent);
  filter: blur(6px); transform-origin: bottom; animation: flames .35s ease-in-out infinite alternate, rise 3.3s ease-out forwards; }
@keyframes flames { to { transform: scaleY(1.12) skewX(3deg); } }
@keyframes rise { from { height: 0; } to { height: 75vh; } }
.fireball { position: absolute; width: 46px; height: 46px; margin: -23px; border-radius: 50%; opacity: 0;
  background: radial-gradient(circle at 40% 40%, #fff7ae, #fde047 25%, #f97316 55%, rgba(220, 38, 38, .6) 75%, transparent 76%);
  box-shadow: 0 0 30px 12px rgba(249, 115, 22, .7); animation: throw 1s ease-in forwards; }
@keyframes throw { 0% { opacity: 1; transform: translate(0, 0) scale(.4); } 85% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--tx), var(--ty)) scale(2.4); } }
.burning .lab__top, .burning .lab__main, .burning .colophon { filter: sepia(.6) saturate(2.5) hue-rotate(-20deg) brightness(.8); transition: filter .6s; }
@media (prefers-reduced-motion: reduce) { .hell, .bot--giant .bot__svg { animation: none !important; } .hell { display: none; } }
.bot__ears, .bot__sparks { display: none; }
.quake { animation: quake 2.7s linear; }
@keyframes quake {
  5%, 25%, 45%, 65% { transform: translate(-9px, 4px) rotate(-.6deg); } 15%, 35%, 55%, 75% { transform: translate(9px, -4px) rotate(.6deg); }
  85% { transform: translate(-4px, 2px); } 95% { transform: translate(2px, -1px); } 100% { transform: none; } }
@media (prefers-reduced-motion: reduce) { .quake { animation: none !important; } }

/* bedtime: she gets into her bed – only her head (with the night cap) on the pillow, the rest under the sheet –
   and the lights go out until the player moves */
.bot__bed { display: none; position: absolute; pointer-events: none; left: -62px; top: 46px; width: 236px; z-index: -1; }
.bot--bed .bot__bed { display: block; animation: in .6s ease-out; }
.bot__bed svg { display: block; overflow: visible; }
.bot--corner .bot__bed { left: -80px; top: 26px; width: 160px; }   /* phones: a smaller bed that stays on the screen */
.bot--corner .bot__switch { right: -14px; top: 4px; }
.bed__wood { fill: #7c2d12; } .bed__mattress { fill: #e0e7ff; } .bed__pillow { fill: #fff; stroke: #c7d2fe; stroke-width: 1.5; }
.bed__blanket { fill: #6366f1; stroke: #4338ca; stroke-width: 2; } .bed__sheet { fill: #f8fafc; stroke: #c7d2fe; stroke-width: 1.5; }
.bed__stitch { fill: none; stroke: #c7d2fe; stroke-width: 2; stroke-dasharray: 4 4; }
.bed__eyes { fill: none; stroke: #5eead4; stroke-width: 3; stroke-linecap: round; } .bed__mouth { fill: none; stroke: #5eead4; stroke-width: 1.8; }
.bed__head { opacity: 0; transition: opacity .5s .35s; }
.bed__cover { transform-box: fill-box; transform-origin: 100% 100%; transition: transform .7s ease-in-out; }
.bot--lift .bed__cover { transform: rotate(16deg); }          /* she lifts the sheet… */
.bot--sleep .bot__bed { z-index: 1; }
.bot--sleep .bed__head { opacity: 1; }
.bot--sleep .bed__cover { animation: breathe 3.2s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes breathe { 50% { transform: scaleY(1.05); } }
/* …and the standing robot slips into the bed: she is not seen any more, only her head on the pillow */
.bot__svg { transition: opacity .5s, transform .6s; }
.bot--sleep .bot__svg { animation: none; opacity: 0; transform: translate(-10px, 40px) rotate(-70deg) scale(.6); }
.bed__arm { fill: none; stroke: #1d4ed8; stroke-width: 7; stroke-linecap: round; } .bed__hand { fill: #5eead4; }
.bed__arm, .bed__hand { opacity: 0; }
.bot--switch .bed__arm, .bot--switch .bed__hand { animation: reach 1.4s ease-in-out; }
@keyframes reach { 0%, 100% { opacity: 0; } 20%, 70% { opacity: 1; } }
.night { position: fixed; inset: 0; z-index: 19; pointer-events: none; background: rgba(3, 3, 12, .94); animation: dark .5s ease-out; transition: opacity .5s; }
.night::after { content: "Move the mouse or press a key to switch the light on"; position: absolute; left: 50%; bottom: 2rem; transform: translateX(-50%);
  color: #6b7280; font-size: .85rem; white-space: nowrap; }
.night--off { opacity: 0; }
@keyframes dark { from { opacity: 0; } }
.bot--sleep { z-index: 25; }
@media (prefers-reduced-motion: reduce) { .night, .bot--bed .bot__bed, .bot--sleep .bed__cover { animation: none; } }

/* pyjamas, lifting the sheet, the light switch */
.bot__pj { display: none; }
.bot--pj .bot__pj { display: inline; animation: in .4s ease-out; }
.pj__stripes { stroke: #93c5fd; stroke-width: 3; } .pj__cap { fill: #3b82f6; stroke: #1e3a8a; stroke-width: 2; } .pj__pom { fill: #fff; }
.bot--pj .bot__body { fill: #1d4ed8; } .bot--pj .bot__arm { stroke: #1d4ed8; }
.bot__switch { display: none; position: absolute; right: -40px; top: 18px; width: 20px; height: 30px; border-radius: 4px; background: #e5e7eb;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .5); pointer-events: none; }
.bot__switch span { position: absolute; left: 6px; top: 5px; width: 8px; height: 10px; border-radius: 2px; background: #9ca3af; transition: top .15s; }
.bot--bed .bot__switch { display: block; animation: in .5s ease-out; }
.bot--switch .bot__switch span { top: 15px; }
.bot--edge .bot__bubble { left: auto; right: 0; transform: none; animation: none; }
.bot--edge .bot__bubble::after { left: auto; right: 24px; }
.bot__hit { fill: transparent; pointer-events: all; }   /* the whole robot can be clicked, not only its painted parts */
.feedback.checking { background: rgba(255, 255, 255, .06); border: 1px dashed var(--lab-line); }
.checking .dots { display: inline-block; animation: dots 1s steps(4) infinite; overflow: hidden; vertical-align: bottom; width: 1.2em; }
@keyframes dots { from { width: 0; } }
.bot--knock .bot__svg, .bot--giant .bot__svg, .bot--sleep .bot__svg { pointer-events: none; }   /* while big or asleep she never catches clicks meant for the game */

/* the end: she breaks down (a slow glitch, under 3 changes a second), the screen goes off, and ARIA v2 boots – calm and honest */
.bot--glitch .bot__svg { animation: glitch .8s steps(2) infinite; }
@keyframes glitch { 0% { filter: hue-rotate(80deg) saturate(2); translate: -3px 0; opacity: .7; } 100% { filter: none; translate: 3px 0; opacity: 1; } }
.bot--off { opacity: 0; }
.reboot { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: #000; color: #5eead4;
  font: 600 1.1rem/1.4 ui-monospace, Menlo, monospace; pointer-events: none; transition: opacity .6s; }
.reboot .dots { display: inline-block; animation: dots 1s steps(4) infinite; overflow: hidden; vertical-align: bottom; width: 1.2em; }
.reboot--off { opacity: 0; }
.bot--v2 .bot__face { fill: #e0f2fe; } .bot--v2 .bot__screen { fill: #0c4a6e; } .bot--v2 .bot__body { fill: #bae6fd; }
.bot--v2 .bot__arm { stroke: #bae6fd; } .bot--v2 .bot__eye { fill: #7dd3fc; } .bot--v2 .bot__mouth, .bot--v2 .bot__shut path { stroke: #7dd3fc; }
.bot--v2 { filter: drop-shadow(0 0 16px rgba(125, 211, 252, .7)); }
@media (prefers-reduced-motion: reduce) { .bot--glitch .bot__svg, .reboot .dots { animation: none !important; } }

/* ---------- ARIA's big tantrums (4th poke): a different one each time. No flashing, nothing takes clicks, all off with reduced motion ---------- */
.fx { position: fixed; inset: 0; z-index: 40; pointer-events: none; overflow: hidden; }
.bot--fx { z-index: 46; }
.lab__top, .lab__main, .colophon { transition: transform .6s ease-in-out, filter .6s; }
/* upside down */
.fx-flip .lab__top, .fx-flip .lab__main, .fx-flip .colophon { transform: rotate(180deg); }
/* black hole: the page is sucked into a spinning hole, then spat out */
.fx-hole span { position: absolute; left: 50%; top: 50%; width: 60vmin; height: 60vmin; margin: -30vmin; border-radius: 50%;
  background: radial-gradient(circle, #000 18%, rgba(30, 10, 60, .95) 32%, rgba(124, 58, 237, .45) 52%, transparent 70%),
    conic-gradient(from 0deg, transparent, rgba(167, 139, 250, .5), transparent 30%, rgba(94, 234, 212, .4), transparent 60%);
  animation: holeIn .8s ease-out both, spin 1.2s linear infinite; }
.fx-hole--out span { animation: holeOut .8s ease-in both, spin 1.2s linear infinite; }
@keyframes holeIn { from { transform: scale(0); opacity: 0; } } @keyframes holeOut { to { transform: scale(0); opacity: 0; } }
@keyframes spin { to { rotate: 360deg; } }
.fx-suck .lab__top, .fx-suck .lab__main, .fx-suck .colophon { transform-origin: 50% 50vh; animation: suck 1.8s ease-in forwards; }
.fx-spit .lab__top, .fx-spit .lab__main, .fx-spit .colophon { transform-origin: 50% 50vh; animation: suck .9s ease-out reverse both; }
@keyframes suck { to { transform: scale(.03) rotate(720deg); opacity: .1; } }
/* frozen */
.fx-ice { background: radial-gradient(ellipse at center, transparent 45%, rgba(186, 230, 253, .55) 75%, rgba(240, 249, 255, .9)); backdrop-filter: blur(1.5px);
  animation: in .8s ease-out; transition: opacity 1.2s, transform 1.2s; }
.fx-ice span { position: absolute; color: #e0f2fe; text-shadow: 0 0 8px #7dd3fc; animation: in 1s ease-out both; }
.fx-ice--melt { opacity: 0; transform: translateY(40px); }
.fx-frozen .lab__top, .fx-frozen .lab__main, .fx-frozen .colophon { filter: saturate(.3) hue-rotate(170deg) brightness(1.15); }
/* fake hack */
.fx-hack { background: rgba(0, 12, 4, .93); font: 700 1rem/1.1 ui-monospace, monospace; color: #22c55e; }
.fx-hack > span { position: absolute; top: -100%; text-align: center; width: 2ch; opacity: .75; animation: rain 2s linear infinite; }
@keyframes rain { to { transform: translateY(200vh); } }
.fx-hack__box { position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%); margin: 0; padding: 1.2rem 1.6rem; text-align: center;
  background: #000; border: 2px solid #22c55e; border-radius: 10px; font-size: 1.4rem; box-shadow: 0 0 30px rgba(34, 197, 94, .5); }
/* fake blue screen */
.fx-bsod { z-index: 47; background: #1d4ed8; color: #fff; display: grid; place-items: center; font: 400 clamp(1rem, 2.4vw, 1.5rem)/1.5 system-ui, sans-serif; animation: in .2s; }
.fx-bsod div { max-width: 40rem; padding: 2rem; } .fx-bsod p { margin: 0 0 1rem; }
.fx-bsod__sad { font-size: 6rem; line-height: 1; } .fx-bsod__small { font-size: .9rem; opacity: .85; }
/* deepfake of the page */
.fx-faked { color: #f472b6 !important; animation: fakeJit .25s steps(2) infinite; }
@keyframes fakeJit { 50% { transform: translateX(1px); text-shadow: -2px 0 rgba(94, 234, 212, .6), 2px 0 rgba(244, 114, 182, .6); } }
/* fake prize */
.fx-prize { z-index: 47; display: grid; place-items: center; background: rgba(0, 0, 0, .45); }
.fx-prize__card { max-width: 24rem; margin: 1rem; padding: 1.5rem; text-align: center; background: linear-gradient(#fef9c3, #fde047); color: #1e1b4b;
  border-radius: 16px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); animation: prizeIn .5s cubic-bezier(.3, 1.6, .5, 1); }
.fx-prize__big { font-size: 1.6rem; font-weight: 800; margin: 0 0 .5rem; }
.fx-prize__btn { display: inline-block; margin: .6rem 0 0; padding: .6rem 1.2rem; background: #16a34a; color: #fff; font-weight: 800; border-radius: 999px; animation: pulse .8s ease-in-out infinite alternate; }
.fx-prize__card--caught { background: #fff; border: 4px solid #dc2626; }
@keyframes prizeIn { from { transform: scale(.3) rotate(-8deg); opacity: 0; } } @keyframes pulse { to { transform: scale(1.08); } }
/* clones */
.fx-clones span { position: absolute; width: 70px; margin: -45px -35px; animation: cloneOut .7s cubic-bezier(.2, 1.4, .5, 1) both; }
.fx-clones span .bot__svg { width: 70px; animation: float 1.2s ease-in-out infinite; }
@keyframes cloneOut { from { transform: translate(0, 0) scale(.2); } to { transform: translate(var(--tx), var(--ty)) scale(1); } }
.fx-clones span { transform: translate(var(--tx), var(--ty)); }
.fx-clones--pop span { animation: clonePop .4s ease-in forwards; }
@keyframes clonePop { from { transform: translate(var(--tx), var(--ty)) scale(1); } 40% { transform: translate(var(--tx), var(--ty)) scale(1.3); } to { transform: translate(var(--tx), var(--ty)) scale(0); opacity: 0; } }
/* balloon: she blows up and pops */
.fx-balloon { z-index: 46; }
.bot--huge.fx-balloon .bot__svg { animation: inflate 2.3s ease-in forwards; }
@keyframes inflate { 0% { transform: scale(var(--huge, 3)); } 30% { transform: scale(calc(var(--huge, 3) * 1.3), calc(var(--huge, 3) * 1.2)); } 45% { transform: scale(calc(var(--huge, 3) * 1.2), calc(var(--huge, 3) * 1.45)); } 65% { transform: scale(calc(var(--huge, 3) * 1.4), calc(var(--huge, 3) * 1.3)); } 80% { transform: scale(calc(var(--huge, 3) * 1.35), calc(var(--huge, 3) * 1.5)); } 100% { transform: scale(calc(var(--huge, 3) * 1.6)); filter: drop-shadow(0 0 30px #f472b6); } }
.fx-popped .bot__svg { visibility: hidden; animation: none; }
.fx-regrow .bot__svg { animation: regrow .7s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes regrow { from { transform: scale(.1); } }
.fx-bits span { position: absolute; width: 14px; height: 9px; background: var(--c); border-radius: 2px; animation: bits 1.2s ease-out forwards; }
@keyframes bits { to { transform: translate(var(--tx), var(--ty)) rotate(720deg); opacity: 0; } }
/* thunder storm (three strikes, never more than 3 a second, and only a thin bolt – no bright screen) */
.fx-storm { background: rgba(2, 6, 23, .45); animation: in .5s; }
.fx-storm__cloud { position: absolute; font-size: 7rem; line-height: 1; transform: translate(-50%, -50%); filter: grayscale(1) brightness(.55); animation: cloud 1.2s ease-in-out infinite alternate; }
@keyframes cloud { to { transform: translate(-46%, -50%); } }
.fx-storm path { fill: none; stroke: #fef08a; stroke-width: 5; stroke-linejoin: round; filter: drop-shadow(0 0 8px #facc15); opacity: 0; animation: strike .45s linear both; }
@keyframes strike { 0% { opacity: 0; } 10%, 70% { opacity: 1; } 100% { opacity: 0; } }
.fx-zapped .bot__svg { filter: grayscale(.6) brightness(.7) drop-shadow(0 0 12px #facc15); }
.fx-zapped .bot__sparks { display: inline; }
.fx-zapped::after { content: "💨"; position: absolute; top: -20px; right: 0; font-size: 2rem; animation: zz 1.4s ease-out infinite; }
/* chase: dizzy at the end */
.fx-dizzy .bot__svg { animation: dizzy .9s ease-in-out; }
@keyframes dizzy { 50% { transform: rotate(200deg) scale(.8); } to { transform: rotate(360deg); } }
/* earthquake: everything falls to the bottom of the screen, then flies back */
.fx-quaking { overflow: hidden; }
.fx-falls { transition: transform 1s cubic-bezier(.5, 0, .9, .4) var(--d, 0s); }
.fx-fallen .fx-falls { transform: translateY(110vh) rotate(var(--r)); }
.fx-quaking:not(.fx-fallen) .fx-falls { transition: transform .9s cubic-bezier(.2, 1.3, .5, 1) var(--d, 0s); }
/* lights off: only a torch around the mouse pointer */
.fx-torch { z-index: 40; background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), transparent 0, transparent 80px, rgba(3, 3, 12, .97) 150px); animation: in .3s; }
/* smashed glass: she punches the screen three times and it cracks */
.fx-crack { z-index: 41; }
.fx-crack path, .fx-crack__ring { fill: none; stroke: rgba(255, 255, 255, .9); stroke-width: 2; filter: drop-shadow(0 0 1px #000) drop-shadow(0 0 3px rgba(0, 0, 0, .7)); }
.fx-crack path { stroke-dasharray: 600; stroke-dashoffset: 600; animation: crack .25s ease-out forwards; }
.fx-crack__ring { stroke-width: 1.4; opacity: .8; fill: rgba(255, 255, 255, .05); animation: in .2s .1s both; }
.fx-crack__hole { fill: rgba(255, 255, 255, .25); stroke: #fff; stroke-width: 2; }
@keyframes crack { to { stroke-dashoffset: 0; } }
.fx-crack--heal { transition: opacity .9s; opacity: 0; }

.fx-jolt { animation: jolt .3s linear; }
@keyframes jolt { 25% { transform: translate(-6px, 3px); } 50% { transform: translate(5px, -3px); } 75% { transform: translate(-2px, 1px); } }
@media (prefers-reduced-motion: reduce) { .fx, .fx * { animation: none !important; transition: none !important; } .fx { display: none; } }

/* in every tantrum her anger fills the screen: she is huge and shaking in the middle, and a red glow beats slowly all around (no flashing) */
.bot--huge .bot__svg { animation: hugeIn .45s cubic-bezier(.3, 1.5, .5, 1) both, hugeShake .14s linear .45s infinite alternate; }
@keyframes hugeIn { from { transform: scale(1); } to { transform: scale(var(--huge, 3)); } }
@keyframes hugeShake { from { transform: scale(var(--huge, 3)) rotate(-2deg); } to { transform: scale(calc(var(--huge, 3) * 1.03)) rotate(2deg); } }
.bot--huge .bot__svg { filter: drop-shadow(0 0 25px rgba(239, 68, 68, .9)) drop-shadow(0 0 60px rgba(220, 38, 38, .6)); }
.bot--huge .bot__bubble { bottom: calc(100% + (var(--huge, 3) - 1) * 75px + 6px); font-size: 1.15rem; max-width: 18rem; width: max-content; left: 50%; right: auto; transform: translateX(-50%); animation: none; }
.bot--huge.fx-punch .bot__svg { animation: punchHuge .35s ease-out; }
@keyframes punchHuge { 0% { transform: scale(var(--huge, 3)); } 40% { transform: scale(calc(var(--huge, 3) * 1.4)) rotate(-6deg); } 100% { transform: scale(var(--huge, 3)); } }
.fx-rage { z-index: 39; background: radial-gradient(ellipse at center, transparent 35%, rgba(220, 38, 38, .35) 70%, rgba(127, 29, 29, .75));
  box-shadow: inset 0 0 120px 30px rgba(220, 38, 38, .55); animation: rageBeat 1s ease-in-out infinite alternate; }
@keyframes rageBeat { from { opacity: .65; } to { opacity: 1; } }
/* the runaway mouse pointer */
.fx-nocursor, .fx-nocursor * { cursor: none !important; }
.fx-mouse { z-index: 48; }
.fx-mouse__ptr { position: absolute; left: 0; top: 0; margin: -3px 0 0 -3px; transform-origin: 3px 3px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .6)); }
.fx-mouse__ptr path { fill: #fff; stroke: #000; stroke-width: 1.5; stroke-linejoin: round; }
.fx-mouse__ptr--eaten svg { animation: eaten .4s ease-in forwards; }
@keyframes eaten { to { transform: scale(0) rotate(540deg); opacity: 0; } }
.fx-mouse i { position: absolute; width: 6px; height: 6px; margin: -3px; border-radius: 50%; background: rgba(255, 255, 255, .7); animation: dot .7s ease-out forwards; }
@keyframes dot { to { transform: scale(.2); opacity: 0; } }

/* game over: a swarm of ARIAs eats the page */
.gameover { position: fixed; inset: 0; z-index: 70; overflow: hidden; cursor: pointer; }
.gameover__bites b { position: absolute; border-radius: 50%; transform: translate(-50%, -50%) scale(0); background: #000;
  box-shadow: 0 0 0 6px #000, 14px 10px 0 2px #000, -12px 14px 0 2px #000, 10px -14px 0 1px #000; animation: bite .18s ease-out forwards; }
@keyframes bite { to { transform: translate(-50%, -50%) scale(1); } }
.gameover--gone { background: #000; transition: background .5s; }
.gameover__eater { position: absolute; left: 0; top: 0; width: 70px; transition-property: transform; transition-timing-function: ease-in-out; }
.gameover__eater .bot__svg { width: 70px; animation: chomp .19s steps(2) infinite; filter: drop-shadow(0 0 10px rgba(239, 68, 68, .8)); }
@keyframes chomp { 50% { transform: scaleY(.85) scaleX(1.08); } }
.gameover__text { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; color: #fff; gap: .4rem; padding: 1rem; }
.gameover__text p { margin: 0; }
.gameover__big { font: 800 clamp(3rem, 12vw, 8rem)/1 var(--mono, monospace); color: #ef4444; letter-spacing: .05em; text-shadow: 0 0 30px rgba(239, 68, 68, .7); animation: goIn .6s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes goIn { from { transform: scale(3); opacity: 0; } }
.gameover__btn { justify-self: center; margin-top: 1.2rem !important; padding: .8rem 2rem; border-radius: 999px; background: var(--sun, #fbbf24); color: #1e1b4b; font-weight: 800; font-size: 1.2rem; }
.gameover__small { opacity: .7; font-size: .9rem; }
.gameover--out { opacity: 0; transition: opacity .6s; }
/* the boss before the game over: above the black page, pointing at the page while she gives the order */
.bot--boss { z-index: 72; }
.bot--order .bot__arm--r { transform-box: fill-box; transform-origin: 0 0; animation: order .5s ease-in-out 3 alternate; }
@keyframes order { to { transform: rotate(-70deg); } }
/* after the page is eaten: hundreds of little ARIAs laugh at you */
.gameover { cursor: default; }
.gameover--end { cursor: pointer; }
.gameover__horde span { position: absolute; display: block; animation: hordeIn .4s cubic-bezier(.3, 1.6, .5, 1) both, hordeLaugh .32s ease-in-out infinite alternate; }
.gameover__horde .bot__svg { width: 100%; filter: drop-shadow(0 0 6px rgba(239, 68, 68, .8)); }
.gameover__horde em { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); white-space: nowrap; font: 800 .8rem/1.2 system-ui, sans-serif; font-style: normal;
  color: #1e1b4b; background: #fff; padding: .15rem .45rem; border-radius: 8px; }
@keyframes hordeIn { from { transform: scale(0); } }
@keyframes hordeLaugh { from { translate: 0 0; rotate: -8deg; } to { translate: 0 -6px; rotate: 8deg; } }
.gameover__horde--out { transition: opacity .6s; opacity: 0; }
/* "Answer by voice" inside a question, the feedback and ARIA's chat */
.mic--inline { display: inline-flex; align-items: center; gap: .4rem; }
.mic--inline[hidden] { display: none; }
.q .mic--inline { margin: .8rem 0 0; }
.msg .mic--inline { margin: .5rem 0 0; }

/* Stitch mockups restyle: neon teal primary buttons (the catalogue keeps its amber ones) */
.lab .btn--sun { background: var(--neon); color: var(--lab); border-color: var(--neon); }
.lab .btn--sun:hover { filter: brightness(.92); }

/* question screen: a room-info sidebar next to the question (decoration only – the real announcements are unchanged) */
.qaside { margin-top: 1.4rem; padding: 1rem 1.2rem; border-radius: 14px; background: var(--lab-2); border: 1px solid var(--lab-line); }
.qaside p { margin: 0 0 .5rem; }
.qaside p:last-child { margin-bottom: 0; }
.qaside__room { font-weight: 800; color: #fff; }
.qaside__topic { font-size: .88rem; color: var(--lab-muted); }
.qaside__hearts { font-size: 1.35rem; letter-spacing: .2em; color: #f87171; }
.qaside__rule { font-size: .85rem; color: var(--lab-muted); }
@media (min-width: 700px) {
  .qlayout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 1.4rem; align-items: start; }
  .qaside { margin-top: 0; }
}

/* room result (after 8 questions, or 3 wrong): a card with a teal (passed) or red (failed) top border */
.room-result { margin: 1rem 0; padding: 1.1rem 1.3rem; border-radius: 16px; background: var(--lab-2); border: 1px solid var(--lab-line); }
.room-result--ok { border-top: 4px solid var(--neon); }
.room-result--no { border-top: 4px solid #f87171; }
.room-result .score { margin-top: 0; }
.room-result .tricks { margin-bottom: 0; }
.room-result .evcard--new:last-child { margin-bottom: 0; }
.room-result .lab__lede:last-child { margin-bottom: 0; }
/* wide screens: the five rooms in one row, as in the Stitch map */
@media (min-width: 1000px) { .doors { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

/* welcome screen: the keys as small chips for sighted players (the full instructions are read aloud) */
.lab__keys { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 1.1rem; margin: .6rem 0 1rem; color: var(--lab-muted); font-size: .95rem; }
.lab__keys kbd { display: inline-block; min-width: 1.9em; padding: .1rem .45rem; margin-right: .35rem; border: 1px solid var(--lab-line); border-bottom-width: 2px; border-radius: 6px; background: var(--lab-2); color: var(--lab-ink); font: 700 .85rem var(--mono, ui-monospace, monospace); text-align: center; }
