:root {
  color-scheme: light;

  /* Brand tokens — carried over from the SNG Volunteer Event Platform */
  --gold:         #b8a169;
  --gold-light:   #d4c08a;
  --gold-pale:    #f5f0e8;
  --footer-black: #111111;

  --ink:          #1a1a1a;
  --ink-mid:      #4a4a4a;
  --slate:        #5a5a6a;

  --warm-border:  #e8e2d8;
  --warm-surface: #f7f4ef;
  --off-white:    #faf8f5;
  --white:        #ffffff;

  --success:      #3a7d52;
  --error:        #c0392b;
  --info:         #3d5a8a;

  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --tap-min:   44px;
  --transition: 0.18s ease;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ink:          #f2efe9;
    --ink-mid:      #cfc9bd;
    --slate:        #a9a296;
    --warm-border:  #3a352c;
    --warm-surface: #26221c;
    --off-white:    #1c1812;
    --white:        #211d17;
    --gold-pale:    #332c1f;
    --stage-bg:     #14110d;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ink:          #f2efe9;
  --ink-mid:      #cfc9bd;
  --slate:         #a9a296;
  --warm-border:  #3a352c;
  --warm-surface: #26221c;
  --off-white:    #1c1812;
  --white:        #211d17;
  --gold-pale:    #332c1f;
  --stage-bg:     #14110d;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--off-white);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.device {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ---------- Top bar ---------- */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  background: var(--white);
  border-bottom: 1px solid var(--warm-border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.brand img {
  height: 50px;
  width: auto;
  display: block;
}

.market-pill {
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-mid);
  background: var(--warm-surface);
  border: 1px solid var(--warm-border);
  border-radius: 20px;
  padding: 5px 10px;
  white-space: nowrap;
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.lang-switch {
  font-family: var(--font);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--ink-mid);
  background: var(--warm-surface);
  border: 1px solid var(--warm-border);
  border-radius: 20px;
  padding: 6px 12px;
  min-height: var(--tap-min);
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}

.lang-switch:hover,
.lang-switch:active {
  color: var(--gold);
  border-color: var(--gold-light);
  background: var(--gold-pale);
}

/* ---------- Hamburger / provider nav ---------- */
.nav-wrap {
  position: relative;
}

.hamburger-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: var(--tap-min);
  height: var(--tap-min);
  padding: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.hamburger-line {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.hamburger-btn[aria-expanded="true"] .hamburger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger-btn[aria-expanded="true"] .hamburger-line:nth-child(2) { opacity: 0; }
.hamburger-btn[aria-expanded="true"] .hamburger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  margin: 0;
  list-style: none;
  background: var(--white);
  border: 1px solid var(--warm-border);
  border-radius: var(--radius-md);
  padding: 6px 0;
  min-width: 208px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.14);
  z-index: 50;
}

.nav-menu.active { display: block; }

.nav-divider {
  height: 1px;
  background: var(--warm-border);
  margin: 6px 0;
}

.nav-market-label {
  padding: 8px 16px 2px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--slate);
}

.nav-link {
  display: flex;
  align-items: center;
  width: 100%;
  text-align: left;
  min-height: var(--tap-min);
  padding: 8px 16px;
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-mid);
  background: none;
  border: none;
  cursor: pointer;
  transition: color var(--transition), background var(--transition);
}

.nav-link:hover { color: var(--gold); background: var(--gold-pale); }

.nav-link-sub {
  display: block;
  font-size: 0.7rem;
  color: var(--slate);
  margin-top: 1px;
}

/* Donate is an <a>, so reset link styling and stack title + sub line */
a.nav-link { text-decoration: none; box-sizing: border-box; }

.nav-donate {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  font-weight: 700;
  color: var(--gold);
}

/* ---------- Safety strip ---------- */
.safety-strip {
  background: var(--footer-black);
  color: #f2efe9;
  padding: 9px 16px;
  font-size: 0.74rem;
  line-height: 1.5;
  text-align: center;
}

.safety-strip b { color: var(--gold-light); font-weight: 700; }
.safety-strip a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Scroll body ---------- */
.screen {
  flex: 1;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 22px 18px 12px;
  box-sizing: border-box;
}

.screen.screen_tight { padding-top: 4px; }

.eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 6px;
}

h1 {
  font-size: 1.5rem;
  line-height: 1.28;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 8px;
  text-wrap: balance;
}

