/* Piccard Cockpit v2
   White operator surface carrying the Piccard identity:
   navy ink #0B2545 and action blue #4A7FE8, matching the Piccard logo
   exactly. Two colors carry the whole interface. Fraunces appears twice
   on the whole screen: the wordmark and the summary numerals. Everything
   else is DM Sans set dense with tabular numerals. */

:root {
  --ink: #0B2545;
  --ink-soft: #4A5A72;
  --ink-faint: #8593A6;
  --line: #E3E8EF;
  --line-strong: #C9D2DE;
  --paper: #FFFFFF;
  --panel: #F7F9FB;
  --blue: #4A7FE8;
  --blue-deep: #2F5FC4;
  --hot: #B4232A;
  --hot-bg: #FBEDEE;
  --warm: #96660A;
  --warm-bg: #FBF3E2;
  --ok: #1F7A3D;
  --ok-bg: #EAF6EE;
  --radius: 6px;
  --font-body: 'DM Sans', -apple-system, sans-serif;
  --font-display: 'Fraunces', Georgia, serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.45;
  font-feature-settings: 'tnum';
}

a { color: var(--blue-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: var(--font-body); cursor: pointer; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }

/* Layout */
#app-root { display: flex; min-height: 100vh; }

.rail {
  width: 168px; flex: none;
  border-right: 1px solid var(--line);
  padding: 18px 12px;
  display: flex; flex-direction: column; gap: 4px;
  position: sticky; top: 0; height: 100vh;
}
.rail-logo { width: 118px; height: auto; display: block; margin: 2px 10px 10px; }
.wordmark {
  font-family: var(--font-display);
  font-weight: 900; font-size: 17px; letter-spacing: -0.01em;
  padding: 2px 10px 16px;
}
.wordmark span { color: var(--blue); font-style: italic; }
.nav-item {
  text-align: left; background: none; border: none;
  padding: 8px 10px; border-radius: var(--radius);
  font-size: 14px; font-weight: 500; color: var(--ink-soft);
}
.nav-item:hover { background: var(--panel); color: var(--ink); }
.nav-active { background: var(--ink); color: #fff; }
.nav-active:hover { background: var(--ink); color: #fff; }
.rail-foot { margin-top: auto; font-size: 12px; color: var(--ink-faint); padding: 0 10px; }
.rail-foot button { background: none; border: none; color: var(--ink-faint); font-size: 12px; padding: 0; }
.rail-foot button:hover { color: var(--ink); }
#user-email { display: block; word-break: break-all; margin-bottom: 6px; }

.main { flex: 1; min-width: 0; }

/* Topbar */
.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: var(--paper); z-index: 5;
}
#search {
  flex: 1; max-width: 420px;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 7px 10px; font: inherit; color: var(--ink);
}
#search::placeholder { color: var(--ink-faint); }
#window-select {
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 7px 8px; font: inherit; color: var(--ink); background: var(--paper);
}

/* Keycap legend: the visible signature of a keyboard-first tool */
.keys { display: flex; gap: 6px; align-items: center; margin-left: auto; }
.keys .kc {
  font-size: 11px; color: var(--ink-soft);
  border: 1px solid var(--line-strong); border-bottom-width: 2px;
  border-radius: 4px; padding: 1px 6px; background: var(--panel);
}
.keys .kc-label { font-size: 11px; color: var(--ink-faint); margin-right: 2px; }

