/* Lintel CRM demo. Look: comp 1 "Agent's day" (warm paper, ink, muted terracotta). */
:root {
  --paper: oklch(0.975 0.008 75);
  --surface: oklch(0.993 0.004 75);
  --sunk: oklch(0.955 0.011 72);
  --ink: oklch(0.21 0.012 50);
  --ink-2: oklch(0.42 0.014 55);
  --muted: oklch(0.55 0.014 60);
  --rule: oklch(0.9 0.012 70);
  --rule-strong: oklch(0.82 0.014 65);
  --accent: oklch(0.55 0.13 38);
  --accent-hover: oklch(0.5 0.13 38);
  --accent-soft: oklch(0.94 0.03 45);
  --accent-ink: oklch(0.42 0.11 38);
  --ok: oklch(0.45 0.09 150);
  --ok-soft: oklch(0.93 0.045 150);
  --warn: oklch(0.52 0.11 75);
  --warn-soft: oklch(0.94 0.05 85);
  --bad: oklch(0.5 0.15 27);
  --bad-soft: oklch(0.94 0.035 27);
  --shadow: 0 1px 2px oklch(0.3 0.02 50 / 0.06), 0 8px 24px oklch(0.3 0.02 50 / 0.08);
  --shadow-lift: 0 2px 4px oklch(0.3 0.02 50 / 0.08), 0 18px 40px oklch(0.3 0.02 50 / 0.16);
  --r-s: 8px; --r-m: 12px; --r-l: 16px;
  --font: "Inter Tight", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --paper: oklch(0.2 0.008 60);
  --surface: oklch(0.245 0.009 60);
  --sunk: oklch(0.275 0.01 60);
  --ink: oklch(0.94 0.012 80);
  --ink-2: oklch(0.8 0.012 75);
  --muted: oklch(0.68 0.012 70);
  --rule: oklch(0.32 0.01 60);
  --rule-strong: oklch(0.4 0.012 60);
  --accent: oklch(0.66 0.12 45);
  --accent-hover: oklch(0.7 0.12 45);
  --accent-soft: oklch(0.32 0.05 45);
  --accent-ink: oklch(0.85 0.07 50);
  --ok: oklch(0.78 0.1 150);
  --ok-soft: oklch(0.32 0.045 150);
  --warn: oklch(0.8 0.1 80);
  --warn-soft: oklch(0.33 0.05 80);
  --bad: oklch(0.75 0.13 27);
  --bad-soft: oklch(0.33 0.06 27);
  --shadow: 0 1px 2px oklch(0 0 0 / .3), 0 8px 24px oklch(0 0 0 / .3);
  --shadow-lift: 0 2px 4px oklch(0 0 0 / .35), 0 18px 40px oklch(0 0 0 / .5);
  color-scheme: dark;
} }
:root[data-theme="dark"] {
  --paper: oklch(0.2 0.008 60);
  --surface: oklch(0.245 0.009 60);
  --sunk: oklch(0.275 0.01 60);
  --ink: oklch(0.94 0.012 80);
  --ink-2: oklch(0.8 0.012 75);
  --muted: oklch(0.68 0.012 70);
  --rule: oklch(0.32 0.01 60);
  --rule-strong: oklch(0.4 0.012 60);
  --accent: oklch(0.66 0.12 45);
  --accent-hover: oklch(0.7 0.12 45);
  --accent-soft: oklch(0.32 0.05 45);
  --accent-ink: oklch(0.85 0.07 50);
  --ok: oklch(0.78 0.1 150);
  --ok-soft: oklch(0.32 0.045 150);
  --warn: oklch(0.8 0.1 80);
  --warn-soft: oklch(0.33 0.05 80);
  --bad: oklch(0.75 0.13 27);
  --bad-soft: oklch(0.33 0.06 27);
  --shadow: 0 1px 2px oklch(0 0 0 / .3), 0 8px 24px oklch(0 0 0 / .3);
  --shadow-lift: 0 2px 4px oklch(0 0 0 / .35), 0 18px 40px oklch(0 0 0 / .5);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 450 15px/1.45 var(--font); font-feature-settings: "tnum" 1, "cv11" 1;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -0.02em; line-height: 1.15; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- top bar ---------- */
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  display: flex; align-items: center; gap: 28px;
  height: 64px; padding: 0 28px;
  background: color-mix(in oklch, var(--paper) 92%, transparent);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--rule);
}
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--accent); font-weight: 750; font-size: 25px; letter-spacing: -0.035em; }
.brand svg { width: 26px; height: 26px; }
.nav { display: flex; gap: 4px; height: 100%; }
.nav a {
  position: relative; display: flex; align-items: center; padding: 0 14px;
  text-decoration: none; color: var(--ink-2); font-weight: 520; font-size: 15.5px;
}
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px;
  background: var(--accent); border-radius: 3px 3px 0 0;
}
.nav .count { margin-left: 6px; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: white; font-size: 12px; font-weight: 650; line-height: 20px; text-align: center; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.search-btn {
  display: flex; align-items: center; gap: 10px; width: 300px; height: 40px; padding: 0 12px;
  border: 1px solid var(--rule-strong); border-radius: 10px; background: var(--surface); color: var(--muted); text-align: left;
}
.search-btn:hover { border-color: var(--ink-2); }
.search-btn kbd { margin-left: auto; font: 600 11px var(--font); padding: 2px 6px; border: 1px solid var(--rule); border-radius: 5px; color: var(--muted); }
.icon-btn {
  position: relative; display: grid; place-items: center; width: 40px; height: 40px;
  border: 0; border-radius: 10px; background: none; color: var(--ink-2);
}
.icon-btn:hover { background: var(--sunk); color: var(--ink); }
.icon-btn .dot { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--paper); }
.me { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: oklch(0.72 0.07 55); color: white; font-weight: 650; font-size: 14px; border: 0; }
.menu-btn { display: none; }

svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- buttons, chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 16px; border-radius: 10px;
  border: 1px solid var(--rule-strong); background: var(--surface); color: var(--ink);
  font-weight: 580; white-space: nowrap; text-decoration: none;
  transition: background-color .15s, border-color .15s, transform .1s;
}
.btn:hover { border-color: var(--ink-2); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: white; }
.btn.primary:hover { background: var(--accent-hover); }
.btn.ghost { border-color: transparent; background: none; }
.btn.ghost:hover { background: var(--sunk); }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: 14px; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 7px; font-size: 13px; font-weight: 600; background: var(--sunk); color: var(--ink-2); white-space: nowrap; }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.warn { background: var(--warn-soft); color: oklch(0.42 0.09 70); }
.chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip.accent { background: var(--accent-soft); color: var(--accent-ink); }
.chip svg.i { width: 15px; height: 15px; }

.avatar { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 650; color: white; background: oklch(0.6 0.08 var(--h, 40)); }
.avatar.lg { width: 56px; height: 56px; font-size: 19px; }

.eyebrow { font-size: 12.5px; font-weight: 600; color: var(--muted); letter-spacing: .01em; }
.label { color: var(--muted); font-size: 13.5px; }

/* ---------- layout ---------- */
main { min-height: calc(100dvh - 64px); }
.view { animation: viewIn .22s var(--ease); }
@keyframes viewIn { from { opacity: 0; transform: translateY(4px); } }
.page-pad { padding: 28px 28px 48px; max-width: 1560px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { font-size: 34px; font-weight: 720; letter-spacing: -0.035em; }
.page-head .sub { color: var(--muted); margin-top: 4px; }
.page-head .actions { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- TODAY ---------- */
.today { display: grid; grid-template-columns: minmax(330px, 400px) minmax(0, 1fr) minmax(360px, 430px); gap: 0; height: calc(100dvh - 64px); }
.agenda { overflow: auto; padding: 26px 26px 40px 28px; border-right: 1px solid var(--rule); }
.agenda h1 { font-size: 38px; font-weight: 740; letter-spacing: -0.04em; }
.agenda .sub { color: var(--muted); margin: 6px 0 20px; }
.today-wrap { display: flex; flex-direction: column; height: calc(100dvh - 64px); }
.today-wrap .today { height: auto; flex: 1; min-height: 0; }
.speed {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin: 14px 22px 0; padding: 12px 14px 12px 22px; border-radius: var(--r-m);
  background: var(--accent); color: white; animation: barIn .4s var(--ease);
}
@keyframes barIn { from { opacity: 0; transform: translateY(-8px); } }
.speed .msg { flex: 1 1 320px; font-size: 18px; font-weight: 500; letter-spacing: -0.01em; }
.speed .msg b { font-weight: 700; }
.speed .dim { opacity: .85; }
.speed .linkish { border: 0; background: none; color: inherit; padding: 0; font: inherit; text-decoration: underline; text-decoration-color: oklch(1 0 0 / .45); text-underline-offset: 3px; }
.speed .clock { font-size: 40px; font-weight: 760; letter-spacing: -0.04em; line-height: 1; padding: 0 18px; border-left: 1px solid oklch(1 0 0 / .35); min-width: 120px; }
.speed .btn.light { background: oklch(0.98 0.01 70); border-color: transparent; color: var(--ink); }
.speed .btn.light:hover { background: white; }
.speed .btn.outline-light { background: none; border-color: oklch(1 0 0 / .7); color: white; }
.speed .btn.outline-light:hover { background: oklch(1 0 0 / .1); }
.speed :focus-visible { outline-color: white; }
.speed.done { background: var(--ok-soft); color: var(--ok); }
.speed.done .clock { border-left-color: oklch(0.45 0.09 150 / .3); }
.speed.done .msg b { color: var(--ink); }
.agenda-head { display: flex; align-items: baseline; justify-content: space-between; padding-bottom: 10px; border-bottom: 1px solid var(--rule); }
.agenda-head h2 { font-size: 19px; font-weight: 680; }
.slot {
  display: grid; grid-template-columns: 74px 3px 1fr; gap: 0 14px; width: 100%;
  padding: 16px 8px 16px 4px; border: 0; border-bottom: 1px solid var(--rule); background: none; text-align: left;
  border-radius: 0; transition: background-color .15s;
}
.slot:hover { background: color-mix(in oklch, var(--sunk) 60%, transparent); }
.slot[aria-pressed="true"] { background: var(--sunk); }
.slot .t { font-weight: 680; font-size: 15.5px; padding-top: 1px; }
.slot .bar { border-radius: 3px; background: var(--accent); }
.slot.done .bar { background: var(--rule-strong); }
.slot.done .t, .slot.done .what { color: var(--muted); }
.slot.done h3 { text-decoration: line-through; text-decoration-color: var(--rule-strong); color: var(--muted); }
.slot .kind { font-size: 13.5px; color: var(--muted); }
.slot h3 { font-size: 17px; font-weight: 680; margin: 2px 0 1px; }
.slot .what { font-size: 13.5px; color: var(--ink-2); }
.slot .thumb { margin-top: 10px; aspect-ratio: 16/9; width: 100%; border-radius: 10px; object-fit: cover; background: var(--sunk); }
.slot .facts { margin-top: 7px; font-size: 13px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 2px 8px; }
.slot .facts span { white-space: nowrap; }
.slot .facts span + span::before { content: "|"; margin-right: 8px; color: var(--rule-strong); }

.mapwrap { position: relative; padding: 22px; min-width: 0; }
.map { position: relative; height: 100%; border-radius: var(--r-l); overflow: hidden; background: oklch(0.93 0.02 80); box-shadow: inset 0 0 0 1px var(--rule); }
.map .town { position: absolute; left: 50%; top: 46%; transform: translate(-50%,-50%); font-size: 26px; font-weight: 700; letter-spacing: -0.02em; color: oklch(0.3 0.01 50 / .75); pointer-events: none; }
.map .street { position: absolute; font-size: 13px; font-weight: 550; color: oklch(0.35 0.01 50 / .7); pointer-events: none; white-space: nowrap; }
.pin {
  position: absolute; transform: translate(-50%, -100%); display: flex; flex-direction: column; align-items: center;
  border: 0; background: none; padding: 0; z-index: 1;
}
.pin .tag {
  padding: 6px 10px; border-radius: 8px; background: var(--surface); color: var(--ink);
  font-weight: 700; font-size: 14px; box-shadow: var(--shadow); white-space: nowrap;
  transition: background-color .15s, color .15s, transform .15s var(--ease);
}
.pin .stem { width: 2px; height: 10px; background: var(--ink-2); }
.pin .base { width: 10px; height: 10px; border-radius: 50%; background: var(--ink-2); box-shadow: 0 0 0 3px oklch(1 0 0 / .8); }
.pin.on .tag, .pin:hover .tag { background: var(--accent); color: white; transform: translateY(-2px); }
.pin.on .stem, .pin.on .base { background: var(--accent); }
.pin.on { z-index: 3; }
.pin.sold .tag { background: var(--sunk); color: var(--muted); box-shadow: none; }
.map-card {
  position: absolute; z-index: 5; width: 280px; background: var(--surface); border-radius: var(--r-m);
  box-shadow: var(--shadow-lift); overflow: hidden;
}
.map-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.map-card .b { padding: 12px 14px 14px; }
.map-card h3 { font-size: 16px; }
.map-card .row { display: flex; gap: 8px; margin-top: 10px; }
.map-legend { position: absolute; z-index: 800; left: 16px; bottom: 16px; display: flex; gap: 6px; flex-wrap: wrap; }
.map-legend button { height: 32px; padding: 0 12px; border-radius: 8px; border: 0; background: var(--surface); box-shadow: var(--shadow); font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.map-legend button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

.person { overflow: auto; padding: 24px 28px 40px; border-left: 1px solid var(--rule); }
.back { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 4px 0; color: var(--ink-2); font-weight: 550; }
.who { display: flex; gap: 18px; align-items: center; margin: 14px 0 22px; }
.who .avatar.xl { width: 92px; height: 92px; border-radius: 18px; font-size: 30px; }
.who h2 { font-size: 34px; font-weight: 740; letter-spacing: -0.04em; }
.who .meta { color: var(--ink-2); margin-top: 4px; }
.budget { display: flex; align-items: center; gap: 18px; padding-bottom: 18px; }
.budget .v { font-size: 25px; font-weight: 740; letter-spacing: -0.03em; }
.budget .sep { width: 1px; align-self: stretch; background: var(--rule); }
.actions-row { display: flex; gap: 10px; flex-wrap: wrap; padding-bottom: 20px; border-bottom: 1px solid var(--rule); }
.kv { width: 100%; border-collapse: collapse; margin: 6px 0 22px; }
.kv th, .kv td { text-align: left; padding: 10px 0; border-bottom: 1px solid var(--rule); font-weight: 450; vertical-align: top; }
.kv th { color: var(--ink-2); width: 42%; }
.section-h { display: flex; align-items: baseline; justify-content: space-between; margin: 22px 0 10px; }
.section-h h3 { font-size: 19px; font-weight: 680; }
.note { color: var(--ink-2); }
.match { color: inherit; text-decoration: none; display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; width: 100%; padding: 10px 0; border: 0; border-bottom: 1px solid var(--rule); background: none; text-align: left; }
.match img { width: 64px; height: 46px; object-fit: cover; border-radius: 7px; }
.match b { display: block; font-weight: 640; }
.match small { color: var(--muted); }
.score { font-weight: 720; font-size: 16px; }
.score.hi { color: var(--ok); }

/* timeline log */
.log { list-style: none; margin: 0; padding: 0; }
.log li { position: relative; display: grid; grid-template-columns: 36px 1fr; gap: 12px; padding: 0 0 18px; }
.log li::before { content: ""; position: absolute; left: 17px; top: 36px; bottom: 0; width: 1px; background: var(--rule); }
.log li:last-child::before { display: none; }
.log .ic { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--sunk); color: var(--ink-2); }
.log .ic svg.i { width: 17px; height: 17px; }
.log h4 { font-size: 15.5px; font-weight: 660; }
.log .when { font-size: 13px; color: var(--muted); }
.log .quote { margin-top: 8px; padding: 10px 14px; border-radius: 10px; background: var(--sunk); color: var(--ink-2); font-size: 14.5px; }
.log .offer { margin-top: 8px; display: flex; flex-wrap: wrap; border-radius: 10px; background: var(--sunk); font-size: 14px; }
.log .offer span { padding: 9px 14px; }
.log .offer span + span { border-left: 1px solid var(--rule-strong); }
.log li.new { animation: rowIn .35s var(--ease); }
@keyframes rowIn { from { opacity: 0; transform: translateY(-6px); } }

/* ---------- PIPELINE ---------- */
.strip { display: flex; gap: 0; flex-wrap: wrap; margin: 0 0 20px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.strip > div { padding: 14px 28px 14px 0; margin-right: 28px; border-right: 1px solid var(--rule); }
.strip > div:last-child { border-right: 0; }
.strip .v { font-size: 26px; font-weight: 740; letter-spacing: -0.03em; }
.strip .v.flash { animation: flash .6s var(--ease); }
@keyframes flash { 30% { color: var(--accent); } }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs button { height: 36px; padding: 0 14px; border-radius: 9px; border: 0; background: none; color: var(--ink-2); font-weight: 560; display: inline-flex; align-items: center; gap: 8px; }
.tabs button:hover { background: var(--sunk); }
.tabs button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.tabs .avatar { width: 22px; height: 22px; font-size: 10px; }

.board { display: grid; grid-template-columns: repeat(5, minmax(236px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x proximity; }
.col { display: flex; flex-direction: column; min-height: 420px; border-radius: var(--r-l); background: var(--sunk); scroll-snap-align: start; transition: background-color .15s, box-shadow .15s; }
.col.over { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.col-h { display: flex; align-items: center; gap: 8px; padding: 14px 14px 10px; }
.col-h h2 { font-size: 16.5px; font-weight: 680; }
.col-h .n { margin-left: auto; min-width: 26px; height: 24px; padding: 0 7px; border-radius: 7px; background: var(--surface); font-size: 13px; font-weight: 650; display: grid; place-items: center; }
.col-h .sum { width: 100%; font-size: 13px; color: var(--muted); }
.col-head-wrap { display: flex; flex-wrap: wrap; padding: 14px 14px 10px; gap: 2px 8px; align-items: center; }
.col-head-wrap h2 { font-size: 16.5px; font-weight: 680; }
.col-head-wrap .n { margin-left: auto; min-width: 26px; height: 24px; padding: 0 7px; border-radius: 7px; background: var(--surface); font-size: 13px; font-weight: 650; display: grid; place-items: center; }
.col-head-wrap .sum { width: 100%; font-size: 13px; color: var(--muted); }
.cards { display: flex; flex-direction: column; gap: 10px; padding: 0 10px 12px; flex: 1; }
.deal {
  position: relative; border-radius: var(--r-m); background: var(--surface); box-shadow: 0 1px 2px oklch(0.3 0.02 50 / .08);
  overflow: hidden; cursor: grab; transition: box-shadow .15s, transform .15s var(--ease), opacity .15s;
  touch-action: manipulation;
}
.deal:hover { box-shadow: var(--shadow); }
.deal.dragging { opacity: .35; }
.deal.landed { animation: land .4s var(--ease); }
@keyframes land { from { transform: scale(.97); box-shadow: var(--shadow-lift); } }
.deal img { width: 100%; aspect-ratio: 16/10; object-fit: cover; pointer-events: none; }
.deal .b { padding: 10px 12px 12px; }
.deal h3 { font-size: 15.5px; font-weight: 680; }
.deal .price { font-weight: 600; color: var(--ink-2); font-size: 14.5px; }
.deal .foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.deal .foot .nm { font-size: 14px; font-weight: 560; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deal .foot .d { margin-left: auto; font-size: 12.5px; color: var(--ink-2); background: var(--sunk); padding: 3px 8px; border-radius: 6px; white-space: nowrap; }
.deal .flag { position: absolute; top: 8px; left: 8px; }
.deal .move { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border-radius: 8px; border: 0; background: oklch(1 0 0 / .92); display: grid; place-items: center; color: var(--ink); opacity: 0; transition: opacity .15s; }
.deal:hover .move, .deal:focus-within .move { opacity: 1; }
@media (hover: none) { .deal .move { opacity: 1; } }
.col .empty { margin: 4px 0; padding: 18px 10px; border: 1.5px dashed var(--rule-strong); border-radius: var(--r-m); color: var(--muted); font-size: 13.5px; text-align: center; }

/* popover menu */
.menu { position: fixed; z-index: 60; min-width: 200px; padding: 6px; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-lift); border: 1px solid var(--rule); }
.menu button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 10px; border: 0; border-radius: 8px; background: none; text-align: left; font-weight: 520; }
.menu button:hover, .menu button:focus-visible { background: var(--sunk); outline: none; }
.menu button[aria-current="true"] { color: var(--muted); }
.menu .mh { padding: 6px 10px 4px; font-size: 12px; color: var(--muted); font-weight: 600; }

/* ---------- side sheet (deal / closing) ---------- */
.scrim { position: fixed; inset: 0; z-index: 40; background: oklch(0.2 0.02 50 / .28); animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.sheet {
  position: fixed; z-index: 41; top: 0; right: 0; bottom: 0; width: min(560px, 100vw);
  background: var(--paper); box-shadow: var(--shadow-lift); display: flex; flex-direction: column;
  animation: sheetIn .28s var(--ease);
}
@keyframes sheetIn { from { transform: translateX(40px); opacity: 0; } }
.sheet-h { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--rule); }
.sheet-h h2 { font-size: 20px; font-weight: 700; }
.sheet-h .x { margin-left: auto; }
.sheet-b { overflow: auto; padding: 0 22px 30px; flex: 1; }
.sheet-hero { margin: 18px 0 16px; display: grid; grid-template-columns: 140px 1fr; gap: 16px; align-items: center; }
.sheet-hero img { width: 140px; aspect-ratio: 4/3; object-fit: cover; border-radius: 10px; }
.sheet-hero .p { font-size: 24px; font-weight: 740; letter-spacing: -0.03em; }
.progress { height: 6px; border-radius: 6px; background: var(--sunk); overflow: hidden; margin: 8px 0 4px; }
.progress i { display: block; height: 100%; background: var(--ok); border-radius: 6px; transition: width .35s var(--ease); }
.check { display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.check input { width: 22px; height: 22px; accent-color: var(--ok); margin: 0; }
.check label { cursor: pointer; }
.check label b { display: block; font-weight: 600; }
.check label small { color: var(--muted); }
.check.ok label b { text-decoration: line-through; text-decoration-color: var(--rule-strong); color: var(--muted); }
.check .due { font-size: 13.5px; font-weight: 620; white-space: nowrap; }
.check .due.soon { color: var(--bad); }
.check.new-row { animation: rowIn .3s var(--ease) both; }
.sheet:has(.wide-flag) { width: min(840px, 100vw); }
.tl { margin: 4px 0 10px; padding: 16px 0 6px; border-top: 1px solid var(--rule); }
.tl-ends { display: flex; justify-content: space-between; font-size: 14px; }
.tl-ends span { display: grid; }
.tl-ends span:last-child { text-align: right; }
.tl-ends b { font-weight: 680; }
.tl-track { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); position: relative; }
.tl-track::before { content: ""; position: absolute; left: 8.33%; right: 8.33%; top: 14px; height: 2px; background: var(--ok); opacity: .55; }
.tl-track li { position: relative; display: grid; justify-items: center; gap: 3px; text-align: center; font-size: 13px; padding: 0 2px; }
.tl-track .dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); border: 2px solid var(--ok); color: white; margin-bottom: 6px; position: relative; }
.tl-track .done .dot { background: var(--ok); }
.tl-track .next .dot { background: var(--accent); border-color: var(--accent); }
.tl-track .dot svg.i { width: 16px; height: 16px; stroke-width: 2.6; }
.tl-track b { font-weight: 660; font-size: 13.5px; line-height: 1.15; }
.tl-track .pill { margin-top: 4px; padding: 3px 8px; border-radius: 7px; background: var(--sunk); color: var(--ink-2); font-weight: 600; font-size: 12px; white-space: nowrap; }
.tl-track .done .pill { background: var(--ok-soft); color: var(--ok); }
.tl-track .next .pill { background: var(--bad-soft); color: var(--bad); }
@media (max-width: 640px) {
  .tl-track { grid-template-columns: 1fr; gap: 10px; }
  .tl-track::before { left: 14px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; }
  .tl-track li { grid-template-columns: 30px 1fr auto; justify-items: start; text-align: left; align-items: center; column-gap: 10px; }
  .tl-track .dot { margin: 0; grid-row: span 2; }
  .tl-track .pill { grid-column: 3; grid-row: 1 / span 2; }
}
.money { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; padding: 14px 16px; border-radius: var(--r-m); background: var(--surface); box-shadow: inset 0 0 0 1px var(--rule); }
.money .tot { font-weight: 720; border-top: 1px solid var(--rule); padding-top: 8px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 600; font-size: 14px; }
.field input, .field select, .field textarea {
  min-height: 44px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--rule-strong); background: var(--surface); width: 100%; min-width: 0;
}
.field textarea { min-height: 84px; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.field .hint { font-size: 13px; color: var(--muted); }
.field .err { font-size: 13px; color: var(--bad); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }

/* ---------- LISTINGS ---------- */
.lgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 22px 18px; }
.lcard { display: block; text-decoration: none; color: inherit; border-radius: var(--r-l); }
.lcard .ph { position: relative; border-radius: var(--r-l); overflow: hidden; background: var(--sunk); }
.lcard img { width: 100%; aspect-ratio: 3/2; object-fit: cover; transition: transform .4s var(--ease); }
.lcard:hover img { transform: scale(1.02); }
.lcard .chip { position: absolute; left: 12px; top: 12px; background: var(--surface); }
.lcard .chip.ok { background: var(--ok-soft); }
.lcard .p { margin-top: 12px; font-size: 21px; font-weight: 730; letter-spacing: -0.03em; }
.lcard .a { font-weight: 600; }
.lcard .f { color: var(--ink-2); font-size: 14px; margin-top: 2px; }

.sheet-page .photos { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 6px; height: 330px; margin: 0 0 0; }
.sheet-page .photos button { padding: 0; border: 0; overflow: hidden; background: var(--sunk); }
.sheet-page .photos img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.sheet-page .photos button:hover img { transform: scale(1.02); }
.crumbs { display: flex; align-items: center; gap: 10px; padding: 16px 28px; }
.crumbs a { text-decoration: none; color: var(--ink-2); }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs .actions { margin-left: auto; display: flex; gap: 10px; }
.spec { display: grid; grid-template-columns: 1.35fr 1fr 1fr; padding: 22px 28px; gap: 0; border-bottom: 1px solid var(--rule); }
.spec .head .p { font-size: 50px; font-weight: 760; letter-spacing: -0.045em; line-height: 1; margin-top: 12px; }
.spec .head .addr { font-size: 24px; font-weight: 680; letter-spacing: -0.025em; margin-top: 8px; }
.spec .head .tags { display: flex; gap: 8px; }
.spec .head .tags .chip.st { background: var(--ink); color: var(--paper); }
.spec dl { margin: 0; padding: 0 0 0 28px; border-left: 1px solid var(--rule); margin-left: 28px; }
.spec dl div { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--rule); }
.spec dl div:last-child { border-bottom: 0; }
.spec dt { font-weight: 650; }
.spec dd { margin: 0; }
.two { display: grid; grid-template-columns: 1.1fr 1fr; }
.two > section { padding: 22px 28px 40px; }
.two > section + section { border-left: 1px solid var(--rule); }
.btable { width: 100%; border-collapse: collapse; }
.btable th { text-align: left; font-weight: 600; font-size: 13.5px; color: var(--ink-2); padding: 8px 6px; border-bottom: 1px solid var(--rule-strong); }
.btable th:last-child, .btable td:last-child { text-align: right; }
.btable td { padding: 10px 6px; border-bottom: 1px solid var(--rule); }
.btable tr.clickable { cursor: pointer; }
.btable tr.clickable:hover td { background: var(--sunk); }
.btable .nm { display: flex; align-items: center; gap: 10px; font-weight: 560; }
.btable .why { font-size: 12.5px; color: var(--muted); font-weight: 450; }
.bar-score { display: inline-flex; align-items: center; gap: 10px; }
.bar-score i { display: block; width: 60px; height: 5px; border-radius: 5px; background: var(--sunk); overflow: hidden; }
.bar-score i b { display: block; height: 100%; background: var(--ok); }

/* ---------- CONTACTS ---------- */
.ctable-wrap { overflow-x: auto; border-radius: var(--r-l); background: var(--surface); box-shadow: inset 0 0 0 1px var(--rule); }
.ctable { width: 100%; border-collapse: collapse; min-width: 860px; }
.ctable th { text-align: left; font-size: 13px; font-weight: 600; color: var(--ink-2); padding: 12px 14px; border-bottom: 1px solid var(--rule-strong); white-space: nowrap; }
.ctable td { padding: 12px 14px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.ctable tr:last-child td { border-bottom: 0; }
.ctable tbody tr { cursor: pointer; }
.ctable tbody tr:hover td { background: var(--paper); }
.ctable .nm { display: flex; align-items: center; gap: 10px; font-weight: 620; }
.ctable .nm small { display: block; font-weight: 450; color: var(--muted); }
.temp { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13.5px; }
.temp::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--rule-strong); }
.temp.hot::before { background: var(--bad); }
.temp.warm::before { background: var(--warn); }
.temp.new::before { background: var(--accent); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filters input { height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--rule-strong); background: var(--surface); width: 260px; max-width: 100%; }

