/* Vidya Board.
 *
 * Two decisions drive the whole sheet.
 *
 * The chrome is dark and the board is white. This is projected on a wall in a
 * lit classroom: dark ink on white is what a whiteboard looks like and what the
 * back row can read, while every panel around it recedes so the board wins the
 * attention. It also gives the model the highest-contrast image to read.
 *
 * Nothing that changes during a lesson is allowed to move anything else.
 * Panels reserve their space or overlay; the transcript is a fixed-height box,
 * not a growing one. A layout that reflows while a teacher is mid-sentence
 * pulls their eye off the class.
 */

:root {
  --ink: #12151b;
  --panel: #1a1f29;
  --panel-2: #222937;
  --line: #2f3747;
  --text: #e8ecf3;
  --dim: #98a3b6;
  --faint: #6b7789;
  --accent: #f0a500;      /* the lamp */
  --accent-2: #4f9dd9;
  --good: #35c07a;
  --bad: #e05a5a;
  --board: #fbfaf7;       /* warm white, easier under projector light */
  --radius: 10px;
  --rail: 350px;
}

* { box-sizing: border-box; }

/* The `hidden` attribute is the only show/hide mechanism in the client, and
 * the UA rule behind it is just `[hidden] { display: none }` — which any
 * author `display:` on the same element beats. Five elements here set one
 * (.pulse, .room, .stage, .orb, .report), so without this the page loaded with
 * an empty report modal over the top of everything, swallowing every click
 * including the one on its own close button. Global and !important on purpose:
 * the next panel that grows a `display:` should not reintroduce this. */
[hidden] { display: none !important; }

html, body {
  height: 100%;
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 15px/1.5 "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  overflow: hidden;   /* the app owns the viewport; only panels scroll */
}

button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { margin: 0; font-weight: 650; }
p { margin: 0 0 6px; }

/* ------------------------------------------------------------------ *
 * Top bar
 * ------------------------------------------------------------------ */

.topbar {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 16px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  height: 64px;
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand h1 { font-size: 18px; letter-spacing: -0.2px; }
.brand-line { display: flex; align-items: center; gap: 9px; }

/* Attribution, not co-branding: the chip sits a step back from the product
   name — smaller, dimmer, in a recessed pill — so "Vidya Board" still reads
   as the thing you are looking at and Gemini as what is behind it. The spark
   keeps its own colours; tinting a logo to match a theme is the one thing a
   brand mark may not do. */
.gemini {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px 3px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-2);
  font-size: 10.5px;
  letter-spacing: 0.2px;
  color: var(--dim);
  white-space: nowrap;
}
.gemini img { display: block; }
.lamp { font-size: 24px; filter: drop-shadow(0 0 10px rgba(240, 165, 0, 0.45)); }
.tagline { margin: 0; font-size: 11.5px; color: var(--dim); }

.setup { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.setup label { font-size: 11px; color: var(--dim); display: grid; gap: 2px; }
.setup select {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 5px 8px;
  font: inherit;
  font-size: 13px;
}
.switch {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 6px;
  font-size: 13px !important;
  color: var(--text) !important;
  align-self: end;
  padding-bottom: 5px;
}
.switch input { accent-color: var(--accent); width: 15px; height: 15px; }

.primary {
  background: var(--accent);
  color: #241a00;
  border: 0;
  border-radius: 8px;
  padding: 8px 14px;
  font-weight: 650;
}
.primary:disabled { opacity: 0.4; cursor: default; }
.primary.small { padding: 5px 11px; font-size: 13px; }

/* ---- the pulse strip ---- */

.pulse {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
}
.pulse-item { display: grid; line-height: 1.25; }
.pulse-item b { font-size: 16px; font-variant-numeric: tabular-nums; }
.pulse-item span { font-size: 10.5px; color: var(--faint); text-transform: uppercase;
                   letter-spacing: 0.5px; }
/* The chapter name is the one variable-width item; cap it so a long title
   cannot push the room code off the bar. */
#pulseChapter { max-width: 200px; overflow: hidden; text-overflow: ellipsis;
                white-space: nowrap; font-size: 14px; }

.room {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 9px;
}
.room-label { font-size: 10.5px; color: var(--faint); text-transform: uppercase; }
.room b { font-size: 12px; color: var(--dim); font-weight: 500; }
.room-code {
  font: 700 20px/1 ui-monospace, "SF Mono", Menlo, monospace;
  letter-spacing: 3px;
  color: var(--accent);
}