.sync { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.sync-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.sync-ok { color: var(--ok); } .sync-ok .sync-dot { background: var(--ok); }
.sync-pending { color: var(--warm); } .sync-pending .sync-dot { background: var(--warm); }
.sync-retry { background: none; border: none; color: var(--blue-deep); font-size: 12px; padding: 0; }

/* Summary cards */
.summary {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px;
  padding: 16px 20px 4px;
}
.card {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 14px; cursor: pointer; background: var(--paper);
}
.card:hover { border-color: var(--line-strong); }
.card-active { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.card-n {
  font-family: var(--font-display); font-weight: 900;
  font-size: 26px; line-height: 1.1; letter-spacing: -0.02em;
}
.card-label { font-size: 12px; color: var(--ink-soft); }

/* Queue table */
.queue { width: 100%; border-collapse: collapse; margin-top: 12px; }
.queue th {
  text-align: left; font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--ink-faint); font-weight: 600;
  padding: 8px 10px; border-bottom: 1px solid var(--line-strong);
}
.queue th:first-child, .queue td:first-child { padding-left: 20px; }
.queue th:last-child, .queue td:last-child { padding-right: 20px; }
.queue td {
  padding: 10px; border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.qrow { cursor: default; }
.qrow:hover { background: var(--panel); }
.row-selected { background: var(--panel); box-shadow: inset 3px 0 0 var(--ink); }
.row-done, .row-snoozed, .row-dismissed { opacity: 0.55; }

.col-pri { width: 54px; white-space: nowrap; }
.pri-n { font-size: 12px; color: var(--ink-faint); }
.pri-top {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--blue); margin-right: 5px; vertical-align: 1px;
}
.who-name { font-weight: 600; }
.who-link { color: var(--ink); }
.who-link:hover { color: var(--blue-deep); text-decoration: underline; }
.drawer-body input[type="text"] {
  width: 100%; border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 7px 10px; font: inherit; color: var(--ink);
}
.who-co { font-size: 12.5px; color: var(--ink-soft); }
.who-reach { font-size: 12.5px; margin-top: 2px; overflow-wrap: anywhere; }
.who-parent { color: var(--blue-deep); }
.col-loan { white-space: nowrap; font-weight: 500; }
.col-why { max-width: 380px; }
.reason { font-weight: 500; }
.angle { font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }
.rollup { font-size: 12px; color: var(--blue-deep); margin-top: 2px; font-weight: 500; }
.state-note { font-size: 12px; color: var(--ink-faint); margin-top: 2px; font-style: italic; }
.col-touch { white-space: nowrap; color: var(--ink-soft); font-size: 13px; }
.muted { color: var(--ink-faint); }

.chip {
  font-size: 11px; font-weight: 600; padding: 1px 7px;
  border-radius: 10px; margin-left: 4px;
}
.chip-hot { background: var(--hot-bg); color: var(--hot); }
.chip-cmbs { background: #EDE9FB; color: #5B3FBF; }
.chip-blanket { background: #E8F0EA; color: #3C6B4A; }

/* Contact enrichment suggestions. Deliberately looks provisional: nothing
   here is saved until Approve is clicked on that specific row. */
.enrich { border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 8px 10px; margin: 6px 0 10px; background: var(--panel); }
.enrich-head { font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-faint); font-weight: 600; margin-bottom: 4px; }
.enrich-foot { margin-top: 6px; }
.enrich-kind { font-size: 11px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.04em; margin-left: 4px; }

/* Blanket loans: the parcels that share one loan, listed under the parcel it
   is counted against. Quiet on purpose, it is context and not a second lead. */
.blanket { margin-top: 4px; padding-left: 8px; border-left: 2px solid var(--line); }
.blanket-head { font-size: 11px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.04em; }
.blanket-addr { font-size: 12px; color: var(--ink-soft); }
.prop-name { font-weight: 600; font-size: 13px; }
.chip-warm { background: var(--warm-bg); color: var(--warm); }
/* A chip that navigates. Keeps the chip shape and colour, drops the default
   anchor styling, and only underlines on hover so it still reads as a chip. */
.chip-link { display: inline-block; text-decoration: none; cursor: pointer; }
.chip-link:hover { text-decoration: underline; }
/* Settled state in the AI research panel: the row stays in place and reports
   what happened, so the list never reshuffles under the pointer. */
.ai-done { font-size: 12px; font-weight: 600; color: var(--ok); }

/* Grouped Today card: one person, every maturing loan listed inside. Members
   after the first are separated by a hairline so three loans read as three
   rather than one run-on block. */
.grp-prop-more { margin-top: 6px; padding-top: 6px; border-top: 1px dotted var(--line); }
.grp-total {
  margin-top: 6px; padding-top: 4px; border-top: 1px solid var(--line-strong);
  font-weight: 600; color: var(--blue-deep);
}
.grp-more {
  margin-top: 6px; padding: 1px 6px; font: inherit; font-size: 12px; font-weight: 500;
  color: var(--blue-deep); background: none; border: 1px solid var(--line-strong);
  border-radius: var(--radius); cursor: pointer;
}
.grp-more:hover { background: var(--panel); }

/* Same-day email guard. Loud on purpose: it is the last thing between a
   second email and a contact who already had one today. */
.samedaywarn {
  background: var(--warm-bg); color: var(--warm);
  border: 1px solid var(--warm); border-radius: var(--radius);
  padding: 10px 12px; margin-bottom: 10px; font-size: 13px;
}
.samedaywarn-title { font-weight: 700; margin-bottom: 2px; }

/* Says why a non-default person is fronting the lead. */
.chip-pref { background: #EDE9FB; color: #5B3FBF; }

/* Selection survives a rebuild now, so returning from a drawer only needs a
   brief cue rather than a scroll hunt. */
@keyframes rowPulse {
  0%   { background: var(--warm-bg); }
  100% { background: transparent; }
}
.row-pulse > td { animation: rowPulse 1.4s ease-out; }
@media (prefers-reduced-motion: reduce) {
  .row-pulse > td { animation: none; box-shadow: inset 0 0 0 2px var(--warm); }
}

/* The order is held while a lead is worked; this is how the sheet admits it. */
.resort-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 7px 11px; margin-bottom: 8px;
  font-size: 12.5px; color: var(--ink-soft);
}

/* A link-list row that carries actions lays out like an assoc-row. */
.intel-row-act { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.intel-row-act .intel-row-main { cursor: pointer; flex: 1; min-width: 0; }
.samedaywarn-ack { margin-top: 6px; font-weight: 600; }
.drawer-foot button[disabled] { opacity: 0.45; cursor: not-allowed; }

.col-actions { min-width: 280px; white-space: nowrap; }
/* Buttons size to their label (October 5, 2026): a fixed 26px box was
   built for the one-letter call list keys and text spilled out of every
   worded button that reused the class. */
.act {
  border: 1px solid var(--line-strong); background: var(--paper);
  border-radius: 4px; min-width: 26px; min-height: 26px; height: auto; width: auto;
  padding: 3px 7px; line-height: 1.2; white-space: nowrap;
  display: inline-flex; align-items: center; justify-content: center; vertical-align: middle;
  font-size: 12px; font-weight: 600; color: var(--ink);
  margin-right: 3px; text-decoration: none;
}
.act:hover { border-color: var(--ink); background: var(--panel); text-decoration: none; }
.act-quiet { color: var(--ink-soft); }
.btn-primary, .btn-secondary { white-space: nowrap; line-height: 1.25; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; }
.btn-primary:hover, .btn-secondary:hover { text-decoration: none; }
button[disabled], .btn-primary[disabled], .btn-secondary[disabled] { opacity: 0.5; cursor: not-allowed; }

/* Drawer */
.drawer-scrim {
  position: fixed; inset: 0; background: rgba(11, 37, 69, 0.28); z-index: 20;
}
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 400px; max-width: 92vw;
  background: var(--paper); z-index: 21;
  border-left: 1px solid var(--line-strong);
  box-shadow: -12px 0 32px rgba(11, 37, 69, 0.12);
  display: flex; flex-direction: column;
}
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid var(--line);
}
.drawer-title { font-weight: 600; font-size: 15px; }
.drawer-close { background: none; border: none; font-size: 20px; color: var(--ink-faint); }
.drawer-body { padding: 16px 18px; flex: 1; overflow-y: auto; }
.drawer-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-top: 1px solid var(--line);
}
.drawer-hint { font-size: 12px; color: var(--ink-faint); }
.field-label {
  display: block; font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--ink-faint); font-weight: 600;
  margin: 14px 0 6px;
}
.field-label:first-child { margin-top: 0; }
textarea, input[type="email"] {
  width: 100%; border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 8px 10px; font: inherit; color: var(--ink); resize: vertical;
}
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg-btn {
  border: 1px solid var(--line-strong); background: var(--paper);
  border-radius: 14px; padding: 4px 11px; font-size: 12.5px; color: var(--ink-soft);
}
.seg-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.fu-date-input { margin-top: 8px; border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 6px 10px; font: inherit; }

.btn-primary {
  background: var(--blue); border: none; color: #fff;
  border-radius: var(--radius); padding: 8px 16px;
  font-size: 14px; font-weight: 600;
}
.btn-primary:hover { background: var(--blue-deep); }

/* Empty states */
.empty { padding: 56px 20px; max-width: 520px; margin: 0 auto; text-align: center; color: var(--ink-soft); }
.empty-title { font-family: var(--font-display); font-weight: 900; font-size: 20px; color: var(--ink); margin-bottom: 8px; }

/* Login */
#login-root { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--panel); }
.login-card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 10px; padding: 32px; width: 380px; max-width: 92vw;
  display: flex; flex-direction: column; gap: 12px;
}
.login-logo { height: 34px; width: auto; align-self: flex-start; }
.login-title { font-family: var(--font-display); font-weight: 900; font-size: 20px; }
.login-sub { font-size: 13px; color: var(--ink-soft); }
.login-status { font-size: 13px; color: var(--ink-soft); min-height: 18px; }

.assoc-row {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 8px; border: 1px solid var(--line); border-radius: var(--radius);
  margin-bottom: 6px;
}
.assoc-main { flex: 1; min-width: 0; cursor: pointer; }
.assoc-main:hover .intel-primary { color: var(--blue-deep); }
.assoc-actions { flex: none; white-space: nowrap; }
.badge {
  font-size: 10px; font-weight: 600; padding: 1px 6px; border-radius: 8px;
  vertical-align: 1px; text-transform: uppercase; letter-spacing: 0.04em;
}
.badge-primary { background: var(--ink); color: #fff; }
.badge-verified { background: var(--ok-bg); color: var(--ok); }
.badge-source { background: var(--panel); color: var(--ink-faint); border: 1px solid var(--line); text-transform: none; letter-spacing: 0; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: -3px; }

.ph-label { font-size: 10.5px; color: var(--ink-faint); font-weight: 600; }
.lend-controls {
  display: flex; gap: 8px; flex-wrap: wrap; padding: 16px 20px 6px; align-items: center;
}
.lend-controls input, .lend-controls select {
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 7px 10px; font: inherit; color: var(--ink); background: var(--paper);
}
#lend-q { flex: 1; min-width: 200px; max-width: 340px; }
.lend-meta { padding: 4px 20px 8px; font-size: 12px; color: var(--ink-faint); }
.lend-list { padding: 0 20px 24px; max-width: 860px; }

.email-picker { margin-bottom: 10px; }
.email-opt { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 13.5px; }
.email-opt input { margin: 0; }
.email-active span { font-weight: 600; }
.email-bad span { text-decoration: line-through; color: var(--ink-faint); }
.email-tag { font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--hot); background: var(--hot-bg); padding: 1px 6px; border-radius: 8px; }
.email-x { background: none; border: none; color: var(--ink-faint); font-size: 11.5px; cursor: pointer; text-decoration: underline; padding: 0; }
.email-x:hover { color: var(--hot); }
.call-intel {
  margin-top: 12px; padding: 10px 12px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
}

