/* DearBill demo twin — one stylesheet for all surfaces.
   Design tokens ported from dearbill-app frontend/shared/src/styles/theme.css
   (brand palette + admin design language) so the twin reads as the real
   admin portal, not a generic prototype. */

:root {
  /* Brand */
  --ember: #b84800;
  --ember-dark: #993c00;
  --cream: #fff7ee;
  --midnight: #091c2e;
  --deep-navy: #1d2d46;
  --steel-blue: #6c909c;
  --cloud-blue: #b6cdd5;
  --slate-teal: #3d6470;

  /* Surface */
  --white: #ffffff;
  --mist: #f8fafb;
  --ice: #f1f8fa;
  --frost: #daecf2;
  --haze: #e2edf0;

  /* Admin design language (copied from theme.css --color-admin-*) */
  --bg: #fafaf9;
  --surface: #ffffff;
  --surface-2: #f6f5f3;
  --border: #e7e5e1;
  --border-strong: #d6d3ce;
  --ink: #0c0a09;
  --ink-hover: #1f1b17;
  --ink-2: #57534e;
  --ink-3: #a8a29e;
  --accent: #2236db;
  --green: #15803d;
  --green-tint: #e6f3ea;
  --amber: #b45309;
  --amber-tint: #fbf1de;
  --red: #b91c1c;
  --red-tint: #fbe7e7;
  --blue: #1d4ed8;
  --blue-tint: #e6ecfb;
  --gray-tint: #eceae6;
  --radius: 6px;
  --radius-badge: 3px;
  --radius-card: 10px;
  --shadow-sm: 0 1px 2px rgb(20 18 14 / 0.04), 0 1px 1px rgb(20 18 14 / 0.03);
  --shadow-card: 0 1px 1.5px rgb(0 0 0 / 0.1), 0 1px 1px rgb(0 0 0 / 0.1);
  --shadow-pop: 0 8px 28px rgb(9 28 46 / 0.14);

  /* Feedback tones */
  --info: #2563eb;
  --info-bg: #eff6ff;
  --warning: #d97706;
  --warning-bg: #fffbeb;
  --warning-border: #fde68a;
  --success: #16a34a;
  --success-bg: #f0fdf4;
  --success-border: #bbf7d0;

  --font-sans: "Outfit", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Libre Caslon Text", Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Consolas, Menlo, monospace;

  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);

  /* AA-safe text tones for small type on tinted backgrounds */
  --amber-text: #92400e;
  --green-text: #166534;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  line-height: 1.45;
}
h1, h2, h3 { margin: 0 0 0.35em; letter-spacing: -0.015em; }
h1 { font-size: 1.375rem; font-weight: 600; }
h2 { font-size: 1rem; font-weight: 600; }
h3 { font-size: 0.875rem; font-weight: 600; }
a { color: var(--accent); }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

/* ---------- Page rhythm ---------- */
/* One header pattern for every counselor page: h1 + quiet sub on the left,
   the page's one action pinned right, consistent gap below. */
.page-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.page-head .page-sub { color: var(--ink-2); font-size: 0.8125rem; margin-top: 2px; }
.page-head .page-side { margin-left: auto; flex: none; }
.main h2 { margin-top: 28px; margin-bottom: 10px; }
.prose { max-width: 65ch; }
.footnote { color: var(--ink-3); font-size: 0.71875rem; max-width: 65ch; }

/* ---------- Admin shell: fixed navy sidebar + slim topbar ---------- */
:root { --side-w: 220px; --atop-h: 48px; }

