/* ============ Holy Quest — Build Your ORE (extends style.css) ============ */

/* Ensure the native [hidden] attribute always wins over any class-based
   `display` rule below (e.g. .ore-state / .wizard set display:flex). Without
   this, toggling `.hidden = true` in JS has no visible effect. */
[hidden] {
  display: none !important;
}

/* ---------- App-level states (loading / gate / view-only) ---------- */

.ore-state {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-6);
  background: var(--forest);
  color: var(--cream-text);
}

.ore-state .emblem {
  width: 88px;
  height: 88px;
  margin-bottom: var(--space-5);
}

.ore-state h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-xl);
  color: var(--white);
  margin-bottom: var(--space-3);
}

.ore-state p {
  color: var(--muted-on-dark);
  max-width: 36ch;
  margin-bottom: var(--space-2);
}

.ore-spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid var(--divider-dark);
  border-top-color: var(--gold);
  animation: ore-spin 900ms linear infinite;
  margin-bottom: var(--space-5);
}

@keyframes ore-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .ore-spinner { animation: none; }
}

.ore-state .kicker {
  color: var(--gold);
  font-weight: 700;
  font-size: var(--text-xs);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}

/* ---------- Rib cage list (Step 02) ---------- */

.rib-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.rib-row {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
}

.rib-num {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--gold);
  font-size: var(--text-base);
  flex-shrink: 0;
  width: 1.4em;
}

.rib-row input[type='text'] {
  flex: 1;
  border: none;
  border-bottom: 2px solid var(--gold-soft);
  background: transparent;
  padding: var(--space-2) var(--space-1);
  font-size: var(--text-base);
  color: var(--ink);
  transition: border-color var(--transition);
}

.rib-row input[type='text']:focus {
  border-bottom-color: var(--gold);
}

/* ---------- Fill-in-the-blank ORE statement (Step 02) ---------- */

.ore-statement-box {
  border: 2px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: var(--space-6) var(--space-5);
  margin-bottom: var(--space-5);
  background: color-mix(in srgb, var(--gold) 6%, var(--white));
}

.ore-statement-box .box-label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--space-4);
}

.fib-line {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  line-height: 2.2;
  color: var(--ink);
}

.fib-line input[type='text'] {
  display: inline-block;
  min-width: 9ch;
  width: auto;
  max-width: 100%;
  border: none;
  border-bottom: 2px solid var(--gold);
  background: transparent;
  font: inherit;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink);
  padding: 0 var(--space-1) 2px;
  margin: 0 var(--space-1);
  vertical-align: baseline;
}

.fib-line input[type='text']:focus {
  border-bottom-color: var(--forest);
}

/* ---------- Dark definition box (Step 02 "YOUR ORE") ---------- */

.dark-box {
  background: var(--forest);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-6);
}

.dark-box .box-label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--space-3);
}

.dark-box p {
  color: var(--cream-text);
  font-size: var(--text-sm);
  line-height: 1.6;
}

/* ---------- 2x2 card grid (Step 03 — Put It In Order) ---------- */

.order-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

@media (max-width: 560px) {
  .order-grid {
    grid-template-columns: 1fr;
  }
}

.order-card {
  border: 1px solid var(--divider-light);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  background: var(--white);
}

.step.dark .order-card {
  background: var(--forest-soft);
  border-color: var(--divider-dark);
}

.order-card .card-label {
  font-weight: 700;
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--space-2);
}

.order-card .card-desc {
  font-size: var(--text-xs);
  color: var(--muted);
  margin-bottom: var(--space-3);
  line-height: 1.45;
}

.step.dark .order-card .card-desc {
  color: var(--muted-on-dark);
}

.order-card input[type='text'] {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--gold-soft);
  background: transparent;
  padding: var(--space-2) 0;
  font-size: var(--text-sm);
  color: var(--ink);
  margin-bottom: var(--space-2);
}

.step.dark .order-card input[type='text'] {
  color: var(--cream-text);
  border-bottom-color: var(--muted-on-dark);
}

.order-card input[type='text']:focus {
  border-bottom-color: var(--gold);
}

