/* =========================================================================
   Study screens: light, minimal, one column. No titles, no stage counter -
   the question is the page. Irreversible steps go through a confirm dialog.
   ========================================================================= */

html, body { overflow: auto; }
body {
  background: var(--s-bg);
  color: var(--s-text);
  font-size: 16px;
}

.study-shell { display: block; padding: 0; min-height: 100%; }
.study-shell[hidden] { display: none !important; }

/* the only chrome: a thin unlabelled progress bar */
.progress { height: 3px; background: var(--s-line-soft); position: sticky; top: 0; z-index: 5; }
.progress-fill { height: 100%; background: var(--s-accent); transition: width .35s ease; }

.survey-body {
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 24px 96px;
}

.intro { font-size: 15px; color: var(--s-muted); margin: 0 0 30px; }
.caption {
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--s-muted);
  margin: 26px auto 0;
  max-width: 560px;
  text-align: center;
}
.caption p { margin: 0; }
.caption strong { color: var(--s-text); font-weight: 600; }

.prose { font-size: 16px; line-height: 1.75; margin: 0 0 16px; }
.prose p { margin: 0 0 14px; }
.prose code {
  font-family: var(--mono); font-size: .88em;
  background: var(--s-code-bg); border: 1px solid var(--s-line-soft);
  padding: 1px 5px; border-radius: 4px;
}

/* ---------- questions ---------- */
.items { display: block; }

.items-heading { margin: 0 0 26px; }
.items-heading:not(:first-child) {
  margin-top: 22px; padding-top: 34px;
  border-top: 1px solid var(--s-line-soft);
}
.items-heading h2 { font-size: 19px; font-weight: 600; margin: 0 0 8px; }
.items-heading-text { font-size: 15px; line-height: 1.6; color: var(--s-muted); margin: 0; }

.field { padding: 0 0 34px; }
.field:last-child { padding-bottom: 8px; }
.field.missing .field-prompt { color: var(--s-error); }

.field-label {
  display: flex; align-items: baseline; gap: 8px;
  margin-bottom: 14px;
  font-size: 17px;
  line-height: 1.55;
}
.field-num { flex: none; color: var(--s-muted); font-variant-numeric: tabular-nums; }
.field-prompt { flex: 1; }
.field-prompt p { margin: 0; }
.field-prompt code {
  font-family: var(--mono); font-size: .88em;
  background: var(--s-code-bg); padding: 1px 5px; border-radius: 4px;
}

.options { display: flex; flex-direction: column; gap: 2px; }
.option {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 7px 0;
  font-size: 15.5px; line-height: 1.5;
  cursor: pointer;
}
.option input {
  flex: none; width: 17px; height: 17px; margin: 1px 0 0;
  accent-color: var(--s-accent); cursor: pointer;
}
.option { align-items: center; }
.select-other { margin-top: 10px; }
.select-other[hidden] { display: none; }
.option input.option-other {
  width: auto; height: auto; flex: 1; max-width: 280px; margin: -4px 0;
  padding: 6px 10px; font-size: 14.5px; cursor: text;
}

.likert { display: flex; align-items: flex-end; gap: 14px; }
.likert-end {
  font-size: 13.5px; color: var(--s-muted);
  flex: 0 1 110px; padding-bottom: 6px; line-height: 1.4;
}
.likert-end:last-child { text-align: right; }
.likert-points { flex: 1; display: flex; }
.likert-point {
  flex: 1;
  display: flex; flex-direction: column-reverse; align-items: center; gap: 7px;
  padding: 6px 0; font-size: 14px; color: var(--s-muted);
  cursor: pointer;
}
.likert-point:hover { color: var(--s-text); }
.likert-point input { width: 17px; height: 17px; margin: 0; accent-color: var(--s-accent); cursor: pointer; }
.likert-point:has(input:checked) { color: var(--s-text); font-weight: 500; }

/* fill in the word being defined */
.blanks { display: flex; flex-direction: column; gap: 18px; }
.blank {
  display: grid;
  grid-template-columns: 22px 1fr 210px;
  align-items: start;
  gap: 14px;
}
.blank-num {
  color: var(--s-muted);
  font-variant-numeric: tabular-nums;
  font-size: 15px;
  padding-top: 12px;
}
.blank-def { padding-top: 11px; }
.blank-def { margin: 0; font-size: 15.5px; line-height: 1.55; }
.blank-input { margin: 0; max-width: none; }

/* inputs */
.input {
  display: block;
  width: 100%;
  max-width: 460px;
  background: var(--s-input-bg);
  border: 1px solid var(--s-line);
  border-radius: 6px;
  color: var(--s-text);
  font-family: inherit;
  font-size: 15.5px;
  line-height: 1.5;
  padding: 11px 13px;
  outline: none;
  resize: vertical;
}
textarea.input { max-width: none; }
.input::placeholder { color: var(--s-faint); }
.input:focus { border-color: var(--s-accent); box-shadow: 0 0 0 3px rgba(11,122,94,.16); }
.field.missing .input { border-color: var(--s-error); }
select.input { cursor: pointer; }
.code-input { max-width: none; font-family: var(--mono); font-size: 13.5px; line-height: 1.65; }

