/* Ion Quiz. Layout only; tokens and base elements come from ../shared/base.css. */

.view { display: none; }
.view.active { display: block; }
.view > h2 { margin-bottom: 16px; }

/* quiz mode picker */
.mode-select { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; }
.mode-select button {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
  padding: 0 14px;
  font-size: 0.95rem;
}
.mode-select button:hover { background: var(--paper-deep); border-color: var(--ink); }
.mode-select button.active { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* the quiz card: the ion is the hero */
.quiz-area {
  background: var(--card);
  border: var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
}
.question-label { color: var(--ink-2); font-weight: 500; }
.question {
  font-size: clamp(2rem, 1.4rem + 3vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 6px 0 24px;
  overflow-wrap: anywhere;
}
.input-row { display: flex; flex-wrap: wrap; gap: 10px; }
.input-row input { flex: 1 1 180px; }
.helper { color: var(--ink-2); font-size: 0.92rem; margin-top: 12px; white-space: pre-line; }
.feedback { display: none; margin-top: 16px; }
.feedback.show { display: block; }

/* missed questions */
.wrong-btn { margin-top: 20px; }
.wrong-list {
  display: none;
  margin-top: 16px;
  background: var(--card);
  border: var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
}
.wrong-list.show { display: block; }
.wrong-list h3 { margin-bottom: 10px; }
.wrong-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line-soft);
}
.wrong-item:last-child { border-bottom: none; }
.wrong-item .q { color: var(--ink-2); }
.wrong-item .a { font-weight: 600; text-align: right; }
.no-wrong { color: var(--ink-2); }

/* reference tables, built at runtime; scroll inside their box on narrow screens */
#reference-content, #advanced-content { overflow-x: auto; }
.section-title { font-size: 1.05rem; font-weight: 600; margin: 28px 0 10px; }
.section-title:first-child { margin-top: 0; }
.reference-table { min-width: 320px; }
code { font: inherit; }

/* periodic table, shown under every view */
.periodic { max-width: 1200px; margin: 0 auto; padding: 0 20px 64px; }
.periodic img {
  display: block;
  border: var(--border);
  border-radius: var(--radius);
  background: var(--card);
}