.lede {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--ink-mid);
  margin: 0 0 22px;
  max-width: 46ch;
}

.lede strong { color: var(--ink); font-weight: 600; }

/* ---------- Location row ---------- */
.locate-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--warm-surface);
  border: 1px solid var(--warm-border);
  border-radius: var(--radius-md);
  padding: 11px 14px;
  margin-bottom: 22px;
}

.locate-row .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  flex-shrink: 0;
}

.locate-row .locate-text {
  flex: 1;
  min-width: 0;
  font-size: 0.82rem;
  color: var(--ink-mid);
}

.locate-row .locate-text b { color: var(--ink); }

.locate-btn {
  flex-shrink: 0;
  font-family: var(--font);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--gold);
  background: none;
  border: none;
  padding: 6px 4px;
  min-height: var(--tap-min);
  cursor: pointer;
}

/* ---------- Need cards ---------- */
.section-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 12px;
}

.need-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 8px;
}

.need-card {
  grid-column: span 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
  background: var(--white);
  border: 1px solid var(--warm-border);
  border-radius: var(--radius-lg);
  padding: 16px 14px;
  min-height: var(--tap-min);
  cursor: pointer;
  font-family: var(--font);
  transition: border-color var(--transition), transform var(--transition), background var(--transition);
}

.need-card:hover,
.need-card:focus-visible {
  border-color: var(--gold);
  background: var(--gold-pale);
  outline: none;
}

.need-card:active { transform: scale(0.98); }

.need-card.wide { grid-column: span 2; flex-direction: row; align-items: center; }
.need-card.wide .need-copy { flex: 1; }
.need-card.wide .need-icon { margin-bottom: 0; }

.need-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gold-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.need-icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--gold);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Title over sub-line (2026-10-15): cards built in JS have no whitespace
   between the spans, so they ran together on one line. */
.need-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.need-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}

.need-sub {
  font-size: 0.74rem;
  color: var(--slate);
  line-height: 1.4;
  margin-top: 2px;
}

/* ---------- Reassurance note ---------- */
.reassure {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--warm-surface);
  border-radius: var(--radius-md);
  padding: 13px 14px;
  margin: 22px 0 6px;
}

.reassure svg {
  width: 18px;
  height: 18px;
  stroke: var(--gold);
  fill: none;
  stroke-width: 1.8;
  flex-shrink: 0;
  margin-top: 1px;
}

.reassure p {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--ink-mid);
}

.reassure b { color: var(--ink); }

/* ---------- Footer ---------- */
.foot {
  background: var(--footer-black);
  padding: 20px 18px calc(20px + env(safe-area-inset-bottom, 0px));
  text-align: center;
  margin-top: auto;
}

.foot-powered {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 4px;
}

.foot-logo {
  display: block;
  height: 28px;
  width: auto;
  margin: 0 auto 12px;
}

.foot-privacy {
  font-size: 0.68rem;
  line-height: 1.6;
  color: #9a9488;
  max-width: 34ch;
  margin: 0 auto;
}

.foot-donate {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-min);
  margin: 12px 0 0;
  padding: 0 18px;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--gold-light);
  text-decoration: none;
  border: 1px solid rgba(212, 192, 138, 0.45);
  border-radius: 999px;
  transition: background var(--transition), color var(--transition);
}

.foot-donate:hover,
.foot-donate:active { background: rgba(212, 192, 138, 0.14); color: #ffffff; }

.foot-copyright {
  font-size: 0.64rem;
  color: #7a7468;
  margin: 10px 0 0;
}

/* ---------- Quick exit ---------- */
.exit-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--footer-black);
  padding: 6px 14px;
  padding-top: calc(6px + env(safe-area-inset-top, 0px));
}

.quick-exit-text {
  font-size: 0.74rem;
  color: #cfc9bd;
}

.quick-exit {
  font-family: var(--font);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--white);
  background: transparent;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 20px;
  padding: 5px 12px;
  min-height: 32px;
  cursor: pointer;
  transition: background var(--transition);
}

.quick-exit:hover,
.quick-exit:active { background: rgba(255,255,255,0.14); }

/* ---------- Toast (mock feedback only) ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translate(-50%, 12px);
  background: var(--ink);
  color: var(--off-white);
  font-size: 0.82rem;
  padding: 10px 16px;
  border-radius: 24px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.22);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 30;
  max-width: calc(100% - 40px);
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- Back link (sub-screens) ---------- */
/* Own row, flush near the left edge, minimal padding above/below so it
   costs almost no vertical space before the title/content starts. */
