:root{
  /* FaithBot's palette, adopted deliberately (issue #2). Engage Lostness and FaithBot are two halves
     of one idea -- one practises the conversation, the other has it -- and they should read as one
     family. This is a knowing departure from the IMB tokens in CLAUDE_CODING.md (Sarum Blue #1B365D
     / Lively Jade #487A7B); Don chose matching FaithBot over matching the brand sheet. Source:
     faithbot-v3/assets/site.css. */
  --ink:#1c2430; --accent:#2f6f4f; --accent-deep:#245c40; --accent-light:rgba(47,111,79,.09);
  --muted:#5c6773; --prompt:#8b95a1; --bg:#f6f7f9; --card:#fff; --side:#f0f2f5; --line:#e3e7ec;
  --red:#B83A4B; --teal:#009681; --orange:#E87722;
  --radius:16px;
  /* One family, not two. FaithBot runs entirely on Source Sans 3; the previous Nunito Sans/Source
     Sans split is what made the two sites look unrelated at a glance. */
  --ui:'Source Sans 3',system-ui,-apple-system,sans-serif;
  --body:'Source Sans 3',system-ui,-apple-system,sans-serif;
}
*{box-sizing:border-box}
html,body{height:100%}
body{margin:0;background:var(--bg);color:var(--ink);font-family:var(--body);
     line-height:1.6;-webkit-font-smoothing:antialiased;display:flex;flex-direction:column}

/* ── chrome ─────────────────────────────────────────────────────────── */
.bar{display:flex;align-items:center;justify-content:space-between;gap:1rem;
     padding:.75rem 1.25rem;border-bottom:1px solid var(--line);background:var(--card)}
.brand{font-family:var(--ui);font-weight:800;font-size:1.02rem;letter-spacing:-.01em;
       color:var(--ink);background:none;border:0;cursor:pointer;padding:0}
.bar-actions{display:flex;align-items:center;gap:.6rem;flex-wrap:wrap}
.who{font-size:.85rem;color:var(--muted)}
.foot{padding:1.25rem;text-align:center;font-size:.8rem;color:var(--prompt);
      border-top:1px solid var(--line);display:flex;align-items:center;justify-content:center;
      gap:.75rem;flex-wrap:wrap}
/* Shipped at 3x the displayed height from the 4437x776 master (CLAUDE.md: use it downscaled, never
   redrawn or restretched). width/height on the tag so the footer doesn't reflow on load. */
.foot-logo{height:20px;width:auto;display:block}
.foot-ver{color:var(--prompt)}
/* The footer is the only chrome on every view, signed in or out, so it is where /terms and
   /privacy have to live -- a signed-out visitor sees them before they ever sign in. */
.foot a{color:var(--prompt);text-decoration:none}
.foot a:hover{color:var(--muted);text-decoration:underline}
#main{flex:1;width:100%;max-width:52rem;margin:0 auto;padding:2.5rem 1.25rem 3rem}

/* ── type ───────────────────────────────────────────────────────────── */
h1{font-family:var(--ui);font-weight:800;font-size:clamp(1.75rem,4.5vw,2.5rem);
   line-height:1.15;letter-spacing:-.02em;margin:0 0 .5rem}
h2{font-family:var(--ui);font-weight:700;font-size:1.15rem;margin:0}
h3{font-family:var(--ui);font-size:.76rem;font-weight:700;letter-spacing:.1em;
   text-transform:uppercase;color:var(--accent);margin:1.75rem 0 .5rem}
.lede{font-size:1.08rem;color:var(--muted);max-width:36rem;margin:0 0 2rem}
.hint{font-size:.84rem;color:var(--muted);margin:.35rem 0 0}
.err{background:rgba(184,58,75,.08);color:var(--red);border-radius:10px;
     padding:.7rem .9rem;font-size:.9rem;margin-top:1.5rem}

