/* =============================================================
   The Mirror Diagnostic — /mirror
   Builds on common.css tokens. Centered single-question app.
   ============================================================= */

.mirror-body {
  min-height: 100vh;
  background:
    radial-gradient(120% 80% at 50% -10%, var(--c-paper-warm) 0%, var(--c-paper) 55%);
}

/* --- Minimal header (brand only, no nav) ---------------------- */
.mirror-header {
  position: fixed;
  top: 0; left: 0; width: 100%;
  height: var(--header-h);
  display: flex; align-items: center;
  z-index: 60;
  pointer-events: none;
}
.mirror-header .container { pointer-events: auto; display: flex; }

/* --- Progress ------------------------------------------------- */
.mirror-progress {
  position: fixed;
  top: var(--header-h); left: 0; width: 100%;
  z-index: 55;
  padding: 10px var(--pad-x) 0;
}
.mirror-progress .track {
  position: relative;
  height: 3px;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  background: var(--c-line);
  border-radius: var(--r-pill);
  overflow: hidden;
}
.mirror-progress .fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: linear-gradient(90deg, var(--c-accent), #e84a64);
  border-radius: var(--r-pill);
  transition: width 0.5s var(--ease-out);
}
.mirror-progress .count {
  display: block;
  max-width: 640px;
  margin: 8px auto 0;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-muted);
}

/* --- App shell ------------------------------------------------ */
.mirror-main {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: calc(var(--header-h) + 56px) var(--pad-x) 72px;
}
/* margin-block:auto centers short screens but lets tall ones scroll
   from the top instead of clipping under the fixed progress bar. */
.mirror-app { width: 100%; max-width: 640px; margin-block: auto; }

.screen { position: relative; }

/* --- Question type -------------------------------------------- */
.q-title {
  font-size: clamp(28px, 5vw, 46px);
  line-height: 1.02;
  margin-bottom: 12px;
}
.q-title-sm { font-size: clamp(22px, 3.6vw, 32px); margin-top: 40px; }
.q-sub {
  font-size: clamp(17px, 2.3vw, 20px);
  color: var(--c-muted);
  margin-bottom: 24px;
}
.intro .eyebrow, .section-screen .eyebrow, .result .eyebrow { margin-bottom: 18px; }
.lede {
  font-size: clamp(16px, 2.1vw, 19px);
  line-height: 1.6;
  color: rgba(14,14,16,0.72);
  max-width: 52ch;
  margin: 0 0 32px;
}
.footnote { margin-top: 18px; font-size: 13px; color: var(--c-muted); }
.btn-lg { padding: 16px 20px 16px 26px; font-size: 15px; }

/* --- Options -------------------------------------------------- */
.opts { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.opt {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  text-align: left;
  width: 100%;
  padding: 16px 18px;
  border-radius: var(--r-md);
  background: #fff;
  border: 1px solid var(--c-line);
  box-shadow: var(--shadow-1);
  font-size: 15.5px;
  line-height: 1.4;
  transition: border-color var(--t-fast) var(--ease-out),
              transform var(--t-fast) var(--ease-out),
              background var(--t-fast) var(--ease-out);
}
.opt:hover { border-color: rgba(178,30,53,0.4); transform: translateY(-1px); }
.opt-dot {
  flex: 0 0 auto;
  width: 20px; height: 20px;
  margin-top: 1px;
  border-radius: 50%;
  border: 2px solid var(--c-line);
  position: relative;
  transition: border-color var(--t-fast) var(--ease-out);
}
.opt.is-selected { border-color: var(--c-accent); background: #fff; }
.opt.is-selected .opt-dot { border-color: var(--c-accent); }
.opt.is-selected .opt-dot::after {
  content: "";
  position: absolute; inset: 3px;
  border-radius: 50%;
  background: var(--c-accent);
}

/* --- Fields --------------------------------------------------- */
.field { margin-top: 8px; }
.lbl {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--c-muted);
  margin-bottom: 8px;
}
.input {
  width: 100%;
  padding: 15px 16px;
  border-radius: var(--r-sm);
  border: 1px solid var(--c-line);
  background: #fff;
  font: inherit;
  font-size: 16px;
  color: var(--c-ink);
  box-shadow: var(--shadow-1);
  transition: border-color var(--t-fast) var(--ease-out);
}
.input:focus { outline: none; border-color: var(--c-accent); }
.textarea { resize: vertical; line-height: 1.5; }
.other-field { margin-top: 10px; }

.consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 22px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--c-muted);
}
.consent input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--c-accent); flex: 0 0 auto; }

.err { margin-top: 14px; color: var(--c-accent-2); font-size: 14px; font-weight: 500; }