/* ---------- command palette ---------- */
dialog { border: 0; padding: 0; background: transparent; max-width: none; max-height: none; }
dialog::backdrop { background: oklch(0.2 0.02 50 / .3); }
.palette { width: min(620px, calc(100vw - 32px)); margin-top: 12vh; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-lift); overflow: hidden; }
.palette .q { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--rule); }
.palette input { flex: 1; height: 56px; border: 0; background: none; font-size: 17px; outline: none; min-width: 0; }
.palette ul { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow: auto; }
.palette li button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 10px; border: 0; border-radius: 9px; background: none; text-align: left; }
.palette li button[aria-selected="true"] { background: var(--sunk); }
.palette li img { width: 44px; height: 32px; border-radius: 6px; object-fit: cover; }
.palette li small { color: var(--muted); margin-left: auto; }
.palette .none { padding: 18px; color: var(--muted); }

.modal { width: min(560px, calc(100vw - 32px)); border-radius: 16px; background: var(--paper); box-shadow: var(--shadow-lift); }
.modal .mh2 { display: flex; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--rule); }
.modal .mh2 h2 { font-size: 20px; }
.modal form { padding: 18px 22px 22px; }
.modal .foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }

/* ---------- toast ---------- */
.toasts { position: fixed; z-index: 80; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 8px; }
.toast { display: flex; align-items: center; gap: 12px; padding: 11px 12px 11px 16px; border-radius: 12px; background: var(--ink); color: var(--paper); box-shadow: var(--shadow-lift); animation: toastIn .25s var(--ease); font-weight: 520; }
.toast button { border: 0; background: oklch(1 0 0 / .12); color: inherit; padding: 6px 10px; border-radius: 8px; font-weight: 600; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }

