:root {
  --ink: #0b2b33;
  --ink-soft: #35535c;
  --muted: #5f7a82;
  --line: #dbe7ea;
  --bg: #f2f7f8;
  --card: #ffffff;
  --accent: #0e7490;
  --accent-dark: #0b5563;
  --good: #1a7f4b;
  --good-bg: #e7f4ec;
  --bad: #b3341f;
  --bad-bg: #fbeae6;
  --soon-bg: #eef3f5;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(11, 43, 51, 0.06), 0 6px 20px rgba(11, 43, 51, 0.05);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.58;
  -webkit-font-smoothing: antialiased;
}

.wrap { width: 100%; max-width: 780px; margin: 0 auto; padding: 0 20px; }

h1, h2, h3 { font-family: "Fraunces", Georgia, serif; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
h2 { font-size: 1.5rem; margin: 0 0 0.5rem; }
h3 { font-size: 1.04rem; margin: 1.4rem 0 0.4rem; }
p { margin: 0.6rem 0; }

.site-header { background: var(--ink); color: #fff; }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 9px; background: var(--accent); color: #fff; font-family: "Fraunces", serif; font-weight: 600; font-size: 1rem; }
.brand-title { font-family: "Fraunces", serif; font-weight: 600; font-size: 1.02rem; }
.brand-sub { font-size: 0.8rem; color: #a6c6cf; }

main { padding: 30px 20px 56px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px 26px; margin-bottom: 16px; }
.lead { color: var(--ink-soft); }

.btn { display: inline-flex; align-items: center; gap: 8px; background: var(--accent); color: #fff; border: 0; padding: 11px 20px; border-radius: 9px; font: inherit; font-weight: 600; cursor: pointer; transition: background 0.15s; }
.btn:hover { background: var(--accent-dark); }
.btn:disabled { background: #b4c6c2; cursor: not-allowed; }
.btn.secondary { background: #e7efed; color: var(--ink); }
.btn.secondary:hover { background: #dbe8e5; }

.back { font-size: 0.88rem; margin-bottom: 14px; display: inline-block; cursor: pointer; color: var(--accent); }

/* module list */
.mod-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.mod-row:first-child { border-top: 0; }
.mod-title { font-weight: 600; }
.mod-sub { font-size: 0.82rem; color: var(--muted); }
.chip { font-size: 0.76rem; font-weight: 600; padding: 4px 10px; border-radius: 99px; white-space: nowrap; }
.chip.ready { background: var(--accent); color: #fff; }
.chip.soon { background: var(--soon-bg); color: var(--muted); }
.chip.passed { background: var(--good-bg); color: var(--good); }

/* reading */
.reading ul, .reading ol { padding-left: 1.3rem; }
.reading li { margin: 0.32rem 0; }
.reading h3 { border-top: 1px solid var(--line); padding-top: 1rem; }
.reading h3:first-of-type { border-top: 0; padding-top: 0; }
.authorities { background: var(--soon-bg); border-radius: 9px; padding: 2px 16px; margin-top: 8px; }

/* quiz */
.qmeta { font-size: 0.82rem; color: var(--muted); margin-bottom: 6px; }
.q-prompt { font-weight: 600; font-size: 1.08rem; margin: 6px 0 14px; }
.option { display: block; padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px; margin: 8px 0; cursor: pointer; transition: border-color 0.12s, background 0.12s; }
.option:hover { border-color: #b9ccc7; background: #fafcfb; }
.option.chosen { border-color: var(--accent); }
.option.correct { border-color: var(--good); background: var(--good-bg); }
.option.wrong { border-color: var(--bad); background: var(--bad-bg); }
.option[aria-disabled="true"] { cursor: default; }
.explain { border-left: 3px solid var(--accent); background: #f1f7f6; padding: 10px 14px; border-radius: 0 8px 8px 0; margin: 12px 0; }
.explain.ok { border-left-color: var(--good); }
.explain.no { border-left-color: var(--bad); }
.verdict { font-weight: 600; }
.verdict.ok { color: var(--good); }
.verdict.no { color: var(--bad); }
.progress-dots { display: flex; gap: 6px; margin: 2px 0 12px; }
.dot { width: 9px; height: 9px; border-radius: 99px; background: var(--line); }
.dot.ok { background: var(--good); }
.dot.no { background: var(--bad); }
.dot.now { background: var(--accent); }

.score-big { font-family: "Fraunces", serif; font-size: 2.6rem; font-weight: 600; }
.row-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.note { font-size: 0.85rem; color: var(--muted); }
.hidden { display: none; }

.site-footer { border-top: 1px solid var(--line); background: #fff; }
.footer-inner { padding: 14px 20px; font-size: 0.8rem; color: var(--muted); }

@media (max-width: 560px) { .card { padding: 18px; } }
