/* ── Foreclosure Decoded — Intake (public triage + full master intake) ───────
   Shared by triage.html and intake.html.
   Band ramp is gray → teal → navy → amber. Never red: Phase 7 settled decision
   "No red for emergencies".
   ─────────────────────────────────────────────────────────────────────────── */

:root {
  --band-low:      #6b6a63;
  --band-moderate: var(--teal);
  --band-high:     var(--navy);
  --band-auction:  var(--amber);
}

/* ── Standalone header (triage is a marketing page, no nav.js) ──────────── */
.intake-header {
  border-bottom: 1px solid var(--border-light);
  background: #fff;
  position: sticky; top: 0; z-index: 20;
}
.intake-header-inner {
  max-width: 1000px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.intake-brand { display: flex; align-items: center; gap: 9px; font-family: 'Poppins', system-ui, sans-serif; font-weight: 600; color: var(--navy); font-size: 0.95rem; }
.intake-brand img { width: 22px; height: 25px; }
.intake-header-link { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }
.intake-header-link:hover { color: var(--navy); }

/* ── Shell ───────────────────────────────────────────────────────────────── */
.intake-shell { max-width: 720px; margin: 0 auto; padding: 40px 24px 72px; }
.intake-shell.is-wide { max-width: 860px; }

.intake-eyebrow {
  font-size: 0.7rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase;
  color: var(--teal); margin-bottom: 10px;
}
.intake-title { font-size: 1.65rem; margin-bottom: 8px; }
.intake-lede { color: var(--text-muted); font-size: 0.95rem; max-width: 56ch; margin-bottom: 8px; }

/* ── Progress ────────────────────────────────────────────────────────────── */
.intake-progress { margin: 26px 0 22px; }
.intake-progress-bar { height: 4px; border-radius: 999px; background: var(--border-light); overflow: hidden; }
.intake-progress-fill { height: 100%; background: var(--teal); border-radius: 999px; transition: width .3s ease; width: 0; }
.intake-progress-label { margin-top: 9px; font-size: 0.78rem; color: var(--text-muted); }

/* ── Cards ───────────────────────────────────────────────────────────────── */
.intake-card {
  border: 1px solid var(--border); background: #fff;
  border-radius: var(--radius-lg); padding: 26px; box-shadow: var(--shadow);
}
.intake-step { display: none; }
.intake-step.is-active { display: block; animation: intake-fade .22s ease; }
@keyframes intake-fade { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

.intake-q { font-family: 'Poppins', system-ui, sans-serif; font-weight: 600; font-size: 1.1rem; line-height: 1.35; margin: 0 0 6px; }
.intake-help { font-size: 0.85rem; color: var(--text-muted); margin: 0 0 18px; }

/* ── Choice buttons (big tap targets — people fill this out stressed) ───── */
.intake-choices { display: grid; gap: 10px; }
.intake-choice {
  display: flex; align-items: flex-start; gap: 12px; width: 100%; text-align: left;
  border: 1px solid var(--border); background: #fff; border-radius: var(--radius);
  padding: 14px 16px; cursor: pointer; font: inherit; font-size: 0.9rem; color: var(--text);
  transition: border-color .12s, background .12s, box-shadow .12s;
}
.intake-choice:hover { border-color: var(--navy-light); background: var(--surface-alt); }
.intake-choice.is-selected { border-color: var(--navy); background: #fff; box-shadow: 0 0 0 1px var(--navy); }
.intake-choice-mark {
  flex: none; width: 18px; height: 18px; margin-top: 2px; border-radius: 50%;
  border: 1.5px solid var(--border); position: relative; transition: border-color .12s;
}
.intake-choice.is-selected .intake-choice-mark { border-color: var(--navy); }
.intake-choice.is-selected .intake-choice-mark::after {
  content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--navy);
}
.intake-choice-label { font-weight: 500; }
.intake-choice-desc { display: block; margin-top: 3px; font-weight: 400; font-size: 0.8rem; color: var(--text-muted); }

/* ── Fields ──────────────────────────────────────────────────────────────── */
.intake-field { margin-bottom: 16px; }
.intake-field.is-half { margin-bottom: 0; }
.intake-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 560px) { .intake-row { grid-template-columns: 1fr; gap: 14px; } }

.intake-label { display: block; margin-bottom: 6px; font-size: 0.85rem; font-weight: 500; color: var(--text); }
.intake-label .opt { font-weight: 400; color: var(--text-light); font-size: 0.78rem; }
.intake-input, .intake-select, .intake-textarea {
  width: 100%; border: 1px solid var(--border); background: #fff; border-radius: var(--radius);
  padding: 9px 12px; font-size: 0.9rem; font-family: 'Inter', system-ui, sans-serif;
  color: var(--text); outline: none; transition: border-color .15s, box-shadow .15s;
}
.intake-textarea { min-height: 90px; resize: vertical; line-height: 1.55; }
.intake-input:focus, .intake-select:focus, .intake-textarea:focus { border-color: var(--navy); box-shadow: 0 0 0 1px var(--navy); }
.intake-hint { margin-top: 5px; font-size: 0.76rem; color: var(--text-light); }

.intake-money { position: relative; }
.intake-money .intake-input { padding-left: 26px; }
.intake-money::before {
  content: '$'; position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  color: var(--text-light); font-size: 0.9rem; pointer-events: none;
}

.intake-inline { display: flex; gap: 10px; flex-wrap: wrap; }
.intake-pill {
  border: 1px solid var(--border); background: #fff; border-radius: 999px;
  padding: 7px 15px; font: inherit; font-size: 0.85rem; cursor: pointer; color: var(--text);
  transition: border-color .12s, background .12s, color .12s;
}
.intake-pill:hover { border-color: var(--navy-light); }
.intake-pill.is-selected { border-color: var(--navy); background: var(--navy); color: #fff; }

.intake-reveal { display: none; }
.intake-reveal.is-open { display: block; animation: intake-fade .2s ease; }

/* ── Sections (full intake) ──────────────────────────────────────────────── */
.intake-section { margin-bottom: 18px; }
.intake-section-head {
  display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px;
}
.intake-section-num {
  flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--navy); color: #fff;
  font-size: 0.7rem; font-weight: 600; display: flex; align-items: center; justify-content: center;
  align-self: center;
}
.intake-section-title { font-family: 'Poppins', system-ui, sans-serif; font-weight: 600; font-size: 1.02rem; margin: 0; }
.intake-section-sub { font-size: 0.83rem; color: var(--text-muted); margin: 0 0 18px 32px; }

/* ── Nav buttons ─────────────────────────────────────────────────────────── */
.intake-actions { display: flex; align-items: center; gap: 12px; margin-top: 24px; }
.intake-actions .spacer { flex: 1; }
.intake-btn {
  border-radius: var(--radius); border: none; background: var(--navy); color: #fff;
  padding: 11px 22px; font-size: 0.9rem; font-weight: 500; cursor: pointer;
  font-family: 'Inter', system-ui, sans-serif; transition: opacity .15s;
}
.intake-btn:hover { opacity: .9; }
.intake-btn:disabled { opacity: .45; cursor: not-allowed; }
.intake-btn.is-ghost { background: transparent; color: var(--text-muted); border: 1px solid var(--border); }
.intake-btn.is-ghost:hover { border-color: var(--navy-light); color: var(--navy); opacity: 1; }
.intake-btn.is-teal { background: var(--teal); }
.intake-btn.is-link { background: none; border: none; color: var(--text-muted); padding: 11px 4px; text-decoration: underline; }

.intake-error {
  margin-top: 14px; font-size: 0.85rem; color: var(--red);
  background: #fdf3f1; border: 1px solid #f0d5cf; border-radius: var(--radius); padding: 10px 13px;
}
.intake-saved { font-size: 0.8rem; color: var(--success); }
.hidden { display: none !important; }

/* ── Result / band card ──────────────────────────────────────────────────── */
.band-card {
  border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden;
  background: #fff; box-shadow: var(--shadow); margin-bottom: 22px;
}
.band-strip { height: 5px; background: var(--band-low); }
.band-body { padding: 26px; }
.band-badge {
  display: inline-flex; align-items: center; gap: 8px; border-radius: 999px;
  padding: 5px 13px; font-size: 0.74rem; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: #fff; background: var(--band-low); margin-bottom: 14px;
}
.band-tier { font-weight: 500; opacity: .78; letter-spacing: .02em; text-transform: none; }
.band-headline { font-family: 'Poppins', system-ui, sans-serif; font-weight: 600; font-size: 1.25rem; line-height: 1.3; margin: 0 0 10px; }
.band-summary { color: var(--text-muted); font-size: 0.93rem; margin: 0 0 16px; }
.band-reason {
  font-size: 0.85rem; color: var(--text); background: var(--surface-alt);
  border-left: 3px solid var(--band-low); border-radius: 0 var(--radius) var(--radius) 0;
  padding: 11px 14px; margin: 0 0 18px;
}
.band-urgency { font-size: 0.8rem; font-weight: 600; color: var(--band-low); }

/* Band theming — one class on the wrapper drives every accent. */
.band-low     { --band: var(--band-low); }
.band-moderate{ --band: var(--band-moderate); }
.band-high    { --band: var(--band-high); }
.band-auction { --band: var(--band-auction); }
.band-card[class*="band-"] .band-strip,
.band-card[class*="band-"] .band-badge { background: var(--band, var(--band-low)); }
.band-card[class*="band-"] .band-reason { border-left-color: var(--band, var(--band-low)); }
.band-card[class*="band-"] .band-urgency { color: var(--band, var(--band-low)); }

.band-next { margin-bottom: 26px; }
.band-next-title { font-size: 0.8rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 12px; }
.band-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.band-steps li {
  display: flex; gap: 12px; align-items: flex-start; font-size: 0.89rem; line-height: 1.55;
  border: 1px solid var(--border-light); border-radius: var(--radius); padding: 13px 15px; background: #fff;
}
.band-step-num {
  flex: none; width: 21px; height: 21px; border-radius: 50%;
  background: var(--surface-alt); color: var(--text-muted);
  font-size: 0.7rem; font-weight: 600; display: flex; align-items: center; justify-content: center;
}

.band-cta {
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--navy); color: #fff; padding: 24px 26px;
}
.band-cta h3 { color: #fff; font-size: 1.05rem; margin: 0 0 7px; }
.band-cta p { color: rgba(255,255,255,.76); font-size: 0.88rem; margin: 0 0 18px; }
.band-cta .intake-btn { background: #fff; color: var(--navy); font-weight: 600; }

/* Live band chip on the full intake form */
.band-chip {
  display: inline-flex; align-items: center; gap: 8px; border-radius: 999px;
  border: 1px solid var(--border); background: #fff; padding: 5px 13px 5px 8px;
  font-size: 0.78rem; font-weight: 500; color: var(--text);
}
.band-chip-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--band-low); }
.band-chip.band-low     .band-chip-dot { background: var(--band-low); }
.band-chip.band-moderate .band-chip-dot { background: var(--band-moderate); }
.band-chip.band-high    .band-chip-dot { background: var(--band-high); }
.band-chip.band-auction .band-chip-dot { background: var(--band-auction); }