/* ---------- actions ---------- */
.actions { display: flex; justify-content: flex-end; margin-top: 30px; }
.primary {
  background: var(--s-accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 12px 34px;
  font-size: 15.5px;
  font-weight: 500;
}
.primary:hover { background: var(--s-accent-hover); }
.primary:disabled { opacity: .55; cursor: default; }

.ghost-btn {
  background: transparent;
  border: 1px solid var(--s-line);
  border-radius: 6px;
  padding: 12px 22px;
  font-size: 15.5px;
  color: var(--s-text);
}
.ghost-btn:hover { background: var(--s-line-soft); }

.form-error { color: var(--s-error); font-size: 14.5px; margin: 18px 0 0; }
.form-error[hidden] { display: none !important; }

.survey-body.done { padding-top: 120px; text-align: center; }
.survey-body.done h1 { font-size: 26px; font-weight: 600; margin: 0 0 12px; }
.survey-body.done .prose { color: var(--s-muted); }

/* ---------- confirm dialog ---------- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(20, 22, 26, 0.45);
  display: grid; place-items: center;
  padding: 24px;
  z-index: 500;
  animation: fade .12s ease;
}
@keyframes fade { from { opacity: 0; } }

.modal {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 18px 48px rgba(0,0,0,.24);
  padding: 30px 30px 24px;
  max-width: 420px;
  width: 100%;
  text-align: center;
}
.modal-icon {
  width: 46px; height: 46px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: #fff5e6;
  color: #b26b00;
}
.modal-title { font-size: 18px; font-weight: 600; margin: 0 0 8px; }
.modal-detail { font-size: 14.5px; line-height: 1.6; color: var(--s-muted); margin: 0; }
.modal-actions { display: flex; gap: 10px; justify-content: center; margin-top: 24px; }
.modal-actions .primary, .modal-actions .ghost-btn { padding: 11px 22px; font-size: 15px; }

/* ---------- task tab ---------- */
.task-page {
  height: 100%;
  overflow: auto;
  background: var(--bg);
  display: flex;
  justify-content: center;
}
.task-sheet {
  max-width: 1280px;
  width: 100%;
  padding: 46px 56px 72px;
  color: var(--text);
}
.task-sheet .task-kicker {
  display: block;
  font-size: 10.5px; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 10px;
}
.task-sheet h1 {
  font-size: 24px; font-weight: 600; letter-spacing: -0.01em;
  margin: 0 0 20px;
}
/* ---------- the brief as a checklist ---------- */
.task-intro { margin: 0 0 30px; }
.task-intro-link { margin: -18px 0 22px; }
.task-intro-row {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 40px;
  margin: 0 0 18px;
}
.task-intro-row .task-intro { margin: 0; }
.task-intro-row .task-intro-link { flex: none; margin: 2px 0 0; white-space: nowrap; }
@media (max-width: 860px) {
  .task-intro-row { flex-direction: column; gap: 12px; }
}

.task-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }

.step-section {
  margin: 34px 0 0;
  padding-top: 26px;
  border-top: 2px solid var(--border);
  font-size: 11.5px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-faint);
}
.step-section + .task-step { border-top: none; padding-top: 12px; }

.task-step {
  padding: 22px 0;
  border-top: 1px solid var(--border);
}
.task-step:last-child { border-bottom: 1px solid var(--border); }

.step-head {
  display: flex; align-items: center; gap: 11px;
  cursor: pointer; user-select: none;
  margin-bottom: 10px;
}
.step-head.is-plain { cursor: default; user-select: text; }
.step-box {
  flex: none; width: 17px; height: 17px; margin: 0;
  accent-color: var(--accent); cursor: pointer;
}
.step-title {
  display: flex; align-items: baseline; gap: 9px;
  font-size: 15.5px; font-weight: 600; color: var(--text);
}
.step-num {
  font-size: 11px; font-weight: 700; color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}
.task-step.is-done .step-title { color: var(--text-faint); }
.task-step.is-done .step-body { opacity: .55; }

.step-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 460px;
  gap: 32px;
  align-items: start;
  padding-left: 30px;
}
.step-body { font-size: 15px; line-height: 1.7; color: var(--text-dim); max-width: 62ch; }

/* Nothing written yet - hold the space so the layout is what it will be. */
.step-body.is-empty {
  min-height: 150px;
  border-radius: 8px;
  background: var(--surface-3);
  padding: 16px 18px;
}
.step-body p { margin: 0 0 10px; }
.step-body p:last-child { margin-bottom: 0; }
.step-body strong { color: var(--text); font-weight: 600; }
.step-body code {
  font-family: var(--mono); font-size: .88em;
  background: var(--surface-3); padding: 2px 5px; border-radius: 4px;
}
.step-link {
  display: inline-block; margin-top: 4px;
  font: inherit; font-weight: 600; padding: 0; border: 0; background: none;
  color: var(--accent); cursor: pointer;
  text-decoration: underline; text-underline-offset: 2px;
}
.step-link:hover { opacity: .78; }

/* The finished page as a thumbnail: rendered at its real width and scaled, so
   it keeps the proportions of the page it is a picture of. */

.task-footer {
  margin-top: 26px; font-size: 13.5px; line-height: 1.6; color: var(--text-dim);
}
.task-footer code {
  font-family: var(--mono); font-size: .88em;
  background: var(--surface-3); padding: 2px 5px; border-radius: 4px;
}

@media (max-width: 1180px) {
  .step-cols { grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; }
}
@media (max-width: 860px) {
  .task-sheet { padding: 44px 24px 64px; }
  .step-cols { grid-template-columns: 1fr; }
  
}

.task-text { font-size: 15.5px; line-height: 1.75; color: var(--text-dim); }
.task-text p { margin: 0 0 15px; }
.task-text ul { margin: 0 0 15px; padding-left: 22px; }
.task-text li { margin: 5px 0; }
.task-text strong { color: var(--text); font-weight: 600; }
.task-text code {
  font-family: var(--mono); font-size: .88em;
  background: var(--surface-3); padding: 2px 5px; border-radius: 4px;
}

/* ---------- web tabs ---------- */
.webview { height: 100%; position: relative; background: #fff; }
.webview iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: none; background: #fff;
}
.webview iframe[hidden] { display: none; }

.webview-hint {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--s-bg);
  color: var(--s-muted);
  font-size: 14.5px;
}
.webview-hint[hidden] { display: none; }
.webview-hint p { margin: 0; }

