/* ============================================================
   Candidate portal — Notion-inspired light theme
   Visual design layer only; layout/structure unchanged.
   ============================================================ */
:root {
  /* Surfaces */
  --bg-primary: #ffffff;      /* page background */
  --bg-secondary: #f7f6f3;    /* warm off-white / cream section + card alt */
  --card-bg: #ffffff;
  --card-border: #e9e9e7;     /* subtle 1px dividers/borders */

  /* Text */
  --text-primary: #191918;    /* near-black, warm */
  --text-secondary: #787774;  /* muted */

  /* Accent (used sparingly) */
  --accent: #2383e2;          /* Notion blue */
  --accent-hover: #1a6dc0;
  --accent-soft: rgba(35, 131, 226, 0.10);
  --focus-ring: rgba(35, 131, 226, 0.16);

  /* Muted status tones (tiny highlights only) */
  --emerald: #0f7b6c;
  --emerald-bg: #e7f3ef;
  --red: #eb5757;
  --red-bg: #fbecec;
  --orange: #cb7b37;
  --orange-bg: #f7eee1;

  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 12px;

  --shadow-sm: 0 1px 3px rgba(15, 15, 15, 0.05);
  --shadow-lg: 0 1px 3px rgba(15, 15, 15, 0.06), 0 12px 32px rgba(15, 15, 15, 0.08);
}

/* Base resets & styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Card helper (kept class name; now a clean flat surface, no glass) */
.glass-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

/* Screen States */
.screen {
  opacity: 1;
  transition: opacity 0.3s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 40px 24px;
}

.screen.hidden, .modal-overlay.hidden, .hidden {
  display: none !important;
  opacity: 0;
  pointer-events: none;
}

/* Spinner and Overlays */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.loader-content {
  text-align: center;
  color: var(--text-secondary);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--card-border);
  border-left-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Token Screen Card */
#token-screen {
  justify-content: center;
  align-items: center;
}

.token-card {
  max-width: 460px;
  width: 100%;
  padding: 48px 44px;
  text-align: center;
}

.token-card h2 {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.token-card p {
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 32px;
}

/* Forms & Inputs */
.input-group {
  position: relative;
  margin-bottom: 24px;
}

.input-group input {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 16px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  outline: none;
}

.input-group input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.input-group label {
  position: absolute;
  left: 12px;
  top: -9px;
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--bg-primary);
  padding: 0 6px;
  border-radius: 4px;
  pointer-events: none;
}

.error-msg {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--red-bg);
  border: 1px solid rgba(235, 87, 87, 0.25);
  color: #b23b3b;
  font-size: 14px;
}

/* Buttons */
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 10px 18px;
  font-family: var(--font-main);
  font-size: 15px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
  outline: none;
}

.btn-primary {
  background: var(--text-primary);
  color: #ffffff;
}

.btn-primary:hover {
  background: #000000;
}

.btn-primary:active {
  transform: translateY(0.5px);
}

.btn-secondary {
  background: var(--bg-primary);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--bg-secondary);
}

.btn-danger {
  background: var(--red);
  color: #fff;
}

.btn-danger:hover {
  background: #d64545;
}

.btn-block {
  width: 100%;
}