/* --- Nav row -------------------------------------------------- */
.q-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 28px;
}
.q-nav-right { display: inline-flex; align-items: center; gap: 14px; }
.q-back, .q-skip {
  font-size: 14px;
  color: var(--c-muted);
  padding: 8px 4px;
  transition: color var(--t-fast) var(--ease-out);
}
.q-back:hover, .q-skip:hover { color: var(--c-ink); }

/* --- Loading -------------------------------------------------- */
.loading-screen { text-align: center; padding: 60px 0; }
.spinner {
  width: 34px; height: 34px;
  margin: 0 auto 22px;
  border-radius: 50%;
  border: 3px solid var(--c-line);
  border-top-color: var(--c-accent);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Result --------------------------------------------------- */
.result .q-title { margin-bottom: 28px; }

.bars {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  padding: 22px 24px;
  margin-bottom: 26px;
}
.bars-title {
  font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--c-muted); margin-bottom: 16px;
}
.bar-row { margin-bottom: 14px; }
.bar-row:last-child { margin-bottom: 0; }
.bar-head {
  display: flex; justify-content: space-between;
  font-size: 14px; margin-bottom: 6px;
}
.bar-row.is-main .bar-head { font-weight: 600; }
.bar-track {
  height: 8px; border-radius: var(--r-pill);
  background: var(--c-paper-deep); overflow: hidden;
}
.bar-fill {
  display: block; height: 100%; width: var(--w);
  border-radius: var(--r-pill);
  background: rgba(14,14,16,0.18);
  animation: grow 0.9s var(--ease-out) both;
}
.bar-row.is-main .bar-fill { background: linear-gradient(90deg, var(--c-accent), #e84a64); }
@keyframes grow { from { width: 0; } }

.profile-card {
  background: var(--c-ink);
  color: var(--c-paper);
  border-radius: var(--r-lg);
  padding: clamp(26px, 4vw, 40px);
  box-shadow: var(--shadow-2);
  margin-bottom: 26px;
}
.pc-name {
  font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--c-accent); margin-bottom: 14px; font-weight: 600;
}
.pc-liner {
  font-size: clamp(22px, 3.4vw, 30px);
  line-height: 1.08;
  margin-bottom: 18px;
  color: #fff;
}
.pc-body { color: rgba(250,247,242,0.82); line-height: 1.6; margin-bottom: 26px; }
.pc-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 22px;
}
.pc-block {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--r-md);
  padding: 18px;
}
.pc-step { background: rgba(178,30,53,0.16); border-color: rgba(178,30,53,0.35); }
.pc-k {
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(250,247,242,0.6); margin-bottom: 8px; font-weight: 600;
}
.pc-block p:last-child, .pc-secondary p:last-child { color: rgba(250,247,242,0.9); line-height: 1.55; }
.pc-secondary {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
}

.first-video {
  background: var(--c-paper-warm);
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  padding: clamp(22px, 3.4vw, 32px);
  margin-bottom: 26px;
}
.fv-label { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--c-muted); margin-bottom: 10px; }
.fv-quote {
  margin: 0 0 16px;
  font-family: var(--f-display);
  font-size: clamp(19px, 2.8vw, 24px);
  line-height: 1.25;
  color: var(--c-ink);
  border-left: 3px solid var(--c-accent);
  padding-left: 16px;
}
.fv-after { color: var(--c-ink); }

.cta {
  text-align: center;
  padding: 34px 20px;
  border: 1px dashed var(--c-line);
  border-radius: var(--r-lg);
  margin-bottom: 24px;
}
.cta h2 { font-size: clamp(24px, 3.6vw, 32px); margin-bottom: 12px; }
.cta p { max-width: 46ch; margin: 0 auto 22px; color: rgba(14,14,16,0.72); line-height: 1.6; }

.closing {
  text-align: center;
  font-family: var(--f-display);
  font-size: clamp(18px, 2.6vw, 22px);
  font-style: italic;
  color: var(--c-ink);
  margin-top: 10px;
}
.signature { text-align: center; color: var(--c-muted); margin-top: 8px; font-size: 14px; }

/* --- Reveal (entrance) ---------------------------------------- */
.reveal-in {
  opacity: 0;
  transform: translateY(14px);
  animation: revealIn 0.6s var(--ease-out) forwards;
}
.reveal-in:nth-child(2) { animation-delay: 0.05s; }
.reveal-in:nth-child(3) { animation-delay: 0.1s; }
.reveal-in:nth-child(4) { animation-delay: 0.15s; }
.reveal-in:nth-child(5) { animation-delay: 0.2s; }
@keyframes revealIn { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .reveal-in { animation: none; opacity: 1; transform: none; }
  .bar-fill { animation: none; }
}

/* --- Responsive ----------------------------------------------- */
@media (max-width: 560px) {
  .pc-split { grid-template-columns: 1fr; }
  .mirror-main { padding-top: calc(var(--header-h) + 36px); }
}
