/* ============ APP FRAME (shared, dark) ============ */
.app { height: 100%; width: 100%; display: flex; flex-direction: column; }

.step-fade { animation: stepIn 0.3s ease; }
@keyframes stepIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* shared step head */
.step-eyebrow {
  font-family: var(--eyebrow-font);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tff-muted);
  margin-bottom: 22px;
}
.step-title {
  font-family: var(--tff-serif);
  font-weight: 400;
  font-size: 46px;
  line-height: 1.04;
  letter-spacing: -0.01em;
  color: var(--tff-surface);
  margin-bottom: 22px;
  text-wrap: balance;
}
.step-intro {
  font-size: 16px;
  font-weight: 300;
  color: var(--tff-muted);
  line-height: 1.6;
  max-width: 50ch;
}
.step-head {
  margin-bottom: 52px;
}

/* serif question option for field labels (tweakable) */
.q-serif .form-label { font-family: var(--tff-serif); font-weight: 400; font-size: 18px; letter-spacing: 0; }

/* ============ RUNNING HEADER (shared) ============ */
.run-head {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  height: 76px;
  border-bottom: 1px solid rgba(255,255,255,0.16);
}
.run-right {
  display: flex;
  align-items: center;
  gap: 28px;
  font-family: var(--tff-sans);
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--tff-muted);
}
.run-right .ledger { color: var(--tff-surface); font-weight: 400; letter-spacing: 0.12em; }
.run-right .ledger .of { color: var(--tff-muted); }
.run-progress { flex-shrink: 0; height: 1px; background: rgba(255,255,255,0.1); position: relative; }
.run-progress .bar {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: var(--prog-color);
  transition: width 0.45s cubic-bezier(.4,0,.2,1);
}

/* ============ A · SPREAD (deck-spirit, default) ============ */
.spread-scroll { flex: 1; overflow-y: auto; }
.spread-col {
  max-width: 820px;
  margin: 0 auto;
  padding: 9vh 48px 80px;
}
.spread-col .step-title { font-size: 52px; }
.spread-nav { margin-top: 60px; }
@media (max-width: 600px) {
  .run-head { padding: 0 24px; height: 64px; }
  .run-right { gap: 16px; }
  .spread-col { padding: 6vh 24px 56px; }
  .spread-col .step-title, .step-title { font-size: 34px; }
}

/* ============ B · INDEX (black two-column) ============ */
.index-frame { height: 100%; display: grid; grid-template-columns: minmax(300px, 34%) 1fr; }