/* Toasts */
#toast-root { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 30; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: var(--ink); color: #fff; border-radius: 6px;
  padding: 9px 16px; font-size: 13px;
  box-shadow: 0 6px 18px rgba(11, 37, 69, 0.25);
  transition: opacity 0.3s;
}
.toast-error { background: var(--hot); }
.toast-out { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Narrow screens: keep it usable, full mobile pass is Phase 5 */
@media (max-width: 900px) {
  .rail { width: 56px; padding: 14px 6px; }
  .rail-logo { width: 118px; height: auto; display: block; margin: 2px 10px 10px; }
.wordmark { font-size: 13px; padding: 2px 4px 12px; }
  .nav-item { font-size: 12px; padding: 8px 6px; text-align: center; }
  .rail-foot, .keys { display: none; }
  .summary { grid-template-columns: repeat(2, 1fr); }
  .col-touch, .queue th:nth-child(6) { display: none; }
}

/* ===== Phase 2: Intel ===== */
.intel-hero { padding: 28px 20px 6px; max-width: 720px; }
#intel-q {
  width: 100%; font-size: 17px; padding: 12px 14px;
  border: 1px solid var(--line-strong); border-radius: 8px; color: var(--ink);
}
#intel-q::placeholder { color: var(--ink-faint); }
.intel-hint { font-size: 12px; color: var(--ink-faint); margin-top: 6px; }
.intel-group { padding: 10px 20px 4px; max-width: 720px; }
.intel-group-title {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink-faint); font-weight: 600; margin-bottom: 4px;
}
.intel-row {
  display: flex; align-items: baseline; gap: 12px;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius);
  margin-bottom: 6px; cursor: pointer; background: var(--paper);
}
.intel-row:hover { border-color: var(--blue); background: var(--panel); }
.intel-row-sm { padding: 6px 10px; }
.intel-row-main { flex: 1; min-width: 0; }
.intel-primary { font-weight: 600; }
.intel-secondary { font-size: 12.5px; color: var(--ink-soft); overflow-wrap: anywhere; }
.intel-meta { font-size: 12.5px; color: var(--ink-soft); white-space: nowrap; }

/* Entity drawer */
.drawer-wide { width: min(560px, 100vw); }
.drawer-sub { font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }
.drawer-back {
  background: none; border: none; color: var(--blue-deep);
  font-size: 12.5px; padding: 0; margin-bottom: 4px; display: block;
}
.dsection { margin-bottom: 18px; }
.dsection-title {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink-faint); font-weight: 600; margin-bottom: 6px;
  border-bottom: 1px solid var(--line); padding-bottom: 4px;
}
.dhr { border: none; border-top: 1px solid var(--line); margin: 8px 0; }
/* Field rows: label column fixed, value column shrinks and wraps.
   min-width 0 plus overflow-wrap prevents the v1 overlap bug class. */