.sub_nav_bar {
  width: 100%;
  padding: 6px 4px 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-mid);
  background: none;
  border: none;
  padding: 8px 2px;
  min-height: var(--tap-min);
  cursor: pointer;
  margin: 0;
}

.back-link:hover { color: var(--gold); }

.screen-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 6px;
}

.screen-sub {
  font-size: 0.85rem;
  color: var(--ink-mid);
  line-height: 1.5;
  margin: 0 0 18px;
}

/* ---------- Question blocks (shelter intake) ---------- */
.q_block {
  margin-bottom: 20px;
}

.q_label {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 10px;
}

.q_sub {
  font-size: 0.75rem;
  color: var(--slate);
  margin: -6px 0 10px;
}

.choice_row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.choice_btn {
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-mid);
  background: var(--white);
  border: 1px solid var(--warm-border);
  border-radius: 999px;
  padding: 10px 18px;
  min-height: var(--tap-min);
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}

.choice_btn:hover { border-color: var(--gold-light); }

.choice_btn.selected {
  color: var(--white);
  background: var(--gold);
  border-color: var(--gold);
}

.stepper_row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.stepper {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stepper_label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--slate);
}

.stepper_control {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--warm-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  width: fit-content;
}

.stepper_btn {
  width: var(--tap-min);
  height: var(--tap-min);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  background: var(--warm-surface);
  border: none;
  cursor: pointer;
}

.stepper_btn:hover { background: var(--gold-pale); color: var(--gold); }

.stepper_value {
  width: 40px;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
}

.conditional_block {
  display: none;
  margin-top: 14px;
  padding-left: 18px;
  border-left: 2px solid var(--warm-border);
}

.conditional_block.open { display: block; }

.text_input {
  width: 100%;
  font-family: var(--font);
  font-size: 0.88rem;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--warm-border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  min-height: var(--tap-min);
}

.text_input:focus { outline: none; border-color: var(--gold); }

.submit_row {
  margin-top: 28px;
  padding: 18px 16px 20px;
  background: rgba(58, 125, 82, 0.08);
  border: 1px solid rgba(58, 125, 82, 0.35);
  border-radius: var(--radius-lg);
}

/* ---------- "Anything else?" multi-select (check any others that apply) ---------- */
.choice_row_multi .choice_btn.selected {
  color: var(--white);
  background: var(--slate);
  border-color: var(--slate);
}

.amount_row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.text_input_sm {
  width: 110px;
  flex: 0 0 auto;
}

.choice_row_sm {
  gap: 6px;
}

.choice_btn_sm {
  padding: 8px 14px;
  font-size: 0.8rem;
}

.submit_note {
  font-size: 0.78rem;
  color: var(--ink-mid);
  line-height: 1.5;
  margin: 0 0 12px;
}

.submit_note a { color: var(--gold); font-weight: 600; text-decoration: underline; }

/* Text / call consent under the phone button (2026-10-05) */
.submit_note.consent_note {
  font-size: 0.7rem;
  color: var(--slate);
  line-height: 1.45;
  margin: 10px 0 0;
}

/* ZIP code + "Use my location" (2026-10-05) -- phone step and the Guide bar */
.zip_row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
}

.text_input.text_input_zip {
  flex: 1;
  min-width: 0;
}

.zip_locate_btn {
  flex-shrink: 0;
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gold);
  background: var(--white);
  border: 1px solid var(--gold-light);
  border-radius: var(--radius-md);
  padding: 0 14px;
  min-height: var(--tap-min);
  white-space: nowrap;
  cursor: pointer;
}

.zip_locate_btn:hover { background: var(--gold-pale); }
.zip_locate_btn:disabled { color: var(--slate); cursor: default; }

.submit_note.zip_note {
  font-size: 0.72rem;
  color: var(--slate);
  margin: 0 0 12px;
}

/* Guide: ZIP bar at the top + distance line on place cards */
.guide_zip_bar {
  background: var(--warm-surface);
  border: 1px solid var(--warm-border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin: 0 0 16px;
}

.guide_zip_bar .zip_locate_btn { margin-top: 2px; }

.guide_zip_label {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 8px;
}

.guide_zip_line {
  font-size: 0.86rem;
  color: var(--ink);
  margin: 0;
}

.guide_zip_links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 4px 0 0;
}