/* ---------- sign in ---------- */
.survey-body.login { padding-top: 96px; max-width: 420px; }
.login-form { display: flex; flex-direction: column; gap: 12px; margin-top: 26px; }
.login-form .input { max-width: none; }
.login-form .primary { margin-top: 6px; }
.login-hint { font-size: 13px; color: var(--s-faint); margin: 16px 0 0; line-height: 1.6; }
.login-link {
  background: none; border: 0; padding: 0; margin: 14px 0 0;
  font: inherit; font-size: 13.5px; color: var(--s-accent); cursor: pointer;
  text-decoration: underline; text-underline-offset: 2px;
}
.login-link:hover { color: var(--s-accent-hover); }
.login-links { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.login-note { color: var(--s-muted); font-size: 14.5px; margin: 18px 0 0; }
.login-note[hidden] { display: none; }

/* A footer along the bottom, with its own background, so it covers whatever
   scrolls under it instead of printing on top of it. Pages and the workspace
   end above it (body.has-footer). */
.signout-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: var(--footer-h, 34px);
  padding: 0 16px;
  z-index: 310;
  display: flex; align-items: center; gap: 10px;
  font-size: 11.5px;
  color: var(--s-faint);
  background: var(--s-bg, #ffffff);
  border-top: 1px solid var(--s-line, #e5e7eb);
}
body.has-footer { padding-bottom: var(--footer-h, 34px); }
body.has-footer .workspace { bottom: var(--footer-h, 34px); }
.signout-who { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.signout-btn {
  border: none; background: transparent;
  color: var(--s-muted);
  font-size: 11.5px;
  text-decoration: underline;
  padding: 2px;
}
.signout-btn:hover { color: var(--s-text); }

/* ---------- stage timer ---------- */
/* Fixed top-right so it sits in the same place on the survey pages and over
   the workspace's tab strip. Below the confirm dialog, above everything else. */
.timer {
  position: fixed;
  top: 14px;
  right: 18px;
  z-index: 300;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 17px 9px 14px;
  background: #fff;
  border: 1px solid #c9d0d8;
  border-radius: 24px;
  box-shadow: 0 2px 10px rgba(16,22,30,.16);
  color: var(--s-muted);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  user-select: none;
}
.timer[hidden] { display: none !important; }
/* A moment of emphasis when a timed stage opens and every 5 minutes after:
   bigger and in the accent colour, then back. */
.timer { transform-origin: top right; }
.timer.pulse { animation: timer-pulse 2.4s ease-in-out; }
@keyframes timer-pulse {
  0%   { transform: scale(1); }
  15%  { transform: scale(1.7); background: var(--s-accent); border-color: var(--s-accent); color: #fff; }
  75%  { transform: scale(1.7); background: var(--s-accent); border-color: var(--s-accent); color: #fff; }
  100% { transform: scale(1); }
}
.timer.pulse .timer-value { animation: timer-pulse-text 2.4s ease-in-out; }
@keyframes timer-pulse-text { 15%, 75% { color: #fff; } }
@media (prefers-reduced-motion: reduce) {
  .timer.pulse, .timer.pulse .timer-value { animation-duration: 2.4s; }
  @keyframes timer-pulse { 15%, 75% { background: var(--s-accent); border-color: var(--s-accent); color: #fff; } }
}
.timer-value {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: .01em;
  color: var(--s-text);
  min-width: 52px;
  text-align: right;
}

.timer.is-low {
  border-color: #f0c88c;
  background: #fff8ee;
  color: #a5680d;
}
.timer.is-low .timer-value { color: #a5680d; }

.timer.is-out {
  border-color: #f0bdb8;
  background: #fdf1f0;
  color: var(--s-error);
}
.timer.is-out .timer-value { color: var(--s-error); }

/* =========================================================================
   Instruction visuals
   ========================================================================= */
.visual { margin: 0; }

/* --- mock website --- */
.mock-window {
  border: 1px solid var(--s-line);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 6px 22px rgba(16,22,30,.07);
}
.mock-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px;
  background: #f2f3f5;
  border-bottom: 1px solid var(--s-line);
}
.mock-light { width: 9px; height: 9px; border-radius: 50%; background: #d5d8dd; }
.mock-url {
  margin-left: 12px;
  background: #fff;
  border: 1px solid var(--s-line);
  border-radius: 20px;
  padding: 3px 14px;
  font-size: 11.5px;
  color: var(--s-muted);
}

.mock-body { display: flex; min-height: 300px; }

.mock-filter {
  flex: none;
  width: 178px;
  padding: 18px 16px;
  border-right: 1px solid var(--s-line);
  background: #fbfcfd;
}
.mock-filter-title {
  margin: 0 0 12px;
  font-size: 11px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--s-muted);
}
.mock-radios { display: flex; flex-direction: column; gap: 4px; }
.mock-radio {
  display: flex; align-items: center; gap: 9px;
  font-size: 14px; padding: 5px 0; cursor: pointer;
}
.mock-radio input { width: 16px; height: 16px; margin: 0; accent-color: var(--s-accent); cursor: pointer; }
.mock-radio:has(input:checked) { font-weight: 600; }
.mock-count { margin: 18px 0 0; font-size: 12px; color: var(--s-muted); }

.mock-map { flex: 1; position: relative; min-height: 300px; }
.mock-map-base { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-ground { fill: #eef1f4; }
.map-road { stroke: #fff; stroke-width: 3; fill: none; }
.map-green { fill: #dde9dd; }

.mock-pins { position: absolute; inset: 0; }
.mock-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex; align-items: center; gap: 6px;
  transition: opacity .18s ease, transform .18s ease;
  white-space: nowrap;
}
.mock-pin-dot {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--s-accent);
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
  flex: none;
}
.mock-pin[data-type="park"] .mock-pin-dot { background: #3f8f4f; }
.mock-pin[data-type="museum"] .mock-pin-dot { background: #8a5cd6; }
.mock-pin-name {
  font-size: 11.5px;
  background: rgba(255,255,255,.92);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--s-text);
}
.mock-pin.is-hidden { opacity: 0; transform: translate(-50%, -50%) scale(.6); pointer-events: none; }

/* --- example tab --- */
.example-page {
  height: 100%;
  display: flex; flex-direction: column;
  background: var(--bg);
}
.example-note {
  flex: none; margin: 0;
  padding: 11px 18px;
  font-size: 13px; line-height: 1.55; color: var(--text-dim);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.example-stage { flex: 1; min-height: 0; }
.example-frame { display: block; width: 100%; height: 100%; border: 0; background: #fff; }

/* The Reference walkthrough: a green ring on what to click, the page left as
   it is (not dimmed), and the first and last steps' card (reftour.js).
   Everything glides and fades, nothing jumps. */
.ref-tour-stage { position: relative; overflow: hidden; --ref-ease: cubic-bezier(.33, 1, .68, 1); }
.ref-spot {
  position: absolute; z-index: 5; pointer-events: none; border-radius: 10px; opacity: 0;
  transition: left .45s var(--ref-ease), top .45s var(--ref-ease), width .45s var(--ref-ease),
    height .45s var(--ref-ease), opacity .3s ease;
}
.ref-spot.is-on { opacity: 1; }
.ref-spot.no-move { transition: none; }
.ref-dim {
  position: absolute; inset: 0; z-index: 5; pointer-events: none;
  background: rgba(16, 22, 30, .58); opacity: 0; transition: opacity .3s ease;
}
.ref-dim.is-on { opacity: 1; pointer-events: auto; }
/* What to click, always green: often small (the drawer's switch), so drawn
   bold - thick, tinted, a white halo that parts it from any background, and
   a wide pulse. */
.ref-ring {
  position: absolute; z-index: 5; pointer-events: none; opacity: 0;
  border: 3.5px solid #2b8a3e; background: rgba(64, 192, 87, .14); border-radius: 10px;
  transition: opacity .25s ease;
}
.ref-ring.is-on { opacity: 1; animation: ref-pulse-green 1.2s ease-in-out infinite; }
.ref-ring.is-on.no-move, .ref-spot.no-move { transition: none; }
@keyframes ref-pulse-green {
  0%, 100% { box-shadow: 0 0 0 2px rgba(255, 255, 255, .95), 0 0 10px 3px rgba(55, 178, 77, .6), 0 0 0 2px rgba(55, 178, 77, .7); }
  50% { box-shadow: 0 0 0 2px rgba(255, 255, 255, .95), 0 0 16px 6px rgba(55, 178, 77, .45), 0 0 0 14px rgba(55, 178, 77, 0); }
}
.ref-card[hidden] { display: none; }
.ref-card {
  position: absolute; z-index: 6; width: min(320px, calc(100% - 24px));
  background: #fff; color: #1f2328; border-radius: 12px; padding: 14px 16px 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .28); font-size: 15px; line-height: 1.45;
  user-select: none; -webkit-user-select: none;
  transition: left .45s var(--ref-ease), top .45s var(--ref-ease);
}
.ref-card.is-centred {
  left: 50%; top: 50%; transform: translate(-50%, -50%); transition: none;
  width: min(400px, calc(100% - 24px)); padding: 20px 22px 14px; font-size: 16.5px; text-align: center;
}
.ref-card-text p { margin: 0; }
.ref-card-foot { display: flex; justify-content: center; margin-top: 14px; }
.ref-card-foot button { padding: 6px 14px; font-size: 14px; }
@media (prefers-reduced-motion: reduce) {
  .ref-spot, .ref-card, .ref-dim, .ref-ring { transition: none; }
  .ref-ring.is-on { animation: none; box-shadow: 0 0 0 2px rgba(255, 255, 255, .95), 0 0 12px 4px rgba(55, 178, 77, .55); }
}
.task-redo-tour[hidden] { display: none; }
/* The Okay being waited on and Redo walkthrough, kept in view at the bottom
   of the Task tab however far the brief has been scrolled. */
.brief-piece:not(.is-read) .brief-actions {
  position: sticky; bottom: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin-top: 10px; padding: 10px 0 14px; background: var(--bg);
}
.brief-actions .brief-ok { margin-top: 0; }
.task-redo-tour.is-alone { position: sticky; bottom: 14px; z-index: 2; margin-top: 18px; background: var(--bg); }

/* Filling a tab instead of sitting in a page: no fake window, no rounded
   corners, and the map takes whatever height is going. */

@media (max-width: 640px) {
  .survey-body { padding: 44px 18px 80px; }
  .blank { grid-template-columns: 18px 1fr; }
  .blank-input { grid-column: 2; }
  .mock-body { flex-direction: column; }
  .mock-filter { width: auto; border-right: none; border-bottom: 1px solid var(--s-line); }
  
}

/* =========================================================================
   Activity workspace
   ========================================================================= */
.workspace {
  position: fixed; inset: 0;
  display: flex; flex-direction: column;
  background: var(--chrome);
  color: var(--text);
  font-size: 15px;
  z-index: 100;
}
.workspace[hidden] { display: none !important; }

.workspace-actions {
  flex: none;
  display: flex;
  justify-content: flex-end;
  padding: 10px 16px;
  background: var(--s-bg);
  border-top: 1px solid var(--s-line);
}
.workspace-actions .primary { padding: 10px 26px; font-size: 14.5px; }
/* Keeps its height with no button (the web task has no Finish), so the
   sign-out line below never sits on the editor. */
.workspace-actions { min-height: 48px; align-items: center; }

.workspace .viewport { height: auto; flex: 1; min-height: 0; }

/* ---------- annotated instruction (walkthrough + matching) ---------- */
.survey-body-wide { max-width: 1180px; }
.ann-stage { --ann-marker: #e8590c; --ann-right: #1a7f37; }

.ann-figure {
  display: grid;
  grid-template-columns: minmax(0, 2.25fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
@media (max-width: 860px) { .ann-figure { grid-template-columns: minmax(0, 1fr); } }
.ann-figure.ann-figure-solo { grid-template-columns: minmax(0, 1fr); max-width: 1180px; }

.ann-window {
  position: relative;
  background: #fff;
  border: 1px solid var(--s-line);
  border-radius: 10px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, .06);
}
.ann-chrome {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 12px;
  background: #f1f2f4;
  border-bottom: 1px solid var(--s-line-soft);
  border-radius: 10px 10px 0 0;
}
.ann-chrome i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.ann-chrome i:nth-child(2) { background: #febc2e; }
.ann-chrome i:nth-child(3) { background: #28c840; }
.ann-url {
  margin-left: 12px; flex: 1; min-width: 0;
  background: #fff; border-radius: 6px; padding: 3px 12px;
  font-size: 13px; color: var(--s-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ann-shot { position: relative; }
.ann-shot img { display: block; width: 100%; height: auto; border-radius: 0 0 10px 10px; }

.ann-file { padding: 10px 16px 8px; font: 600 14px var(--mono); }
.ann-pre {
  margin: 0 10px 10px;
  padding: 12px 14px;
  background: #1f2430; color: #d8dee9;
  border-radius: 8px;
  font: 12px/1.75 var(--mono);
  overflow-x: auto;
}
.ann-code-row { display: block; white-space: pre; }
.ann-ln { display: inline-block; width: 2.2em; color: #6b7385; user-select: none; }
.ann-c-sel { color: #ebcb8b; }
.ann-c-prop { color: #88c0d0; }
.ann-c-val { color: #eceff4; }

/* markers: a dashed outline with a numbered or lettered badge */
.ann-mark {
  position: absolute;
  border: 2.5px dashed var(--ann-marker);
  border-radius: 6px;
  pointer-events: none;
  transition: opacity .25s ease;
}
.ann-mark[hidden] { display: none; }
.ann-mark-code { inset: -6px; }
.ann-badge {
  position: absolute; left: -15px; top: -15px;
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ann-marker); color: #fff;
  font: 700 15px var(--sans);
  box-shadow: 0 0 0 3px #fff;
}
.ann-badge-inline { position: static; flex: none; }
.ann-badge.at-right { left: auto; right: -15px; }
.ann-badge.at-top { left: 50%; top: -40px; transform: translateX(-50%); }
/* earlier parts stay on screen but step back behind the current one */
.ann-stage .ann-mark:not(.is-current):not(.is-letter) { opacity: .45; }
.ann-mark.is-current { animation: ann-pop .35s ease; }
/* Walkthrough spotlight: everything but the current part is greyed. */
.ann-veil { position: absolute; inset: 0; overflow: hidden; pointer-events: none; border-radius: 0 0 10px 10px; }
.ann-veil[hidden] { display: none; }
.ann-hole { position: absolute; border-radius: 6px; box-shadow: 0 0 0 9999px rgba(40, 42, 46, .45); transition: all .3s ease; }
.ann-hole[hidden] { display: none; }
.ann-holes { position: absolute; inset: 0; width: 100%; height: 100%; }
.ann-holes path { fill: rgba(40, 42, 46, .45); }
/* The second place a part lights (`also`): outlined, without a number. */
.ann-mark.ann-mark-also { border-style: dashed; border-color: #1f6feb; pointer-events: none; }
.ann-mark { z-index: 1; }
.ann-code { transition: opacity .3s ease, filter .3s ease; }
.ann-figure.focus-image .ann-code { opacity: .35; filter: grayscale(1); }
@keyframes ann-pop { from { transform: scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ann-mark.is-current { animation: none; } }

.ann-defs { list-style: none; margin: 30px 0 0; padding: 26px 0 0; border-top: 1px solid var(--s-line-soft); }
.ann-def { display: flex; gap: 14px; align-items: flex-start; margin: 0 0 18px; transition: opacity .25s ease; }
.ann-def[hidden] { display: none; }
.ann-def p { margin: 3px 0 0; font-size: 16.5px; line-height: 1.6; }
.ann-def:not(.is-current) { opacity: .55; }

.ann-nav { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.ann-counter { margin-right: auto; font-size: 14px; color: var(--s-muted); font-variant-numeric: tabular-nums; }
.ann-nav button:disabled { opacity: .45; cursor: default; }

.ann-title { font-size: 21px; font-weight: 600; margin: 0 0 6px; }
.ann-lead { font-size: 15.5px; color: var(--s-muted); margin: 0 0 22px; }

.ann-match { list-style: none; margin: 28px 0 0; padding: 0; }
.ann-match-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 110px 84px;
  gap: 12px; align-items: center;
  padding: 12px 14px; margin: 0 0 8px;
  border: 1px solid var(--s-line-soft); border-radius: 8px;
}
.ann-match-num { color: var(--s-muted); font-variant-numeric: tabular-nums; }
.ann-match-text { margin: 0; font-size: 16px; line-height: 1.55; }
.ann-match-select { margin: 0; max-width: none; padding: 8px 10px; }
.ann-verdict { font-size: 13.5px; font-weight: 600; }
.ann-match-row.is-wrong { border-color: var(--s-error); background: var(--s-error-bg); }
.ann-match-row.is-wrong .ann-verdict { color: var(--s-error); }
.ann-match-row.is-right { border-color: var(--ann-right); background: #f3faf5; }
.ann-match-row.is-right .ann-verdict { color: var(--ann-right); }
@media (max-width: 620px) {
  .ann-match-row { grid-template-columns: 22px minmax(0, 1fr); }
  .ann-match-select, .ann-verdict { grid-column: 2; }
}
.ann-stage .form-error.ann-hint { color: var(--s-muted); }
.ann-nav button[hidden] { display: none; }

/* ---------- task figure: the click-through of the seven parts ---------- */
.tour { --tour-marker: #e8590c; --tour-reserve: 440px; margin: 0 0 30px; }
.tour-canvas { position: relative; margin: 0 0 0 34px; }   /* room for left badges */
.tour-image {
  position: absolute; overflow: hidden;
  border: 1px solid var(--border, #d8dde3); border-radius: 10px;
  background: #fff; box-shadow: 0 6px 22px rgba(0, 0, 0, .07);
}
.tour-image img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.tour-arrows { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.tour-arrows path { fill: none; stroke: var(--tour-marker); color: var(--tour-marker); stroke-width: 2.2; stroke-linecap: round; transition: opacity .25s; }
.tour-arrows path.is-past { opacity: .4; }

.tour-mark { position: absolute; border: 2.5px dashed var(--tour-marker); border-radius: 7px; pointer-events: none; transition: opacity .25s; }
.tour-mark.no-outline { border-color: transparent; }
.tour-mark[hidden] { display: none; }
.tour-mark.is-past { opacity: .4; }
.tour-mark.is-current { animation: tour-pop .3s ease; }
@keyframes tour-pop { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .tour-mark.is-current { animation: none; } }
.tour-badge {
  position: absolute; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--tour-marker); color: #fff; font: 700 14.5px var(--sans);
  box-shadow: 0 0 0 3px #fff;
}
.tour-badge.at-left { left: -36px; top: 50%; transform: translateY(-50%); }
.tour-badge.at-top { left: 50%; top: -36px; transform: translateX(-50%); }
.tour-badge.at-corner { left: -16px; top: -24px; }

/* One row under the picture: where you are, the parts, and the way through. */
.tour-nav { display: flex; align-items: center; gap: 10px; margin: 6px 0 0 34px; }
.tour-text { margin: 0 12px 0 0; font-size: 15.5px; font-weight: 600; white-space: nowrap; }
.tour-nav button[hidden] { display: none; }
.tour-nav button:disabled { opacity: .45; cursor: default; }
.tour-dots { display: flex; gap: 6px; margin-right: auto; }
.tour-dot {
  width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--border, #d8dde3); background: var(--surface, #fff);
  font: 600 12.5px var(--sans); color: var(--text-dim, #57606a); cursor: pointer;
}
.tour-dot.is-seen { border-color: var(--tour-marker); color: var(--tour-marker); }
.tour-dot.is-current { background: var(--tour-marker); border-color: var(--tour-marker); color: #fff; }
@media (max-width: 620px) {
  .tour-badge { width: 22px; height: 22px; font-size: 12px; }
  .tour-badge.at-left { left: -28px; }
  .tour-dots { display: none; }
}

/* ---------- consent ---------- */
.consent-doc { max-width: 68ch; }
.consent-doc h1 { font-size: 26px; font-weight: 700; margin: 0 0 6px; }
.consent-doc h2 { font-size: 18px; font-weight: 600; color: var(--s-muted); margin: 0 0 22px; }
.consent-doc h3 { font-size: 16.5px; font-weight: 600; margin: 28px 0 8px; }
.consent-doc p { white-space: pre-line; }   /* keeps the investigator's details on their own lines */
.consent-doc a { color: var(--s-accent); }
.consent-choice {
  max-width: 68ch; margin-top: 8px; padding: 20px 22px 8px;
  border: 1px solid var(--s-line); border-radius: 12px; background: #fafbfc;
}
.consent-confirm-intro { margin: 0 0 6px; font-size: 15.5px; }
.consent-confirmations { margin: 0 0 18px; padding-left: 22px; font-size: 15px; line-height: 1.7; color: var(--s-muted); }
.consent-choice .field { padding-bottom: 14px; }
.consent-choice .field-label { font-weight: 600; margin-bottom: 8px; }
.consent-option { padding: 9px 0; }
.consent-sign { padding-bottom: 14px; }
.consent-sign .field-label { display: block; }
.consent-name { display: block; width: 100%; max-width: 420px; margin-top: 8px; }
.consent-date { margin: 12px 0 0; font-size: 15px; }
.consent-doc .callout { margin: 0 0 20px; padding: 12px 18px; background: #fff4d6; border-left: 4px solid #e8a317; border-radius: 8px; }
.consent-doc .callout > :first-child { margin-top: 0; }
.consent-doc .callout > :last-child { margin-bottom: 0; }

/* Test stages split into pages by a page-break item: one shown at a time. */
.test-page[hidden], .actions[hidden] { display: none; }

/* A note under a field, e.g. which email addresses are accepted. */
.field-note { margin: 6px 0 0; font-size: 13.5px; color: var(--s-muted); }
.field.missing .field-note { color: #b42318; }

/* Local testing only: the condition switcher on the instruction page. */
.dev-conditions { display: flex; align-items: center; gap: 6px; margin: 0 0 18px; padding: 8px 12px; border: 1px dashed #d97706; border-radius: 8px; background: #fffbeb; font-size: 13px; color: #92400e; }
.dev-conditions button { font: inherit; font-weight: 600; min-width: 32px; padding: 3px 10px; border-radius: 6px; border: 1px solid #f59e0b; background: #fff; color: #92400e; cursor: pointer; }
.dev-conditions button.is-current { background: #f59e0b; color: #fff; }

/* Callouts in a task brief (":::name" blocks; a "> " line is the plain one),
   coloured by what each part does. */
.task-text blockquote,
.task-text .callout {
  margin: 14px 0; padding: 12px 18px;
  background: #fff4d6; border-left: 4px solid #e8a317; border-radius: 8px;
  color: var(--s-text, #1f2328);
}
.task-text .callout > :first-child { margin-top: 0; }
.task-text .callout > :last-child { margin-bottom: 0; }
.task-text .callout ul { margin: 6px 0 0; }
.task-text .md-img { display: block; width: 100%; max-width: 1240px; height: auto; margin: 14px 0; border-radius: 10px; }
.task-text .callout-given { background: #fff4d6; border-left-color: #e8a317; }
.task-text .callout-goal  { background: #e3f4ec; border-left-color: #0b7a5e; }
.task-text .callout-tabs  { background: #e8f0fa; border-left-color: #3677bb; }
/* A tab's name in the brief, in that tab's colour, with its letter
   (markTabNames). Solid, so each stands out from the box around it. */
.tab-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 1px 9px 1px 4px; border-radius: 6px;
  color: #fff; vertical-align: baseline; background: var(--tab-color);
}
.tab-chip .favicon {
  width: 17px; height: 17px; border-radius: 4px; display: inline-grid; place-items: center;
  font-size: 9.5px; font-weight: 700; background: #fff; color: var(--tab-color);
}
.tab-chip-task { --tab-color: #e8590c; }
.tab-chip-example { --tab-color: #1c7ed6; }
.tab-chip-chat { --tab-color: #2b8a3e; }
.tab-chip-ide { --tab-color: #7048e8; }
.task-text .callout-time  { background: #fdecee; border-left-color: #c2255c; }
.task-text .callout-note  { background: #f1ebfb; border-left-color: #7950f2; }

/* The instruction stage's welcome: the topic, then "I'm ready!". */
.welcome { max-width: 1000px; margin-bottom: 90px; }
.welcome-title { font-size: 34px; margin: 0 0 18px; }
.welcome-text { font-size: 17px; line-height: 1.75; }
.welcome-go { display: flex; align-items: center; gap: 18px; margin-top: 30px; padding: 18px 22px; background: #e3f4ec; border-left: 4px solid #0b7a5e; border-radius: 8px; }
.welcome-go p { margin: 0; font-weight: 600; font-size: 17px; flex: 1; }
.welcome-carousel { display: flex; flex-direction: column; align-items: center; margin: 24px 0 18px; }
.welcome-stage { display: flex; align-items: center; gap: 16px; width: 100%; justify-content: center; }
.welcome-arrow { flex: none; width: 48px; height: 48px; border-radius: 50%; border: 1px solid #c9ced6; background: #fff;
  font: 400 30px/1 var(--sans, system-ui); color: #1f2328; cursor: pointer; display: grid; place-items: center; padding: 0 0 4px;
  box-shadow: 0 2px 6px rgba(16,22,30,.08); }
.welcome-arrow:hover { border-color: #0b7a5e; color: #0b7a5e; }
.welcome-slide { display: block; flex: 1; min-width: 0; width: 100%; max-width: 860px; aspect-ratio: 16 / 10; object-fit: contain;
  background: #f4f5f7; border: 1px solid #dfe1e4; border-radius: 12px; }
.welcome-caption { margin: 10px 0 0; font-size: 14px; color: var(--s-muted); text-align: center; }
.welcome-controls { display: flex; align-items: center; gap: 16px; margin-top: 12px; }
.welcome-dots { display: flex; gap: 8px; }
.welcome-dot { width: 10px; height: 10px; padding: 0; border-radius: 50%; border: none; background: #c9ced6; cursor: pointer; }
.welcome-dot.on { background: #0b7a5e; }

/* The walkthrough's story bubble, beside the highlighted part. */
.ann-bubble { position: absolute; z-index: 4; width: 38%; padding: 14px 18px; background: #fffdf8;
  border: 2px solid var(--ann-marker, #e8590c); border-radius: 12px; box-shadow: 0 10px 28px rgba(16,22,30,.22);
  font-size: 15.5px; line-height: 1.55; color: #1f2328; }
.ann-bubble p { margin: 0; }
/* Sliding aside when the student opens something on the live page. */
.ann-bubble.sliding { transition: left .5s ease, top .5s ease; }
.ann-bubble strong { color: #b9441a; }

/* A live example page in the instruction, scaled to fit. */
.ann-shot-live { background: #f6f6f4; border-radius: 0 0 10px 10px; }
.ann-live-clip { position: absolute; inset: 0; overflow: hidden; border-radius: 0 0 10px 10px; }
.ann-shot-live iframe { position: absolute; left: 0; top: 0; border: 0; transform-origin: 0 0; pointer-events: none; }
/* A step that asks the student to click the page lets clicks through. */
.ann-live-on iframe { pointer-events: auto; }
.ann-overview { display: flex; align-items: center; gap: 24px; margin-top: 20px; padding: 18px 22px; background: #e3f4ec; border-left: 4px solid #0b7a5e; border-radius: 8px; }
.ann-overview[hidden], .ann-nav[hidden], .ann-bubble[hidden] { display: none; }
.ann-overview-text { flex: 1; font-size: 16.5px; line-height: 1.6; }
.ann-overview-text p { margin: 0; }

/* Naming the parts one at a time: the question under the page, and the
   labels that fly up and stick beside each spot. */
.ann-ask { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 20px;
  padding: 16px 18px; border: 1px solid var(--s-line, #e2e0d8); border-radius: 12px; background: #fffdf8; }
.ann-ask[hidden] { display: none; }
.ann-ask-label { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; }
.ann-ask-select { flex: 1 1 320px; max-width: none; margin: 0; padding: 9px 10px; }
.ann-tag { position: absolute; z-index: 5; max-width: 30%; padding: 6px 12px; border: 2px solid #e8590c; border-radius: 9px;
  background: #fff7ef; color: #7a2e08; font-family: inherit; font-weight: 600; font-size: 13.5px; line-height: 1.35; text-align: left; cursor: pointer;
  box-shadow: 0 6px 16px rgba(0,0,0,.14); }
.ann-tag[data-side="right"], .ann-tag[data-side="left"] { translate: 0 -50%; }
.ann-tag[data-side="right"]::before, .ann-tag[data-side="left"]::before, .ann-tag[data-side="below"]::before {
  content: ""; position: absolute; width: 10px; height: 10px; background: inherit; border: inherit; border-width: 0 0 2px 2px; }
.ann-tag[data-side="right"]::before { left: -7px; top: calc(50% - 5px); rotate: 45deg; }
.ann-tag[data-side="left"]::before { right: -7px; top: calc(50% - 5px); rotate: 225deg; }
.ann-tag[data-side="below"]::before { left: 18px; top: -7px; rotate: 135deg; }
.ann-tag[data-side="below-right"]::before { content: ""; position: absolute; width: 10px; height: 10px; background: inherit; border: inherit; border-width: 0 0 2px 2px; right: 18px; top: -7px; rotate: 135deg; }
.ann-tag { transition: opacity .3s ease; }
.ann-tag.is-compact { padding: 1px 9px; font-size: 12.5px; line-height: 1.4; border-radius: 7px; }
.ann-tag.is-right { border-color: var(--ann-right, #2f8a4c); background: #eef8f1; color: #1d5a31; }
.ann-tag.is-wrong { border-color: var(--s-error, #c0392b); background: #fdeeee; color: #8c2219; }
.ann-tag.is-right::after { content: " ✓"; } .ann-tag.is-wrong::after { content: " ✗"; }
@media (prefers-reduced-motion: reduce) { .ann-tag { animation: none; } }

/* Between the walkthrough and the check: "Let's practice..." and Ready? */
.ann-ready { margin-top: 8px; }

/* A brief that opens with one part (`taskFirst`) and unfolds the rest when
   the student comes back from the example. */
.task-first-go { margin-top: 4px; }
/* `briefInSteps`: one piece of the brief at a time, each with an Okay */
.brief-ok { margin-top: 10px; }
.brief-piece.is-read .brief-ok { display: none; }
.brief-piece.is-unfolding { animation: task-unfold .6s ease both; }
@media (prefers-reduced-motion: reduce) { .brief-piece.is-unfolding { animation: none; } }
/* The assistant and the editor, shut until the brief has been read */
.tab.is-locked { opacity: .4; cursor: not-allowed; }
.task-first.is-done .task-first-go { display: none; }
.task-more.is-unfolding { animation: task-unfold .6s ease both; }
@keyframes task-unfold { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .task-more.is-unfolding { animation: none; } }

/* The task figure's arrows, either side of the picture. */
.tour-stage { display: flex; align-items: center; gap: 16px; }
.tour-stage .tour-canvas { margin-left: 34px; }
.tour-arrow { flex: none; width: 48px; height: 48px; border-radius: 50%; border: 1px solid #c9ced6; background: #fff;
  font: 400 30px/1 var(--sans, system-ui); color: #1f2328; cursor: pointer; display: grid; place-items: center; padding: 0 0 4px;
  box-shadow: 0 2px 6px rgba(16,22,30,.08); }
.tour-arrow:hover { border-color: #0b7a5e; color: #0b7a5e; }
.tour-stage + .tour-nav { margin-left: 98px; }
/* A box inside the tabs box, tucked under its last item (the Code Editor). */
.callout .callout { margin: 6px 0 4px 24px; }
/* A footer made of boxes (the tabs and the time, under the task figure) reads
   like the brief above it, not like small print. */
.task-footer:has(.callout) { font-size: inherit; line-height: inherit; color: inherit; }
/* A badge at the right end of its part (e.g. a bar across the whole page,
   whose left end holds another part's badge). */
.tour-badge.at-right { left: auto; right: 10px; top: 50%; transform: translateY(-50%); }

/* Sign-in: the "password emailed" note sits above the password, as a callout. */
.login-sent { margin: 0 0 16px; padding: 12px 14px; border-radius: 10px; background: #e3f3ec; color: #14532d;
  border-left: 4px solid #0b7a5e; font-size: 15px; }
.login-form input[readonly] { background: #f4f5f7; color: var(--s-muted); }

/* `finishEarly: false`: the activity ends only when its time runs out. */
#finish-activity[hidden] { display: none !important; }

/* Coming back after leaving the study window (see stay.js). */
.stay-banner { position: fixed; z-index: 2000; top: 18px; left: 50%; transform: translateX(-50%);
  width: min(560px, calc(100vw - 32px)); display: flex; align-items: center; gap: 16px;
  padding: 16px 18px; border-radius: 12px; background: #fff7e6; border: 1px solid #f0c36d;
  box-shadow: 0 12px 32px rgba(16,22,30,.18); color: #4a3200; font-size: 15.5px; line-height: 1.45; }
.stay-banner p { margin: 0; flex: 1; }
.stay-banner button { flex: none; }
.stay-banner[hidden] { display: none; }

/* Under a reply that is still coming after ~24 s (see chat.js streamReply). */
.chat-slow { margin: 10px 0 0; font-size: 13.5px; color: var(--s-muted, #6b7280); font-style: italic; }

/* A smaller instruction picture (short screens) keeps a readable story bubble. */
.ann-bubble { min-width: 270px; }

/* Between a stage whose time ran out and the next (study.js renderTimeUp). */
.survey-body.time-up { max-width: 560px; padding-top: 14vh; text-align: center; }
.time-up-icon { font-size: 54px; line-height: 1; margin-bottom: 14px; }
.time-up .intro { font-size: 18px; }
.time-up-next { color: var(--s-muted); margin: 6px 0 26px; }

/* Part A of the tests: a picture per question (fill-blanks with `visual`),
   stacked - question, the picture at full width, the answer under it. */
.survey-body.survey-body-visual { max-width: 960px; }
.blank.blank-visual { grid-template-columns: 22px minmax(0, 1fr); align-items: start; row-gap: 12px; }
.blank-visual .blank-body { display: grid; gap: 10px; }
.blank-visual .blank-def { margin: 0; font-weight: 600; }
.field-image { display: block; width: 100%; max-width: 760px; margin: 4px 0 14px; border: 1px solid var(--s-line, #d8dde3); border-radius: 8px; }
.blank-image { width: 100%; height: auto; border: 1px solid #dfe1e4; border-radius: 10px; background: #ffffff; }
.blank-visual .blank-input { grid-column: 2; width: min(100%, 320px); }

/* "Click on it to explore more first!" beside Next (annotated.js). */
.ann-nav .ann-try-first { margin: 0 auto 0 16px; font-weight: 600; }
/* The researcher's assistant-mode switch, at the left of the Finish bar. */
.workspace-actions .dev-mode { margin: 0 auto 0 0; }
.dev-mode .dev-model { font: inherit; font-weight: 600; padding: 3px 6px; border-radius: 6px; border: 1px solid #f59e0b; background: #fff; color: #92400e; }

/* "Now get ready to ..." between two parts (study.js renderBreak). */
.time-up .get-ready { margin: 22px 0 4px; padding: 14px 18px; border-radius: 12px; background: #eef6f1; color: var(--s-text, #1f2328); font-size: 19px; }
.time-up .get-ready p { margin: 0; }
/* Tabs cannot be closed or added (workspace.js TABS_FIXED). */
.tab .tab-close, #new-tab { display: none !important; }
/* The researcher's stage picker (study.js syncStagePicker): bottom centre, above everything. */
.dev-stage { position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%); z-index: 900; display: flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px dashed #d97706; border-radius: 8px; background: #fffbeb; color: #92400e; font-size: 13px; box-shadow: 0 2px 8px rgba(0, 0, 0, .08); }
.dev-stage select { font: inherit; font-weight: 600; padding: 2px 4px; border-radius: 6px; border: 1px solid #f59e0b; background: #fff; color: #92400e; }
/* In an activity: in the bar beside Finish, clear of the researcher's mode bar. */
body:has(#workspace:not([hidden])) .dev-stage { left: auto; right: 190px; transform: none; bottom: 48px; box-shadow: none; }

/* ---------- feedback after a coding activity (renderFeedback) ---------- */
.fb-heading { font-size: 17px; margin: 26px 0 8px; }
.fb-note { color: var(--s-muted, #57606a); font-size: 14px; margin: 6px 0 10px; }
.fb-checks { display: grid; gap: 8px; margin: 14px 0 6px; }
.fb-check { display: flex; gap: 12px; align-items: center; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--s-line, #d8dde3); background: #fff; font-size: 15px; }
.fb-check.is-ok { border-color: #b7e4c7; background: #f1fbf4; }
.fb-check.is-bad { border-color: #f5c2c0; background: #fdf3f2; }
.fb-mark { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; }
.fb-check.is-ok .fb-mark { background: #2f9e44; }
.fb-check.is-bad .fb-mark { background: #c92a2a; }
.fb-check-text { font-weight: 600; }
/* Their file and the expected one, side by side, scrolling together */
.survey-body.survey-body-feedback { max-width: min(1440px, calc(100vw - 48px)); }
.fb-sides { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.fb-diff { margin-top: 22px; }
.fb-side-title { font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.fb-scroll { max-height: 460px; overflow-y: auto; overflow-x: hidden; align-items: start; }
.fb-table { border-collapse: collapse; width: 100%; table-layout: auto; font-size: 13px; font-variant-numeric: tabular-nums; border: 1px solid var(--s-line, #d8dde3); }
.fb-table th { position: sticky; top: 0; background: #f6f8fa; text-align: left; font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--s-line, #d8dde3); }
.fb-table td { padding: 5px 8px; border-bottom: 1px solid #eef1f4; white-space: nowrap; }
.fb-table th, .fb-table td { line-height: 20px; }
.fb-table.is-mine .is-diff { background: #ffe3e3; color: #c92a2a; font-weight: 600; }
.fb-table.is-expected .is-diff { background: #efe7fd; color: #6741d9; font-weight: 600; }
.fb-none { display: grid; place-items: center; min-height: 120px; border: 1px dashed #c92a2a; border-radius: 8px; color: #c92a2a; font-weight: 600; background: #fdf3f2; }
.fb-code { margin: 0 0 8px; padding: 14px 16px; background: #1f2328; color: #f6f8fa; border-radius: 10px; font-size: 13.5px; line-height: 1.6; overflow-x: auto; }

/* A researcher's preview of another cohort's version of a stage */
.preview-note { margin: 0 0 18px; padding: 8px 12px; border-radius: 8px; background: #fff4d6; border: 1px solid #f0d58a; font-size: 14px; }

/* An answer with a line under it saying what it means */
.option-text { display: flex; flex-direction: column; }
.option-hint { font-size: 13.5px; color: var(--s-muted, #57606a); margin-top: 2px; }

/* The PrairieLearn credit code on the done page (study.js renderDone). */
.credit-code { margin-top: 24px; padding: 16px 20px; border-radius: 10px; background: #e3f4ec; border-left: 4px solid #0b7a5e; }
.credit-code p { margin: 0; }
.credit-code-value { margin-top: 8px !important; font-family: var(--s-mono, ui-monospace, Menlo, monospace); font-size: 30px; font-weight: 700; letter-spacing: .18em; user-select: all; }
.credit-code-after { margin-top: 10px !important; }