:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --panel: #ffffff;
  --ink: #172033;
  --muted: #607086;
  --line: #d9e0ea;
  --accent: #1f6feb;
  --accent-dark: #174ea6;
  --success: #1f8a4c;
  --warning: #b26a00;
  --danger: #b42318;
  --shadow: 0 18px 50px rgba(28, 45, 74, 0.12);
}

* {
  box-sizing: border-box;
}

body.practice-body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", Arial, sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  padding: 0.8rem 1rem;
}

button:hover {
  background: var(--accent-dark);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.secondary {
  background: #e8eef8;
  color: var(--ink);
}

.secondary:hover {
  background: #d7e1f1;
}

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

.danger:hover {
  background: #8f1d14;
}

.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
}

.ghost:hover,
.ghost.active {
  background: #fff3d9;
  border-color: #e4ae39;
}

.practice-body .shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.setup-panel,
.result-panel {
  display: grid;
  gap: 24px;
  padding: 32px;
}

.eyebrow {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin: 0 0 8px;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  font-size: 2.1rem;
  margin-bottom: 10px;
}

.lead {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
  margin-bottom: 0;
}

.stats-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stats-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.stats-grid span {
  display: block;
  font-size: 1.65rem;
  font-weight: 800;
}

.stats-grid label {
  color: var(--muted);
  display: block;
  font-size: 0.9rem;
  margin-top: 4px;
}

.setup-form {
  align-items: end;
  display: grid;
  gap: 14px;
  grid-template-columns: 150px 150px minmax(260px, 1fr) auto;
}

.setup-form label {
  color: var(--muted);
  display: grid;
  gap: 6px;
  font-weight: 700;
}

input,
select {
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  padding: 0.75rem;
  width: 100%;
}

.research-note {
  background: #f0f5ff;
  border: 1px solid #cfdbf4;
  border-radius: 8px;
  color: #30415f;
  line-height: 1.5;
  padding: 16px;
}

.hidden {
  display: none !important;
}

.test-layout {
  display: grid;
  gap: 20px;
  grid-template-columns: 300px minmax(0, 1fr);
}

.side-panel {
  align-self: start;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 18px;
  padding: 20px;
  position: sticky;
  top: 24px;
}

.timer span {
  display: block;
  font-size: 2rem;
  font-weight: 800;
}

.timer label,
.progress-row {
  color: var(--muted);
  font-size: 0.9rem;
}

.progress-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.bar {
  background: #e7edf6;
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}

.bar div {
  background: var(--accent);
  height: 100%;
  width: 0%;
}

.palette {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(5, 1fr);
}

.palette button {
  background: #f3f6fb;
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 0.55rem 0;
}

.palette button.current {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 2px var(--accent);
}

.palette button.answered {
  background: #e8f7ee;
  border-color: #92d4ab;
}

.palette button.flagged::after {
  content: "!";
  color: var(--warning);
  font-weight: 900;
  margin-left: 2px;
}

.question-panel {
  min-height: 520px;
  padding: 28px;
}

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

#courseLabel {
  color: var(--muted);
  font-weight: 700;
}

#questionText {
  font-size: 1.45rem;
  line-height: 1.35;
  margin-bottom: 22px;
}

.options {
  display: grid;
  gap: 12px;
}

.option {
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  gap: 12px;
  grid-template-columns: 32px 1fr;
  padding: 16px;
}

.option:hover {
  border-color: #9ab6dc;
}

.option.selected {
  background: #fff;
  border-color: var(--accent);
  box-shadow: inset 0 0 0 2px var(--accent), 0 0 0 3px rgba(31, 111, 235, 0.12);
  color: var(--ink);
}

.option.selected .letter {
  background: var(--accent);
  color: #fff;
}

.letter {
  align-items: center;
  background: #edf2f9;
  border-radius: 999px;
  display: inline-flex;
  font-weight: 800;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.question-actions,
.result-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 28px;
}

.result-panel {
  margin-bottom: 20px;
}

.result-panel h1 {
  font-size: 3rem;
  margin-bottom: 0;
}

.review-list {
  display: grid;
  gap: 14px;
}

.review-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
}

.review-card.correct {
  border-left: 6px solid var(--success);
}

.review-card.missed {
  border-left: 6px solid var(--danger);
}

.review-card h3 {
  line-height: 1.4;
  margin: 0 0 12px;
}

.review-card p {
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 8px;
}

.review-card a {
  color: var(--accent);
  font-weight: 700;
}

@media (max-width: 860px) {
  .stats-grid,
  .setup-form,
  .test-layout {
    grid-template-columns: 1fr;
  }

  .side-panel {
    position: static;
  }

  .question-actions,
  .result-actions {
    flex-direction: column;
  }
}


