/* ============================================================
   SparkyPrep — "Copper & Carbon" theme
   Dark carbon · copper & amber · industrial
   ============================================================ */
:root {
  color-scheme: dark;
  --bg: #0E0D0B;
  --bg-2: #17120D;
  --panel: rgba(255, 255, 255, .04);
  --panel-2: rgba(255, 255, 255, .07);
  --line: rgba(255, 255, 255, .09);
  --line-2: rgba(255, 255, 255, .16);

  --text: #F2E9DE;
  --muted: #B6A48E;
  --faint: #7C6E5C;

  --cyan: #C8732B;
  --cyan-2: #F0A23B;
  --violet: #E08A2E;
  --violet-2: #F4B45E;
  --lime: #F0A23B;
  --green: #2BD980;
  --amber: #FBBF24;
  --rose: #FB5778;

  --grad: linear-gradient(135deg, #C8732B 0%, #E08A2E 100%);
  --grad-text: linear-gradient(100deg, #F0A23B 0%, #F4B45E 55%, #F0A23B 100%);

  --glow-cyan: 0 0 0 1px rgba(200, 115, 43, .35), 0 0 26px rgba(200, 115, 43, .35);
  --glow-violet: 0 0 0 1px rgba(224, 138, 46, .35), 0 0 26px rgba(224, 138, 46, .4);
  --shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 24px 60px -34px rgba(0, 0, 0, .9);

  --radius: 16px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
html, body { max-width: 100%; overflow-x: clip; }
body {
  margin: 0;
  font-family: "Barlow", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

/* ---------- ambient backdrop ---------- */
.bg-aurora, .bg-grid, .bg-noise { position: fixed; inset: 0; z-index: -3; pointer-events: none; }
.bg-aurora {
  z-index: -3;
  background:
    radial-gradient(42% 50% at 12% 6%, rgba(200, 115, 43, .28), transparent 60%),
    radial-gradient(40% 48% at 92% 2%, rgba(224, 138, 46, .26), transparent 60%),
    radial-gradient(46% 50% at 82% 88%, rgba(240, 162, 59, .10), transparent 60%),
    radial-gradient(50% 55% at 20% 96%, rgba(224, 138, 46, .16), transparent 62%);
  filter: saturate(125%);
  animation: drift 26s ease-in-out infinite alternate;
}
@keyframes drift { to { transform: translate3d(0, -2.5%, 0) scale(1.08); } }
.bg-grid {
  z-index: -2; opacity: .5;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 54px 54px;
  -webkit-mask-image: radial-gradient(80% 60% at 50% 0%, #000 30%, transparent 78%);
  mask-image: radial-gradient(80% 60% at 50% 0%, #000 30%, transparent 78%);
}
.bg-noise {
  z-index: -1; opacity: .04; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- typography ---------- */
h1, h2, h3 { font-family: "Oswald", system-ui, sans-serif; line-height: 1.1; margin: 0 0 .4em; letter-spacing: .01em; font-weight: 600; }
h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); }
h2 { font-size: 1.4rem; }
p { margin: 0 0 1rem; }
a { color: var(--cyan-2); text-decoration: none; }
strong { color: #fff; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 22px; }
.narrow { max-width: 780px; }
.setup-wrap { max-width: 960px; }
.section { padding: 60px 22px; }
.section-head { margin-bottom: 30px; }
.section-head p { color: var(--muted); margin: 0; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.num, .mono { font-family: "JetBrains Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  text-transform: uppercase; letter-spacing: .22em; font-size: .72rem; font-weight: 600;
  color: var(--cyan-2); margin: 0 0 18px;
}
.eyebrow::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--cyan); box-shadow: 0 0 12px var(--cyan); animation: blink 2s ease-in-out infinite;
}
@keyframes blink { 50% { opacity: .35; } }
.lede { font-size: 1.12rem; color: var(--muted); max-width: 60ch; }

.grad-text, .hero h1 .accent {
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font: inherit; font-weight: 600; cursor: pointer; border: 1px solid transparent;
  border-radius: 9px; padding: .68rem 1.2rem; transition: transform .18s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease, color .2s;
  position: relative; white-space: nowrap;
}
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--grad); color: #1c1206; font-weight: 700; box-shadow: 0 10px 26px -12px rgba(200, 115, 43, .6); }
.btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 14px 34px -10px rgba(200, 115, 43, .7), var(--glow-violet); }
.btn-ghost { background: var(--panel); color: var(--text); border-color: var(--line-2); }
.btn-ghost:hover:not(:disabled) { border-color: var(--cyan); color: #fff; box-shadow: var(--glow-cyan); }
.btn-sm { padding: .45rem .85rem; font-size: .9rem; border-radius: 8px; }
.btn-lg { padding: .85rem 1.55rem; font-size: 1.05rem; }
.btn svg { width: 1.05em; height: 1.05em; }
/* long, content-driven action buttons must wrap rather than force horizontal overflow */
.card > .btn[data-open] { max-width: 100%; white-space: normal; }

/* ---------- header (solid carbon toolbar) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; padding: 0;
  background: rgba(14, 13, 11, .92);
  backdrop-filter: blur(10px) saturate(120%); -webkit-backdrop-filter: blur(10px) saturate(120%);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(200, 115, 43, .28), 0 14px 30px -26px #000;
}
.header-inner {
  display: flex; align-items: center; gap: 16px; height: 64px;
  background: none; border: 0; border-radius: 0; box-shadow: none;
}
.brand { display: flex; align-items: center; gap: 12px; background: none; border: 0; cursor: pointer; color: var(--text); padding: 0; }
.brand-logo { width: 46px; height: 46px; border-radius: 11px; display: block; object-fit: cover; flex-shrink: 0; }
.auth-logo { width: 76px; height: 76px; border-radius: 18px; display: inline-block; object-fit: cover; margin-bottom: 14px; }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px;
  background: var(--grad); color: #1c1206; box-shadow: 0 2px 12px -3px rgba(200, 115, 43, .6);
}
.brand-mark svg { width: 20px; height: 20px; }
.brand-name { font-family: "Oswald", sans-serif; font-weight: 700; font-size: 1.28rem; letter-spacing: .07em; text-transform: uppercase; }
.brand-accent { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.site-nav { display: flex; gap: 4px; margin-left: auto; }
.nav-link {
  background: none; border: 0; color: var(--muted); font: inherit; font-weight: 600;
  padding: .5rem .85rem; border-radius: 8px; cursor: pointer; transition: .18s;
  text-transform: uppercase; letter-spacing: .05em; font-size: .82rem;
}
.nav-link:hover { color: #fff; background: var(--panel-2); }
.nav-link.is-active { color: #fff; background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.header-inner .btn-primary { margin-left: 2px; }

/* ---------- icons ---------- */
.ic { width: 18px; height: 18px; flex-shrink: 0; }

/* ---------- hero ---------- */
.hero { position: relative; padding: 64px 0 50px; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero-copy { min-width: 0; }
.hero h1 { font-size: clamp(2.2rem, 4.8vw, 3.7rem); margin-bottom: .34em; }
.hero .lede { color: #C2CDE4; font-size: 1.15rem; }
.hero-actions { display: flex; gap: 13px; flex-wrap: wrap; margin-top: 30px; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 9px 22px; margin-top: 30px; }
.hero-trust span { display: inline-flex; align-items: center; gap: 7px; font-size: .85rem; color: var(--muted); }
.hero-trust .ic { width: 15px; height: 15px; color: var(--green); }
.hero-visual { display: flex; justify-content: center; align-items: center; }
.hero-art { width: 100%; max-width: 500px; animation: float 7s ease-in-out infinite; }
.hero-art .nodes circle { animation: nodepulse 2.4s ease-in-out infinite; }
.hero-art .bolt-glow { animation: boltpulse 3s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-12px); } }
@keyframes nodepulse { 50% { opacity: .25; } }
@keyframes boltpulse { 50% { opacity: .42; } }
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 10px; }
  .hero-visual { order: -1; }
  .hero-art { max-width: 300px; }
  .hero-trust { gap: 8px 16px; }
}

/* ---------- quiz cards ---------- */
.quiz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 20px; }
.quiz-card {
  position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden;
  transition: transform .25s cubic-bezier(.22, 1, .36, 1), border-color .25s, box-shadow .25s;
}
.quiz-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: var(--grad); opacity: .7; }
.quiz-card:not(.is-soon):hover { transform: translateY(-5px); border-color: var(--line-2); box-shadow: 0 30px 60px -34px rgba(0, 0, 0, .9), 0 0 30px -6px rgba(200, 115, 43, .25); }
.quiz-card.is-soon { opacity: .66; }
.quiz-card.is-soon::before { background: var(--line-2); }
.quiz-card:not(.is-soon) { cursor: pointer; }
.quiz-card:not(.is-soon):hover .quiz-card-cta { gap: .65rem; color: #fff; }
.quiz-card-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.exam-ic { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; background: rgba(200, 115, 43, .1); border: 1px solid var(--line-2); color: var(--cyan-2); box-shadow: inset 0 0 18px -8px rgba(200, 115, 43, .7); }
.exam-ic .ic { width: 24px; height: 24px; }
.is-soon .exam-ic { color: var(--muted); background: var(--panel-2); box-shadow: none; }
.quiz-card h3 { font-size: 1.32rem; margin-bottom: .35rem; }
.quiz-card-tag { color: var(--muted); font-weight: 500; margin-bottom: 1.05rem; flex: 1; }
.quiz-card-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 1.2rem; }
.quiz-card-meta span { display: inline-flex; align-items: center; gap: 6px; font-size: .84rem; color: var(--muted); }
.quiz-card-meta .ic { width: 15px; height: 15px; color: var(--cyan-2); }
.quiz-card-cta { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; color: var(--cyan-2); transition: gap .2s, color .2s; margin-top: auto; }
.quiz-card-cta .ic { width: 17px; height: 17px; }
.quiz-card-cta.is-soon { color: var(--faint); }

