/* The built-in vault (Notes tab, 27 Oct 2026). Three panes on a wide screen (files | note | links), one pane at a time with a
   switcher on a phone. Same type and colours as the rest of the app; no :has(), no runtime custom properties (app.css perf rules). */

/* fill the CRM view under its top bar */
.view > .dash-inner.nv-host { flex: 1 1 auto; min-height: 0; height: 100%; padding-bottom: 10px; }
.dash-inner.nv-host > * { flex: none; }
.dash-inner.nv-host > .nv { flex: 1 1 auto; }
.nv { flex: 1 1 auto; min-height: 380px; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--rule); border-radius: 16px; overflow: hidden; position: relative; outline: none; }
.nv.full { position: fixed; inset: 0; z-index: 55; border: 0; border-radius: 0; min-height: 0; padding-top: env(safe-area-inset-top); }
.nv svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.nv button { color: inherit; }

/* ── top bar ── */
.nv-bar { display: flex; align-items: center; gap: 2px; padding: 5px 6px; border-bottom: 1px solid var(--rule); flex: none; min-height: 46px; }
/* full screen's way back to Keystone: always the first thing in the bar, never an icon you have to guess */
.nv-exit { display: flex; align-items: center; gap: 2px; height: 34px; padding: 0 12px 0 6px; margin-right: 4px; border-radius: 9px; background: var(--accent-soft); color: var(--accent) !important; font-weight: 600; font-size: 14px; flex: none; }
.nv-exit svg { width: 18px; height: 18px; stroke-width: 2.2; }
.nv-backto { margin-bottom: 8px; padding-left: 6px; }
.nv-backto svg { width: 16px; height: 16px; }
.nv-ib { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: var(--muted); flex: none; }
.nv-ib:hover { background: var(--notice); color: var(--ink); }
.nv-ib[disabled] { opacity: .35; cursor: default; background: none; }
.nv-title { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 6px; padding: 0 6px; overflow: hidden; white-space: nowrap; }
.nv-crumb { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; min-width: 0; }
.nv-tt { font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; min-width: 0; }
.nv-starred svg { width: 14px; height: 14px; fill: #e8a33d; stroke: #e8a33d; }
.nv-new { display: flex; align-items: center; gap: 4px; height: 32px; padding: 0 11px 0 8px; border-radius: 9px; background: var(--accent); color: var(--accent-ink) !important; font-size: 13px; font-weight: 600; flex: none; margin: 0 4px; }
.nv-new svg { width: 16px; height: 16px; stroke-width: 2.2; }
.nv.w1 .nv-new { padding: 0; width: 34px; justify-content: center; }
.nv.w1 .nv-new span { display: none; }
.nv-recdocs { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin-top: 10px; }
.nv-recdocs > span { font-size: 11.5px; color: var(--muted); margin-right: 2px; }
.nv-doc-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 3px 9px 3px 6px; border-radius: 999px; border: 1px solid var(--rule); background: var(--surface); color: var(--ink); text-decoration: none; max-width: 100%; }
.nv-doc-chip svg { width: 13px; height: 13px; color: var(--accent); }
.nv-status { font-size: 12px; color: var(--muted); white-space: nowrap; padding: 0 6px; }
.nv-seg { display: flex; background: var(--notice); border-radius: 9px; padding: 2px; flex: none; margin: 0 4px; }
.nv-seg button { display: flex; align-items: center; gap: 5px; padding: 5px 9px; border-radius: 7px; font-size: 12.5px; color: var(--muted); }
.nv-seg button svg { width: 15px; height: 15px; }
.nv-seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }

/* ── panes ── */
.nv-body { flex: 1; min-height: 0; display: flex; position: relative; }
.nv-left, .nv-right { flex: none; display: flex; flex-direction: column; min-height: 0; background: var(--bg); }
.nv-left { width: 272px; border-right: 1px solid var(--rule); }
.nv-right { width: 292px; border-left: 1px solid var(--rule); }
.nv-main { flex: 1; min-width: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; position: relative; background: var(--surface); }
.nv-pane { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 6px 6px 16px; }
.nv-tabs { display: flex; gap: 2px; padding: 6px 6px 4px; border-bottom: 1px solid var(--rule); flex: none; }
.nv-tabs button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 5px 2px; border-radius: 8px; color: var(--muted); font-size: 10.5px; }
.nv-tabs button.on { color: var(--accent); background: var(--accent-soft); }
.nv-tabs button:hover { color: var(--ink); }

