/* =============================================================
   SIMULATOR — PMHNP Board Trainer
   Glass-morphism design system
   Built for Ms. Dizzy · v1.0
   ============================================================= */

:root {
  /* Palette */
  --bg-0: #06060f;
  --bg-1: #0b0b1a;
  --ink: #eef0ff;
  --ink-soft: #b7bad4;
  --ink-mute: #8388ad;

  --violet: #8b5cf6;
  --indigo: #6366f1;
  --cyan: #22d3ee;
  --teal: #2dd4bf;
  --pink: #f472b6;
  --amber: #fbbf24;
  --emerald: #34d399;
  --rose: #fb7185;

  /* Glass */
  --glass-bg: rgba(255, 255, 255, 0.055);
  --glass-bg-strong: rgba(255, 255, 255, 0.09);
  --glass-brd: rgba(255, 255, 255, 0.14);
  --glass-brd-soft: rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.65);
  --glass-inner: inset 0 1px 0 rgba(255, 255, 255, 0.14);

  /* Gradients */
  --grad-primary: linear-gradient(135deg, #8b5cf6 0%, #6366f1 45%, #22d3ee 100%);
  --grad-accent: linear-gradient(135deg, #f472b6 0%, #8b5cf6 100%);
  --grad-text: linear-gradient(120deg, #a78bfa 0%, #22d3ee 55%, #34d399 100%);

  /* Geometry */
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 26px;
  --r-xl: 34px;
  --gap: 22px;
  --maxw: 1180px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --nav-h: 74px;

  font-synthesis: none;
  color-scheme: dark;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg-0);
  color: var(--ink);
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { font-family: "Sora", "Inter", sans-serif; line-height: 1.12; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { max-width: 100%; display: block; }
::selection { background: rgba(139, 92, 246, 0.4); color: #fff; }
canvas { max-width: 100%; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.14); border-radius: 20px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.24); background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* =============================================================
   BACKGROUND / AURORA
   ============================================================= */
.bg-aurora {
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(1200px 800px at 80% -10%, rgba(99,102,241,0.22), transparent 60%),
    radial-gradient(1000px 700px at 0% 100%, rgba(34,211,238,0.16), transparent 55%),
    linear-gradient(180deg, #06060f 0%, #0b0b1a 40%, #08080f 100%);
  overflow: hidden;
}
.orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.55; mix-blend-mode: screen; will-change: transform; }
.orb-1 { width: 520px; height: 520px; background: radial-gradient(circle, #8b5cf6, transparent 70%); top: -120px; left: -80px; animation: float1 22s var(--ease) infinite; }
.orb-2 { width: 460px; height: 460px; background: radial-gradient(circle, #22d3ee, transparent 70%); top: 20%; right: -120px; animation: float2 26s var(--ease) infinite; }
.orb-3 { width: 400px; height: 400px; background: radial-gradient(circle, #f472b6, transparent 70%); bottom: -120px; left: 30%; animation: float3 30s var(--ease) infinite; }
.orb-4 { width: 360px; height: 360px; background: radial-gradient(circle, #34d399, transparent 70%); top: 45%; left: 8%; animation: float1 34s var(--ease) infinite reverse; }

@keyframes float1 { 0%,100% { transform: translate(0,0) scale(1);} 50% { transform: translate(120px, 80px) scale(1.15);} }
@keyframes float2 { 0%,100% { transform: translate(0,0) scale(1);} 50% { transform: translate(-100px, 120px) scale(0.9);} }
@keyframes float3 { 0%,100% { transform: translate(0,0) scale(1);} 50% { transform: translate(80px, -90px) scale(1.1);} }

.bg-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 20%, transparent 75%);
}
.bg-noise {
  position: absolute; inset: 0; opacity: 0.035; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@media (prefers-reduced-motion: reduce) {
  .orb { animation: none !important; }
}

/* =============================================================
   GLASS PRIMITIVES
   ============================================================= */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  border: 1px solid var(--glass-brd);
  box-shadow: var(--glass-shadow), var(--glass-inner);
}
.card { border-radius: var(--r-lg); padding: 26px; }
.glass-chip {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 8px 16px; border-radius: 999px;
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-brd);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  font-size: 0.82rem; font-weight: 600; color: var(--ink-soft);
}
.grad-text {
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
.muted { color: var(--ink-mute); }
.linklike { color: var(--cyan); font-weight: 600; font-size: 0.85rem; text-decoration: underline; text-underline-offset: 3px; }

.pulse-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--emerald); box-shadow: 0 0 0 0 rgba(52,211,153,0.6); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(52,211,153,0.6);} 70% { box-shadow: 0 0 0 10px rgba(52,211,153,0);} 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0);} }

/* =============================================================
   BUTTONS
   ============================================================= */
.btn {
  --btn-bg: var(--glass-bg-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 12px 20px; border-radius: 999px;
  font-weight: 600; font-size: 0.94rem; letter-spacing: 0.01em;
  border: 1px solid var(--glass-brd); background: var(--btn-bg);
  color: var(--ink); transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, border-color .25s;
  will-change: transform; white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.btn svg { flex: none; }

.btn--primary {
  background: var(--grad-primary); border-color: transparent; color: #fff;
  box-shadow: 0 10px 30px -8px rgba(99,102,241,0.7);
}
.btn--primary:hover { box-shadow: 0 16px 40px -8px rgba(99,102,241,0.85); }
.btn--accent {
  background: var(--grad-accent); border-color: transparent; color: #fff;
  box-shadow: 0 10px 30px -8px rgba(244,114,182,0.6);
}
.btn--soft { background: rgba(255,255,255,0.1); }
.btn--ghost { background: transparent; border-color: var(--glass-brd-soft); color: var(--ink-soft); }
.btn--ghost:hover { color: var(--ink); border-color: var(--glass-brd); background: rgba(255,255,255,0.05); }
.btn--lg { padding: 15px 26px; font-size: 1rem; }
.btn--sm { padding: 8px 14px; font-size: 0.82rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }

/* =============================================================
   NAV
   ============================================================= */
.nav {
  position: sticky; top: 0; z-index: 60;
  height: var(--nav-h);
  display: flex; align-items: center; gap: 20px;
  padding: 0 clamp(16px, 4vw, 40px);
  border-radius: 0; border-left: none; border-right: none; border-top: none;
  border-bottom: 1px solid var(--glass-brd-soft);
}
.nav__brand { display: flex; align-items: center; gap: 12px; }
.nav__logo { font-size: 1.7rem; filter: drop-shadow(0 4px 10px rgba(139,92,246,0.6)); }
.nav__brandtext { display: flex; flex-direction: column; line-height: 1.05; }
.nav__brandtext strong { font-family: "Sora"; font-size: 1.05rem; letter-spacing: 0.06em; }
.nav__brandtext small { font-size: 0.68rem; color: var(--ink-mute); letter-spacing: 0.12em; text-transform: uppercase; }
.nav__links { display: flex; gap: 6px; margin-left: auto; }
.nav__link {
  padding: 9px 15px; border-radius: 999px; font-size: 0.9rem; font-weight: 500;
  color: var(--ink-soft); transition: all .2s var(--ease); position: relative;
}
.nav__link:hover { color: var(--ink); background: rgba(255,255,255,0.06); }
.nav__link.is-active { color: #fff; background: rgba(139,92,246,0.18); border: 1px solid rgba(139,92,246,0.35); }
.nav__toggle { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.nav__toggle span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: .3s var(--ease); }

/* =============================================================
   APP LAYOUT / VIEWS
   ============================================================= */
.app { max-width: var(--maxw); margin: 0 auto; padding: clamp(24px, 4vw, 48px) clamp(16px, 4vw, 40px) 80px; }
.view { display: none; animation: viewIn .5s var(--ease); }
.view.is-active { display: block; }
@keyframes viewIn { from { opacity: 0; transform: translateY(14px);} to { opacity: 1; transform: none;} }

.view-head { margin-bottom: 28px; }
.view-head h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.view-head p { color: var(--ink-soft); margin-top: 8px; font-size: 1.02rem; }

.section-head { margin: 46px 0 20px; }
.section-head h2 { font-size: clamp(1.3rem, 3vw, 1.8rem); }
.section-head p { color: var(--ink-mute); margin-top: 6px; }

/* =============================================================
   HERO
   ============================================================= */
.hero { text-align: center; padding: clamp(24px, 6vw, 60px) 0 34px; }
.hero__badge { margin-bottom: 22px; }
.hero__badge--lg {
  padding: 14px 28px !important;
  font-size: 1.05rem !important;
  font-weight: 700 !important;
  gap: 12px !important;
  letter-spacing: 0.01em;
  box-shadow: 0 10px 28px rgba(52, 211, 153, 0.12), var(--glass-inner);
}
.pulse-dot--lg {
  width: 14px !important;
  height: 14px !important;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.65);
  animation: pulseLg 2s infinite !important;
}
@keyframes pulseLg {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.65); }
  70% { box-shadow: 0 0 0 16px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}
.hero__title { font-size: clamp(2.2rem, 6vw, 4rem); font-weight: 800; }
.hero__sub { max-width: 720px; margin: 22px auto 0; color: var(--ink-soft); font-size: clamp(1rem, 2.2vw, 1.15rem); }
/* Yellow + bold board names — paragraph only */
.hero__sub .hero-board-name {
  color: #facc15 !important;
  font-weight: 800 !important;
  letter-spacing: -0.01em;
  -webkit-text-fill-color: #facc15;
}
.hero__cta { display: flex; gap: 14px; justify-content: center; margin-top: 34px; flex-wrap: wrap; }
@media (max-width: 576px) {
  .hero__badge--lg { padding: 12px 20px !important; font-size: 0.95rem !important; }
  .pulse-dot--lg { width: 12px !important; height: 12px !important; }
}

/* =============================================================
   COUNTDOWN
   ============================================================= */
.countdown { text-align: center; margin: 10px auto 34px; max-width: 720px; }
.countdown__label { color: var(--ink-mute); text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.74rem; margin-bottom: 16px; }
.countdown__grid { display: flex; justify-content: center; gap: clamp(12px, 4vw, 34px); }
.cd { display: flex; flex-direction: column; align-items: center; min-width: 62px; }
.cd__num { font-family: "Sora"; font-size: clamp(2rem, 6vw, 3rem); font-weight: 800; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.cd__unit { font-size: 0.72rem; color: var(--ink-mute); text-transform: uppercase; letter-spacing: 0.14em; }
.countdown__target { margin-top: 18px; color: var(--ink-soft); font-size: 0.92rem; display: flex; gap: 10px; justify-content: center; align-items: center; }

/* =============================================================
   STAT GRID
   ============================================================= */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
.stat { text-align: center; position: relative; overflow: hidden; }
.stat__icon { font-size: 1.5rem; margin-bottom: 8px; }
.stat__val { font-family: "Sora"; font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 800; }
.stat__label { color: var(--ink-mute); font-size: 0.82rem; margin-top: 4px; }

/* =============================================================
   MODE GRID
   ============================================================= */
.mode-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--gap); }
.mode { position: relative; overflow: hidden; cursor: pointer; transition: transform .3s var(--ease), border-color .3s; }
.mode:hover { transform: translateY(-5px); border-color: rgba(139,92,246,0.5); }
.mode__glow { position: absolute; inset: -1px; background: var(--grad-primary); opacity: 0; transition: opacity .3s; filter: blur(24px); z-index: -1; }
.mode:hover .mode__glow { opacity: 0.28; }
.mode__icon { font-size: 2rem; margin-bottom: 12px; }
.mode h3 { font-size: 1.2rem; margin-bottom: 8px; }
.mode p { color: var(--ink-soft); font-size: 0.92rem; }
.mode__go { display: inline-block; margin-top: 16px; color: var(--cyan); font-weight: 600; font-size: 0.9rem; transition: transform .25s var(--ease); }
.mode:hover .mode__go { transform: translateX(5px); }

/* =============================================================
   CONFIG (board)
   ============================================================= */
.config-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: var(--gap); align-items: start; }
.config__title { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-mute); margin: 22px 0 12px; }
.config__title:first-child { margin-top: 0; }
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  padding: 9px 16px; border-radius: 999px; font-size: 0.88rem; font-weight: 600;
  background: rgba(255,255,255,0.05); border: 1px solid var(--glass-brd-soft); color: var(--ink-soft);
  transition: all .2s var(--ease);
}
.chip:hover { border-color: var(--glass-brd); color: var(--ink); }
.chip.is-active { background: rgba(139,92,246,0.2); border-color: rgba(139,92,246,0.5); color: #fff; }

.domain-list { display: flex; flex-direction: column; gap: 10px; }
.domain-toggle { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-sm); background: rgba(255,255,255,0.04); border: 1px solid var(--glass-brd-soft); cursor: pointer; transition: all .2s var(--ease); }
.domain-toggle:hover { border-color: var(--glass-brd); }
.domain-toggle.is-on { background: rgba(34,211,238,0.08); border-color: rgba(34,211,238,0.35); }
.domain-toggle__check { width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--ink-mute); display: grid; place-items: center; flex: none; transition: all .2s; }
.domain-toggle.is-on .domain-toggle__check { background: var(--cyan); border-color: var(--cyan); color: #04121a; }
.domain-toggle__name { font-weight: 600; font-size: 0.94rem; }
.domain-toggle__meta { color: var(--ink-mute); font-size: 0.78rem; margin-left: auto; }

/* Switch */
.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; margin: 12px 0; }
.switch input { position: absolute; opacity: 0; }
.switch__track { width: 46px; height: 26px; border-radius: 999px; background: rgba(255,255,255,0.12); border: 1px solid var(--glass-brd-soft); position: relative; transition: background .25s; flex: none; }
.switch__thumb { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .25s var(--ease); }
.switch input:checked + .switch__track { background: var(--grad-primary); }
.switch input:checked + .switch__track .switch__thumb { transform: translateX(20px); }
.switch__text { font-size: 0.92rem; color: var(--ink-soft); }