.intake-disclaimer {
  margin-top: 26px; font-size: 0.76rem; color: var(--text-light); line-height: 1.65;
  border-top: 1px solid var(--border-light); padding-top: 16px;
}

@media (max-width: 560px) {
  .intake-shell { padding: 28px 18px 56px; }
  .intake-card, .band-body { padding: 20px; }
  .intake-title { font-size: 1.4rem; }
}

/* ── Summary view — read-back of a completed intake ──────────────────────── */
.summary-head { margin-bottom: 22px; }

.summary-card {
  border: 1px solid var(--border); background: #fff; border-radius: var(--radius-lg);
  box-shadow: var(--shadow); margin-bottom: 14px; overflow: hidden;
}
.summary-card-head {
  display: flex; align-items: center; gap: 10px;
  padding: 15px 20px; border-bottom: 1px solid var(--border-light); background: var(--surface-alt);
}
.summary-card-title {
  font-family: 'Poppins', system-ui, sans-serif; font-weight: 600; font-size: 0.95rem;
  margin: 0; flex: 1;
}
.summary-edit {
  border: 1px solid var(--border); background: #fff; border-radius: var(--radius);
  padding: 5px 13px; font: inherit; font-size: 0.8rem; font-weight: 500;
  color: var(--navy); cursor: pointer; transition: border-color .12s, background .12s;
}
.summary-edit:hover { border-color: var(--navy); background: var(--navy); color: #fff; }

.summary-rows { padding: 6px 20px 14px; }
.summary-row {
  display: grid; grid-template-columns: 240px 1fr; gap: 16px;
  padding: 11px 0; border-bottom: 1px solid var(--border-light); font-size: 0.88rem;
}
.summary-row:last-child { border-bottom: none; }
.summary-key { color: var(--text-muted); }
.summary-val { color: var(--text); font-weight: 500; overflow-wrap: anywhere; }
.summary-val.is-empty { color: var(--text-light); font-weight: 400; font-style: italic; }
.summary-val.is-notes { font-weight: 400; line-height: 1.6; white-space: pre-wrap; }

.summary-footer {
  display: flex; align-items: center; gap: 14px; margin-top: 22px;
}

@media (max-width: 620px) {
  .summary-row { grid-template-columns: 1fr; gap: 3px; padding: 10px 0; }
  .summary-key { font-size: 0.8rem; }
}
