﻿/* ADRENALINE CSS VALIDATED - NO SYNTAX ERRORS */
:root {
  --bg: #11151C;
  --panel: #181D25;
  --card: #232A35;
  --border: #262D38;
  --accent: #F97316;
  --success: #22C55E;
  --danger: #EF4444;
  --warning: #EAB308;
  --text: #F8FAFC;
  --muted: #A8B3C2;
}

.protected-content-enabled body,
.protected-content-enabled main,
.protected-content-enabled .card,
.protected-content-enabled .panel {
  -webkit-user-select: none;
  user-select: none;
}

.protected-content-enabled input,
.protected-content-enabled textarea,
.protected-content-enabled select {
  -webkit-user-select: text;
  user-select: text;
}

.protected-content-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(5, 8, 13, 0.72);
  backdrop-filter: blur(8px);
}

.protected-content-modal.is-visible {
  display: flex;
}

.protected-content-modal__card {
  width: min(100%, 460px);
  border: 1px solid rgba(249, 115, 22, 0.36);
  border-radius: 12px;
  background: #181D25;
  color: #F8FAFC;
  padding: 24px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45), 0 0 26px rgba(249, 115, 22, 0.14);
}

.protected-content-modal__card h2 {
  margin: 0 0 10px;
}

.protected-content-modal__card p {
  color: #CBD5E1;
}

.protected-privacy-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 0%, rgba(249, 115, 22, 0.18), transparent 24rem),
    rgba(3, 6, 10, 0.96);
  color: #F8FAFC;
  text-align: center;
}

.protected-privacy-overlay.is-visible {
  display: flex;
}

.protected-privacy-overlay__content {
  width: min(100%, 520px);
  border: 1px solid rgba(249, 115, 22, 0.36);
  border-radius: 12px;
  background: rgba(17, 21, 28, 0.9);
  padding: 28px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
}

.protected-privacy-overlay__content h2 {
  margin: 0 0 10px;
  color: #FFFFFF;
}

.protected-privacy-overlay__content p {
  margin: 0;
  color: #F97316;
  font-weight: 800;
}

.qspace-weakness-panel {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(249, 115, 22, 0.24);
  border-radius: 10px;
  background: rgba(249, 115, 22, 0.06);
}

.qspace-weakness-panel h3 {
  margin: 0 0 10px;
  color: #fff;
}