/* Config summary */
.config-summary { position: sticky; top: calc(var(--nav-h) + 20px); text-align: center; }
.summary__ring {
  width: 150px; height: 150px; margin: 0 auto 20px; border-radius: 50%;
  display: grid; place-content: center; place-items: center;
  background: conic-gradient(from 220deg, var(--violet), var(--cyan), var(--teal), var(--violet));
  position: relative;
}
.summary__ring::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: #0c0c18; }
.summary__ring span { position: relative; font-family: "Sora"; font-size: 2.6rem; font-weight: 800; }
.summary__ring small { position: relative; color: var(--ink-mute); font-size: 0.78rem; }
.summary__list { list-style: none; padding: 0; margin: 0 0 22px; }
.summary__list li { display: flex; justify-content: space-between; padding: 11px 2px; border-bottom: 1px solid var(--glass-brd-soft); font-size: 0.92rem; }
.summary__list li span { color: var(--ink-mute); }
.summary__list li:last-child { border-bottom: none; }

/* =============================================================
   WEEK GRID (nr605)
   ============================================================= */
.week-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: var(--gap); }
.week-card { cursor: pointer; transition: transform .3s var(--ease), border-color .3s; }
.week-card:hover { transform: translateY(-4px); border-color: rgba(34,211,238,0.45); }
.week-card__num { font-family: "JetBrains Mono"; color: var(--cyan); font-size: 0.8rem; letter-spacing: 0.1em; }
.week-card h3 { font-size: 1.1rem; margin: 8px 0; }
.week-card p { color: var(--ink-soft); font-size: 0.88rem; }
.week-card__count { margin-top: 14px; font-size: 0.8rem; color: var(--ink-mute); }