.guide_zip_note {
  font-size: 0.72rem;
  color: var(--slate);
  margin: 8px 0 0;
}

.guide_zip_msg {
  font-size: 0.78rem;
  color: var(--ink-mid);
  margin: 6px 0 0;
}

.guide_zip_msg:empty { display: none; }

.guide_step_distance {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-mid);
  margin: 2px 0 0;
}

/* Guide top bar (2026-10-06): green "Have someone call me" + Leave now */
.guide_top_bar { min-height: 44px; }

.guide_call_btn {
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 700;
  color: #ffffff;
  background: var(--success);
  border: none;
  border-radius: 20px;
  padding: 6px 16px;
  min-height: 34px;
  cursor: pointer;
}

.guide_call_btn:hover { background: #2f6a44; }

.guide_call_pending {
  font-size: 0.78rem;
  font-weight: 600;
  color: #cfe9d7;
}

.guide_call_cancel {
  font-family: var(--font);
  font-size: 0.78rem;
  color: #f2efe9;
  background: none;
  border: none;
  padding: 4px 2px;
  text-decoration: underline;
  cursor: pointer;
}

.guide_leave_wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.guide_leave_hint { font-size: 0.68rem; }

.guide_call_form {
  background: var(--white);
  border: 1px solid var(--warm-border);
  border-left: 4px solid var(--success);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin: 0 0 16px;
}

.guide_call_title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 12px;
}

.guide_call_row { margin-bottom: 14px; }

.guide_call_note {
  display: block;
  resize: vertical;
  margin: 0 0 6px;
}

.guide_call_notnow { margin-left: 12px; }

.guide_call_done {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--success);
  margin: 0;
}

.primary_btn {
  display: block;
  width: 100%;
  font-family: var(--font);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--white);
  background: var(--gold);
  border: none;
  border-radius: var(--radius-md);
  padding: 14px;
  min-height: var(--tap-min);
  cursor: pointer;
  transition: background var(--transition);
}

.primary_btn:hover { background: #a48f5c; }

.primary_btn:disabled {
  background: var(--warm-border);
  color: var(--slate);
  cursor: not-allowed;
}

/* ---------- Card-per-question ---------- */
/* Trialed on Housing first, confirmed, now rolled out to Recovery too. */
#shelter_container .q_block,
#recovery_container .q_block,
#food_container .q_block,
#furniture_container .q_block,
#employment_container .q_block {
  background: var(--white);
  border: 1px solid var(--warm-border);
  border-radius: var(--radius-lg);
  padding: 16px 16px 18px;
}

/* Recovery's two branch groups (Substance Use / Mental Health) and Food's
   two branch groups (Immediate / Ongoing) each hold several question-
   cards. Strip the default conditional_block indent/border look off just
   these wrappers — a box-of-boxes look is worse than what we started
   with — and use a small section label instead so it's still clear why
   that batch of cards appeared. */
#substance_group,
#mental_group,
#immediate_group,
#ongoing_group {
  padding-left: 0;
  border-left: none;
  margin-top: 22px;
}

.section_label_group {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 10px;
}

/* ---------- Recovery & Mental Health: "not sure" guide ---------- */
.guide_box {
  background: var(--warm-surface);
  border: 1px solid var(--warm-border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.guide_item {
  font-size: 0.82rem;
  color: var(--ink-mid);
  line-height: 1.5;
  margin: 0 0 10px;
}

.guide_item:last-of-type { margin-bottom: 8px; }

.guide_item b { color: var(--ink); }

.guide_note {
  font-size: 0.78rem;
  color: var(--slate);
  margin: 0;
  font-style: italic;
}

/* ---------- Recovery & Mental Health: crisis card ---------- */
/* Shown (never hides the rest of the form) whenever someone answers "yes"
   to needing to talk to someone right now. Deliberately not a JS alert/
   confirm dialog — this app avoids blocking modals everywhere else. */
.crisis_card {
  background: rgba(192, 57, 43, 0.08);
  border: 2px solid var(--error);
  border-radius: var(--radius-md);
  padding: 16px;
}

.crisis_title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--error);
  margin: 0 0 12px;
}

.crisis_btn {
  display: block;
  text-align: center;
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--white);
  background: var(--error);
  border-radius: var(--radius-md);
  padding: 12px;
  min-height: var(--tap-min);
  text-decoration: none;
  margin-bottom: 8px;
}