.qspace-weakness-panel p {
  margin: 8px 0 0;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
main { min-height: calc(100vh - 136px); }

.site-header, .site-footer {
  background: #0E1218;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px clamp(16px, 3vw, 36px);
}
.site-header { position: sticky; top: 0; z-index: 20; }
.site-footer {
  border-top: 1px solid var(--border);
  border-bottom: 0;
  justify-content: center;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}
.footer-line {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}
.site-footer strong {
  color: var(--text);
}
.footer-line a {
  color: var(--muted);
}
.footer-line a:hover {
  color: var(--accent);
}
.muted { color: var(--muted); }
.brand img { width: 210px; max-width: 48vw; display: block; }
.main-nav { display: flex; gap: 18px; flex: 1; flex-wrap: wrap; }
.main-nav a { color: var(--muted); font-weight: 600; font-size: 14px; }
.main-nav a:hover { color: var(--text); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.pro-badge, .status-pill {
  border: 1px solid rgba(249,115,22,.55);
  color: #FED7AA;
  background: rgba(249,115,22,.12);
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 700;
  font-size: 12px;
}
.mobile-text { display: none; }
.icon-link { font-size: 24px; color: var(--text); }

.page, .auth-page { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 34px 0; }
.auth-page { width: min(460px, calc(100% - 32px)); }
.page-title { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 22px; }
h1, h2, h3 { margin: 0; letter-spacing: 0; }
h1 { font-size: clamp(28px, 4vw, 46px); }
p { color: var(--muted); line-height: 1.6; }

.panel, .card, .auth-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.card, .auth-card { background: var(--card); padding: 18px; }
.panel { padding: 18px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pricing-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.pricing-card { position: relative; display: grid; align-content: start; gap: 10px; }
.pricing-card form { margin-top: auto; }
.pricing-cta { width: 100%; min-height: 48px; }
.recommended-card { border-color: var(--accent); }
.recommended-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--accent);
  color: #11151C;
  border-radius: 999px;
  padding: 5px 9px;
  font-weight: 800;
  font-size: 12px;
}
.price { color: var(--text); font-size: 36px; }
.pricing-savings-badge {
  display: inline-block;
  width: fit-content;
  color: var(--accent);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: .03em;
}

.pricing-positioning-card,
.pricing-faq-card {
  border: 1px solid rgba(255, 90, 0, 0.28);
  margin-bottom: 18px;
}

.pricing-positioning-card h2,
.pricing-faq-card h2 {
  color: #fff;
  margin-bottom: 10px;
}

.demo-positioning-block {
  border-top: 1px solid rgba(255, 90, 0, 0.24);
  margin-top: 22px;
  padding-top: 18px;
}

.demo-positioning-block h2 {
  color: #fff;
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  margin-bottom: 10px;
}

.snapshot-icon-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.readiness-share-hero {
  background: linear-gradient(135deg, rgba(255, 90, 0, 0.18), rgba(20, 20, 24, 0.95));
  border: 1px solid rgba(255, 90, 0, 0.35);
  border-radius: 14px;
  margin: 18px 0;
  padding: 26px;
  text-align: center;
}

.readiness-share-hero span,
.readiness-share-hero em {
  color: #a1a1aa;
  display: block;
  font-style: normal;
  font-weight: 700;
}

.readiness-share-hero strong {
  color: #ff5a00;
  display: block;
  font-size: clamp(4rem, 14vw, 7rem);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  margin: 10px 0;
}

.snapshot-system-bar {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(120px, 1fr) minmax(140px, 2fr) 54px;
  margin: 12px 0;
}

.snapshot-system-bar > span,
.snapshot-system-bar strong {
  color: #fff;
  font-weight: 800;
}

.snapshot-system-bar div {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  height: 12px;
  overflow: hidden;
}

.snapshot-system-bar i {
  background: linear-gradient(90deg, #ff5a00, #facc15, #22c55e);
  display: block;
  height: 100%;
}

@media (max-width: 640px) {
  .snapshot-icon-actions {
    width: 100%;
  }

  .snapshot-icon-actions .btn {
    flex: 1 1 auto;
    min-width: 0;
  }

  .snapshot-system-bar {
    grid-template-columns: 1fr 48px;
  }

  .snapshot-system-bar div {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}
.feature-list { margin: 0; padding-left: 18px; color: var(--muted); line-height: 1.7; }

.account-card-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.account-card-header h2 {
  margin: 0;
}

.account-card-header .pro-badge {
  padding: 5px 9px;
  line-height: 1.2;
}

.subscription-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  overflow: hidden;
}

.subscription-card p {
  margin: 0;
}

.subscription-action,
.renew-button,
.upgrade-button {
  max-width: 100%;
  min-width: 0;
  white-space: normal;
  overflow-wrap: break-word;
  text-align: center;
  line-height: 1.25;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.subscription-management-disabled {
  width: fit-content;
  max-width: 100%;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .10);
  color: rgba(248, 250, 252, .72);
  text-align: center;
  cursor: not-allowed;
}

.btn-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid rgba(249, 115, 22, .35);
  background: rgba(249, 115, 22, .08);
  color: #FDBA74;
  font-weight: 800;
  text-decoration: none;
}

.btn-logout:hover {
  background: rgba(249, 115, 22, .14);
  border-color: rgba(249, 115, 22, .62);
}

.btn, button {
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--card);
  color: var(--text);
  min-height: 40px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
}
.btn:hover, button:hover { border-color: var(--accent); }
.btn-primary { background: var(--accent); color: #11151C; border-color: var(--accent); }
.btn-small { min-height: 34px; padding: 7px 11px; font-size: 13px; }
.btn-danger { border-color: rgba(239,68,68,.5); color: #FCA5A5; }

input, select, textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: #10141B;
  color: var(--text);
  border-radius: 7px;
  padding: 11px 12px;
  font: inherit;
}
label { display: grid; gap: 7px; color: var(--muted); font-weight: 700; font-size: 13px; }
textarea { min-height: 140px; resize: vertical; }
input[type="checkbox"] {
  width: 22px;
  height: 22px;
  appearance: none;
  -webkit-appearance: none;
  display: inline-grid;
  place-content: center;
  border: 1px solid rgba(249, 115, 22, .55);
  border-radius: 7px;
  background: rgba(255, 255, 255, .04);
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
input[type="checkbox"]::before {
  content: "";
  width: 11px;
  height: 11px;
  transform: scale(0);
  transition: transform .15s ease;
  background: #11151C;
  clip-path: polygon(14% 54%, 0 68%, 39% 100%, 100% 18%, 84% 4%, 36% 72%);
}
input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, .14);
}
input[type="checkbox"]:checked::before {
  transform: scale(1);
}
input[type="checkbox"]:focus-visible {
  outline: 2px solid rgba(249, 115, 22, .7);
  outline-offset: 2px;
}
.checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.adrenaline-checkbox {
  position: relative;
  grid-template-columns: auto minmax(0, auto);
  justify-content: start;
}
.adrenaline-checkbox input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.adrenaline-checkbox__box {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-content: center;
  border: 1px solid rgba(249, 115, 22, .55);
  border-radius: 7px;
  background: rgba(255, 255, 255, .04);
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.adrenaline-checkbox__box::before {
  content: "";
  width: 11px;
  height: 11px;
  transform: scale(0);
  transition: transform .15s ease;
  background: #11151C;
  clip-path: polygon(14% 54%, 0 68%, 39% 100%, 100% 18%, 84% 4%, 36% 72%);
}
.adrenaline-checkbox input:checked + .adrenaline-checkbox__box {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, .14);
}
.adrenaline-checkbox input:checked + .adrenaline-checkbox__box::before {
  transform: scale(1);
}
.adrenaline-checkbox input:focus-visible + .adrenaline-checkbox__box {
  outline: 2px solid rgba(249, 115, 22, .7);
  outline-offset: 2px;
}
.form-grid { display: grid; gap: 14px; }
.form-grid-wide { grid-column: 1 / -1; }
.notice { padding: 12px; border-radius: 7px; border: 1px solid var(--border); color: var(--muted); }
.notice.success { border-color: rgba(34,197,94,.45); color: #BBF7D0; }
.notice.danger { border-color: rgba(239,68,68,.45); color: #FECACA; }
.support-success {
  max-width: 620px;
}
.support-success h2 {
  margin-top: 0;
}
.faq-accordion {
  display: grid;
  gap: 12px;
  width: 100%;
}
.faq-item {
  width: 100%;
  background: rgba(35, 42, 53, 0.55);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 58px;
  padding: 18px 20px;
  background: transparent;
  border: 0;
  color: var(--text);
  font: inherit;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}
.faq-question:hover,
.faq-question[aria-expanded="true"] {
  color: var(--accent);
  background: rgba(249, 115, 22, 0.08);
}
.faq-question i {
  flex: 0 0 auto;
  transition: transform 160ms ease;
}
.faq-question[aria-expanded="true"] i {
  transform: rotate(180deg);
}
.faq-answer {
  position: relative;
  border-top: 1px solid var(--border);
  max-height: 0;
  overflow: hidden;
  padding: 0 20px 0 44px;
  transition: max-height 180ms ease, padding 180ms ease;
}
.faq-answer.is-open {
  max-height: 260px;
  padding: 0 20px 18px 44px;
}
.faq-answer::before,
.faq-answer::after {
  content: "";
  position: absolute;
  background: rgba(148, 163, 184, 0.35);
}
.faq-answer::before {
  left: 22px;
  top: 0;
  bottom: 18px;
  width: 1px;
}
.faq-answer::after {
  left: 22px;
  top: 31px;
  width: 16px;
  height: 1px;
}
.faq-answer p {
  margin-bottom: 0;
}

.qbank-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr) 280px; gap: 18px; padding: 22px; }
.sidebar, .performance-panel { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 16px; }
.sidebar h2, .performance-panel h2 { font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.tree-parent, .tree-child { width: 100%; text-align: left; margin-bottom: 8px; }
.tree-child { background: #151A22; margin-left: 12px; width: calc(100% - 12px); color: var(--muted); }
.tree-children[hidden] { display: none; }
.question-header { display: none; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.mobile-progress { height: 6px; background: #10141B; border-radius: 999px; overflow: hidden; margin-top: 8px; }
.mobile-progress span { display: block; height: 100%; background: var(--accent); }
.workspace { min-width: 0; }
.question-text { font-size: 20px; line-height: 1.65; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 12px 0; }
.toolbar label { display: flex; align-items: center; gap: 8px; }
.highlight-field { flex: 1 1 240px; }
.timer-pill { width: auto; min-height: 0; }
.timer-warning { color: var(--warning); }
.timer-critical { color: var(--danger); }
.answer-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  width: 100%;
  text-align: left;
  margin-top: 10px;
  background: var(--card);
}
.answer-card.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.answer-card.correct-answer { border-color: var(--success); }
.answer-card.incorrect-answer { border-color: var(--danger); }
.answer-letter { color: var(--accent); font-weight: 800; }
.question-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.explanation { margin-top: 16px; display: none; }
.explanation.open { display: block; }
.metric { display: flex; justify-content: space-between; border-bottom: 1px solid var(--border); padding: 10px 0; }
.metric strong { color: var(--text); }
.premium-cta { margin-top: 16px; }
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.62);
  display: grid;
  place-items: center;
  padding: 18px;
  z-index: 50;
}
.modal-backdrop[hidden] { display: none; }
.modal { width: min(560px, 100%); display: grid; gap: 12px; }
.demo-question { padding: 18px 0; border-bottom: 1px solid var(--border); }
.demo-question:last-child { border-bottom: 0; }
.demo-limited { opacity: .72; }
.demo-cta { margin-top: 18px; }
.demo-funnel-body {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow-x: hidden;
}
.demo-funnel-body,
.demo-funnel-body * {
  max-width: 100%;
}
.demo-minimal-header,
.demo-footer {
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: 14px clamp(14px, 3vw, 24px);
}
.demo-minimal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.demo-hero-actions,
.demo-final-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.demo-brand img {
  display: block;
  width: min(220px, 52vw);
  height: auto;
}
.demo-funnel {
  width: min(100% - 28px, 980px);
  margin: 0 auto;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: clamp(16px, 3vw, 28px);
  padding: clamp(14px, 4vw, 42px) 0;
}
.demo-hero,
.demo-final {
  display: grid;
  width: 100%;
  gap: 18px;
}
.demo-hero {
  place-items: center;
  text-align: center;
}
.demo-hero-panel {
  width: min(100%, 760px);
}
.demo-hero h1,
.demo-final h1 {
  font-size: clamp(32px, 7vw, 64px);
  line-height: 1.02;
  margin: 10px 0 14px;
  overflow-wrap: break-word;
}
.demo-hero p,
.demo-final p {
  color: var(--muted);
  font-size: clamp(15px, 2vw, 18px);
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}
.demo-trust-line {
  color: var(--text);
  font-weight: 800;
}
.demo-kicker,
.demo-question-meta {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.demo-qcard,
.demo-final-cta,
.demo-teaser-stats,
.demo-locked-report article,
.demo-unavailable,
.demo-performance-handoff {
  background: linear-gradient(145deg, rgba(24, 29, 37, .96), rgba(14, 18, 24, .98));
  border: 1px solid rgba(249, 115, 22, .2);
  border-radius: 8px;
  padding: 22px;
}
.demo-runner {
  display: grid;
  gap: 16px;
  width: min(860px, 100%);
  margin: 0 auto;
}
.demo-progress-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}
.demo-progress-head h1 {
  margin: 4px 0 0;
  font-size: clamp(22px, 4vw, 30px);
}
.demo-progress-meter {
  grid-column: 1 / -1;
  height: 10px;
  overflow: hidden;
  background: rgba(255,255,255,.08);
  border-radius: 999px;
}
.demo-progress-meter span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent);
  transition: width .2s ease;
}
.demo-timer {
  min-width: 82px;
  text-align: center;
  padding: 8px 10px;
  border: 1px solid rgba(249, 115, 22, .3);
  border-radius: 8px;
  color: var(--accent);
  font-weight: 900;
  background: rgba(249, 115, 22, .09);
}
.demo-timer.urgent {
  color: var(--danger);
  border-color: rgba(239, 68, 68, .45);
  background: rgba(239, 68, 68, .1);
}
.demo-qcard {
  display: grid;
  gap: 16px;
}
.demo-question-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.demo-qcard h2 {
  margin: 0;
  font-size: clamp(19px, 3vw, 25px);
  line-height: 1.35;
  overflow-wrap: break-word;
}
.demo-answer-list {
  display: grid;
  gap: 10px;
}
.demo-choice {
  min-height: 58px;
  cursor: pointer;
  min-width: 0;
}
.demo-choice:disabled {
  cursor: default;
}
.demo-feedback {
  color: var(--muted);
  border-left: 3px solid var(--accent);
  padding: 10px 12px;
  background: rgba(249, 115, 22, .08);
  border-radius: 6px;
  overflow-wrap: break-word;
}
.demo-final {
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  align-items: start;
}
.demo-final-cta {
  position: sticky;
  top: 18px;
  box-shadow: 0 22px 70px rgba(249, 115, 22, .12);
  text-align: center;
}
.demo-final-cta .btn-primary {
  font-size: 18px;
  padding: 14px 18px;
}
.demo-teaser-stats {
  display: grid;
  gap: 2px;
}
.demo-locked-report {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.demo-locked-report article {
  min-height: 118px;
  position: relative;
  overflow: hidden;
}
.demo-locked-report article::after {
  content: "";
  position: absolute;
  inset: 0;
  backdrop-filter: blur(3px);
  background: rgba(17, 21, 28, .35);
}
.demo-locked-report strong,
.demo-locked-report span {
  display: block;
}
.demo-locked-report span {
  margin-top: 10px;
  color: var(--muted);
}
.demo-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.demo-exit-modal .modal {
  max-height: calc(100vh - 32px);
  overflow: auto;
}
.demo-handoff-systems {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

@media (max-width: 900px) {
  .demo-minimal-header {
    padding: 12px 14px;
  }
  .demo-funnel {
    width: min(100% - 22px, 760px);
    padding: 12px 0 20px;
  }
  .demo-final {
    grid-template-columns: 1fr;
  }
  .demo-hero h1,
  .demo-final h1 {
    font-size: clamp(30px, 9vw, 44px);
  }
  .demo-final-cta {
    position: static;
    order: -1;
  }
  .demo-locked-report,
  .demo-handoff-systems {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .demo-minimal-header {
    gap: 10px;
  }
  .demo-brand img {
    width: min(172px, 58vw);
  }
  .demo-minimal-header .btn {
    padding: 8px 10px;
  }
  .demo-hero p,
  .demo-final p {
    font-size: 16px;
  }
  .demo-qcard,
  .demo-final-cta,
  .demo-teaser-stats,
  .demo-locked-report article,
  .demo-unavailable {
    padding: 16px;
  }
  .demo-qcard h2 {
    font-size: 20px;
  }
  .demo-choice {
    min-height: 64px;
    padding: 12px;
  }
  .demo-final-actions,
  .demo-hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .demo-final-actions .btn-primary,
  .demo-final-actions .btn,
  .demo-hero-actions .btn-primary,
  .demo-hero-actions .btn {
    width: 100%;
    justify-content: center;
  }
  .demo-progress-head {
    grid-template-columns: 1fr;
  }
  .demo-timer {
    width: 100%;
  }
  .demo-footer {
    gap: 8px;
    padding-bottom: 18px;
  }
}

.locked-content-card {
  border-color: rgba(255, 90, 0, 0.32);
  background:
    linear-gradient(135deg, rgba(255, 90, 0, 0.08), rgba(255, 255, 255, 0.025)),
    rgba(7, 11, 22, 0.82);
  user-select: none;
}

.locked-content-card .bi-lock {
  color: #ff7a1a;
  font-size: 1.35rem;
}

.locked-content-card p {
  color: var(--muted, #a9b3c7);
}

.video-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.video-thumb { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 6px; background: #10141B; }
.filters { display: grid; grid-template-columns: 1fr 220px 220px; gap: 12px; margin-bottom: 18px; }
.filters-4 { grid-template-columns: 1fr 190px 190px 190px; }
.selected-video { border-color: var(--accent); }
.qtv-learning-page {
  display: grid;
  gap: 22px;
}
main.qtv-active .qtv-learning-page {
  width: min(1500px, calc(100% - 32px));
}
.qtv-roadmap,
.qtv-player-shell {
  background: linear-gradient(145deg, rgba(20, 25, 34, .96), rgba(10, 13, 18, .98));
  border: 1px solid rgba(249, 115, 22, .18);
  border-radius: 10px;
  padding: 22px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .24);
}
.qtv-recommendation-grid,
.qtv-playlist-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.qtv-playlist-card {
  min-width: 0;
  display: grid;
  gap: 14px;
  align-content: start;
  background: rgba(22, 27, 36, .88);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px;
}
.qtv-recommendation-card {
  border-color: rgba(249, 115, 22, .24);
}
.qtv-card-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(249, 115, 22, .12);
  color: var(--accent);
  font-size: 24px;
}
.qtv-card-body {
  min-width: 0;
}
.qtv-card-body h2,
.qtv-video-row h2 {
  margin: 0 0 8px;
  font-size: 18px;
}
.qtv-card-body p,
.qtv-video-row p {
  color: var(--muted);
  margin: 0 0 10px;
}
.qtv-card-body small,
.qtv-video-row span,
.qtv-player-header span {
  color: var(--muted);
}
.qtv-card-label {
  gap: 6px;
  margin-bottom: 10px;
}
.qtv-metric-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0;
}
.qtv-metric-list span {
  min-width: 0;
  padding: 8px 10px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .035);
  color: #E5E7EB;
  font-size: 12px;
  font-weight: 800;
}
.qtv-related-questions {
  margin-top: 10px;
  color: var(--muted);
}
.qtv-related-questions summary {
  cursor: pointer;
  color: #FDBA74;
  font-weight: 900;
}
.qtv-related-questions div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.qtv-related-questions a {
  padding: 7px 9px;
  border-radius: 7px;
  border: 1px solid rgba(249, 115, 22, .24);
  background: rgba(249, 115, 22, .08);
  color: #F8FAFC;
  font-size: 12px;
  font-weight: 800;
}
.qtv-focus-related {
  margin-top: 14px;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 26px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid var(--border);
  color: var(--muted);
}
.status-pill.warning {
  color: #FED7AA;
  border-color: rgba(249, 115, 22, .38);
  background: rgba(249, 115, 22, .10);
}
.status-pill.success {
  color: #BBF7D0;
  border-color: rgba(34, 197, 94, .38);
  background: rgba(34, 197, 94, .10);
}
.qtv-playlist-title,
.qtv-player-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.eyebrow-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  margin-bottom: 10px;
}
.qtv-video-list {
  display: grid;
  gap: 12px;
}
.qtv-video-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.qtv-video-index {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--accent);
  border: 1px solid rgba(249, 115, 22, .32);
  background: rgba(249, 115, 22, .08);
  font-weight: 900;
}
.qtv-player-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(320px, .9fr);
  gap: 28px;
  align-items: start;
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
}
.qtv-question-under-video {
  grid-column: 1;
  width: 100%;
  margin-top: 4px;
}
.qtv-video-column,
.qtv-explanation {
  min-width: 0;
}
.qtv-video-column {
  display: grid;
  gap: 14px;
  align-content: start;
}
.qtv-video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: #05070B;
}
main.qtv-active .qtv-video-frame {
  min-height: 520px;
}
.qtv-video-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}
.qtv-player-actions {
  margin-top: 12px;
}
.qtv-explanation {
  display: grid;
  gap: 14px;
  background: rgba(15, 19, 27, .96);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px;
}
.qtv-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.qtv-kicker span + span::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 10px;
  border-radius: 999px;
  background: var(--accent);
}
.qtv-correct-badge {
  display: grid;
  gap: 5px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(34, 197, 94, .10);
  border: 1px solid rgba(34, 197, 94, .28);
  color: #DCFCE7;
}
.qtv-correct-badge span {
  color: #BBF7D0;
}
.qtv-explanation-body {
  color: var(--muted);
  line-height: 1.75;
}
.qtv-panel-kicker {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .12em;
}
.qtv-repair-section {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 8px;
  background: rgba(5, 7, 11, .36);
}
.qtv-question-explanation-card {
  display: grid;
  gap: 16px;
  width: 100%;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid rgba(249, 115, 22, .20);
  background: rgba(5, 7, 11, .30);
}
.qtv-question-explanation-card h2 {
  margin: 0;
  color: #F8FAFC;
  font-size: 18px;
}
.qtv-explanation-section {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 8px;
  background: rgba(255, 255, 255, .025);
}
.qtv-explanation-section h3 {
  margin: 0;
  color: #FDBA74;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.qtv-explanation-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.qtv-explanation-section-heading span {
  color: #BBF7D0;
  border: 1px solid rgba(34, 197, 94, .35);
  background: rgba(34, 197, 94, .10);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 900;
}
.qtv-correct-answer-section {
  border-color: rgba(34, 197, 94, .32);
  background: rgba(34, 197, 94, .07);
}
.qtv-correct-answer-section h3 {
  color: #86EFAC;
}
.qtv-wrong-answer-section {
  border-color: rgba(239, 68, 68, .32);
  background: rgba(239, 68, 68, .065);
}
.qtv-wrong-answer-section h3 {
  color: #FCA5A5;
}
.qtv-wrong-choice-list {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
}
.qtv-wrong-choice-list li {
  color: #F8FAFC;
}
.qtv-wrong-choice-list strong {
  color: #FCA5A5;
}
.qtv-question-trap-card {
  margin: 4px 0;
  border-color: rgba(250, 204, 21, .38);
  background: rgba(250, 204, 21, .09);
}
.qtv-question-trap-card h3 {
  color: #FDE68A;
}
.qtv-explanation-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: #05070B;
}
.qtv-flow-builder {
  display: grid;
  gap: 10px;
}
.qtv-flow-builder > span {
  font-weight: 900;
}
.qtv-flow-builder-rows {
  display: grid;
  gap: 8px;
}
.qtv-flow-builder-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px auto auto auto;
  gap: 8px;
  align-items: center;
}
.qtv-repair-section h3 {
  margin: 0;
  color: #F8FAFC;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.qtv-mechanism-flow {
  display: grid;
  justify-items: start;
  gap: 4px;
}
.qtv-flow-step {
  max-width: 100%;
  overflow-wrap: anywhere;
  color: #F8FAFC;
  font-weight: 850;
}
.qtv-flow-step-up { color: #22C55E; }
.qtv-flow-step-down { color: #EF4444; }
.qtv-flow-step-final {
  color: var(--accent);
  font-size: 18px;
}
.qtv-flow-arrow {
  color: #F8FAFC;
  font-weight: 950;
  line-height: 1;
}
.qtv-trap-card {
  border-color: rgba(250, 204, 21, .34);
  background: rgba(250, 204, 21, .08);
}
.qtv-trap-card h3 {
  color: #FDE68A;
}
.qtv-takeaway-card {
  border-color: rgba(249, 115, 22, .40);
  background: rgba(249, 115, 22, .11);
}
.qtv-takeaway-card h3 {
  color: #FDBA74;
}
.qtv-emphasis-yellow { color: #FDE68A; font-weight: 800; }
.qtv-emphasis-orange { color: #FDBA74; font-weight: 800; }
.qtv-emphasis-green { color: #86EFAC; font-weight: 800; }
.qtv-emphasis-red { color: #FCA5A5; font-weight: 800; }
.qtv-callout,
.qtv-callout-warning,
.qtv-callout-orange,
.qtv-callout-green,
.qtv-callout-red {
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .04);
}
.qtv-callout-warning { border-color: rgba(250, 204, 21, .34); background: rgba(250, 204, 21, .08); }
.qtv-callout-orange { border-color: rgba(249, 115, 22, .38); background: rgba(249, 115, 22, .10); }
.qtv-callout-green { border-color: rgba(34, 197, 94, .34); background: rgba(34, 197, 94, .08); }
.qtv-callout-red { border-color: rgba(239, 68, 68, .34); background: rgba(239, 68, 68, .08); }
.qtv-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
}
.qtv-table th,
.qtv-table td {
  border: 1px solid var(--border);
  padding: 10px;
  text-align: left;
}
.qtv-chain {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}
.qtv-chain-step {
  position: relative;
  padding: 10px 12px;
  border: 1px solid rgba(249, 115, 22, .24);
  border-radius: 8px;
  background: rgba(249, 115, 22, .07);
}
.qtv-chain-step + .qtv-chain-step::before {
  content: "↓";
  color: var(--accent);
  position: absolute;
  top: -18px;
  left: 16px;
  font-weight: 900;
}
.qtv-filters {
  align-items: end;
}
.qtv-single-empty {
  min-height: 260px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, .03);
}
.qtv-editor {
  display: grid;
  gap: 8px;
}
.qtv-editor-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.qtv-editor-toolbar button {
  width: auto;
  min-height: 38px;
  padding: 9px 12px;
  border-radius: 8px;
}
.qtv-visual-editor {
  min-height: 180px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(5, 7, 11, .45);
  color: var(--text);
  line-height: 1.65;
  overflow-x: auto;
}
.qtv-visual-editor:focus {
  outline: 2px solid rgba(249, 115, 22, .35);
  border-color: rgba(249, 115, 22, .55);
}
.qtv-wrong-choice-editors {
  display: grid;
  gap: 12px;
}
.qtv-wrong-choice-editors > span {
  font-weight: 900;
}
.qtv-wrong-choice-editors [hidden] {
  display: none !important;
}
.qtv-alpha-list {
  list-style: upper-alpha;
}
.lab-table, .admin-table { width: 100%; border-collapse: collapse; }
.lab-table th, .lab-table td, .admin-table th, .admin-table td { border-bottom: 1px solid var(--border); padding: 12px; text-align: left; vertical-align: top; }
.lab-table th, .admin-table th { color: var(--muted); font-size: 13px; }

.admin-shell { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 18px; padding: 22px; }
.admin-nav { display: grid; gap: 8px; align-content: start; }
.admin-nav a { padding: 10px 12px; border: 1px solid var(--border); border-radius: 7px; color: var(--muted); }
.admin-nav a:hover { color: var(--text); border-color: var(--accent); }
.inline-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.dashboard-page {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 42px;
}
.dashboard-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 22px;
  margin-bottom: 24px;
}
.dashboard-brand { display: flex; align-items: center; gap: 18px; }
.dashboard-brand img {
  width: 150px;
  max-width: 34vw;
  border-radius: 8px;
}
.dashboard-brand h1 {
  font-size: clamp(30px, 5vw, 56px);
  font-weight: 800;
  line-height: 1;
}
.dashboard-brand p {
  color: var(--muted);
  font-size: clamp(15px, 2vw, 28px);
  letter-spacing: 4px;
  margin: 10px 0 0;
}
.dashboard-hero time { color: var(--muted); font-size: 20px; margin-top: 8px; white-space: nowrap; }
.dashboard-empty { margin-bottom: 16px; }
.analytics-grid { display: grid; gap: 16px; margin-bottom: 16px; }
.analytics-grid-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.analytics-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.analytics-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.analytics-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.analytics-card, .dashboard-panel {
  background: linear-gradient(180deg, rgba(35,42,53,.96), rgba(24,29,37,.98));
  border: 1px solid #2A3443;
  border-radius: 8px;
  padding: 18px;
}
.analytics-card span {
  display: block;
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
}
.analytics-card strong {
  display: block;
  color: #A7D97C;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.05;
  margin-top: 12px;
}
.analytics-card small, .weak-row small { color: var(--muted); }
.dashboard-panel h2 { margin-bottom: 12px; }
.chart-panel { margin-bottom: 16px; }
.performance-dashboard {
  display: grid;
  gap: 18px;
}
.performance-hero-card {
  position: relative;
  overflow: hidden;
  min-height: 700px;
  background:
    radial-gradient(circle at 8% 8%, rgba(249, 115, 22, 0.15), transparent 20rem),
    radial-gradient(circle at 92% 6%, rgba(249, 115, 22, 0.08), transparent 24rem),
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(180deg, rgba(7, 11, 18, 0.99), rgba(13, 18, 27, 0.99));
  background-size: auto, auto, 34px 34px, 34px 34px, auto;
  border: 1px solid #202938;
  border-radius: 8px;
  padding: clamp(24px, 3.2vw, 46px);
  box-shadow: 0 28px 86px rgba(0, 0, 0, 0.42);
}
.performance-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 24px;
}
.performance-card-brand {
  display: flex;
  align-items: center;
  gap: 18px;
}
.performance-card-brand img {
  width: clamp(74px, 9vw, 118px);
  height: clamp(74px, 9vw, 118px);
  object-fit: contain;
  filter: drop-shadow(0 0 20px rgba(255, 90, 0, 0.32));
}
.performance-card-brand h1 {
  font-size: clamp(38px, 5.4vw, 72px);
  line-height: 0.98;
  letter-spacing: 0.07em;
  font-weight: 900;
}
.performance-card-brand p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 2.1vw, 30px);
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
.performance-card-top time {
  color: var(--muted);
  font-size: clamp(15px, 2vw, 22px);
  white-space: nowrap;
}
.performance-chart-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: 8px 0 18px;
}
.performance-chart-actions .btn-small {
  min-width: 64px;
  min-height: 42px;
  background: rgba(22, 30, 43, 0.92);
  border-color: rgba(42, 52, 67, 0.9);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.18);
}
.performance-chart-actions .btn-small:disabled,
.performance-chart-actions .btn-small[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.42;
  color: #7b8798;
  border-color: rgba(42, 52, 67, 0.55);
  background: rgba(22, 30, 43, 0.44);
  box-shadow: none;
}
.performance-chart-actions .active,
[data-blueprint-tabs] .active {
  border-color: var(--accent);
  color: #FED7AA;
  background: rgba(249, 115, 22, 0.13);
  box-shadow: 0 0 20px rgba(255, 90, 0, 0.18);
}
.system-point-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: clamp(18px, 5vw, 80px);
  margin: 12px 0 34px;
  padding: 0 clamp(24px, 7vw, 110px);
}
.system-point-label {
  min-width: 0;
  text-align: center;
}
.system-point-label span {
  display: block;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}