.nv.w3.no-left .nv-left, .nv.w3.no-right .nv-right, .nv.w2.no-left .nv-left { display: none; }
.nv.w2 .nv-right, .nv.w3.graphing .nv-right { display: none; }
.nv.w2.drawer .nv-right { display: flex; position: absolute; right: 0; top: 0; bottom: 0; width: min(320px, 86%); z-index: 6; box-shadow: -10px 0 30px rgba(0,0,0,.18); }
.nv.w1 .nv-left, .nv.w1 .nv-right, .nv.w1 .nv-main { display: none; width: 100%; border: 0; }
.nv.w1.pane-left .nv-left, .nv.w1.pane-right .nv-right { display: flex; }
.nv.w1.pane-main .nv-main { display: block; }
.nv.w1 .hide-w1, .nv.w1 [data-act="fwd"], .nv.w3 .hide-w3 { display: none; }
.nv.w1 .nv-seg button span { display: none; }
.nv.w1 .nv-seg button { padding: 6px 8px; }
.nv.w1 .nv-crumb { display: none; }

/* phone pane switcher */
.nv-switch { display: none; border-top: 1px solid var(--rule); padding: 2px 4px; flex: none; background: var(--surface); }
.nv.w1 .nv-switch { display: flex; }
.nv-switch button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; min-height: 46px; justify-content: center; font-size: 10.5px; color: var(--muted); }
.nv-switch button.on { color: var(--accent); }
.nv-switch svg { width: 20px; height: 20px; }
body.kb .nv-switch { display: none !important; }

