/* =========================================================
   /humanmind — classroom session.
   Visual language taken from the presentation slides: flat blues,
   sharp-cornered white cards with hairline black borders, cream
   callouts, glowing yellow emphasis, and the punch-hole strip.
   Type stays the portfolio's: Archivo display + Hanken Grotesk body.
   ========================================================= */

:root {
  /* slide palette */
  --blue:        #6E9BD6;   /* main field */
  --blue-light:  #A9C8EC;   /* upper panels */
  --blue-pale:   #C8DCF4;
  --blue-band:   #2B5CB8;   /* header band */
  --navy:        #153A9E;   /* deep blocks */
  --navy-ink:    #0E2A73;
  --yellow:      #F5CE5B;
  --yellow-deep: #E0A81C;
  --cream:       #F7E9AE;
  --purple:      #8B6DC7;
  --orange:      #E8752A;

  --ink:    #0A0A0C;
  --ink-2:  #22252B;
  --muted:  #46536B;
  --white:  #FFFFFF;
  --hair:   #0A0A0C;        /* the hairline round every card */

  --good: #1F8A4C;
  --bad:  #D8332F;

  --display: "Archivo", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --body: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--blue);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.05rem;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
::selection { background: var(--navy); color: #fff; }

/* ---------- the punch-hole strip ---------- */
.holes {
  background: var(--blue-band);
  border-bottom: 2px solid var(--ink);
  padding: 14px clamp(1rem, 3vw, 2.4rem);
  display: flex; gap: clamp(14px, 2.4vw, 34px); align-items: center;
  overflow: hidden; flex: none;
}
.holes i {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: #FFFDF4; border: 1.5px solid var(--ink);
}
.holes--thin { padding: 9px clamp(1rem, 3vw, 2.4rem); }
.holes--thin i { width: 20px; height: 20px; }

/* ---------- shell ---------- */
.page { min-height: 100%; display: flex; flex-direction: column; }
.body-wrap {
  flex: 1; width: 100%; max-width: 1180px; margin: 0 auto;
  padding: clamp(1.4rem, 3.5vw, 2.6rem) clamp(1rem, 3vw, 2.4rem) 3rem;
}
.body-wrap--wide { max-width: 1500px; }

/* ---------- type ---------- */
h1 {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(2rem, 5.2vw, 3.4rem); line-height: 1.02;
  letter-spacing: -.03em; margin: 0; color: var(--ink);
}
h1 .accent { color: var(--navy); }
h2 { font-family: var(--display); font-weight: 800; font-size: clamp(1.3rem, 2.6vw, 1.8rem); letter-spacing: -.02em; margin: 0; }
h3 { font-family: var(--display); font-weight: 800; font-size: 1.05rem; margin: 0; letter-spacing: -.01em; }
p { margin: .6rem 0 0; }
.lede { font-size: clamp(1.05rem, 1.7vw, 1.25rem); max-width: 62ch; }

.glow {
  font-family: var(--display); font-weight: 800; color: var(--yellow);
  text-shadow: 0 0 14px rgba(245,206,91,.85), 0 0 3px rgba(255,255,255,.5);
  letter-spacing: -.01em;
}

/* ---------- cards, the slide's core component ---------- */
.card {
  background: var(--white); border: 1.5px solid var(--hair);
  padding: clamp(.9rem, 2vw, 1.25rem) clamp(1rem, 2.2vw, 1.4rem);
  margin-top: 1rem;
}
.card > h3 + p, .card > h3 + ul { margin-top: .25rem; }
.card p { color: var(--ink-2); }
.callout {
  background: var(--cream); border: 1.5px solid var(--hair);
  padding: clamp(.9rem, 2vw, 1.2rem) clamp(1rem, 2.2vw, 1.4rem);
  margin-top: 1rem;
}
.callout p:first-child { margin-top: 0; }
.warn-note { background: #FFF3D6; border: 1.5px solid var(--yellow-deep); padding: .8rem 1rem; margin-top: 1rem; font-size: .95rem; }

.panel-navy { background: var(--navy); color: #fff; border: 1.5px solid var(--hair); padding: 1.2rem 1.4rem; }
.panel-navy h2, .panel-navy h3 { color: #fff; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--display); font-weight: 700; font-size: 1.02rem;
  padding: .78rem 1.5rem; border: 1.5px solid var(--hair); border-radius: 0;
  background: var(--navy); color: #fff; cursor: pointer; text-decoration: none;
  transition: transform .12s var(--ease), background .15s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: none; }
.btn:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.btn--lg { font-size: 1.2rem; padding: .95rem 2rem; }
.btn--xl { font-size: 1.5rem; padding: 1.1rem 2.4rem; }
.btn--white { background: var(--white); color: var(--ink); }
.btn--white:hover { background: var(--cream); }
.btn--yellow { background: var(--yellow); color: var(--ink); }
.btn--danger { background: var(--bad); color: #fff; }
.btnrow { display: flex; gap: .7rem; flex-wrap: wrap; margin-top: 1.3rem; align-items: center; }

/* ---------- inputs ---------- */
label.f { display: block; font-family: var(--display); font-weight: 700; font-size: .95rem; margin-bottom: .35rem; }
input[type="text"] {
  width: 100%; font-family: var(--body); font-size: 1.15rem; font-weight: 600;
  color: var(--ink); background: var(--white);
  border: 1.5px solid var(--hair); border-radius: 0; padding: .7rem .9rem;
}
input[type="text"]:focus { outline: 3px solid var(--yellow); outline-offset: 0; }
input.code-input {
  font-family: var(--mono); font-size: 2rem; font-weight: 600;
  letter-spacing: .3em; text-transform: uppercase; text-align: center;
}
.field-row { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 700px) { .field-row { grid-template-columns: 1fr; } }

/* ---------- room code ---------- */
.roomcode {
  font-family: var(--mono); font-weight: 600; letter-spacing: .22em;
  font-size: clamp(3rem, 12vw, 8rem); line-height: 1;
  background: var(--white); border: 1.5px solid var(--hair);
  padding: .3em .35em .25em; display: inline-block; color: var(--ink);
}

/* ---------- lobby ---------- */
.nick-grid { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1rem; }
.nick {
  font-family: var(--display); font-weight: 700; font-size: .95rem;
  background: var(--white); border: 1.5px solid var(--hair);
  padding: .3rem .7rem;
  animation: pop .3s var(--ease) both;
}
.nick.me { background: var(--yellow); }
.nick .ok { color: var(--good); margin-left: .3rem; }
@keyframes pop { from { transform: scale(.7); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- counters ---------- */
.counters { display: grid; gap: .8rem; grid-template-columns: repeat(4, 1fr); margin-top: 1rem; }
@media (max-width: 900px) { .counters { grid-template-columns: repeat(2, 1fr); } }
.counter { background: var(--white); border: 1.5px solid var(--hair); padding: .7rem .9rem; }
.counter .k { font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.counter .v { font-family: var(--mono); font-weight: 600; font-size: 1.9rem; line-height: 1.1; font-variant-numeric: tabular-nums; }

/* ---------- stats ---------- */
.stat-grid { display: grid; gap: .9rem; grid-template-columns: repeat(3, 1fr); margin-top: 1rem; }
@media (max-width: 820px) { .stat-grid { grid-template-columns: 1fr; } }
.stat { background: var(--white); border: 1.5px solid var(--hair); padding: .85rem 1rem; }
.stat .k { font-size: .8rem; font-weight: 700; color: var(--muted); }
.stat .v { font-family: var(--mono); font-weight: 600; font-size: 1.75rem; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat .v .u { font-size: .85rem; color: var(--muted); font-weight: 400; }
.stat .n { font-size: .82rem; color: var(--muted); margin-top: .15rem; }

.bignum {
  font-family: var(--mono); font-weight: 600; font-variant-numeric: tabular-nums;
  font-size: clamp(3rem, 11vw, 6rem); line-height: 1; letter-spacing: -.03em;
}

/* ---------- charts ---------- */
figure { margin: 1rem 0 0; }
.chart-box { background: var(--white); border: 1.5px solid var(--hair); padding: 1rem .9rem .7rem; }
.chart-box svg { width: 100%; height: auto; display: block; overflow: visible; }
figcaption { font-size: .88rem; color: var(--ink-2); margin-top: .55rem; }
.svg-l { font-family: var(--body); font-size: 11px; fill: var(--muted); }
.svg-l.b { fill: var(--ink); font-weight: 700; }
.svg-n { font-family: var(--mono); font-size: 10.5px; fill: var(--muted); }

/* ---------- polls ---------- */
.statement {
  background: var(--white); border: 1.5px solid var(--hair);
  padding: clamp(1.2rem, 3vw, 2rem);
  font-family: var(--display); font-weight: 700;
  font-size: clamp(1.3rem, 3.2vw, 2.2rem); line-height: 1.2; letter-spacing: -.02em;
  margin-top: 1rem;
}
.vote-row { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; margin-top: 1.2rem; }
.vote-btn {
  font-family: var(--display); font-weight: 800; font-size: clamp(1.2rem, 3vw, 1.9rem);
  padding: 1.4rem 1rem; border: 1.5px solid var(--hair); border-radius: 0; cursor: pointer;
  background: var(--white); color: var(--ink);
  transition: transform .12s var(--ease), background .15s;
}
.vote-btn:hover { transform: translateY(-3px); }
.vote-btn:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.vote-btn.agree.on { background: var(--good); color: #fff; }
.vote-btn.disagree.on { background: var(--bad); color: #fff; }
.vote-btn:disabled { cursor: default; transform: none; }
.vote-btn:disabled:not(.on) { opacity: .45; }

.bars { margin-top: 1.2rem; display: grid; gap: .8rem; }
.bar-row { display: grid; grid-template-columns: 9rem 1fr; gap: .8rem; align-items: center; }
.bar-row .lab { font-family: var(--display); font-weight: 700; font-size: 1.05rem; text-align: right; }
.bar-track { background: var(--white); border: 1.5px solid var(--hair); height: 46px; position: relative; }
.bar-fill { height: 100%; transition: width .6s var(--ease); }
.bar-fill.agree { background: var(--good); }
.bar-fill.disagree { background: var(--bad); }
.bar-val {
  position: absolute; top: 50%; transform: translateY(-50%); left: .7rem;
  font-family: var(--mono); font-weight: 600; font-size: 1.15rem; color: var(--ink);
  mix-blend-mode: normal;
}

/* ---------- waiting ---------- */
.waiting { text-align: center; padding: clamp(2rem, 8vh, 5rem) 0; }
.waiting .bignum { color: var(--white); text-shadow: 0 2px 0 rgba(0,0,0,.25); }
.dots span { animation: blink 1.4s infinite; }
.dots span:nth-child(2) { animation-delay: .2s; }
.dots span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }

/* ---------- TASK STAGE (must be black) ---------- */
.stage { position: fixed; inset: 0; background: #000; z-index: 50; }
.stage[hidden] { display: none; }
.stage.running { cursor: none; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stage-hud {
  position: absolute; top: 1rem; left: 1.3rem; z-index: 3;
  font-family: var(--mono); font-size: .8rem; color: #52607E; font-variant-numeric: tabular-nums;
}
.legend {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 3.2rem; z-index: 6;
  display: flex; gap: 1.5rem; pointer-events: none;
  background: #0C1424; border: 1.5px solid #2E4A7D; padding: .55rem 1.25rem;
}
.legend .item { display: flex; align-items: center; gap: .5rem; color: #CBD9F2; font-size: 1rem; font-weight: 600; white-space: nowrap; }
.legend .cap {
  font-family: var(--mono); font-weight: 700; color: #0A0A0C; background: var(--yellow);
  border: 1.5px solid #000; padding: .1rem .5rem; min-width: 2em; text-align: center;
}
.legend svg { width: 20px; height: 20px; stroke: var(--yellow); stroke-width: 2.8; stroke-linecap: round; }
.stage-note {
  position: absolute; inset: 0; z-index: 4; display: grid; place-items: center;
  font-family: var(--display); font-weight: 800; font-size: 2.1rem; text-align: center;
  padding: 2rem; pointer-events: none; color: #fff;
}
.stage-note[hidden] { display: none; }
.stage-note .sub { display: block; font-family: var(--body); font-weight: 500; font-size: 1rem; color: #93A3C2; margin-top: .5rem; }
.stage-note.ok { color: #4ADE80; }
.stage-note.bad { color: #FF7A7A; }
.stage-credit {
  position: absolute; bottom: .6rem; left: 0; right: 0; z-index: 6;
  text-align: center; font-size: .72rem; color: #586A8C;
  margin: 0; pointer-events: none;
}

/* ---------- projector view ---------- */
body.screen { background: var(--blue); }
body.screen .body-wrap { max-width: 1600px; }
body.screen h1 { font-size: clamp(2.4rem, 5.5vw, 4.4rem); }
body.screen .statement { font-size: clamp(1.8rem, 4.2vw, 3.2rem); }
body.screen .bar-row { grid-template-columns: 12rem 1fr; }
body.screen .bar-track { height: 70px; }
body.screen .bar-val { font-size: 1.7rem; }
body.screen .roomcode { font-size: clamp(4rem, 16vw, 11rem); }

/* ---------- admin ---------- */
body.admin { background: var(--blue-light); }
.admin-grid { display: grid; gap: 1rem; grid-template-columns: 1.15fr 1fr; align-items: start; }
@media (max-width: 1000px) { .admin-grid { grid-template-columns: 1fr; } }
.step-name {
  font-family: var(--display); font-weight: 800; font-size: clamp(1.5rem, 3.4vw, 2.4rem);
  line-height: 1.05; letter-spacing: -.02em;
}
.step-pos { font-family: var(--mono); font-size: .95rem; color: var(--muted); }
.admin-nav { display: grid; grid-template-columns: 1fr 2fr; gap: .8rem; margin-top: 1rem; }
.preview {
  background: var(--blue); border: 1.5px solid var(--hair); padding: 1rem;
  max-height: 46vh; overflow: auto;
}
.preview .card, .preview .callout, .preview .statement { margin-top: .6rem; }
.preview h1 { font-size: 1.5rem; }
.preview .statement { font-size: 1.05rem; padding: .8rem; }
.preview .bignum { font-size: 2.4rem; }
select {
  font-family: var(--body); font-size: 1rem; padding: .55rem .7rem;
  border: 1.5px solid var(--hair); background: var(--white); border-radius: 0; width: 100%;
}
.kbd-hint { font-size: .82rem; color: var(--muted); margin-top: .6rem; }

/* ---------- misc ---------- */
.credit-line { font-size: .8rem; color: var(--navy-ink); margin-top: 1.6rem; }
.mode-flag {
  position: fixed; right: .7rem; bottom: .7rem; z-index: 90;
  font-family: var(--mono); font-size: .7rem; color: var(--ink);
  background: var(--yellow); border: 1.5px solid var(--hair); padding: .2rem .5rem;
}
.mode-flag[hidden] { display: none; }
.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 1.2rem; z-index: 95;
  background: var(--cream); border: 1.5px solid var(--hair); padding: .55rem 1rem; font-size: .9rem;
}
.toast[hidden] { display: none; }
.hint { font-size: .88rem; color: var(--navy-ink); }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* =========================================================
   RANKING / PODIUM — who was fastest, who was slowest
   ========================================================= */
.podium { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; margin-top: 1rem; }
@media (max-width: 620px) { .podium { grid-template-columns: 1fr; } }
.pod {
  border: 1.5px solid var(--hair); padding: 1rem 1.2rem;
  animation: podIn .5s var(--ease) both;
}
.pod--top { background: var(--yellow); }
.pod--bottom { background: var(--white); animation-delay: .12s; }
.pod-k { font-family: var(--display); font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.pod--top .pod-k { color: #7A5A00; }
.pod-nick { font-family: var(--display); font-weight: 800; font-size: clamp(1.4rem, 3.4vw, 2.1rem); line-height: 1.05; letter-spacing: -.02em; margin-top: .2rem; }
.pod-val { font-family: var(--mono); font-weight: 600; font-size: 1.15rem; margin-top: .2rem; font-variant-numeric: tabular-nums; }
@keyframes podIn { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }

ol.rank { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 4px; }
ol.rank li {
  display: flex; align-items: center; gap: .8rem;
  background: var(--white); border: 1.5px solid var(--hair);
  padding: .42rem .8rem; font-size: 1rem;
  animation: rankIn .42s var(--ease) both;
  animation-delay: calc(.26s + var(--i) * .055s);
}
ol.rank li.gold { background: var(--yellow); }
ol.rank li.me { outline: 3px solid var(--navy); outline-offset: -3px; }
ol.rank li .pos { font-family: var(--mono); font-weight: 600; color: var(--muted); width: 1.9em; flex: none; }
ol.rank li .nm { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
ol.rank li .val { margin-left: auto; font-family: var(--mono); font-variant-numeric: tabular-nums; flex: none; }
@keyframes rankIn { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: none; } }

body.screen ol.rank li { font-size: 1.4rem; padding: .55rem 1rem; }
body.screen .pod-nick { font-size: clamp(2rem, 5vw, 3.2rem); }

/* live vote count above the bars */
.vote-count { font-family: var(--display); font-weight: 700; font-size: 1rem; color: var(--muted); margin: 1.1rem 0 0; }
body.screen .vote-count { font-size: 1.5rem; }
.bar-val .pct { font-weight: 700; margin-left: .6rem; }
.open-note {
  display: inline-block; margin-top: .8rem; font-size: .85rem; font-weight: 700;
  background: var(--cream); border: 1.5px solid var(--hair); padding: .25rem .7rem;
}

/* =========================================================
   ADMIN — the projector, pinned top right
   ========================================================= */
.pip {
  position: fixed; top: 12px; right: 12px; z-index: 80;
  width: clamp(320px, 30vw, 520px);
  background: var(--white); border: 2px solid var(--hair);
  box-shadow: 0 10px 34px rgba(0,0,0,.32);
}
.pip-bar {
  display: flex; align-items: center; gap: .5rem;
  background: var(--navy); color: #fff; padding: .35rem .6rem;
  font-family: var(--display); font-weight: 700; font-size: .82rem;
}
.pip-bar .grow { flex: 1; }
.pip-bar button {
  font-family: var(--body); font-size: .78rem; font-weight: 700; cursor: pointer;
  background: var(--white); color: var(--ink); border: 1px solid var(--hair);
  padding: .12rem .5rem; border-radius: 0;
}
.pip-bar button:hover { background: var(--cream); }
.pip-frame { position: relative; width: 100%; aspect-ratio: 16 / 10; background: var(--blue); }
.pip-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pip.collapsed .pip-frame { display: none; }
@media (max-width: 900px) { .pip { display: none; } }

.admin-lead { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.setup-note { background: var(--cream); border: 1.5px solid var(--hair); padding: .9rem 1.1rem; margin-top: 1rem; font-size: .95rem; }
.setup-note b { font-weight: 700; }
.spare-card { background: var(--white); border: 1.5px solid var(--hair); padding: .9rem 1.1rem; margin-top: 1rem; }
.spare-card .q { font-family: var(--display); font-weight: 700; font-size: 1rem; line-height: 1.25; margin: .3rem 0 .7rem; }
.admin-room { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; }
.admin-room .who { font-size: .85rem; color: var(--muted); }

/* practice guidance drawn over the task field */
.guide-note {
  position: absolute; left: 50%; transform: translateX(-50%); top: 1.6rem; z-index: 7;
  background: var(--yellow); border: 1.5px solid #000; padding: .5rem 1rem;
  font-family: var(--display); font-weight: 700; font-size: 1.05rem; color: #0A0A0C;
  pointer-events: none; text-align: center;
}
.guide-note[hidden] { display: none; }
.stage-note.small {
  align-items: end; padding-bottom: 18vh; font-size: 1.3rem;
}
.stage-note.small .sub { font-size: .9rem; }

/* =========================================================
   Which block am I in, and does it have sound?
   ========================================================= */
.block-badge {
  position: absolute; top: 1rem; right: 1.2rem; z-index: 7;
  display: flex; align-items: center; gap: .7rem;
  border: 2px solid #000; padding: .55rem .9rem;
  font-family: var(--display); font-size: .95rem; line-height: 1.15;
  text-align: left; pointer-events: none;
}
.block-badge b { font-size: .78rem; font-weight: 700; opacity: .7; letter-spacing: .04em; }
.block-badge .ico { font-size: 1.5rem; line-height: 1; }
.block-badge.silent { background: #2A3550; color: #C9D6EE; }
.block-badge.silent .ico { color: #7E8CA8; }
.block-badge.sound { background: var(--yellow); color: #0A0A0C; }
.block-badge[hidden] { display: none; }

/* =========================================================
   Lobby personalisation
   ========================================================= */
.customise { background: var(--white); border: 1.5px solid var(--hair); padding: 1rem 1.2rem; margin-top: 1.2rem; }
.customise h3 { margin-bottom: .1rem; }
.customise .hint { margin: 0 0 .8rem; }
.preview-nick { margin-bottom: .8rem; }
.preview-nick .nick { font-size: 1.25rem; padding: .4rem .9rem; animation: none; }
.swatches { display: flex; flex-wrap: wrap; gap: 7px; }
.swatch {
  width: 34px; height: 34px; border: 1.5px solid var(--hair); cursor: pointer; padding: 0;
  border-radius: 0; transition: transform .12s var(--ease);
}
.swatch:hover { transform: translateY(-2px); }
.swatch.on { outline: 3px solid var(--navy); outline-offset: 2px; }
.swatch:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.fontpicks { display: flex; flex-wrap: wrap; gap: 7px; margin-top: .7rem; }
.fontpick {
  background: var(--white); border: 1.5px solid var(--hair); cursor: pointer;
  padding: .35rem .8rem; font-size: 1rem; border-radius: 0;
  transition: transform .12s var(--ease);
}
.fontpick:hover { transform: translateY(-2px); }
.fontpick.on { background: var(--navy); color: #fff; }

/* the chips carry each person's own colour, so no blanket background here */
.nick-grid .nick { transition: none; }

/* =========================================================
   Admin: statement editor
   ========================================================= */
.editor { background: var(--white); border: 1.5px solid var(--hair); padding: .9rem 1.1rem; margin-top: 1rem; }
.editor textarea {
  width: 100%; min-height: 5.2rem; resize: vertical;
  font-family: var(--body); font-size: 1rem; line-height: 1.3; color: var(--ink);
  background: var(--white); border: 1.5px solid var(--hair); border-radius: 0; padding: .6rem .7rem;
}
.editor textarea:focus { outline: 3px solid var(--yellow); }
.editor .row { display: flex; gap: .5rem; align-items: center; margin-top: .6rem; flex-wrap: wrap; }
.editor .row .btn { font-size: .9rem; padding: .45rem 1rem; }
.editor .saved { font-size: .85rem; font-weight: 700; color: var(--good); }
.editor .edited { font-size: .8rem; background: var(--yellow); border: 1.5px solid var(--hair); padding: .1rem .5rem; font-weight: 700; }

/* =========================================================
   BRIEFS — three numbered parts, key cards
   ========================================================= */
.keycards { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 1.2rem; }
.keycard {
  display: flex; align-items: center; gap: .7rem;
  background: var(--white); border: 1.5px solid var(--hair); padding: .8rem 1.1rem;
}
.keycard.wide { flex: 1 1 100%; }
.keycard svg { width: 26px; height: 26px; stroke: var(--navy); stroke-width: 2.6; stroke-linecap: round; }
.keycard .k {
  font-family: var(--mono); font-weight: 700; font-size: 1.05rem; color: #0A0A0C;
  background: var(--yellow); border: 1.5px solid var(--hair); padding: .15rem .6rem; min-width: 2.2em; text-align: center;
}
.keycard .w { font-family: var(--display); font-weight: 700; font-size: 1.1rem; }

ol.parts { list-style: none; counter-reset: p; margin: .8rem 0 0; padding: 0; display: grid; gap: 8px; }
ol.parts li {
  counter-increment: p; position: relative;
  background: var(--white); border: 1.5px solid var(--hair);
  padding: .7rem 1rem .7rem 3.2rem;
}
ol.parts li::before {
  content: counter(p);
  position: absolute; left: .8rem; top: 50%; transform: translateY(-50%);
  width: 1.7rem; height: 1.7rem; display: grid; place-items: center;
  background: var(--navy); color: #fff; font-family: var(--mono); font-weight: 600; font-size: .95rem;
}
ol.parts li b { font-family: var(--display); font-size: 1.05rem; display: block; }
ol.parts li span { color: var(--ink-2); font-size: .95rem; }

/* =========================================================
   RESULTS — one line, one number
   ========================================================= */
.verdict {
  background: var(--yellow); border: 1.5px solid var(--hair);
  padding: 1.1rem 1.3rem; margin-top: 1rem;
  font-family: var(--display); font-weight: 700;
  font-size: clamp(1.3rem, 3.4vw, 2.1rem); line-height: 1.15; letter-spacing: -.02em;
}
.verdict b { font-weight: 800; }
.two-up { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; margin-top: 12px; }
.mini { background: var(--white); border: 1.5px solid var(--hair); padding: .8rem 1rem; }
.mini .k { display: block; font-size: .82rem; font-weight: 700; color: var(--muted); }
.mini .v { font-family: var(--mono); font-weight: 600; font-size: 2rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.mini .v i { font-style: normal; font-size: .95rem; color: var(--muted); margin-left: .1em; }

/* =========================================================
   OPEN QUESTIONS — box, wall, cloud
   ========================================================= */
.answer-box { background: var(--white); border: 1.5px solid var(--hair); padding: 1rem 1.1rem; margin-top: 1.2rem; }
.answer-box textarea {
  width: 100%; resize: vertical; min-height: 3.4rem;
  font-family: var(--body); font-size: 1.1rem; line-height: 1.35; color: var(--ink);
  background: var(--white); border: 1.5px solid var(--hair); border-radius: 0; padding: .6rem .7rem;
}
.answer-box textarea:focus { outline: 3px solid var(--yellow); }
.answer-box .row { display: flex; gap: .7rem; align-items: center; margin-top: .6rem; flex-wrap: wrap; }
.answer-head { margin-top: 1.6rem; }
.answer-head h3 { font-size: 1rem; color: var(--navy-ink); }

.wall { columns: 2; column-gap: 12px; margin-top: .6rem; }
@media (max-width: 700px) { .wall { columns: 1; } }
body.screen .wall { columns: 3; }
@media (max-width: 1100px) { body.screen .wall { columns: 2; } }
.ans {
  break-inside: avoid; margin: 0 0 12px;
  background: var(--white); border: 1.5px solid var(--hair); padding: .85rem 1rem;
  animation: ansIn .4s var(--ease) both; animation-delay: calc(var(--i) * .05s);
}
.ans blockquote { margin: 0; font-size: 1.02rem; line-height: 1.35; }
body.screen .ans blockquote { font-size: 1.25rem; }
.ans figcaption { margin-top: .55rem; }
.ans figcaption .nick { font-size: .82rem; padding: .15rem .55rem; animation: none; }
@keyframes ansIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.cloud {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center;
  gap: .1rem .8rem; padding: 1rem .4rem; margin-top: .6rem;
  background: var(--white); border: 1.5px solid var(--hair);
}
body.screen .cloud { padding: 2rem 1rem; gap: .3rem 1.4rem; }
.cloud .cw {
  font-family: var(--display); line-height: 1.05; letter-spacing: -.02em;
  animation: cwIn .45s var(--ease) both;
}
body.screen .cloud .cw { font-size: calc(var(--s, 1) * 1.6em); }
.cloud .cw sub { font-family: var(--mono); font-size: .42em; vertical-align: super; opacity: .55; margin-left: .1em; }
@keyframes cwIn { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }

.choices { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1.2rem; }
.choice-btn {
  flex: 1 1 8rem;
  font-family: var(--display); font-weight: 800; font-size: clamp(1.05rem, 2.4vw, 1.4rem);
  padding: 1.1rem .8rem; border: 1.5px solid var(--hair); border-radius: 0; cursor: pointer;
  background: var(--white); color: var(--ink);
  transition: transform .12s var(--ease), background .15s;
}
.choice-btn:hover { transform: translateY(-3px); background: var(--cream); }
.choice-btn:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.choice-btn.on { background: var(--navy); color: #fff; }
.choice-btn:disabled { cursor: default; transform: none; }
.choice-btn:disabled:not(.on) { opacity: .45; }

/* the admin's pinned participant view */
.preview-flag {
  margin: 0 0 .8rem; font-family: var(--display); font-weight: 700; font-size: .78rem;
  background: var(--yellow); border: 1.5px solid var(--hair); padding: .25rem .6rem;
  display: inline-block;
}

/* your own answers, with a way to take one back */
.mine-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: .7rem; }
.mine-chip {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--cream); border: 1.5px solid var(--hair);
  padding: .25rem .3rem .25rem .6rem; font-size: .9rem; max-width: 100%;
}
.mine-chip .drop {
  background: var(--white); border: 1.5px solid var(--hair); border-radius: 0;
  cursor: pointer; font-size: .85rem; line-height: 1; padding: .15rem .35rem; flex: none;
}
.mine-chip .drop:hover { background: var(--bad); color: #fff; }

/* =========================================================
   The five-senses closer — bars that visibly move
   ========================================================= */
.bars--choice { gap: 10px; }
.bars--choice .bar-row { grid-template-columns: 10rem 1fr; }
body.screen .bars--choice .bar-row { grid-template-columns: 14rem 1fr; }
.bars--choice .lab { display: flex; align-items: center; justify-content: flex-end; gap: .5rem; }
.bars--choice .lab .you {
  font-family: var(--body); font-size: .68rem; font-weight: 700; letter-spacing: .04em;
  background: var(--navy); color: #fff; padding: .1rem .4rem; text-transform: uppercase;
}
.bars--choice .bar-track { height: 54px; overflow: hidden; }
body.screen .bars--choice .bar-track { height: 84px; }
.bars--choice .bar-fill {
  transition: width .7s var(--ease), filter .3s;
  min-width: 0;
}
.bars--choice .bar-val {
  display: flex; align-items: baseline; gap: .6rem;
  left: auto; right: .8rem;
}
.bars--choice .pctbig {
  font-family: var(--mono); font-weight: 600; font-size: 1.7rem; font-variant-numeric: tabular-nums;
  transition: color .3s;
}
body.screen .bars--choice .pctbig { font-size: 2.6rem; }
.bars--choice .cnt { font-size: .82rem; color: var(--muted); }
body.screen .bars--choice .cnt { font-size: 1.05rem; }

/* the option in front */
.bars--choice .bar-row.lead .bar-track { border-width: 3px; box-shadow: 4px 4px 0 var(--yellow); }
.bars--choice .bar-row.lead .pctbig { color: var(--ink); }
.bars--choice .bar-row.lead .lab { font-weight: 800; }
/* the one you picked */
.bars--choice .bar-row.mine .bar-track { outline: 3px solid var(--navy); outline-offset: 2px; }