.system-point-label strong {
  display: block;
  color: #A7D97C;
  font-size: clamp(34px, 4.3vw, 62px);
  line-height: 1.05;
  margin-top: 8px;
  text-shadow: 0 0 18px rgba(167, 217, 124, 0.18);
}
.system-point-label.yellow strong { color: var(--warning); }
.system-point-label.orange strong { color: var(--accent); }
.system-point-label.red strong { color: var(--danger); }
.system-point-label small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}
.performance-chart-wrap {
  position: relative;
  height: clamp(430px, 44vw, 580px);
  margin-top: 4px;
  padding: 0 clamp(2px, 1vw, 8px);
}
.performance-chart-wrap canvas {
  width: 100% !important;
  height: 100% !important;
}
.performance-html-chart {
  display: grid;
  gap: 14px;
  padding: 18px;
}
.performance-html-bar {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(64px, 120px) 1fr minmax(42px, auto);
}
.performance-html-bar span,
.performance-html-bar strong {
  color: var(--text);
  font-weight: 800;
}
.performance-html-bar div {
  background: rgba(148, 163, 184, 0.14);
  border: 1px solid var(--border);
  border-radius: 999px;
  height: 14px;
  overflow: hidden;
}
.performance-html-bar i {
  background: linear-gradient(90deg, var(--accent), #22c55e);
  display: block;
  height: 100%;
}
.performance-axis-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-top: 8px;
}
.performance-axis-caption strong {
  color: var(--text);
}
.performance-empty {
  min-height: 280px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 24px;
  margin-top: 18px;
}
.passfail-panel .section-title strong {
  color: var(--accent);
  font-size: 24px;
}
.metric small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 12px;
}
.system-card .metric { align-items: center; }
.weak-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.weak-row:last-child { border-bottom: 0; }
.analytics-table { width: 100%; border-collapse: collapse; }
.analytics-table th, .analytics-table td {
  border-bottom: 1px solid var(--border);
  padding: 10px;
  text-align: left;
}
.analytics-table tr.danger td {
  background: rgba(239, 68, 68, 0.08);
  color: #FECACA;
}
.analytics-table th { color: var(--muted); font-size: 12px; text-transform: uppercase; }

