:root {
  --ink: #16181d;
  --bg: #f5f6f8;
  --card: #ffffff;
  --line: #e3e6eb;
  --muted: #6b7280;
  --brand: #2f6df6;
  --brand-dark: #2456cc;
  --radius: 12px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); line-height: 1.55; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar { display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; background: var(--ink); color: #fff; }
.brand { color: #fff; font-weight: 700; letter-spacing: -0.02em; font-size: 18px; }
.topbar nav { display: flex; gap: 16px; align-items: center; }
.org-name { font-weight: 600; }
.topbar .muted { color: #aeb4c0; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 28px 24px; }

/* cards / forms (signup, login) */
.card { background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 32px; margin: 0 auto; }
.card.narrow { max-width: 460px; }
h1 { margin: 0 0 8px; letter-spacing: -0.02em; }
.lede { color: var(--muted); margin: 0 0 24px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; }
input, select, textarea { font: inherit; padding: 11px 12px; border: 1px solid var(--line);
  border-radius: 9px; background: #fff; color: var(--ink); width: 100%; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); border-color: var(--brand); }
.btn { font: inherit; font-weight: 600; cursor: pointer; border: none; border-radius: 9px; padding: 12px 18px; }
.btn.primary { background: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); }
.btn:disabled { opacity: 0.5; cursor: default; }
.flash { background: #fff7e6; border: 1px solid #f0d28a; color: #7a5b00;
  border-radius: 9px; padding: 10px 14px; margin-bottom: 18px; }
.flash p { margin: 2px 0; }

/* ---- the app: sidebar + chat ---- */
.ef { display: grid; grid-template-columns: 240px 1fr; gap: 22px; align-items: start; }
@media (max-width: 720px) { .ef { grid-template-columns: 1fr; } }

.sidebar { background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px; position: sticky; top: 24px; }
.sidebar-title { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); margin: 4px 6px 12px; }
.field-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.field-item { display: block; padding: 9px 12px; border-radius: 8px; color: var(--ink); }
.field-item:hover { background: #eef2fb; text-decoration: none; }
.field-item.active { background: var(--brand); color: #fff; font-weight: 600; }

.chat { display: flex; flex-direction: column; gap: 14px; min-height: 70vh; }
.thread { display: flex; flex-direction: column; gap: 12px; padding: 4px;
  max-height: 66vh; overflow-y: auto; }
.msg { max-width: 78%; padding: 12px 16px; border-radius: 14px; }
.msg p { margin: 0; white-space: pre-wrap; }
.msg.user { align-self: flex-end; background: var(--brand); color: #fff; border-bottom-right-radius: 4px; }
.msg.assistant { align-self: flex-start; background: var(--card); border: 1px solid var(--line);
  border-bottom-left-radius: 4px; }
.msg.thinking { color: var(--muted); font-style: italic; }

.composer { display: flex; gap: 10px; align-items: flex-end;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.composer textarea { border: none; padding: 8px; outline: none; }
.composer textarea:focus { outline: none; }

/* ---- field records table ---- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
table.records { border-collapse: collapse; width: 100%; font-size: 14px; }
table.records th, table.records td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
table.records th { background: #f0f2f6; font-weight: 600; white-space: nowrap; }
table.records tr:last-child td { border-bottom: none; }

/* ---- v0.8: onboarding, settings, suggestion box ---- */
.lede { color: #4a4a55; line-height: 1.55; margin: 8px 0 14px; }
.row { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.small { font-size: 13px; }
.ok { color: #1a7f4b; }
.err { color: #c0392b; }
.radio { display: block; margin: 8px 0; cursor: pointer; }
.radio.muted { color: #9aa; cursor: default; }
.btn.small { padding: 4px 10px; font-size: 13px; }
.wizard-step h1 { margin-top: 0; }
.table-wrap { overflow-x: auto; }
.idea-list { list-style: none; padding: 0; }
.idea-list li { padding: 9px 0; border-bottom: 1px solid #eee; line-height: 1.5; }
.badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px;
  border-radius: 10px; margin-right: 8px; vertical-align: middle; }
.badge.build { background: #e6f4ea; color: #1a7f4b; }
.badge.review { background: #eef0f4; color: #556; }

/* suggestion box — fixed tab + slide-out panel */
.suggest-tab { position: fixed; right: 0; top: 40%; transform: rotate(0deg);
  background: var(--accent, #3b5bdb); color: #fff; padding: 9px 12px;
  border-radius: 8px 0 0 8px; cursor: pointer; font-size: 13px; font-weight: 600;
  box-shadow: -2px 2px 8px rgba(0,0,0,.12); z-index: 40; user-select: none; }
.suggest-panel { position: fixed; right: 16px; top: 38%; width: 320px; background: #fff;
  border: 1px solid #e3e3ea; border-radius: 12px; padding: 16px; z-index: 41;
  box-shadow: 0 8px 30px rgba(0,0,0,.16); }
.suggest-panel h3 { margin: 0 0 4px; }
.suggest-panel textarea { width: 100%; box-sizing: border-box; margin: 8px 0; }

/* ---- v1.0: data ownership ---- */
.ownership-banner { background: #eef4ff; border: 1px solid #d4e0ff; color: #2a3a66;
  border-radius: 10px; padding: 12px 14px; margin-bottom: 18px; line-height: 1.5;
  font-size: 14px; }

/* ---- v1.2: diagnostics ---- */
.diag-list { list-style: none; padding: 0; margin: 14px 0; }
.diag-list li { padding: 9px 0; border-bottom: 1px solid #eee; line-height: 1.5; }
.diag-badge { display: inline-block; width: 22px; font-weight: 700; }
.diag-pass .diag-badge { color: #1a7f4b; }
.diag-fail { color: #7a1f1f; }
.diag-fail .diag-badge { color: #c0392b; }
.diag-warn .diag-badge { color: #b8860b; }
.diag-skip { color: #888; }

/* ---- v1.3: donor import ---- */
.dropzone { border: 2px dashed #cdd3e0; border-radius: 12px; padding: 26px;
  text-align: center; margin: 12px 0; background: #fafbff; }
.dropzone.drag { border-color: #3b5bdb; background: #eef2ff; }
.link { color: #3b5bdb; cursor: pointer; text-decoration: underline; }

/* ---- v1.4: record forms ---- */
.record-form { margin: 10px 0 16px; padding: 14px; border: 1px solid #e3e3ea;
  border-radius: 10px; background: #fafbff; }
.field-input { display: block; margin-bottom: 8px; font-size: 14px; }
.field-input input { display: block; width: 100%; box-sizing: border-box; margin-top: 3px; }
.records .row-actions a, .records .row-actions button { font-size: 12px; margin-right: 8px; }
.btn.danger { background: #c0392b; color: #fff; border-color: #c0392b; }

/* ---- v1.6: AI model toggle ---- */
.model-toggle { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 4px; }
.model-option { flex: 1 1 200px; display: flex; flex-direction: column; gap: 2px;
  padding: 12px 14px; border: 1px solid #e3e3ea; border-radius: 10px;
  background: #fafbff; cursor: pointer; }
.model-option:hover { border-color: #cdd3e0; }
.model-option.selected { border-color: #3b5bdb; background: #eef2ff;
  box-shadow: 0 0 0 1px #3b5bdb inset; }
.model-option input { margin-right: 6px; }
.model-option .model-name { font-weight: 600; }
.model-option .model-cost { color: #555; font-size: 12px; }

/* ---- v1.7b: speech-to-text mic ---- */
.btn.mic { padding: 8px 10px; line-height: 1; background: #fff; border: 1px solid #cdd3e0;
  border-radius: 8px; cursor: pointer; }
.btn.mic:hover { border-color: #3b5bdb; }
.btn.mic.listening { background: #ffe3e3; border-color: #e03131; color: #e03131;
  animation: mic-pulse 1.1s ease-in-out infinite; }
@keyframes mic-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(224,49,49,0.45); }
  70%  { box-shadow: 0 0 0 8px rgba(224,49,49,0); }
  100% { box-shadow: 0 0 0 0 rgba(224,49,49,0); }
}
/* mic-fix-v1: listening status pill (continuous-mode word count + hints) */
.mic-status { display: inline-flex; align-items: center; gap: 6px; margin-left: 6px;
  font-size: 0.85em; color: #e03131; vertical-align: middle; }
.mic-status .mic-dot { width: 9px; height: 9px; border-radius: 50%; background: #e03131;
  display: inline-block; }
.mic-status.pulse .mic-dot { animation: mic-pulse 1.1s ease-in-out infinite; }

/* ---- modules: CRM / Finance / Tasks ---- */
.module-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px; margin: 18px 0; }
.module-card { display: block; padding: 18px; border: 1px solid #e2e6ee; border-radius: 12px;
  text-decoration: none; color: inherit; background: #fff; transition: border-color .15s, box-shadow .15s; }
.module-card:hover { border-color: #3b5bdb; box-shadow: 0 2px 10px rgba(59,91,219,0.08); }
.module-card h2 { margin: 0 0 6px; font-size: 1.05rem; }
.module-count { font-size: 2rem; font-weight: 700; margin: 0; line-height: 1; }
.fin-figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px; margin: 18px 0; }
.fin-fig { padding: 16px; border: 1px solid #e2e6ee; border-radius: 12px; background: #fff; }
.fin-fig .v { font-size: 1.7rem; font-weight: 700; }
.fin-fig.net.pos .v { color: #2f9e44; } .fin-fig.net.neg .v { color: #e03131; }
.task-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px;
  border: 1px solid #e2e6ee; border-radius: 10px; margin: 6px 0; background: #fff; }
.task-row.overdue { border-color: #e03131; background: #fff5f5; }
.task-badge { font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.task-badge.overdue { background: #ffe3e3; color: #e03131; }
.prio-high { color: #e03131; font-weight: 700; } .prio-medium { color: #f08c00; } .prio-low { color: #868e96; }

/* ---- credit plan progress bar ---- */
.progress { height: 12px; background: #e9ecef; border-radius: 999px; overflow: hidden; margin: 6px 0; max-width: 480px; }
.progress-bar { height: 100%; background: #3b5bdb; border-radius: 999px; }

/* ---- admin billing summary ---- */
.billing-summary { margin: 12px 0; padding: 10px 14px; border: 1px solid #e2e6ee;
  border-radius: 10px; background: #f8f9fc; }

/* ---- contact enrichment research panel ---- */
.research-panel { margin: 16px 0; border: 1px solid #e2e6ee; border-radius: 12px; padding: 12px 16px; background: #fff; }
.research-panel summary { cursor: pointer; font-weight: 600; }
.research-h { font-size: .9rem; margin: 12px 0 6px; color: #495057; }
.research-row { display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 8px 0; border-top: 1px solid #f1f3f5; }

/* ---- v1.7b: text-to-speech speaker ---- */
.msg .tts-btn { margin-top: 6px; padding: 2px 7px; font-size: 13px; line-height: 1.4;
  background: transparent; border: 1px solid #d6dae6; border-radius: 6px; cursor: pointer;
  color: #555; opacity: 0.7; }
.msg .tts-btn:hover { opacity: 1; border-color: #3b5bdb; }
.msg .tts-btn.playing { color: #e03131; border-color: #e03131; opacity: 1; }

/* ---- v1.7b: speech settings ---- */
.speech-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; margin: 8px 0; }
.speech-row select { display: block; margin-top: 3px; padding: 6px; min-width: 180px; }

/* ---- v1.8: notifications ---- */
.notif-bell { color: #1a7f4b; font-weight: 600; margin-left: 4px; }
.notif-banner { background: #e9fbef; border: 1px solid #b6e7c6; color: #1a5c38;
  border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; line-height: 1.5; }
.notif-banner p { margin: 2px 0; }

/* ---- v1.9: admin nav button ---- */
.admin-btn { background: #3b5bdb; color: #fff; border: 1px solid #3b5bdb;
  text-decoration: none; margin-left: 4px; }
.admin-btn:hover { background: #2f4bc0; }

/* ---- v1.9: build pipeline board ---- */
.pipeline-summary { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 14px; }
.pill { background: #eef2ff; border: 1px solid #d4e0ff; color: #2a3a66;
  border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 600; }
.status { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 6px; }
.status-open { background: #f1f3f5; color: #555; }
.status-specced { background: #e7f5ff; color: #1971c2; }
.status-awaiting_approval { background: #fff3bf; color: #946200; }
.status-instruction_ready { background: #d3f9d8; color: #2b8a3e; }
.status-deployed { background: #e6fcf5; color: #099268; }
.approve-gap { background: #2b8a3e; color: #fff; border-color: #2b8a3e; }
.approve-gap:hover { background: #237032; }
.copy-instr { background: #1971c2; color: #fff; border-color: #1971c2; }
.copy-instr:hover { background: #1763a8; }

/* ---- v2.0a: legal pages ---- */
.legal h2 { margin-top: 22px; font-size: 17px; }
.legal p { line-height: 1.6; }

/* ---- v2.0b: SMS / Texts ---- */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 16px; border-bottom: 1px solid #e3e3ea; }
.tab-btn { background: transparent; border: none; padding: 8px 12px; cursor: pointer;
  color: #555; border-bottom: 2px solid transparent; font-size: 14px; }
.tab-btn.active { color: #3b5bdb; border-bottom-color: #3b5bdb; font-weight: 600; }
.wizard { line-height: 1.7; margin: 8px 0 14px; padding-left: 20px; }
.embed { background: #f5f7fb; border: 1px solid #e3e3ea; border-radius: 8px; padding: 10px;
  font-size: 12px; overflow-x: auto; }

/* ---- v2.0d: admin TTS + command center ---- */
.tts-bar { display:flex; align-items:center; gap:10px; flex-wrap:wrap; background:#f5f7fb;
  border:1px solid #e3e3ea; border-radius:10px; padding:8px 12px; margin:10px 0; font-size:14px; }
.tts-read { padding:0 7px; margin-left:6px; }
.cmd-center { border:1px solid #e3e3ea; border-radius:10px; padding:12px; background:#fafbff; }
.cmd-thread { max-height:320px; overflow-y:auto; margin-bottom:10px; }
.cmd-msg { padding:8px 10px; border-radius:8px; margin:6px 0; line-height:1.5; font-size:14px; white-space:pre-wrap; }
.cmd-msg.user { background:#eef2ff; }
.cmd-msg.assistant { background:#fff; border:1px solid #eee; }
.cmd-center .row { display:flex; gap:8px; }
.cmd-center input { flex:1; padding:8px; box-sizing:border-box; }

/* ---- Phase 2: Business Strategist (warmer theme) ---- */
.badge-dot { color: #e8590c; font-size: 10px; margin-left: 3px; vertical-align: middle; }
.strat-chat { background: #fffaf4; }
.strat-header { border-bottom: 1px solid #f0e2d0; padding-bottom: 10px; margin-bottom: 10px; }
.strat-header h1 { color: #9a3412; margin: 0; }
.strategist-page .strat-chat .msg.assistant { background: #fff3e6; border: 1px solid #f5dcc0; }
.strategist-page .strat-chat .msg.user { background: #eef2ff; }

/* ---- cost guard: budget banner ---- */
.budget-banner { padding: 10px 16px; text-align: center; font-size: 14px; line-height: 1.5; }
.budget-banner a { font-weight: 600; }
.budget-banner.warning { background: #fff3bf; color: #946200; border-bottom: 1px solid #f0d000; }
.budget-banner.stopped { background: #ffe3e3; color: #a61e1e; border-bottom: 1px solid #f5b5b5; }
.budget-bar { height: 12px; background: #eee; border-radius: 6px; overflow: hidden; margin: 6px 0; }
.budget-bar > span { display: block; height: 100%; background: #3b5bdb; }
.budget-bar > span.warning { background: #f0a000; }
.budget-bar > span.stopped { background: #e03131; }

/* ---- cost guard: admin spend status ---- */
.spend-ok { color: #2b8a3e; font-weight: 600; }
.spend-warning { color: #946200; font-weight: 600; }
.spend-paused { color: #c0392b; font-weight: 600; }

/* ---- ledger: household type-ahead search (cockpit C1) ---- */
.lg-search { position: relative; max-width: 480px; margin: 8px 0 14px; }
.lg-search-input { width: 100%; padding: 9px 12px; font-size: 15px; border: 1px solid #ccc;
  border-radius: 6px; box-sizing: border-box; }
.lg-search-input:focus { outline: none; border-color: #3b5bdb; box-shadow: 0 0 0 2px rgba(59,91,219,.15); }
.lg-search-results { position: absolute; z-index: 40; left: 0; right: 0; top: 100%;
  margin: 4px 0 0; padding: 0; list-style: none; background: #fff; border: 1px solid #ddd;
  border-radius: 6px; box-shadow: 0 6px 18px rgba(0,0,0,.12); max-height: 340px; overflow-y: auto; }
.lg-search-item { padding: 8px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 1px; }
.lg-search-item + .lg-search-item { border-top: 1px solid #f1f1f1; }
.lg-search-item:hover, .lg-search-item.active { background: #eef2ff; }
.lg-search-name { font-weight: 600; }
.lg-search-empty { padding: 10px 12px; }

/* ---- ledger: Household 360 (cockpit C2) ---- */
.score-badge { display: inline-block; position: relative; }
.score-badge > summary { list-style: none; cursor: pointer; display: inline-block;
  background: #3b5bdb; color: #fff; border-radius: 14px; padding: 3px 12px; }
.score-badge > summary::-webkit-details-marker { display: none; }
.score-badge[open] > summary { background: #2b4acb; }
.score-pop { position: absolute; z-index: 30; left: 0; top: 110%; min-width: 260px;
  background: #fff; border: 1px solid #ddd; border-radius: 6px; padding: 10px 14px;
  box-shadow: 0 6px 18px rgba(0,0,0,.12); }
.score-pop ul { margin: 4px 0; padding-left: 18px; }
.quick-log { margin: 12px 0; padding: 12px; border-left: 4px solid #3b5bdb; }
.quick-log h2 { margin-top: 0; }
.corr-detail p { margin: 3px 0; }

/* ---- ledger: cockpit (C4) ---- */
.cockpit-panel { margin: 12px 0; padding: 14px 16px; }
.cockpit-panel h2 { margin-top: 0; }
.cockpit-big { font-size: 34px; line-height: 1; }
.cockpit-bar { max-width: 420px; }
.pill { display: inline-block; border-radius: 10px; padding: 2px 10px; font-weight: 600; }
.pill-red { background: #ffe3e3; color: #a61e1e; }
.pill-yellow { background: #fff3bf; color: #946200; }
.pill-green { background: #d3f9d8; color: #2b8a3e; }

/* ---- presentation mode (demo mask) ---- */
.present-banner { display: flex; align-items: center; justify-content: center; gap: 12px;
  background: #fff3bf; color: #946200; border-bottom: 1px solid #f0d000;
  padding: 6px 16px; font-size: 14px; }
.present-banner form { display: inline; margin: 0; }
.present-offer { max-width: 1040px; margin: 0 auto; padding: 4px 24px 0; text-align: right; }
.present-toggle { background: none; border: none; cursor: pointer; color: #6b7280;
  font: inherit; font-size: 13px; padding: 2px 6px; }
.present-toggle:hover { color: #16181d; text-decoration: underline; }

/* ---- ledger design tokens + Household Cockpit (household-cockpit-v2) ---- */
:root {
  --navy: #0f1e33; --gold: #c9a24b; --parchment: #f7f3ea;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.hh-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.hh-name { font-family: var(--display); margin: 0 0 2px; color: var(--navy); }
.stat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px; margin: 14px 0 8px; }
.stat { background: var(--parchment); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; min-width: 0; }
.stat .num { display: block; font-size: 1.05rem; font-weight: 600; color: var(--navy);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat .lbl { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); }
.next-chip { display: inline-block; padding: 3px 10px; border-radius: 999px;
  background: #eef1f5; font-size: .85rem; }
.next-chip.overdue { background: #fdf3dc; border: 1px solid var(--gold);
  color: #7a5b12; font-weight: 600; }
.best-years .num { color: var(--navy); }
.mini-list { list-style: none; margin: 6px 0 4px; padding: 0; }
.mini-list li { padding: 5px 0; border-bottom: 1px solid var(--line);
  font-size: .9rem; display: flex; gap: 12px; flex-wrap: wrap; align-items: baseline; }
.hh-log { position: relative; flex: none; }
.hh-log > summary { list-style: none; cursor: pointer; }
.hh-log > summary::-webkit-details-marker { display: none; }
.hh-log-pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30;
  width: min(560px, 90vw); background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 14px 16px; box-shadow: 0 10px 30px rgba(15, 30, 51, .18); }
@media (max-width: 640px) {
  .hh-head { flex-direction: column; }
  .hh-log-pop { position: fixed; left: 12px; right: 12px; width: auto; }
}

/* ---- ledger sticky header + recent/pinned chips (ledger-nav-v1) ---- */
.lg-header { position: sticky; top: 0; z-index: 50; background: var(--navy); color: #fff; }
.lg-header-inner { max-width: 1040px; margin: 0 auto; padding: 8px 24px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.lg-header-screen { font-family: var(--display); font-size: 1.02rem; font-weight: 600;
  display: flex; align-items: center; gap: 8px; min-width: 0; }
.lg-header-screen .lg-header-name { overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; max-width: 40vw; }
.lg-crumb { color: var(--gold); }
.lg-crumb:hover { text-decoration: underline; }
.lg-crumb-sep { color: rgba(255, 255, 255, .5); }
.lg-pin-form { display: inline; margin: 0; }
.lg-pin { background: none; border: none; cursor: pointer; font-size: 1rem;
  opacity: .4; padding: 0 2px; }
.lg-pin.on { opacity: 1; }
.lg-tabs { display: flex; gap: 12px; flex-wrap: wrap; font-size: .82rem; }
.lg-tabs a { color: rgba(255, 255, 255, .75); }
.lg-tabs a:hover { color: #fff; }
.lg-tabs a.active { color: var(--gold); font-weight: 600; }
.lg-header-search { margin-left: auto; flex: 0 1 280px; min-width: 200px; }
.lg-header-search .lg-search { margin: 0; }
.lg-header-search .lg-search-input { padding: 6px 10px; font-size: 13px; }
.lg-chip-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  margin: 2px 0 12px; }
.chip { display: inline-block; padding: 3px 10px; border-radius: 999px;
  background: #eef1f5; border: 1px solid var(--line); color: var(--ink);
  font-size: .85rem; }
.chip:hover { border-color: var(--brand); }
.chip-pinned { background: #fdf3dc; border-color: var(--gold); }
@media (max-width: 720px) {
  .lg-header-inner { padding: 6px 12px; gap: 8px; }
  .lg-header-search { flex-basis: 100%; margin-left: 0; }
}

/* ---- household directory (ledger-doors-v1) ---- */
.lg-search-large .lg-search { max-width: 640px; }
.lg-search-large .lg-search-input { padding: 12px 14px; font-size: 16px; }
.pill-score { background: var(--parchment); color: var(--navy); border: 1px solid var(--gold); }
.lg-dir-row { cursor: pointer; }
.lg-dir-row:hover { background: #f2f5fa; }
.lg-pager { display: flex; gap: 16px; align-items: center; margin-top: 12px; }
