/* ============================================================
   ASSESSMENT FEATURE  ·  v4
   The six-question diagnostic engine's editorial numbered-list UI
   (screens s1-s6). Identity preserved: a numeral, a label, a rule —
   no icon tiles, no bordered cards. v4 lights the canvas through,
   warms the selected row, and gives the progress bar a living gleam.
   ============================================================ */
.q-screen { background: transparent; }

.q-progress {
  padding: 15px 24px 13px; position: sticky; top: var(--header-h); z-index: 10;
  background: linear-gradient(180deg, rgba(21,19,15,.96), rgba(21,19,15,.86));
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hairline);
  box-shadow: inset 0 -1px 0 rgba(247,242,230,0.03);
}
.q-progress-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 11px; }
.q-back { display: flex; align-items: center; gap: 5px; font-size: var(--fs-sm); color: var(--mist-dim); padding: 6px 0; transition: color .2s var(--ease-out); }
.q-back:hover { color: var(--gold-bright); }
.q-step { font-family: var(--ff-mono); font-size: 11px; font-weight: 500; color: var(--mist-dim); letter-spacing: .04em; }

.progress-track { height: 2px; background: var(--hairline-strong); overflow: hidden; border-radius: 999px; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-bright)); transition: width .5s var(--ease-out); position: relative; overflow: hidden; box-shadow: 0 0 10px rgba(221,184,104,.45); }

.q-body { flex: 1; padding: 34px 24px 18px; display: flex; flex-direction: column; overflow-y: auto; -webkit-overflow-scrolling: touch; }

.q-category { font-family: var(--ff-mono); font-size: var(--fs-2xs); letter-spacing: .12em; color: var(--gold-bright); font-weight: 700; text-transform: uppercase; margin-bottom: 12px; }
.q-title { font-family: var(--ff-display); font-size: clamp(22px, 5.6vw, 28px); font-weight: 800; color: var(--snow); line-height: 1.28; margin-bottom: 10px; letter-spacing: -0.01em; }

.q-insight {
  font-size: var(--fs-sm); color: var(--mist); margin-bottom: 30px; line-height: 1.65;
  padding-right: 14px; border-right: 1.5px solid var(--gold);
}
[dir="ltr"] .q-insight { padding-right: 0; padding-left: 14px; border-right: none; border-left: 1.5px solid var(--gold); }

.options-list { display: flex; flex-direction: column; counter-reset: opt; }

.opt {
  position: relative;
  display: flex; align-items: flex-start; gap: 16px; padding: 18px 12px; margin: 0 -12px;
  background: transparent;
  border: none; border-bottom: 1px solid var(--hairline);
  cursor: pointer; border-radius: var(--r-md);
  transition: background .25s var(--ease-out), box-shadow .25s var(--ease-out);
  text-align: right; width: calc(100% + 24px);
  -webkit-user-select: none; user-select: none;
}
.options-list .opt:first-child { border-top: 1px solid var(--hairline); }
.opt::before {
  counter-increment: opt;
  content: counter(opt, decimal-leading-zero);
  font-family: var(--ff-mono); font-size: 11.5px; font-weight: 600; letter-spacing: .02em;
  color: var(--mist-dim); flex-shrink: 0; padding-top: 3px; min-width: 22px;
  transition: color .25s var(--ease-out), text-shadow .25s var(--ease-out);
}
.opt.selected { background: var(--gold-soft); box-shadow: var(--edge-light), inset 0 0 0 1px rgba(196,154,74,.18); }
.opt.selected::before { color: var(--gold-bright); text-shadow: 0 0 10px rgba(221,184,104,.5); }
.opt.selected .opt-label { color: var(--snow); }
.opt.selected .opt-sub { color: var(--mist); }

.opt-content { flex: 1; }
.opt-label { font-size: var(--fs-base); font-weight: 600; color: var(--mist); line-height: 1.35; transition: color .25s var(--ease-out); }
.opt-sub { font-size: var(--fs-xs); color: var(--mist-dim); margin-top: 3px; line-height: 1.5; transition: color .25s var(--ease-out); }