.qspace {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 300px;
  gap: 18px;
  padding: 22px;
}
.qspace-sidebar,
.qspace-performance,
.qspace-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.qspace-sidebar,
.qspace-performance {
  padding: 16px;
  align-self: start;
  position: sticky;
  top: 86px;
}
.qspace-sidebar-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 12px;
}
.qspace-main { min-width: 0; }
.qspace-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 10px;
  background: #0E1218;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 12px;
}
.qspace-context {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.qspace-context strong {
  font-size: 14px;
  color: var(--text);
}
.qspace-question-id {
  color: var(--accent);
  font-weight: 900;
  font-size: 18px;
}
.qspace-timer,
.qspace-header-button,
.qspace-mark,
.icon-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}
.qspace-timer {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.qspace-mark {
  width: 42px;
  padding: 0;
  color: var(--muted);
}
.qspace-mark.active {
  color: var(--accent);
  border-color: rgba(249,115,22,.75);
  background: rgba(249,115,22,.12);
}
.qspace-mobile-metrics {
  display: none;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 12px;
  color: var(--muted);
  gap: 10px;
}
.qspace-mobile-metrics strong { color: var(--text); }
.qspace-status { margin-bottom: 12px; }
.qspace-card {
  padding: clamp(16px, 2.6vw, 26px);
}
.qspace-stem {
  min-height: 160px;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.7;
  color: var(--text);
}
.qbank-highlight,
.qspace-highlight {
  background: var(--accent);
  color: #fff;
  padding: 1px 3px;
  border-radius: 3px;
  cursor: pointer;
}

.qbank-highlight-toolbar,
.qspace-highlight-toolbar {
  position: absolute;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
  background: #0E1218;
  border: 1px solid var(--border);
  border-radius: 7px;
  box-shadow: 0 14px 28px rgba(0, 0, 0, .28);
}

.qbank-highlight-toolbar[hidden],
.qspace-highlight-toolbar[hidden] {
  display: none;
}

.qbank-highlight-toolbar button,
.qspace-highlight-toolbar button {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 6px;
  background: rgba(239, 68, 68, .12);
  color: var(--danger);
  cursor: pointer;
}

.qbank-highlight-toolbar button:hover,
.qspace-highlight-toolbar button:hover {
  background: rgba(239, 68, 68, .22);
}
.qspace-answers {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}
.qspace-answer {
  min-height: 62px;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.qspace-answer:hover {
  background: #273140;
}
.qspace-answer.correct-answer {
  border-color: rgba(34,197,94,.8);
  background: rgba(34,197,94,.12);
}
.qspace-answer.incorrect-answer {
  border-color: rgba(239,68,68,.8);
  background: rgba(239,68,68,.12);
}
.qspace-answer.locked-answer {
  cursor: default;
}
.qspace-answer.locked-answer[disabled] {
  opacity: 0.62;
}
.qspace-answer.locked-answer .answer-eliminate {
  opacity: 0.35;
  pointer-events: none;
}
.qspace-answer.eliminated-answer {
  opacity: .58;
  background: rgba(15, 23, 42, .62);
  border-color: rgba(148, 163, 184, .24);
}
.qspace-answer.eliminated-answer > span:not(.answer-eliminate):not(.answer-letter) {
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  color: var(--muted);
}
.answer-eliminate {
  min-width: 44px;
  min-height: 44px;
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  justify-self: end;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, .24);
  color: #fca5a5;
  background: rgba(239, 68, 68, .08);
  cursor: pointer;
  touch-action: manipulation;
}
.answer-eliminate:hover,
.answer-eliminate:focus-visible {
  color: #fff;
  border-color: rgba(239, 68, 68, .62);
  background: rgba(239, 68, 68, .18);
  outline: none;
}
.qspace-result-pulse {
  box-shadow: 0 0 0 3px rgba(249,115,22,.18);
}
.qspace-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}
.qspace-explanation-grid {
  display: grid;
  grid-template-columns: minmax(280px, .9fr) minmax(0, 1.1fr);
  gap: 16px;
}
.qspace-video-panel {
  grid-column: 1;
}
.qspace-explanation-panel {
  grid-column: 2;
  grid-row: 1 / span 2;
}
.qspace-video-panel,
.qspace-explanation-panel {
  min-width: 0;
}
.qspace-video-frame {
  width: 100%;
  aspect-ratio: 16/9;
  background: #0E1218;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.qspace-video-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.qspace-video-empty {
  min-height: 240px;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 8px;
  background: #0E1218;
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 20px;
}
.qspace-video-empty i {
  color: var(--accent);
  font-size: 38px;
}
.qspace-explanation-content {
  color: var(--muted);
  line-height: 1.7;
}
.qspace-explanation-content p:first-child { margin-top: 0; }
.qspace-explanation-content ul {
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.8;
}
.qspace-explanation-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  color: var(--muted);
}
.qspace-explanation-table td {
  border: 1px solid var(--border);
  padding: 9px 10px;
  vertical-align: top;
}
.qspace-diagram {
  margin: 14px 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #10141B;
}
.qspace-diagram img {
  width: 100%;
  display: block;
}
.qspace-diagram figcaption {
  padding: 8px 10px;
  color: var(--muted);
  font-size: 13px;
}
.qspace-explanation-controls {
  grid-column: 1;
  grid-row: 2;
  grid-template-columns: 1fr 1fr;
  margin-top: 0;
}
.qspace-modal-backdrop {
  align-items: start;
  overflow-y: auto;
}
.qspace-labs-modal {
  width: min(980px, 100%);
  margin-top: 4vh;
}
.qspace-report-modal,
.qspace-timer-modal {
  width: min(560px, 100%);
  margin-top: 8vh;
}
.qspace-labs-modal,
.qspace-report-modal,
.qspace-timer-modal {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px;
}
.qspace-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 12px;
}
.qspace-modal-header p {
  margin: 6px 0 0;
}
.icon-button {
  width: 38px;
  padding: 0;
  flex: 0 0 auto;
}
.qspace-lab-filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px 200px;
  gap: 12px;
  margin-bottom: 14px;
}
.qspace-labs-list {
  display: grid;
  gap: 10px;
  max-height: min(58vh, 620px);
  overflow: auto;
  padding-right: 4px;
}
.qspace-lab-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, auto);
  gap: 12px;
  align-items: start;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
}
.qspace-lab-card span,
.qspace-lab-card small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.qspace-lab-card strong {
  display: block;
  color: var(--text);
}
.qspace-lab-card p {
  grid-column: 1 / -1;
  margin: 0;
}
.report-context-grid {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 8px 12px;
  background: #10141B;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
}
.report-context-grid span {
  color: var(--muted);
}
.report-context-grid strong {
  color: var(--text);
}

@media (max-width: 980px) {
  .qbank-layout, .admin-shell, .qspace { grid-template-columns: 1fr; padding: 16px; }
  .qspace-sidebar,
  .qspace-performance {
    position: static;
  }
  .qspace-performance .metrics { display: none; }
  .qspace-mobile-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .qspace-header {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }
  .qspace-header-button {
    grid-column: span 1;
  }
  .qspace-explanation-grid {
    grid-template-columns: 1fr;
  }
  .qspace-video-panel {
    grid-column: 1;
    grid-row: auto;
    order: 1;
  }
  .qspace-explanation-controls {
    grid-column: 1;
    grid-row: auto;
    order: 2;
  }
  .qspace-explanation-panel {
    grid-column: 1;
    grid-row: auto;
    order: 3;
  }
  .qspace-lab-filters {
    grid-template-columns: 1fr;
  }
  .qspace-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .performance-panel .metrics { display: none; }
  .question-header { display: grid; }
  .grid-2, .grid-3, .grid-4, .pricing-grid, .video-grid, .filters,
  .analytics-grid-6, .analytics-grid-4, .analytics-grid-3, .analytics-grid-2 { grid-template-columns: 1fr; }
  .dashboard-hero { display: grid; }
  .dashboard-brand { align-items: flex-start; }
  .section-title { display: grid; }
  .site-header { align-items: flex-start; flex-wrap: wrap; }
  .main-nav { width: 100%; order: 3; }
}

