/* mc-modern.css — clean-slate stylesheet for the modern mc engine.
   Layout uses normal flow / flexbox, not absolute positioning. */

:root {
  --body-bg: #fff;
  --body-text: #222;
  --accent: #2e6da4;
  --hl-bg: #eee;
  --gray: #666;
}

body {
  background: var(--body-bg);
  color: var(--body-text);
  font-family: 'Source Sans 3', Helvetica, sans-serif;
  font-size: 16px;
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

@media all and (min-width: 720px) {
  body { max-width: 700px; margin: 0 auto; }
}

/* ── Header / Nav (same convention as opp.css / mc.css) ── */
#esl-header {
  background: #2a2318;
  border-bottom: 3px solid #c8a84b;
  padding: .8rem 1.5rem;
  display: flex;
  align-items: center;
  gap: .8rem;
}
#esl-header img { width: 32px; height: 32px; }
#esl-site-title {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: #f5f0e8;
  text-decoration: none;
}
#esl-site-title:hover { color: #c8922a; }
#esl-header .sep { color: #5a4a35; margin: 0 4px; }
#esl-header .cat { font-size: .78rem; color: #9a8060; }
@media (max-width: 480px) { #esl-header .cat { display: none; } }

#esl-nav {
  background: #f0ece3;
  border-bottom: 1px solid #d9d3c7;
  padding: .4rem 1.5rem;
  display: flex;
  gap: 1rem;
  font-size: .82rem;
  flex-wrap: wrap;
}
#esl-nav a { font-weight: 600; text-decoration: none; }
#esl-nav .sep { color: #d9d3c7; }

/* ── Start screen ── */
#start-screen { padding: 1.2rem 1.5rem; }
#instructions { color: var(--gray); font-size: .95rem; }
#instructions a { color: var(--accent); cursor: pointer; }

#start-screen button, #next-btn {
  display: block;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 5px;
  padding: .6rem 1rem;
  margin: .5rem 0;
  cursor: pointer;
}
#start-screen button:hover, #next-btn:hover { opacity: .9; }

/* ── Quiz screen ── */
#quiz-screen { padding: 1.2rem 1.5rem; }

#progress {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  font-size: .95rem;
  color: var(--gray);
  margin-bottom: .5rem;
}
#progress .pct { color: var(--accent); }
.skip-link { margin-left: auto; color: var(--gray); text-decoration: none; }

.time-left {
  display: inline-block;
  color: #b33;
  font-weight: 600;
  margin-bottom: .5rem;
}

#question-text {
  font-size: 1.2rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}
.blank {
  border-bottom: 2px solid var(--accent);
  padding: 0 .3em;
}

#options { list-style: none; padding: 0; margin: 0 0 1rem; }
#options .option {
  padding: .7rem .9rem;
  margin-bottom: .5rem;
  border: 1px solid #ddd;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1.05rem;
}
#options .option:hover { background: var(--hl-bg); }

#feedback {
  background: var(--hl-bg);
  border-radius: 5px;
  padding: .8rem 1rem;
  margin-bottom: 1rem;
  line-height: 1.6;
}
#feedback a { color: var(--accent); }

/* ── Summary screen ── */
#summary-screen { padding: 1.2rem 1.5rem; }
#summary-content ul { padding-left: 1.2rem; }
#summary-content li { margin-bottom: .6rem; }
.hl { font-weight: 600; background: var(--hl-bg); padding: 0 .2em; }
.level {
  font-size: 90%;
  font-weight: 600;
  border: 1px solid #ccc;
  border-radius: .25em;
  padding: 1px 3px;
}
.no-errors { color: var(--gray); }
.copyright { font-size: .8rem; color: #999; margin-top: 2rem; }

/* ── Modal ── */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.5);
}
.modal-content {
  position: relative;
  background: #fff;
  border-radius: 8px;
  max-width: 400px;
  width: 90%;
  padding: 1.5rem;
  z-index: 1;
}
#close-modal {
  font-family: inherit;
  padding: .5rem 1.2rem;
  background: #2a2318;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

/* ── Watermark ── */
.watermark {
  position: fixed;
  bottom: 12px;
  right: 16px;
  font-size: .8em;
  color: rgba(42,35,24,0.25);
  font-weight: 600;
  pointer-events: none;
  font-family: Georgia, serif;
}
.watermark a { color: rgba(42,35,24,0.3); text-decoration: none; pointer-events: all; }
.watermark a:hover { color: rgba(42,35,24,0.6); }

/* ── Dark mode ── */
@media (prefers-color-scheme: dark) {
  :root {
    --body-bg: #1a1208;
    --body-text: #f0e6d0;
    --hl-bg: #2e2618;
    --gray: #9a8878;
  }
  #esl-nav { background: #1e1a12; border-bottom-color: #3a3020; }
  #esl-nav a { color: #c8b898; }
  #options .option { border-color: #3a3020; }
  .modal-content { background: #2a2318; color: #f0e6d0; }
}