.multi-badge {
  display: block; font-family: var(--ff-mono); font-size: var(--fs-2xs); letter-spacing: .08em;
  text-transform: uppercase; color: var(--rose); font-weight: 600; margin-bottom: 20px;
}

.sub-q { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--hairline); animation: screenIn .4s var(--ease-out) both; }
.sub-q-label { font-size: var(--fs-sm); font-weight: 700; color: var(--mist); margin-bottom: 14px; letter-spacing: .01em; }
.sub-opts { display: flex; flex-direction: column; counter-reset: subopt; }
.sub-opt {
  display: flex; align-items: baseline; gap: 10px; padding: 13px 12px; margin: 0 -12px;
  background: transparent; border: none; border-bottom: 1px solid var(--hairline); border-radius: var(--r-md);
  cursor: pointer; text-align: right; width: calc(100% + 24px); transition: background .25s var(--ease-out);
}
.sub-opts .sub-opt:first-child { border-top: 1px solid var(--hairline); }
.sub-opt::before {
  counter-increment: subopt; content: counter(subopt, lower-alpha) '.';
  font-family: var(--ff-mono); font-size: 11px; color: var(--mist-dim); flex-shrink: 0;
  transition: color .25s var(--ease-out);
}
.sub-opt.selected { background: var(--gold-soft); box-shadow: var(--edge-light), inset 0 0 0 1px rgba(196,154,74,.18); }
.sub-opt.selected::before { color: var(--gold-bright); }
.sub-opt.selected .sub-opt-text { color: var(--snow); }
.sub-opt-text { font-size: var(--fs-sm); color: var(--mist); font-weight: 500; }

.q-footer {
  padding: 16px 24px calc(20px + var(--sab)); position: sticky; bottom: 0; border-top: 1px solid var(--hairline);
  background: linear-gradient(0deg, rgba(21,19,15,.98), rgba(21,19,15,.80));
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}

.btn-next { padding: 16px 22px; font-size: var(--fs-base); opacity: .35; pointer-events: none; }
.btn-next.on { opacity: 1; pointer-events: auto; }
.btn-next-right { font-family: var(--ff-mono); font-size: 10.5px; color: rgba(21,19,15,.5); letter-spacing: .06em; font-weight: 500; }

.hidden { display: none !important; }
.gap-top { margin-top: 12px; }

/* gold tracing sweep on every progress fill — the one "alive" detail
   that ties Act I's screens together as one continuous process */
.progress-fill::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(247,242,230,.6), transparent);
  width: 40%; animation: connectorTrace 1.8s var(--ease-out) infinite;
}
@keyframes connectorTrace { 0%{transform:translateX(-120%);opacity:0;} 15%{opacity:1;} 85%{opacity:1;} 100%{transform:translateX(220%);opacity:0;} }
@media (prefers-reduced-motion: reduce) { .progress-fill::after { display: none; } }

/* ============================================================
   v4.2 — NUMBERED STEP RAIL (injected by steprail.js)
   The signature AI-instrument progress header: 01–06 gold nodes with
   a glowing active step and filled connectors behind it.
   ============================================================ */
.step-rail { display: flex; align-items: center; gap: 0; margin-bottom: 16px; padding: 2px 0; }
.step-node {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  font-family: var(--ff-mono); font-size: 10px; font-weight: 700; letter-spacing: .02em;
  border: 1px solid var(--hairline-strong); color: var(--mist-dim);
  background: var(--panel);
  transition: all .4s var(--ease-out);
}
.step-node.done { border-color: rgba(196,154,74,.5); color: var(--gold-bright); background: var(--gold-soft); }
.step-node.active {
  border-color: var(--gold); color: var(--obsidian);
  background: var(--grad-gold);
  box-shadow: var(--edge-light-strong), var(--glow-gold-md);
  transform: scale(1.12);
}
.step-connector { flex: 1; min-width: 6px; height: 1.5px; background: var(--hairline-strong); border-radius: 2px; }
.step-connector.filled { background: linear-gradient(90deg, var(--gold), var(--gold-bright)); box-shadow: 0 0 8px rgba(221,184,104,.5); }

/* with the rail present the legacy thin bar becomes a quiet sub-rule */
.q-progress.has-step-rail .progress-track { opacity: .5; }