@media (max-width: 620px) {
  .site-footer { display: flex; }
  .question-actions, .qspace-controls { display: grid; grid-template-columns: 1fr; }
  .qspace-header {
    grid-template-columns: 1fr auto;
  }
  .qspace-context {
    grid-column: 1 / -1;
  }
  .qspace-timer,
  .qspace-header-button {
    width: 100%;
  }
  .qspace-mobile-metrics {
    grid-template-columns: 1fr;
  }
  .qspace-lab-card {
    grid-template-columns: 1fr;
  }
  .report-context-grid {
    grid-template-columns: 1fr;
  }
  .brand img { width: 185px; }
  .dashboard-brand { display: grid; }
  .dashboard-brand p { letter-spacing: 2px; }
  .weak-row { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .qtv-roadmap,
  .qtv-player-shell {
    padding: 16px;
  }
  .qtv-recommendation-grid,
  .qtv-playlist-grid,
  .qtv-player-grid {
    grid-template-columns: 1fr;
  }
  .qtv-question-under-video {
    grid-column: auto;
  }
  .qtv-playlist-title,
  .qtv-player-header {
    display: grid;
  }
  .qtv-video-row {
    grid-template-columns: 38px minmax(0, 1fr);
  }
  .qtv-video-row .inline-actions {
    grid-column: 1 / -1;
  }
  main.qtv-active .qtv-video-frame {
    min-height: auto;
  }
  .qtv-metric-list {
    grid-template-columns: 1fr;
  }
  .qtv-flow-builder-row {
    grid-template-columns: 1fr;
  }
  .qtv-table,
  .qtv-table thead,
  .qtv-table tbody,
  .qtv-table tr,
  .qtv-table th,
  .qtv-table td {
    display: block;
    width: 100%;
  }
  .qtv-table tr {
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 10px;
  }
  .qtv-table th,
  .qtv-table td {
    border: 0;
    border-bottom: 1px solid var(--border);
  }
  .qtv-table tr > *:last-child {
    border-bottom: 0;
  }
  .admin-shell {
    grid-template-columns: 1fr !important;
    padding: 14px !important;
    overflow-x: hidden;
  }
  .admin-nav {
    grid-template-columns: 1fr 1fr;
  }
  .admin-shell .panel,
  .admin-shell .card,
  .admin-shell form,
  .admin-shell input,
  .admin-shell select,
  .admin-shell textarea {
    min-width: 0;
    max-width: 100%;
  }
  .admin-table,
  .admin-shell .analytics-table,
  .admin-table thead,
  .admin-shell .analytics-table thead,
  .admin-table tbody,
  .admin-shell .analytics-table tbody,
  .admin-table tr,
  .admin-shell .analytics-table tr,
  .admin-table th,
  .admin-shell .analytics-table th,
  .admin-table td {
    display: block;
    width: 100%;
  }
  .admin-shell .analytics-table td {
    display: block;
    width: 100%;
  }
  .admin-table,
  .admin-shell .analytics-table {
    border-collapse: separate;
    border-spacing: 0;
  }
  .admin-table thead,
  .admin-shell .analytics-table thead {
    display: none;
  }
  .admin-table tr,
  .admin-shell .analytics-table tr {
    margin-bottom: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(22, 27, 36, .78);
    overflow: hidden;
  }
  .admin-table td,
  .admin-shell .analytics-table td {
    display: grid;
    grid-template-columns: minmax(96px, .38fr) minmax(0, 1fr);
    gap: 10px;
    border-bottom: 1px solid var(--border);
    overflow-wrap: anywhere;
  }
  .admin-table td:last-child,
  .admin-shell .analytics-table td:last-child {
    border-bottom: 0;
  }
  .admin-table td::before,
  .admin-shell .analytics-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
  }
  .admin-table .inline-actions,
  .admin-table form.inline-actions,
  .admin-shell .analytics-table .inline-actions,
  .admin-shell .analytics-table form.inline-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}
/* ADRENALINE PAGE-SCOPED LAYOUT STABILIZATION */
.site-footer .footer-line {
  display: block;
  margin: 0;
  max-width: 100%;
  line-height: 1.7;
}

.site-footer .footer-line a {
  display: inline;
}

main.qbank-page {
  width: 100%;
}

main.qbank-page .qbank-layout {
  width: min(1440px, 100%);
  max-width: 1440px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 260px minmax(650px, 1fr) 320px;
  gap: 28px;
  align-items: start;
  padding: 28px;
}

main.qbank-page .qspace-sidebar {
  grid-column: 1;
  width: 260px;
  min-width: 0;
  align-self: start;
}

main.qbank-page .qspace-main {
  grid-column: 2;
  width: 100%;
  min-width: 0;
}

main.qbank-page .qspace-performance {
  grid-column: 3;
  width: 320px;
  max-width: 320px;
  min-width: 0;
  align-self: start;
}

main.qbank-page .qspace-sidebar,
main.qbank-page .qspace-performance,
main.qbank-page .qspace-card,
main.qbank-page .qspace-header {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
}

main.qbank-page .qspace-sidebar,
main.qbank-page .qspace-performance {
  padding: 16px;
}

main.qbank-page .qspace-sidebar-title {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

main.qbank-page .qbank-system-tree {
  display: grid;
  gap: 8px;
}

main.qbank-page .qbank-system-node {
  position: relative;
}

main.qbank-page .qbank-system-link,
main.qbank-page .qbank-topic-link {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  border-radius: 7px;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}

main.qbank-page .qbank-system-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 9px;
  font-weight: 750;
}

main.qbank-page .qbank-topic-list {
  position: relative;
  margin: 2px 0 8px 17px;
  padding-left: 14px;
}

main.qbank-page .qbank-topic-list::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 10px;
  width: 1px;
  background: rgba(148, 163, 184, .28);
}

main.qbank-page .qbank-topic-node {
  position: relative;
}

main.qbank-page .qbank-topic-node::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 50%;
  width: 12px;
  height: 1px;
  background: rgba(148, 163, 184, .28);
}

main.qbank-page .qbank-topic-link {
  padding: 6px 9px;
  color: var(--muted);
  font-size: 14px;
}

main.qbank-page .qbank-topic-link.qbank-topic-empty {
  opacity: .58;
}

main.qbank-page .qbank-topic-link.qbank-topic-empty::after {
  content: "Empty";
  float: right;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

main.qbank-page .qbank-system-link:hover,
main.qbank-page .qbank-topic-link:hover,
main.qbank-page .qbank-system-link.active,
main.qbank-page .qbank-topic-link.active {
  color: var(--text);
  border-color: rgba(249, 115, 22, .42);
  background: rgba(249, 115, 22, .09);
}

main.qbank-page .qbank-system-link.active,
main.qbank-page .qbank-topic-link.active {
  color: var(--accent);
}

main.qbank-page .qbank-tree-line {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(148, 163, 184, .48);
}

main.qbank-page .qbank-system-link.active .qbank-tree-line {
  background: var(--accent);
}

main.qbank-page .qbank-sidebar-empty {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

main.qbank-page .tree-children[hidden] {
  display: none;
}

main.qbank-page .qspace-header {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto auto auto;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  margin-bottom: 12px;
  padding: 10px;
  background: linear-gradient(180deg, #151A22, #10141B);
}

main.qbank-page .qspace-context {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

main.qbank-page .qspace-context strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

main.qbank-page .qspace-card {
  width: 100%;
  min-width: 0;
  padding: clamp(16px, 2.6vw, 26px);
  background: linear-gradient(180deg, rgba(35,42,53,.98), rgba(24,29,37,.98));
}

main.qbank-page .qspace-stem {
  width: 100%;
  min-height: 140px;
  padding-bottom: 8px;
  color: var(--text);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.7;
  white-space: pre-wrap;
}

main.qbank-page .qspace-answers {
  width: 100%;
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

main.qbank-page .qspace-answer {
  width: 100%;
  min-height: 62px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 12px;
  margin-top: 0;
  padding-right: 10px;
}

main.qbank-page .qspace-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

main.qbank-page .qspace-controls button {
  min-width: 0;
}

main.qbank-page .qspace-performance .metrics h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 16px;
}

main.qbank-page .qspace-performance .metric {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}

main.qbank-page .qspace-performance .metric span {
  color: var(--muted);
}

main.qbank-page .qspace-performance .metric strong {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

main.qbank-page .readiness-meter {
  height: 8px;
  overflow: hidden;
  background: #181D25;
  border: 1px solid var(--border);
  border-radius: 999px;
}

main.qbank-page .readiness-meter span {
  display: block;
  height: 100%;
  background: var(--accent);
}

main.qbank-page .qspace-report-link {
  display: flex;
  justify-content: center;
  width: fit-content;
  min-width: 160px;
  margin: 22px auto 0;
}

main.qbank-page .qbank-topic-navigator {
  margin-top: 16px;
}

main.qbank-page .qbank-topic-navigator__toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: linear-gradient(180deg, #181D25, #11151C);
  color: var(--text);
  padding: 11px 12px;
  font-weight: 800;
}

main.qbank-page .qbank-topic-navigator__toggle span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

main.qbank-page .qbank-topic-navigator__toggle:hover,
main.qbank-page .qbank-topic-navigator__toggle.is-open {
  border-color: rgba(249, 115, 22, .5);
  color: var(--accent);
}

main.qbank-page .qbank-topic-navigator__toggle .bi-chevron-down {
  transition: transform .15s ease;
}

main.qbank-page .qbank-topic-navigator__toggle.is-open .bi-chevron-down {
  transform: rotate(180deg);
}

main.qbank-page .qbank-topic-navigator__card {
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(24, 29, 37, .96);
  padding: 12px;
}

main.qbank-page .qbank-topic-navigator__head {
  display: grid;
  gap: 3px;
  margin-bottom: 10px;
}

main.qbank-page .qbank-topic-navigator__head strong {
  font-size: 14px;
}

main.qbank-page .qbank-topic-navigator__head span,
main.qbank-page .qbank-topic-navigator__empty {
  color: var(--muted);
  font-size: 12px;
}

main.qbank-page .qbank-topic-navigator__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(34px, 1fr));
  gap: 7px;
}

main.qbank-page .qbank-topic-navigator__item {
  min-width: 0;
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #11151C;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  padding: 0;
}

main.qbank-page .qbank-topic-navigator__item:hover {
  border-color: rgba(249, 115, 22, .5);
  color: var(--text);
}

main.qbank-page .qbank-topic-navigator__item--correct {
  color: var(--success);
  border-color: rgba(34, 197, 94, .45);
  background: rgba(34, 197, 94, .08);
}

main.qbank-page .qbank-topic-navigator__item--incorrect {
  color: var(--danger);
  border-color: rgba(239, 68, 68, .45);
  background: rgba(239, 68, 68, .08);
}

main.qbank-page .qbank-topic-navigator__item--unanswered {
  color: var(--warning);
  border-color: rgba(234, 179, 8, .35);
  background: rgba(234, 179, 8, .07);
}

main.qbank-page .qbank-topic-navigator__item--current {
  outline: 2px solid rgba(249, 115, 22, .75);
  outline-offset: 2px;
  color: var(--accent);
}

.metric-correct { color: var(--success) !important; }
.metric-incorrect { color: var(--danger) !important; }
.metric-progress { color: var(--warning) !important; }
.metric-fire { color: var(--accent); }

main.performance-page {
  width: 100%;
}

main.performance-page .dashboard-page {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 42px;
}

main.performance-page .dashboard-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 22px;
  margin-bottom: 24px;
}

main.performance-page .analytics-grid {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}

main.performance-page .analytics-grid-6 {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

main.performance-page .analytics-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

main.performance-page .analytics-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

main.performance-page .analytics-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

main.performance-page .analytics-card,
main.performance-page .dashboard-panel {
  min-width: 0;
}

main.performance-page .chart-panel,
main.performance-page .analytics-table {
  overflow-x: auto;
}

main.performance-page canvas {
  display: block;
  max-width: 100%;
}

main.support-page {
  width: 100%;
}

main.support-page .support-content {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
}

main.support-page .support-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 1fr);
  gap: 18px;
  align-items: start;
}

main.support-page .support-faq-card,
main.support-page .support-form-card,
main.support-page .faq-accordion,
main.support-page .faq-item,
main.support-page .faq-question {
  width: 100%;
}

main.support-page .faq-accordion {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

main.support-page .faq-question {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  text-align: left;
}

main.support-page .faq-question span {
  min-width: 0;
}

main.support-page .faq-answer {
  position: relative;
  background: rgba(14, 18, 24, 0.35);
  padding-left: 44px;
}

main.support-page .faq-answer::before {
  content: "";
  position: absolute;
  left: 22px;
  top: 0;
  bottom: 18px;
  width: 1px;
  background: rgba(148, 163, 184, 0.35);
}

main.support-page .faq-answer::after {
  content: "";
  position: absolute;
  left: 22px;
  top: 31px;
  width: 16px;
  height: 1px;
  background: rgba(148, 163, 184, 0.35);
}

main.support-page .support-success {
  width: min(620px, 100%);
  margin: 28px auto 0;
  padding: 24px;
  text-align: center;
}

main.support-page .support-success .btn {
  margin-top: 14px;
}

.review-page .review-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.review-page .review-panel {
  display: grid;
  gap: 14px;
}

.review-page .review-groups {
  display: grid;
  gap: 12px;
}

.review-page .review-system-group {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.review-page .review-system-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
}

.review-page .review-system-group summary::marker {
  color: var(--accent);
}

.review-page .review-system-group summary strong {
  color: var(--accent);
  font-size: 13px;
}

.review-page .review-question-list {
  display: grid;
  gap: 1px;
  border-top: 1px solid var(--border);
  background: var(--border);
}

.review-page .review-question-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px 16px;
  background: rgba(24, 29, 37, .98);
}

.review-page .review-question-main,
.review-page .review-question-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.review-page .review-question-main > span:not(.status-pill) {
  color: var(--muted);
}

.review-page .review-question-actions {
  justify-content: flex-end;
}

@media (min-width: 901px) {
  main.qbank-page .qspace-sidebar,
  main.qbank-page .qspace-performance {
    position: sticky;
    top: 88px;
  }
}

@media (max-width: 1100px) {
  main.qbank-page .qbank-layout {
    grid-template-columns: 240px minmax(0, 1fr) 300px;
    gap: 18px;
    padding: 18px;
  }

  main.qbank-page .qspace-sidebar {
    width: 240px;
  }

  main.qbank-page .qspace-performance {
    width: 300px;
    max-width: 300px;
  }
}

@media (max-width: 900px) {
  main.qbank-page .qbank-layout {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px;
  }

  main.qbank-page .qspace-sidebar,
  main.qbank-page .qspace-main,
  main.qbank-page .qspace-performance {
    grid-column: 1;
    width: 100%;
    max-width: none;
    position: static;
  }

  main.qbank-page .qspace-performance .metrics {
    display: none;
  }

  main.qbank-page .qbank-topic-navigator,
  main.qbank-page .qbank-topic-navigator__toggle,
  main.qbank-page .qbank-topic-navigator__card {
    display: none !important;
  }

  main.qbank-page .qspace-mobile-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  main.qbank-page .qspace-mobile-metrics .mobile-progress {
    grid-column: 1 / -1;
  }

  .review-page .review-question-row {
    grid-template-columns: 1fr;
  }

  .review-page .review-question-actions {
    justify-content: flex-start;
  }

  .review-page .review-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }

  main.qbank-page .qspace-header {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  main.qbank-page .qspace-context {
    grid-column: 1 / -1;
  }

  main.qbank-page .qspace-header-button,
  main.qbank-page .qspace-timer {
    width: 100%;
  }

  main.performance-page .dashboard-hero,
  main.performance-page .section-title {
    display: grid;
  }

  main.performance-page .performance-card-top,
  main.performance-page .performance-card-brand,
  main.performance-page .performance-axis-caption {
    display: grid;
  }

  main.performance-page .performance-chart-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  main.performance-page .system-point-strip {
    padding-left: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  main.performance-page .analytics-grid-6,
  main.performance-page .analytics-grid-4,
  main.performance-page .analytics-grid-3,
  main.performance-page .analytics-grid-2,
  main.support-page .support-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  main.qbank-page .qbank-layout {
    padding: 12px;
  }

  main.qbank-page .qspace-controls {
    grid-template-columns: 1fr;
  }

  main.support-page .support-content {
    width: min(100% - 24px, 1180px);
  }
}

/* MOBILE RWD FINAL STABILITY */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

img,
svg,
canvas,
video,
iframe {
  max-width: 100%;
}

main,
section,
article,
div,
form,
nav,
header,
footer {
  max-width: 100%;
}

.mobile-menu-toggle,
.mobile-menu-backdrop,
.mobile-label,
.qbank-mobile-system-toggle,
.qbank-mobile-selector-close,
.qspace-mobile-close {
  display: none;
}

.body--focus-locked {
  overflow: hidden;
  touch-action: none;
}

.focus-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: start center;
  padding: 14px;
  background: rgba(0, 0, 0, .74);
}

.focus-backdrop[hidden] {
  display: none;
}

.focus-modal {
  width: min(440px, calc(100vw - 24px));
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .45);
}

