/* ============================================================
   The Baker Street File — Design Tokens & Base Styles
   SACE Stage 1 Philosophy — Standard Form

   Aesthetic: Late-Victorian dark academia, warm parchment palette,
   Edward Gorey-meets-Sherlock illustration sensibility. Resists
   deerstalker cliché; relies on candlelight, leather, ink, brass.
   Designed for desktop classroom projection (1920×1080+).
   ============================================================ */

:root {
  /* === Colour palette === */
  --ink:        #14171F;   /* Page background — dark midnight */
  --ink-soft:   #1F232E;   /* Card / panel background */
  --ink-deep:   #0B0D14;   /* Deepest letterbox */
  --parchment:  #F5EBD8;   /* Body paper, casebook pages */
  --parchment-warm: #ECDFC5;
  --parchment-edge: #C9B98F;
  --oxblood:    #6B1F1F;   /* Headings, key callouts, wax seal */
  --oxblood-bright: #A93B3B;  /* Active/accent state — passes 4.5:1 on parchment */
  --brass:      #B89968;   /* Interactive accent, frames */
  --brass-soft: #E0C99B;
  --evidence:   #5F7C3F;   /* "Validated" green, evidence tag */
  --evidence-soft: #A8C083;
  --chalk:      #E8E4D8;   /* Soft white text on dark */
  --chalk-mute: #9A968B;   /* Muted body on dark */
  --warning:    #C77B36;   /* Mistake, "rejected" */
  --crime:      #4A1A1F;   /* Deep blood-tone (used sparingly) */

  /* === Type scale (Perfect Fourth from 18px) === */
  --type-base: 18px;
  --type-sm:   16px;
  --type-md:   24px;
  --type-lg:   32px;
  --type-xl:   42px;
  --type-2xl:  56px;
  --type-display: 72px;

  /* === Spacing (8px grid) === */
  --s-1: 8px;
  --s-2: 16px;
  --s-3: 24px;
  --s-4: 32px;
  --s-5: 48px;
  --s-6: 64px;
  --s-7: 96px;

  /* === Typography === */
  --font-display: "Playfair Display", "Cormorant Garamond", Georgia, serif;
  --font-body:    "Lora", "Crimson Pro", Georgia, serif;
  --font-evidence: "Special Elite", "IBM Plex Mono", "Courier New", monospace;
  --font-ui:      "Lora", Georgia, serif;

  /* === Effects === */
  --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.4), 0 2px 4px rgba(0, 0, 0, 0.2);
  --shadow-deep: 0 20px 60px rgba(0, 0, 0, 0.6);
  --paper-grain: radial-gradient(circle at 20% 30%, rgba(0,0,0,0.04) 0%, transparent 40%),
                 radial-gradient(circle at 80% 70%, rgba(0,0,0,0.03) 0%, transparent 50%);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;

  --transition-fast: 0.15s ease;
  --transition-mid:  0.3s ease;
}

/* === Reduced motion === */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* === Reset === */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: var(--type-base);
  line-height: 1.5;
  color: var(--chalk);
  background: var(--ink-deep);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background:
    radial-gradient(ellipse at top, var(--ink) 0%, var(--ink-deep) 70%),
    var(--ink-deep);
  background-attachment: fixed;
  overflow-x: hidden;
}

/* Atmospheric vignette + faint grain — no decorative; sets mood without distracting */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.5) 100%),
    var(--paper-grain);
  pointer-events: none;
  z-index: 1;
}

#app {
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: 100vh;
}

/* === Typography defaults === */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  color: var(--parchment);
  letter-spacing: -0.01em;
}
h1 { font-size: var(--type-2xl); }
h2 { font-size: var(--type-xl); }
h3 { font-size: var(--type-lg); }
h4 { font-size: var(--type-md); }

p { margin-bottom: var(--s-2); }
em { font-style: italic; color: var(--brass-soft); }
strong { color: var(--parchment); font-weight: 600; }

/* === Skip link (a11y) === */
.skip-link {
  position: absolute;
  top: -999px;
  left: var(--s-1);
  z-index: 9999;
  background: var(--parchment);
  color: var(--ink);
  padding: var(--s-2) var(--s-3);
  font-family: var(--font-ui);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-sm);
}
.skip-link:focus { top: var(--s-1); outline: 3px solid var(--brass); outline-offset: 3px; }