/* ---------- Data table (Step 04 Organize the Man / Step 08 Use the Soil) ---------- */

.ore-table-wrap {
  overflow-x: auto;
  margin-bottom: var(--space-5);
  border-radius: var(--radius-md);
  border: 1px solid var(--divider-light);
}

.ore-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  background: var(--white);
}

.ore-table--single {
  min-width: 0;
}

.ore-table--single thead th:last-child { width: 1px; }

.ore-table thead th {
  background: var(--forest);
  color: var(--gold-soft);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;
  padding: var(--space-3);
  white-space: nowrap;
}

.ore-table tbody th {
  text-align: left;
  vertical-align: top;
  padding: var(--space-3);
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--forest);
  background: color-mix(in srgb, var(--gold) 7%, var(--white));
  white-space: nowrap;
  border-top: 1px solid var(--divider-light);
}

.ore-table tbody td {
  padding: var(--space-2) var(--space-3);
  border-top: 1px solid var(--divider-light);
  vertical-align: top;
  min-width: 140px;
}

.ore-table tbody td input[type='text'] {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--gold-soft);
  background: transparent;
  padding: var(--space-2) var(--space-1);
  font-size: var(--text-sm);
  color: var(--ink);
}

.ore-table tbody td input[type='text']:focus {
  border-bottom-color: var(--gold);
}

.ore-table-remove {
  background: transparent;
  border: none;
  color: var(--error);
  font-size: var(--text-xs);
  font-weight: 700;
  cursor: pointer;
  padding: var(--space-2);
  white-space: nowrap;
}

.ore-add-row {
  background: transparent;
  border: 1px dashed var(--gold-soft);
  border-radius: var(--radius-md);
  color: var(--gold);
  font-weight: 700;
  font-size: var(--text-sm);
  padding: var(--space-3);
  width: 100%;
  cursor: pointer;
  margin-bottom: var(--space-5);
  transition: border-color var(--transition), background var(--transition);
}

.ore-add-row:hover {
  border-color: var(--gold);
  background: color-mix(in srgb, var(--gold) 6%, transparent);
}

/* ---------- Stacked labeled cards (Step 05 Regulate / Step 07 Protect) ---------- */

.stack-card {
  border-left: 3px solid var(--gold);
  padding: var(--space-1) 0 var(--space-1) var(--space-4);
  margin-bottom: var(--space-5);
}

.stack-card .card-label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--gold);
  margin-bottom: var(--space-2);
}

.step.dark .stack-card .card-label {
  color: var(--gold-soft);
}

.stack-card .card-q {
  font-size: var(--text-sm);
  color: var(--cream-text);
  margin-bottom: var(--space-2);
  line-height: 1.45;
}

.step:not(.dark) .stack-card .card-q {
  color: var(--ink);
}

.stack-card input[type='text'] {
  width: 100%;
  border: none;
  border-bottom: 2px solid var(--muted-on-dark);
  background: transparent;
  padding: var(--space-2) var(--space-1);
  font-size: var(--text-base);
  color: var(--cream-text);
}

.step:not(.dark) .stack-card input[type='text'] {
  border-bottom-color: var(--gold-soft);
  color: var(--ink);
}

.stack-card input[type='text']:focus {
  border-bottom-color: var(--gold);
}

.stack-card .subfield-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-top: var(--space-2);
}

@media (max-width: 480px) {
  .stack-card .subfield-row {
    grid-template-columns: 1fr;
  }
}

.stack-card .subfield {
  display: flex;
  flex-direction: column;
}

.stack-card .subfield .sub-q {
  font-size: var(--text-xs);
  font-style: italic;
  color: var(--muted-on-dark);
  margin-bottom: var(--space-2);
}

.step:not(.dark) .stack-card .subfield .sub-q {
  color: var(--muted);
}

/* ---------- QUEST flow diagram (Step 06) ---------- */

.quest-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.quest-flow .flow-node {
  background: var(--forest);
  color: var(--gold-soft);
  font-weight: 700;
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: var(--space-3) var(--space-4);
  white-space: nowrap;
}

.quest-flow .flow-arrow {
  color: var(--gold);
  font-size: var(--text-base);
}