.focus-modal__header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  background: #0E1218;
  border-bottom: 1px solid var(--border);
}

.mobile-menu {
  margin-top: 12px;
}

.mobile-menu__header img {
  width: 168px;
  display: block;
}

.mobile-menu__links {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.mobile-menu__links a {
  min-height: 46px;
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
  padding: 10px 12px;
  font-weight: 800;
}

body,
.page,
.panel,
.card,
.auth-card,
.dashboard-panel,
.analytics-card,
.answer-card,
.review-question-row,
.review-system-group,
.qspace-card,
.qspace-header,
.qspace-performance,
.qspace-sidebar {
  min-width: 0;
  overflow-wrap: break-word;
}

@media (max-width: 900px) {
  .site-header {
    min-height: 60px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    flex-wrap: nowrap !important;
  }

  .brand {
    min-width: 0;
  }

  .brand img {
    width: min(172px, 48vw);
    max-width: 100%;
  }

  .main-nav {
    display: none !important;
  }

  .header-actions {
    justify-self: end;
    gap: 8px;
    min-width: 0;
  }

  .header-actions .pro-badge {
    max-width: none;
    overflow: visible;
    white-space: nowrap;
    padding: 5px 8px;
    font-size: 11px;
  }
  .mobile-pro-badge .desktop-text { display: none; }
  .mobile-pro-badge .mobile-text { display: inline; }

  .icon-link {
    font-size: 22px;
  }

  .mobile-menu-toggle {
    width: 42px;
    height: 42px;
    min-height: 42px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    font-size: 24px;
  }

  .header-logout {
    display: none;
  }

  main {
    min-height: calc(100vh - 116px);
  }

  .page,
  .auth-page,
  .dashboard-page,
  main.performance-page .dashboard-page,
  main.support-page .support-content {
    width: min(100% - 20px, 1180px);
    padding-top: 18px;
  }

  .page-title,
  .section-title {
    display: grid;
    gap: 10px;
  }

  .grid-2,
  .grid-3,
  .grid-4,
  .pricing-grid,
  .video-grid,
  .filters,
  .filters-4,
  .analytics-grid-6,
  .analytics-grid-4,
  .analytics-grid-3,
  .analytics-grid-2 {
    grid-template-columns: 1fr !important;
  }

  .modal-backdrop,
  .qspace-modal-backdrop {
    align-items: start;
    place-items: start center;
    padding: 12px;
    background: rgba(0, 0, 0, .74);
    overflow: hidden;
  }

  .modal,
  .qspace-labs-modal,
  .qspace-report-modal,
  .qspace-timer-modal {
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 32px);
    margin: 4px 0 0 !important;
    overflow-y: auto;
  }

  main.qbank-page .qbank-layout {
    width: 100%;
    grid-template-columns: 1fr !important;
    gap: 12px;
    padding: 10px;
  }

  main.qbank-page .qspace-sidebar {
    grid-column: 1;
    width: 100%;
    max-width: none;
    padding: 0;
    border: 0;
    background: transparent;
  }

  main.qbank-page .qbank-sidebar__title,
  main.qbank-page .qbank-system-tree,
  main.qbank-page .qbank-sidebar-empty,
  main.qbank-page .qbank-mobile-selector-close {
    display: none;
  }

  main.qbank-page .qbank-mobile-system-toggle {
    width: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-color: rgba(249, 115, 22, .32);
    background: var(--panel);
    color: var(--text);
  }

  main.qbank-page .qbank-sidebar.qbank-sidebar--mobile-open {
    position: fixed;
    inset: 12px;
    z-index: 92;
    display: block;
    width: auto;
    max-width: none;
    max-height: calc(100vh - 24px);
    overflow-y: auto;
    padding: 16px;
    border: 1px solid var(--border);
    background: var(--panel);
    border-radius: 8px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .5);
  }

  main.qbank-page .qbank-sidebar.qbank-sidebar--mobile-open::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background: rgba(0, 0, 0, .74);
  }

  main.qbank-page .qbank-sidebar.qbank-sidebar--mobile-open .qbank-sidebar__title,
  main.qbank-page .qbank-sidebar.qbank-sidebar--mobile-open .qbank-system-tree,
  main.qbank-page .qbank-sidebar.qbank-sidebar--mobile-open .qbank-sidebar-empty,
  main.qbank-page .qbank-sidebar.qbank-sidebar--mobile-open .qbank-mobile-selector-close {
    display: grid;
  }

  main.qbank-page .qbank-sidebar.qbank-sidebar--mobile-open .qbank-mobile-system-toggle {
    display: none;
  }

  main.qbank-page .qbank-mobile-selector-close {
    position: sticky;
    top: 0;
    margin-left: auto;
    z-index: 2;
  }

  main.qbank-page .qspace-main,
  main.qbank-page .qspace-performance {
    grid-column: 1;
    width: 100%;
    max-width: none;
    position: static;
  }

  main.qbank-page .qspace-performance,
  main.qbank-page .qspace-performance .metrics,
  .performance-panel,
  .desktop-performance-snapshot {
    display: none !important;
  }

  main.qbank-page .premium-cta {
    display: none;
  }

  main.qbank-page .qspace-mobile-metrics,
  .mobile-performance-strip {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
    padding: 8px;
    font-size: 12px;
  }

  main.qbank-page .qspace-mobile-metrics span {
    display: grid;
    gap: 2px;
    min-width: 0;
    text-align: center;
  }

  main.qbank-page .qspace-mobile-metrics .mobile-progress {
    grid-column: 1 / -1;
    margin-top: 2px;
  }

  main.qbank-page .qspace-header {
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 8px;
    min-height: 0;
    padding: 8px;
  }

  main.qbank-page .qspace-context {
    grid-column: 1 / -1;
  }

  main.qbank-page .qspace-context strong {
    white-space: normal;
  }

  main.qbank-page .qspace-header-button {
    min-height: 38px;
    padding: 8px 9px;
    font-size: 12px;
  }

  main.qbank-page .qspace-timer {
    width: auto;
    min-height: 38px;
    padding: 8px 9px;
  }

  main.qbank-page .qspace-card {
    padding: 14px;
  }

  main.qbank-page .qspace-stem {
    min-height: 90px;
    font-size: 17px;
    line-height: 1.62;
  }

  main.qbank-page .qspace-answer {
    min-height: 54px;
    grid-template-columns: 34px minmax(0, 1fr) 44px;
    gap: 8px;
    padding: 9px 8px;
  }

  main.qbank-page .qspace-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px;
  }

  main.qbank-page .qspace-controls button {
    min-height: 44px;
    padding: 9px 8px;
    font-size: 13px;
  }

  main.qbank-page .qspace-controls [data-qbank-previous] { order: 1; }
  main.qbank-page .qspace-controls [data-qbank-next] { order: 2; }
  main.qbank-page .qspace-controls [data-qbank-report-open] { order: 3; }
  main.qbank-page .qspace-controls [data-qbank-explanation] { order: 4; }

  .desktop-label {
    display: none;
  }

  .mobile-label {
    display: inline;
  }

  main.qbank-page .qspace-explanation-view:not([hidden]) {
    position: fixed;
    inset: 12px;
    z-index: 91;
    display: block;
    max-height: calc(100vh - 24px);
    overflow-y: auto;
    padding: 14px;
    background: var(--panel);
    box-shadow: 0 24px 80px rgba(0, 0, 0, .5);
  }

  main.qbank-page .qspace-explanation-view:not([hidden])::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background: rgba(0, 0, 0, .74);
  }

  main.qbank-page .qspace-mobile-close {
    position: sticky;
    top: 0;
    z-index: 4;
    display: grid;
    margin-left: auto;
    margin-bottom: 8px;
  }

  main.qbank-page .qspace-explanation-grid {
    grid-template-columns: 1fr;
  }

  main.qbank-page .qspace-video-panel,
  main.qbank-page .qspace-explanation-controls,
  main.qbank-page .qspace-explanation-panel {
    grid-column: 1;
    grid-row: auto;
  }

  main.qbank-page .qspace-explanation-controls {
    grid-template-columns: 1fr 1fr !important;
  }

  main.qbank-page .qbank-topic-navigator,
  main.qbank-page .qbank-topic-navigator__toggle,
  main.qbank-page .qbank-topic-navigator__card {
    display: none !important;
  }

  main.performance-page .performance-hero-card {
    min-height: 0;
    padding: 16px;
  }

  main.performance-page .performance-card-brand {
    gap: 12px;
  }

  main.performance-page .performance-card-brand img {
    width: 62px;
    height: 62px;
  }

  main.performance-page .performance-card-brand h1 {
    font-size: clamp(28px, 11vw, 42px);
    letter-spacing: 0.03em;
  }

  main.performance-page .performance-card-brand p {
    font-size: clamp(13px, 4vw, 17px);
    letter-spacing: 0.13em;
  }

  main.performance-page .performance-chart-wrap {
    min-height: 340px;
    height: 340px;
  }

  main.performance-page .system-point-strip {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 22px;
    padding: 0;
  }

  main.performance-page .system-point-label strong {
    font-size: clamp(30px, 10vw, 44px);
  }

  main.performance-page .analytics-table,
  main.performance-page .analytics-table thead,
  main.performance-page .analytics-table tbody,
  main.performance-page .analytics-table tr,
  main.performance-page .analytics-table th,
  main.performance-page .analytics-table td {
    display: block;
    width: 100%;
  }

  main.performance-page .analytics-table {
    border-collapse: separate;
    border-spacing: 0;
    overflow: visible;
  }

  main.performance-page .analytics-table thead {
    display: none;
  }

  main.performance-page .analytics-table tr {
    margin-bottom: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(35, 42, 53, .58);
    overflow: hidden;
  }

  main.performance-page .analytics-table td {
    display: grid;
    grid-template-columns: 116px minmax(0, 1fr);
    gap: 10px;
    border-bottom: 1px solid var(--border);
    padding: 9px 10px;
  }

  main.performance-page .analytics-table td:last-child {
    border-bottom: 0;
  }

  main.performance-page .analytics-table td::before {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
  }

  main.performance-page .analytics-table td:nth-child(1)::before { content: "Category"; }
  main.performance-page .analytics-table td:nth-child(2)::before { content: "Target"; }
  main.performance-page .analytics-table td:nth-child(3)::before { content: "Actual"; }
  main.performance-page .analytics-table td:nth-child(4)::before { content: "Accuracy"; }
  main.performance-page .analytics-table td:nth-child(5)::before { content: "Avg Time"; }
  main.performance-page .analytics-table td:nth-child(6)::before { content: "Status"; }

  main.performance-page [data-recent-sessions] .analytics-table td:nth-child(1)::before { content: "Date"; }
  main.performance-page [data-recent-sessions] .analytics-table td:nth-child(2)::before { content: "System / Topic"; }
  main.performance-page [data-recent-sessions] .analytics-table td:nth-child(3)::before { content: "Questions"; }
  main.performance-page [data-recent-sessions] .analytics-table td:nth-child(4)::before { content: "Accuracy"; }
  main.performance-page [data-recent-sessions] .analytics-table td:nth-child(5)::before { content: "Avg Time"; }
  main.performance-page [data-recent-sessions] .analytics-table td:nth-child(6)::before { content: "Readiness"; }

  .weak-row,
  .review-page .review-question-row {
    grid-template-columns: 1fr !important;
  }

  .review-page .review-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    max-width: 100%;
    padding-bottom: 4px;
  }

  .review-page .review-tabs .btn {
    white-space: nowrap;
  }

  .review-page .review-question-actions {
    justify-content: flex-start;
  }

  main.support-page .support-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .brand img {
    width: 142px;
  }

  .header-actions .pro-badge {
    max-width: none;
  }

  main.qbank-page .qspace-mobile-metrics {
    font-size: 11px;
    gap: 4px;
  }

  main.qbank-page .qspace-header {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  main.qbank-page .qspace-header-button,
  main.qbank-page .qspace-timer,
  main.qbank-page .qspace-mark {
    font-size: 12px;
  }
}