/* === Visually-hidden utility === */
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* === Global focus indicator === */
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible,
a:focus-visible {
  outline: 3px solid var(--brass) !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 6px rgba(184, 153, 104, 0.25) !important;
}

/* === Buttons === */
button, .btn {
  font-family: var(--font-ui);
  font-size: var(--type-base);
  font-weight: 600;
  padding: var(--s-2) var(--s-3);
  background: var(--oxblood);
  color: var(--parchment);
  border: 2px solid var(--brass);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
  min-height: 44px;
  letter-spacing: 0.02em;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-1);
}
button:hover:not(:disabled),
.btn:hover {
  background: var(--oxblood-bright);
  transform: translateY(-1px);
  box-shadow: var(--shadow-card);
}
button:active:not(:disabled) { transform: translateY(0); }
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  background: transparent;
  color: var(--brass-soft);
  border-color: var(--brass);
}
.btn-secondary:hover {
  background: var(--ink-soft);
  color: var(--parchment);
}

.btn-ghost {
  background: transparent;
  color: var(--chalk-mute);
  border-color: var(--chalk-mute);
}
.btn-ghost:hover {
  color: var(--parchment);
  border-color: var(--parchment);
  background: rgba(245, 235, 216, 0.06);
}

.btn-large {
  font-size: var(--type-md);
  padding: var(--s-3) var(--s-5);
  min-height: 56px;
}

/* === Cards & panels === */
.panel {
  background: var(--ink-soft);
  border: 1px solid rgba(184, 153, 104, 0.3);
  border-radius: var(--radius-md);
  padding: var(--s-4);
  box-shadow: var(--shadow-card);
}

.parchment {
  background:
    var(--paper-grain),
    var(--parchment);
  color: var(--ink);
  border: 1px solid var(--parchment-edge);
  border-radius: var(--radius-sm);
  padding: var(--s-4);
  box-shadow: var(--shadow-card);
  font-family: var(--font-body);
  position: relative;
}
.parchment h1, .parchment h2, .parchment h3, .parchment h4 { color: var(--oxblood); }
.parchment em { color: var(--oxblood); }
.parchment strong { color: var(--ink); }

.parchment::after {
  /* Subtle deckle edge effect */
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: var(--radius-sm);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.05);
}

/* === Standard-form premise / conclusion display === */
.standard-form {
  font-family: var(--font-evidence);
  font-size: var(--type-base);
  line-height: 1.7;
  background: var(--parchment);
  color: var(--ink);
  padding: var(--s-3) var(--s-4);
  border-left: 4px solid var(--oxblood);
  border-radius: var(--radius-sm);
  margin-block: var(--s-2);
  white-space: pre-wrap;
}
.standard-form .conclusion {
  border-top: 1px solid var(--ink);
  margin-top: var(--s-2);
  padding-top: var(--s-2);
  font-weight: 600;
}

/* === Layout helpers === */
.stage {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--s-5) var(--s-4);
}
.stage-narrow { max-width: 880px; }
.stage-wide { max-width: 1440px; }

.stack > * + * { margin-top: var(--s-3); }
.stack-tight > * + * { margin-top: var(--s-2); }
.stack-wide > * + * { margin-top: var(--s-5); }

.row {
  display: flex;
  gap: var(--s-3);
  align-items: center;
  flex-wrap: wrap;
}
.row-spread { justify-content: space-between; }
.row-end    { justify-content: flex-end; }

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-3);
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-3);
}

