/* quiz.css — Everything to do with the quiz-taking experience.
   - Homepage Q1 hero + benefits + manager teaser
   - Progress bar
   - Question card (.qcard) + answer rows + per-question timer chip
   - Quiz form actions, info panel, email-capture modal, code-input
   - Self-take results page (hero + tier + plan headline)
   - Per-card iframe rendering shell (active / submitted / coming-up states)
   - Quiz forms: email-capture page, code-entry page, flash messages
   Edit here when working on /quiz/{token}/*, /, or /results/{token}.
   Was: app.css lines 624–839, 1509–1621, 1700–1769, 1771–1842, 1876–2056.
   NOTE: print rules for the iframe shell live in print.css. */

/* ---------- Quiz hero (homepage Q1) ---------- */
.hero-panel{
  padding: 36px 32px;
  text-align: center;
}
.hero-title{
  font-size: 32px; font-weight: 500; letter-spacing:-.01em;
  margin: 0 0 10px; color: var(--text);
}
.hero-sub{
  margin: 0; color: var(--text-muted); font-size: 16px;
}

/* Benefit bullets directly under the hero title. Three short hooks that
   sell the value, not the task. Moved here from an inline <style> on
   home/question-one.blade.php so the mobile overrides in mobile.css
   can win the cascade. */