/* =============================================================
   DROPZONE / BUILDER
   ============================================================= */
.dropzone { border: 2px dashed var(--glass-brd); text-align: center; transition: all .3s var(--ease); position: relative; }
.dropzone.is-drag { border-color: var(--cyan); background: rgba(34,211,238,0.08); transform: scale(1.01); }
.dropzone__inner { padding: 30px 10px; }
.dropzone__icon { font-size: 3rem; margin-bottom: 12px; filter: drop-shadow(0 8px 20px rgba(34,211,238,0.4)); }
.dropzone__inner h3 { font-size: 1.4rem; margin-bottom: 8px; }
.dropzone__inner p { color: var(--ink-soft); margin-bottom: 20px; }
.dropzone__progress { padding: 40px 10px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.spinner { width: 46px; height: 46px; border-radius: 50%; border: 3px solid rgba(255,255,255,0.15); border-top-color: var(--cyan); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.builder-result { margin-top: 22px; }
.builder-result__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.builder-result__head h3 { font-size: 1.3rem; }
.builder-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin-bottom: 22px; }
.bstat { background: rgba(255,255,255,0.04); border: 1px solid var(--glass-brd-soft); border-radius: var(--r-sm); padding: 14px; text-align: center; }
.bstat__val { font-family: "Sora"; font-size: 1.5rem; font-weight: 700; }
.bstat__label { color: var(--ink-mute); font-size: 0.76rem; margin-top: 2px; }
.builder-controls { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; }
.field { display: flex; flex-direction: column; gap: 7px; font-size: 0.84rem; color: var(--ink-soft); }
.field input, .field select {
  padding: 11px 14px; border-radius: var(--r-sm); background: rgba(255,255,255,0.06);
  border: 1px solid var(--glass-brd-soft); color: var(--ink); font-family: inherit; font-size: 0.95rem; min-width: 180px;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--cyan); }