/* Header Area */
.exam-header {
  padding: 20px 28px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.exam-header h1 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.exam-header p {
  color: var(--text-secondary);
  font-size: 14px;
}

.timer-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.timer-ring {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.progress-ring__circle {
  transition: stroke-dashoffset 0.35s;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
}

.timer-countdown {
  position: absolute;
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
}

.timer-label {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Main Container: single column — questions first, progress panel at the end
   of the page (product decision: the panel moved from a left sidebar to a
   full-width bar below the question workspace). */
.exam-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
  flex: 1;
}

/* Progress panel (kept class name .exam-sidebar): full-width horizontal bar. */
.exam-sidebar {
  padding: 16px 24px;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.exam-sidebar h3 {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 0;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}

/* Inside the bottom bar: stats + buttons flow inline, divider is redundant. */
.exam-sidebar .divider { display: none; }
.exam-sidebar .btn-block { width: auto; }
.exam-sidebar .submit-exam-btn { margin-left: auto; }

.question-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 24px;
}

.q-btn {
  aspect-ratio: 1;
  background: var(--bg-primary);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.q-btn:hover {
  background: var(--bg-secondary);
  border-color: #dcdcd8;
}

.q-btn.active {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  color: #ffffff;
}

.q-btn.answered {
  background: var(--emerald-bg);
  border-color: rgba(15, 123, 108, 0.25);
  color: var(--emerald);
}

.q-btn.flagged {
  border-color: rgba(203, 123, 55, 0.45);
  background: var(--orange-bg);
  color: var(--orange);
}

.divider {
  border: none;
  border-top: 1px solid var(--card-border);
  margin: 20px 0;
}

.legend {
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.legend-dot.current { background: var(--accent); }
.legend-dot.answered { background: var(--emerald); }
.legend-dot.flagged { background: var(--orange); }
.legend-dot.unanswered { background: var(--card-border); }

/* Main Question Panel */
.question-workspace {
  display: flex;
  flex-direction: column;
}

.question-card {
  padding: 40px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.question-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}

.badge {
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.points-badge {
  color: var(--text-secondary);
  font-size: 13px;
  margin-right: auto;
  margin-left: 12px;
}

.flag-button {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 6px;
  transition: background 0.15s ease, color 0.15s ease;
}

.flag-button:hover, .flag-button.active {
  background: var(--orange-bg);
  color: var(--orange);
}

.question-prompt {
  font-size: 18px;
  line-height: 1.6;
  font-weight: 400;
  margin-bottom: 28px;
  color: var(--text-primary);
  /* Preserve authored line breaks/indentation: prompts routinely contain
     multi-line code snippets, which white-space:normal collapses into one
     unreadable line. pre-wrap keeps newlines and still wraps long lines. */
  white-space: pre-wrap;
}

/* Question Figures */
.figure-container {
  margin-bottom: 28px;
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
}

.figure-wrapper {
  position: relative;
  display: inline-block;
  max-width: 100%;
  border-radius: 6px;
  overflow: hidden;
  cursor: zoom-in;
}

.figure-wrapper img {
  display: block;
  max-width: 100%;
  max-height: 300px;
  height: auto;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.figure-wrapper:hover img {
  transform: scale(1.02);
}

.figure-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(25, 25, 24, 0.32);
  opacity: 0;
  transition: opacity 0.25s ease;
  display: flex;
  justify-content: center;
  align-items: center;
}

.figure-wrapper:hover .figure-overlay {
  opacity: 1;
}

.overlay-button {
  background: rgba(25, 25, 24, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 10px 18px;
  border-radius: 8px;
  color: white;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
}

.figure-caption {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 10px;
  font-style: italic;
}

/* Answers Layout */
.answers-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 32px;
}

.option-card {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  background: var(--bg-primary);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.option-card:hover {
  background: var(--bg-secondary);
  border-color: #dcdcd8;
}

.option-card.selected {
  background: var(--accent-soft);
  border-color: rgba(35, 131, 226, 0.45);
}

.option-card input[type="radio"], .option-card input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid #c5c5c1;
  border-radius: 50%;
  outline: none;
  margin-right: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: border-color 0.15s ease;
  flex-shrink: 0;
  background: #ffffff;
}

.option-card input[type="checkbox"] {
  border-radius: 5px;
}

.option-card input:checked {
  border-color: var(--accent);
}

.option-card input:checked::after {
  content: "";
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  display: block;
}

.option-card input[type="checkbox"]:checked::after {
  border-radius: 1px;
}

.option-label {
  font-size: 15px;
  user-select: none;
  color: var(--text-primary);
}

/* Blank/Short answer and Essay */
.text-input {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.text-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.essay-textarea {
  min-height: 180px;
  resize: vertical;
  line-height: 1.6;
}

/* Workspace Footer */
.question-footer {
  display: flex;
  justify-content: space-between;
  margin-top: auto;
  border-top: 1px solid var(--card-border);
  padding-top: 24px;
}

/* Modal Overlay Base */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(25, 25, 24, 0.45);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 500;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Modal Containers */
.modal-container {
  width: 95vw;
  height: 90vh;
  max-width: 1400px;
  background: var(--bg-primary);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
  from { transform: translateY(20px) scale(0.98); }
  to { transform: translateY(0) scale(1); }
}

.modal-header {
  padding: 20px 28px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--card-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title-area h3 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 2px;
  color: var(--text-primary);
}

.modal-title-area p {
  color: var(--text-secondary);
  font-size: 13px;
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 26px;
  cursor: pointer;
  transition: color 0.15s ease;
  line-height: 1;
}

.close-btn:hover {
  color: var(--text-primary);
}

/* Interactive Viewport Area (plot viewer) */
.viewer-viewport {
  flex: 1;
  position: relative;
  background: var(--bg-secondary);
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: grab;
}

.viewer-viewport:active {
  cursor: grabbing;
}

.viewer-container {
  position: absolute;
  transform-origin: 0 0;
  will-change: transform;
}

.viewer-container img {
  display: block;
  user-select: none;
  pointer-events: none;
  max-width: none;
}

/* Floating Zoom Control Panel */
.floating-controls {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-primary);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-lg);
  z-index: 10;
}

.control-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.control-btn:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.zoom-slider {
  appearance: none;
  width: 140px;
  height: 4px;
  background: var(--card-border);
  border-radius: 2px;
  outline: none;
  transition: background 0.3s;
}

.zoom-slider::-webkit-slider-thumb {
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  transition: transform 0.1s;
}

.zoom-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* Mini-map Container */
.minimap-container {
  position: absolute;
  bottom: 24px;
  right: 24px;
  width: 130px;
  height: 130px;
  background: var(--bg-primary);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  z-index: 10;
  user-select: none;
}

#minimap-canvas {
  width: 100%;
  height: 100%;
  background: white;
  display: block;
}

.minimap-viewport-box {
  position: absolute;
  border: 2px solid var(--accent);
  background: var(--accent-soft);
  box-sizing: border-box;
  cursor: move;
  z-index: 12;
}

.minimap-label {
  position: absolute;
  top: 4px;
  left: 4px;
  font-size: 9px;
  background: rgba(25, 25, 24, 0.55);
  color: rgba(255, 255, 255, 0.85);
  padding: 2px 4px;
  border-radius: 2px;
  pointer-events: none;
}

/* Result Screen */
.result-card {
  max-width: 520px;
  width: 90vw;
  padding: 48px 44px;
  text-align: center;
}

.success-icon {
  margin-bottom: 24px;
  display: flex;
  justify-content: center;
}

.result-card h2 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.result-card p {
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 28px;
}

.immediate-score-card {
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 28px;
}

.score-details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.score-box {
  display: flex;
  flex-direction: column;
}

.score-box span:first-child {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.score-lbl {
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 4px;
}

.result-status-badge {
  background: var(--emerald-bg);
  border: 1px solid rgba(15, 123, 108, 0.25);
  color: var(--emerald);
  display: inline-block;
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.result-status-badge.failed {
  background: var(--red-bg);
  border-color: rgba(235, 87, 87, 0.25);
  color: #b23b3b;
}

.grade-pending-msg {
  background: var(--orange-bg);
  border: 1px solid rgba(203, 123, 55, 0.3);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 28px;
  color: #8a5a24;
  font-size: 13px;
  text-align: left;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #dcdcd8;
  border-radius: 10px;
  border: 3px solid var(--bg-primary);
}
::-webkit-scrollbar-thumb:hover {
  background: #c5c5c1;
}

/* Proctoring warning banner (Task 4.2) — fixed, in-page, non-blocking. */
.proctor-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: #fbead2;
  color: #7a5219;
  border-bottom: 1px solid #e8cfa3;
  font-size: 14px;
  font-weight: 500;
}
.proctor-banner.hidden { display: none; }
.proctor-banner-text { flex: 1; }
.proctor-banner-close {
  background: transparent;
  border: none;
  color: #7a5219;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.75;
  padding: 0 4px;
}
.proctor-banner-close:hover { opacity: 1; }

/* Autosave status indicator (Task 4.4) */
.save-status {
  display: inline-block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 500;
  min-height: 16px;
  transition: color 0.2s ease;
}
/* id-scoped so the state colors win the header cascade. */
#save-status.saving { color: #787774; }
#save-status.saved { color: #0f7b6c; }
#save-status.offline { color: #cb7b37; }

/* --- Exam-manager preview banner (?preview=<exam_id>) --- */
.preview-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9500;
  padding: 10px 20px;
  text-align: center;
  background: #d3e5ef;
  color: #24506b;
  border-bottom: 1px solid #a6c8dc;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.preview-banner.hidden { display: none; }

/* --- Progress box (replaces the per-question button grid). Lives in the
   full-width bottom bar, so it flows as an inline row of stats + button. --- */
.progress-box {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  padding: 10px 14px;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  background: var(--bg-secondary, #fbfbfa);
  margin-bottom: 0;
  flex: 1;
  min-width: 260px;
}
.progress-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-secondary);
  white-space: nowrap;
}
.progress-stat strong {
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}
.progress-box .btn { margin-top: 0; margin-left: auto; }

/* --- Question Review screen --- */
.review-card {
  width: min(720px, 94vw);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  padding: 24px;
}
.review-header h2 { margin-bottom: 10px; }
.review-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.review-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}
.chip-answered { background: var(--emerald-bg, #e7f3ec); color: var(--emerald, #2e7d51); }
.chip-remaining { background: var(--bg-secondary, #f1f1ef); color: var(--text-muted, #787774); border: 1px solid var(--card-border); }
.chip-flagged { background: var(--orange-bg); color: var(--orange); }

.review-list {
  overflow-y: auto;
  border-top: 1px solid var(--card-border);
  margin-bottom: 16px;
  flex: 1;
}
.review-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 8px;
  border: none;
  border-bottom: 1px solid var(--card-border);
  background: transparent;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: var(--text-primary);
}
.review-row:hover { background: var(--bg-secondary, #f7f7f5); }
.review-row-num {
  flex: 0 0 40px;
  font-weight: 600;
  color: var(--text-muted, #787774);
  font-variant-numeric: tabular-nums;
}
.review-row-snippet {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  color: var(--text-secondary);
}
.review-row-chips { display: inline-flex; gap: 6px; flex-shrink: 0; }
