:root {
  --navy: #1B1366;
  --mid-blue: #3D3899;
  --gold: #C8A84B;
  --cream: #FFF8E8;
  --gray: #444444;
  --green: #1e7a3d;
  --red: #a5252f;
  font-family: 'Source Sans 3', system-ui, -apple-system, Segoe UI, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--gray);
  line-height: 1.55;
}

h1, h2, h3, h4 { font-family: 'Playfair Display', Georgia, serif; color: var(--navy); }

a { color: var(--mid-blue); }

.topnav {
  background: var(--navy);
  color: white;
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
  align-items: center;
  padding: 0.75rem 1.25rem;
}
.topnav a { color: white; text-decoration: none; font-size: 0.95rem; }
.topnav a:hover { text-decoration: underline; }
.topnav .brand { font-family: 'Playfair Display', Georgia, serif; font-weight: 700; font-size: 1.15rem; margin-right: auto; color: var(--gold); }
.badge { background: var(--gold); color: var(--navy); border-radius: 999px; padding: 0 0.5em; font-size: 0.8em; font-weight: 700; }

.container { max-width: 860px; margin: 0 auto; padding: 1.5rem 1.25rem 4rem; }

.card {
  background: white;
  border: 1px solid #e6ddc7;
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
}

.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.stat { text-align: center; }
.stat .num { font-size: 2rem; font-weight: 700; color: var(--navy); font-family: 'Playfair Display', Georgia, serif; }
.stat .label { font-size: 0.85rem; color: var(--gray); }

.btn {
  display: inline-block;
  background: var(--mid-blue);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { background: var(--navy); }
.btn.gold { background: var(--gold); color: var(--navy); font-weight: 700; }
.btn.outline { background: transparent; color: var(--mid-blue); border: 1px solid var(--mid-blue); }
.btn.small { padding: 0.35rem 0.8rem; font-size: 0.9rem; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

.progress-bar { background: #e6ddc7; border-radius: 999px; height: 10px; overflow: hidden; }
.progress-bar > div { background: var(--mid-blue); height: 100%; }

.callout { border-left: 4px solid var(--gray); background: #f4f1e6; padding: 0.8rem 1rem; margin: 1rem 0; border-radius: 4px; }
.callout .callout-label { font-weight: 700; display: block; margin-bottom: 0.25rem; }
.callout.watch_out { border-color: var(--gold); background: #fff6e0; }
.callout.key_point { border-color: var(--mid-blue); background: #eef0fb; }
.callout.nm_specific { border-color: var(--navy); background: #eaeaf7; }
.callout.mnemonic { border-color: var(--green); background: #eaf6ee; }
.callout.note { border-color: var(--gray); background: #f2f2f2; }
.badge-verify { background: var(--navy); color: white; font-size: 0.7rem; border-radius: 4px; padding: 0.1rem 0.4rem; margin-left: 0.5rem; }

.banner-unverified { background: #fff3cd; border: 1px solid var(--gold); color: #6b5410; padding: 0.75rem 1rem; border-radius: 6px; margin-bottom: 1rem; }

.md-table { border-collapse: collapse; width: 100%; margin: 1rem 0; }
.md-table th, .md-table td { border: 1px solid #ddd; padding: 0.4rem 0.6rem; text-align: left; }
.md-table th { background: #f4f1e6; }

.choice-list { list-style: none; padding: 0; }
.choice-list label { display: block; background: white; border: 1px solid #ddd; border-radius: 6px; padding: 0.6rem 1rem; margin-bottom: 0.5rem; cursor: pointer; }
.choice-list label:hover { border-color: var(--mid-blue); }
.choice-list input { margin-right: 0.6rem; }
.choice.correct { border-color: var(--green) !important; background: #eaf6ee; }
.choice.wrong { border-color: var(--red) !important; background: #fbeaea; }

.explanation { background: #eef0fb; border-radius: 6px; padding: 0.8rem 1rem; margin-top: 0.75rem; }

.unit-locked { opacity: 0.55; }
.tag { display: inline-block; font-size: 0.75rem; border-radius: 4px; padding: 0.1rem 0.5rem; background: #eee; color: #555; margin-left: 0.4rem; }
.tag.optional { background: #f4e4c3; color: #6b5410; }

form.inline { display: inline; }
input[type=text], input[type=password], input[type=number], select {
  padding: 0.5rem; border: 1px solid #ccc; border-radius: 6px; font-size: 1rem; width: 100%;
}
label.field { display: block; margin-bottom: 1rem; font-weight: 600; }

.flashcard { background: white; border: 1px solid #e6ddc7; border-radius: 10px; padding: 2.5rem 1.5rem; text-align: center; min-height: 160px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; cursor: pointer; }

.timer { font-family: 'Playfair Display', Georgia, serif; font-size: 1.3rem; color: var(--navy); }

pre.report { white-space: pre-wrap; background: white; border: 1px solid #e6ddc7; border-radius: 8px; padding: 1rem; font-size: 0.85rem; }
