/* Codify -- v2 interview. Layers on top of style.css (same tokens); only the
   interview-specific pieces live here. */

.tagline em { font-style: italic; color: var(--accent); }

/* --- phase stepper --------------------------------------------------------- */
.stepper {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 0;
  margin: 8px 0 20px;
}
.stepper li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--ink-dim);
  font-size: 0.95rem;
}
.stepper li small {
  font-size: 0.78rem;
  color: var(--ink-dim);
  opacity: 0.8;
}
.stepper .dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--rule);
  display: inline-block;
  flex: 0 0 auto;
  transform: translateY(1px);
}
.stepper li.current { color: var(--ink); font-weight: 700; }
.stepper li.current .dot { background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.stepper li[data-phase="result"].current .dot { background: var(--answer); }

/* --- the one question ------------------------------------------------------ */
.question-card { border-left: 4px solid var(--accent); }

.q-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.q-count {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-dim);
  white-space: nowrap;
}
.q-instruct {
  font-size: 0.85rem;
  color: var(--ink-dim);
  margin: -4px 0 14px;
}

@keyframes q-flash {
  from { background: color-mix(in srgb, var(--accent) 12%, var(--bg-raised)); }
  to { background: var(--bg-raised); }
}
@media (prefers-reduced-motion: no-preference) {
  .question-card.flash { animation: q-flash 0.5s ease-out; }
}

.phase-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 3px;
  margin-bottom: 12px;
  background: var(--muted-bg);
  color: var(--ink-dim);
}
.phase-badge.phase-inclusion { background: var(--answer-bg); color: var(--answer); }
.phase-badge.phase-exclusion { background: var(--stop-bg); color: var(--stop); }
.phase-badge.phase-discretion { background: var(--discretion-bg); color: var(--discretion); }

.question-text {
  font-size: 1.4rem;
  line-height: 1.35;
  margin: 0 0 12px;
  text-wrap: balance;
}

.because-label {
  font-size: 0.82rem;
  color: var(--ink-dim);
  margin-bottom: 4px;
}
.statute-words {
  font-family: var(--mono);
  font-size: 0.9rem;
  background: var(--muted-bg);
  border-left: 3px solid var(--rule);
  margin: 0 0 18px;
  padding: 10px 14px;
  color: var(--ink);
}
.statute-words cite {
  display: block;
  margin-top: 6px;
  font-style: normal;
  color: var(--ink-dim);
  font-size: 0.82rem;
}

/* --- answer controls ------------------------------------------------------- */
.answer-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.choice {
  font-family: var(--serif);
  font-size: 1.02rem;
  padding: 10px 22px;
  border: 1px solid var(--accent);
  background: var(--bg-raised);
  color: var(--accent);
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.choice:hover { background: var(--accent); color: var(--accent-ink); }
.choice.dunno { border-color: var(--rule); color: var(--ink-dim); }
.choice.dunno:hover { background: var(--muted-bg); color: var(--ink); }
.num-input {
  font-family: var(--mono);
  font-size: 1rem;
  padding: 9px 12px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--bg-raised);
  color: var(--ink);
  min-width: 220px;
}

.q-foot {
  margin-top: 16px;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

/* --- trail ----------------------------------------------------------------- */
.trail-card { background: var(--muted-bg); }
.trail { list-style: none; padding: 0; margin: 0; }
.trail li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--rule);
}
.trail li:last-child { border-bottom: none; }
.trail-q { flex: 1 1 auto; color: var(--ink-dim); }
.trail-a { flex: 0 0 auto; color: var(--ink); }
.trail-edit { flex: 0 0 auto; font-size: 0.82rem; }

/* --- result banners (reuse style.css .banner; add the "out" variant) ------- */
.banner.out {
  background: var(--stop-bg);
  border: 1px solid color-mix(in srgb, var(--stop) 40%, transparent);
}
.banner.out h3 { color: var(--stop); }

.needs { outline: 2px solid var(--stop); }

/* hidden must beat class display rules (e.g. .stepper{display:flex}) */
[hidden] { display: none !important; }
/* long stop-kind tokens in a result heading must wrap, not overflow */
.banner h3 { overflow-wrap: anywhere; }

/* --- validity / within-authority view -------------------------------------- */
.authority-card { border-left: 4px solid var(--undefined); }
.phase-badge.phase-authority { background: var(--undefined-bg); color: var(--undefined); }
.grant-list { margin: 6px 0 0; padding-left: 20px; }
.grant-list li { font-family: var(--mono); font-size: 0.9rem; padding: 2px 0; }
.determination { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--rule); }
.det-q { font-weight: 600; margin: 0 0 12px; }
.det-controls { display: flex; flex-wrap: wrap; gap: 10px; }
.det-controls .choice.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
#authority-result:not(:empty) { margin-top: 22px; }

@media (max-width: 560px) {
  .question-text { font-size: 1.2rem; }
  .num-input { min-width: 0; width: 100%; }
  .answer-controls .choice { flex: 1 1 auto; }
}