/* ── file tree ── */
.nv-tools-row { display: flex; gap: 4px; padding: 2px 2px 6px; }
.nv-tools-row button { display: flex; align-items: center; gap: 5px; padding: 6px 9px; border-radius: 8px; font-size: 12.5px; color: var(--muted); border: 1px solid var(--rule); background: var(--surface); }
.nv-tools-row button:last-child { margin-left: auto; }
.nv-tools-row button:hover { color: var(--ink); }
.nv-tree { min-height: 60px; border-radius: 8px; }
.nv-tree.drop { box-shadow: inset 0 0 0 2px var(--accent); }
.tr { display: flex; align-items: center; gap: 6px; min-height: 30px; padding-right: 4px; border-radius: 7px; cursor: pointer; font-size: 13.5px; user-select: none; -webkit-user-select: none; }
.tr:hover { background: var(--notice); }
.tr.on { background: var(--accent-soft); color: var(--accent); font-weight: 500; }
.tr.drop { box-shadow: inset 0 0 0 2px var(--accent); }
.tr-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-f .tr-name { font-weight: 500; }
.tr-chev { display: grid; place-items: center; width: 14px; color: var(--muted); }
.tr-chev svg { width: 12px; height: 12px; transition: transform .12s; }
.tr-f.open .tr-chev svg { transform: rotate(90deg); }
.tr-count { font-size: 11px; color: var(--muted); flex: none; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-star svg { width: 12px; height: 12px; fill: #e8a33d; stroke: #e8a33d; }
.tr-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.tr-more { width: 26px; height: 26px; border-radius: 6px; display: grid; place-items: center; color: var(--muted); flex: none; }
.tr-more:hover { background: var(--rule); color: var(--ink); }
@media (hover: hover) { .tr .tr-more { visibility: hidden; } .tr:hover .tr-more { visibility: visible; } }
.nv-sync { margin: 8px 2px 4px; padding: 8px 10px; border-radius: 8px; background: var(--notice); color: var(--ink); font-size: 12.5px; line-height: 1.4; }
.nv-sync.err { color: var(--muted); }
.nv-sync-bar { display: block; height: 4px; margin-top: 6px; border-radius: 2px; background: var(--rule); overflow: hidden; }
.nv-sync-bar span { display: block; height: 100%; background: var(--accent); transition: width .4s; }
.nv-foot { display: flex; flex-wrap: wrap; gap: 4px; padding: 10px 2px 0; border-top: 1px solid var(--rule); margin-top: 10px; }
.nv-foot button { display: flex; align-items: center; gap: 5px; padding: 6px 8px; border-radius: 8px; font-size: 12.5px; color: var(--muted); }
.nv-foot button:hover { background: var(--notice); color: var(--ink); }
.nv-count { font-size: 11.5px; color: var(--muted); margin: 6px 4px; }
.nv-empty { font-size: 13px; color: var(--muted); margin: 10px 6px; line-height: 1.5; }

/* search */
.nv-sbox input { width: 100%; height: 36px; border: 1px solid var(--rule); border-radius: 9px; background: var(--surface); color: var(--ink); padding: 0 10px; font: inherit; font-size: 15px; }
.nv-ops { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.nv-ops button, .nv-chips button { font-size: 11.5px; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--rule); background: var(--surface); color: var(--muted); }
.nv-chips { display: flex; flex-wrap: wrap; gap: 5px; margin: 6px 0; }
.sr { padding: 8px 8px; border-radius: 8px; cursor: pointer; border-bottom: 1px solid var(--rule); }
.sr:hover { background: var(--notice); }
.sr-t { font-weight: 600; font-size: 13.5px; }
.sr-p { font-size: 11px; color: var(--muted); }
.sr-s { font-size: 12.5px; color: var(--muted); margin-top: 3px; overflow-wrap: anywhere; }
.nv mark, .nv-rp mark { background: #fde68a; color: #14161c; border-radius: 3px; padding: 0 2px; }

/* calendar */
.nv-cal { padding: 4px 2px 10px; }
.cal-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; font-size: 13.5px; }
.cal-h button { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; color: var(--muted); }
.cal-g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.cal-g i { font-style: normal; font-size: 10.5px; color: var(--muted); padding: 2px 0; }
.cal-g button { height: 34px; border-radius: 7px; font-size: 12.5px; position: relative; }
.cal-g button:hover { background: var(--notice); }
.cal-g button.has::after { content: ""; position: absolute; left: 50%; bottom: 3px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--accent); }
.cal-g button.today { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.cal-g button.today::after { background: var(--accent-ink); }
.nv-cal .nv-btn { margin-top: 10px; width: 100%; }

/* right pane */
.bl-h { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 10px 6px 4px; }
.bl-h small { font-weight: 400; }
.bl { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 7px 9px; margin: 6px 2px; }
.bl-t { font-weight: 600; font-size: 13.5px; color: var(--accent); text-align: left; }
.bl-s { font-size: 12.5px; color: var(--muted); margin-top: 3px; overflow-wrap: anywhere; }
.bl-s b { color: var(--ink); font-weight: 500; }
.bl-link { font-size: 11px; color: var(--accent); border: 1px solid var(--rule); border-radius: 6px; padding: 1px 6px; margin-left: 4px; }
.ol button { display: block; width: 100%; text-align: left; padding: 6px 8px; font-size: 13px; border-radius: 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ol button:hover { background: var(--notice); }
.nv-local { height: 320px; border: 1px solid var(--rule); border-radius: 10px; background: var(--surface); overflow: hidden; margin: 6px 2px; }
.nv.w1 .nv-local { height: 58vh; }
.nv-gopts { font-size: 12.5px; color: var(--muted); padding: 2px 6px; }

/* ── the note ── */
.nv-doc { max-width: 780px; margin: 0 auto; padding: 18px 30px 90px; }
.nv.w1 .nv-doc { padding: 12px 16px 60px; }
.nv-h1 { display: block; width: 100%; border: 0; background: transparent; color: var(--ink); font-family: "Instrument Serif", Georgia, serif; font-size: 36px; line-height: 1.15; padding: 2px 0; outline: none; }
.nv.w1 .nv-h1 { font-size: 29px; }
.nv-meta { font-size: 12.5px; color: var(--muted); margin: 2px 0 12px; }
.nv-meta button { color: var(--accent); font-size: inherit; padding: 0; }
.nv-conflict { background: #fdecd6; color: #6b3500; border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; font-size: 13.5px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.nv-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; padding: 0 12px; border-radius: 9px; background: var(--accent); color: var(--accent-ink) !important; font-weight: 600; font-size: 13.5px; text-decoration: none; }
.nv-btn.ghost { background: var(--surface); color: var(--accent) !important; border: 1px solid var(--rule); }
.nv-btn svg { width: 15px; height: 15px; }

/* properties */
.nv-pdet { border: 1px solid var(--rule); border-radius: 12px; padding: 4px 10px; margin: 0 0 14px; background: var(--bg); }
.nv-pdet summary { font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 6px 0; cursor: pointer; list-style: none; }
.nv-pdet summary::-webkit-details-marker { display: none; }
.nv-pdet summary small { font-weight: 400; }
.np-row { display: grid; grid-template-columns: minmax(80px, 30%) 1fr 26px; gap: 8px; align-items: center; padding: 3px 0; font-size: 13.5px; }
.np-row .pk { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-row .pv { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; min-width: 0; }
.np-row input:not([type=checkbox]) { flex: 1; min-width: 90px; height: 30px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--ink); padding: 0 6px; font: inherit; font-size: 14px; }
.np-row input:not([type=checkbox]):hover, .np-row input:not([type=checkbox]):focus { border-color: var(--rule); background: var(--surface); outline: none; }
.np-row input[type=checkbox] { width: 18px; height: 18px; }
.np-row .pin-sub { flex-basis: 100%; font-size: 12px; color: var(--muted); height: 24px; }
.pchips { display: contents; }
.pchip { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.pchip.rec { font-weight: 600; }
.px { width: 24px; height: 24px; display: grid; place-items: center; color: var(--muted); border-radius: 6px; }
.px svg { width: 13px; height: 13px; }
.px:hover { background: var(--notice); color: #c2410c; }
.np-row.padd { grid-template-columns: 1fr auto; border-top: 1px dashed var(--rule); margin-top: 4px; padding-top: 6px; }
.np-row.padd .nv-btn { min-height: 28px; font-size: 12.5px; }

/* the CRM record at the top of a record note */
.nv-rec { border: 1px solid var(--rule); border-left: 4px solid #8b93a7; border-radius: 12px; padding: 10px 12px; margin: 0 0 14px; background: var(--bg); }
.nv-rec.rec-contact { border-left-color: #13a06b; } .nv-rec.rec-listing { border-left-color: #2B45E0; } .nv-rec.rec-property { border-left-color: #d98a1c; } .nv-rec.rec-deal { border-left-color: #8b5cf6; }
.nv-rec-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.nv-rec-h b { flex: 1; min-width: 0; font-size: 15px; }
.nv-rec-h .nv-btn { min-height: 30px; font-size: 12.5px; }
.nv-rec dl { display: grid; grid-template-columns: minmax(90px, 32%) 1fr; gap: 4px 12px; margin: 0; font-size: 13.5px; }
.nv-rec dt { color: var(--muted); }
.nv-rec dd { margin: 0; overflow-wrap: anywhere; }
.nv-rec .nv-chips button { display: inline-flex; align-items: center; gap: 5px; color: var(--ink); }
.nv-rec .nv-chips button i, .nv-pill { display: inline-block; }
.nv-rec .nv-chips button i { width: 7px; height: 7px; border-radius: 50%; background: #8b93a7; }
.nv-recnote { font-size: 11.5px; color: var(--muted); margin: 8px 0 0; }
.nv-pill { font-size: 10.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--notice); color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }

/* editor */
.nv-tools { display: flex; flex-wrap: wrap; gap: 2px; padding: 4px; border: 1px solid var(--rule); border-radius: 10px; margin-bottom: 10px; position: sticky; top: 0; background: var(--surface); z-index: 2; }
.nv-tools button { min-width: 32px; height: 30px; padding: 0 7px; border-radius: 7px; font-size: 13.5px; color: var(--muted); display: grid; place-items: center; }
.nv-tools button:hover { background: var(--notice); color: var(--ink); }
.nv .nv-src { display: block; width: 100%; min-height: 50vh; border: 0; outline: none; resize: none; background: transparent; color: var(--ink); font: 16px/1.65 "Geist", system-ui, sans-serif; padding: 0; overflow: hidden; tab-size: 4; }
.nv .lb-ed { display: block; width: 100%; border: 0; outline: none; resize: none; background: var(--notice); color: var(--ink); font: 16px/1.65 "Geist", system-ui, sans-serif; padding: 6px 8px; margin: 4px -8px; border-radius: 8px; overflow: hidden; box-sizing: content-box; }
.nv-rendered.live .lb { border-radius: 8px; margin: 0 -8px; padding: 0 8px; cursor: text; }
.nv-rendered.live .lb:hover { background: var(--bg); }
.nv-rendered .lb.flash { animation: nvflash 1.4s ease-out; }
@keyframes nvflash { from { background: var(--accent-soft); } to { background: transparent; } }
.lb-new { color: var(--muted); font-size: 14px; padding: 14px 0 30px; cursor: text; opacity: .7; }
.nv-bl-sum { display: flex; align-items: center; gap: 6px; margin-top: 28px; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 10px; font-size: 13px; color: var(--muted); width: 100%; }

/* rendered markdown (vault, embeds, record card on a CRM record) */
.nv-rendered, .nv-rp-note, .emb-b { font-size: 16px; line-height: 1.65; overflow-wrap: anywhere; }
.nv-rendered h1, .nv-rendered h2, .nv-rendered h3, .emb-b h1, .emb-b h2, .emb-b h3, .nv-rp-note h1, .nv-rp-note h2, .nv-rp-note h3 { font-family: "Instrument Serif", Georgia, serif; font-weight: 400; line-height: 1.2; margin: 1.1em 0 .35em; }
.nv-rendered h1 { font-size: 30px; } .nv-rendered h2 { font-size: 25px; } .nv-rendered h3 { font-size: 21px; }
.nv-rendered h4, .nv-rendered h5, .nv-rendered h6 { font-size: 15px; margin: 1em 0 .3em; }
.nv-rendered .lb:first-child > h1:first-child, .nv-rendered .lb:first-child > h2:first-child { margin-top: .2em; }
.nv-rendered p, .emb-b p, .nv-rp-note p { margin: .45em 0; }
.nv-rendered ul, .nv-rendered ol, .emb-b ul, .emb-b ol, .nv-rp-note ul, .nv-rp-note ol { margin: .35em 0; padding-left: 1.5em; }
.nv-rendered li, .emb-b li { margin: .15em 0; }
.nv-rendered ul.tasks, .emb-b ul.tasks, .nv-rp-note ul.tasks { list-style: none; padding-left: .3em; }
.nv-rendered li.task, .emb-b li.task, .nv-rp-note li.task { display: block; }
li.task input { width: 16px; height: 16px; margin: 0 6px 0 0; vertical-align: -2px; accent-color: #2B45E0; cursor: pointer; }
li.task.done > span { color: var(--muted); text-decoration: line-through; }
.nv-rendered blockquote, .emb-b blockquote { margin: .6em 0; padding: 2px 14px; border-left: 3px solid var(--rule); color: var(--muted); }
.nv-rendered code, .emb-b code, .nv-rp-note code { font-family: ui-monospace, Menlo, monospace; font-size: .86em; background: var(--notice); padding: 1px 5px; border-radius: 5px; }
.nv-rendered pre.code { background: var(--bg); border: 1px solid var(--rule); border-radius: 10px; padding: 10px 12px; overflow-x: auto; }
.nv-rendered pre.code code { background: none; padding: 0; font-size: 13.5px; white-space: pre; }
.nv-rendered hr { border: 0; border-top: 1px solid var(--rule); margin: 1.2em 0; }
.tblwrap { overflow-x: auto; margin: .6em 0; }
.tblwrap table { border-collapse: collapse; font-size: 14px; min-width: 60%; }
.tblwrap th, .tblwrap td { border: 1px solid var(--rule); padding: 5px 10px; text-align: left; vertical-align: top; }
.tblwrap th { background: var(--bg); font-weight: 600; }
.nv a.wl, .nv-rp a.wl, .nv a.rl, .nv-rp a.rl { color: var(--accent); text-decoration: none; font-weight: 500; }
.nv a.wl:hover, .nv a.rl:hover { text-decoration: underline; }
.nv a.wl.unres { color: var(--muted); text-decoration: underline dotted; }
.nv a.rl::before, .nv-rp a.rl::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 4px; vertical-align: 1px; background: #8b93a7; }
a.rl-contact::before { background: #13a06b !important; } a.rl-listing::before { background: #2B45E0 !important; } a.rl-property::before { background: #d98a1c !important; } a.rl-deal::before { background: #8b5cf6 !important; }
.nv a.tag, .nv-rp a.tag { display: inline-block; font-size: .86em; padding: 0 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); text-decoration: none; }
.nv a.ext { color: var(--accent); }
.nv a.dl { color: var(--accent); }
sup.fnref a { color: var(--accent); text-decoration: none; font-size: .78em; padding: 0 1px; }
.footnotes { font-size: 13.5px; color: var(--muted); margin-top: 1.5em; }
.footnotes hr { margin: .8em 0; }
/* callouts */
.callout { border-radius: 10px; padding: 8px 12px; margin: .7em 0; background: rgba(43, 69, 224, .07); border-left: 3px solid #2B45E0; }
.callout .co-title { font-weight: 600; font-size: 14.5px; color: #2B45E0; }
details.callout > summary { cursor: pointer; }
.callout .co-body > :first-child { margin-top: .2em; } .callout .co-body > :last-child { margin-bottom: .1em; }
.co-tip, .co-success { background: rgba(19, 160, 107, .08); border-left-color: #13a06b; } .co-tip .co-title, .co-success .co-title { color: #0f7a52; }
.co-warning, .co-question, .co-todo { background: rgba(232, 163, 61, .1); border-left-color: #e8a33d; } .co-warning .co-title, .co-question .co-title, .co-todo .co-title { color: #9a5b00; }
.co-danger, .co-failure, .co-bug { background: rgba(224, 53, 59, .08); border-left-color: #e0353b; } .co-danger .co-title, .co-failure .co-title, .co-bug .co-title { color: #b42318; }
.co-quote, .co-example, .co-abstract { background: var(--notice); border-left-color: #8b93a7; } .co-quote .co-title, .co-example .co-title, .co-abstract .co-title { color: var(--muted); }
/* embeds */
.embed { display: block; border: 1px solid var(--rule); border-left: 3px solid var(--accent); border-radius: 10px; padding: 8px 12px; margin: .6em 0; background: var(--bg); font-size: 15px; }
.emb-h { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.emb-h svg { width: 15px; height: 15px; }
.emb-b { display: block; }
.emb-rows { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13.5px; }
.emb-rows i { font-style: normal; color: var(--muted); font-size: 12px; }
.emb-act { display: flex; gap: 6px; margin-top: 8px; }
.emb-load { color: var(--muted); font-size: 13px; }

/* ── home, trash, history ── */
.nv-home { max-width: 760px; margin: 0 auto; padding: 22px 26px 60px; }
.nv.w1 .nv-home { padding: 16px 14px 40px; }
.nv-home h2 { font-family: "Instrument Serif", Georgia, serif; font-weight: 400; font-size: 34px; margin: 0; line-height: 1.1; }
.nv-home h2 small { font-family: "Geist", system-ui, sans-serif; font-size: 14px; color: var(--muted); }
.nv-home h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 22px 0 6px; }
.nv-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 16px; }
.nv-cards button { text-align: left; border: 1px solid var(--rule); border-radius: 14px; padding: 12px; background: var(--bg); display: flex; flex-direction: column; gap: 4px; }
.nv-cards button:hover { border-color: var(--accent); }
.nv-cards svg { width: 22px; height: 22px; color: var(--accent); }
.nv-cards b { font-size: 14.5px; } .nv-cards span { font-size: 12px; color: var(--muted); }
.nv-list { display: flex; flex-direction: column; }
.nv-list > button, .nv-li { display: flex; flex-direction: column; align-items: flex-start; text-align: left; padding: 9px 10px; border-radius: 9px; border-bottom: 1px solid var(--rule); }
.nv-li { flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; }
.nv-li > div { display: flex; flex-direction: column; min-width: 0; }
.nv-list > button:hover { background: var(--notice); }
.nv-list > button.on { background: var(--accent-soft); }
.nv-list b { font-size: 14px; font-weight: 500; } .nv-list span { font-size: 12px; color: var(--muted); }
.nv-hgrid { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; align-items: flex-start; }
.nv-hgrid > .nv-list { flex: 1 1 220px; max-width: 100%; }
.nv-hprev { flex: 3 1 340px; border: 1px solid var(--rule); border-radius: 12px; padding: 10px 14px; min-width: 0; }
.nv-hbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }

/* ── graph ── */
.nv-graphwrap { display: flex; flex-direction: column; height: 100%; }
.nv-gbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 8px 12px; border-bottom: 1px solid var(--rule); font-size: 13px; color: var(--muted); }
.nv-gbar label { display: flex; align-items: center; gap: 5px; }
.nv-gbar .nv-btn { margin-left: auto; min-height: 28px; }
.nv-legend { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-size: 12px; }
.nv-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 3px; vertical-align: -1px; }
.nv.w1 .nv-legend { display: none; }
.nv-graph { flex: 1; min-height: 320px; position: relative; overflow: hidden; touch-action: none; }
.nv .nv-svg { width: 100%; height: 100%; stroke: none; }
.nv-svg { display: block; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.nv-svg .ge line { stroke: var(--rule); stroke-width: 1.2; }
.nv-svg .ge line.hl { stroke: var(--accent); stroke-width: 1.8; }
.nv-svg .gn { cursor: pointer; }
.nv-svg .gn circle { fill: #8b93a7; stroke: var(--surface); stroke-width: 1.5; }
.nv-svg .gn text { font-family: "Geist", system-ui, sans-serif; fill: var(--muted); text-anchor: middle; pointer-events: none; display: none; }
.nv-svg.labels .gn text, .nv-svg .gn.hl text, .nv-svg .gn.me text, .nv-svg .gn.big text { display: block; }
.nv-svg.hovering .gn:not(.hl) { opacity: .28; }
.nv-svg.hovering .ge line:not(.hl) { opacity: .25; }
.nv-svg .gn.me circle { stroke: var(--accent); stroke-width: 3; }
.g-note { background: #8b93a7; } .nv-svg .g-note circle { fill: #8b93a7; }
.g-contact { background: #13a06b; } .nv-svg .g-contact circle { fill: #13a06b; }
.g-listing { background: #2B45E0; } .nv-svg .g-listing circle { fill: #2B45E0; }
.g-property { background: #d98a1c; } .nv-svg .g-property circle { fill: #d98a1c; }
.g-deal { background: #8b5cf6; } .nv-svg .g-deal circle { fill: #8b5cf6; }
.g-tag { background: #e05d8a; } .nv-svg .g-tag circle { fill: #e05d8a; }
.nv-svg .g-unresolved circle { fill: transparent; stroke: #8b93a7; stroke-dasharray: 2 2; }
.nv-pill.g-contact, .nv-pill.g-listing, .nv-pill.g-property, .nv-pill.g-deal { color: #fff; }
.nv-legend .g-note, .nv-chips .g-note i { background: #8b93a7; }
.nv-chips button.g-contact i { background: #13a06b; } .nv-chips button.g-listing i { background: #2B45E0; } .nv-chips button.g-property i { background: #d98a1c; } .nv-chips button.g-deal i { background: #8b5cf6; }
.nv-chips button.g-contact, .nv-chips button.g-listing, .nv-chips button.g-property, .nv-chips button.g-deal { background: var(--surface); }

/* ── floating: modals, autocomplete, menus, toast ── */
.nv-modal { position: fixed; inset: 0; z-index: 75; background: rgba(10, 12, 20, .42); display: flex; align-items: flex-start; justify-content: center; padding: max(10vh, 20px) 12px 12px; }
.nv-mbox { width: min(580px, 100%); background: var(--surface); color: var(--ink); border: 1px solid var(--rule); border-radius: 16px; box-shadow: 0 24px 60px rgba(0,0,0,.28); overflow: hidden; display: flex; flex-direction: column; max-height: 76vh; }
.nv-mh { font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 12px 14px 0; }
.nv-mhint { font-size: 12.5px; color: var(--muted); margin: 4px 14px 0; }
.nv-mi { margin: 8px 12px; height: 42px; border: 1px solid var(--rule); border-radius: 10px; background: var(--bg); color: var(--ink); padding: 0 12px; font: inherit; font-size: 16px; outline: none; }
.nv-mi:focus { border-color: var(--accent); }
.nv-ml { overflow-y: auto; padding: 0 6px 8px; }
.nv-ml button, .nv-ac button { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 8px 10px; border-radius: 9px; font-size: 14px; color: var(--ink); }
.nv-ml button b, .nv-ac button b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.nv-ml button span, .nv-ac button span { font-size: 12px; color: var(--muted); margin-left: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
.nv-ml button.on, .nv-ac button.on { background: var(--accent-soft); }
.nv-ml button.new b { color: var(--accent); }
.nv-ml button i, .nv-ac button i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.nv-ml kbd { font: 11px ui-monospace, Menlo, monospace; color: var(--muted); border: 1px solid var(--rule); border-radius: 5px; padding: 1px 5px; margin-left: 6px; }
.nv-ml button span + kbd { margin-left: 6px; } .nv-ml button b + kbd { margin-left: auto; }
.nv-mact { display: flex; justify-content: flex-end; gap: 8px; padding: 4px 12px 12px; }
.nv-ac { position: fixed; z-index: 85; width: min(320px, 92vw); max-height: 260px; overflow-y: auto; background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; box-shadow: 0 14px 40px rgba(0,0,0,.2); padding: 4px; }
.nv-ac button { padding: 6px 9px; font-size: 13.5px; }
.nv-menu { position: fixed; z-index: 85; min-width: 180px; background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; box-shadow: 0 14px 40px rgba(0,0,0,.2); padding: 4px; }
.nv-menu button { display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 8px; font-size: 14px; color: var(--ink); }
.nv-menu button:hover { background: var(--notice); }
.nv-menu button.danger { color: #c2410c; }
.nv-toast { position: absolute; left: 50%; bottom: 60px; transform: translateX(-50%); z-index: 20; background: var(--ink); color: var(--bg); padding: 9px 14px; border-radius: 12px; font-size: 13.5px; max-width: 90%; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.nv.full .nv-toast { bottom: 24px; }

/* ── the Notes card on a CRM record ── */
.nv-rp-note { border: 1px solid var(--rule); border-radius: 10px; padding: 4px 12px; background: var(--bg); font-size: 14.5px; max-height: 260px; overflow: hidden; }
.nv-rp-note h1, .nv-rp-note h2, .nv-rp-note h3 { font-size: 19px; }
.nv-rp-meta { font-size: 12px; color: var(--muted); margin: 6px 0 0; }
.nv-rp-h { font-size: 12.5px; font-weight: 600; color: var(--muted); margin: 12px 0 4px; }
.nv-rp-list { list-style: none; margin: 0; padding: 0; }
.nv-rp-list button { display: flex; flex-direction: column; align-items: flex-start; text-align: left; width: 100%; padding: 7px 0; border-top: 1px solid var(--rule); }
.nv-rp-list li:first-child button { border-top: 0; }
.nv-rp-list b { font-size: 14px; font-weight: 500; color: var(--accent); }
.nv-rp-list span { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.nv-rp-act { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }

/* ── dark ── */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .nv-svg .g-listing circle, :root:not([data-theme="light"]) .g-listing { fill: #6f84ff; background: #6f84ff; }
  :root:not([data-theme="light"]) .nv-svg .g-note circle, :root:not([data-theme="light"]) .g-note { fill: #aab1c3; background: #aab1c3; }
  :root:not([data-theme="light"]) .nv mark, :root:not([data-theme="light"]) .nv-rp mark { background: #6b5a12; color: #fff6cc; }
  :root:not([data-theme="light"]) .nv-conflict { background: #3a2a14; color: #f2b366; }
  :root:not([data-theme="light"]) .callout .co-title { color: #9fb0ff; }
  :root:not([data-theme="light"]) .co-tip .co-title, :root:not([data-theme="light"]) .co-success .co-title { color: #6fd3a5; }
  :root:not([data-theme="light"]) .co-warning .co-title, :root:not([data-theme="light"]) .co-question .co-title, :root:not([data-theme="light"]) .co-todo .co-title { color: #f2b366; }
  :root:not([data-theme="light"]) .co-danger .co-title, :root:not([data-theme="light"]) .co-failure .co-title, :root:not([data-theme="light"]) .co-bug .co-title { color: #ff8a8a; }
  :root:not([data-theme="light"]) .nv-rec.rec-listing { border-left-color: #6f84ff; }
  :root:not([data-theme="light"]) a.rl-listing::before { background: #6f84ff !important; }
  :root:not([data-theme="light"]) .nv-modal { background: rgba(0, 0, 0, .6); }
}

/* ───── Desktop (28 Oct 2026): Blueprint is already a three-pane notes app on a wide screen (files | note | links and
   outline, the right pane from ~1000px of its own width, i.e. a 1440px window beside the sidebar). This adds the mouse
   details and roomier panes on a big screen. Below 1024px is untouched. ───── */
@media (min-width: 1024px) {
  .nv-bar { min-height: 48px; padding: 6px 8px; }
  .nv-ib:focus-visible, .nv-exit:focus-visible, .nv-new:focus-visible, .nv-seg button:focus-visible, .nv-tabs button:focus-visible,
  .nv-tools-row button:focus-visible, .nv-foot button:focus-visible, .nv-cards button:focus-visible, .nv-list > button:focus-visible,
  .tr:focus-visible, .nv-menu button:focus-visible, .nv-ml button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
  .nv-exit:hover { filter: brightness(1.05); background: color-mix(in srgb, var(--accent-soft) 70%, var(--accent) 12%); }
  .nv-new:hover { filter: brightness(1.08); }
  .nv-seg button:not(.on):hover { color: var(--ink); }
  .nv-cards button { cursor: pointer; transition: border-color .12s; }
  .nv-list > button, .sr, .bl-t, .ol button, .cal-g button { cursor: pointer; }
  .bl:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--rule)); }
  .nv-tools button { cursor: pointer; }
  .nv-doc { padding: 22px 40px 90px; }
  .nv-home { padding: 26px 34px 60px; }
  .nv-cards { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .nv-mbox { max-width: 580px; }
}
@media (min-width: 1440px) {
  .nv-left { width: 288px; }
  .nv-right { width: 304px; }
  .nv-doc { max-width: 820px; }
}