@media (max-width: 900px) {
  .qbank-highlight-toolbar,
  .qspace-highlight-toolbar {
    padding: 7px;
  }

  .qbank-highlight-toolbar button,
  .qspace-highlight-toolbar button {
    width: 42px;
    height: 42px;
    min-height: 42px;
  }
}

@media (max-width: 620px) {
  button,
  .btn,
  a.btn,
  input[type="submit"] {
    max-width: 100%;
  }

  .card button,
  .card .btn,
  .profile-card button,
  .profile-card .btn,
  .subscription-card button,
  .subscription-card .btn {
    min-width: 0;
    overflow-wrap: break-word;
  }

  .subscription-card {
    width: 100%;
    max-width: 100%;
    padding: 22px;
    overflow: hidden;
  }

  .subscription-card .renew-button,
  .subscription-card .subscription-action,
  .subscription-card .upgrade-button,
  .subscription-card button,
  .subscription-card a.btn {
    width: 100%;
    max-width: 100%;
    min-height: 48px;
    padding: 14px 16px;
    white-space: normal;
    overflow-wrap: break-word;
    text-align: center;
    line-height: 1.25;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .subscription-management-disabled {
    width: 100%;
    min-height: 46px;
    padding: 13px 16px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .10);
    color: rgba(248, 250, 252, .75);
  }

  .btn-logout {
    width: 100%;
  }
}

main.qbank-page .qspace-header {
  grid-template-columns: minmax(0, 1fr) repeat(5, auto);
}

main.qbank-page .qspace-header-button--secondary {
  border-color: rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  color: rgba(255,255,255,.78);
}

main.qbank-page .qspace-header-button--secondary:hover {
  border-color: rgba(249,115,22,.45);
  color: var(--text);
}