.admin-side {
  position: fixed; left: 0; top: 0; bottom: 0; width: var(--side-w); z-index: 40;
  background: var(--midnight); color: #cfdce8;
  display: flex; flex-direction: column;
}
.as-brand {
  display: flex; align-items: center; gap: 9px; text-decoration: none;
  padding: 15px 16px 13px; border-bottom: 1px solid rgb(255 255 255 / 0.08);
  color: var(--cream);
}
.as-brand img { width: 26px; height: 26px; border-radius: 6px; }
.as-brand .wordmark { font-family: var(--font-serif); font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; }
.as-env {
  margin-left: auto; font-family: var(--font-mono); font-size: 0.59375rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  background: rgb(255 255 255 / 0.1); color: #a9bdd0;
  border-radius: 4px; padding: 2px 6px;
}
.as-nav { padding: 12px 10px 8px; display: flex; flex-direction: column; gap: 2px; }
.as-link {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 10px; border-radius: 6px; border: none; background: none;
  color: #a9bdd0; font-size: 0.8125rem; font-weight: 500; text-decoration: none;
  text-align: left; transition: background 150ms var(--ease), color 150ms var(--ease);
}
.as-link svg { flex: none; opacity: 0.85; }
.as-link:hover { background: rgb(255 255 255 / 0.07); color: #e8eef4; }
.as-link.active { background: rgb(255 255 255 / 0.12); color: #fff; font-weight: 600; }
.as-count {
  margin-left: auto; min-width: 18px; height: 18px; border-radius: 9px;
  background: var(--ember); color: #fff; font-size: 0.65625rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; padding: 0 5px;
}
.as-divider { margin: 10px 16px; border-top: 1px solid rgb(255 255 255 / 0.08); }
.as-user {
  margin-top: auto; display: flex; align-items: center; gap: 10px;
  padding: 13px 16px; border-top: 1px solid rgb(255 255 255 / 0.08);
}
.as-avatar {
  flex: none; width: 32px; height: 32px; border-radius: 50%;
  background: var(--slate-teal); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.02em;
}
.as-user-meta { min-width: 0; display: flex; flex-direction: column; }
.as-user-name { font-size: 0.78125rem; font-weight: 600; color: #e8eef4; }
.as-user-role { font-size: 0.6875rem; color: #6d8299; }

.admin-top {
  position: sticky; top: 0; z-index: 30; height: var(--atop-h);
  margin-left: var(--side-w);
  background: var(--surface); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 14px; padding: 0 20px;
}
.at-case { display: flex; align-items: center; gap: 10px; font-size: 0.875rem; }
.at-case.at-quiet { color: var(--ink-2); font-size: 0.8125rem; }
.at-spacer { flex: 1; }
.at-search {
  width: 230px; border: 1px solid var(--border-strong); border-radius: 999px;
  padding: 6px 14px; font-size: 0.78125rem; background: var(--surface-2); color: var(--ink);
}
.at-search:focus { outline: none; border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px rgb(34 54 219 / 0.1); }

/* ---------- Layout with copilot ---------- */
.layout { display: flex; gap: 0; align-items: stretch; min-height: calc(100vh - 110px); }
body.has-admin-shell .layout { margin-left: var(--side-w); min-height: calc(100vh - var(--atop-h) - 28px); }
.main { flex: 1; min-width: 0; padding: 24px 28px 64px; max-width: 980px; margin: 0 auto; }
.main.wide { max-width: none; }
body.has-admin-shell .demo-footer { left: var(--side-w); }
@media (max-width: 900px) {
  .admin-side { display: none; }
  .admin-top, body.has-admin-shell .layout { margin-left: 0; }
  body.has-admin-shell .demo-footer { left: 0; }
}

/* ---------- Cards, tables, buttons, badges ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-card); box-shadow: var(--shadow-sm);
  padding: 16px 18px; margin-bottom: 16px;
}
.card .card-title { font-size: 1rem; font-weight: 600; letter-spacing: -0.015em; margin-bottom: 2px; }
.card .card-sub { color: var(--ink-2); font-size: 0.8125rem; }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--ink);
  border-radius: var(--radius); padding: 7px 14px;
  font-size: 0.8125rem; font-weight: 600;
  transition: background 150ms var(--ease), border-color 150ms var(--ease), transform 150ms var(--ease);
  text-decoration: none;
}
.btn:hover { background: var(--surface-2); border-color: var(--ink-3); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.primary:hover { background: var(--ink-hover); border-color: var(--ink-hover); }
.btn.ember { background: var(--ember); border-color: var(--ember); color: #fff; }
.btn.ember:hover { background: var(--ember-dark); border-color: var(--ember-dark); }
.btn.soft { background: #f7ede3; border-color: #f0ddd0; color: var(--ember-dark); }
.btn.soft:hover { background: #f0ddd0; border-color: #e5cab6; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--surface-2); color: var(--ink); border-color: transparent; }
.btn.lg { padding: 11px 20px; font-size: 0.9375rem; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn[disabled]:hover { background: var(--surface); border-color: var(--border-strong); }
.btn.primary[disabled]:hover { background: var(--ink); border-color: var(--ink); }
.btn.ember[disabled]:hover { background: var(--ember); border-color: var(--ember); }

/* Brief acknowledged state for async-ish actions (Text link, Approve, Send). */
.btn.working { position: relative; color: transparent !important; pointer-events: none; }
.btn.working::after {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid rgb(255 255 255 / 0.45); border-top-color: #fff;
  animation: btn-spin 600ms linear infinite;
}
.btn.working:not(.primary):not(.ember)::after { border-color: rgb(12 10 9 / 0.25); border-top-color: var(--ink); }
@keyframes btn-spin { to { transform: rotate(360deg); } }

table.db { width: 100%; border-collapse: collapse; font-size: 0.8125rem; }
table.db th {
  text-align: left; font-size: 0.71875rem; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--ink-3);
  padding: 8px 12px; border-bottom: 1px solid var(--border);
}
table.db td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.db tr:last-child td { border-bottom: 0; }
table.db tbody tr { transition: background 150ms var(--ease); }
table.db tbody tr:hover { background: var(--surface-2); }
table.db tr.rowlink { cursor: pointer; }

/* The calm Members table: three columns, generous rows, one human phrase. */
table.members-calm td { padding: 16px 16px; }
table.members-calm th { padding: 10px 16px; }
table.members-calm .mr-meta { display: block; color: var(--ink-3); font-size: 0.71875rem; margin-top: 2px; }
table.members-calm .mr-situation { color: var(--ink-2); max-width: 46ch; line-height: 1.5; }

.badge {
  display: inline-block; font-size: 0.71875rem; font-weight: 600;
  border-radius: var(--radius-badge); padding: 2px 7px; white-space: nowrap;
  background: var(--gray-tint); color: var(--ink-2);
}
.badge.green { background: var(--green-tint); color: var(--green-text); }
.badge.amber { background: var(--amber-tint); color: var(--amber-text); }
.badge.blue { background: var(--blue-tint); color: var(--blue); }
.badge.red { background: var(--red-tint); color: var(--red); }
.badge.big { font-size: 0.8125rem; padding: 4px 10px; }
.badge.simulated {
  background: var(--amber-tint); color: var(--amber-text);
  border: 1.5px solid var(--amber);
  font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.05em; padding: 4px 10px;
  text-transform: uppercase;
}

/* Source chips on facts */
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.02em;
  border-radius: 999px; padding: 1px 8px;
  border: 1px solid transparent;
}
.chip.src-Counselor { background: var(--blue-tint); color: var(--blue); }
.chip.src-Member { background: var(--green-tint); color: var(--green-text); }
.chip.src-Agent { background: #efe9fb; color: #6d28d9; }
.chip.src-Document { background: var(--gray-tint); color: var(--ink-2); }
.chip .ts { font-weight: 400; opacity: 0.75; }

/* Fact rows — quiet label left, weighted value, chips trail */
.fact-row { display: flex; align-items: baseline; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 0.8125rem; }
.fact-row:last-child { border-bottom: 0; }
.fact-row .fl { width: 190px; flex: none; color: var(--ink-2); font-size: 0.78125rem; }
.fact-row .fv { font-weight: 500; min-width: 120px; color: var(--ink); }
.fact-row .fv.mono { font-family: var(--font-mono); font-size: 0.8125rem; }
.fact-group-label {
  margin: 14px 0 2px; color: var(--ink-3); font-size: 0.71875rem;
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
}
.fact-group-label:first-child { margin-top: 2px; }

/* Designed empty state: one sentence + one action, centered and calm. */
.empty-state { text-align: center; padding: 36px 20px 40px; }
.empty-state .es-text { color: var(--ink-2); font-size: 0.875rem; margin-bottom: 14px; }

/* Forms (counselor inputs) */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 0.78125rem; font-weight: 600; color: var(--ink-2); margin-bottom: 4px; }
.field input, .field select {
  width: 100%; border: 1px solid var(--border-strong); border-radius: var(--radius);
  background: #fbfeff; padding: 8px 10px; font-size: 0.875rem;
  transition: border-color 150ms var(--ease), box-shadow 150ms var(--ease);
}
.field input:focus, .field select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgb(34 54 219 / 0.12); outline: none; }
.field .hint { font-size: 0.75rem; color: var(--ink-3); margin-top: 3px; }
.field.big input { font-size: 1.25rem; padding: 12px 14px; font-weight: 500; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 900px) { .grid4 { grid-template-columns: 1fr 1fr; } .grid2 { grid-template-columns: 1fr; } }

/* Intake timer */
.timer-pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 1.05rem; font-weight: 600;
  background: var(--midnight); color: #fff; border-radius: 999px; padding: 6px 16px;
}
.timer-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; animation: pulse 1.2s infinite; }
.timer-pill.over .dot { background: #fbbf24; }
@keyframes pulse { 50% { opacity: 0.35; } }

/* Program cards */
.program-card { display: flex; gap: 14px; align-items: flex-start; }
.program-card .verdict { flex: none; margin-top: 2px; }
.reason { color: var(--ink-2); font-size: 0.8125rem; line-height: 1.5; }
.meds-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.med-chip { font-size: 0.71875rem; background: var(--ice); color: var(--slate-teal); border: 1px solid var(--frost); border-radius: 999px; padding: 2px 9px; }

/* Case checklist — derives from the timeline; checks tick live */
.checklist {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 6px 18px;
}
.checklist li { display: flex; align-items: center; gap: 7px; font-size: 0.78125rem; color: var(--ink-3); }
.checklist li.done { color: var(--ink); }
.ck-dot {
  width: 16px; height: 16px; border-radius: 50%; flex: none;
  border: 1.5px solid var(--border-strong); background: var(--surface);
  display: flex; align-items: center; justify-content: center;
}
.checklist li.done .ck-dot { background: var(--green); border-color: var(--green); color: #fff; }
/* The current next step: a quiet "do this" affordance to the right surface. */
.checklist li.next { color: var(--ink); }
.checklist li.next .ck-dot { border-color: var(--ember); }
.ck-do {
  font-size: 0.71875rem; font-weight: 600; color: var(--ember); text-decoration: none;
  border: 1px solid #f0ddd0; background: #f7ede3; border-radius: 999px; padding: 1px 9px;
}
.ck-do:hover { background: #f0ddd0; }

/* Education dialog (counselor) */
.edu-dialog {
  border: 1px solid var(--border-strong); border-radius: var(--radius-card);
  box-shadow: var(--shadow-pop); padding: 20px 24px; width: min(540px, 92vw);
}
.edu-dialog::backdrop { background: rgb(9 28 46 / 0.4); }
.edu-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.edu-progress { display: flex; gap: 5px; margin-bottom: 14px; }
.edu-progress i { flex: 1; height: 4px; border-radius: 2px; background: var(--haze); }
.edu-progress i.done { background: var(--ember); }
.edu-kicker { font-size: 0.71875rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--slate-teal); margin-bottom: 6px; }
.edu-body { font-size: 1rem; line-height: 1.6; color: var(--deep-navy); margin: 0 0 6px; }
.edu-step { min-height: 120px; }
.edu-actions { display: flex; gap: 10px; margin-top: 10px; }
.edu-actions .primary, .edu-actions .ember { margin-left: auto; }

/* Missing items */
.missing-list { list-style: none; padding: 0; margin: 0; }
.missing-list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 0.8125rem; }
.missing-list li:last-child { border-bottom: 0; }
.missing-list .who { margin-left: auto; }

/* SMS preview + code */
.sms-preview {
  background: var(--ice); border: 1px solid var(--frost); border-radius: 12px;
  padding: 12px 14px; font-size: 0.8125rem; line-height: 1.55; color: var(--midnight);
  max-width: 460px;
}
.read-code {
  font-family: var(--font-mono); font-size: 2rem; letter-spacing: 0.35em;
  background: var(--midnight); color: #fff; border-radius: 10px;
  padding: 10px 18px 10px 24px; display: inline-block;
}
.code-note { font-size: 0.75rem; color: var(--ink-2); margin-top: 6px; }

/* Diff panel */
.diff-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--warning-bg); border: 1px solid var(--warning-border); border-radius: var(--radius-card); }
.diff-old { background: var(--red-tint); color: var(--red); text-decoration: line-through; border-radius: 4px; padding: 2px 8px; font-weight: 600; }
.diff-new { background: var(--green-tint); color: var(--green); border-radius: 4px; padding: 2px 8px; font-weight: 600; }
.diff-arrow { color: var(--ink-3); }