/* Cyber Questline generated theme overrides. Keep question/study text plain for readability. */
:root {
  --bg: #f7f1df;
  --panel: #fffaf0;
  --ink: #23170f;
  --muted: #715f4f;
  --line: #d9c8a8;
  --accent: #b86516;
  --accent-dark: #7a3d12;
  --accent-2: #1f6b68;
  --gold: #f5b21f;
  --success: #27734d;
  --warning: #c78012;
  --danger: #9f2f1d;
  --shadow: 0 18px 50px rgba(55, 34, 16, 0.16);
  --display-font: "Cinzel", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --text-font: "Segoe UI", Arial, sans-serif;
}

body.practice-body {
  background:
    linear-gradient(rgba(247, 241, 223, .92), rgba(247, 241, 223, .92)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cpath fill='%23d2b47a' fill-opacity='.22' d='M0 0h120v120H0z'/%3E%3Cpath fill='none' stroke='%238c6b3f' stroke-opacity='.22' d='M0 18h120M0 54h120M0 92h120M20 0v120M61 0v120M101 0v120'/%3E%3C/svg%3E");
  color: var(--ink);
  font-family: var(--text-font);
}

.practice-body h1,
.practice-body .eyebrow,
.practice-body .stats-grid span,
.practice-body .stats-grid label,
.practice-body .setup-form label,
.practice-body button,
.practice-body .timer span,
.practice-body .timer label,
.practice-body .progress-row,
.practice-body #courseLabel {
  font-family: var(--display-font);
}

.practice-body .shell {
  padding: 36px 0 56px;
}

.practice-body .panel,
.practice-body .side-panel,
.practice-body .review-card {
  background: var(--panel);
  border-color: var(--line);
  box-shadow: var(--shadow);
}

.practice-body .setup-panel,
.practice-body .result-panel {
  border-color: #6b4526;
}

.practice-body .eyebrow,
.practice-body #courseLabel {
  color: var(--accent);
  font-weight: 900;
}

.practice-body h1 {
  color: #5a3517;
  font-size: 2.25rem;
  letter-spacing: 0;
  text-shadow: 0 2px 0 #f4cf86;
}

.practice-body .lead,
.practice-body .research-note,
.practice-body .review-card p {
  color: var(--muted);
  font-family: var(--text-font);
}

.practice-body .stats-grid div,
.practice-body input,
.practice-body select,
.practice-body .research-note {
  background: #fff7e6;
  border-color: var(--line);
}

.practice-body input,
.practice-body select {
  color: var(--ink);
  font-family: var(--text-font);
}

.practice-body button {
  background: #d97819;
  border: 1px solid #f0a63a;
  color: #fffaf0;
  font-weight: 900;
}

.practice-body button:hover {
  background: #a85314;
}

.practice-body .secondary {
  background: #eadcc0;
  border-color: #d7bd8b;
  color: var(--ink);
}

.practice-body .secondary:hover {
  background: #dec996;
}

.practice-body .danger {
  background: var(--danger);
  border-color: #c85834;
  color: #fffaf0;
}

.practice-body .danger:hover {
  background: #7e2418;
}

.practice-body .ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.practice-body .ghost:hover,
.practice-body .ghost.active {
  background: #fff3d9;
  border-color: var(--gold);
  color: var(--ink);
}

.practice-body .bar {
  background: #eadcc0;
}

.practice-body .bar div {
  background: linear-gradient(90deg, #d97819, #f5b21f);
}

.practice-body .palette button {
  background: #fff7e6;
  border-color: var(--line);
  color: var(--ink);
}

.practice-body .palette button.current {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 2px var(--accent);
}

.practice-body .palette button.answered {
  background: #e8f0dc;
  border-color: #8bae69;
}

.practice-body .palette button.flagged::after {
  color: var(--warning);
}

.practice-body .question-panel,
.practice-body #questionText,
.practice-body .option,
.practice-body .option span:not(.letter),
.practice-body .review-card h3,
.practice-body .review-card p {
  font-family: var(--text-font);
}

.practice-body #questionText {
  color: var(--ink);
}

.practice-body .option {
  background: #fffdf8;
  border-color: var(--line);
  color: var(--ink);
  text-align: left;
}

.practice-body .option:hover {
  background: #fff8e8;
  border-color: var(--accent);
}

.practice-body .option.selected {
  background: #fffdf8;
  border-color: var(--gold);
  box-shadow: inset 0 0 0 2px var(--gold), 0 0 0 3px rgba(245, 178, 31, .18);
  color: var(--ink);
}

.practice-body .option.selected .letter {
  background: var(--accent);
  color: #fffaf0;
}

.practice-body .letter {
  background: #eadcc0;
  color: var(--ink);
  font-family: var(--display-font);
}

.practice-body .review-card a {
  color: var(--accent);
}

@media (max-width: 860px) {
  .practice-body h1 {
    font-size: 1.85rem;
  }
}