@media (max-width: 900px) {
  main.qbank-page .qspace-header {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  main.qbank-page .qspace-context {
    grid-column: 1 / -1;
  }

  main.qbank-page .qspace-timer,
  main.qbank-page .qspace-header-button,
  main.qbank-page .qspace-mark {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 620px) {
  main.qbank-page .qspace-header {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  main.qbank-page .qspace-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Demo Mode visual/RWD rebuild */
html:has(.demo-funnel-body),
.demo-funnel-body {
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
}
.demo-funnel-body {
  position: relative;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background:
    radial-gradient(circle at 12% 78%, rgba(255, 90, 0, .18), transparent 24%),
    radial-gradient(circle at 88% 18%, rgba(255, 90, 0, .2), transparent 22%),
    linear-gradient(180deg, #050910 0%, #080D15 48%, #03060B 100%);
}
.demo-funnel-body::before {
  content: "";
  position: fixed;
  inset: 72px 0 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, transparent 0 8%, rgba(255, 90, 0, .14) 8.4%, transparent 15%, transparent 78%, rgba(255, 90, 0, .12) 78.5%, transparent 87%);
  background-size: 28px 28px, 28px 28px, 100% 100%;
  opacity: .58;
}
.demo-funnel-body::after {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  top: 92px;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 90, 0, .95), transparent);
  box-shadow: 0 0 24px rgba(255, 90, 0, .65);
}
.demo-minimal-header {
  position: relative;
  z-index: 2;
  width: min(100% - 32px, 1280px);
  min-height: 92px;
  padding: 18px 0;
}
.demo-brand img {
  width: clamp(190px, 22vw, 300px);
}
.demo-minimal-header .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 18px;
  border-radius: 8px;
  background: rgba(15, 21, 31, .78);
  border: 1px solid rgba(148, 163, 184, .22);
  box-shadow: inset 0 0 18px rgba(255,255,255,.025), 0 10px 32px rgba(0,0,0,.28);
}
.demo-minimal-header .btn::before {
  content: "\F4D7";
  font-family: "bootstrap-icons";
  margin-right: 8px;
  color: var(--accent);
}
.demo-funnel {
  position: relative;
  z-index: 1;
  width: min(100% - 32px, 1120px);
  min-height: auto;
  padding: clamp(20px, 5vh, 48px) 0 28px;
}
.demo-hero {
  min-height: min(640px, calc(100vh - 210px));
}
.demo-hero-panel {
  width: min(100%, 820px);
  padding: clamp(24px, 5vw, 54px);
  border: 1px solid rgba(249, 115, 22, .22);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(9, 14, 23, .88), rgba(15, 22, 34, .74));
  box-shadow: 0 24px 90px rgba(0,0,0,.36), 0 0 42px rgba(249, 115, 22, .08);
}
.demo-hero h1 {
  font-size: clamp(38px, 6vw, 74px);
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}
.demo-hero-actions {
  justify-content: center;
  margin-top: 24px;
}
.demo-hero-actions .btn-primary {
  min-width: 220px;
  min-height: 50px;
  border-radius: 8px;
  font-weight: 900;
  box-shadow: 0 14px 42px rgba(249, 115, 22, .28);
}
.demo-runner {
  width: min(100%, 1040px);
  padding: 0;
}
.demo-qcard {
  width: 100%;
  padding: clamp(28px, 4vw, 42px);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(8, 13, 22, .94), rgba(12, 18, 29, .9));
  border: 1px solid rgba(148, 163, 184, .25);
  box-shadow: 0 26px 90px rgba(0,0,0,.38), 0 0 0 1px rgba(249, 115, 22, .08), 0 0 44px rgba(249, 115, 22, .08);
}
.demo-progress-head {
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(148, 163, 184, .16);
}
.demo-progress-head .demo-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0;
  text-transform: none;
  font-size: clamp(13px, 1.6vw, 16px);
}
.demo-progress-head h1 {
  font-size: clamp(32px, 4.2vw, 48px);
  line-height: 1;
}
.demo-timer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 104px;
  min-height: 40px;
  border-radius: 999px;
}
.demo-question-meta {
  margin-top: 2px;
  color: #C4CCE0;
  text-transform: none;
  letter-spacing: 0;
  font-size: clamp(14px, 1.7vw, 18px);
}
.demo-question-meta span + span::before {
  content: "\00b7";
  margin-right: 10px;
  color: rgba(196, 204, 224, .7);
}
.demo-qcard h2 {
  padding-top: 14px;
  font-size: clamp(22px, 2.5vw, 31px);
  line-height: 1.5;
  font-weight: 500;
  max-width: 980px;
}
.demo-answer-list {
  gap: 12px;
}
.demo-choice.answer-card {
  width: 100%;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  min-height: 58px;
  padding: 13px 18px;
  border-radius: 9px;
  background: rgba(13, 19, 30, .82);
  border: 1px solid rgba(148, 163, 184, .24);
  color: var(--text);
  box-shadow: inset 0 0 20px rgba(255,255,255,.018);
}
.demo-choice.answer-card:hover:not(:disabled),
.demo-choice.answer-card.selected {
  border-color: rgba(249, 115, 22, .72);
  background: rgba(249, 115, 22, .08);
  box-shadow: 0 0 0 1px rgba(249, 115, 22, .18), 0 10px 26px rgba(0,0,0,.22);
}
.demo-choice .answer-letter {
  font-size: 20px;
}
.demo-choice.correct-answer {
  border-color: rgba(34, 197, 94, .78);
  background: rgba(34, 197, 94, .12);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, .18);
}
.demo-choice.incorrect-answer {
  border-color: rgba(239, 68, 68, .78);
  background: rgba(239, 68, 68, .12);
  box-shadow: 0 0 0 1px rgba(239, 68, 68, .18);
}
.demo-final {
  width: min(100%, 980px);
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
}
.demo-final-head {
  width: min(100%, 760px);
}
.demo-final-head > .bi {
  color: var(--accent);
  font-size: 34px;
  margin-bottom: 10px;
}
.demo-final-head h1 {
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.08;
}
.demo-final-head p {
  font-size: clamp(18px, 2.4vw, 27px);
}
.demo-final-cta {
  position: static;
  width: min(100%, 660px);
  padding: clamp(22px, 4vw, 34px);
  border-radius: 16px;
  border-color: rgba(249, 115, 22, .72);
  background: linear-gradient(145deg, rgba(7, 12, 20, .92), rgba(14, 21, 32, .9));
  box-shadow: 0 28px 90px rgba(0,0,0,.45), 0 0 36px rgba(249, 115, 22, .2);
}
.demo-teaser-stats {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.demo-teaser-stats .metric {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  min-height: 58px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(148, 163, 184, .16);
}
.demo-teaser-stats .metric span {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  color: var(--text);
  font-size: clamp(16px, 2vw, 22px);
  font-weight: 700;
  text-align: left;
}
.demo-teaser-stats .metric i {
  color: var(--accent);
  font-size: 25px;
}
.demo-teaser-stats .metric strong {
  min-width: 0;
  color: var(--accent);
  font-size: clamp(22px, 3vw, 34px);
  overflow-wrap: anywhere;
  text-align: right;
}
.demo-final-actions {
  display: grid;
  grid-template-columns: 1fr;
  margin-top: 24px;
}
.demo-soft-registration {
  display: grid;
  gap: 14px;
}
.demo-soft-registration h2 {
  font-size: clamp(24px, 3vw, 36px);
}
.demo-soft-form {
  display: grid;
  gap: 12px;
  text-align: left;
}
.demo-soft-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}
.demo-soft-form input {
  width: 100%;
  min-height: 50px;
  border: 1px solid rgba(148, 163, 184, .24);
  border-radius: 8px;
  background: rgba(15, 21, 31, .88);
  color: var(--text);
  padding: 11px 12px;
  font: inherit;
}
.demo-soft-form input:focus {
  outline: 2px solid rgba(249, 115, 22, .44);
  border-color: rgba(249, 115, 22, .72);
}
.demo-final-actions .btn-primary,
.demo-final-actions .btn {
  width: 100%;
  min-height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  font-size: clamp(17px, 2vw, 24px);
  font-weight: 900;
}
.demo-final-actions .btn {
  background: rgba(15, 21, 31, .82);
  border: 1px solid rgba(148, 163, 184, .24);
}
.demo-final-actions button.btn-primary {
  border: 0;
  cursor: pointer;
}
.demo-final-actions button.btn-primary:disabled {
  cursor: wait;
  opacity: .78;
}
.demo-checkout-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.demo-locked-report {
  width: min(100%, 860px);
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-top: 8px;
  padding: 22px 26px;
  border: 1px solid rgba(148, 163, 184, .17);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(10, 16, 25, .82), rgba(12, 18, 28, .74));
  box-shadow: 0 20px 70px rgba(0,0,0,.32);
  user-select: none;
  -webkit-user-select: none;
}
.demo-locked-report *,
.locked-content,
.locked-content *,
.locked-content-card,
.locked-content-card * {
  user-select: none;
  -webkit-user-select: none;
}
.locked-content a,
.locked-content button,
.locked-content-card a,
.locked-content-card button {
  user-select: auto;
  -webkit-user-select: auto;
}
.demo-locked-report article {
  min-height: 92px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border: 0;
  border-bottom: 1px solid rgba(148, 163, 184, .13);
  background: transparent;
}
.demo-locked-report article:last-child {
  border-bottom: 0;
}
.demo-locked-report article::after {
  content: none;
}
.demo-locked-report article > div {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  column-gap: 18px;
  align-items: center;
  text-align: left;
}
.demo-locked-report article > div > i {
  grid-row: 1 / 3;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--accent);
  background: rgba(249, 115, 22, .1);
  border: 1px solid rgba(249, 115, 22, .12);
  font-size: 24px;
}
.demo-locked-report article > .bi-lock {
  color: var(--text);
  font-size: 20px;
  opacity: .92;
}
.demo-locked-report strong {
  font-size: clamp(17px, 2vw, 23px);
  color: var(--text);
}
.demo-locked-report span {
  margin-top: 5px;
  color: #AEB8CA;
  filter: blur(3px);
  opacity: .72;
  overflow-wrap: anywhere;
}
.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 8px;
  color: #22c55e;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}
.demo-footer {
  position: relative;
  z-index: 1;
  width: min(100% - 32px, 860px);
  padding: 18px 0 28px;
  gap: 16px;
  color: rgba(248, 250, 252, .9);
}
.demo-footer a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
.demo-footer span {
  color: rgba(148, 163, 184, .45);
}
.demo-state-active .demo-footer {
  display: none;
}
[data-demo-screen] {
  width: 100%;
}
[data-demo-section] {
  display: none !important;
}
.demo-state-start [data-demo-section="landing"] {
  display: grid !important;
}
.demo-state-active [data-demo-section="question"] {
  display: grid !important;
}
.demo-state-complete [data-demo-section="final"] {
  display: grid !important;
}
[data-demo-screen].is-visible {
  animation: demoStepIn .24s ease both;
}
@keyframes demoStepIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.demo-state-active .demo-funnel {
  display: grid;
  align-items: center;
}
.demo-state-active .demo-runner {
  min-height: min(720px, calc(100vh - 132px));
  display: grid;
  align-items: center;
}
.demo-progress-head {
  grid-template-columns: minmax(0, 1fr) auto auto;
}
.demo-speed-stats {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.demo-speed-stats span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(15, 21, 31, .72);
  border: 1px solid rgba(148, 163, 184, .16);
  color: #C4CCE0;
  font-size: 12px;
  font-weight: 800;
}
.demo-speed-stats strong {
  font-size: 14px;
}
.demo-count-correct strong {
  color: var(--success);
}
.demo-count-incorrect strong {
  color: var(--danger);
}
.demo-count-answered strong {
  color: var(--accent);
}
.demo-final {
  width: min(100%, 1060px);
  grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
  gap: 22px;
  align-items: start;
}
.demo-final-head {
  grid-column: 1 / -1;
}
.demo-final .demo-locked-report {
  grid-column: 1;
  grid-row: 2;
  margin-top: 0;
}
.demo-final .demo-final-cta {
  grid-column: 2;
  grid-row: 2;
  align-self: start;
}
@media (min-width: 901px) {
  .demo-final {
    width: min(100%, 1180px);
    grid-template-columns: minmax(0, 1fr) minmax(560px, 660px);
  }
  .demo-teaser-stats .metric {
    grid-template-columns: minmax(220px, 1fr) minmax(230px, auto);
  }
  .demo-teaser-stats .metric span,
  .demo-teaser-stats .metric strong {
    white-space: nowrap;
  }
}
@media (max-width: 900px) {
  .demo-funnel-body::after {
    top: 86px;
  }
  .demo-minimal-header {
    width: min(100% - 28px, 760px);
    min-height: 86px;
  }
  .demo-funnel {
    width: min(100% - 28px, 760px);
    padding-top: 18px;
  }
  .demo-qcard {
    padding: 22px;
  }
  .demo-progress-head {
    grid-template-columns: 1fr;
  }
  .demo-speed-stats {
    justify-content: flex-start;
  }
  .demo-timer {
    width: fit-content;
  }
  .demo-qcard h2 {
    font-size: clamp(20px, 5vw, 27px);
  }
  .demo-final {
    grid-template-columns: 1fr;
  }
  .demo-final-head,
  .demo-final .demo-final-cta,
  .demo-final .demo-locked-report {
    grid-column: 1;
  }
  .demo-final .demo-final-cta {
    grid-row: 2;
  }
  .demo-final .demo-locked-report {
    grid-row: 3;
  }
}
@media (max-width: 620px) {
  .demo-funnel-body::before {
    inset: 76px 0 0;
  }
  .demo-funnel-body::after {
    top: 76px;
  }
  .demo-minimal-header {
    width: min(100% - 24px, 430px);
    min-height: 76px;
    padding: 12px 0;
  }
  .demo-brand img {
    width: min(188px, 58vw);
  }
  .demo-minimal-header .btn {
    min-height: 38px;
    padding: 8px 11px;
    font-size: 14px;
  }
  .demo-funnel {
    width: min(100% - 24px, 430px);
    padding: 14px 0 20px;
  }
  .demo-hero {
    min-height: calc(100vh - 176px);
  }
  .demo-hero-panel {
    padding: 22px 16px;
  }
  .demo-hero h1,
  .demo-final-head h1 {
    font-size: clamp(34px, 10.5vw, 48px);
  }
  .demo-qcard {
    padding: 18px 14px;
    border-radius: 12px;
  }
  .demo-progress-head h1 {
    font-size: clamp(28px, 8vw, 36px);
  }
  .demo-timer {
    width: 100%;
  }
  .demo-speed-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 6px;
  }
  .demo-speed-stats span {
    justify-content: center;
    min-width: 0;
    padding: 6px 5px;
    font-size: 11px;
  }
  .demo-choice.answer-card {
    grid-template-columns: 34px minmax(0, 1fr);
    min-height: 62px;
    gap: 10px;
    padding: 12px;
  }
  .demo-choice .answer-letter {
    font-size: 18px;
  }
  .demo-final-head p {
    font-size: 18px;
  }
  .demo-final-cta {
    padding: 18px 14px;
    border-radius: 14px;
  }
  .demo-teaser-stats .metric {
    grid-template-columns: 1fr;
    gap: 5px;
    text-align: left;
  }
  .demo-teaser-stats .metric strong {
    text-align: left;
    padding-left: 42px;
  }
  .demo-locked-report {
    padding: 14px;
  }
  .demo-locked-report article {
    grid-template-columns: minmax(0, 1fr) 28px;
  }
  .demo-locked-report article > div {
    grid-template-columns: 44px minmax(0, 1fr);
    column-gap: 12px;
  }
  .demo-locked-report article > div > i {
    width: 44px;
    height: 44px;
    font-size: 20px;
  }
  .demo-footer {
    width: min(100% - 24px, 430px);
    gap: 10px;
    font-size: 13px;
  }
  .demo-footer span {
    display: none;
  }
}