/* Form recreation iframes */
.form-frame { width: 100%; border: 1px solid var(--border-strong); border-radius: var(--radius); background: #fff; height: 560px; }

/* KPI tiles (dashboard) */
.kpi { text-align: left; }
.kpi .num { font-size: 2rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.kpi .lbl { color: var(--ink-2); font-size: 0.78125rem; margin-top: 2px; }
.kpi .sub { color: var(--ink-3); font-size: 0.71875rem; }
.bars { display: flex; flex-direction: column; gap: 8px; }
.bar-row { display: grid; grid-template-columns: 150px 1fr 40px; align-items: center; gap: 10px; font-size: 0.8125rem; }
.bar-track { background: var(--surface-2); border-radius: 4px; height: 18px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--deep-navy); border-radius: 4px; transition: width 400ms var(--ease); }
.bar-fill.ember { background: var(--ember); }
.methodology { font-size: 0.71875rem; color: var(--ink-3); border-top: 1px dashed var(--border); margin-top: 10px; padding-top: 8px; }

/* ---------- Director dashboard: visual-first ---------- */
/* Hero cards — big numbers, small labels, deltas where a trend exists. */
.hero-card { text-decoration: none; color: inherit; display: block; transition: border-color 200ms var(--ease), transform 200ms var(--ease); }
a.hero-card:hover, a.hero-card:focus-visible { border-color: var(--border-strong); transform: translateY(-1px); }
.hero-card .num { font-size: 2.5rem; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.hero-card .num .quiet { color: var(--ink-3); font-weight: 500; font-size: 1.125rem; }
.hero-card.alert { border-color: var(--red); }
.hero-card.alert .num { color: var(--red); }
.delta-chip {
  font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.02em;
  background: var(--green-tint); color: var(--green-text);
  border-radius: 999px; padding: 2px 8px; white-space: nowrap;
}
.delta-chip.flat { background: var(--gray-tint); color: var(--ink-2); }
/* The quiet info toggle — prose hides until asked for. */
.info-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; margin-left: 3px; vertical-align: -2px; padding: 0;
  border: 1px solid var(--border-strong); border-radius: 50%; background: var(--surface);
  color: var(--ink-3); font-size: 0.625rem; font-weight: 700; font-style: italic; font-family: var(--font-serif);
  transition: color 150ms var(--ease), border-color 150ms var(--ease);
}
.info-btn:hover, .info-btn[aria-expanded="true"] { color: var(--slate-teal); border-color: var(--slate-teal); }

/* Pipeline band */
.pl-svg { width: 100%; height: auto; display: block; }
.pl-svg .seg { fill: var(--frost); transition: fill 200ms var(--ease); }
.pl-svg .seg.watch { fill: var(--amber-tint); }
.pl-svg .seg.zero { fill: var(--surface-2); }
.pl-svg .watch-edge { fill: var(--amber); pointer-events: none; }
.pl-seg:hover .seg, .pl-seg:focus-visible .seg { fill: var(--cloud-blue); }
.pl-seg:hover .seg.watch, .pl-seg:focus-visible .seg.watch { fill: #f6e3bc; }
.pl-seg:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pl-svg .pl-count { font-size: 26px; font-weight: 700; fill: var(--deep-navy); letter-spacing: -0.02em; pointer-events: none; }
.pl-svg .pl-count.zero { fill: var(--ink-3); font-weight: 500; }
.pl-svg .pl-label { font-size: 13.5px; fill: var(--ink-2); pointer-events: none; }
.pl-svg .pl-label.watch { fill: var(--amber-text); font-weight: 600; }
.pl-bottleneck { font-size: 0.75rem; color: var(--ink-3); margin-top: 8px; }
.pl-bottleneck a { color: var(--amber-text); font-weight: 600; text-decoration: none; }
.pl-bottleneck a:hover { text-decoration: underline; }

/* Team load: stacked category bars + the attention dot */
.tl-legend { display: flex; gap: 14px; align-items: center; font-size: 0.6875rem; color: var(--ink-2); margin-top: 6px; }
.tl-legend span { display: inline-flex; align-items: center; gap: 5px; }
.tl-legend .sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.sw.active { background: var(--deep-navy); }
.sw.waiting { background: var(--amber); }
.sw.done { background: var(--green); }
.att-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); display: inline-block; }
.tl-row .tl-name { display: inline-flex; align-items: center; gap: 6px; }
.tl-bar { display: flex; height: 100%; gap: 2px; border-radius: 4px; overflow: hidden; }
.tl-fill { display: block; height: 100%; }
.tl-fill.active { background: var(--deep-navy); }
.tl-fill.waiting { background: var(--amber); }
.tl-fill.done { background: var(--green); }
.tl-count { text-align: right; font-weight: 600; }