/* === Status pill === */
.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  padding: 4px 12px;
  font-family: var(--font-ui);
  font-size: var(--type-sm);
  font-weight: 600;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1px solid currentColor;
}
.pill-evidence { color: var(--evidence-soft); border-color: var(--evidence); background: rgba(95, 124, 63, 0.15); }
.pill-warning  { color: #E89E5C; border-color: var(--warning); background: rgba(199, 123, 54, 0.15); }
.pill-brass    { color: var(--brass-soft); border-color: var(--brass); background: rgba(184, 153, 104, 0.12); }
.pill-deep     { color: var(--parchment); border-color: var(--oxblood); background: var(--oxblood); }

/* === Title screen === */
.title-stage {
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: var(--s-5);
  position: relative;
}
.title-mark {
  font-family: var(--font-evidence);
  font-size: var(--type-sm);
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: var(--s-3);
}
.title-main {
  font-size: var(--type-display);
  color: var(--parchment);
  margin-bottom: var(--s-2);
  text-shadow: 0 4px 32px rgba(0,0,0,0.6);
  font-style: italic;
  font-weight: 700;
}
@media (max-width: 720px) {
  .title-main { font-size: var(--type-2xl); }
}
.title-sub {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--type-md);
  color: var(--brass-soft);
  margin-bottom: var(--s-5);
  font-weight: 400;
}
.title-byline {
  font-family: var(--font-ui);
  color: var(--chalk-mute);
  font-size: var(--type-sm);
  margin-bottom: var(--s-5);
}
.title-acts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--s-2);
  max-width: 960px;
  margin: 0 auto var(--s-5);
}
.act-tile {
  background: var(--ink-soft);
  border: 1px solid rgba(184, 153, 104, 0.35);
  border-radius: var(--radius-md);
  padding: var(--s-3);
  text-align: left;
  cursor: pointer;
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
  position: relative;
}
.act-tile:hover, .act-tile:focus-visible {
  transform: translateY(-2px);
  border-color: var(--brass);
  box-shadow: var(--shadow-card);
}
.act-tile:disabled, .act-tile.locked {
  opacity: 0.45;
  cursor: not-allowed;
}
.act-tile .act-num {
  font-family: var(--font-evidence);
  font-size: var(--type-sm);
  color: var(--brass);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.act-tile .act-name {
  font-family: var(--font-display);
  font-size: var(--type-md);
  font-style: italic;
  color: var(--parchment);
  margin: var(--s-1) 0;
}
.act-tile .act-desc {
  font-size: var(--type-sm);
  color: var(--chalk-mute);
  line-height: 1.45;
}
.act-tile .act-status {
  margin-top: var(--s-2);
  font-family: var(--font-evidence);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.act-tile.complete::after {
  content: "✓";
  position: absolute;
  top: var(--s-2); right: var(--s-2);
  font-size: var(--type-md);
  color: var(--evidence-soft);
}

/* === Topbar (within an act) === */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 13, 20, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(184, 153, 104, 0.25);
  padding: var(--s-2) var(--s-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
}
.topbar .topbar-title {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--type-md);
  color: var(--parchment);
}
.topbar .topbar-meta {
  font-family: var(--font-evidence);
  font-size: 13px;
  color: var(--brass);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* === Speech bubble (Watson, Mycroft, Sapolsky, etc.) === */
.speech {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: var(--s-3);
  align-items: start;
  background: var(--ink-soft);
  border: 1px solid rgba(184, 153, 104, 0.25);
  border-radius: var(--radius-md);
  padding: var(--s-3);
}
.speech .avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--ink-deep);
  border: 2px solid var(--brass);
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-size: var(--type-lg);
  font-style: italic;
  color: var(--brass-soft);
  font-weight: 700;
  flex-shrink: 0;
}
.speech .who {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--brass-soft);
  font-size: var(--type-md);
  margin-bottom: var(--s-1);
}
.speech .what { line-height: 1.55; color: var(--chalk); }
.speech .what em { color: var(--brass-soft); }
.speech.sapolsky .avatar { border-color: #6E8FB7; color: #B7CCE0; }
.speech.sapolsky .who { color: #B7CCE0; }
.speech.mycroft .avatar { border-color: var(--oxblood-bright); color: var(--oxblood-bright); }
.speech.mycroft .who { color: var(--oxblood-bright); }
.speech.holmes .avatar { border-color: var(--brass); color: var(--brass-soft); }
.speech.lestrade .avatar { border-color: var(--evidence-soft); color: var(--evidence-soft); }
.speech.lestrade .who { color: var(--evidence-soft); }

/* === Drag-drop slots (Act I) === */
.slot {
  background: var(--ink-deep);
  border: 2px dashed var(--brass);
  border-radius: var(--radius-sm);
  padding: var(--s-3);
  min-height: 64px;
  display: flex; align-items: center; gap: var(--s-2);
  font-family: var(--font-evidence);
  color: var(--chalk-mute);
  transition: background var(--transition-fast), border-color var(--transition-fast);
}
.slot.drop-target { background: rgba(184, 153, 104, 0.15); border-color: var(--brass-soft); }
.slot.filled {
  background: var(--parchment);
  color: var(--ink);
  border: 2px solid var(--evidence);
  border-style: solid;
}
.slot.wrong { border-color: var(--warning); }
.slot .slot-label {
  font-family: var(--font-evidence);
  color: var(--brass);
  font-size: var(--type-sm);
  letter-spacing: 0.1em;
  margin-right: var(--s-2);
  white-space: nowrap;
}
.slot.filled .slot-label { color: var(--oxblood); }

.card-shelf {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  padding: var(--s-3);
  background: var(--ink-deep);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(184, 153, 104, 0.2);
  min-height: 120px;
}
.argcard {
  background: var(--parchment);
  color: var(--ink);
  padding: var(--s-2) var(--s-3);
  border-radius: var(--radius-sm);
  border: 1px solid var(--parchment-edge);
  font-family: var(--font-evidence);
  cursor: grab;
  user-select: none;
  max-width: 480px;
  font-size: 17px;
  line-height: 1.45;
  position: relative;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  box-shadow: var(--shadow-card);
}
.argcard:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0,0,0,0.5); }
.argcard.selected { outline: 3px solid var(--brass); outline-offset: 3px; }
.argcard.placed { opacity: 0.35; cursor: default; pointer-events: none; }
.argcard.dragging { opacity: 0.7; cursor: grabbing; }