.quest-box {
  background: var(--forest);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-6);
}

.quest-box .box-label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-lg);
  color: var(--gold);
  margin-bottom: var(--space-3);
}

.quest-box .quest-line {
  color: var(--cream-text);
  font-size: var(--text-sm);
  line-height: 1.7;
}

.quest-box .quest-line strong {
  color: var(--gold-soft);
}

.review-q {
  margin-bottom: var(--space-5);
}

.review-q .q-label {
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--ink);
  margin-bottom: var(--space-2);
}

.review-q input[type='text'] {
  width: 100%;
  border: none;
  border-bottom: 2px solid var(--gold-soft);
  background: transparent;
  padding: var(--space-2) var(--space-1);
  font-size: var(--text-base);
  color: var(--ink);
}

.review-q input[type='text']:focus {
  border-bottom-color: var(--gold);
}

/* ---------- Blueprint editable assembly (Step 09) ---------- */

.blueprint-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.blueprint-tabs .tab {
  background: var(--forest-soft);
  color: var(--muted-on-dark);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: var(--space-2) var(--space-3);
  border-radius: 999px;
}

.blueprint-tabs .tab.active {
  background: var(--gold);
  color: var(--forest);
}

.bp-field {
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--divider-dark);
}

.step:not(.dark) .bp-field {
  border-bottom-color: var(--divider-light);
}

.bp-field .bp-label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--gold-soft);
  margin-bottom: var(--space-1);
}

.step:not(.dark) .bp-field .bp-label {
  color: var(--gold);
}

.bp-field .bp-q {
  font-size: var(--text-xs);
  font-style: italic;
  color: var(--muted-on-dark);
  margin-bottom: var(--space-2);
}

.step:not(.dark) .bp-field .bp-q {
  color: var(--muted);
}

.bp-field textarea {
  width: 100%;
  border: none;
  border-bottom: 2px solid var(--muted-on-dark);
  background: transparent;
  padding: var(--space-2) var(--space-1);
  font-size: var(--text-base);
  color: var(--cream-text);
  resize: none;
  line-height: 1.6;
}

.step:not(.dark) .bp-field textarea {
  border-bottom-color: var(--gold-soft);
  color: var(--ink);
}

.bp-field textarea:focus {
  border-bottom-color: var(--gold);
}

/* ---------- Final Blueprint display (view-only) ---------- */

.blueprint-display {
  background: var(--forest);
  color: var(--cream-text);
  min-height: 100dvh;
  padding: calc(var(--space-16) + var(--space-4)) var(--space-5) var(--space-24);
}

.blueprint-display .bp-header {
  text-align: center;
  margin-bottom: var(--space-10);
}

.blueprint-display .bp-header .emblem {
  width: 96px;
  height: 96px;
  margin: 0 auto var(--space-4);
}

.blueprint-display .bp-header .kicker {
  color: var(--gold);
  font-weight: 700;
  font-size: var(--text-xs);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}

.blueprint-display .bp-header h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-2xl);
  color: var(--white);
  line-height: 1.05;
}

.blueprint-display .bp-header .name-line {
  color: var(--gold-soft);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: var(--space-3);
}

.quote-card {
  background: var(--forest-soft);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  margin-bottom: var(--space-4);
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.quote-card .qc-label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--space-2);
}

.quote-card .qc-text {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-lg);
  line-height: 1.45;
  color: var(--white);
}

.quote-card .qc-text::before {
  content: '\201C';
  color: var(--gold);
}

.quote-card .qc-text::after {
  content: '\201D';
  color: var(--gold);
}

.blueprint-display .closing-poem {
  max-width: 480px;
  margin: var(--space-12) auto 0;
  text-align: center;
}

.blueprint-display .closing-poem p {
  color: var(--muted-on-dark);
  font-size: var(--text-sm);
  margin-bottom: var(--space-2);
  line-height: 1.7;
}

.blueprint-display .closing-poem .gold-line {
  color: var(--gold-soft);
  font-weight: 600;
}

.blueprint-display .closing-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-10);
}