/* Trend chart */
.trend-svg { width: 100%; height: auto; display: block; }
.trend-svg .grid { stroke: var(--border); stroke-width: 1; }
.trend-svg .ax { font-size: 13px; fill: var(--ink-3); }
.trend-svg .line { stroke: var(--deep-navy); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.trend-svg .area { fill: var(--deep-navy); opacity: 0.1; }
.trend-svg .dot { fill: var(--surface); stroke: var(--deep-navy); stroke-width: 2; }
.trend-svg .dot.cur { fill: var(--ember); stroke: var(--ember); }

/* Medication-access strip */
.med-strip { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 18px; border-left: 3px solid var(--red); }
.med-strip.clear { border-left-color: var(--green); }
.med-strip .ms-label { font-size: 0.71875rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.med-strip .ms-chip { text-decoration: none; padding: 4px 10px; font-size: 0.78125rem; transition: transform 150ms var(--ease); }
.med-strip .ms-chip:hover, .med-strip .ms-chip:focus-visible { transform: translateY(-1px); }
.med-strip .ms-clear { font-size: 0.8125rem; color: var(--green-text); font-weight: 600; }

/* Load-in motion: bars and bands grow in once (respects reduced motion). */
.grow-in { animation: dash-grow 220ms var(--ease-out) both; transform-origin: left center; }
@keyframes dash-grow { from { opacity: 0; transform: scaleX(0.6); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .grow-in { animation: none; } }

/* Print-clean: the dashboard's charts render black-on-white. */
@media print {
  .hero-card, .med-strip { border-color: #999 !important; }
  .pl-svg .seg, .pl-svg .seg.watch { fill: #fff; stroke: #000; stroke-width: 1; }
  .pl-svg .watch-edge { fill: #000; }
  .pl-svg .pl-count, .pl-svg .pl-label, .trend-svg .ax { fill: #000; }
  .trend-svg .line { stroke: #000; }
  .trend-svg .area { fill: #000; opacity: 0.08; }
  .trend-svg .dot, .trend-svg .dot.cur { fill: #fff; stroke: #000; }
  .tl-fill.active { background: #333; }
  .tl-fill.waiting { background: #888; }
  .tl-fill.done { background: #ccc; }
  .info-btn { display: none; }
  .methodology { display: block !important; }
}

/* ---------- Copilot sidebar ---------- */
.copilot {
  width: 360px; flex: none;
  background: var(--surface); border-left: 1px solid var(--border);
  display: flex; flex-direction: column;
  /* 26px clears the fixed compliance footer so the panel's own footer link stays visible. */
  position: sticky; top: var(--atop-h); height: calc(100vh - var(--atop-h) - 26px);
}
@media (max-width: 1100px) { .copilot { display: none; } }
.copilot-head {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px; border-bottom: 1px solid var(--border);
}
.copilot-head .t { font-weight: 600; font-size: 0.875rem; }
.copilot-head .mode { margin-left: auto; position: relative; }
.copilot-gear { border: none; background: none; color: var(--ink-3); padding: 4px; border-radius: 4px; }
.copilot-gear:hover { background: var(--surface-2); color: var(--ink); }
.copilot-menu {
  position: absolute; right: 0; top: 28px; background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: var(--radius); box-shadow: var(--shadow-pop);
  padding: 6px; z-index: 40; width: 190px;
}
.copilot-menu label { display: flex; align-items: center; gap: 8px; font-size: 0.78125rem; padding: 6px 8px; border-radius: 4px; cursor: pointer; }
.copilot-menu label:hover { background: var(--surface-2); }
.copilot-thread { flex: 1; overflow-y: auto; display: flex; flex-direction: column; }
/* Proactive cards are messages IN the thread flow — one timeline, oldest at
   the top, newest at the bottom like every other message. */
.copilot-card {
  position: relative;
  background: var(--ice); border: 1px solid var(--frost); border-radius: var(--radius-card);
  padding: 12px 14px 12px 18px; overflow: hidden;
  animation: card-in 200ms var(--ease-out) both;
}
.copilot-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: var(--slate-teal); border-radius: 2px 0 0 2px;
}
.copilot-card.answer::before { background: var(--border-strong); }
@keyframes card-in {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: none; }
}
.copilot-card .cc-k { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--slate-teal); margin-bottom: 4px; }
.copilot-card .cc-b { font-size: 0.8125rem; line-height: 1.5; color: var(--midnight); }
.copilot-card .cc-a { margin-top: 10px; }
.copilot-card.answer { background: var(--surface-2); border-color: var(--border); }
.copilot-card.answer .cc-k { color: var(--ink-3); }
.scripted-tag { font-size: 0.625rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-3); background: var(--gray-tint); border-radius: 3px; padding: 1px 5px; margin-left: 6px; vertical-align: middle; }

/* Conversation thread: copilot/counselor bubbles. margin-top:auto on the
   message column anchors a short conversation to the bottom of the panel —
   the input is pinned below, and the thread reads like a chat. */
.copilot-msgs { padding: 12px; display: flex; flex-direction: column; gap: 10px; margin-top: auto; }
.cp-msg { max-width: 92%; font-size: 0.8125rem; line-height: 1.5; }
/* A proactive card rendered as a thread message keeps its card look. */
.cp-msg.bot.copilot-card {
  align-self: stretch; max-width: 100%;
  background: var(--ice); border: 1px solid var(--frost);
  border-radius: var(--radius-card); padding: 12px 14px 12px 18px;
}
/* Compact facts block under a knowledge-base answer */
.cp-facts { margin-top: 8px; border-top: 1px dashed var(--frost); padding-top: 6px; display: flex; flex-direction: column; gap: 4px; }
.cp-fact { display: flex; align-items: baseline; gap: 8px; font-size: 0.71875rem; }
.cp-fact .cpf-fact { color: var(--midnight); font-weight: 600; }
.cp-fact .cpf-src { margin-left: auto; flex: none; font-family: var(--font-mono); font-size: 0.625rem; color: var(--ink-3); }
.cp-msg.you {
  align-self: flex-end;
  background: var(--midnight); color: var(--cream);
  border-radius: 14px 14px 4px 14px; padding: 8px 12px;
}
.cp-msg.bot {
  align-self: flex-start;
  background: var(--ice); border: 1px solid var(--frost); color: var(--midnight);
  border-radius: 14px 14px 14px 4px; padding: 8px 12px;
}
.cp-msg-meta { margin-top: 6px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cp-src { font-size: 0.65625rem; color: var(--slate-teal); font-style: italic; }
.cp-copy {
  border: 1px solid var(--frost); background: #fff; color: var(--slate-teal);
  font-size: 0.6875rem; font-weight: 600; border-radius: 999px; padding: 2px 10px;
}
.cp-copy:hover { background: var(--mist); border-color: var(--cloud-blue); }

/* Suggested-question chips */
.copilot-chips {
  border-top: 1px solid var(--border); padding: 8px 12px 4px;
  display: flex; flex-wrap: wrap; gap: 6px; max-height: 148px; overflow-y: auto;
}
.cp-chip {
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--ink-2);
  font-size: 0.71875rem; font-weight: 500; border-radius: 999px; padding: 4px 11px;
  transition: background 150ms var(--ease), color 150ms var(--ease);
}
.cp-chip:hover { background: var(--surface-2); color: var(--ink); }
.cp-chip.mq { border-color: var(--frost); background: var(--ice); color: var(--slate-teal); }
.cp-chip.mq:hover { background: var(--frost); }
.cp-chip-label {
  width: 100%; font-size: 0.625rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-3); margin: 4px 0 0;
}
.copilot-ask { border-top: 1px solid var(--border); padding: 10px 12px; display: flex; gap: 8px; }
.copilot-ask input {
  flex: 1; border: 1px solid var(--border-strong); border-radius: 999px;
  padding: 8px 14px; font-size: 0.8125rem; background: #fbfeff;
}
.copilot-ask input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgb(34 54 219 / 0.12); }

/* ---------- Director strip (presenter, `d` key) ---------- */
.director-strip {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 100;
  background: var(--midnight); color: #e8eef4;
  display: none; align-items: center; gap: 10px;
  padding: 8px 16px; font-size: 0.78125rem;
  box-shadow: 0 -4px 20px rgb(9 28 46 / 0.3);
}
.director-strip.open { display: flex; }
.director-strip select, .director-strip button {
  background: var(--deep-navy); color: #e8eef4; border: 1px solid #33496b;
  border-radius: 5px; padding: 4px 10px; font-size: 0.75rem; font-weight: 600;
}
.director-strip button:hover { background: #2a3f60; }
.director-strip .spacer { flex: 1; }
.relay-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-3); display: inline-block; }
.relay-dot.up { background: #4ade80; }
.relay-dot.down { background: #f87171; }
.director-strip .hint { color: #8ba3bd; }

/* Simulated phone notification (relay fallback) */
.phone-toast {
  position: fixed; top: 16px; right: 16px; z-index: 120;
  width: 340px; background: rgb(28 28 30 / 0.94); color: #fff;
  border-radius: 16px; padding: 12px 14px; backdrop-filter: blur(8px);
  box-shadow: 0 10px 40px rgb(0 0 0 / 0.35);
  animation: card-in 240ms var(--ease) both;
  font-size: 0.8125rem; line-height: 1.45;
}
.phone-toast .pt-h { display: flex; align-items: center; gap: 6px; font-size: 0.6875rem; color: #9ca3af; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.04em; }
.phone-toast .sim { color: #fbbf24; font-weight: 700; }

/* ---------- Member phone ---------- */
body.member {
  background: var(--cream); font-size: 1.125rem;
  display: flex; flex-direction: column; align-items: center; min-height: 100vh;
}
.phone-shell { width: 100%; max-width: 430px; padding: 0 0 70px; flex: 1; display: flex; flex-direction: column; }
/* Desktop: wrap in a phone frame; on a real phone it fills the screen. */
@media (min-width: 540px) {
  body.member { padding: 28px 0; }
  .phone-shell {
    width: 390px; border: 10px solid var(--midnight); border-radius: 44px;
    background: var(--cream); overflow: hidden; min-height: 760px;
    box-shadow: 0 24px 60px rgb(9 28 46 / 0.3);
  }
}
.m-head {
  background: var(--midnight); color: var(--cream);
  padding: 16px 20px 14px; display: flex; align-items: center; gap: 10px;
}
.m-head img { width: 28px; height: 28px; border-radius: 7px; }
.m-head .wordmark { font-family: var(--font-serif); font-size: 1.2rem; }
.m-head .agency-sm { font-size: 0.75rem; color: var(--cloud-blue); margin-left: auto; text-align: right; max-width: 150px; line-height: 1.3; }
.m-body { padding: 22px 20px 30px; flex: 1; display: flex; flex-direction: column; }
.m-step { animation: step-in 220ms var(--ease) both; display: flex; flex-direction: column; flex: 1; }
@keyframes step-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.m-kicker { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ember); margin-bottom: 6px; }
.m-title { font-family: var(--font-serif); font-size: 1.6rem; line-height: 1.25; color: var(--midnight); margin: 0 0 10px; font-weight: 400; }
.m-text { font-size: 1.125rem; line-height: 1.55; color: var(--deep-navy); }
.m-value {
  font-size: 1.75rem; font-weight: 600; color: var(--midnight);
  background: #fff; border: 1.5px solid var(--haze); border-radius: 14px;
  padding: 16px 18px; margin: 16px 0; text-align: center;
}
.m-value .src-note { display: block; font-size: 0.8125rem; font-weight: 400; color: var(--steel-blue); margin-top: 4px; }
/* Labeled confirm screens (call details): one labeled line per fact. */
.m-value.labeled { text-align: left; font-size: 1.125rem; }
.m-value-line { display: block; padding: 6px 0; border-bottom: 1px solid var(--haze); overflow-wrap: anywhere; }
.m-value-line:last-of-type { border-bottom: 0; }
.m-value-label { display: block; font-size: 0.78125rem; font-weight: 600; color: var(--slate-teal); text-transform: uppercase; letter-spacing: 0.04em; }
.m-actions { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding-top: 18px; }
.m-btn {
  min-height: 56px; border-radius: 14px; font-size: 1.2rem; font-weight: 600;
  border: 2px solid var(--midnight); background: #fff; color: var(--midnight);
  transition: transform 150ms var(--ease), background 150ms var(--ease);
  display: flex; align-items: center; justify-content: center; width: 100%;
}
.m-btn:active { transform: scale(0.985); }
.m-btn:hover { background: var(--mist); }
.m-btn.yes { background: var(--midnight); color: var(--cream); }
.m-btn.yes:hover { background: var(--deep-navy); }
.m-btn.primary { background: var(--ember); border-color: var(--ember); color: #fff; }
.m-btn.primary:hover { background: var(--ember-dark); border-color: var(--ember-dark); }
.m-btn.quiet { border-color: var(--haze); color: var(--slate-teal); font-weight: 500; font-size: 1.05rem; min-height: 48px; }
.m-btn.quiet:hover { background: #fff; border-color: var(--cloud-blue); }
.m-btn[disabled] { opacity: 0.4; cursor: not-allowed; }
.m-btn[disabled]:hover { background: #fff; }
.m-btn.primary[disabled]:hover { background: var(--ember); }
.m-btn.yes[disabled]:hover { background: var(--midnight); }
.m-input {
  width: 100%; min-height: 56px; font-size: 1.4rem; font-weight: 600;
  border: 2px solid var(--cloud-blue); border-radius: 14px; padding: 10px 16px;
  background: #fff; text-align: center;
}
.m-input:focus { outline: none; border-color: var(--ember); box-shadow: 0 0 0 4px rgb(184 72 0 / 0.14); }
.m-progress { display: flex; gap: 5px; margin-bottom: 18px; }
.m-progress i { flex: 1; height: 4px; border-radius: 2px; background: var(--haze); }
.m-progress i.done { background: var(--ember); }

/* The quiet Back affordance — top-left, a 44px touch target. */
.m-back {
  display: inline-flex; align-items: center; gap: 4px;
  min-width: 44px; min-height: 44px; margin: -8px 0 2px -10px; padding: 8px 12px 8px 8px;
  border: none; background: none; border-radius: 12px;
  color: var(--slate-teal); font-size: 1rem; font-weight: 500;
  align-self: flex-start;
}
.m-back:hover { background: #fff; }
.m-back:active { background: var(--frost); }

/* A revisited, already-confirmed value stays visibly confirmed. */
.m-value.is-confirmed { border-color: var(--success-border); background: var(--success-bg); }
.m-value.is-confirmed .src-note { color: var(--green-text); }

/* The signed state a Back can land on — read-only, never an editable form. */
.m-value.sig-locked { border-color: var(--success-border); background: var(--success-bg); }
.sig-typed-show { font-family: var(--font-serif); font-style: italic; font-size: 1.9rem; }

/* The iOS-style Messages thread */
.msgs-screen { margin: -22px -20px -30px; padding: 0 0 20px; background: #fff; }
.msgs-head {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 14px 16px 10px; border-bottom: 0.5px solid #d8d8dc;
  background: rgb(247 247 248 / 0.96);
}
.msgs-avatar {
  width: 44px; height: 44px; border-radius: 50%; background: var(--ember); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; font-weight: 700; letter-spacing: 0.02em;
}
.msgs-from { font-size: 0.8125rem; font-weight: 600; color: #1c1c1e; text-align: center; }
.msgs-from .msgs-sub { display: block; font-size: 0.6875rem; font-weight: 400; color: #8e8e93; }
.msgs-thread { flex: 1; padding: 18px 16px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; }
.msg-row { max-width: 86%; align-self: flex-start; }
.msg-bubble {
  background: #e9e9eb; color: #1c1c1e; border-radius: 18px 18px 18px 5px;
  padding: 10px 14px; font-size: 1rem; line-height: 1.45;
  overflow-wrap: anywhere;
  animation: msg-in 260ms var(--ease-out) both;
}
@keyframes msg-in { from { opacity: 0; transform: translateY(8px) scale(0.97); } to { opacity: 1; transform: none; } }
.msg-bubble .msg-link { color: #0b66d0; text-decoration: underline; }
.msg-time { font-size: 0.6875rem; color: #8e8e93; margin: 4px 0 0 8px; }
.msgs-screen .m-actions { padding: 18px 16px 0; }

/* Learn cards (member education) */
.learn-card {
  background: #fff; border: 1.5px solid var(--haze); border-radius: 18px;
  padding: 22px 20px; margin: 14px 0 10px; min-height: 300px;
  display: flex; flex-direction: column; gap: 6px;
  touch-action: pan-y;
}
.learn-card .m-text { font-size: 1.1875rem; }
.learn-dots { display: flex; gap: 6px; justify-content: center; margin-bottom: 8px; }
.learn-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--haze); }
.learn-dots i.cur { background: var(--ember); }

/* Code entry */
.code-row { display: flex; gap: 8px; justify-content: center; margin: 22px 0; }
.code-cell {
  width: 46px; height: 60px; border: 2px solid var(--cloud-blue); border-radius: 12px;
  background: #fff; font-size: 1.7rem; font-weight: 700; text-align: center;
  font-family: var(--font-mono); color: var(--midnight);
  display: flex; align-items: center; justify-content: center;
}
.code-cell.filled { border-color: var(--midnight); }
.code-cell.bad { border-color: var(--red); animation: shake 300ms var(--ease); }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: auto; }
.keypad button {
  min-height: 58px; font-size: 1.5rem; font-weight: 600;
  border: 1.5px solid var(--haze); border-radius: 14px; background: #fff; color: var(--midnight);
  transition: background 100ms var(--ease), transform 100ms var(--ease);
}
.keypad button:hover { background: var(--mist); }
.keypad button:active, .keypad button.pressed { background: var(--frost); transform: scale(0.96); }
.code-fail { color: var(--red); font-size: 1rem; text-align: center; min-height: 1.5em; }

/* Upload tile */
.upload-tile {
  border: 2.5px dashed var(--cloud-blue); border-radius: 18px; background: #fff;
  min-height: 190px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; color: var(--slate-teal); font-size: 1.05rem; font-weight: 500;
  margin: 16px 0; cursor: pointer; text-align: center; padding: 14px;
}
.upload-tile:hover { border-color: var(--steel-blue); background: var(--mist); }
.upload-tile:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.upload-tile svg { opacity: 0.7; }
.upload-tile img.preview { max-width: 100%; max-height: 200px; border-radius: 10px; }
.upload-tile.has { border-style: solid; border-color: var(--success); }

/* Signature — a clear baseline affordance drawn on the canvas background */
.sig-canvas {
  width: 100%; height: 170px; border: 2px solid var(--cloud-blue);
  border-radius: 14px; touch-action: none; display: block; cursor: crosshair;
  background:
    linear-gradient(var(--cloud-blue), var(--cloud-blue)) no-repeat 18px calc(100% - 38px) / calc(100% - 36px) 1.5px,
    #fff;
}
.sig-hint { font-size: 0.8125rem; color: var(--steel-blue); text-align: center; margin: 6px 0 0; }
.sig-typed {
  font-family: var(--font-serif); font-style: italic; font-size: 1.9rem; text-align: center;
  background: #fff; border: 2px solid var(--cloud-blue); border-radius: 14px;
  width: 100%; min-height: 72px; padding: 12px;
}
.consent-line {
  background: #fff; border-left: 4px solid var(--ember); border-radius: 0 10px 10px 0;
  padding: 12px 14px; font-size: 1.125rem; line-height: 1.55; color: var(--deep-navy); margin: 12px 0;
}
.m-done-check { width: 76px; height: 76px; border-radius: 50%; background: var(--success-bg); border: 2px solid var(--success-border); display: flex; align-items: center; justify-content: center; margin: 10px auto 18px; }
.fix-highlight { animation: fix-glow 900ms var(--ease); }
@keyframes fix-glow { 0% { box-shadow: 0 0 0 6px rgb(22 163 74 / 0.3); } 100% { box-shadow: none; } }

/* ---------- Government form recreations ---------- */
body.govform { background: #e9e7e2; padding: 24px 8px; font-family: var(--font-serif); color: #111; font-size: 13px; }

/* The slim sticky review bar (?review=1 — opened standalone from the review
   screen). The iframe embed never shows it; the parent provides the chrome. */
.review-bar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 10px;
  margin: -24px -8px 18px; padding: 10px 18px;
  background: var(--midnight); color: var(--cream);
  font-family: var(--font-sans); font-size: 0.8125rem;
  box-shadow: 0 2px 12px rgb(9 28 46 / 0.3);
}
.review-bar .rb-title { font-weight: 600; }
.review-bar .rb-spacer { flex: 1; }
.review-bar .btn { border-color: rgb(255 255 255 / 0.35); background: transparent; color: var(--cream); }
.review-bar .btn:hover { background: rgb(255 255 255 / 0.1); border-color: rgb(255 255 255 / 0.5); }
.review-bar .btn.primary { background: var(--ember); border-color: var(--ember); color: #fff; }
.review-bar .btn.primary:hover { background: var(--ember-dark); border-color: var(--ember-dark); }
.gov-sheet {
  background: #fff; max-width: 820px; margin: 0 auto 24px; padding: 34px 44px;
  box-shadow: 0 2px 14px rgb(0 0 0 / 0.12); line-height: 1.35;
}
.gov-omb { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2.5px solid #111; padding-bottom: 8px; margin-bottom: 10px; font-size: 10.5px; }
.gov-omb .agency-line { font-weight: 700; letter-spacing: 0.02em; }
.gov-title { font-size: 17px; font-weight: 700; text-align: center; margin: 10px 0 2px; }
.gov-subtitle { text-align: center; font-size: 11px; margin-bottom: 14px; }
.recreation-note {
  font-family: var(--font-sans); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase;
  background: var(--amber-tint); color: var(--amber-text); border: 1px solid var(--warning-border);
  padding: 4px 10px; text-align: center; margin-bottom: 14px; border-radius: 3px;
}
.gov-section { border: 1.5px solid #111; margin-bottom: 12px; }
.gov-section > .gs-head { background: #111; color: #fff; font-size: 11px; font-weight: 700; padding: 4px 10px; letter-spacing: 0.03em; }
.gov-grid { display: grid; }
.gov-field { border-top: 1px solid #555; padding: 5px 10px 7px; min-height: 46px; position: relative; }
.gov-field:first-child { border-top: 0; }
.gov-field .gf-label { font-size: 9.5px; font-family: var(--font-sans); text-transform: uppercase; letter-spacing: 0.04em; color: #333; display: block; margin-bottom: 2px; }
.gov-field .gf-value { font-size: 14px; min-height: 18px; font-weight: 400; }
.gov-field.filled-by-dearbill { background: var(--ice); }
.gov-field.awaiting { background: var(--warning-bg); }
.gov-field.awaiting .gf-value { color: var(--amber-text); font-family: var(--font-sans); font-size: 11px; font-style: italic; }
.gov-row2 { display: grid; grid-template-columns: 1fr 1fr; }
.gov-row2 > .gov-field + .gov-field { border-left: 1px solid #555; }
.gov-row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; }
.gov-row3 > .gov-field + .gov-field { border-left: 1px solid #555; }
.gf-sig-img { max-height: 54px; }
.gf-sig-typed { font-family: var(--font-serif); font-style: italic; font-size: 19px; }
.gov-legend { font-family: var(--font-sans); font-size: 10.5px; color: var(--ink-2); display: flex; gap: 14px; margin: 0 0 12px; }
.gov-legend .sw { display: inline-block; width: 12px; height: 12px; vertical-align: -2px; margin-right: 4px; border: 1px solid #999; }

/* Packet cover sheet */
.cover-sheet h1 { font-size: 20px; font-family: var(--font-serif); font-weight: 700; }
.cover-sheet ol { font-size: 13.5px; line-height: 1.7; }
.cover-sheet .addr { border: 1.5px solid #111; padding: 10px 14px; display: inline-block; font-size: 14px; line-height: 1.5; margin: 8px 0; }
.cover-sheet .fee-callout {
  border: 2px solid #111; background: #fff; padding: 10px 14px; margin: 10px 0;
  font-size: 14px; font-weight: 700; line-height: 1.5;
}

/* ---------- NJSave stand-in ---------- */
body.njsave { background: #f4f4f0; font-family: var(--font-sans); }
.nj-chrome { background: #41748d; color: #fff; padding: 10px 24px; font-size: 0.9375rem; display: flex; align-items: center; gap: 12px; }
.nj-chrome .nj-seal { width: 30px; height: 30px; border-radius: 50%; background: #fff; color: #41748d; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.7rem; }
.nj-standin-tag { margin-left: auto; font-size: 0.6875rem; background: rgb(255 255 255 / 0.18); border-radius: 4px; padding: 2px 8px; letter-spacing: 0.04em; }
.nj-main { max-width: 760px; margin: 22px auto 80px; padding: 0 16px; }
.nj-steps { display: flex; gap: 0; margin-bottom: 18px; font-size: 0.78125rem; }
.nj-steps .st { flex: 1; text-align: center; padding: 8px 4px; background: #e3e3dc; color: #666; border-right: 2px solid #f4f4f0; }
.nj-steps .st.cur { background: #41748d; color: #fff; font-weight: 700; }
.nj-steps .st.done { background: #2f5a6e; color: #cfe3ec; }
/* The two mapped stages are real tabs — clickable both ways. */
.nj-steps .st[data-stage] { cursor: pointer; }
.nj-steps .st.done-nav { background: #2f5a6e; color: #cfe3ec; }
.nj-steps .st.done-nav:hover { background: #38687e; color: #fff; }
.nj-steps .st[data-stage]:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
/* Later stages stay visibly locked — the honest hard stop. */
.nj-steps .st.locked { opacity: 0.6; cursor: not-allowed; }
.nj-form { background: #fff; border: 1px solid #ccc; padding: 22px 26px; }
.nj-form h2 { font-size: 1.1rem; color: #2f5a6e; border-bottom: 2px solid #41748d; padding-bottom: 6px; }
.nj-field { margin-bottom: 11px; }
.nj-field label { display: block; font-size: 0.78125rem; font-weight: 600; color: #333; margin-bottom: 3px; }
.nj-field input, .nj-field select { width: 100%; border: 1px solid #999; border-radius: 2px; padding: 6px 8px; font-size: 0.875rem; background: #fff; transition: box-shadow 150ms var(--ease-out), border-color 150ms var(--ease-out), background 150ms var(--ease-out); }
.nj-field input:focus, .nj-field select:focus { outline: none; border-color: #41748d; box-shadow: 0 0 0 3px rgb(65 116 141 / 0.18); }
.nj-field input.just-filled { border-color: var(--success); box-shadow: 0 0 0 2px rgb(22 163 74 / 0.22); background: var(--success-bg); }
.nj-field .counselor-completes { font-size: 0.6875rem; color: var(--amber-text); font-weight: 700; margin-left: 6px; text-transform: uppercase; letter-spacing: 0.03em; }
.nj-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
@media (max-width: 640px) { .nj-grid2 { grid-template-columns: 1fr; } }

/* DearBill fill panel over NJSave */
.fill-panel {
  position: fixed; right: 18px; top: 70px; width: 300px; z-index: 60;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-card);
  box-shadow: var(--shadow-pop); padding: 14px 16px;
  animation: card-in 240ms var(--ease) both;
}
.fill-panel .fp-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.fill-panel .fp-head img { width: 20px; height: 20px; border-radius: 5px; }
.fill-panel .fp-counter { font-family: var(--font-mono); font-size: 0.78125rem; color: var(--ink-2); min-height: 2.6em; }
.fill-panel .fp-bar { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; margin: 8px 0; }
.fill-panel .fp-bar i { display: block; height: 100%; background: var(--green); border-radius: 3px; transition: width 160ms var(--ease-out); }
.fill-panel .fp-stop {
  background: var(--amber-tint); border: 1px solid var(--warning-border); border-radius: var(--radius);
  color: var(--amber-text); font-size: 0.78125rem; font-weight: 600; padding: 8px 10px; margin-top: 8px;
}
.fill-panel .fp-done {
  display: flex; align-items: center; gap: 8px;
  background: var(--success-bg); border: 1px solid var(--success-border); border-radius: var(--radius);
  color: var(--green-text); font-size: 0.78125rem; font-weight: 600; padding: 8px 10px; margin-top: 8px;
  animation: fp-done-in 300ms var(--ease-out) both;
}
@keyframes fp-done-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------- Home: the 8:55am priority view ---------- */
.morning-line {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--ice); border: 1px solid var(--frost); border-radius: var(--radius-card);
  padding: 12px 16px; margin-bottom: 20px;
  font-size: 0.9375rem; color: var(--midnight); line-height: 1.5;
}
.morning-line[hidden] { display: none; }
.morning-line img { width: 22px; height: 22px; border-radius: 6px; flex: none; margin-top: 1px; }
.morning-line .ml-src { display: block; font-size: 0.6875rem; color: var(--slate-teal); font-style: italic; margin-top: 2px; }

.prio-list { list-style: none; margin: 0; padding: 0; counter-reset: prio; }
.prio-item {
  display: flex; align-items: flex-start; gap: 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-card); box-shadow: var(--shadow-sm);
  padding: 14px 16px; margin-bottom: 10px;
}
.prio-item .pi-rank {
  counter-increment: prio; flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: var(--midnight); color: var(--cream); font-size: 0.78125rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; margin-top: 1px;
}
.prio-item .pi-rank::before { content: counter(prio); }
.prio-item .pi-main { flex: 1; min-width: 0; }
.prio-item .pi-title { font-weight: 600; font-size: 0.875rem; }
.prio-item .pi-sub { color: var(--ink-2); font-size: 0.8125rem; margin-top: 2px; }
.prio-item .pi-chips { display: flex; gap: 6px; align-items: center; margin-top: 7px; flex-wrap: wrap; }
.prio-item .pi-action { flex: none; align-self: center; }
.why-chip {
  border: none; background: none; color: var(--ink-3); font-size: 0.6875rem; font-weight: 600;
  padding: 2px 6px; border-radius: 999px; cursor: help; position: relative;
}
.why-chip:hover, .why-chip:focus-visible { color: var(--slate-teal); background: var(--ice); }
.why-chip .why-pop {
  display: none; position: absolute; z-index: 50; left: 0; bottom: calc(100% + 6px);
  width: 290px; background: var(--midnight); color: #e8eef4;
  border-radius: 8px; padding: 10px 12px; font-size: 0.71875rem; font-weight: 400;
  line-height: 1.5; text-align: left; box-shadow: var(--shadow-pop);
}
.why-chip:hover .why-pop, .why-chip:focus-visible .why-pop { display: block; }

/* The quiet "+N more" expander below the top-3 list — calm by default. */
.prio-more {
  display: block; width: 100%; text-align: center;
  border: 1px dashed var(--border-strong); background: none; color: var(--ink-2);
  border-radius: var(--radius-card); padding: 9px 14px; margin: 2px 0 4px;
  font-size: 0.78125rem; font-weight: 600;
  transition: background 150ms var(--ease), color 150ms var(--ease);
}
.prio-more:hover { background: var(--surface-2); color: var(--ink); }
.prio-more[hidden] { display: none; }

.today-strip { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
@media (max-width: 900px) { .today-strip { grid-template-columns: 1fr; } }
/* Empty-ish day: the strip collapses to a single quiet line. */
.today-strip.quiet { grid-template-columns: 1fr; }
.today-line {
  display: block; color: var(--ink-2); font-size: 0.8125rem; text-decoration: none;
  background: var(--surface); border: 1px dashed var(--border);
  border-radius: var(--radius-card); padding: 10px 14px;
}
.today-line:hover { border-color: var(--border-strong); color: var(--ink); }
.today-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm); padding: 12px 14px; display: flex; gap: 12px; align-items: flex-start;
  text-decoration: none; color: inherit; transition: border-color 150ms var(--ease);
}
.today-card:hover { border-color: var(--border-strong); }
.today-card .tc-time {
  flex: none; font-family: var(--font-mono); font-size: 0.78125rem; font-weight: 700;
  color: var(--slate-teal); background: var(--ice); border-radius: 6px; padding: 4px 8px;
}
.today-card .tc-member { font-weight: 600; font-size: 0.8125rem; }
.today-card .tc-note { color: var(--ink-2); font-size: 0.75rem; margin-top: 2px; }
.today-card .tc-check {
  flex: none; width: 20px; height: 20px; border-radius: 50%;
  border: 1.5px solid var(--border-strong); background: var(--surface);
  display: flex; align-items: center; justify-content: center; margin-top: 2px;
}
.today-card.done .tc-check { background: var(--green); border-color: var(--green); color: #fff; }
.today-card.done .tc-member { text-decoration: line-through; color: var(--ink-2); }

/* ---------- Messages inbox ---------- */
.inbox { display: grid; grid-template-columns: 300px 1fr; gap: 0; border: 1px solid var(--border); border-radius: var(--radius-card); overflow: hidden; background: var(--surface); box-shadow: var(--shadow-sm); min-height: 520px; }
@media (max-width: 900px) { .inbox { grid-template-columns: 1fr; } .inbox .convo { border-left: 0; border-top: 1px solid var(--border); } }
.thread-list { border-right: 1px solid var(--border); overflow-y: auto; max-height: 72vh; }
.thread-row {
  display: block; width: 100%; text-align: left; border: none; background: none;
  padding: 12px 14px; border-bottom: 1px solid var(--border); cursor: pointer;
  transition: background 120ms var(--ease);
}
.thread-row:hover { background: var(--surface-2); }
.thread-row.sel { background: var(--ice); box-shadow: inset 2px 0 0 var(--ember); }
.thread-row .tr-top { display: flex; align-items: baseline; gap: 8px; }
.thread-row .tr-name { font-weight: 600; font-size: 0.8125rem; }
.thread-row .tr-time { margin-left: auto; font-size: 0.6875rem; color: var(--ink-3); flex: none; }
.thread-row .tr-prev { color: var(--ink-2); font-size: 0.75rem; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-row.unread .tr-name::before {
  content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); margin-right: 6px; vertical-align: 1px;
}
.thread-row.unread .tr-prev { color: var(--ink); font-weight: 600; }
.thread-row .tr-chips { margin-top: 4px; display: flex; gap: 5px; }

.convo { display: flex; flex-direction: column; min-width: 0; }
.convo-head {
  display: flex; align-items: center; gap: 10px; padding: 10px 16px;
  border-bottom: 1px solid var(--border); background: var(--surface);
}
.convo-head .ch-name { font-weight: 600; font-size: 0.875rem; }
.convo-head .ch-rel { color: var(--ink-3); font-size: 0.75rem; }
.convo-thread { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; max-height: 54vh; }
.cv-msg { max-width: 76%; font-size: 0.8125rem; line-height: 1.5; }
.cv-msg .cv-bubble { border-radius: 14px; padding: 8px 12px; overflow-wrap: anywhere; }
.cv-msg.member { align-self: flex-start; }
.cv-msg.member .cv-bubble { background: var(--surface-2); border: 1px solid var(--border); color: var(--ink); border-bottom-left-radius: 4px; }
.cv-msg.counselor { align-self: flex-end; text-align: right; }
.cv-msg.counselor .cv-bubble { background: var(--midnight); color: var(--cream); border-bottom-right-radius: 4px; text-align: left; }
.cv-msg .cv-time { font-size: 0.65625rem; color: var(--ink-3); margin-top: 3px; padding: 0 4px; }
.compose { border-top: 1px solid var(--border); padding: 10px 14px; }
.compose .compose-row { display: flex; gap: 8px; align-items: flex-end; }
.compose textarea {
  flex: 1; border: 1px solid var(--border-strong); border-radius: 12px;
  padding: 8px 12px; font-size: 0.8125rem; background: #fbfeff; resize: vertical; min-height: 40px;
}
.compose textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgb(34 54 219 / 0.12); }
.compose .compose-tools { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.suggest-note { font-size: 0.6875rem; color: var(--slate-teal); font-style: italic; }

/* Requests card (member screen) + request rows */
.request-row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 0.8125rem; }
.request-row:last-child { border-bottom: 0; }
.request-row .rq-q { flex: 1; color: var(--ink-2); font-style: italic; }
.request-row .rq-actions { flex: none; display: flex; gap: 6px; }

/* ---------- Support tickets ---------- */
.ticket-row { display: flex; gap: 12px; align-items: flex-start; padding: 13px 0; border-bottom: 1px solid var(--border); }
.ticket-row:last-child { border-bottom: 0; }
.ticket-row .tk-id { flex: none; font-family: var(--font-mono); font-size: 0.71875rem; color: var(--ink-3); margin-top: 2px; }
.ticket-row .tk-main { flex: 1; min-width: 0; }
.ticket-row .tk-sum { font-weight: 600; font-size: 0.8125rem; }
.ticket-row .tk-meta { color: var(--ink-3); font-size: 0.71875rem; margin-top: 2px; }
.ticket-row .tk-body { color: var(--ink-2); font-size: 0.78125rem; margin-top: 6px; }
.tk-reply {
  margin-top: 8px; background: var(--ice); border: 1px solid var(--frost); border-radius: 10px;
  padding: 9px 12px; font-size: 0.78125rem; color: var(--midnight);
}
.tk-reply .tk-reply-from { font-size: 0.65625rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--slate-teal); margin-bottom: 3px; }
.ctx-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--blue-tint); color: var(--blue); border-radius: 999px;
  font-size: 0.71875rem; font-weight: 600; padding: 3px 6px 3px 10px;
}
.ctx-chip button { border: none; background: none; color: inherit; font-size: 0.8125rem; padding: 0 2px; line-height: 1; cursor: pointer; }

/* Copilot footer link to Support */
.copilot-foot { border-top: 1px solid var(--border); padding: 6px 14px; text-align: center; }
.copilot-foot a { font-size: 0.6875rem; color: var(--ink-3); text-decoration: none; }
.copilot-foot a:hover { color: var(--slate-teal); text-decoration: underline; }

/* ---------- Knowledge base ---------- */
.kb-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 900px) { .kb-list { grid-template-columns: 1fr; } }
.kb-row { text-decoration: none; color: inherit; margin-bottom: 0; display: block; transition: border-color 150ms var(--ease), transform 150ms var(--ease); }
.kb-row:hover, .kb-row:focus-visible { border-color: var(--border-strong); transform: translateY(-1px); }
.kb-row-facts { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 5px; }
.kb-row-facts .badge { white-space: normal; text-align: left; font-weight: 500; }
.kb-src-tag { font-family: var(--font-mono); font-size: 0.625rem; color: var(--slate-teal); letter-spacing: 0.04em; margin-bottom: 4px; }

/* ---------- Guided tour ---------- */
.tour-overlay { position: fixed; inset: 0; z-index: 200; }
.tour-cutout {
  position: absolute; border-radius: 10px; pointer-events: none;
  /* The dim is the cutout's giant box-shadow — one element, a true spotlight. */
  box-shadow: 0 0 0 9999px rgb(9 28 46 / 0.55);
  outline: 2px solid var(--cream); outline-offset: 2px;
  transition: top 260ms var(--ease), left 260ms var(--ease), width 260ms var(--ease), height 260ms var(--ease);
}
.tour-pop {
  position: absolute; z-index: 201; width: 320px; max-width: calc(100vw - 32px);
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius-card); box-shadow: var(--shadow-pop); padding: 14px 16px;
}
.tour-pop .tp-step { font-family: var(--font-mono); font-size: 0.625rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--slate-teal); margin-bottom: 4px; }
.tour-pop .tp-text { font-size: 0.8125rem; line-height: 1.5; color: var(--ink); }
.tour-pop .tp-actions { display: flex; gap: 8px; margin-top: 12px; align-items: center; }
.tour-pop .tp-actions .tp-skip { margin-right: auto; }
.tour-pop .tp-hint { font-size: 0.625rem; color: var(--ink-3); margin-top: 8px; }
@media (prefers-reduced-motion: reduce) { .tour-cutout { transition: none; } }

/* ---------- Settings: agency team ---------- */
.team-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 0.8125rem; }
.team-row:last-child { border-bottom: 0; }
.team-row .tm-name { font-weight: 600; min-width: 170px; }
.team-row .tm-meta { color: var(--ink-3); font-size: 0.71875rem; }
.team-row .tm-side { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.team-roles { margin-top: 12px; border-top: 1px dashed var(--border); padding-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.role-line { font-size: 0.75rem; color: var(--ink-2); }
.role-line strong { color: var(--ink); }

/* The member page's "Assigned to" row — assignment lives here, not in Settings. */
.assigned-row { display: flex; align-items: center; gap: 10px; font-size: 0.8125rem; color: var(--ink-2); margin: 6px 0 2px; }
.assigned-row select {
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  background: var(--surface); padding: 3px 8px; font-size: 0.78125rem;
}

/* ---------- Settings ---------- */
.toggle-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.toggle-row:last-child { border-bottom: 0; }
.toggle-row .tg-main { flex: 1; }
.toggle-row .tg-label { font-weight: 600; font-size: 0.8125rem; }
.toggle-row .tg-sub { color: var(--ink-2); font-size: 0.75rem; margin-top: 1px; }
.switch { position: relative; flex: none; width: 40px; height: 22px; margin-top: 2px; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch .sw-track {
  position: absolute; inset: 0; border-radius: 11px; background: var(--border-strong);
  transition: background 150ms var(--ease); pointer-events: none;
}
.switch .sw-track::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm);
  transition: transform 150ms var(--ease);
}
.switch input:checked + .sw-track { background: var(--green); }
.switch input:checked + .sw-track::after { transform: translateX(18px); }
.switch input:focus-visible + .sw-track { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Index / scene map + the caseload directory ---------- */
.scene-map { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 900px) { .scene-map { grid-template-columns: 1fr; } }
.scene-card { text-decoration: none; color: inherit; display: block; transition: transform 180ms var(--ease), box-shadow 180ms var(--ease); }
.scene-card:hover, .scene-card:focus-visible { transform: translateY(-2px); box-shadow: var(--shadow-pop); }
.scene-num { font-family: var(--font-mono); font-size: 0.71875rem; color: var(--ember); font-weight: 700; }

/* Meet the caseload — the presenter's directory, a card per seeded member. */
.dir-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
@media (max-width: 900px) { .dir-grid { grid-template-columns: 1fr; } }
.dir-card {
  text-decoration: none; color: inherit; display: block; margin-bottom: 0;
  transition: transform 180ms var(--ease), box-shadow 180ms var(--ease), border-color 180ms var(--ease);
}
.dir-card:hover, .dir-card:focus-visible { transform: translateY(-2px); box-shadow: var(--shadow-pop); border-color: var(--border-strong); }
.dir-top { display: flex; align-items: baseline; gap: 10px; }
.dir-name { font-weight: 600; font-size: 0.9375rem; letter-spacing: -0.01em; }
.dir-chip { margin-left: auto; background: var(--ice); color: var(--slate-teal); border: 1px solid var(--frost); flex: none; }
.dir-line { color: var(--ink-2); font-size: 0.8125rem; line-height: 1.5; margin-top: 6px; }

/* ---------- The in-portal call: bar + transcript/suggestion rhythm ----------
   The bar docks under the topbar; the page stays visible and usable. The
   transcript streams into the copilot thread: speaker-labeled lines in a
   quiet mono-adjacent register; live suggestions sit BETWEEN lines as
   bordered cards — the transcript is the call, the suggestions are the
   copilot, and the eye never confuses the two. */
.call-bar {
  position: fixed; top: var(--atop-h); left: var(--side-w); right: 0; z-index: 35;
  display: flex; align-items: center; gap: 12px;
  background: var(--midnight); color: var(--cream);
  padding: 8px 20px; box-shadow: 0 4px 18px rgb(9 28 46 / 0.35);
}
@media (max-width: 900px) { .call-bar { left: 0; } }
body.has-call-bar .main { padding-top: 70px; }
.call-bar .cb-pulse {
  width: 10px; height: 10px; border-radius: 50%; background: #4ade80; flex: none;
  animation: pulse 1.2s infinite;
}
.call-bar .cb-name { font-size: 0.875rem; }
.call-bar .cb-timer { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--cloud-blue); }
.call-bar .cb-spacer { flex: 1; }
.call-bar .btn { border-color: rgb(255 255 255 / 0.35); background: transparent; color: var(--cream); }
.call-bar .btn:hover { background: rgb(255 255 255 / 0.1); border-color: rgb(255 255 255 / 0.5); }
.call-bar .cb-mute.muted { background: rgb(255 255 255 / 0.18); }
.call-bar .cb-end { background: #b91c1c; border-color: #b91c1c; }
.call-bar .cb-end:hover { background: #991b1b; border-color: #991b1b; }

/* Transcript lines: full-width, hairline-left, speaker label above — a
   different species from chat bubbles so the thread reads as two layers. */
.cp-call-head {
  display: flex; align-items: center; gap: 7px;
  font-size: 0.65625rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--slate-teal); padding: 4px 2px 0;
}
.cp-call-head .cch-dot { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; animation: pulse 1.2s infinite; }
.cp-call-line {
  align-self: stretch; max-width: 100%;
  border-left: 2px solid var(--frost); padding: 2px 2px 2px 10px;
  font-size: 0.78125rem; line-height: 1.5; color: var(--ink-2);
  animation: msg-in 220ms var(--ease-out) both;
}
.cp-call-line .cl-who {
  display: block; font-size: 0.625rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 1px;
}
.cp-call-line.cl-member { border-left-color: var(--cloud-blue); color: var(--midnight); }
.cp-call-line.cl-member .cl-who { color: var(--slate-teal); }

/* Live suggestions: quiet cards between transcript lines — ember-edged so
   they read as the copilot speaking, never as the call itself. */
.cp-suggest {
  align-self: stretch; max-width: 100%;
  background: #fdf8f3; border: 1px solid #f0ddd0; border-left: 3px solid var(--ember);
  border-radius: 8px; padding: 9px 12px;
  animation: card-in 200ms var(--ease-out) both;
}
.cp-suggest .cs-k { font-size: 0.625rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ember-dark); margin-bottom: 3px; }
.cp-suggest .cs-b { font-size: 0.75rem; line-height: 1.5; color: var(--ink-2); }
.cp-suggest .cs-say {
  margin-top: 6px; font-size: 0.78125rem; color: var(--midnight); font-style: italic;
  background: #fff; border: 1px dashed #f0ddd0; border-radius: 6px; padding: 6px 9px;
}
.cp-suggest .cs-a { display: flex; gap: 6px; margin-top: 7px; }
.cp-suggest .cs-a .btn { font-size: 0.6875rem; padding: 3px 10px; }
.cp-suggest .cs-add[disabled] { opacity: 0.7; color: var(--green-text); }

/* The call summary — the durable artifact in the member's thread. */
.cp-call-summary { border-left: 3px solid var(--slate-teal); }

/* The member page's call log + items added on a call. */
.call-log-row { display: flex; gap: 10px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 0.8125rem; }
.call-log-row:last-child { border-bottom: 0; }
.call-log-row .clr-when { flex: none; color: var(--ink-3); font-size: 0.71875rem; width: 110px; }
.call-added { color: var(--green-text); }
.call-added .ca-tag { font-size: 0.625rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; background: var(--green-tint); border-radius: 3px; padding: 1px 5px; margin-left: 6px; vertical-align: middle; }

/* ---------- Member dock: parallel member views (chips, bottom-right) ----------
   Dock chips sit above the compliance footer and LEFT of the copilot rail —
   the rail keeps its full width edge; the two never collide. */
.member-dock {
  position: fixed; bottom: 34px; right: 16px; z-index: 90;
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
}
.member-dock.beside-copilot { right: 376px; }
@media (max-width: 1100px) { .member-dock.beside-copilot { right: 16px; } }
.dock-chips { display: flex; gap: 8px; }
.dock-chip {
  position: relative; display: inline-flex; align-items: center; gap: 7px;
  background: var(--midnight); color: var(--cream);
  border: 1px solid rgb(255 255 255 / 0.14); border-radius: 999px;
  padding: 5px 13px 5px 6px; font-size: 0.78125rem; font-weight: 600;
  box-shadow: 0 4px 16px rgb(9 28 46 / 0.3);
  transition: background 150ms var(--ease), transform 150ms var(--ease);
}
.dock-chip:hover { background: var(--deep-navy); transform: translateY(-1px); }
.dock-chip.open { background: var(--deep-navy); outline: 2px solid var(--cloud-blue); outline-offset: 1px; }
.dock-chip .dc-avatar {
  width: 24px; height: 24px; border-radius: 50%; background: var(--slate-teal); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.625rem; font-weight: 700; letter-spacing: 0.02em; flex: none;
}
.dock-chip .dc-pin { font-size: 0.5rem; color: var(--cloud-blue); }
.dock-chip .dc-dot {
  position: absolute; top: -2px; right: -2px; width: 10px; height: 10px;
  border-radius: 50%; border: 2px solid var(--bg);
}
.dock-chip .dc-dot.red { background: #ef4444; }
.dock-chip .dc-dot.amber { background: #f59e0b; }
.dock-chip .dc-dot.blue { background: #3b82f6; }

/* The compact summary pane — expands above the chips, never navigates. */
.dock-pane {
  width: 340px; background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius-card); box-shadow: var(--shadow-pop);
  padding: 13px 15px; animation: card-in 180ms var(--ease-out) both;
}
.dock-pane .dp-head { display: flex; align-items: center; gap: 8px; }
.dock-pane .dp-name { font-size: 0.875rem; }
.dock-pane .dp-close {
  margin-left: auto; border: none; background: none; color: var(--ink-3);
  padding: 4px 6px; border-radius: 4px; font-size: 0.8125rem;
}
.dock-pane .dp-close:hover { background: var(--surface-2); color: var(--ink); }
.dock-pane .dp-facts { color: var(--ink-3); font-size: 0.71875rem; margin-top: 3px; }
.dock-pane .dp-situation { color: var(--ink-2); font-size: 0.8125rem; line-height: 1.5; margin-top: 8px; }
.dock-pane .dp-next {
  margin-top: 9px; background: var(--ice); border: 1px solid var(--frost); border-radius: 8px;
  padding: 7px 10px; font-size: 0.75rem; color: var(--midnight); line-height: 1.45;
}
.dock-pane .dp-next-k {
  font-size: 0.59375rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--slate-teal); margin-right: 5px;
}
.dock-pane .dp-actions { display: flex; gap: 8px; margin-top: 11px; }

/* ---------- Footer ---------- */
.demo-footer {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  text-align: center; font-size: 0.6875rem; color: var(--ink-3);
  background: rgb(250 250 249 / 0.92); backdrop-filter: blur(4px);
  border-top: 1px solid var(--border); padding: 4px 8px;
}
body.member .demo-footer { background: rgb(255 247 238 / 0.94); }
.director-strip.open ~ .demo-footer { bottom: 37px; }

/* ---------- Print (PAAD packet) ---------- */
@page { margin: 0.75in; }
@media print {
  body.govform { background: #fff; padding: 0; color: #000; }
  .gov-sheet {
    box-shadow: none; margin: 0; max-width: none; padding: 0;
    page-break-after: always; break-after: page;
  }
  .gov-sheet:last-of-type, .cover-sheet + iframe { page-break-after: auto; break-after: auto; }
  .no-print, .demo-footer, .director-strip, .recreation-note, .gov-legend, .phone-toast { display: none !important; }
  .gov-field.filled-by-dearbill, .gov-field.awaiting { background: #fff; }
  .gov-field.awaiting .gf-value { color: #000; }
  .gov-field .gf-label { color: #000; }
  .gov-section { break-inside: avoid; }
  .cover-sheet .fee-callout, .cover-sheet .addr { break-inside: avoid; }
  iframe.packet-form { height: 10in !important; max-width: none !important; border: none; }
  a { color: #000; text-decoration: none; }
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .copilot-card, .fill-panel, .phone-toast, .m-step, .dispatch-card.landing { animation: none !important; }
  .nj-field input.just-filled { transition: none; }
}