/* ── controls ───────────────────────────────────────────────────────── */
.btn,.btn-sm{font-family:var(--ui);font-weight:700;border:0;border-radius:10px;
  background:var(--accent);color:#fff;cursor:pointer;text-decoration:none;display:inline-block}
.btn{padding:.7rem 1.3rem;font-size:.98rem}
.btn-sm{padding:.42rem .85rem;font-size:.85rem}
.btn:hover,.btn-sm:hover{background:#3d6869}
.btn:disabled{background:var(--prompt);cursor:not-allowed}
.btn-sm.alt{background:transparent;color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent)}
.btn-sm.alt:hover{background:var(--accent-light)}
.ghost{background:none;border:0;color:var(--muted);font-family:var(--ui);font-size:.85rem;
       cursor:pointer;padding:.4rem .2rem;text-decoration:underline;text-underline-offset:3px}
.ghost:hover{color:var(--ink)}
.back{background:none;border:0;color:var(--accent);font-family:var(--ui);font-size:.85rem;
      cursor:pointer;padding:0;margin-bottom:1.25rem}
select,textarea{font-family:var(--body);font-size:1rem;color:var(--ink);background:var(--card);
  border:1px solid var(--line);border-radius:10px;padding:.6rem .7rem;width:100%}
select:focus,textarea:focus{outline:2px solid var(--accent);outline-offset:1px}
label{font-family:var(--ui);font-weight:700;font-size:.88rem;display:block;margin-bottom:.35rem}
.row{display:flex;gap:.75rem;align-items:center;flex-wrap:wrap;margin-top:1.75rem}

/* ── picker ─────────────────────────────────────────────────────────── */
.grid{display:grid;gap:.75rem;grid-template-columns:repeat(auto-fill,minmax(16rem,1fr))}
.card{background:var(--card);border:1px solid var(--line);border-left:3px solid var(--accent);
  border-radius:10px;padding:.9rem 1rem;display:flex;gap:.75rem;align-items:flex-start;
  text-align:left;cursor:pointer;font:inherit;color:inherit;width:100%}
.card:hover{border-left-color:var(--ink);background:var(--accent-light)}
.card .ico{font-size:1.35rem;line-height:1.15}
.card .nm{font-family:var(--ui);font-weight:700;font-size:.97rem;display:block}
.card .sm{font-size:.83rem;color:var(--muted);line-height:1.45;display:block}
.card .tag{font-size:.72rem;color:var(--accent);font-family:var(--ui);font-weight:700}

/* ── briefing ───────────────────────────────────────────────────────── */
.setup{background:var(--card);border:1px solid var(--line);border-radius:14px;
       padding:1.25rem;margin-bottom:2rem}
.field{margin-bottom:1.1rem}
.brief p{margin:.5rem 0}
.brief ul{margin:.5rem 0;padding-left:1.15rem}
.brief li{margin:.3rem 0}
.brief strong{font-family:var(--ui)}

/* ── chat ───────────────────────────────────────────────────────────── */
.chat-head{display:flex;justify-content:space-between;align-items:flex-start;gap:1rem;
  padding-bottom:.9rem;border-bottom:1px solid var(--line);margin-bottom:1.25rem}
.chat-sub{font-size:.84rem;color:var(--muted);margin:.15rem 0 0}
.thread{display:flex;flex-direction:column;gap:.85rem;margin-bottom:1.25rem}
.msg{max-width:80%;padding:.65rem .9rem;border-radius:10px;font-size:.98rem;white-space:pre-wrap;
     overflow-wrap:anywhere}
.msg.them{background:var(--card);border:1px solid var(--line);border-bottom-left-radius:3px;
          align-self:flex-start}
.msg.me{background:var(--ink);color:#fff;border-bottom-right-radius:3px;align-self:flex-end}
.thread.flat .msg{max-width:100%}
.typing{color:var(--muted);font-style:italic;font-size:.9rem}
.composer{display:flex;gap:.6rem;align-items:flex-end;position:sticky;bottom:0;
          background:var(--bg);padding:.6rem 0}
.composer textarea{resize:none;max-height:9rem}

/* ── debrief ────────────────────────────────────────────────────────── */
.debrief{background:var(--card);border:1px solid var(--line);border-radius:14px;padding:1.25rem 1.4rem}
.debrief h3{margin-top:1.4rem}
.debrief h3:first-child{margin-top:0}
.debrief p{margin:.5rem 0}
.debrief strong{font-family:var(--ui)}
.passage{margin:1.25rem 0 0;padding:1rem 1.25rem;background:var(--accent-light);
  border-left:3px solid var(--accent);border-radius:0 6px 6px 0}
.passage .ref{font-family:var(--ui);font-weight:700;font-size:.8rem;letter-spacing:.06em;
  text-transform:uppercase;color:var(--accent);display:block;margin-bottom:.35rem}
.passage .attr{display:block;margin-top:.5rem;font-size:.76rem;color:var(--muted)}

/* ── history ────────────────────────────────────────────────────────── */
.hrow{display:flex;justify-content:space-between;align-items:center;gap:1rem;width:100%;
  background:var(--card);border:1px solid var(--line);border-radius:10px;padding:.8rem 1rem;
  margin-bottom:.6rem;cursor:pointer;font:inherit;color:inherit;text-align:left}
.hrow:hover{background:var(--accent-light)}
.hrow .meta{font-size:.82rem;color:var(--muted)}

@media (max-width:600px){
  #main{padding:1.75rem 1rem 2rem}
  .msg{max-width:90%}
}


/* ── Landing / sign-in ──────────────────────────────────────────────────
   Mirrors faithbot-v3's .landing: a centred two-column card, what-it-is on the
   left, get-started on the right. Signed-out visitors land here instead of on a
   picker they cannot use. */
.landing{position:fixed;inset:0;display:grid;place-items:center;padding:1.2rem;
  background:var(--bg);overflow:auto;z-index:20}
.landing-shell{display:grid;grid-template-columns:1.1fr .9fr;gap:0;max-width:900px;width:100%;
  background:var(--card);border:1px solid var(--line);border-radius:22px;
  box-shadow:0 10px 50px rgba(16,29,47,.10);overflow:hidden}
.landing-intro{padding:2.4rem 2rem;background:linear-gradient(160deg,#f2f7f3,#eef3f7);
  border-inline-end:1px solid var(--line)}
.landing-brand{display:flex;align-items:center;gap:.6rem;margin-bottom:1rem}
.landing-brand img{width:46px;height:46px}
.landing-brand h1{font-size:1.8rem;color:var(--accent-deep);margin:0;letter-spacing:-.01em}
.landing-lead{font-size:1.08rem;line-height:1.5;color:var(--ink);margin:0 0 1.3rem}
.landing-points{list-style:none;padding:0;margin:0 0 1.3rem;display:flex;flex-direction:column;gap:.7rem}
.landing-points li{display:flex;gap:.6rem;align-items:flex-start;font-size:.95rem;
  line-height:1.4;color:var(--ink)}
.landing-points li span:first-child{flex:none;font-size:1.05rem}
.landing-points li span:last-child{min-width:0;flex:1}
.landing-fine{font-size:.82rem;color:var(--muted);line-height:1.45;margin:0}
.landing-panel{padding:2.4rem 2rem;display:flex;flex-direction:column}
.landing-panel h2{font-size:1.3rem;color:var(--accent-deep);margin:0 0 1.1rem}
.landing-actions{display:flex;flex-direction:column;gap:.6rem}
.landing-actions .btn{width:100%;text-align:center;padding:.75rem 1.3rem}
.landing-note-sm{color:var(--muted);font-size:.83rem;margin:.9rem 0 0;line-height:1.4}
.landing-foot{margin-top:auto;padding-top:1.4rem;font-size:.8rem;color:var(--muted);line-height:1.5}
.landing-foot a{color:var(--muted)}
.landing-foot .sep{color:var(--line)}
@media (max-width:720px){
  .landing-shell{grid-template-columns:1fr;max-width:32rem}
  .landing-intro{border-inline-end:0;border-bottom:1px solid var(--line);padding:1.8rem 1.5rem}
  .landing-panel{padding:1.8rem 1.5rem}
}