/* === Modals === */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: grid;
  place-items: center;
  padding: var(--s-4);
  z-index: 100;
  animation: fadein var(--transition-mid);
}
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--ink-soft);
  border: 1px solid var(--brass);
  border-radius: var(--radius-lg);
  padding: var(--s-5);
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-deep);
}
.modal h2 { margin-bottom: var(--s-3); }

/* === Casebook (cross-act dossier) === */
.casebook-toggle {
  position: fixed;
  bottom: var(--s-4);
  right: var(--s-4);
  z-index: 60;
  font-family: var(--font-evidence);
}
.casebook-panel {
  position: fixed;
  top: 0; right: 0;
  width: min(420px, 100vw);
  height: 100vh;
  background: var(--ink-soft);
  border-left: 1px solid var(--brass);
  box-shadow: -20px 0 40px rgba(0,0,0,0.5);
  padding: var(--s-4);
  overflow-y: auto;
  z-index: 80;
  transform: translateX(100%);
  transition: transform var(--transition-mid);
}
.casebook-panel[data-open="true"] { transform: translateX(0); }
.casebook-entry {
  padding: var(--s-2);
  border-bottom: 1px solid rgba(184, 153, 104, 0.2);
}
.casebook-entry .stamp {
  font-family: var(--font-evidence);
  font-size: 13px;
  color: var(--brass);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.casebook-entry .quote {
  font-style: italic;
  color: var(--parchment);
  margin-top: var(--s-1);
}

/* === Loading / thinking === */
.thinking {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}
.thinking::before {
  content: "";
  width: 12px; height: 12px;
  border: 2px solid var(--brass);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* === Scene illustrations === */
.scene-art {
  width: 100%;
  max-width: 720px;
  height: 320px;
  background: var(--ink-deep);
  border: 1px solid var(--brass);
  border-radius: var(--radius-md);
  background-size: cover;
  background-position: center;
  display: grid;
  place-items: center;
  margin-bottom: var(--s-3);
}
.scene-art-fallback {
  font-family: var(--font-evidence);
  color: var(--brass);
  font-size: var(--type-md);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* === Reference shelf (always-on tools) === */
.shelf {
  background: var(--ink-deep);
  border: 1px solid rgba(184, 153, 104, 0.25);
  border-radius: var(--radius-md);
  padding: var(--s-3);
}
.shelf h4 {
  font-size: var(--type-sm);
  color: var(--brass);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: var(--s-2);
  font-family: var(--font-evidence);
  font-weight: 400;
}
.shelf p, .shelf li {
  font-size: 15px;
  color: var(--chalk);
  line-height: 1.5;
}
.shelf ul { padding-left: var(--s-3); }
.shelf li { margin-bottom: 6px; }

/* === Mycroft transcript (Act II chat) === */
.transcript {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  max-height: 50vh;
  overflow-y: auto;
  padding: var(--s-3);
  background: var(--ink-deep);
  border-radius: var(--radius-md);
  border: 1px solid rgba(184, 153, 104, 0.25);
}
.msg {
  padding: var(--s-2) var(--s-3);
  border-radius: var(--radius-sm);
  max-width: 80%;
  line-height: 1.5;
}
.msg.user {
  background: var(--ink-soft);
  border: 1px solid var(--brass);
  align-self: flex-end;
  font-family: var(--font-evidence);
  color: var(--parchment);
}
.msg.judge {
  background: var(--parchment);
  color: var(--ink);
  border-left: 4px solid var(--oxblood);
  align-self: flex-start;
  font-family: var(--font-body);
}
.msg.judge .verdict-tag {
  display: inline-block;
  padding: 2px 8px;
  font-family: var(--font-evidence);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-right: var(--s-1);
  border-radius: 2px;
}
.verdict-accept { background: var(--evidence); color: var(--parchment); }
.verdict-reject { background: var(--oxblood); color: var(--parchment); }

/* === Argument editor textarea === */
.arg-editor {
  width: 100%;
  min-height: 180px;
  padding: var(--s-3);
  font-family: var(--font-evidence);
  font-size: var(--type-base);
  line-height: 1.7;
  background: var(--parchment);
  color: var(--ink);
  border: 2px solid var(--parchment-edge);
  border-radius: var(--radius-sm);
  resize: vertical;
}
.arg-editor:focus {
  border-color: var(--brass);
}
.arg-editor::placeholder { color: var(--ink); opacity: 0.4; font-style: italic; }

/* === Hotspot (Act IV) === */
.scene-canvas {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--ink-deep);
  border: 1px solid var(--brass);
  border-radius: var(--radius-md);
  overflow: hidden;
  background-size: cover;
  background-position: center;
}
.hotspot {
  position: absolute;
  background: rgba(184, 153, 104, 0.15);
  border: 2px solid var(--brass);
  border-radius: 50%;
  cursor: pointer;
  width: 56px; height: 56px;
  transform: translate(-50%, -50%);
  display: grid; place-items: center;
  font-family: var(--font-evidence);
  font-size: var(--type-md);
  color: var(--brass-soft);
  transition: transform var(--transition-fast);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(184, 153, 104, 0.6); }
  50% { box-shadow: 0 0 0 12px rgba(184, 153, 104, 0); }
}
.hotspot:hover, .hotspot:focus-visible {
  transform: translate(-50%, -50%) scale(1.15);
  background: rgba(184, 153, 104, 0.35);
}
.hotspot[data-found="true"] {
  border-color: var(--evidence-soft);
  background: rgba(95, 124, 63, 0.4);
  animation: none;
  cursor: default;
}
.hotspot[data-found="true"]::after {
  content: "✓";
  color: var(--evidence-soft);
}

/* === Suspect cards (Act IV) === */
.suspect-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--s-3);
}
.suspect-card {
  background: var(--ink-soft);
  border: 2px solid rgba(184, 153, 104, 0.3);
  border-radius: var(--radius-md);
  padding: var(--s-3);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: inherit;
  width: 100%;
  transition: border-color var(--transition-fast), transform var(--transition-fast);
}
.suspect-card[data-selected="true"] {
  border-color: var(--oxblood-bright);
  background: rgba(169, 59, 59, 0.15);
  transform: translateY(-2px);
}
.suspect-card .name {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--parchment);
  font-size: var(--type-md);
  margin-bottom: var(--s-1);
}
.suspect-card .blurb {
  font-size: 15px;
  color: var(--chalk-mute);
  line-height: 1.45;
}