.badge { font-size: .68rem; font-weight: 700; padding: .26rem .62rem; border-radius: 999px; text-transform: uppercase; letter-spacing: .08em; }
.badge-live { color: #061018; background: linear-gradient(135deg, var(--green), var(--cyan)); box-shadow: 0 0 18px rgba(43, 217, 128, .4); }
.badge-soon { color: var(--muted); background: var(--panel-2); border: 1px solid var(--line); }

/* ---------- generic card ---------- */
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow); margin: 20px 0;
}
.card-title { font-size: 1.2rem; }
.back { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; padding: 0; margin-bottom: 16px; transition: color .18s; }
.back:hover { color: var(--cyan); }
.notice { background: rgba(200, 115, 43, .07); border: 1px solid rgba(200, 115, 43, .25); color: var(--cyan-2); padding: 16px; border-radius: 12px; }

/* ---------- fields & pills ---------- */
.field { margin: 18px 0; }
.field-label { display: block; font-weight: 600; margin-bottom: 9px; color: #D6DEEE; }
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  background: var(--panel); border: 1px solid var(--line-2); border-radius: 999px;
  padding: .5rem 1rem; font: inherit; font-weight: 500; cursor: pointer; transition: .18s; color: var(--text);
}
.pill:hover:not(:disabled) { border-color: var(--cyan); color: #fff; }
.pill:disabled { opacity: .3; cursor: not-allowed; }
.pill.is-on { background: var(--grad); color: #061018; border-color: transparent; font-weight: 700; box-shadow: 0 6px 18px -8px rgba(200, 115, 43, .6); }
.len-pill { min-width: 48px; text-align: center; font-family: "JetBrains Mono", monospace; }

.time-estimate {
  margin: .7rem 0 0; font-size: .92rem; color: var(--muted);
  padding: .6rem .85rem; border-radius: 11px; background: rgba(224, 138, 46, .08); border: 1px solid rgba(224, 138, 46, .25);
}
.time-estimate.is-timed { background: rgba(200, 115, 43, .07); border-color: rgba(200, 115, 43, .25); }
.time-estimate strong { color: var(--cyan-2); }

/* ---------- setup: segmented Practice / Exam ---------- */
.setup-sub { color: var(--muted); font-size: 1.05rem; margin: -.1rem 0 .3rem; }
.card-title .ic { width: 20px; height: 20px; }
.exam-real {
  display: flex; align-items: flex-start; gap: 9px; margin: .3rem 0 .9rem;
  font-size: .92rem; color: #D6DEEE; padding: .6rem .85rem; border-radius: 11px;
  background: rgba(200, 115, 43, .07); border: 1px solid rgba(200, 115, 43, .25);
}
.exam-real .ic { width: 16px; height: 16px; color: var(--cyan-2); flex-shrink: 0; margin-top: 2px; }
.exam-real-label { font-weight: 700; color: var(--cyan-2); }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 11px; overflow: hidden; background: var(--panel); }
.step-btn { width: 44px; height: 44px; background: none; border: 0; color: var(--text); font-size: 1.4rem; line-height: 1; cursor: pointer; transition: .15s; }
.step-btn:hover { background: var(--panel-2); color: var(--cyan-2); }
.step-val { min-width: 76px; text-align: center; font-family: "JetBrains Mono", monospace; font-weight: 700; font-size: 1.1rem; padding: 0 6px; }
.setup-passnote { font-size: .85rem; margin: 9px 0 0; }
.seg {
  display: flex; width: 100%; max-width: 340px; gap: 4px; margin-bottom: 16px;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--line-2); border-radius: 999px; padding: 4px;
}
.seg-btn {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: none; border: 0; color: var(--muted); font: inherit; font-weight: 600;
  padding: .58rem 1rem; border-radius: 999px; cursor: pointer; transition: .18s;
}
.seg-btn .ic { width: 17px; height: 17px; }
.seg-btn:hover { color: #fff; }
.seg-btn.is-on { color: #061018; background: var(--grad); box-shadow: 0 6px 18px -8px rgba(200, 115, 43, .6); }
.mode-desc { color: var(--muted); margin: 0 0 20px; max-width: 62ch; }
.setup-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.setup-actions .btn { flex: 1; min-width: 200px; }
.flag-btn .ic { width: 15px; height: 15px; }
[hidden] { display: none !important; }

/* ---------- quiz runner ---------- */
.quiz-wrap { padding: 40px 22px 70px; max-width: 800px; }
.quiz-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.qcount { font-family: "JetBrains Mono", monospace; font-weight: 700; font-size: .95rem; color: #D6DEEE; }
.qcount { margin-right: auto; }
.quiz-top .back { margin: 0; }
.exam-timer {
  font-family: "JetBrains Mono", monospace; font-variant-numeric: tabular-nums; font-weight: 700;
  background: rgba(200, 115, 43, .1); color: var(--cyan-2); padding: .3rem .75rem; border-radius: 999px;
  font-size: .92rem; border: 1px solid rgba(200, 115, 43, .35); box-shadow: 0 0 18px -4px rgba(200, 115, 43, .5);
}
.exam-timer.timer-low { color: #fff; background: rgba(251, 191, 36, .16); border-color: var(--amber); box-shadow: 0 0 20px -3px rgba(251, 191, 36, .6); animation: pulse 1s ease-in-out infinite; }
.exam-timer.timer-over { color: #fff; background: rgba(251, 87, 120, .18); border-color: var(--rose); box-shadow: 0 0 22px -2px rgba(251, 87, 120, .7); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }

.progress { height: 8px; background: rgba(255, 255, 255, .07); border-radius: 999px; overflow: hidden; }
.progress.small { height: 6px; }
.progress-bar { height: 100%; background: var(--grad); border-radius: 999px; transition: width .35s ease; box-shadow: 0 0 14px rgba(200, 115, 43, .5); }
.progress-bar.bar-warn { background: linear-gradient(90deg, var(--amber), #ffd874); box-shadow: 0 0 14px rgba(251, 191, 36, .5); }

.question-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); margin-top: 20px; }
.question-text { font-family: "Oswald", sans-serif; font-size: 1.4rem; line-height: 1.3; margin-bottom: 22px; }
.options { display: grid; gap: 11px; }
.option {
  display: flex; align-items: center; gap: 13px; text-align: left; width: 100%;
  background: rgba(255, 255, 255, .025); border: 1.5px solid var(--line); border-radius: 13px;
  padding: .95rem 1.05rem; font: inherit; cursor: pointer; transition: .16s; color: var(--text);
}
.option:hover:not(:disabled) { border-color: var(--cyan); background: rgba(200, 115, 43, .07); box-shadow: var(--glow-cyan); }
.option:disabled { cursor: default; }
.opt-letter {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: var(--panel-2); font-family: "JetBrains Mono", monospace; font-weight: 700; font-size: .9rem; color: var(--cyan-2);
  border: 1px solid var(--line);
}
.opt-text { flex: 1; }
.opt-chosen { border-color: var(--cyan); background: rgba(200, 115, 43, .1); box-shadow: var(--glow-cyan); }
.opt-chosen .opt-letter { background: var(--grad); color: #061018; border-color: transparent; }
.opt-correct { border-color: var(--green); background: rgba(43, 217, 128, .12); box-shadow: 0 0 0 1px rgba(43, 217, 128, .35), 0 0 24px rgba(43, 217, 128, .3); }
.opt-correct .opt-letter { background: var(--green); color: #04140c; border-color: transparent; }
.opt-wrong { border-color: var(--rose); background: rgba(251, 87, 120, .12); }
.opt-wrong .opt-letter { background: var(--rose); color: #fff; border-color: transparent; }

.feedback { margin-top: 20px; border-radius: 13px; padding: 17px 19px; border: 1px solid; }
.fb-correct { background: rgba(43, 217, 128, .1); border-color: rgba(43, 217, 128, .35); }
.fb-wrong { background: rgba(251, 191, 36, .09); border-color: rgba(251, 191, 36, .32); }
.fb-head { font-family: "Oswald", sans-serif; font-weight: 700; margin-bottom: 7px; }
.fb-correct .fb-head { color: var(--green); }
.fb-wrong .fb-head { color: var(--amber); }
.fb-explain { margin-bottom: 11px; color: #D6DEEE; }
.fb-ref { margin: 0; font-size: .95rem; color: var(--muted); }
.fb-ref-label { font-weight: 700; color: var(--cyan-2); }

.quiz-actions { display: flex; justify-content: flex-end; align-items: center; margin-top: 22px; min-height: 46px; }

/* ---------- per-question pace bar ---------- */
.qtimer-wrap { margin-top: 14px; }
.qtimer-label { display: flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.qtimer-label .ic { width: 14px; height: 14px; }
.qcount-num { font-family: "JetBrains Mono", monospace; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--cyan-2); }
.qcount-num.low { color: var(--amber); }
.qcount-num.over { color: var(--rose); }
.qtimer-track { height: 10px; background: rgba(255, 255, 255, .07); border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.qtimer-fill {
  height: 100%; width: 100%; border-radius: 999px; background: var(--green);
  transform-origin: left center; box-shadow: 0 0 16px rgba(43, 217, 128, .6);
  animation-name: qdrain; animation-timing-function: linear; animation-fill-mode: forwards;
}
.qtimer-fill.is-frozen { animation: none; transition: none; }
@keyframes qdrain {
  0%   { transform: scaleX(1); background: var(--green); }
  70%  { background: var(--green); }
  85%  { background: var(--amber); }
  100% { transform: scaleX(0); background: var(--rose); }
}
@media (prefers-reduced-motion: reduce) { .qtimer-fill { animation: none; } }

/* ---------- exam flow: flag, navigation, navigator ---------- */
.exam-q-actions { margin-top: 18px; display: flex; justify-content: flex-end; }
.flag-btn { gap: .45rem; }
.flag-btn.is-flagged { color: var(--amber); border-color: var(--amber); background: rgba(251, 191, 36, .1); box-shadow: 0 0 18px -6px rgba(251, 191, 36, .6); }

.exam-nav { display: flex; gap: 10px; margin-top: 20px; align-items: center; }
.exam-nav #nextBtn { margin-left: auto; min-width: 140px; }

.navigator { margin-top: 22px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.nav-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: .92rem; }
.nav-head strong { color: #fff; font-family: "JetBrains Mono", monospace; }
.nav-flagged-btn { background: none; border: 0; color: var(--cyan-2); font: inherit; font-weight: 600; cursor: pointer; padding: 0; transition: .18s; }
.nav-flagged-btn:hover:not(:disabled) { text-shadow: 0 0 12px rgba(200, 115, 43, .7); }
.nav-flagged-btn:disabled { color: var(--faint); cursor: not-allowed; }
.nav-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: 8px; }
.nav-cell {
  position: relative; aspect-ratio: 1 / 1; border: 1.5px solid var(--line); background: rgba(255, 255, 255, .025);
  border-radius: 10px; font-family: "JetBrains Mono", monospace; font-weight: 700; font-size: .85rem; color: var(--muted);
  cursor: pointer; transition: .14s;
}
.nav-cell:hover { border-color: var(--cyan); color: #fff; }
.nav-cell.is-answered { background: rgba(200, 115, 43, .14); border-color: rgba(200, 115, 43, .5); color: var(--cyan-2); }
.nav-cell.is-unseen { color: var(--faint); }
.nav-cell.is-flagged { border-color: var(--amber); box-shadow: inset 0 0 0 1px var(--amber); }
.nav-cell.is-flagged::after { content: "⚑"; position: absolute; top: -8px; right: -3px; font-size: .72rem; color: var(--amber); text-shadow: 0 0 8px rgba(251, 191, 36, .8); }
.nav-cell.is-current { border-color: var(--violet); color: #fff; box-shadow: 0 0 0 3px rgba(224, 138, 46, .3), 0 0 18px -3px rgba(224, 138, 46, .8); }
.nav-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 16px; font-size: .8rem; color: var(--muted); }
.nav-legend i.lg { display: inline-block; width: 12px; height: 12px; border-radius: 4px; vertical-align: middle; margin-right: 6px; border: 1.5px solid var(--line); }
.lg-ans { background: rgba(200, 115, 43, .14); border-color: rgba(200, 115, 43, .5) !important; }
.lg-flag { border-color: var(--amber) !important; }
.lg-cur { border-color: var(--violet) !important; box-shadow: 0 0 8px rgba(224, 138, 46, .7); }
.lg-uns { background: rgba(255, 255, 255, .025); }
.nav-submit { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: space-between; }
.nav-submit-hint { font-size: .82rem; color: var(--muted); }
.btn-submit { background: linear-gradient(135deg, var(--violet), var(--rose)); color: #fff; box-shadow: 0 10px 30px -12px rgba(224, 138, 46, .7); }
.btn-submit:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 14px 34px -12px rgba(224, 138, 46, .9), var(--glow-violet); }

/* ---------- results ---------- */
.result-hero { display: flex; gap: 30px; align-items: center; flex-wrap: wrap; padding: 30px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.result-hero::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: var(--grad); }
.result-hero.pass { border-color: rgba(43, 217, 128, .4); box-shadow: var(--shadow), 0 0 40px -16px rgba(43, 217, 128, .5); }
.result-ring {
  --p: 0; flex-shrink: 0; width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center; position: relative;
  background: conic-gradient(from -90deg, var(--cyan) 0%, var(--violet) calc(var(--p) * 1%), rgba(255, 255, 255, .07) 0);
  box-shadow: 0 0 30px -6px rgba(200, 115, 43, .5);
}
.result-hero.fail .result-ring { background: conic-gradient(from -90deg, var(--amber), var(--rose) calc(var(--p) * 1%), rgba(255, 255, 255, .07) 0); box-shadow: 0 0 30px -6px rgba(251, 191, 36, .5); }
.result-ring::after { content: ""; position: absolute; width: 102px; height: 102px; border-radius: 50%; background: var(--bg-2); }
.result-pct { position: relative; z-index: 1; font-family: "JetBrains Mono", monospace; font-size: 2rem; font-weight: 700; color: #fff; }
.result-hero h1 { margin-bottom: .2em; }
.timed-note { font-weight: 600; color: var(--cyan-2); margin: 0 0 .7rem; font-family: "JetBrains Mono", monospace; font-size: .9rem; }
.timed-note.over { color: var(--rose); }

.sec-list { display: grid; gap: 17px; }
.sec-row-top { display: flex; justify-content: space-between; margin-bottom: 7px; }
.sec-name { font-weight: 600; }
.sec-score { font-family: "JetBrains Mono", monospace; font-weight: 700; }
.sec-score.ok { color: var(--green); }
.sec-score.no { color: var(--amber); }

.review-list { display: grid; gap: 10px; }
.review-item { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: rgba(255, 255, 255, .02); }
.review-item summary { display: flex; gap: 11px; align-items: flex-start; padding: 15px 17px; cursor: pointer; list-style: none; font-weight: 600; }
.review-item summary::-webkit-details-marker { display: none; }
.rev-mark { font-weight: 800; }
.rev-ok .rev-mark { color: var(--green); }
.rev-no .rev-mark { color: var(--rose); }
.rev-q { flex: 1; }
.rev-time { margin-left: auto; flex-shrink: 0; font-family: "JetBrains Mono", monospace; font-size: .78rem; font-weight: 700; color: var(--green); background: rgba(43, 217, 128, .12); padding: .18rem .55rem; border-radius: 999px; }
.rev-time.over { color: var(--rose); background: rgba(251, 87, 120, .14); }
.rev-time.none { color: var(--faint); background: var(--panel-2); }
.rev-body { padding: 0 17px 17px 44px; color: var(--muted); }
.rev-body p { margin: .4rem 0; }
.rev-body strong { color: #D6DEEE; }
.rev-timeline { font-weight: 600; color: var(--cyan-2); font-family: "JetBrains Mono", monospace; font-size: .85rem; }
.rev-timeline.over { color: var(--rose); }

/* ---------- revision ---------- */
.rev-secs { display: grid; gap: 15px; margin: 18px 0 22px; }
.rev-sec h3 { font-size: 1rem; margin-bottom: 7px; color: var(--cyan-2); }
.ref-list { margin: 0; padding-left: 18px; color: var(--muted); }
.ref-list li { margin: 3px 0; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 50px; }
.footer-inner { padding: 36px 22px; text-align: center; color: var(--muted); }
.footer-inner p { margin: .3rem 0; }
.footer-tag { font-family: "Oswald", sans-serif; font-size: 1.02rem; color: #D6DEEE; }
.footer-tag strong { color: #fff; }
.footer-credit { font-size: .9rem; }
.footer-credit strong { color: #fff; }
.coffee { color: var(--lime); font-weight: 600; }
.coffee:hover { text-shadow: 0 0 14px rgba(240, 162, 59, .7); }

/* ---------- a11y & motion ---------- */
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 6px; }
.fade-in { animation: fade .4s cubic-bezier(.22, 1, .36, 1) both; }
@keyframes fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .12); border-radius: 7px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: rgba(200, 115, 43, .4); }

@media (prefers-reduced-motion: reduce) {
  .bg-aurora { animation: none; }
  .eyebrow::before, .exam-timer { animation: none; }
  .fade-in { animation: none; }
  * { scroll-behavior: auto; }
}

/* ---------- responsive ---------- */
@media (max-width: 640px) {
  .site-nav { display: none; }
  .header-inner .header-right { margin-left: auto; }
  .hero { padding: 56px 0 46px; }
  .result-hero { gap: 20px; }
  .quiz-wrap { padding: 28px 18px 56px; }
}

/* ---------- header account ---------- */
.header-right { display: flex; align-items: center; gap: 8px; margin-left: 4px; }
.acct-chip { display: inline-flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--line-2); color: var(--text); font: inherit; font-weight: 600; padding: .4rem .85rem .4rem .7rem; border-radius: 999px; cursor: pointer; transition: .18s; }
.acct-chip .ic { width: 18px; height: 18px; color: var(--cyan-2); }
.acct-chip:hover, .acct-chip.is-active { border-color: var(--cyan); box-shadow: var(--glow-cyan); }
.icon-btn { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line-2); color: var(--muted); cursor: pointer; transition: .18s; }
.icon-btn .ic { width: 18px; height: 18px; }
.icon-btn:hover { color: #fff; background: var(--panel-2); }

/* ---------- forms ---------- */
.fld { display: block; margin-bottom: 14px; }
.fld span { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 7px; color: #D6DEEE; }
input[type=text], input[type=email], input[type=password] {
  width: 100%; background: rgba(255, 255, 255, .04); border: 1.5px solid var(--line-2); border-radius: 12px;
  color: var(--text); font: inherit; font-size: 16px; padding: .8rem .95rem; transition: .18s; -webkit-appearance: none;
}
input::placeholder { color: var(--faint); }
input:focus { outline: none; border-color: var(--cyan); background: rgba(200, 115, 43, .06); box-shadow: var(--glow-cyan); }

/* ---------- auth ---------- */
.auth-wrap { max-width: 460px; }
.auth-card { padding: 30px; }
.auth-head { text-align: center; margin-bottom: 20px; }
.auth-mark { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 15px; background: var(--grad); color: #06101e; box-shadow: var(--glow-cyan); margin-bottom: 14px; }
.auth-mark .ic { width: 28px; height: 28px; }
.auth-head h1 { font-size: 1.7rem; margin-bottom: .25em; }
.auth-seg { max-width: 100%; margin: 0 auto 20px; }
.auth-form .btn { width: 100%; margin-top: 4px; }
.auth-error { background: rgba(251, 87, 120, .12); border: 1px solid rgba(251, 87, 120, .4); color: #ffb3c2; padding: .6rem .8rem; border-radius: 10px; font-size: .9rem; margin: 0 0 12px; }
.auth-error.auth-ok { background: rgba(43, 217, 128, .12); border-color: rgba(43, 217, 128, .4); color: #a9f0cb; }
.auth-note { text-align: center; font-size: .85rem; margin: 14px 0 0; }
.acct-verify { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }
.acct-verify .ic { color: var(--cyan-2); flex-shrink: 0; }
.acct-danger { text-align: center; margin: 22px 0 0; }
.linkbtn.danger { color: var(--rose); }
.linkbtn.danger:hover { text-shadow: 0 0 12px rgba(251, 87, 120, .6); }
.auth-alt { text-align: center; margin: 16px 0 0; font-size: .92rem; }
.linkbtn { background: none; border: 0; color: var(--cyan-2); font: inherit; font-weight: 600; cursor: pointer; padding: 0; }
.linkbtn:hover { text-shadow: 0 0 12px rgba(200, 115, 43, .7); }

/* ---------- toggle switch ---------- */
.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track { position: relative; flex-shrink: 0; width: 46px; height: 26px; border-radius: 999px; background: rgba(255, 255, 255, .1); border: 1px solid var(--line-2); transition: .2s; }
.switch-thumb { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: .2s; }
.switch input:checked + .switch-track { background: var(--grad); border-color: transparent; box-shadow: 0 0 16px -4px rgba(200, 115, 43, .7); }
.switch input:checked + .switch-track .switch-thumb { transform: translateX(20px); background: #06101e; }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--cyan); outline-offset: 2px; }
.switch-text { font-weight: 600; }
.switch-text .muted { font-weight: 400; }
.smart-info { margin: 10px 0 0; font-size: .88rem; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.smart-info .ic { width: 15px; height: 15px; color: var(--amber); }
.smart-info strong { color: var(--cyan-2); }
.smart-guest { display: flex; align-items: center; gap: 10px; }
.smart-guest .ic { width: 18px; height: 18px; flex-shrink: 0; }
.smart-note { display: inline-flex; align-items: center; gap: 7px; font-size: .9rem; color: var(--amber); font-weight: 600; margin: 0 0 .7rem; }
.smart-note .ic { width: 15px; height: 15px; }
.smart-note strong { color: #fff; }

/* ---------- account dashboard ---------- */
.acct-hero { display: flex; align-items: center; gap: 16px; margin-bottom: 8px; }
.acct-avatar { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--grad); color: #06101e; box-shadow: var(--glow-cyan); }
.acct-avatar .ic { width: 28px; height: 28px; }
.acct-hero-name { flex: 1; min-width: 0; }
.acct-hero-name h1 { font-size: 1.8rem; margin: 0; }
.acct-exams { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 18px; }
.acct-exam { min-width: 0; background: rgba(255, 255, 255, .025); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.acct-exam-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.acct-exam-head .exam-ic { width: 42px; height: 42px; border-radius: 11px; }
.acct-exam-head .exam-ic .ic { width: 22px; height: 22px; }
.acct-exam-title { flex: 1; min-width: 0; }
.acct-exam-title h3 { font-size: 1.1rem; margin: 0; }
.cycle-badge { font-size: .72rem; font-weight: 700; color: var(--violet-2); background: rgba(224, 138, 46, .14); border: 1px solid rgba(224, 138, 46, .35); padding: .2rem .55rem; border-radius: 999px; }
.mastery-top { display: flex; justify-content: space-between; font-size: .88rem; margin-bottom: 7px; color: var(--muted); }
.mastery-top .num { color: var(--cyan-2); font-weight: 700; }
.acct-exam-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 14px 0; font-size: .84rem; color: var(--muted); }
.acct-exam-meta span { display: inline-flex; align-items: center; gap: 6px; }
.acct-exam-meta .ic { width: 15px; height: 15px; color: var(--cyan-2); }
.acct-exam-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.acct-exam-actions .btn { white-space: normal; min-width: 0; max-width: 100%; }
.acct-exam-actions .btn .ic { width: 15px; height: 15px; }
.focus-btn { color: var(--amber); border-color: rgba(251, 191, 36, .4); }
.focus-btn:hover:not(:disabled) { color: #fff; border-color: var(--amber); box-shadow: 0 0 18px -6px rgba(251, 191, 36, .6); }

/* trend sparkline */
.trend-wrap { margin: 16px 0 6px; }
.trend-head { display: flex; justify-content: space-between; align-items: baseline; font-size: .82rem; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.trend { width: 100%; height: 72px; display: block; }
.trend-line { fill: none; stroke: url(#voltaLine); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.trend-area { fill: rgba(200, 115, 43, .10); stroke: none; }
.trend-dot { fill: #F0A23B; }
.chart-empty { margin: 8px 0; }

/* section breakdown */
.sec-breakdown { margin: 8px 0 6px; border-top: 1px solid var(--line); }
.sec-breakdown summary { cursor: pointer; list-style: none; padding: 11px 0 5px; font-size: .85rem; font-weight: 600; color: var(--muted); transition: color .18s; }
.sec-breakdown summary:hover { color: #fff; }
.sec-breakdown summary::-webkit-details-marker { display: none; }
.sec-breakdown summary::before { content: "▸"; display: inline-block; margin-right: 7px; transition: transform .15s; }
.sec-breakdown[open] summary::before { transform: rotate(90deg); }
.sec-rows { display: grid; gap: 11px; padding: 8px 0 6px; }
.sec-mini-top { display: flex; justify-content: space-between; font-size: .82rem; margin-bottom: 5px; color: var(--muted); }
.sec-mini-top .num { font-family: "JetBrains Mono", monospace; color: var(--cyan-2); }
