/* review.css — Review Quiz Builder. Question cards reuse the .quiz-* classes
   from curriculum.css so a built quiz looks like the quiz on every topic page. */

.rv-main { max-width: 78rem; margin: 0 auto; padding: 1.75rem 2rem 5rem; }

.rv-crumb { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 0.5rem; }
.rv-crumb a { color: var(--muted); text-decoration: none; }
.rv-crumb a:hover { color: var(--accent); }

/* ── Header block ──────────────────────────────────────────
   Title, the action row and the filters together are the whole top of the
   page; the questions start immediately below them. */
.rv-top { border-bottom: 1px solid var(--border); padding-bottom: 1.1rem; margin-bottom: 1.25rem; }

.rv-h1 {
  font-family: var(--font-display); font-size: 1.6rem; line-height: 1.2;
  margin: 0 0 0.9rem;
  display: flex; align-items: baseline; gap: 0.7rem; flex-wrap: wrap;
}
.rv-h1-sub {
  font-family: var(--font-mono); font-size: 0.78rem; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
}

.rv-actions { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.9rem; }
.rv-actions-gap { width: 0.75rem; }

.rv-count { display: inline-flex; align-items: baseline; gap: 0.45rem; margin-right: 0.3rem; }
.rv-count-label {
  font-family: var(--font-mono); font-size: 0.66rem; font-weight: 500;
  letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted);
}
.rv-count-num {
  font-family: var(--font-mono); font-size: 1.1rem; font-weight: 700;
  color: var(--text); min-width: 1.4rem;
}

/* ── Buttons ───────────────────────────────────────────────
   Everything clickable lifts or changes colour under the pointer, so nothing
   on the page is ambiguous about whether it does something. */
.rv-btn {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.05em;
  padding: 0.5rem 0.95rem;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius);
  cursor: pointer; transition: all var(--transition);
}
.rv-btn:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-bg); color: var(--accent); }
.rv-btn:active:not(:disabled) { transform: translateY(1px); }
.rv-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.rv-btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.rv-btn-primary:hover:not(:disabled) { background: var(--accent); border-color: var(--accent); color: #fff; opacity: 0.82; }
.rv-btn-quiet { color: var(--muted); }

/* Filters */
.rv-filters { display: flex; flex-direction: column; gap: 0.5rem; }
.rv-pill-row { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; }
.rv-pill-row[hidden] { display: none; }
.rv-pill-set { display: contents; }
.rv-pill-div { width: 1px; height: 1.1rem; background: var(--border); margin: 0 0.4rem; }

.rv-pill {
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.05em;
  padding: 0.34rem 0.7rem;
  background: transparent; color: var(--muted);
  border: 1px solid var(--border); border-radius: var(--radius-pill);
  cursor: pointer; transition: all var(--transition);
}
.rv-pill:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-bg); }
.rv-pill:active { transform: translateY(1px); }
.rv-pill.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.rv-pill.on:hover { opacity: 0.82; background: var(--accent); color: #fff; }
.rv-pill-quiet { font-size: 0.66rem; }
.rv-pill-hl { border-style: dashed; }

/* ── Question pool ─────────────────────────────────────── */
.rv-pool-note { font-family: var(--font-mono); font-size: 0.7rem; color: var(--muted); margin: 0 0 1.1rem; }
.rv-pool-empty { font-size: 0.88rem; color: var(--muted); padding: 2rem 0; }

.rv-card { position: relative; }
.rv-card .quiz-q-num { padding-right: 5.5rem; }
.rv-remove {
  position: absolute; top: 0.9rem; right: 0.9rem;
  font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.3rem 0.6rem;
  background: transparent; color: var(--muted);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  cursor: pointer; transition: all var(--transition);
}
.rv-remove:hover { color: #991b1b; border-color: #fca5a5; background: #fee2e2; }
.rv-card.removed { opacity: 0.5; }
.rv-card.removed .quiz-options { display: none; }
.rv-card.removed .rv-remove { color: var(--accent); border-color: var(--accent); }
.rv-card.removed .rv-remove:hover { background: var(--accent-bg); color: var(--accent); border-color: var(--accent); }
/* A removed question keeps its text on screen, so a misclick is one click back. */

/* Options in the pool are for reading, not answering, but they still respond
   to the pointer so the card does not feel dead. */
.rv-card .quiz-option { cursor: default; }
.rv-card .quiz-option:hover { border-color: var(--border-strong); background: var(--surface-2); }

/* ── Title dialog ──────────────────────────────────────── */
.rv-dialog {
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  background: var(--surface); color: var(--text);
  padding: 1.5rem; max-width: 26rem; width: calc(100% - 2rem);
  margin: auto; /* the global reset zeroes the UA margin that centres a modal */
  box-shadow: var(--shadow-md);
}
.rv-dialog::backdrop { background: rgba(0, 0, 0, 0.45); }
.rv-dialog-label { display: block; font-family: var(--font-display); font-size: 1.05rem; margin-bottom: 0.65rem; }
.rv-dialog input {
  width: 100%; box-sizing: border-box;
  font-family: var(--font-body); font-size: 0.9rem;
  padding: 0.55rem 0.7rem;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius);
}
.rv-dialog input:focus { outline: none; border-color: var(--accent); }
.rv-dialog-hint { font-size: 0.78rem; color: var(--muted); line-height: 1.5; margin: 0.6rem 0 1.1rem; }
.rv-dialog-actions { display: flex; justify-content: flex-end; gap: 0.5rem; }

@media (max-width: 700px) {
  .rv-main { padding: 1.25rem 1rem 4rem; }
  .rv-actions-gap { display: none; }
  .rv-h1 { font-size: 1.3rem; }
}

/* ── Quiz page ─────────────────────────────────────────── */
.rv-quiz-main { max-width: 60rem; padding-top: 2.5rem; padding-bottom: 4rem; }
.rv-quiz-title { font-family: var(--font-display); font-size: 2rem; margin: 0 0 0.5rem; }
.rv-quiz-meta { font-size: 0.86rem; color: var(--muted); line-height: 1.6; margin: 0 0 2rem; max-width: 42rem; }
.rv-warn { font-family: var(--font-mono); font-size: 0.72rem; color: #991b1b; }
.rv-answer-link { white-space: nowrap; font-weight: 600; }