/* === Toast notification (live region for announcements) === */
.toast {
  position: fixed;
  top: var(--s-4);
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink-soft);
  border: 1px solid var(--brass);
  padding: var(--s-2) var(--s-4);
  border-radius: var(--radius-sm);
  z-index: 200;
  font-family: var(--font-ui);
  color: var(--parchment);
  box-shadow: var(--shadow-card);
  max-width: 90vw;
  text-align: center;
}
.toast.evidence { border-color: var(--evidence); color: var(--evidence-soft); }
.toast.warning { border-color: var(--warning); color: #E89E5C; }

/* === Diagnostic feedback box === */
.feedback {
  background: var(--parchment);
  color: var(--ink);
  padding: var(--s-3);
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--oxblood);
  margin-block: var(--s-2);
}
.feedback.correct { border-left-color: var(--evidence); }
.feedback.partial { border-left-color: var(--warning); }
.feedback h4 { color: var(--oxblood); margin-bottom: var(--s-1); font-style: italic; }

/* === Mobile fallback (we target desktop classroom but don't break on phones) === */
@media (max-width: 720px) {
  :root { --type-base: 17px; }
  .stage { padding: var(--s-3) var(--s-2); }
  .speech { grid-template-columns: 60px 1fr; }
  .speech .avatar { width: 60px; height: 60px; font-size: var(--type-md); }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