.index-aside {
  background: #000;
  color: var(--tff-surface);
  padding: 48px 44px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.index-mark { margin-bottom: 40px; }
.index-tag {
  font-family: var(--tff-serif);
  font-size: 22px;
  line-height: 1.18;
  color: var(--tff-surface);
  margin-bottom: 8px;
}
.index-sub {
  font-size: 13px; font-weight: 300; color: var(--tff-muted);
  line-height: 1.6; max-width: 28ch; margin-bottom: 48px;
}
.index-steps { list-style: none; display: flex; flex-direction: column; margin-top: auto; }
.index-step {
  display: flex; align-items: baseline; gap: 16px;
  padding: 15px 0;
  border-top: 0.5px solid rgba(255,255,255,0.16);
  cursor: pointer;
}
.index-step:last-child { border-bottom: 0.5px solid rgba(255,255,255,0.16); }
.index-step .idx { font-family: var(--tff-serif); font-size: 13px; color: var(--tff-muted); width: 22px; flex-shrink: 0; }
.index-step .nm { font-size: 14px; font-weight: 300; color: #807d7d; transition: color 0.15s; line-height: 1.3; }
.index-step.done .nm { color: #b8b5b5; }
.index-step.active .nm { color: #fff; font-weight: 400; }
.index-step.active .idx, .index-step.done .idx { color: var(--tff-surface); }
.index-step .tick { margin-left: auto; opacity: 0; align-self: center; flex-shrink: 0; }
.index-step.done .tick { opacity: 1; }
.index-foot {
  padding-top: 40px;
  font-size: 11px; font-weight: 300; color: #6f6c6c;
  letter-spacing: 0.04em; line-height: 1.8;
}
.index-mobile-ledger {
  display: none;
  font-family: var(--tff-sans); font-size: 12px; font-weight: 400;
  letter-spacing: 0.12em; color: var(--tff-surface);
}
.index-mobile-ledger { white-space: nowrap; }
.index-main { overflow-y: auto; display: flex; flex-direction: column; }
.index-col { max-width: 640px; width: 100%; margin: 0 auto; padding: 72px 60px 80px; flex: 1; }
.index-nav { margin-top: 56px; }
@media (max-width: 600px) { .index-col { padding: 44px 28px 56px; } }

/* mobile: collapse sidebar to a compact top bar (placed last so it wins by source order) */
@media (max-width: 860px) {
  .index-frame { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .index-aside {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 24px;
    overflow: visible;
    border-bottom: 1px solid rgba(255,255,255,0.16);
  }
  .index-mark { margin-bottom: 0; }
  .index-tag, .index-sub, .index-steps, .index-foot { display: none; }
  .index-mobile-ledger { display: block; }
}

/* ============ C · DOCUMENT (centered, bound questionnaire) ============ */
.doc-frame { height: 100%; display: flex; flex-direction: column; }
.doc-head {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; gap: 18px;
  padding: 30px 48px 0;
  font-family: var(--tff-sans); font-size: 12px; font-weight: 300;
  letter-spacing: 0.08em; color: var(--tff-muted);
}
.doc-head .rule { flex: 1; max-width: 120px; height: 1px; background: rgba(255,255,255,0.18); }
.doc-head b { color: var(--tff-surface); font-weight: 400; }
.doc-scroll { flex: 1; overflow-y: auto; }
.doc-col { max-width: 680px; margin: 0 auto; padding: 6vh 48px 80px; }
.doc-col .step-head { text-align: center; border-bottom: none; padding-bottom: 0; margin-bottom: 44px; }
.doc-col .step-intro { margin: 0 auto; }
.doc-col .step-title { font-size: 50px; }
.doc-divider { height: 1px; background: rgba(255,255,255,0.16); margin: 0 0 48px; }
.doc-nav { margin-top: 60px; }
@media (max-width: 600px) { .doc-col { padding: 5vh 24px 56px; } .doc-col .step-title { font-size: 32px; } }

/* ============ FIELDS — dark questionnaire spacing ============ */
.form-field { margin-bottom: 34px; }
.sub-block { margin-top: 52px; padding-top: 0; border-top: none; }

/* ============ REVIEW ============ */
.review-grid { display: flex; flex-direction: column; }
.review-sec { margin-bottom: 38px; }
.review-sec-label {
  font-family: var(--tff-serif);
  font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--tff-muted);
  border-bottom: 1px solid rgba(255,255,255,0.5);
  padding-bottom: 12px; margin-bottom: 4px;
  display: flex; justify-content: space-between; align-items: baseline;
}
.review-edit {
  font-family: var(--tff-sans); font-size: 11px; font-weight: 400;
  letter-spacing: 0.04em; text-transform: none; color: #b8b5b5;
  background: none; border: none; cursor: pointer;
  position: relative; padding: 0 0 4px 18px;
}
.review-edit::before { content: ''; position: absolute; left: 0; top: 50%; width: 10px; height: 1px; background: #b8b5b5; }
.review-pair {
  display: grid; grid-template-columns: 1fr 1.3fr; gap: 20px;
  padding: 14px 0; border-bottom: 0.5px solid rgba(255,255,255,0.14);
}
.review-k { font-size: 13px; font-weight: 300; color: var(--tff-muted); line-height: 1.45; }
.review-v { font-size: 14px; font-weight: 400; color: var(--tff-surface); line-height: 1.45; }
.review-v.empty { color: #6f6c6c; font-weight: 300; font-style: italic; }

/* ============ SUCCESS ============ */
.success-wrap { height: 100%; display: flex; align-items: center; justify-content: center; padding: 48px; }
.success-inner { max-width: 600px; width: 100%; }
.success-mark { display: flex; align-items: center; gap: 14px; margin-bottom: 36px; color: var(--tff-surface); }
.success-mark .lbl { font-family: var(--tff-sans); font-size: 12px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--tff-muted); }
.success-h { font-family: var(--tff-serif); font-size: 56px; line-height: 1.04; color: var(--tff-surface); margin-bottom: 26px; }
.success-p { font-size: 17px; font-weight: 300; color: #b8b5b5; line-height: 1.65; margin-bottom: 44px; max-width: 46ch; }
.success-meta { display: flex; gap: 56px; padding-top: 30px; border-top: 0.5px solid rgba(255,255,255,0.2); }
.success-meta .mk { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--tff-muted); margin-bottom: 7px; }
.success-meta .mv { font-size: 16px; font-weight: 300; color: var(--tff-surface); }
@media (max-width: 600px) { .success-h { font-size: 38px; } }