.badge {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  background: var(--panel-2);
  color: var(--dim);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.badge.live { color: var(--good); border-color: rgba(53, 192, 122, 0.4); }
.badge.speaking { color: var(--accent); border-color: rgba(240, 165, 0, 0.5); }
.badge.error { color: var(--bad); border-color: rgba(224, 90, 90, 0.5); }

/* ------------------------------------------------------------------ *
 * Layout
 * ------------------------------------------------------------------ */

main {
  display: grid;
  grid-template-columns: 1fr var(--rail);
  gap: 12px;
  padding: 12px;
  height: calc(100vh - 64px - 56px);
}

/* min-height: 0 on both, and it is not cosmetic. A flex item defaults to
   min-height: auto, which means "never smaller than my content" — so a board
   whose roll grew to 1085px grew the container to 1085px with it and scrolled
   nothing. Measured exactly that before this line existed. */
.boardwrap {
  display: flex; flex-direction: column; min-width: 0; min-height: 0;
  position: relative;
}

/* ---- tools ---- */

.tools {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 7px 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: var(--radius) var(--radius) 0 0;
}
.toolgroup { display: flex; align-items: center; gap: 6px; }
.toolgroup.grow { margin-left: auto; }

.tool {
  width: 32px;
  height: 30px;
  display: grid;
  place-items: center;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 15px;
  line-height: 1;
}
.tool:hover { border-color: var(--faint); }
.tool.on { background: var(--accent); color: #241a00; border-color: var(--accent); }

.swatch {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid transparent;
  box-shadow: 0 0 0 1px var(--line);
  padding: 0;
}
.swatch.on { border-color: var(--text); }

#widthSel { width: 90px; accent-color: var(--accent); }
.hint { font-size: 11.5px; color: var(--faint); min-width: 210px; }

/* ---- the board ---- */

.board {
  position: relative;
  flex: 1;
  min-height: 0;        /* see .boardwrap: without it the board never scrolls */
  background: var(--board);
  border: 1px solid var(--line);
  border-radius: 0 0 var(--radius) var(--radius);
  overflow-y: auto;     /* the board is a roll; this is the window onto it */
  overflow-x: hidden;
  cursor: crosshair;
  touch-action: none;   /* a stylus must draw, not scroll the page */
  transition: box-shadow 0.25s;
  scroll-behavior: smooth;
}
/* The roll itself. Its height is set in JavaScript, in board widths, and it
   only ever grows during a lesson. */
.surface { position: relative; width: 100%; }
.board::-webkit-scrollbar { width: 10px; }
.board::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.22); border-radius: 5px;
}
.board[data-tool="text"] { cursor: text; }
.board[data-tool="eraser"] { cursor: cell; }
/* Fires when a snapshot is admitted: the teacher should know the partner just
   looked, without a modal saying so. */
.board.read { box-shadow: inset 0 0 0 3px rgba(240, 165, 0, 0.75); }

.board canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
#overlay { pointer-events: none; }

.text-editor {
  position: absolute;
  background: transparent;
  border: 1px dashed rgba(0, 0, 0, 0.35);
  color: #1b1b1b;
  outline: 0;
  resize: none;
  overflow: hidden;
  padding: 2px 4px;
  font-family: inherit;
}

/* ---- artifacts living on the board ---- */

/* The layer is a pass-through: only the cards themselves take the pointer, so
   the teacher can still draw in the space around them. */
.board-objects { position: absolute; inset: 0; pointer-events: none; }