.crisis_btn:last-child { margin-bottom: 0; }

.crisis_btn_emergency { background: var(--footer-black); }

/* ---------- Cross-screen link note (shelter ↔ recovery) ---------- */
.cross_link_note {
  font-size: 0.8rem;
  color: var(--ink-mid);
  line-height: 1.5;
  margin: 20px 0 0;
}

.cross_link_note a { color: var(--gold); font-weight: 600; text-decoration: underline; }

/* ---------- "Something Else" sub-topic menu: coming soon ---------- */
.need-card.coming_soon {
  background: var(--warm-surface);
}

.need-card.coming_soon .need-icon {
  background: var(--warm-border);
}

.need-card.coming_soon .need-icon svg {
  stroke: var(--slate);
}

.coming_soon_badge {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--slate);
  background: var(--warm-border);
  border-radius: 20px;
  padding: 2px 8px;
  margin-left: 6px;
  vertical-align: middle;
}

/* ---------- Tap-to-open info ("i") next to a question label ---------- */
.info_btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-left: 6px;
  padding: 0;
  font-family: Georgia, serif;
  font-size: 0.72rem;
  font-weight: 700;
  font-style: italic;
  color: var(--gold);
  background: var(--gold-pale);
  border: 1px solid var(--gold-light);
  border-radius: 50%;
  cursor: pointer;
  vertical-align: middle;
}

.info_btn[aria-expanded="true"] {
  color: var(--white);
  background: var(--gold);
  border-color: var(--gold);
}

.info_text {
  margin: -4px 0 12px;
}

/* ---------- Home: "Tell us what's going on" (own words) ---------- */
.own_words_block {
  background: var(--white);
  border: 1px solid var(--warm-border);
  border-radius: var(--radius-lg);
  padding: 16px 16px 18px;
  margin-bottom: 18px;
}

.own_words_label {
  display: block;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 10px;
}

.own_words_optional {
  font-weight: 500;
  color: var(--slate);
}

.own_words_input {
  display: block;
  min-height: 84px;
  resize: vertical;
  line-height: 1.45;
  margin-bottom: 12px;
}

.own_words_crisis {
  margin-bottom: 18px;
}

/* "or choose one" divider between the box and the cards */
.or_divider {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  color: var(--slate);
  text-transform: lowercase;
}

.or_divider::before,
.or_divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--warm-border);
}

.suggest_note {
  font-size: 0.8rem;
  color: var(--ink-mid);
  line-height: 1.5;
  margin: -4px 0 12px;
}

/* Suggested need card(s) after "Go" -- highlighted in place, no reordering */
.need-card.suggested {
  position: relative;
  border: 2px solid var(--gold);
  background: var(--gold-pale);
}

.need-card.suggested::after {
  content: 'Suggested';
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--white);
  background: var(--gold);
  border-radius: 20px;
  padding: 2px 8px;
}

/* ---------- Home: "Suggested support for you" under the box (2026-10-07) ---------- */
.suggest_block { margin: 0 0 22px; }

.suggest_heading {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 4px;
}

.suggest_heading:focus { outline: none; }

.suggest_sub {
  font-size: 0.8rem;
  color: var(--ink-mid);
  line-height: 1.5;
  margin: 0 0 12px;
}

.suggest_cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.suggest_cards .need-card {
  width: 100%;
  border: 2px solid var(--gold);
  background: var(--gold-pale);
}

.suggest_clear {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-min);
  margin-top: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--slate);
  text-decoration: underline;
}

/* Guide mode: a suggested Something Else sub-topic adds straight to the Guide (2026-10-15) */
.suggest_add {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--white);
  background: var(--gold);
  border-radius: 20px;
  padding: 4px 12px;
}

.suggest_cards .need-card.suggest_added { opacity: 1; }
.suggest_cards .need-card.suggest_added .suggest_add { background: var(--success); }
.suggest_cards .need-card:disabled { cursor: default; }

/* ---------- Home: organizations they named (2026-10-18) ---------- */
.org_block { margin: 0 0 22px; }

.org_cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.org_cards .need-card { width: 100%; }
.org_cards .need-card.wide.selected { padding-right: 44px; }

