/* Human Gold. Utilitarian: black, white and shades of one grey. No gradients, no shadows,
   square corners, system fonts. The only colour left is a red for errors and overdue work,
   because those have to be seen. Maria, 13 Nov 2026: "simple fonts, not so many colors...
   it's more that it looks less like software... a little bit more raw than polished." */
:root {
  --milk: #f5f5f4;          /* app background */
  --cream: #ebebea;         /* recessed fill */
  --paper: #ffffff;         /* cards, fields */
  --wheat: #d6d6d4;         /* strong border */
  --line: #d6d6d4;
  --line-soft: #e7e7e5;
  --honey: #8a8a86;         /* was the gold accent; now mid grey */
  --honey-soft: #e7e7e5;
  --honey-wash: #efefed;
  --harvest: #1a1a19;       /* primary emphasis */
  --harvest-deep: #000000;
  --ink: #111110;
  --ink-2: #4a4a47;
  --ink-3: #76766f;
  --teal: #1a1a19;
  --teal-soft: #e7e7e5;
  --rose: #8c2f2f;          /* errors and overdue only */
  --rose-soft: #f1e8e8;
  --green: #2b2b2a;         /* "done" reads as ink, not colour */
  --green-soft: #e7e7e5;
  --shadow: none;
  --shadow-lift: none;
  --radius: 2px;
  --display: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
  --side: 212px;
  --tabbar: 68px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--milk); color: var(--ink); font: 400 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.2; margin: 0; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: 25px; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }
p { margin: 0; }
a { color: var(--harvest-deep); text-underline-offset: 3px; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--harvest); outline-offset: 2px; border-radius: 0; }
[hidden] { display: none !important; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.small { font-size: 13px; }
.tiny { font-size: 11.5px; }
.eyebrow { font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.stack > * + * { margin-top: var(--gap, 12px); }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.top { align-items: flex-start; }
.spread { justify-content: space-between; }
.grow { flex: 1 1 auto; min-width: 0; }
.center { text-align: center; }

/* ---------- shell ---------- */
.shell { min-height: 100dvh; }
.side { position: fixed; inset: 0 auto 0 0; width: var(--side); background: var(--paper); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 18px 10px 14px; z-index: 20; }
.brand { display: flex; align-items: center; gap: 8px; padding: 0 6px 14px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 20px; height: 20px; flex: none; }
.brand-name { font-family: var(--display); font-size: 15px; font-weight: 600; letter-spacing: 0; line-height: 1; }
.brand-name em { font-style: normal; color: var(--ink); }
.nav { display: flex; flex-direction: column; gap: 1px; margin-top: 10px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 0; color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 13.5px; }
.nav a svg { width: 16px; height: 16px; flex: none; }
.nav a:hover { background: var(--cream); color: var(--ink); }
.nav a.on { background: var(--ink); color: #fff; }
.nav a.on svg { color: #fff; }
.nav .badge { margin-left: auto; }
.nav-sep { height: 1px; background: var(--line); margin: 8px 6px; }
.side-foot { margin-top: auto; padding: 0 6px; }
.side-foot a { display: block; padding: 2px 0; }
.main { margin-left: var(--side); min-height: 100dvh; }
.page { max-width: 1080px; margin: 0 auto; padding: 26px 28px 110px; }
.page.wide { max-width: none; padding: 0; }
.page-head { margin-bottom: 18px; }
.page-head p { color: var(--ink-2); margin-top: 6px; max-width: 70ch; font-size: 14px; }
.topbar, .tabbar { display: none; }

.switcher { position: relative; }
.switch-btn { width: 100%; display: flex; align-items: center; gap: 8px; background: var(--paper); border: 1px solid var(--line); border-radius: 0; padding: 7px 8px; text-align: left; }
.switch-btn:hover { border-color: var(--ink); }
.switch-btn svg { width: 14px; height: 14px; color: var(--ink-3); flex: none; }
.switch-name { font-weight: 600; font-size: 13px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.switch-desc { font-size: 11px; color: var(--ink-3); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: var(--paper); border: 1px solid var(--ink); border-radius: 0; padding: 4px; z-index: 60; min-width: 220px; }
.menu button { display: flex; gap: 8px; align-items: center; width: 100%; text-align: left; background: none; border: 0; border-radius: 0; padding: 8px; }
.menu button:hover { background: var(--cream); }
.menu button.on { background: var(--cream); }
.menu .menu-note { padding: 8px; font-size: 11px; color: var(--ink-3); border-top: 1px solid var(--line-soft); margin-top: 4px; }
.avatar { width: 26px; height: 26px; border-radius: 0; background: var(--cream); color: var(--ink-2); display: grid; place-items: center; font-family: var(--mono); font-weight: 500; font-size: 10.5px; flex: none; }
.avatar.sm { width: 20px; height: 20px; font-size: 9px; }
.avatar.lg { width: 44px; height: 44px; font-size: 15px; }
.avatar.inner { background: var(--ink); color: #fff; }
.avatar.active { background: #9a9a95; color: #fff; }
.avatar.wider { background: var(--cream); color: var(--ink-2); }
.avatar.unclassified { background: var(--paper); color: var(--ink-3); box-shadow: inset 0 0 0 1px var(--line); }
.avatar.prospect { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }

/* ---------- pieces ---------- */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card.flat { border-color: var(--line-soft); }
.card.tint { background: var(--cream); border-color: var(--line); }
.card.pad-lg { padding: 18px; }
.card-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.grid { display: grid; gap: 14px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.main-aside { grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr); align-items: start; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--ink); background: var(--paper); border-radius: 0; padding: 7px 12px; font-weight: 500; font-size: 13px; line-height: 1.2; text-decoration: none; color: var(--ink); min-height: 34px; white-space: nowrap; }
.btn:hover { background: var(--cream); }
.btn svg { width: 15px; height: 15px; flex: none; }
.btn.gold { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }
.btn.gold:hover { background: #000; }
.btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); text-decoration: underline; }
.btn.ghost:hover { background: transparent; color: var(--ink); }
.btn.sm { min-height: 30px; padding: 5px 10px; font-size: 12.5px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: 0.45; cursor: default; }
.chip { display: inline-flex; align-items: center; gap: 5px; border-radius: 0; padding: 2px 7px; font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.02em; text-transform: uppercase; background: transparent; color: var(--ink-2); white-space: nowrap; line-height: 1.6; box-shadow: inset 0 0 0 1px var(--line); }
.chip svg { width: 11px; height: 11px; flex: none; }
.chip.gold { background: var(--ink); color: #fff; box-shadow: none; }
.chip.teal { background: var(--cream); color: var(--ink); box-shadow: none; }
.chip.rose { background: var(--rose-soft); color: var(--rose); box-shadow: none; }
.chip.green { background: var(--cream); color: var(--ink); box-shadow: none; }
.chip.line { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.chip.dashed { background: transparent; box-shadow: none; border: 1px dashed var(--ink-3); color: var(--ink-3); }
.badge { background: var(--ink); color: #fff; border-radius: 0; font-family: var(--mono); font-size: 10.5px; font-weight: 500; min-width: 18px; height: 18px; padding: 0 5px; display: inline-grid; place-items: center; }
.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { border: 1px solid var(--line); background: var(--paper); border-radius: 0; padding: 6px 11px; font-size: 12.5px; font-weight: 500; color: var(--ink-2); min-height: 32px; display: inline-flex; align-items: center; gap: 6px; }
.pill:hover { border-color: var(--ink); }
.pill.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.pill .count { font-family: var(--mono); font-size: 11px; opacity: 0.7; }
.seg { display: inline-flex; background: var(--paper); border-radius: 0; padding: 0; border: 1px solid var(--line); }
.seg button { border: 0; background: none; border-radius: 0; padding: 6px 11px; font-size: 12.5px; font-weight: 500; color: var(--ink-2); min-height: 32px; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--ink); color: #fff; }
.field { width: 100%; border: 1px solid var(--line); background: var(--paper); border-radius: 0; padding: 9px 11px; font-size: 14.5px; }
.field:focus { outline: none; border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
textarea.field { resize: vertical; min-height: 120px; line-height: 1.5; }
label.lab { display: block; font-size: 11.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; }
.divider { height: 1px; background: var(--line-soft); margin: 12px 0; border: 0; }
.list > * + * { border-top: 1px solid var(--line-soft); }
.item { display: flex; gap: 10px; padding: 10px 0; align-items: flex-start; }
.item:first-child { padding-top: 2px; }
.item:last-child { padding-bottom: 2px; }
.item-title { font-weight: 600; line-height: 1.35; }
.people-line { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.person-link { display: inline-flex; align-items: center; gap: 5px; background: none; border: 0; padding: 1px 6px 1px 1px; border-radius: 0; font-weight: 500; font-size: 13px; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); }
.person-link:hover { background: var(--cream); text-decoration-color: var(--ink); }
/* why this person is on your list: the first thing read in a profile */
.why { font-size: 14.5px; line-height: 1.5; color: var(--ink); border-left: 2px solid var(--ink); padding-left: 12px; }
.empty { text-align: center; padding: 28px 18px; color: var(--ink-2); }
.empty h3 { margin-bottom: 6px; }
.skeleton { border-radius: 0; height: 110px; background: var(--cream); }
.note { background: var(--cream); border: 1px solid var(--line); border-radius: 0; padding: 10px 12px; font-size: 13px; color: var(--ink-2); }
.note.teal { background: var(--cream); border-color: var(--line); color: var(--ink-2); }
.kv { display: grid; grid-template-columns: 116px 1fr; gap: 5px 12px; font-size: 13.5px; }
.kv dt { color: var(--ink-3); font-size: 12px; padding-top: 2px; }
.kv dd { margin: 0; }
.bar-row { display: grid; grid-template-columns: minmax(110px, 34%) 1fr 36px; gap: 10px; align-items: center; font-size: 13px; padding: 4px 0; }
.bar { height: 8px; border-radius: 0; background: var(--line-soft); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 0; background: var(--ink); }
.bar > i.teal { background: #6e6e68; }
.bar > i.soft { background: var(--wheat); }
.stat { font-family: var(--mono); font-size: 27px; font-weight: 500; line-height: 1; color: var(--ink); letter-spacing: -0.02em; }
.stat-label { font-size: 11.5px; color: var(--ink-2); margin-top: 5px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.stats > div { background: var(--paper); border: 1px solid var(--line); border-radius: 0; padding: 12px 14px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; padding: 7px 9px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 9px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: var(--cream); }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---------- daily list (opportunities) ---------- */
.move { position: relative; padding-left: 0; }
.move h3 { margin-bottom: 4px; }
.move-meta { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0; }
.outcome { background: var(--cream); border-radius: 0; padding: 10px 12px; margin-top: 10px; }
.outcome .pills { margin-top: 8px; }
.track-col h3 { display: flex; align-items: center; gap: 7px; }
.track-head { display: flex; align-items: baseline; gap: 8px; padding-bottom: 8px; border-bottom: 2px solid var(--ink); margin-bottom: 12px; }
.track-head h2 { font-size: 15px; }
.track-note { font-size: 12px; color: var(--ink-3); }
.dot { width: 8px; height: 8px; border-radius: 0; display: inline-block; flex: none; }
.dot.direct_revenue { background: var(--ink); }
.dot.referral_channel { background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--ink); }
.board-entry { border: 1px solid var(--line-soft); border-radius: 0; padding: 10px 12px; background: var(--paper); }
.board-entry + .board-entry { margin-top: 8px; }
.prio { font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; }
.prio.high { color: var(--ink); } .prio.medium { color: var(--ink-2); } .prio.low { color: var(--ink-3); }
.proposal { border: 1px solid var(--line); border-radius: 0; padding: 12px; background: var(--paper); }
.proposal.ai { border-color: var(--ink-3); border-left-width: 3px; background: var(--paper); }
.proposal + .proposal { margin-top: 8px; }
.due.over { color: var(--rose); font-weight: 600; } .due.today { color: var(--ink); font-weight: 600; }
.check { width: 22px; height: 22px; border-radius: 0; border: 1px solid var(--ink-3); background: var(--paper); flex: none; display: grid; place-items: center; padding: 0; margin-top: 2px; }
.check:hover { border-color: var(--ink); background: var(--cream); }
.check svg { width: 12px; height: 12px; color: var(--ink); opacity: 0; }
.check:hover svg { opacity: 1; }

/* ---------- capture ---------- */
.capture-box { background: var(--paper); border: 1px solid var(--ink); border-radius: 0; padding: 14px; }
.capture-box textarea { border: 0; padding: 2px; min-height: 56px; font-size: 16px; background: transparent; box-shadow: none !important; }
.mic { width: 44px; height: 44px; border-radius: 0; border: 1px solid var(--ink); background: var(--paper); color: var(--ink); display: grid; place-items: center; flex: none; }
.mic svg { width: 20px; height: 20px; }
.mic.live { background: var(--ink); color: #fff; }
.result-line { display: flex; gap: 9px; align-items: flex-start; padding: 7px 0; }
.result-line .ic { width: 18px; height: 18px; border-radius: 0; display: grid; place-items: center; flex: none; margin-top: 2px; }
.result-line .ic svg { width: 11px; height: 11px; }
.ic.ok { background: var(--ink); color: #fff; } .ic.wait { background: var(--cream); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); } .ic.ai { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink-3); } .ic.err { background: var(--rose); color: #fff; }
/* Capture: one chat, filling the screen. Your words, then what was recorded and where it leads. */
.chat-page { display: flex; flex-direction: column; height: calc(100dvh - 150px); }
.chat-about { border: 1px solid var(--line); border-bottom: 0; background: var(--cream); padding: 9px 12px; }
.chat { flex: 1 1 auto; min-height: 0; border: 1px solid var(--line); border-bottom: 0; background: var(--paper); padding: 14px; overflow-y: auto; }
.chat-empty { padding: 8vh 10px; text-align: center; }
.turn { display: grid; grid-template-columns: 92px 1fr; gap: 12px; padding: 10px 0; font-size: 14.5px; line-height: 1.5; }
.turn + .turn { border-top: 1px solid var(--line-soft); }
.turn-who { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); padding-top: 3px; }
.turn.app .turn-who { color: var(--ink); }
.said + .said { margin-top: 10px; }
.said ul { margin: 3px 0 0; padding-left: 16px; font-size: 13.5px; }
.said li { margin-top: 2px; }
.said .proposal { margin-top: 5px; }
.leads .lead { border-left: 2px solid var(--ink); padding-left: 10px; margin-top: 6px; }
.ask { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line-soft); font-weight: 600; }
.offer { border: 1px solid var(--ink); padding: 10px 12px; }
/* reviewing what you have told the business-model chat, to change any of it */
.review { display: flex; flex-direction: column; gap: 6px; }
.review button { text-align: left; background: var(--paper); border: 1px solid var(--line); padding: 9px 11px; width: 100%; line-height: 1.45; }
.review button:hover { border-color: var(--ink); background: var(--cream); }
.review button b { display: block; font-size: 13px; }
.review button span { display: block; font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.said .draft { margin-top: 6px; }
@media (max-width: 900px) {
  .chat-page { height: calc(100dvh - 50px - var(--tabbar) - env(safe-area-inset-bottom) - 28px); }
  .turn { grid-template-columns: 1fr; gap: 2px; }
}

/* ---------- network ---------- */
.net { display: grid; grid-template-columns: minmax(0, 1fr); height: 100dvh; }
.net-map { position: relative; background: var(--milk); overflow: hidden; }
.net-map svg.graph { width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.net-map svg.graph:active { cursor: grabbing; }
.net-head { position: absolute; left: 18px; top: 16px; right: 18px; display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; pointer-events: none; flex-wrap: wrap; }
.net-head > * { pointer-events: auto; }
.net-title { background: var(--paper); border: 1px solid var(--line); border-radius: 0; padding: 8px 12px; }
.net-title h2 { font-size: 15px; }
.net-search { display: flex; gap: 0; background: var(--paper); border: 1px solid var(--ink); border-radius: 0; }
.net-search input { border: 0; background: transparent; padding: 8px 10px; font-size: 13.5px; width: 260px; }
.net-search input:focus { outline: none; }
.net-search button { border: 0; border-left: 1px solid var(--line); background: var(--paper); padding: 0 11px; font-size: 12.5px; font-weight: 500; }
.net-hint { font-size: 11.5px; color: var(--ink-3); margin-top: 5px; }
.legend { position: absolute; left: 18px; bottom: 16px; background: var(--paper); border: 1px solid var(--line); border-radius: 0; padding: 8px 11px; font-size: 11.5px; display: flex; flex-direction: column; gap: 4px; max-width: 240px; }
.legend-row { display: flex; align-items: center; gap: 7px; }
.legend .sw { width: 11px; height: 11px; border-radius: 0; flex: none; }
.legend .ln { width: 20px; height: 0; border-top: 1.5px solid var(--ink-3); flex: none; }
.legend .ln.dash { border-top-style: dashed; }
.net-card { position: absolute; right: 18px; top: 16px; width: 300px; max-height: calc(100% - 40px); overflow-y: auto; background: var(--paper); border: 1px solid var(--ink); border-radius: 0; padding: 14px; }
.g-link { stroke: #a8a8a2; stroke-opacity: 0.6; }
.g-link.inferred { stroke-dasharray: 4 4; stroke-opacity: 0.45; }
.g-link.route { stroke: var(--ink-3); stroke-opacity: 0.5; }
.g-link.hl { stroke: var(--ink); stroke-opacity: 1; stroke-width: 2.5px; }
.g-link.dim { stroke-opacity: 0.08; }
.g-node { cursor: pointer; }
.g-node circle, .g-node rect { stroke: #fff; stroke-width: 1.5px; transition: opacity .2s; }
.g-node text { font: 500 11px var(--sans); fill: var(--ink); paint-order: stroke; stroke: rgba(245, 245, 244, 0.95); stroke-width: 3.5px; stroke-linejoin: round; pointer-events: none; }
.g-node.dim { opacity: 0.14; }
.g-node.hl circle, .g-node.hl rect { stroke: var(--ink); stroke-width: 2px; }
.g-node.sel circle, .g-node.sel rect { stroke: var(--ink); stroke-width: 3px; }
.g-node.prospect rect { fill: var(--paper); stroke: var(--ink); stroke-dasharray: 3 3; }

/* ---------- opportunities ---------- */
.opp { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; }
.opp + .opp { margin-top: 6px; }
.opp > summary { list-style: none; cursor: pointer; display: flex; gap: 10px; align-items: flex-start; }
.opp > summary::-webkit-details-marker { display: none; }
.opp > summary::after { content: '+'; font-family: var(--mono); color: var(--ink-3); flex: none; line-height: 1.3; }
.opp[open] > summary::after { content: '–'; }
.opp > summary:hover .item-title { text-decoration: underline; }
.opp > summary .item-title { font-size: 14px; }
.opp[open] { border-color: var(--ink); }
.opp-body { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.opp.compact { padding: 12px; cursor: pointer; }
.opp.compact:hover, .opp.compact.on { border-color: var(--ink); background: var(--cream); }
.opp-top { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.opp h3 { font-size: 16px; }
.opp.compact h3 { font-size: 14.5px; }
.type { display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.type svg { width: 13px; height: 13px; }
.type.introduction, .type.reconnect, .type.event_match, .type.path { color: var(--ink-3); }
.evidence { margin: 8px 0 0; padding: 0; list-style: none; font-size: 12.5px; color: var(--ink-2); }
.evidence li { padding-left: 12px; position: relative; margin-top: 2px; }
.evidence li::before { content: '—'; position: absolute; left: 0; top: 0; color: var(--ink-3); }
.chain { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin-top: 8px; font-size: 12.5px; }
.chain .arrow { color: var(--ink-3); }
.draft { background: var(--cream); border: 1px solid var(--line); border-radius: 0; padding: 10px 12px; margin-top: 10px; white-space: pre-wrap; font-family: var(--mono); font-size: 12.5px; line-height: 1.55; }
.opp-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }

/* ---------- person panel / modal / sheet ---------- */
.scrim { position: fixed; inset: 0; background: rgba(17, 17, 16, 0.4); z-index: 80; display: flex; justify-content: flex-end; }
.scrim.middle { align-items: center; justify-content: center; padding: 20px; }
.drawer { width: min(480px, 100%); background: var(--milk); height: 100%; overflow-y: auto; padding: 20px 20px 50px; border-left: 1px solid var(--ink); -webkit-overflow-scrolling: touch; }
.modal { width: min(520px, 100%); background: var(--paper); border: 1px solid var(--ink); border-radius: 0; padding: 20px; max-height: 90dvh; overflow-y: auto; }
.close { position: sticky; top: 0; float: right; width: 30px; height: 30px; border-radius: 0; border: 1px solid var(--line); background: var(--paper); display: grid; place-items: center; z-index: 2; padding: 0; }
.close svg { width: 15px; height: 15px; }
.toast-wrap { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 120; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { background: var(--ink); color: #fff; border-radius: 0; padding: 10px 14px; font-size: 13px; font-weight: 500; }
.toast.err { background: var(--rose); }
.fab-feedback { position: fixed; right: 18px; bottom: 18px; z-index: 40; background: var(--paper); color: var(--ink); border: 1px solid var(--ink); border-radius: 0; padding: 8px 12px; font-weight: 500; font-size: 12.5px; display: inline-flex; gap: 7px; align-items: center; }
.fab-feedback svg { width: 15px; height: 15px; color: var(--ink); }
.fab-feedback:hover { background: var(--cream); }
.senti { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.senti button { border: 1px solid var(--line); background: var(--paper); border-radius: 0; padding: 9px 5px; font-size: 12px; font-weight: 500; color: var(--ink-2); }
.senti button.on { border-color: var(--ink); background: var(--ink); color: #fff; }
.drop { border: 1px dashed var(--ink-3); border-radius: 0; padding: 26px 18px; text-align: center; background: var(--paper); }
.drop.over { border-color: var(--ink); background: var(--cream); }
.method { display: grid; grid-template-columns: 34px 1fr; gap: 12px; }
.method-ic { width: 34px; height: 34px; border-radius: 0; background: var(--cream); color: var(--ink); display: grid; place-items: center; }
.method-ic svg { width: 18px; height: 18px; }
.steps { margin: 6px 0 0; padding-left: 16px; font-size: 13px; color: var(--ink-2); }
.steps li { margin-top: 3px; }

/* ---------- login ---------- */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: var(--milk); }
.login-card { width: min(380px, 100%); text-align: center; }
.login-card .brand-mark { width: 36px; height: 36px; margin: 0 auto 12px; display: block; }
.login-card h1 { font-size: 27px; }
.login-card h1 em { font-style: normal; color: var(--ink); }

/* ---------- phone ---------- */
@media (max-width: 900px) {
  body { font-size: 15px; }
  .side { display: none; }
  .main { margin-left: 0; padding-top: 50px; padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom)); }
  .page { padding: 16px 14px 36px; }
  .topbar { display: flex; position: fixed; top: 0; left: 0; right: 0; height: 50px; z-index: 30; background: var(--paper); border-bottom: 1px solid var(--line); align-items: center; padding: 0 10px 0 12px; gap: 10px; }
  .topbar .brand { padding: 0; }
  .topbar .brand-mark { width: 18px; height: 18px; }
  .topbar .brand-name { font-size: 14px; }
  .topbar .switcher { margin-left: auto; max-width: 56vw; }
  .topbar .switch-btn { padding: 4px 7px; gap: 6px; }
  .topbar .switch-desc { display: none; }
  .topbar .menu { left: auto; right: 0; width: 260px; }
  .tabbar { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--tabbar) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--paper); border-top: 1px solid var(--line); z-index: 30; }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 10.5px; font-weight: 500; color: var(--ink-3); text-decoration: none; background: none; border: 0; padding: 0; position: relative; }
  .tabbar svg { width: 20px; height: 20px; }
  .tabbar .on { color: var(--ink); font-weight: 600; }
  .tabbar .badge { position: absolute; top: 6px; left: 54%; min-width: 16px; height: 16px; font-size: 9.5px; }
  .grid.two, .grid.three, .grid.main-aside { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card { padding: 14px; }
  .card.pad-lg { padding: 14px; }
  h1 { font-size: 21px; }
  h2 { font-size: 16px; }
  .fab-feedback { right: 10px; bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + 10px); padding: 8px; }
  .fab-feedback span { display: none; }
  .scrim { align-items: flex-end; }
  .drawer { width: 100%; height: 92dvh; border-radius: 0; border-left: 0; border-top: 1px solid var(--ink); padding: 16px 14px 46px; }
  .scrim.middle { padding: 0; align-items: flex-end; }
  .modal { width: 100%; border-radius: 0; max-height: 92dvh; padding: 18px 14px calc(20px + env(safe-area-inset-bottom)); }
  .toast-wrap { bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + 12px); }
  .kv { grid-template-columns: 92px 1fr; }
  .net { display: block; position: relative; height: calc(100dvh - 50px - var(--tabbar) - env(safe-area-inset-bottom)); }
  .net-map { height: 100%; }
  .net-head { left: 10px; right: 10px; top: 10px; flex-direction: column; }
  .net-title { display: none; }
  .net-search input { width: 100%; }
  .net-search { width: 100%; }
  .legend { left: 10px; bottom: 10px; font-size: 11px; padding: 7px 9px; max-width: 180px; }
  .legend.closed .legend-row { display: none; }
  .net-card { position: absolute; left: 10px; right: 10px; top: auto; bottom: 10px; width: auto; max-height: 56%; }
  .hide-phone { display: none !important; }
  .tbl.cards thead { display: none; }
  .tbl.cards tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
  .tbl.cards td { border: 0; padding: 0; }
  .tbl.cards td.sub { grid-column: 1 / -1; color: var(--ink-2); font-size: 12.5px; }
  .page-head p { font-size: 13.5px; }
  .seg button { min-height: 36px; }
  .btn.sm { min-height: 36px; }
  .close { width: 38px; height: 38px; }
  .pill { min-height: 36px; }
  .toast-wrap { left: 12px; right: 60px; transform: none; width: auto; max-width: none; align-items: stretch; }
  #mic-hint.idle { display: none; }
}
@media (min-width: 901px) { .hide-desktop { display: none !important; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
@media print { .side, .tabbar, .topbar, .fab-feedback { display: none; } .main { margin: 0; } }

.note svg { width: 14px; height: 14px; vertical-align: -2px; }
p svg { width: 13px; height: 13px; vertical-align: -2px; }
.ic svg { width: 11px; height: 11px; }
.chip.long { white-space: normal; text-transform: none; letter-spacing: 0; font-family: var(--sans); font-size: 11.5px; text-align: left; line-height: 1.4; padding: 4px 8px; }
.seg button { white-space: nowrap; }
.kv dd .chip { white-space: normal; line-height: 1.4; padding: 3px 8px; max-width: 100%; }
/* map text keeps its size on screen however far the map is zoomed */
.g-node text { font-size: calc(11px / var(--lk, 1)); stroke-width: calc(3.5px / var(--lk, 1)); }
@media (hover: none) { .tbl tr.click:hover td { background: transparent; } .opp.compact:hover { border-color: var(--line); background: var(--paper); } }
@media (max-width: 900px) { .g-node text { font-size: calc(10px / var(--lk, 1)); } }