.builder-preview { margin-top: 22px; }
.builder-preview summary { cursor: pointer; color: var(--cyan); font-weight: 600; padding: 8px 0; }
.keypoints { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; max-height: 320px; overflow: auto; padding-right: 8px; }
.keypoint { padding: 10px 14px; background: rgba(255,255,255,0.04); border-left: 3px solid var(--violet); border-radius: 0 var(--r-sm) var(--r-sm) 0; font-size: 0.9rem; color: var(--ink-soft); }

/* =============================================================
   EXAM RUNNER
   ============================================================= */
.runner { position: fixed; inset: 0; z-index: 100; background: linear-gradient(180deg, #07070f, #0b0b18); display: flex; flex-direction: column; animation: viewIn .35s var(--ease); }
.runner__bar { display: flex; align-items: center; gap: 18px; padding: 14px clamp(14px, 4vw, 34px); border-radius: 0; border-left: none; border-right: none; border-top: none; }
.runner__meta { display: flex; align-items: center; gap: 14px; }
.runner__title { font-family: "Sora"; font-weight: 600; font-size: 0.98rem; }
.runner__progresswrap { flex: 1; display: flex; align-items: center; gap: 14px; max-width: 620px; margin: 0 auto; }
.runner__progress { flex: 1; height: 8px; border-radius: 999px; background: rgba(255,255,255,0.09); overflow: hidden; }
.runner__progressfill { height: 100%; width: 0%; background: var(--grad-primary); border-radius: 999px; transition: width .4s var(--ease); }
.runner__count { font-family: "JetBrains Mono"; font-size: 0.84rem; color: var(--ink-soft); white-space: nowrap; }
.runner__timer { display: flex; align-items: center; gap: 8px; font-family: "JetBrains Mono"; font-weight: 700; font-size: 1.02rem; padding: 8px 14px; border-radius: 999px; background: rgba(255,255,255,0.06); border: 1px solid var(--glass-brd-soft); }
.runner__timer[data-state="warn"] { color: var(--amber); border-color: rgba(251,191,36,0.4); }
.runner__timer[data-state="danger"] { color: var(--rose); border-color: rgba(251,113,133,0.5); animation: pulseFast 1s infinite; }
@keyframes pulseFast { 50% { opacity: 0.55; } }

.runner__body { flex: 1; overflow-y: auto; display: flex; justify-content: center; padding: clamp(20px, 4vw, 44px) clamp(16px, 4vw, 34px); }
.runner__qwrap { width: 100%; max-width: 780px; }
.runner__domaintag { display: inline-block; font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--cyan); background: rgba(34,211,238,0.1); border: 1px solid rgba(34,211,238,0.25); padding: 5px 12px; border-radius: 999px; margin-bottom: 18px; }
.runner__question { font-family: "Sora"; font-size: clamp(1.15rem, 3vw, 1.5rem); font-weight: 600; line-height: 1.4; margin-bottom: 26px; }
.runner__options { display: flex; flex-direction: column; gap: 12px; }

.opt {
  display: flex; align-items: flex-start; gap: 14px; padding: 16px 18px; border-radius: var(--r-md);
  background: var(--glass-bg); border: 1px solid var(--glass-brd-soft); cursor: pointer;
  transition: all .2s var(--ease); text-align: left; width: 100%;
}
.opt:hover { border-color: var(--glass-brd); background: rgba(255,255,255,0.07); transform: translateX(3px); }
.opt__key { width: 30px; height: 30px; border-radius: 9px; background: rgba(255,255,255,0.08); border: 1px solid var(--glass-brd-soft); display: grid; place-items: center; font-weight: 700; font-size: 0.9rem; flex: none; transition: all .2s; }
.opt__text { font-size: 0.98rem; padding-top: 3px; }
.opt.is-selected { border-color: var(--violet); background: rgba(139,92,246,0.14); }
.opt.is-selected .opt__key { background: var(--grad-primary); border-color: transparent; color: #fff; }
.opt.is-correct { border-color: var(--emerald); background: rgba(52,211,153,0.14); }
.opt.is-correct .opt__key { background: var(--emerald); border-color: transparent; color: #04120c; }
.opt.is-wrong { border-color: var(--rose); background: rgba(251,113,133,0.14); }
.opt.is-wrong .opt__key { background: var(--rose); border-color: transparent; color: #1a0409; }
.opt[disabled] { cursor: default; }
.opt[disabled]:hover { transform: none; }

.runner__rationale { margin-top: 22px; padding: 18px 20px; border-radius: var(--r-md); background: rgba(52,211,153,0.07); border: 1px solid rgba(52,211,153,0.22); border-left: 4px solid var(--emerald); animation: viewIn .3s var(--ease); }
.runner__rationale strong { color: var(--emerald); }

.runner__foot { display: flex; align-items: center; gap: 14px; padding: 14px clamp(14px, 4vw, 34px); border-radius: 0; border-left: none; border-right: none; border-bottom: none; }
.runner__nav { display: flex; gap: 10px; margin: 0 auto; }

/* Question grid drawer */
.qgrid { position: fixed; inset: 0; z-index: 110; display: grid; place-items: center; background: rgba(4,4,10,0.6); backdrop-filter: blur(6px); animation: viewIn .25s var(--ease); }
.qgrid__panel { width: min(560px, 92vw); max-height: 84vh; overflow: auto; }
.qgrid__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.qgrid__legend { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 18px; font-size: 0.8rem; color: var(--ink-soft); }
.qgrid__legend span { display: flex; align-items: center; gap: 7px; }
.dot { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.dot--answered { background: var(--violet); }
.dot--flagged { background: var(--amber); }
.dot--current { background: var(--cyan); }
.dot--empty { background: rgba(255,255,255,0.14); }
.qgrid__cells { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 9px; margin-bottom: 22px; }
.qcell { aspect-ratio: 1; border-radius: 10px; background: rgba(255,255,255,0.06); border: 1px solid var(--glass-brd-soft); font-family: "JetBrains Mono"; font-size: 0.82rem; font-weight: 700; color: var(--ink-soft); transition: all .18s var(--ease); }
.qcell:hover { transform: scale(1.08); }
.qcell.is-answered { background: rgba(139,92,246,0.28); border-color: rgba(139,92,246,0.5); color: #fff; }
.qcell.is-flagged { box-shadow: inset 0 0 0 2px var(--amber); }
.qcell.is-current { border-color: var(--cyan); box-shadow: 0 0 0 2px var(--cyan); color: #fff; }

/* =============================================================
   RESULTS
   ============================================================= */
.results { position: fixed; inset: 0; z-index: 100; overflow-y: auto; background: linear-gradient(180deg, #07070f, #0b0b18); animation: viewIn .4s var(--ease); }
.results__inner { max-width: 900px; margin: 0 auto; padding: clamp(24px, 5vw, 56px) clamp(16px, 4vw, 34px) 80px; display: flex; flex-direction: column; gap: 22px; }
.results__hero { display: flex; flex-direction: column; gap: 26px; }
.results__scorewrap { display: flex; align-items: center; gap: 34px; flex-wrap: wrap; }
.score-ring { position: relative; width: 160px; height: 160px; flex: none; }
.score-ring svg { transform: rotate(-90deg); width: 100%; height: 100%; }
.score-ring__bg { fill: none; stroke: rgba(255,255,255,0.09); stroke-width: 10; }
.score-ring__fg { fill: none; stroke: url(#scoreGrad); stroke-width: 10; stroke-linecap: round; stroke-dasharray: 327; stroke-dashoffset: 327; transition: stroke-dashoffset 1.2s var(--ease); }
.score-ring__label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.score-ring__pct { font-family: "Sora"; font-size: 2.4rem; font-weight: 800; }
.score-ring__label small { color: var(--ink-mute); font-family: "JetBrains Mono"; font-size: 0.82rem; }
.results__verdict { flex: 1; min-width: 240px; }
.results__badge { display: inline-block; padding: 6px 16px; border-radius: 999px; font-weight: 700; font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 10px; }
.results__badge.pass { background: rgba(52,211,153,0.18); color: var(--emerald); border: 1px solid rgba(52,211,153,0.4); }
.results__badge.fail { background: rgba(251,113,133,0.16); color: var(--rose); border: 1px solid rgba(251,113,133,0.4); }
.results__verdict h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); }
.results__verdict p { color: var(--ink-soft); margin-top: 6px; }
.results__actions { display: flex; gap: 12px; flex-wrap: wrap; }

.domain-breakdown { display: flex; flex-direction: column; gap: 16px; margin-top: 8px; }
.dbar { }
.dbar__top { display: flex; justify-content: space-between; font-size: 0.9rem; margin-bottom: 7px; }
.dbar__name { font-weight: 600; }
.dbar__val { font-family: "JetBrains Mono"; color: var(--ink-soft); }
.dbar__track { height: 10px; border-radius: 999px; background: rgba(255,255,255,0.08); overflow: hidden; }
.dbar__fill { height: 100%; border-radius: 999px; background: var(--grad-primary); width: 0; transition: width 1s var(--ease); }
.dbar__fill.low { background: linear-gradient(90deg, #fb7185, #f472b6); }
.dbar__fill.mid { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.dbar__fill.high { background: linear-gradient(90deg, #34d399, #22d3ee); }

.review-list { display: flex; flex-direction: column; gap: 16px; margin-top: 8px; }
.review-item { padding: 18px; border-radius: var(--r-md); background: rgba(255,255,255,0.03); border: 1px solid var(--glass-brd-soft); }
.review-item__q { font-weight: 600; margin-bottom: 12px; }
.review-item__q .rn { color: var(--ink-mute); font-family: "JetBrains Mono"; margin-right: 8px; }
.review-opt { padding: 9px 13px; border-radius: 10px; font-size: 0.9rem; margin-bottom: 6px; border: 1px solid transparent; }
.review-opt.correct { background: rgba(52,211,153,0.12); border-color: rgba(52,211,153,0.35); color: #d6fff0; }
.review-opt.chosen-wrong { background: rgba(251,113,133,0.12); border-color: rgba(251,113,133,0.35); color: #ffe0e6; }
.review-item__rat { margin-top: 10px; font-size: 0.9rem; color: var(--ink-soft); padding: 12px 14px; background: rgba(139,92,246,0.07); border-left: 3px solid var(--violet); border-radius: 0 10px 10px 0; }

/* =============================================================
   ANALYTICS
   ============================================================= */
.analytics-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.chartcard { position: relative; min-height: 300px; }
.chartcard h3 { margin-bottom: 16px; }
.empty-note { color: var(--ink-mute); font-size: 0.9rem; text-align: center; padding: 20px; }
.historycard { margin-top: var(--gap); }
.historycard__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.table-wrap { overflow-x: auto; }
.history-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.history-table th { text-align: left; padding: 12px 14px; color: var(--ink-mute); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; border-bottom: 1px solid var(--glass-brd-soft); }
.history-table td { padding: 13px 14px; border-bottom: 1px solid var(--glass-brd-soft); }
.history-table tr:hover td { background: rgba(255,255,255,0.03); }
.pill { padding: 4px 11px; border-radius: 999px; font-size: 0.76rem; font-weight: 700; }
.pill.pass { background: rgba(52,211,153,0.16); color: var(--emerald); }
.pill.fail { background: rgba(251,113,133,0.16); color: var(--rose); }

/* =============================================================
   TOAST + MODAL
   ============================================================= */
.toast-wrap { position: fixed; bottom: 22px; right: 22px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast { padding: 14px 18px; border-radius: var(--r-md); background: var(--glass-bg-strong); backdrop-filter: blur(18px); border: 1px solid var(--glass-brd); box-shadow: var(--glass-shadow); font-size: 0.9rem; max-width: 340px; animation: toastIn .35s var(--ease); display: flex; gap: 10px; align-items: flex-start; }
.toast.out { animation: toastOut .3s var(--ease) forwards; }
.toast--ok { border-left: 4px solid var(--emerald); }
.toast--info { border-left: 4px solid var(--cyan); }
.toast--warn { border-left: 4px solid var(--amber); }
.toast--err { border-left: 4px solid var(--rose); }
@keyframes toastIn { from { opacity: 0; transform: translateX(40px);} to { opacity: 1; transform: none;} }
@keyframes toastOut { to { opacity: 0; transform: translateX(40px);} }

.modal { position: fixed; inset: 0; z-index: 210; display: grid; place-items: center; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(4,4,10,0.65); backdrop-filter: blur(6px); }
.modal__panel { position: relative; width: min(440px, 92vw); text-align: center; }
.modal__panel h3 { font-size: 1.3rem; margin-bottom: 10px; }
.modal__panel p { color: var(--ink-soft); margin-bottom: 22px; }
.modal__actions { display: flex; gap: 12px; justify-content: center; }

/* =============================================================
   RESPONSIVE  (rules require 768px + 576px breakpoints)
   ============================================================= */
@media (max-width: 980px) {
  .config-layout { grid-template-columns: 1fr; }
  .config-summary { position: static; }
  .analytics-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav__links {
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; gap: 4px; padding: 14px clamp(16px, 4vw, 40px) 20px;
    background: rgba(11,11,26,0.92); backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-brd-soft);
    transform: translateY(-140%); transition: transform .35s var(--ease); z-index: 55;
  }
  .nav__links.is-open { transform: translateY(0); }
  .nav__link { padding: 13px 16px; }
  .nav__toggle { display: flex; margin-left: auto; }
  .nav.is-open .nav__toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav.is-open .nav__toggle span:nth-child(2) { opacity: 0; }
  .nav.is-open .nav__toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .results__scorewrap { justify-content: center; text-align: center; }
  .runner__progresswrap { display: none; }
  .runner__foot { flex-wrap: wrap; justify-content: center; }
  .runner__nav { width: 100%; order: 3; justify-content: space-between; }
  .runner__foot > .btn--accent { order: 2; }
  .card { padding: 20px; }
}

@media (max-width: 576px) {
  :root { --gap: 14px; }
  .hero__cta { flex-direction: column; }
  .hero__cta .btn { width: 100%; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .countdown__grid { gap: 10px; }
  .cd { min-width: 52px; }
  .builder-controls { flex-direction: column; align-items: stretch; }
  .field input, .field select { min-width: 0; width: 100%; }
  .runner__question { font-size: 1.12rem; }
  .opt { padding: 13px 14px; }
  .results__actions { flex-direction: column; }
  .results__actions .btn { width: 100%; }
  .btn--lg { padding: 13px 20px; }
}

/* =============================================================
   STUDY GUIDE PANEL (NR605)
   ============================================================= */
.studyguide { margin-bottom: var(--gap); }
.studyguide__head { margin-bottom: 16px; }
.studyguide__head h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); }
.sg-badge { font-size: 0.6rem; vertical-align: middle; letter-spacing: 0.1em; text-transform: uppercase; color: var(--amber); background: rgba(251,191,36,0.14); border: 1px solid rgba(251,191,36,0.3); padding: 3px 9px; border-radius: 999px; margin-left: 8px; white-space: nowrap; }
.sg-chips { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 22px; }
.sg-chip { font-size: 0.8rem; padding: 7px 13px; border-radius: 999px; background: rgba(255,255,255,0.05); border: 1px solid var(--glass-brd-soft); color: var(--ink-soft); }
.sg-chip b { color: var(--cyan); font-family: "Sora"; margin-right: 2px; }
.sg-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; }
.sg-col h4 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--violet); margin-bottom: 11px; }
.sg-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.sg-col li { font-size: 0.85rem; color: var(--ink-soft); padding-left: 17px; position: relative; line-height: 1.4; }
.sg-col li::before { content: "▸"; position: absolute; left: 0; color: var(--cyan); }
.sg-col li b { color: var(--ink); }
.sg-col li i { color: var(--amber); font-style: italic; }

/* Utility */
[hidden] { display: none !important; }
.text-center { text-align: center; }