.blueprint-display .version-tag {
  font-size: var(--text-xs);
  color: var(--muted-on-dark);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ore-savebar {
  position: fixed;
  bottom: var(--space-3);
  left: 50%;
  transform: translateX(-50%);
  background: var(--forest);
  color: var(--gold-soft);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: var(--space-2) var(--space-4);
  border-radius: 999px;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transition: opacity 260ms ease;
  pointer-events: none;
  z-index: 60;
}

.ore-savebar.visible {
  opacity: 1;
}

/* ---------- Journey indicator (used on Root Discovery success screen) ---------- */

.journey-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin: var(--space-6) 0;
  flex-wrap: wrap;
}

.journey-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  min-width: 84px;
}

.journey-step .j-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--text-sm);
  border: 2px solid var(--gold-soft);
  color: var(--gold-soft);
}

.journey-step.done .j-dot {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--forest);
}

.journey-step.current .j-dot {
  border-color: var(--gold);
  color: var(--gold);
}

.journey-step .j-label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-on-dark);
  text-align: center;
}

.journey-step.done .j-label,
.journey-step.current .j-label {
  color: var(--gold-soft);
}

.journey-connector {
  width: 28px;
  height: 2px;
  background: var(--divider-dark);
  flex-shrink: 0;
}

.journey-connector.done {
  background: var(--gold);
}

@media (max-width: 480px) {
  .journey-row {
    gap: var(--space-1);
  }

  .journey-step {
    min-width: 68px;
  }

  .journey-step .j-dot {
    width: 28px;
    height: 28px;
  }

  .journey-step .j-label {
    font-size: 10px;
  }

  .journey-connector {
    width: 14px;
  }
}

/* This page's wizard + blueprint content can run much taller than Root
   Discovery's screens, so the shared fixed .footer-mark (see style.css)
   would sit permanently over whatever content scrolls beneath it (e.g.
   "Start a New ORE", the closing poem). Scope it back into normal document
   flow here only — index.html / Root Discovery is untouched. */
.footer-mark.footer-mark--static {
  position: static;
  margin-top: var(--space-5);
  padding-bottom: var(--space-4);
}

/* .btn-ghost defaults to dark ink text (see style.css) and only flips to
   light text inside .step.dark. The blueprint display has its own dark
   forest background but isn't a .step.dark, so "Start a New ORE" rendered
   near-invisible dark-on-dark. Scope the same light-text treatment here. */
.blueprint-display .btn-ghost {
  color: var(--cream-text);
  border-color: var(--muted-on-dark);
}

/* ---------- Step 03 revision: "What Gets The Final Vote?" + dynamic Must Govern list ---------- */

.callout-text {
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--ink);
  margin-bottom: var(--space-3);
}

.step.dark .callout-text { color: var(--cream-text); }

.example-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.example-kicker {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.example-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--forest);
}

.chip-sep { color: var(--gold); }

.worked-example-box {
  border-left: 3px solid var(--gold);
  background: color-mix(in srgb, var(--gold) 5%, var(--white));
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-5);
}

.step.dark .worked-example-box {
  background: color-mix(in srgb, var(--gold) 8%, var(--forest-soft));
}

.worked-label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--space-3);
}

.worked-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.worked-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) 0;
}

.worked-row + .worked-row {
  border-top: 1px solid var(--divider-light);
}

.step.dark .worked-row + .worked-row { border-top-color: var(--divider-dark); }

@media (max-width: 640px) {
  .worked-row {
    grid-template-columns: 1fr;
    text-align: left;
    gap: var(--space-2);
  }
  .worked-arrow { justify-self: start; }
}

.worked-quote {
  font-size: var(--text-sm);
  font-style: italic;
  color: var(--muted);
  line-height: 1.5;
}

.step.dark .worked-quote { color: var(--muted-on-dark); }

.worked-quote-mark {
  font-family: var(--font-display);
  font-style: normal;
  font-size: 1.4em;
  font-weight: 700;
  color: var(--gold);
  margin-right: 2px;
  vertical-align: -0.05em;
}

.worked-arrow {
  color: var(--gold);
  font-size: var(--text-lg);
  justify-self: center;
}