.demo-badge { position: fixed; left: 16px; bottom: 16px; z-index: 30; display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 12px; border-radius: 10px; background: var(--surface); box-shadow: var(--shadow); font-size: 13px; color: var(--ink-2); }
.demo-badge button { border: 0; background: var(--sunk); border-radius: 7px; padding: 5px 9px; font-size: 13px; font-weight: 600; }

/* ---------- responsive ---------- */
@media (max-width: 1280px) {
  .today { grid-template-columns: minmax(300px, 360px) minmax(0, 1fr); }
  .today .person { display: none; }
  .today.person-open .person { display: block; position: fixed; z-index: 41; top: 64px; right: 0; bottom: 0; width: min(440px, 100vw); background: var(--paper); box-shadow: var(--shadow-lift); animation: sheetIn .25s var(--ease); }
  .search-btn { width: 220px; }
}
@media (max-width: 1100px) {
  .spec { grid-template-columns: 1fr 1fr; gap: 18px 0; }
  .spec .head { grid-column: 1 / -1; }
  .spec dl:first-of-type { border-left: 0; padding-left: 0; margin-left: 0; }
  .two { grid-template-columns: 1fr; }
  .two > section + section { border-left: 0; border-top: 1px solid var(--rule); }
  .nav a { padding: 0 10px; }
}
@media (max-width: 900px) {
  .top { gap: 12px; padding: 0 16px; }
  .nav { display: none; }
  .nav.open { display: flex; flex-direction: column; position: fixed; top: 64px; left: 0; right: 0; height: auto; padding: 8px 16px 16px; background: var(--paper); border-bottom: 1px solid var(--rule); box-shadow: var(--shadow); }
  .nav.open a { padding: 14px 4px; }
  .nav.open a[aria-current="page"]::after { left: 0; right: auto; top: 12px; bottom: 12px; width: 3px; height: auto; border-radius: 3px; }
  .menu-btn { display: grid; }
  .search-btn { width: 40px; padding: 0; justify-content: center; }
  .search-btn span, .search-btn kbd { display: none; }
  #newLeadBtn { width: 40px; padding: 0; }
  #newLeadBtn span { display: none; }
  .today { grid-template-columns: 1fr; height: auto; }
  .today-wrap { height: auto; }
  .speed { margin: 12px 16px 0; padding: 12px 14px; }
  .speed .clock { font-size: 30px; border-left: 0; padding: 0; min-width: 0; }
  .agenda { border-right: 0; padding: 20px 16px; }
  .mapwrap { height: 70vh; padding: 0 16px 16px; }
  .page-pad { padding: 20px 16px 48px; }
  .crumbs, .spec, .two > section { padding-left: 16px; padding-right: 16px; }
  .sheet-page .photos { grid-template-columns: 1fr; height: auto; }
  .sheet-page .photos button:not(:first-child) { display: none; }
  .sheet-page .photos img { aspect-ratio: 3/2; }
  .board { grid-template-columns: repeat(5, minmax(78vw, 1fr)); }
  .grid2 { grid-template-columns: 1fr; }
  .crumbs .actions .btn span { display: none; }
}
@media (max-width: 560px) {
  .spec { grid-template-columns: 1fr; }
  .spec dl { border-left: 0; padding-left: 0; margin-left: 0; }
  .spec .head .p { font-size: 40px; }
  .page-head h1 { font-size: 28px; }
  .strip > div { padding-right: 16px; margin-right: 16px; }
  .strip .v { font-size: 21px; }
  .demo-badge { left: 8px; bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- Leaflet maps ---------- */
.lmap { position: absolute; inset: 0; }
.map .leaflet-container { background: var(--sunk); font: inherit; }
.map .leaflet-tile-pane { filter: sepia(.22) saturate(1.15) brightness(1.01); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .map .leaflet-tile-pane { filter: sepia(.25) brightness(.95); } }
:root[data-theme="dark"] .map .leaflet-tile-pane { filter: sepia(.25) brightness(.95); }
.leaflet-container .leaflet-control-attribution { background: color-mix(in oklch, var(--surface) 85%, transparent); color: var(--muted); font-size: 11px; }
.leaflet-container .leaflet-control-attribution a { color: var(--ink-2); }
.leaflet-bar a { background: var(--surface); color: var(--ink); border-bottom-color: var(--rule); width: 36px; height: 36px; line-height: 36px; }
.leaflet-bar a:hover { background: var(--sunk); }
.leaflet-bar { border: 0 !important; box-shadow: var(--shadow) !important; border-radius: 10px !important; overflow: hidden; }
.pin-anchor { background: none; border: 0; }
.pin-anchor .pin { position: absolute; left: 0; top: 0; cursor: pointer; }
.leaflet-marker-icon:focus-visible { outline: none; }
.leaflet-marker-icon:focus-visible .pin .tag { outline: 2px solid var(--accent); outline-offset: 2px; }
.stop {
  position: absolute; left: 0; top: 0; transform: translate(calc(-50% + var(--dx, 0px) - var(--sx, 0px)), 9px);
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: white; font-weight: 700; font-size: 12px; border: 2px solid var(--surface);
  box-shadow: var(--shadow);
}
.stop.done { background: var(--muted); }
.route-note { position: absolute; z-index: 800; top: 14px; left: 14px; display: grid; gap: 1px; padding: 9px 14px; border-radius: 10px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); font-size: 13.5px; }
.route-note span { color: var(--ink-2); }
.lt-pop .leaflet-popup-content-wrapper { padding: 0; border-radius: var(--r-m); overflow: hidden; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lift); }
.lt-pop .leaflet-popup-content { margin: 0; width: 280px !important; font: inherit; line-height: 1.4; }
.lt-pop .leaflet-popup-content p { margin: 0; }
.lt-pop .leaflet-popup-tip { background: var(--surface); }
.lt-pop img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.lt-pop .b { padding: 12px 14px 14px; }
.lt-pop h3 { font-size: 16px; margin: 2px 0; }
.lt-pop .row { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.leaflet-container .lt-pop a.btn { color: var(--ink); }
.leaflet-container .lt-pop a.btn.primary { color: white; }
.leaflet-container a.leaflet-popup-close-button { color: white; text-shadow: 0 1px 4px oklch(0 0 0 / .6); top: 6px; right: 6px; font-size: 22px; }

.lmapview { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 20px; height: max(520px, calc(100dvh - 64px - 200px)); }
.lmapview .map { height: 100%; }
.lside { overflow: auto; min-width: 0; }
.lside-h { display: grid; padding-bottom: 10px; border-bottom: 1px solid var(--rule-strong); position: sticky; top: 0; background: var(--paper); z-index: 1; }
.lrow { display: grid; grid-template-columns: 120px 1fr; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--rule); text-decoration: none; color: inherit; }
.lrow img { width: 120px; aspect-ratio: 3/2; object-fit: cover; border-radius: 8px; }
.lrow > span { display: grid; gap: 2px; align-content: start; justify-items: start; }
.lrow .p { font-size: 18px; letter-spacing: -0.02em; }
.lrow .a { font-weight: 600; }
.lrow .f { color: var(--ink-2); font-size: 13.5px; }
.lrow .chip { margin-top: 4px; height: 22px; font-size: 12px; }
.lrow:hover .p, .lrow:focus-visible .p { color: var(--accent); }
.map.mini { height: 280px; margin-bottom: 14px; }
.btable.comps td:first-child { line-height: 1.3; }
@media (max-width: 900px) {
  .lmapview { grid-template-columns: 1fr; height: auto; }
  .lmapview .map { height: 58vh; }
  .route-note { top: 10px; left: 10px; }
}

.map.sat .leaflet-tile-pane { filter: none; }
.leaflet-control-layers { border: 0 !important; border-radius: 10px !important; box-shadow: var(--shadow) !important; background: var(--surface) !important; color: var(--ink); }
.leaflet-control-layers-expanded { padding: 4px !important; }
.leaflet-control-layers-base { display: flex; gap: 2px; }
.leaflet-control-layers-base label { margin: 0; }
.leaflet-control-layers-base label > span { display: block; }
.leaflet-control-layers-selector { position: absolute; opacity: 0; pointer-events: none; }
.leaflet-control-layers-base label span span { display: block; padding: 6px 11px; border-radius: 7px; font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.leaflet-control-layers-base input:checked + span { background: var(--ink); color: var(--paper); border-radius: 7px; }
.leaflet-control-layers-base input:focus-visible + span { outline: 2px solid var(--accent); }
.leaflet-control-layers-separator { display: none; }