.hero-benefits{
  list-style: none; padding: 0; margin: 16px 0 0;
  display: flex; flex-wrap: wrap; gap: 10px 28px;
  justify-content: center;
  font-size: 17px; color: var(--text);
}
.hero-benefits li{
  display: inline-flex; align-items: center; gap: 8px;
  padding-left: 0;
}
.hero-benefits li::before{
  content: "✓";
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px;
  flex: 0 0 18px;
  border-radius: 50%;
  background: var(--accent); color: var(--accent-text);
  font-size: 12px; font-weight: 700; line-height: 1;
}
/* Bottom-right primary action inside the question card. */
.home-quiz-actions{
  display: flex; justify-content: flex-end;
  margin-top: 18px; padding-top: 14px;
  border-top: 1px solid var(--border);
}
.home-validation-msg{
  margin: 14px 0 0; padding: 10px 14px;
  border-radius: 8px;
  background: rgba(220, 38, 38, 0.12);
  border: 1px solid rgba(220, 38, 38, 0.45);
  color: #fca5a5;
  font-size: 14px;
}
.manager-teaser{
  margin-top: 24px;
  border: 1px solid var(--border, #2a3550);
}
.manager-teaser-title{ margin: 0 0 8px; font-size: 20px; }
.manager-teaser-sub  { margin: 0 0 14px; color: var(--text-muted, #c8cfe0); line-height: 1.5; }
.manager-teaser-cta  { margin: 0; }
.manager-teaser-cta .btn{ display: inline-block; }

/* ---------- Progress (line above the question card) ---------- */
.progress-line{
  display: flex; align-items: center; gap: 16px;
  color: var(--text-muted); font-size: 13px;
  margin: 0 0 18px;
}
.progress-bar{
  flex: 1;
  height: 6px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar > span{
  display: block; height: 100%;
  background: var(--accent);
  transition: width .3s ease;
}

/* ---------- Question card ---------- */
.qcard{ /* sits on top of .panel */ padding: 24px 26px; }
.qcard-head{
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 18px;
}
.qtitle{ flex: 1; margin: 0; font-size: 18px; font-weight: 500; line-height: 1.45; color: var(--text); }
.qtimer{
  display: inline-flex; flex-direction: column; align-items: flex-end; gap: 6px;
  color: var(--text-muted); font-size: 13px; min-width: 100px;
}
.qtimer-num{ font-size: 20px; font-weight: 500; color: var(--accent); line-height: 1; }
.qtimer-bar{
  display: block; width: 90px; height: 4px;
  background: var(--surface-2); border-radius: 999px; overflow: hidden;
}
.qtimer-bar > i{
  display: block; height: 100%; background: var(--accent);
  transition: width 1s linear;
}

/* ---------- Answer choices ---------- */
.answer-hint{ margin: 0 0 12px; color: var(--text-muted); font-size: 13px; }
.answers{ list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.answers li{
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color .15s, background .15s;
}
.answers li:hover{ border-color: var(--accent); }
.answers label{
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 14px; cursor: pointer;
  color: var(--text); font-size: 14px; line-height: 1.45;
}
.answers input[type="checkbox"], .answers input[type="radio"]{
  margin-top: 3px; accent-color: var(--accent);
  width: 16px; height: 16px;
}

/* ---------- Quiz form actions ---------- */
.quiz-form{ margin: 0; }
.quiz-actions{ display: flex; justify-content: flex-end; margin: 18px 0 8px; }

/* ---------- Info / "How this works" panel ---------- */
.info-panel{ padding: 18px 22px; }
.info-title{
  margin: 0 0 10px; font-size: 12px; font-weight: 500;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: .08em;
}
.info-list{ margin: 0; padding-left: 20px; color: var(--text); font-size: 14px; line-height: 1.6; }
.info-list li{ margin-bottom: 4px; }

.legal-note{ color: var(--text-muted); font-size: 12px; text-align: center; margin: 18px 0 0; }
.ai-quote{ color: var(--text-muted); font-size: 13px; font-style: italic; text-align: center; margin: 16px 0; }

/* ---------- Email-capture modal (after final submit) ----------
   Markup is <dialog class="email-modal" open>…</dialog>. Native <dialog>
   with the `open` attribute renders inline (no backdrop). We override
   here so it behaves like a proper modal regardless of open mode. */
dialog.email-modal:not([open]){ display: none !important; }
dialog.email-modal[open]{
  position: fixed;
  inset: 0;
  width: 100vw; height: 100vh;
  max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: rgba(0, 0, 0, .65);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  overflow-y: auto;
}
/* The two forms inside the dialog become the centered card. Only
   the visible form (one without [hidden]) renders as a card. */
.email-modal > form{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  max-width: 460px; width: min(460px, calc(100% - 48px));
  margin: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5), var(--shadow);
  display: flex; flex-direction: column; gap: 14px;
}
.email-modal > form[hidden]{ display: none; }
.email-modal h2{
  margin: 0 0 4px;
  font-size: 18px; font-weight: 500; color: var(--text);
  line-height: 1.4;
}
.email-modal label{
  display: flex; flex-direction: column; gap: 6px;
  color: var(--text-muted); font-size: 13px;
}
.email-modal input[type="email"],
.email-modal input[type="text"]{
  width: 100%; min-width: 0;
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 12px; font: inherit; font-size: 14px;
  box-sizing: border-box;
}
.email-modal input:focus{
  outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent);
}
.email-modal .btn{ align-self: flex-start; margin-top: 6px; }
.email-modal .btn.ghost{ margin-left: 8px; }
/* When showModal() is used, native ::backdrop kicks in too — keep it dark */
dialog.email-modal::backdrop{ background: rgba(0, 0, 0, .65); }
.code-input{
  width: 200px;
  letter-spacing: .4em; text-align: center;
  font-size: 22px; padding: 12px; min-width: 0;
  font-family: var(--tania-font-mono);
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px;
}
.modal-error{ color: var(--danger); font-size: 13px; margin-top: 8px; }

/* ---------- Results page (self-take) ---------- */
.hero-results{ padding: 28px; text-align: center; }
.hero-results .val{
  font-size: 64px; font-weight: 400; letter-spacing:-.02em;
  color: var(--accent); line-height: 1;
}
.hero-results .denom{ color: var(--text-muted); font-size: 22px; font-weight: 300; }
.tier{
  display: inline-block; margin-top: 14px;
  padding: 6px 14px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px;
  color: var(--text); font-size: 14px; font-weight: 500;
}
.desc{ color: var(--text-muted); margin-top: 10px; font-size: 14px; }
.radar-panel{ padding: 24px; text-align: center; }
.plan-headline{ margin: 0 0 12px; font-size: 18px; font-weight: 500; color: var(--text); }
.plan-section{ margin-top: 22px; }
.plan-section h4{ margin: 0 0 8px; font-size: 14px; font-weight: 500; color: var(--accent); }

/* =========================================================================
   Homepage / quiz visual lift — bring the quality up to the results page.
   Three moves ported from the results-page treatment:
     1. Left accent band on the "main act" panels (mirrors .cat-panel::before)
     2. Section-head pattern reused for the homepage
     3. Bigger, tighter type for the hero with a subtle gradient frame
   ========================================================================= */

/* Hero panel — the "Are you AI-NATIVE?" header on the homepage */
.hero-panel{
  position: relative;
  overflow: hidden;
  padding: 44px 36px 40px;
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hero-panel::before{
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--accent);
}
.hero-title{
  font-size: 38px; font-weight: 600;
  letter-spacing: -.015em; line-height: 1.1;
  margin: 0 0 12px;
}
.hero-sub{
  font-size: 17px; line-height: 1.5;
  color: var(--text-muted);
  max-width: 60ch; margin: 0 auto;
}

/* The "How this works" info panel — turn it into a structured callout
   matching the section-head + cat-panel rhythm of the results page. */
.info-panel{
  position: relative;
  padding: 18px 22px 18px 26px;
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.info-panel::before{
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--accent); opacity: .55;
}
.info-title{
  margin: 0 0 10px;
  font-size: 11px; text-transform: uppercase; letter-spacing: .12em;
  color: var(--text-muted); font-weight: 500;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}
.info-list{
  margin: 0; padding-left: 20px;
  color: var(--text); font-size: 14px; line-height: 1.65;
}
.info-list li{ margin-bottom: 4px; }
.info-list li::marker{ color: var(--accent); }

/* Question card — make it the main act, with the same left-band signature
   as the result-page cat-panels. */
.qcard{
  position: relative;
  overflow: hidden;
  padding: 28px 30px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: box-shadow .2s ease, transform .2s ease;
}
.qcard::before{
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--accent);
}
.qcard + .qcard{ margin-top: 16px; }
.qcard-head{
  border-bottom: 1px solid var(--border);
  padding-bottom: 14px;
  margin-bottom: 18px;
}
.qtitle{
  font-size: 20px; font-weight: 600; line-height: 1.4;
  letter-spacing: -.005em;
}
/* Stronger, more "designed" answer rows — match the rhythm of the
   results-page cat-panel list items. */
.answers li{
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.answers li:hover{
  border-color: var(--accent);
  background: var(--surface);
}
.answers label{
  padding: 14px 16px;
  font-size: 14.5px; line-height: 1.5;
}

/* Page-bar polish to match the results page */
.page-bar{
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.page-bar .brand{ font-size: 16px; }

/* =========================================================================
   Pass 2 — focal "moment" elements (kicker, labeled progress, timer chip)
   ========================================================================= */

/* Hero kicker — small uppercase label that anchors the hero typographically.
   Mirrors the .tier .chip pattern from the results page: uppercase + tracking
   + accent color, but laid above the title rather than below it. */
.hero-kicker{
  display: inline-block;
  margin: 0 0 14px;
  padding: 5px 12px;
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .12em;
  color: var(--accent);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.about-hero .hero-kicker{ margin-bottom: 18px; }

/* Labeled progress — adds an uppercase "Progress" eyebrow + a count chip to
   the right of the bar, matching the results-page identity-strip rhythm. */
.progress-line.labeled{
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 0 0 18px;
}
.progress-line.labeled .progress-lbl{
  font-size: 11px; text-transform: uppercase; letter-spacing: .1em;
  color: var(--text-muted); font-weight: 500;
}
.progress-line.labeled .progress-count{
  order: 3;
  font-size: 12px; font-weight: 500;
  color: var(--text); white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.progress-line.labeled .progress-bar{
  order: 2;
  height: 6px;
}

/* Timer chip — promote the per-question timer from a plain numeral to a
   proper countdown chip. Picks up the same accent-on-surface look as the
   tier chip. */
.qtimer{
  display: inline-flex; flex-direction: row; align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  min-width: 0;
}
.qtimer-num{
  font-size: 22px; font-weight: 700;
  color: var(--accent);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.qtimer-bar{
  display: block; width: 64px; height: 4px;
  background: var(--surface); border-radius: 999px; overflow: hidden;
}

/* ============================================================
 * Quiz iframe rendering (Feature 2 — per-card iframe model)
 * Each card's answer area is an iframe pointing to
 * /quiz/{tok}/card/{position}. The parent page never sees
 * the answer text — it lives only in the iframe document.
 * ============================================================ */
.quiz-stack { display: flex; flex-direction: column; gap: 18px; margin: 12px 0 28px; }
.qcard-iframe-shell {
  position: relative;
  margin-top: 10px;
  border-radius: 10px;
  overflow: hidden;
  background: transparent;
}
.qcard-iframe {
  display: block;
  width: 100%;
  min-height: 460px;
  height: 460px;
  border: 0;
  background: transparent;
  transition: height 200ms ease;
}
.qcard {
  border: 2px solid transparent;
  transition: border-color 250ms ease, box-shadow 250ms ease, opacity 250ms ease, transform 250ms ease;
}
.qcard.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 22%, transparent),
              0 12px 32px color-mix(in srgb, var(--accent) 18%, transparent);
}
.qcard.is-active::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 5px;
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--accent) 75%, #ffffff 25%),
    var(--accent));
  border-radius: 12px 0 0 12px;
}
.qcard.is-submitted {
  opacity: 0.62;
  filter: saturate(0.6);
}
.qcard.is-coming-up {
  opacity: 0.8;
}
.qcard.is-coming-up .qcard-iframe { min-height: 56px; height: 56px; }
.qcard.is-submitted .qcard-iframe { min-height: 56px; height: 56px; }
.qtimer.warning .qtimer-num { color: #f59e0b; }
.qtimer.low .qtimer-num { color: #dc2626; }
.qtimer.done .qtimer-num { color: #16a34a; font-size: 18px; }
.qtimer.warning .qtimer-bar > i { background: #f59e0b; }
.qtimer.low     .qtimer-bar > i { background: #dc2626; }
.qtimer.warning { border-color: rgba(245, 158, 11, .55); }
.qtimer.low     { border-color: rgba(220, 38, 38, .60); }
.qcard-banner {
  font-size: 14px; font-weight: 600; color: #b45309; min-height: 0;
  background: transparent; padding: 0; margin: 8px 0 0;
  opacity: 0; transition: opacity 200ms ease;
  text-align: center;
}
.qcard-banner.show {
  opacity: 1;
  background: #fffbeb; border: 1.5px solid #fde68a;
  padding: 8px 12px; border-radius: 8px;
}
@media (prefers-reduced-motion: reduce) {
  .qcard, .qcard-banner { transition: none; }
}

/* ============================================================
 * Quiz forms — email capture, code entry, etc.
 * Theme-variable driven so every scheme gets readable labels.
 * ============================================================ */
.quiz-form-panel{
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}
.quiz-form-panel.quiz-form-panel-narrow{ max-width: 480px; }
.quiz-form{ display:block; }
.quiz-form .form-intro{
  color: var(--text-muted);
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.55;
}
.quiz-form .field{
  display: block;
  margin: 0 0 16px;
}
.quiz-form .field-label{
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin: 0 0 6px;
  letter-spacing: 0.01em;
}
.quiz-form .field-required{
  color: #ff8a8a;
  margin-left: 2px;
}
.quiz-form .field-optional{
  color: var(--text-muted);
  font-weight: 400;
  font-size: 13px;
  margin-left: 4px;
}
.quiz-form .field-help{
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin: 6px 0 0;
  line-height: 1.5;
}
.quiz-form .field-help a{ color: var(--link); }
.quiz-form input[type="email"],
.quiz-form input[type="text"]{
  width: 100%;
  box-sizing: border-box;
  padding: 11px 13px;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  transition: border-color 120ms, box-shadow 120ms, background-color 120ms;
}
.quiz-form input[type="email"]::placeholder,
.quiz-form input[type="text"]::placeholder{
  color: var(--text-muted);
  opacity: 0.7;
}
.quiz-form input[type="email"]:hover,
.quiz-form input[type="text"]:hover{
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
}
.quiz-form input[type="email"]:focus,
.quiz-form input[type="text"]:focus{
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
  background: color-mix(in srgb, var(--bg) 55%, transparent);
}
.quiz-form .field-honeypot{
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.flash{
  padding: 11px 14px;
  border-radius: 8px;
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.45;
  border: 1px solid transparent;
}
.flash-error{
  background: color-mix(in srgb, #ff5a5a 14%, var(--surface));
  border-color: color-mix(in srgb, #ff5a5a 45%, var(--border));
  color: #ffd0d0;
}
.flash-status{
  background: color-mix(in srgb, #4ade80 12%, var(--surface));
  border-color: color-mix(in srgb, #4ade80 45%, var(--border));
  color: #c8f5d6;
}
.flash-note{
  background: color-mix(in srgb, #f1d27a 14%, var(--surface));
  border-color: color-mix(in srgb, #f1d27a 45%, var(--border));
  color: #ffe6a1;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
}
.flash-abandoned{
  background: color-mix(in srgb, #f59e0b 12%, var(--surface));
  border-color: color-mix(in srgb, #f59e0b 45%, var(--border));
  color: #ffe1a8;
  font-size: 15px;
  padding: 14px 18px;
}
.flash-abandoned strong{ color: #ffd770; }
.quiz-form .flash-note strong{ color: #ffd770; letter-spacing: 0.04em; }
.quiz-form .flash-note .code-display{
  font-size: 19px;
  letter-spacing: 6px;
  color: #fff3c2;
  margin-left: 4px;
}
.quiz-form .flash-note .small{
  display: block;
  font-family: inherit;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  letter-spacing: normal;
}
.quiz-form .btn-block{
  display: block;
  width: 100%;
  padding: 13px 16px;
  font-size: 15px;
  font-weight: 600;
}
.quiz-form .form-fineprint{
  font-size: 12px;
  color: var(--text-muted);
  margin: 14px 0 0;
  text-align: center;
  line-height: 1.55;
}
.quiz-form .form-fineprint a{ color: var(--link); }
.quiz-form .form-secondary{
  margin: 14px 0 0;
}
.quiz-form .form-secondary .btn{
  font-size: 13px;
  padding: 10px 14px;
}
.quiz-form .form-back{
  display: block;
  text-align: center;
  margin: 16px 0 0;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
}
.quiz-form .form-back:hover{ color: var(--accent); }
.quiz-form .code-input{
  text-align: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 26px;
  letter-spacing: 10px;
  padding: 14px 12px;
}
.quiz-form .form-heading{
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.01em;
}
.quiz-form .form-heading + .form-intro strong{
  color: var(--text);
  font-weight: 500;
}

/* =========================================================================
   About page — small additions on top of the shared .panel/.cat-panel rhythm.
   Lives here because /about reuses .hero-panel + .hero-kicker from quiz.css.
   ========================================================================= */
.about-hero{ padding: 48px 40px; text-align: left; }
.about-hero .hero-title{ font-size: 34px; max-width: 22ch; }
.about-lede{
  margin-top: 14px; max-width: 70ch;
  font-size: 17px; line-height: 1.65;
  color: var(--text);
}
.about-grid .cat-panel{ gap: 8px; }
.about-grid .cat-panel-head{ border-bottom: 0; padding-bottom: 0; }
.about-goals{ padding: 24px 28px; }
.about-goal-list{
  list-style: none;
  padding-left: 0;
  display: flex; flex-direction: column; gap: 14px;
  font-size: 15px; line-height: 1.6;
}
.about-goal-list li{
  position: relative;
  padding-left: 22px;
  color: var(--text);
}
.about-goal-list li::before{
  content: "›";
  position: absolute; left: 0; top: 0;
  color: var(--accent); font-weight: 600;
}
.about-goal-list strong{ color: var(--text); font-weight: 600; }
.about-goal-list a{ color: var(--link); }