.board-card {
  position: absolute;
  pointer-events: auto;
  background: #ffffff;
  border: 1px solid rgba(43, 95, 168, 0.45);
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(20, 24, 33, 0.12);
  overflow: hidden;
}
.board-card-head {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px;
  background: rgba(43, 95, 168, 0.07);
  border-bottom: 1px solid rgba(43, 95, 168, 0.18);
}
.board-card-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.7px;
  color: #2b5fa8; font-weight: 700;
}
.board-card-head b {
  color: #1b1b1b; font-size: 14px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.board-card-x {
  margin-left: auto; border: 0; background: transparent; cursor: pointer;
  color: #6b7789; font-size: 13px; line-height: 1; padding: 3px 5px;
  border-radius: 5px;
}
.board-card-x:hover { background: rgba(0, 0, 0, 0.07); color: #d64545; }
.board-card-body { padding: 10px; color: #1b1b1b; font-size: 13px; }
.board-card-body img { display: block; width: 100%; border-radius: 6px; }
.board-card-body iframe {
  display: block; width: 100%; height: 420px; border: 0; background: #fff;
}
/* The rail's dark-panel typography does not survive on a white board, so the
   shared builders (question lists, sources) get light-ground colours here. */
.board-card-body .questions { color: #1b1b1b; padding-left: 18px; }
.board-card-body .exam-tag { background: rgba(43, 95, 168, 0.12); color: #2b5fa8; }
.board-card-body .why { color: #5a6472; }
.board-card-body .k { color: #2b5fa8; }
.board-card-body .reveal {
  background: rgba(43, 95, 168, 0.1); color: #2b5fa8; border-color: transparent;
}
.board-card-body .sources a { color: #2b5fa8; }
.board-card-body .sources.written > span { color: #a86c00; font-weight: 700; }
.board-card-body .sources span,
.board-card-body .q-options { color: #5a6472; }
/* The quiz is read off the wall by a room full of people, so it is set at
   projector size rather than rail size — the tally bars and the A/B/C/D keys
   scale with it. */
.board-card-poll { border-color: rgba(240, 165, 0, 0.55); }
.board-card-poll .board-card-head {
  background: rgba(240, 165, 0, 0.12);
  border-bottom-color: rgba(240, 165, 0, 0.3);
}
.board-card-poll .board-card-label { color: #a86c00; }
.board-poll .poll-question {
  margin: 0 0 9px; font-size: 17px; font-weight: 600; line-height: 1.35;
  color: #1b1b1b;
}
.board-poll .poll-option {
  background: #f4f6fa; border-color: rgba(43, 95, 168, 0.22);
  color: #1b1b1b; font-size: 15px; padding: 9px 11px; cursor: pointer;
}
.board-poll .poll-option .key {
  width: 22px; height: 22px; background: rgba(43, 95, 168, 0.14);
  color: #2b5fa8; font-size: 12px;
}
.board-poll .poll-option.correct { border-color: #2e9e63; }
.board-poll .poll-meta { color: #5a6472; font-size: 12.5px; }
.board-poll.closed .poll-option { cursor: default; }

/* A chapter heading is what a teacher writes and underlines before starting a
   topic: full width, and the ink goes on below it. */
.board-card-chapter .board-card-head b { font-size: 17px; }
.board-chapter .concepts { color: #5a6472; margin: 0 0 4px; }
.board-chapter .exam { color: #1b1b1b; }

.board-card-expand {
  border: 0; background: rgba(43, 95, 168, 0.1); color: #2b5fa8;
  border-radius: 6px; padding: 4px 9px; font-size: 12px; cursor: pointer;
}

.board-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  color: #b9b3a6;
  pointer-events: none;
}
.board-empty p { font-size: 22px; margin: 0; }
.board-empty .sub { font-size: 14px; color: #cac4b7; margin-top: 6px; }

/* ---- the stage ---- */

.stage {
  position: absolute;
  inset: 44px 0 0 0;
  background: var(--panel);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  z-index: 5;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
}
.stage-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px; border-bottom: 1px solid var(--line);
}
.stage-head > div { display: flex; gap: 6px; }
.stage-body {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 10px;
  overflow: auto;
  background: var(--ink);
  border-radius: 0 0 var(--radius) var(--radius);
}
.stage-img { max-width: 100%; max-height: 100%; border-radius: 6px; }
.stage-frame {
  width: 100%; height: 100%; min-height: 520px;
  border: 0; border-radius: 6px; background: #fff;
}

/* ------------------------------------------------------------------ *
 * Rail
 * ------------------------------------------------------------------ */

.rail {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-width: thin;
}

/* The avatar stream is portrait — measured 704x1280 off the live session on
   2026-09-28 — and this panel used to be 16/9 with object-fit: cover, which
   showed a horizontal slice across the eyes and mouth: no top of the head, no
   shoulders, and the caption landing on the chin. Roughly 30% of the frame
   survived the crop. A 3/4 panel keeps about 73% of it, which is a head and
   shoulders. The voice orb has no such shape, so it keeps the wide panel. */
.partner {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  flex: none;
}
body[data-avatar="on"] .partner { aspect-ratio: 3 / 4; }
/* Off-centre vertically: with the frame taller than the panel, centring puts
   the crop through the middle of the torso and takes the top of the head. */
#avatarVideo {
  width: 100%; height: 100%; display: block;
  object-fit: cover; object-position: center 18%;
}

/* Large enough for the back of a classroom, docked over the corner of the
   board. Fixed rather than absolute so it does not scroll with the rail, and
   under .report (z-index 20) so the closing summary still covers everything. */
.partner.big {
  position: fixed;
  right: 16px; bottom: 72px;
  width: min(34vw, 460px);
  z-index: 12;
  border-color: var(--accent);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.6);
}
.partner-size {
  position: absolute; top: 7px; right: 7px; z-index: 2;
  border: 0; border-radius: 6px; cursor: pointer;
  background: rgba(0, 0, 0, 0.45); color: #fff;
  font-size: 13px; line-height: 1; padding: 5px 7px;
}
.partner-size:hover { background: rgba(0, 0, 0, 0.7); }
/* The rail must not collapse when the panel leaves it, or every card below
   jumps up and then back down again on the way home. */
.partner-gap { flex: none; }

/* Voice-only mode. Three bars that breathe, so "the partner is there and
   listening" survives the avatar being switched off. */
.orb {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  background: radial-gradient(circle at 50% 45%, #253043, #11151d);
}
.orb span {
  width: 9px; height: 26px; border-radius: 5px; background: var(--accent-2);
  animation: breathe 1.7s ease-in-out infinite;
}
.orb span:nth-child(2) { animation-delay: 0.22s; height: 40px; }
.orb span:nth-child(3) { animation-delay: 0.44s; }
body[data-state="speaking"] .orb span { background: var(--accent); animation-duration: 0.55s; }
@keyframes breathe { 0%, 100% { transform: scaleY(0.45); } 50% { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .orb span { animation: none; } }

.selfview {
  position: absolute; right: 8px; bottom: 8px;
  width: 104px; aspect-ratio: 4 / 3;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 7px; overflow: hidden; background: #000;
}
.selfview video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.shutter { position: absolute; inset: 0; background: #fff; opacity: 0; }
.shutter.fire { animation: shutter 0.45s ease-out; }
@keyframes shutter { 0% { opacity: 0.85; } 100% { opacity: 0; } }

.caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 14px 11px 9px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.92));
  font-size: 13px; line-height: 1.35;
  max-height: 66px; overflow: hidden;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}
/* Undocked, the caption is being read from across a room, not from a laptop. */
.partner.big .caption { font-size: 17px; max-height: 92px; padding: 18px 14px 12px; }
.partner.big .selfview { width: 132px; }

.heard { font-size: 12.5px; color: var(--dim); min-height: 19px; padding: 0 2px; }

/* ---- cards ---- */

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 11px 12px;
  flex: none;
}
.card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.card-head b { font-size: 14px; }
.pill {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.6px;
  padding: 2px 7px; border-radius: 999px;
  background: var(--panel-2); color: var(--dim); border: 1px solid var(--line);
  white-space: nowrap;
}
.pill.live { color: var(--accent); border-color: rgba(240, 165, 0, 0.45); }
.pill.bad { color: var(--bad); border-color: rgba(224, 90, 90, 0.45); }

.concepts { font-size: 12.5px; color: var(--dim); }
.exam { font-size: 12.5px; margin: 0; }
.exam-tag {
  display: inline-block; margin-right: 6px;
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--accent-2);
}
.why { font-size: 12px; color: var(--dim); }
.k {
  display: inline-block; min-width: 82px;
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--faint);
}

/* ---- poll ---- */

.poll-options { list-style: none; margin: 8px 0 6px; padding: 0; display: grid; gap: 5px; }
.poll-option {
  position: relative;
  width: 100%;
  text-align: left;
  display: flex; align-items: center; gap: 8px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 7px 9px;
  font-size: 13px;
  overflow: hidden;
}
.poll-option .key {
  flex: none;
  width: 19px; height: 19px; border-radius: 4px;
  display: grid; place-items: center;
  background: var(--line); font-size: 11px; font-weight: 700;
}
/* The tally bar sits behind the text rather than beside it, so the option
   stays readable at the back of the room while the numbers come in. */
.poll-option .bar {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0;
  background: rgba(79, 157, 217, 0.22);
  transition: width 0.4s ease;
  z-index: 0;
}
.poll-option.correct { border-color: var(--good); }
.poll-option.correct .bar { background: rgba(53, 192, 122, 0.26); }
.poll-option.wrong .bar { background: rgba(224, 90, 90, 0.22); }
.poll-meta { font-size: 11.5px; color: var(--faint); margin: 0; }

/* ---- artifacts ---- */

.artifacts { display: grid; gap: 10px; }
/* The rail is an index of what is on the board, so every entry has a way back
   to the thing itself. */
.jump {
  border: 0; background: rgba(240, 165, 0, 0.12); color: var(--accent);
  border-radius: 6px; padding: 5px 9px; font-size: 12px; cursor: pointer;
  margin-top: 8px; text-align: left;
}
.jump:hover { background: rgba(240, 165, 0, 0.2); }
.artifact.pending { border-style: dashed; }
.artifact.failed { border-color: rgba(224, 90, 90, 0.4); }
.spinner { font-size: 12px; color: var(--accent); }
.spinner::after {
  content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 6px;
  border-radius: 50%; background: currentColor;
  animation: pulsedot 1s ease-in-out infinite;
}
@keyframes pulsedot { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }

.thumb {
  width: 100%; border-radius: 7px; background: #fff; cursor: zoom-in;
  display: block;
}

.questions { margin: 4px 0 0; padding-left: 18px; display: grid; gap: 12px; font-size: 13px; }
.questions p { margin: 2px 0; }
.q-options { list-style: upper-alpha; margin: 4px 0; padding-left: 18px;
             color: var(--dim); font-size: 12.5px; }
.reveal {
  background: transparent; border: 1px solid var(--line); border-radius: 6px;
  padding: 3px 8px; font-size: 11.5px; color: var(--dim); margin-top: 4px;
}
.answer { margin-top: 6px; padding: 7px 9px; background: var(--panel-2);
          border-radius: 7px; font-size: 12.5px; }

.sources { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sources > span {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--faint);
}
.sources a {
  font-size: 11px; color: var(--accent-2); text-decoration: none;
  border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px;
  max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sources a:hover { border-color: var(--accent-2); }

.sources.unverified { display: block; }
.sources.unverified > span { color: var(--accent); }
.sources.unverified .why { margin: 3px 0 0; }
/* Not "unverified": these were never claimed to come from a paper. The badge
   is a statement about what they are, not a warning about a citation. */
.sources.written { display: block; }
.sources.written > span { color: var(--accent-2); }
.sources.written .why { margin: 3px 0 0; }

/* ------------------------------------------------------------------ *
 * Footer
 * ------------------------------------------------------------------ */

.controls {
  display: flex; align-items: center; gap: 10px;
  padding: 0 16px;
  height: 56px;
  background: var(--panel);
  border-top: 1px solid var(--line);
}
.ctl {
  display: flex; align-items: center; gap: 7px;
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 8px; padding: 7px 12px; font-size: 13px; color: var(--dim);
}
.ctl:disabled { opacity: 0.45; cursor: default; }
.ctl .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.ctl.on { color: var(--text); border-color: rgba(53, 192, 122, 0.45); }
.ctl.on .dot { background: var(--good); box-shadow: 0 0 8px var(--good); }
.ctl.danger:not(:disabled) { color: #f0b0b0; border-color: rgba(224, 90, 90, 0.35); }

.ask { display: flex; gap: 8px; flex: 1; max-width: 560px; }
.ask input {
  flex: 1;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 11px; color: var(--text); font: inherit; font-size: 13px;
}
.ask input:focus { outline: 0; border-color: var(--accent-2); }

.stats { margin-left: auto; font-size: 11.5px; color: var(--faint);
         font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ *
 * Report
 * ------------------------------------------------------------------ */

.report {
  position: fixed; inset: 0; z-index: 20;
  background: rgba(8, 10, 14, 0.78);
  display: grid; place-items: center;
  padding: 24px;
}
.report-inner {
  position: relative;
  width: min(720px, 100%);
  max-height: 84vh; overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 26px;
}
.report-inner h2 { font-size: 21px; margin-bottom: 4px; }
.report-inner h3 {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.7px;
  color: var(--faint); margin: 18px 0 8px;
}
.report-close { position: absolute; top: 14px; right: 14px; }
.report-line { color: var(--dim); font-size: 13px; }

.report-chapters, .report-polls, .report-reteach { list-style: none; margin: 0; padding: 0; }
.report-chapters li {
  padding: 9px 0; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: 1fr auto; gap: 2px 10px;
}
.report-chapters .mins { color: var(--accent); font-variant-numeric: tabular-nums; }
.report-chapters .why { grid-column: 1 / -1; }

.report-polls li {
  display: flex; gap: 10px; align-items: baseline;
  padding: 7px 0; border-top: 1px solid var(--line); font-size: 13.5px;
}
.report-polls b { min-width: 46px; color: var(--good); font-variant-numeric: tabular-nums; }
.report-polls li.weak b { color: var(--bad); }

.report-reteach li {
  padding: 8px 11px; margin-bottom: 6px;
  background: var(--panel-2); border-left: 3px solid var(--bad);
  border-radius: 0 7px 7px 0; font-size: 13.5px;
}

/* ------------------------------------------------------------------ *
 * Narrow screens — a teacher on a laptop, not a projector
 * ------------------------------------------------------------------ */

@media (max-width: 1180px) {
  :root { --rail: 300px; }
  .tagline, .room-label { display: none; }
  .pulse { gap: 14px; }
  /* The words go, the mark stays. A shrinking header should cost the
     subtitle before it costs the attribution. */
  .gemini > span { display: none; }
  .gemini { padding: 4px; }
}