.frow { display: flex; gap: 10px; padding: 3px 0; }
.flabel { flex: 0 0 96px; font-size: 12px; color: var(--ink-faint); padding-top: 1px; }
.fvalue { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 13.5px; }
.kv { display: inline-block; margin-right: 10px; font-size: 12.5px; }
.drawer-actions { display: flex; gap: 8px; margin-bottom: 16px; }
.btn-secondary {
  background: var(--paper); border: 1px solid var(--line-strong); color: var(--ink);
  border-radius: var(--radius); padding: 8px 14px; font-size: 13.5px; font-weight: 500;
}
.btn-secondary:hover { border-color: var(--ink); }
.tl-item { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.tl-item:last-child { border-bottom: none; }
.tl-head { display: flex; justify-content: space-between; gap: 10px; }
.tl-type { font-weight: 600; }
.tl-date { color: var(--ink-faint); font-size: 12px; white-space: nowrap; }
.tl-outcome { color: var(--ink-soft); font-size: 12px; }
.tl-body { color: var(--ink-soft); margin-top: 2px; overflow-wrap: anywhere; }

/* ===== Phase 3: Import ===== */
.import-wrap { padding: 20px; max-width: 1060px; }
.import-steps { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; font-size: 13px; }
.step { color: var(--ink-faint); }
.step-active { color: var(--ink); font-weight: 600; }
.step-sep { color: var(--line-strong); }
.dropzone {
  border: 2px dashed var(--line-strong); border-radius: 10px;
  padding: 56px 20px; text-align: center; background: var(--panel);
}
.dz-over { border-color: var(--blue); background: #EEF3FD; }
.dz-title { font-family: var(--font-display); font-weight: 900; font-size: 19px; }
.dz-sub { color: var(--ink-soft); margin-top: 6px; }
.dz-browse { color: var(--blue-deep); cursor: pointer; text-decoration: underline; }
.import-note { font-size: 13px; color: var(--ink-soft); margin: 12px 0; max-width: 720px; }
.map-table { width: 100%; border-collapse: collapse; }
.map-table th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink-faint); font-weight: 600; padding: 8px 10px;
  border-bottom: 1px solid var(--line-strong);
}
.map-table td { padding: 7px 10px; border-bottom: 1px solid var(--line); font-size: 13px; vertical-align: top; }
.map-table select {
  border: 1px solid var(--line-strong); border-radius: 4px; padding: 4px 6px;
  font: inherit; font-size: 12.5px; color: var(--ink); background: var(--paper); max-width: 220px;
}
.review-scroll { max-height: 56vh; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.review-table thead th { position: sticky; top: 0; background: var(--paper); z-index: 2; }
.import-actions { display: flex; gap: 10px; margin-top: 16px; justify-content: flex-end; }
.import-errors { color: var(--hot); font-size: 12.5px; }
.chip-new { background: var(--ok-bg); color: var(--ok); }
.chip-dup { background: #EEF3FD; color: var(--blue-deep); }
.chip-warn { background: var(--warm-bg); color: var(--warm); }
.chip-bad { background: var(--hot-bg); color: var(--hot); }


/* ===== Call console ===== */
.console-scrim { position: fixed; inset: 0; background: rgba(11,37,69,0.45); z-index: 50; }
.console {
  position: fixed; inset: 3vh 3vw; z-index: 51; background: var(--paper);
  border-radius: 12px; box-shadow: 0 24px 60px rgba(11,37,69,0.3);
  display: flex; flex-direction: column; overflow: hidden;
}
.console-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 16px 20px; border-bottom: 1px solid var(--line);
}
.console-name { font-family: var(--font-display); font-weight: 900; font-size: 22px; color: var(--ink); }
.console-sub { font-size: 13px; color: var(--ink-soft); margin-top: 2px; }
.console-body { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 0; overflow: hidden; }
.console-left { padding: 18px 20px; overflow-y: auto; border-right: 1px solid var(--line); background: var(--panel); }
.console-right { padding: 18px 20px; overflow-y: auto; display: flex; flex-direction: column; }

.console-phones { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.console-phone {
  display: inline-flex; flex-direction: column; padding: 8px 14px;
  border: 1px solid var(--blue); border-radius: 8px; color: var(--blue-deep);
  font-weight: 700; font-size: 16px; text-decoration: none; background: var(--paper);
}
.console-phone:hover { background: var(--blue); color: #fff; }
.console-phone-lbl { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.8; }

.console-card { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin-bottom: 12px; }
.console-card-title { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-faint); font-weight: 700; margin-bottom: 6px; }
.console-prop-name { font-weight: 700; font-size: 15px; }
.console-line { font-size: 13px; color: var(--ink-soft); margin-top: 3px; }
.console-loan { font-family: var(--font-display); font-weight: 900; font-size: 26px; color: var(--ink); }
.console-pitch { border-color: var(--blue); }
.console-quote { background: #EEF3FD; border-color: var(--blue); }
.console-quote-rate { font-weight: 800; font-size: 18px; color: var(--blue-deep); margin-top: 2px; }

.console-notes {
  flex: 1; min-height: 220px; width: 100%; resize: vertical;
  border: 1px solid var(--line-strong); border-radius: 8px; padding: 12px;
  font: inherit; font-size: 15px; line-height: 1.5; color: var(--ink);
}
.console-save { font-size: 11.5px; color: var(--ink-faint); margin-top: 4px; height: 14px; }
.console-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.console-tag {
  padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: 20px;
  background: var(--paper); font-size: 13.5px; font-weight: 600; color: var(--ink-soft); cursor: pointer;
}
.console-tag:hover { border-color: var(--ink); }
.console-tag-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.console-callback { margin-top: 12px; }
.console-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.btn-ghost { background: var(--paper) !important; color: var(--blue-deep) !important; border: 1px solid var(--line-strong) !important; }
.btn-ghost:hover { border-color: var(--blue) !important; }

.qrow-hot { background: #F1FAF3; box-shadow: inset 4px 0 0 var(--ok); }
.qrow-hot:hover { background: #E6F5EA; }
.qrow-hot, .qrow-hot td, .qrow-hot a, .qrow-hot .who-name, .qrow-hot .reason { opacity: 1 !important; }
.qrow-hot .who-name::after { content: "READY"; font-size: 9.5px; font-weight: 800; letter-spacing: 0.05em; color: #fff; background: var(--ok); padding: 1px 6px; border-radius: 8px; margin-left: 8px; vertical-align: 2px; }
.hot-flag { display: inline-block; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ok); margin-bottom: 3px; }
.act-call { background: var(--blue); color: #fff; border-color: var(--blue); font-weight: 600; }
.act-call:hover { background: var(--blue-deep); }

@media (max-width: 820px) {
  .console-body { grid-template-columns: 1fr; }
  .console-left { border-right: none; border-bottom: 1px solid var(--line); }
}


/* Reach rows in the call console */
.reach-row {
  display: grid; grid-template-columns: 70px 1fr auto; align-items: center; gap: 10px;
  padding: 9px 10px; margin: 0 -10px; border-radius: 8px; text-decoration: none;
}
.reach-row:hover { background: #EEF3FD; }
.reach-lbl { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-faint); }
.reach-val { font-size: 16.5px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.reach-go {
  font-size: 11px; font-weight: 800; letter-spacing: 0.04em; color: var(--blue-deep);
  border: 1px solid var(--blue); border-radius: 14px; padding: 3px 12px;
}
.reach-row:hover .reach-go { background: var(--blue); color: #fff; }
.reach-bad .reach-val { text-decoration: line-through; color: var(--ink-faint); font-weight: 500; }
.reach-bad .reach-go { color: var(--hot); border-color: var(--hot-bg); background: var(--hot-bg); }
.reach-bad:hover { background: none; cursor: default; }

.badge-sig { background: #EEF3FD; color: var(--blue-deep); border: 1px solid var(--blue); text-transform: none; letter-spacing: 0; }
.who-title { font-size: 12px; color: var(--ink-soft); font-weight: 600; }

.email-dead { text-decoration: line-through; color: var(--hot); font-weight: 500; }
.email-needed { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: var(--hot); }

.sortbtn {
  margin-left: 10px; padding: 8px 14px; border: 1px solid var(--line-strong);
  border-radius: 8px; background: var(--paper); font: inherit; font-size: 13px;
  font-weight: 600; color: var(--ink-soft); cursor: pointer; white-space: nowrap;
}
.sortbtn:hover { border-color: var(--ink); }
.sortbtn-close { background: var(--ink); color: #fff; border-color: var(--ink); }
.pri-close { font-size: 10.5px; font-weight: 700; color: var(--blue-deep); margin-top: 3px; cursor: help; }

.mat-date { font-size: 12px; font-weight: 600; color: var(--ink); margin-top: 2px; }
.console-mat { font-size: 17px; font-weight: 800; color: var(--ink); margin-top: 2px; }

.ai-panel { margin-bottom: 10px; padding: 10px 12px; background: #EEF3FD; border: 1px solid var(--blue); border-radius: var(--radius); }
.ai-angle { font-size: 13px; color: var(--ink); }
.ai-actions { display: flex; gap: 8px; margin-top: 8px; }

/* Signals view (v5.35) */
.sig-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 8px 0 14px; }
.sig-bar select { padding: 6px 8px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--paper); margin-right: 6px; }
.sig-tab-on { border-color: var(--blue) !important; font-weight: 700; }
.sig-row { align-items: flex-start; }
/* v30: a draft card carries up to four actions; let them stack instead of
   overflowing the column. */
.sig-row .assoc-actions { white-space: normal; display: flex; flex-direction: column; gap: 4px; align-items: stretch; min-width: 132px; }
.sig-row .assoc-actions .act { margin: 0; }
.sig-body { white-space: pre-wrap; font: inherit; font-size: 12.5px; color: var(--ink-soft); margin: 6px 0 0; max-width: 640px; }
.chip-warn-text { color: var(--warm); font-weight: 600; }

/* ============ v30: the Desk ============ */
.desk-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.desk-brief { font-size: 15px; line-height: 1.5; max-width: 760px; color: var(--ink); }
.desk-tools { display: flex; gap: 8px; }
.desk-group { margin-bottom: 12px; }
.desk-group-title { font-size: 12px; font-weight: 600; color: var(--ink-soft); margin: 8px 0 4px; }
.desk-row { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); margin-bottom: 8px; }
.desk-main { flex: 1; min-width: 0; font-size: 13px; line-height: 1.45; }
.desk-main .muted { font-size: 12px; }
.desk-actions { flex: none; display: flex; flex-direction: column; gap: 4px; min-width: 160px; }
.desk-actions .act { margin: 0; width: 100%; white-space: nowrap; }
.desk-head .desk-tools .btn-ghost, .desk-head .desk-tools .btn-secondary { white-space: nowrap; }
.desk-body { margin-top: 4px; }
.desk-body summary { cursor: pointer; font-size: 12px; }
@media (max-width: 720px) { .desk-row { flex-direction: column; } .desk-actions { flex-direction: row; flex-wrap: wrap; } }

/* ============ v30: Marketing ============ */
.mk-post { padding: 14px; }
.mk-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.mk-actions { display: flex; gap: 6px; }
.mk-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; }
.mk-platform { margin-bottom: 10px; }
.mk-platform-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; margin-bottom: 4px; }
.mk-platform-tools { display: flex; gap: 4px; flex-wrap: wrap; }
.mk-platform-tools .act { width: auto; padding: 0 8px; margin: 0; }
.mk-text { width: 100%; font: inherit; font-size: 13px; line-height: 1.45; padding: 8px; border: 1px solid var(--line); border-radius: 6px; resize: vertical; color: var(--ink); background: var(--paper); }
.mk-card { width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--line); display: block; }
@media (max-width: 860px) { .mk-grid { grid-template-columns: 1fr; } }

/* ---------- Pipeline board (v31) ---------- */
.pl-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.pl-totals { font-size: 13px; }
.pl-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pl-actions input[type=search] { padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; font: inherit; }
.pl-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 10px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.pl-col { background: var(--paper-2, #F6F5F1); border: 1px solid var(--line); border-radius: 8px; padding: 8px; min-height: 120px; }
.pl-col-head { font-size: 12px; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.pl-col-sum { font-size: 11px; }
.pl-card { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 8px 9px; margin-bottom: 8px; font-size: 12px; }
.pl-card:hover { border-color: var(--line-strong); }
.pl-card-flag { border-color: var(--warm, #9a6700); }
.pl-card-head { display: flex; justify-content: space-between; gap: 6px; align-items: baseline; }
.pl-title { font-weight: 600; cursor: pointer; }
.pl-title:hover { text-decoration: underline; }
.pl-amt { white-space: nowrap; font-variant-numeric: tabular-nums; }
.pl-sub { margin-top: 2px; }
.pl-flag { margin-top: 6px; padding: 6px; background: var(--warm-bg, #FBF3E3); border-radius: 4px; font-size: 11px; }
.pl-flag .act { margin-left: 4px; }
.pl-card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.pl-stage { font: inherit; font-size: 11px; padding: 2px 4px; border: 1px solid var(--line); border-radius: 4px; background: var(--paper); }
.pl-stale { color: var(--hot, #B3261E); font-weight: 600; }
.pl-empty { color: var(--ink-faint); font-size: 12px; padding: 6px 2px; }
.pl-form { margin-bottom: 12px; }
.pl-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px 12px; }
.pl-f { display: flex; flex-direction: column; gap: 2px; font-size: 12px; margin-top: 6px; }
.pl-f span { color: var(--ink-faint); font-size: 11px; }
.pl-f input, .pl-f select, .pl-f textarea { font: inherit; font-size: 13px; padding: 5px 7px; border: 1px solid var(--line); border-radius: 5px; }
.pl-form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.pl-preview { width: 100%; border-collapse: collapse; font-size: 12px; }
.pl-preview th, .pl-preview td { text-align: left; padding: 3px 6px; border-bottom: 1px solid var(--line); }
@media (max-width: 900px) { .pl-grid { grid-template-columns: repeat(2, 1fr); } }
.pl-new { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); font-size: 12px; }
.pl-new:first-of-type { border-top: 0; }

/* Contact call/text notes share the CRM form treatment. */
.contact-history-form { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin:16px 0; }
.contact-history-form p { display:contents; }
.contact-history-form label { display:flex; flex-direction:column; gap:6px; min-width:0; font-size:12px; color:var(--muted,#536475); }
.contact-history-form label:has(textarea), .contact-history-form label:has(#touch-outcome), .contact-history-form label:has(#touch-resume) { grid-column:1 / -1; }
.contact-history-form input, .contact-history-form select, .contact-history-form textarea { font:inherit; font-size:14px; color:#203347; background:white; padding:9px 10px; border:1px solid #cbd5df; border-radius:7px; width:100%; min-width:0; box-sizing:border-box; }
.contact-history-form textarea { resize:vertical; }
.contact-history-form input:focus, .contact-history-form select:focus, .contact-history-form textarea:focus { outline:2px solid #507ce4; outline-offset:1px; }


/* ============ October 5, 2026: Today home, sections, sync ============ */
.calllist-only { display: none !important; }
body.on-calllist .calllist-only { display: revert !important; }
body.on-calllist .keys.calllist-only { display: flex !important; }
.topbar { min-height: 52px; justify-content: flex-end; }
body.on-calllist .topbar { justify-content: flex-start; }
.subnav { display: flex; gap: 4px; padding: 10px 20px 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
.subnav[hidden] { display: none; }
.subnav-item { background: none; border: none; border-bottom: 2px solid transparent; padding: 8px 12px; font-size: 14px; font-weight: 500; color: var(--ink-soft); white-space: nowrap; }
.subnav-item:hover { color: var(--ink); }
.subnav-active { color: var(--ink); border-bottom-color: var(--blue); font-weight: 600; }
.nav-item { white-space: normal; line-height: 1.25; }
.page-title { font-family: var(--font-display); font-weight: 900; font-size: 26px; letter-spacing: -0.01em; margin-bottom: 4px; }

.home { padding: 24px 24px 56px; max-width: 1280px; }
.home-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.home-hero h1 { font-family: var(--font-display); font-weight: 900; font-size: 30px; letter-spacing: -0.01em; }
.home-sub { font-size: 15px; color: var(--ink-soft); margin-top: 4px; }
.home-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.home-alert { border-radius: 8px; padding: 10px 14px; margin-bottom: 10px; font-size: 14px; line-height: 1.45; }
.home-alert-warn { background: var(--warm-bg); color: #6B4A06; border: 1px solid #EBD3A0; }
.home-alert-info { background: var(--panel); color: var(--ink); border: 1px solid var(--line); }
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; margin-top: 8px; }
.home-steps { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.home-step { border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; background: var(--paper); }
.home-step h2 { font-size: 17px; font-weight: 600; display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.home-step h3 { font-size: 13px; font-weight: 600; color: var(--ink-soft); margin: 14px 0 6px; }
.home-n { width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.home-count { background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 1px 9px; font-size: 13px; color: var(--ink-soft); font-weight: 600; }
.home-row { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); }
.home-row:first-of-type { border-top: 0; }
.home-row-hot { background: linear-gradient(90deg, var(--hot-bg), transparent 60%); margin: 0 -18px; padding: 12px 18px; }
.home-main { flex: 1; min-width: 0; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.home-main .muted { font-size: 13px; }
.home-why { margin: 4px 0 2px; padding: 6px 10px; border-left: 3px solid var(--line); background: rgba(0,0,0,0.02); }
.role-missing { font-style: italic; }
.why-kind { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--muted, #667); margin-bottom: 2px; }
.why-related { font-size: 12px; color: var(--muted, #667); }
.why-wait { color: var(--hot, #b4532a); }
.home-actions a.btn-primary { text-decoration: none; display: inline-flex; align-items: center; }
.assoc-sub { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 12.5px; color: var(--muted, #667); }
.assoc-sub a { color: inherit; }
.situation-card { margin: 0 0 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: rgba(0,0,0,0.015); font-size: 13.5px; line-height: 1.5; }
.situation-card .why-related { margin-top: 2px; }
.situation-waiting { border-color: var(--hot); background: var(--hot-bg); }
.situation-act { margin: 8px 0 4px; }
.situation-act a.btn-primary { text-decoration: none; display: inline-flex; }
/* Contact drawer (Oct 6): role and reach first, one row of actions, then what is going on. */
.contact-hero { margin: 0 0 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.contact-role { font-size: 15px; line-height: 1.45; margin-bottom: 8px; }
.contact-role .act { margin-left: 4px; }
.reach-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.reach-chip { display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--paper); font-size: 13.5px; color: var(--ink); max-width: 100%; overflow-wrap: anywhere; }
.reach-chip:hover { border-color: var(--blue); text-decoration: none; }
.reach-chip-sm { padding: 6px 9px; color: var(--blue-deep); }
.reach-k { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-faint); }
.contact-meta { font-size: 12.5px; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.contact-actions .btn-primary, .contact-actions .btn-secondary, .contact-actions .btn-quiet { min-height: 34px; padding: 6px 12px; font-size: 13px; }
.contact-notes p { margin: 0 0 6px; font-size: 13.5px; line-height: 1.5; }
.contact-notes-long { max-height: 9.5em; overflow: hidden; -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent); mask-image: linear-gradient(180deg, #000 70%, transparent); }
.home-actions { flex: none; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; max-width: 330px; }
.home-actions .btn-primary, .home-actions .btn-secondary { min-height: 38px; padding: 7px 14px; font-size: 13.5px; }
.home-read summary { cursor: pointer; font-size: 13px; color: var(--blue-deep); margin-top: 4px; }
.home-read .sig-body { background: var(--panel); border-radius: 6px; padding: 10px 12px; margin-top: 6px; color: var(--ink); font-size: 13px; }
.home-foot { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.home-more { background: none; border: 1px solid var(--line-strong); border-radius: 999px; padding: 6px 12px; font-size: 13px; color: var(--blue-deep); white-space: nowrap; }
.home-more:hover { border-color: var(--blue); }
.home-done { color: var(--ok); font-size: 14px; }
.home-aside { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 64px; }
.home-panel { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; background: var(--panel); font-size: 13.5px; }
.home-panel h3 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-faint); font-weight: 600; margin-bottom: 6px; }
.home-panel p { margin-bottom: 8px; }
.home-panel .btn-secondary { margin-top: 4px; width: 100%; }
.home-num { font-family: var(--font-display); font-weight: 900; font-size: 20px; margin-right: 2px; }
.home-mini { padding: 4px 0; border-top: 1px solid var(--line); font-size: 13px; overflow-wrap: anywhere; }

.engine-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 18px; }
.engine-tile { border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; color: var(--ink); background: var(--paper); display: flex; flex-direction: column; }
.engine-tile:hover { border-color: var(--line-strong); text-decoration: none; }
.engine-tile b { font-family: var(--font-display); font-weight: 900; font-size: 22px; }
.engine-tile span { font-size: 12.5px; color: var(--ink-soft); }
.engine-tile-warn { border-color: #EBD3A0; background: var(--warm-bg); }

.text-select { width: 100%; border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 8px 10px; font: inherit; color: var(--ink); background: var(--paper); }
.text-foot { gap: 8px; flex-wrap: wrap; justify-content: flex-start; }
.text-foot .btn-primary, .text-foot .btn-secondary { min-height: 40px; }

@media (max-width: 1080px) {
  .home-grid { grid-template-columns: 1fr; }
  .home-aside { position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
}
/* Narrow screens and phones: the rail becomes a scrolling top bar instead
   of a 56px column the labels could not fit in. */
@media (max-width: 900px) {
  #app-root { flex-direction: column; }
  .rail { width: auto; height: auto; position: sticky; top: 0; z-index: 8; flex-direction: row; align-items: center; overflow-x: auto; padding: 8px 10px; gap: 4px; border-right: 0; border-bottom: 1px solid var(--line); background: var(--paper); }
  .rail-logo { width: 34px; height: 34px; object-fit: cover; object-position: left; margin: 0 6px 0 0; }
  .wordmark { display: none; }
  .nav-item { white-space: nowrap; font-size: 13.5px; padding: 8px 10px; text-align: center; flex: none; }
  .topbar { position: static; padding: 8px 14px; }
  .home { padding: 16px 14px 48px; }
  .home-hero h1 { font-size: 24px; }
  .home-row { flex-direction: column; gap: 8px; }
  .home-actions { justify-content: flex-start; max-width: none; }
  .home-row-hot { margin: 0 -14px; padding: 12px 14px; }
  .home-step { padding: 14px; }
}

/* Marketing, October 5, 2026: one week, one open post, steps in order. */
.mk-weekbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 6px 0 14px; flex-wrap: wrap; }
.mk-weekname { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; flex: 1; min-width: 200px; }
.mk-list { display: flex; flex-direction: column; gap: 10px; }
.mk-item { border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.mk-item-open { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.mk-row-head { width: 100%; display: flex; align-items: center; gap: 14px; padding: 12px 16px; background: none; border: 0; text-align: left; color: var(--ink); font: inherit; flex-wrap: wrap; }
.mk-day { width: 48px; display: flex; flex-direction: column; align-items: center; flex: none; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); }
.mk-day b { font-family: var(--font-display); font-weight: 900; font-size: 22px; color: var(--ink); letter-spacing: 0; text-transform: none; }
.mk-title { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.mk-title .muted { font-size: 12.5px; }
.mk-caret { color: var(--ink-faint); font-size: 14px; }
.mk-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; padding: 4px 16px 16px; border-top: 1px solid var(--line); }
.mk-steps { display: flex; flex-direction: column; gap: 18px; min-width: 0; padding-top: 12px; }
.mk-step h3 { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.mk-step-later { opacity: 0.75; }
.mk-tabs { padding: 0; margin-bottom: 8px; }
.mk-buttons { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.mk-post-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid var(--line); }
.mk-post-row > b { width: 80px; }
.mk-post-tools { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.mk-post-tools .btn-primary, .mk-post-tools .btn-secondary { padding: 6px 11px; font-size: 13px; min-height: 34px; }
.mk-side { padding-top: 12px; }
.mk-video { margin-top: 12px; font-size: 13px; }
.mk-notes { margin-top: 8px; font-size: 13px; }
.mk-notes summary { cursor: pointer; color: var(--blue-deep); }
.mk-notes ul { margin: 6px 0 0 18px; }
@media (max-width: 860px) { .mk-body { grid-template-columns: 1fr; } .mk-post-tools { margin-left: 0; } }
.desk { padding: 20px 24px 56px; max-width: 1280px; }
@media (max-width: 900px) { .desk { padding: 16px 14px 48px; } }
/* Screens that draw straight into the page get the same gutter as the rest. */
body[data-view="rates"] #view-root, body[data-view="lenders"] #view-root, body[data-view="pipeline"] #view-root { padding: 16px 24px 56px; }
@media (max-width: 900px) { body[data-view="rates"] #view-root, body[data-view="lenders"] #view-root, body[data-view="pipeline"] #view-root { padding: 12px 14px 48px; } }

/* Today: code changes from the car (2026-10-05) */
.btn-danger { background: var(--hot); border: none; color: #fff; border-radius: var(--radius); padding: 8px 16px; font-size: 14px; font-weight: 600; }
.home-change { padding: 8px 0; border-top: 1px solid var(--line); font-size: 13px; overflow-wrap: anywhere; }
.home-change-sum { white-space: pre-wrap; margin: 4px 0; color: var(--ink-soft); }
.home-change-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.home-change-acts a.btn-secondary { text-decoration: none; display: inline-flex; align-items: center; }
.home-change textarea { width: 100%; box-sizing: border-box; margin: 6px 0; border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 6px 8px; font: inherit; }

/* Signals: worker and bot buttons grouped behind two toggles (2026-10-05) */
.sig-tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: -4px 0 16px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.sig-tool-group h4 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); }
.sig-tool-group p { margin: 0 0 8px; font-size: 12.5px; }
.sig-tool-btns { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.sig-tool-btns button { text-align: left; }

/* ---------- Deal workspace v2: header, tabs, screen, call sheet, candidates (v194) ---------- */
.ws-top { position: sticky; top: 0; z-index: 5; background: var(--paper); padding-bottom: 6px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.ws-top .dw-head h2 { font-family: var(--font-display); font-size: 26px; letter-spacing: -.01em; margin: 14px 0 6px; }
.ws-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.ws-chip { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 99px; background: var(--panel); color: var(--ink-soft); border: 1px solid var(--line); text-transform: capitalize; }
.ws-v-pursue { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.ws-v-clarify { background: var(--warm-bg); color: var(--warm); border-color: transparent; }
.ws-v-pass { background: var(--hot-bg); color: var(--hot); border-color: transparent; }
.ws-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.ws-kpis > div { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.ws-kpis span { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); }
.ws-kpis b { display: block; font-size: 17px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.ws-tabs::-webkit-scrollbar { display: none; }
.ws-tab { background: none; border: none; border-bottom: 2px solid transparent; padding: 9px 14px; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink-soft); cursor: pointer; white-space: nowrap; }
.ws-tab:hover { color: var(--ink); }
.ws-tab-on { color: var(--ink); border-bottom-color: var(--blue); }
.ws-screen { border-left: 4px solid var(--line-strong); }
.ws-screen.ws-pursue { border-left-color: var(--ok); }
.ws-screen.ws-clarify { border-left-color: var(--warm); }
.ws-screen.ws-pass { border-left-color: var(--hot); }
.ws-screen-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.ws-verdict { font-family: var(--font-display); font-size: 20px; }
.ws-score { font-size: 12px; font-weight: 600; color: var(--ink-faint); }
.ws-headline { font-size: 15px; margin: 6px 0 10px; }
.ws-list { display: grid; gap: 4px; margin: 8px 0; font-size: 13.5px; }
.ws-list div { padding-left: 18px; position: relative; }
.ws-list div::before { position: absolute; left: 0; top: 0; font-weight: 700; }
.ws-good div::before { content: '\2713'; color: var(--ok); }
.ws-flag div::before { content: '!'; color: var(--hot); left: 4px; }
.ws-ask { background: var(--panel); border-radius: 8px; padding: 12px 14px; margin: 10px 0; }
.ws-ask ol { margin: 6px 0 10px 18px; font-size: 13.5px; }
.ws-more { margin-top: 8px; }
.ws-more > summary { cursor: pointer; font-weight: 600; color: var(--ink-soft); padding: 8px 0; }
.cs-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.cs-head h3 { margin: 0 !important; }
.cs-summary { flex: 1; font-size: 13px; color: var(--ink-soft); min-width: 180px; }
.cs-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.cs-row { display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.cs-row:first-of-type { border-top: 0; }
.cs-closed { opacity: .62; }
.cs-overdue { background: linear-gradient(90deg, var(--hot-bg), transparent 40%); margin: 0 -18px; padding: 12px 18px; }
.cs-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cs-contact { font-size: 13px; color: var(--ink-soft); margin-top: 3px; }
.cs-contact a, .lm-row a { color: var(--blue-deep); text-decoration: none; }
.cs-quote { font-size: 13px; font-weight: 600; margin-top: 4px; }
.cs-note { font-size: 13px; margin-top: 3px; }
.cs-next { font-size: 12.5px; color: var(--warm); font-weight: 600; margin-top: 3px; }
.cs-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.cs-hist { font-size: 12px; max-width: 280px; }
.cs-hist summary { cursor: pointer; color: var(--ink-faint); }
.cs-hist div { padding: 6px 0; border-top: 1px dashed var(--line); }
.cs-chip { font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 99px; background: var(--panel); color: var(--ink-soft); white-space: nowrap; }
.cs-sent, .cs-reviewing { background: #EAF0FD; color: var(--blue-deep); }
.cs-questions { background: var(--warm-bg); color: var(--warm); }
.cs-soft_quote, .cs-loi_pending_credit { background: #EFE9FB; color: #5B3BA8; }
.cs-credit_approved, .cs-closed { background: var(--ok-bg); color: var(--ok); }
.cs-declined, .cs-late { background: var(--hot-bg); color: var(--hot); }
.cs-edit { grid-column: 1 / -1; display: grid; gap: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-top: 4px; }
.cs-edit label { display: grid; gap: 4px; font-size: 12.5px; color: var(--ink-soft); }
.cs-edit input, .cs-edit select, .cs-edit textarea { font: inherit; font-size: 14px; padding: 8px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--paper); color: var(--ink); width: 100%; }
.cs-edit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.cs-edit-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.lm-list { display: grid; gap: 2px; margin: 8px 0 12px; }
.lm-row { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: start; padding: 10px 0; border-top: 1px solid var(--line); }
.lm-score { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.lm-strong { background: var(--ok-bg); color: var(--ok); }
.lm-possible { background: #EAF0FD; color: var(--blue-deep); }
.lm-long_shot { background: var(--panel); color: var(--ink-faint); }
.lm-why { font-size: 13px; margin-top: 2px; }
.lm-caution { font-size: 12.5px; color: var(--warm); margin-top: 2px; }
.share-fresh { background: var(--ok-bg); border-radius: 8px; padding: 12px; margin: 10px 0; }
.share-fresh label { display: grid; gap: 4px; font-size: 12.5px; }
.share-fresh input { font: inherit; font-size: 13px; padding: 8px; border: 1px solid var(--line-strong); border-radius: 6px; width: 100%; }
.share-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
@media (max-width: 820px) {
  .ws-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ws-top { position: static; }
  .cs-row { grid-template-columns: 1fr; }
  .cs-side { flex-direction: row; align-items: center; justify-content: flex-start; }
  .lm-row { grid-template-columns: 40px 1fr; }
  .lm-act { grid-column: 2; }
}
.ag-doc { border-top: 1px solid var(--line); padding: 10px 0; }
.ag-doc > summary { cursor: pointer; padding: 4px 0; list-style-position: inside; }
.ag-doc .cs-edit { margin-top: 10px; }

/* Rates review: the sheet as printed (rates.js _sheetHtml) */
.sg-box { margin: 8px 0; border: 1px solid var(--line, #ddd); border-radius: 6px; padding: 8px 10px; }
.sg-box > summary { cursor: pointer; }
.sg-prog { margin-top: 10px; }
.sg-grid { margin-top: 4px; width: auto; }
.sg-grid th, .sg-grid td { text-align: right; white-space: nowrap; padding: 4px 10px; }
.sg-grid th:first-child, .sg-grid td:first-child { text-align: left; }
.sg-cond { margin-top: 2px; max-width: 760px; }
@media (max-width: 700px) { .sg-prog { overflow-x: auto; } }

/* Deal sheet (Oct 6): the call-ready top of a deal page. */
.ds-sheet { border: 1px solid var(--line); border-radius: 12px; background: var(--paper); padding: 18px 20px; margin: 0 0 18px; }
.ds-head { display: flex; gap: 18px; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; margin-bottom: 14px; }
.ds-head h3 { font-family: var(--font-display); font-size: 22px; font-weight: 600; margin: 2px 0 4px; }
.ds-kicker, .ds-k { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); font-weight: 600; margin-bottom: 6px; }
.ds-k-gap { margin-top: 18px; }
.ds-next { max-width: 440px; background: var(--warm-bg); border-radius: 8px; padding: 10px 12px; font-size: 13.5px; line-height: 1.45; }
.ds-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; }
@media (max-width: 900px) { .ds-grid { grid-template-columns: 1fr; } }
.ds-nums { border-top: 1px solid var(--line); }
.ds-num { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.ds-num-k { color: var(--ink-soft); }
.ds-num-v { font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.ds-basis { font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; padding: 2px 7px; border-radius: 999px; background: var(--panel); color: var(--ink-faint); white-space: nowrap; }
.ds-b-verified { background: var(--ok-bg); color: var(--ok); }
.ds-b-sponsor_statement { background: var(--warm-bg); color: var(--warm); }
.ds-b-unresolved { background: var(--hot-bg); color: var(--hot); }
.ds-side { display: flex; flex-direction: column; gap: 12px; }
.ds-card { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--panel); font-size: 13.5px; }
.ds-person { font-size: 16px; font-weight: 600; }
.ds-list { margin: 4px 0 0 18px; padding: 0; line-height: 1.6; }
.ds-folder { display: inline-flex; margin-bottom: 6px; text-decoration: none; }
.ds-uw { margin-top: 14px; padding: 12px 14px; border-left: 3px solid var(--blue); background: rgba(74,127,232,0.05); border-radius: 0 8px 8px 0; font-size: 13.5px; }
.ds-uw p { margin: 0 0 6px; }
.ds-more { margin-top: 8px; font-size: 13px; }
.ds-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.ds-notes { background: var(--panel); border-radius: 8px; padding: 10px 14px; margin-bottom: 10px; max-height: 260px; overflow: auto; font-size: 13.5px; line-height: 1.5; }
.ds-notes p { margin: 0 0 6px; }
.ds-act { border-bottom: 1px solid var(--line); padding: 8px 0; font-size: 13.5px; }
.ds-act summary { cursor: pointer; }
.ds-act-body { margin-top: 6px; color: var(--ink-soft); line-height: 1.5; white-space: normal; }
.thread-name { font-weight: 700; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); }

/* Pipeline: possible new deals (Oct 6). */
.pl-news { margin: 0 0 18px; }
.pl-news-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.pl-news-head h3 { font-size: 16px; margin: 0; }
.pl-news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.pl-news-card { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--paper); display: flex; flex-direction: column; gap: 4px; }
.pl-news-src { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); font-weight: 600; }
.pl-news-title { font-size: 15px; font-weight: 600; }
.pl-news-meta { font-size: 13px; color: var(--ink-soft); }
.pl-news-why { font-size: 13px; color: var(--ink-soft); line-height: 1.45; margin-top: 2px; }
.pl-news-acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.pl-news-acts button { min-height: 32px; padding: 5px 10px; font-size: 13px; }
.pl-card-acts { display: flex; gap: 6px; margin-top: 6px; }
.pl-news-who { font-size: 13.5px; margin-top: 4px; }
.pl-news-reach { font-size: 12.5px; color: var(--ink-soft); overflow-wrap: anywhere; }
.pl-news-why { font-style: italic; }

/* Campaigns (Oct 7): the Mailshake-style dashboard and the drawer history. */
.cmp-status { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-bottom: 6px; }
.cmp-pill { border: 1px solid var(--line); border-left: 4px solid var(--ok); border-radius: 8px; padding: 8px 12px; background: var(--paper); display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--ink-soft); overflow-wrap: anywhere; }
.cmp-pill b { color: var(--ink); font-size: 14px; }
.cmp-pill-off { border-left-color: var(--warm); }
.cmp-hours { font-size: 13px; margin: 4px 0 16px; }
.cmp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; align-items: start; }
.cmp-card { border: 1px solid var(--line); border-radius: 10px; background: var(--paper); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.cmp-open { grid-column: 1 / -1; border-color: var(--line-strong); }
.cmp-paused { background: var(--panel); }
.cmp-head { all: unset; cursor: pointer; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; border-radius: 6px; }
.cmp-head:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.cmp-title { grid-column: 1; font-size: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.cmp-title .chip { margin-left: 2px; }
.cmp-desc { grid-column: 1; font-size: 13.5px; color: var(--ink-soft); line-height: 1.4; }
.cmp-meta { grid-column: 1; font-size: 12px; }
.cmp-caret { grid-column: 2; grid-row: 1; color: var(--ink-faint); font-size: 14px; }
.cmp-big { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.cmp-big > div { display: flex; flex-direction: column; }
.cmp-n { font-family: var(--font-display); font-weight: 900; font-size: 28px; line-height: 1.05; letter-spacing: -0.02em; color: var(--ink); }
.cmp-l { font-size: 12px; color: var(--ink-soft); }
.cmp-small { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 13px; color: var(--ink-soft); }
.cmp-count b { color: var(--ink); }
.cmp-zero { color: var(--ink-faint); }
.cmp-zero b { color: var(--ink-faint); font-weight: 500; }
.cmp-note { font-size: 13px; color: var(--warm); background: var(--warm-bg); border-radius: 6px; padding: 6px 10px; margin: 0; }
.cmp-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.cmp-switch { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; cursor: pointer; }
.cmp-switch input { appearance: none; -webkit-appearance: none; width: 38px; height: 22px; border-radius: 11px; background: var(--line-strong); position: relative; cursor: pointer; transition: background .15s; margin: 0; flex: none; }
.cmp-switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; }
.cmp-switch input:checked { background: var(--ok); }
.cmp-switch input:checked::after { left: 19px; }
.cmp-switch input:disabled { opacity: .5; cursor: not-allowed; }
.cmp-switch input:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.cmp-switch-off { cursor: not-allowed; color: var(--ink-soft); }
.cmp-cap { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.cmp-cap input { width: 64px; border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 5px 8px; font: inherit; }
.cmp-notes { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.cmp-notes textarea { width: 100%; }
.cmp-notes-text { font-size: 13.5px; color: var(--ink-soft); white-space: pre-wrap; margin: 0; }
.cmp-leads { border-top: 1px solid var(--line); padding-top: 10px; min-width: 0; }
.cmp-leads-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.cmp-filter { margin-left: auto; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.cmp-filter select, .cmp-new select { border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 5px 8px; font: inherit; background: var(--paper); max-width: 100%; }
.cmp-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.cmp-table th:first-child, .cmp-table td:first-child { padding-left: 4px; }
.cmp-table th:last-child, .cmp-table td:last-child { padding-right: 4px; }
.cmp-table td { font-size: 13.5px; }
.cmp-nowrap { white-space: nowrap; }
.cmp-email { font-size: 12px; overflow-wrap: anywhere; }
.cmp-reason { font-size: 12px; margin-top: 2px; max-width: 280px; }
.cmp-subject { max-width: 280px; overflow-wrap: anywhere; }
.cmp-chip { margin-left: 0; white-space: nowrap; }
.cmp-new { margin-bottom: 16px; display: flex; flex-direction: column; gap: 6px; }
.cmp-new input[type="text"], .cmp-new input[type="number"] { border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 6px 9px; font: inherit; width: 100%; box-sizing: border-box; }
.cmp-types { border: 0; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.cmp-types label { font-size: 14px; display: inline-flex; align-items: center; gap: 5px; }
.cmp-form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-top: 6px; }
.cmp-form-row label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--ink-soft); font-weight: 600; }
.cmp-foot { font-size: 12.5px; margin-top: 16px; }
.cmp-hist-c { padding: 6px 0; border-top: 1px solid var(--line); }
.cmp-hist-c:first-child { border-top: 0; padding-top: 0; }
.cmp-hist-name { font-size: 14px; }
.cmp-hist-lead { font-size: 13.5px; margin-top: 4px; }
.cmp-touches { list-style: none; padding: 0; margin: 4px 0 0; font-size: 13px; }
.cmp-touches li { padding: 2px 0; overflow-wrap: anywhere; }
.cmp-touches .muted { display: inline-block; min-width: 52px; }
@media (max-width: 720px) {
  .cmp-grid { grid-template-columns: 1fr; }
  .cmp-n { font-size: 24px; }
  .cmp-filter { margin-left: 0; }
  .cmp-table thead { display: none; }
  .cmp-table, .cmp-table tbody, .cmp-table tr, .cmp-table td { display: block; width: 100%; box-sizing: border-box; }
  .cmp-table tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
  .cmp-table td { border: 0; padding: 2px 4px; }
  .cmp-table td[data-label]:not([data-label="Name"])::before { content: attr(data-label) ': '; color: var(--ink-faint); font-size: 12px; }
  .cmp-table td:empty { display: none; }
  .cmp-reason, .cmp-subject { max-width: none; }
}