.worked-result {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-base);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--forest);
  line-height: 1.45;
}

.worked-result-sep {
  color: var(--gold);
  font-weight: 400;
  margin: 0 var(--space-2);
}

.step.dark .worked-result { color: var(--gold-soft); }

.term-highlight {
  color: var(--forest);
  font-weight: 700;
}

.step.dark .term-highlight { color: var(--gold-soft); }

.order-card--govern { margin-bottom: var(--space-5); }

.govern-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.govern-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.govern-row input[type='text'] {
  flex: 1;
  min-width: 0;
  border: none;
  border-bottom: 1px solid var(--gold-soft);
  background: transparent;
  padding: var(--space-2) 0;
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink);
}

.step.dark .govern-row input[type='text'] {
  color: var(--cream-text);
  border-bottom-color: var(--muted-on-dark);
}

.govern-row input[type='text']:focus { border-bottom-color: var(--gold); }

.card-examples {
  font-size: var(--text-xs);
  font-style: italic;
  color: var(--muted);
  margin-bottom: var(--space-3);
  line-height: 1.5;
}

.step.dark .card-examples { color: var(--muted-on-dark); }

.order-card textarea {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--gold-soft);
  background: transparent;
  padding: var(--space-2) 0;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--ink);
  line-height: 1.5;
  resize: vertical;
}

.step.dark .order-card textarea {
  color: var(--cream-text);
  border-bottom-color: var(--muted-on-dark);
}

.order-card textarea:focus { border-bottom-color: var(--gold); }

.order-grid--three { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 760px) {
  .order-grid--three { grid-template-columns: 1fr; }
}

/* ---------- Step 04 revision: operating-zone cards + First System selector ---------- */

.zone-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.zone-pill {
  background: transparent;
  border: 1px solid var(--gold-soft);
  border-radius: 999px;
  color: var(--forest);
  font-weight: 600;
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
  padding: var(--space-2) var(--space-4);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.step.dark .zone-pill { color: var(--cream-text); border-color: var(--muted-on-dark); }

.zone-pill:hover { border-color: var(--gold); }

.zone-pill.active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--forest);
}

.zone-card {
  border: 1px solid var(--divider-light);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-5);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.step.dark .zone-card {
  background: var(--forest-soft);
  border-color: var(--divider-dark);
}

.zone-card.is-first {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold);
}

.zone-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.zone-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-lg);
  color: var(--forest);
}

.step.dark .zone-title { color: var(--cream-text); }

.zone-title .zone-role {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.zone-start-badge {
  display: none;
  background: var(--gold);
  color: var(--forest);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: var(--space-1) var(--space-3);
  border-radius: 999px;
  white-space: nowrap;
}

.zone-card.is-first .zone-start-badge { display: inline-block; }

.zone-question {
  font-size: var(--text-sm);
  font-style: italic;
  color: var(--muted);
  margin-bottom: var(--space-3);
  line-height: 1.5;
}

.step.dark .zone-question { color: var(--muted-on-dark); }

.zone-example {
  font-size: var(--text-xs);
  line-height: 1.6;
  color: var(--muted);
  background: color-mix(in srgb, var(--gold) 6%, transparent);
  border-radius: var(--radius-sm);
  padding: var(--space-3);
  margin-bottom: var(--space-4);
}

.step.dark .zone-example { color: var(--muted-on-dark); }

.zone-example-label {
  display: block;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--space-1);
  font-size: 0.7rem;
}

.zone-field { margin-bottom: var(--space-3); }
.zone-field:last-child { margin-bottom: 0; }

.zone-field label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--space-1);
}

.step.dark .zone-field label { color: var(--gold-soft); }

.zone-field input[type='text'] {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--gold-soft);
  background: transparent;
  padding: var(--space-2) 0;
  font-size: var(--text-sm);
  color: var(--ink);
}

.step.dark .zone-field input[type='text'] {
  color: var(--cream-text);
  border-bottom-color: var(--muted-on-dark);
}

.zone-field input[type='text']:focus { border-bottom-color: var(--gold); }

/* ============================================================
   PHASE STRUCTURE — Phase I / Phase II labeling + transition
   ============================================================ */

