/* EMBER capstone — gated cross-competency assessment + certificate. */
:root {
  --bg: #0e1116; --panel: #161b22; --panel2: #1c232d; --line: #2a323d;
  --ink: #e7edf3; --muted: #93a1b0; --brand: #ff7a18; --brand2: #7ec9ff;
  --good: #3fb950; --bad: #f85149; --partial: #d29922;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 Inter, system-ui, -apple-system, Segoe UI, sans-serif; }
.topbar { display: flex; align-items: center; gap: 18px; padding: 16px 24px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #11161d, #0e1116); }
.topbar .back { color: var(--brand2); text-decoration: none; font-size: 14px; white-space: nowrap; }
.title-wrap h1 { margin: 0; font-size: 18px; } .title-wrap .sub { color: var(--muted); font-size: 13px; }
.wrap { max-width: 760px; margin: 0 auto; padding: 28px 20px 64px; }
.loading, .empty { color: var(--muted); padding: 48px 8px; text-align: center; }
.cap-ember { text-align: center; line-height: 0; margin-bottom: 10px; }
.cap-ember svg { filter: drop-shadow(0 6px 16px rgba(255,122,24,.22)); }

.gate, .intro { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 30px; text-align: center; }
.gate h2, .intro h2 { margin: 6px 0 10px; }
.intro p, .gate p { color: var(--muted); max-width: 560px; margin: 0 auto 18px; }
.cta { display: inline-block; background: var(--brand); color: #160a04; text-decoration: none; font-weight: 700; border-radius: 9px; padding: 11px 20px; }

/* Locked-state explainer: what the capstone is + live progress toward unlocking. */
.gate-lede { color: var(--muted); max-width: 560px; margin: 0 auto 18px; }
.gate-lede b { color: var(--ink); font-weight: 600; }
.gate-facts { list-style: none; margin: 0 auto 20px; padding: 0; max-width: 520px; text-align: left; display: grid; gap: 10px; }
.gate-facts li { position: relative; padding-left: 28px; color: var(--muted); font-size: 14.5px; line-height: 1.45; }
.gate-facts li::before { content: "🔥"; position: absolute; left: 0; top: 1px; font-size: 13px; }
.gate-facts b { color: var(--ink); font-weight: 700; }
.gate-prog { max-width: 520px; margin: 0 auto 22px; text-align: left; background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 15px 17px; }
.gate-prog-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 13px; color: var(--muted); margin-bottom: 9px; }
.gate-prog-head b { color: var(--ink); font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gate-bar { height: 9px; border-radius: 5px; background: var(--line); overflow: hidden; }
.gate-bar i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--brand), #ffb020); transition: width .4s ease; }
.gate-remaining { color: var(--muted); font-size: 12.5px; margin: 10px 0 0; }
.intro button, .result button { cursor: pointer; background: var(--brand); color: #160a04; border: 0; font-weight: 700; border-radius: 9px; padding: 12px 22px; font-size: 15px; }

.exam h2 { margin: 0 0 2px; } .exam-sub { color: var(--muted); font-size: 13px; margin: 0 0 18px; }
.q { border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin: 0 0 14px; background: var(--panel); }
.q-head { font-size: 15px; line-height: 1.4; padding: 0; }
.q-mod { display: inline-block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--brand2); margin-right: 6px; }
.q-choices { display: grid; gap: 8px; margin-top: 12px; }
.q-choice { display: flex; gap: 10px; align-items: flex-start; background: var(--panel2); border: 1px solid var(--line); border-radius: 9px; padding: 11px 14px; cursor: pointer; font-size: 14px; }
.q-choice:hover { border-color: var(--brand2); }
.q-choice input { margin-top: 3px; accent-color: var(--brand); }
.submit { cursor: pointer; background: var(--brand); color: #160a04; border: 0; font-weight: 700; border-radius: 10px; padding: 13px 24px; font-size: 15px; margin-top: 6px; }

.result { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 30px; text-align: center; }
.score-ring { width: 120px; height: 120px; border-radius: 50%; margin: 0 auto 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 6px solid var(--line); }
.score-ring.pass { border-color: var(--good); } .score-ring.fail { border-color: var(--partial); }
.score-ring b { font-size: 30px; } .score-ring span { font-size: 12px; letter-spacing: .1em; color: var(--muted); }
.result p { color: var(--muted); max-width: 560px; margin: 0 auto 18px; }
.cert { border: 2px solid var(--brand); border-radius: 14px; padding: 24px; margin: 0 auto 20px; max-width: 460px; background: linear-gradient(135deg, rgba(255,122,24,.10), rgba(126,201,255,.05)); }
.cert-name { font-size: 26px; font-weight: 800; letter-spacing: .04em; color: var(--brand); }
.cert-line { color: var(--ink); margin: 2px 0 12px; }
.cert-pass { font-weight: 700; color: var(--good); }
.cert-id { color: var(--muted); font-size: 12px; margin-top: 8px; }

/* ── Light-mode literal-colour overrides (dark rules above are untouched) ── */
/* .topbar hardcodes a dark gradient (#11161d → #0e1116) that would stay a dark
   bar on a light page; re-express it via palette tokens for light mode only. */
:root[data-theme="light"] .topbar { background: linear-gradient(180deg, var(--panel), var(--bg)); }