.org_not_found {
  font-size: 0.84rem;
  color: var(--ink-mid);
  line-height: 1.5;
  background: var(--warm-surface);
  border: 1px solid var(--warm-border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin: 0 0 14px;
}

.org_found_panel {
  background: var(--white);
  border: 1px solid var(--warm-border);
  border-radius: var(--radius-lg);
  padding: 16px 16px 18px;
}

.org_found_panel .submit_row { margin-top: 8px; }

.org_found_title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.4;
  margin: 0 0 16px;
  padding: 10px 14px;
  background: var(--gold-pale);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius-sm);
}

.org_found_title:focus { outline: none; }

/* Divider keeps its sentence case once it reads "Not quite right? ..." */
.or_divider.after_suggest { text-transform: none; }

/* Grid card that's also shown above: tag only, the grid never moves */
.need-card.suggested_above { position: relative; }
.need-card.wide.suggested_above { padding-right: 112px; }

.need-card.suggested_above::after {
  content: 'Suggested \2191';
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gold);
  background: var(--white);
  border: 1px solid var(--gold-light);
  border-radius: 20px;
  padding: 2px 8px;
}

/* ---------- AI "own words" pre-fill note (see sngln_apply_prefill) ---------- */
.prefill_note {
  font-size: 0.8rem;
  color: var(--ink-mid);
  line-height: 1.5;
  background: var(--gold-pale);
  border: 1px solid var(--gold-light);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin: 0 0 18px;
}

/* ---------- Selectable cards (Something Else sub-topics) ---------- */
/* After .coming_soon above so a selected Coming Soon card still turns gold. */
.need-card.selected {
  position: relative;
  border: 2px solid var(--gold);
  background: var(--gold-pale);
}

.need-card.selected::after {
  content: '\2713';
  position: absolute;
  top: 10px;
  right: 10px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--white);
  background: var(--gold);
  border-radius: 50%;
}

/* Something Else opened from a suggestion: only the picked sub-topics show (2026-10-15) */
.need-card.other_hidden { display: none; }

.other_show_all_row { margin: 4px 0 0; }

.other_show_all {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-min);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gold);
  text-decoration: underline;
}

#other_container .q_block {
  background: var(--white);
  border: 1px solid var(--warm-border);
  border-radius: var(--radius-lg);
  padding: 16px 16px 18px;
}

/* ---------- Guide mode (2026-09-30) ---------- */
/* Hides the phone field and its notes when the person came from their Guide. */
.guide_hidden { display: none !important; }

.guide_back_bar { margin: 0 0 14px; }
.guide_back_link {
  display: inline-block;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  padding: 8px 0;
}

/* A need / sub-topic the person already has in their Guide. */
.need-card.in_guide {
  opacity: 0.55;
  pointer-events: none;
  cursor: default;
}
.need_in_guide_note {
  display: block;
  margin-top: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
}

/* ---------- Provider referral links (2026-10-02) ---------- */
/* "You're getting started with..." under the intake screen title. */
.referral_banner {
  margin: 6px 0 16px;
  padding: 12px 14px;
  background: var(--gold-pale);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius-sm);
}
.referral_banner_text {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  color: var(--ink);
}
.referral_banner_line {
  margin: 4px 0 0;
  font-family: var(--font);
  font-size: 0.9rem;
  color: var(--ink-mid);
}

/* Several listings: "What do you need from {provider}?" on the home screen. */
.referral_choice {
  margin: 16px 16px 4px;
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--warm-border);
  border-radius: var(--radius-lg);
}
.referral_choice_q {
  margin: 0 0 12px;
  font-family: var(--font);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
}
.referral_choice_btn {
  display: block;
  width: 100%;
  min-height: var(--tap-min);
  margin: 0 0 8px;
  padding: 12px 14px;
  text-align: left;
  font-family: var(--font);
  background: var(--warm-surface);
  border: 1px solid var(--warm-border);
  border-radius: var(--radius-md);
  cursor: pointer;
}
.referral_choice_btn:hover { border-color: var(--gold); }
.referral_choice_title {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}
.referral_choice_line {
  display: block;
  margin-top: 2px;
  font-size: 0.88rem;
  color: var(--ink-mid);
}

/* ---------- Larger screens ---------- */
@media (min-width: 480px) {
  .screen { padding: 28px 24px 16px; }
}

@media (min-width: 768px) {
  .top-bar, .safety-strip-inner { padding-left: 32px; padding-right: 32px; }
}