/* ---------- Small phase label above section-kicker (steps 1-5, 6-8) ---------- */

.phase-marker {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--space-2);
}

.step.dark .phase-marker {
  color: var(--muted-on-dark);
}

/* ---------- Orientation line (Steps 06 / 07 / 08 — Review & Refine) ---------- */

.orientation-line {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--gold);
  margin-bottom: var(--space-5);
}

.step.dark .orientation-line {
  color: var(--gold-soft);
}

/* ---------- Welcome-back intro block (Step 06 only) ---------- */

.welcome-back-box {
  border-left: 3px solid var(--gold);
  padding: var(--space-1) 0 var(--space-1) var(--space-4);
  margin-bottom: var(--space-6);
}

.step.dark .welcome-back-box {
  border-left-color: var(--gold-soft);
}

.wb-kicker {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--text-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--space-2);
}

.step.dark .wb-kicker {
  color: var(--gold-soft);
}

.wb-line {
  font-size: var(--text-sm);
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: var(--space-1);
}

.step.dark .wb-line {
  color: var(--muted-on-dark);
}

.wb-line:last-child {
  margin-bottom: 0;
}

/* ============================================================
   TRANSITION SCREEN — "Your ORE Is Ready to Be Tested"
   ============================================================ */

.transition-step {
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Must stay gated on .active — otherwise this unconditional display:flex
   would override the base .step{display:none} rule (same specificity,
   later in the cascade) and the transition screen would always render,
   invisibly intercepting clicks even when it isn't the current step. */
.step.transition-step.active {
  display: flex;
}

.transition-inner {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}

.transition-kicker-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin-bottom: var(--space-6);
}

.transition-kicker {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--text-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

.transition-kicker--muted {
  color: var(--muted-on-dark);
  font-weight: 600;
}

.transition-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-xl);
  color: var(--white);
  line-height: 1.15;
  margin-bottom: var(--space-5);
}

.transition-step .gold-divider {
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--space-6);
}

.transition-copy {
  font-size: var(--text-sm);
  color: var(--muted-on-dark);
  line-height: 1.6;
  margin-bottom: var(--space-4);
}

.transition-copy--emphasis {
  font-weight: 600;
  color: var(--cream-text);
}

.transition-word {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-xl);
  color: var(--gold-soft);
  margin-bottom: var(--space-6);
}

.transition-lines {
  margin-bottom: var(--space-6);
}

.transition-lines p {
  font-size: var(--text-sm);
  color: var(--muted-on-dark);
  line-height: 1.7;
  margin-bottom: var(--space-1);
}

.transition-lines p:last-child {
  margin-bottom: 0;
}

.review-preview {
  width: 100%;
  margin-bottom: var(--space-6);
}

.review-preview-label {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--text-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--space-4);
}

.review-preview-card {
  border-left: 3px solid var(--gold-soft);
  padding: var(--space-1) 0 var(--space-1) var(--space-4);
  margin-bottom: var(--space-4);
  text-align: left;
}

.review-preview-card:last-child {
  margin-bottom: 0;
}

.rp-num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--gold-soft);
  margin-bottom: var(--space-1);
}

.rp-desc {
  font-size: var(--text-sm);
  color: var(--muted-on-dark);
  line-height: 1.5;
}

.transition-mantra {
  margin-bottom: var(--space-8);
}

.transition-mantra p {
  font-size: var(--text-sm);
  color: var(--muted-on-dark);
  line-height: 1.7;
  margin-bottom: var(--space-1);
}

.transition-mantra .gold-line {
  color: var(--gold-soft);
  font-weight: 600;
}

.transition-nav {
  width: 100%;
}

.transition-btn {
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: var(--text-sm);
  white-space: nowrap;
  padding-left: var(--space-5);
  padding-right: var(--space-5);
}

.transition-support-text {
  font-size: var(--text-xs);
  color: var(--muted-on-dark);
  margin-top: var(--space-4);
  line-height: 1.5;
}

@media (max-width: 480px) {
  .transition-title {
    font-size: var(--text-lg);
  }
  .transition-word {
    font-size: var(--text-lg);
  }
}
