/* Summit Title Partners Team. Brand tokens from ~/summit-title-partners/src/styles/global.css */
:root {
  --navy-950: #060c1d; --navy-900: #0a132a; --navy-800: #0e1932; --navy-700: #142039; --navy-600: #1c2c4a; --navy-500: #2b3f63;
  --navy-400: #4a608a; --navy-300: #7c91b3; --navy-200: #aab8d0; --navy-100: #d8dfeb; --navy-50: #f1f4f9;
  --gold-50: #fbf6e8; --gold-100: #f4ecc7; --gold-200: #ead890; --gold-300: #ddc15b; --gold-500: #c19433; --gold-600: #a4792a; --gold-700: #855e23;
  --cream: #f5f1ea; --stone: #ece6dc; --line: #e4ddd0; --white: #fff;
  --red: #b42318; --red-bg: #fdecea; --amber: #8a5a12; --amber-bg: #fdf3e1; --green: #1f6b3a; --green-bg: #e3f2e8;
  --display: "Cormorant Garamond", "Playfair Display", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 12px; --side: 248px;
  --shadow: 0 1px 2px rgba(14, 25, 50, .05), 0 4px 16px rgba(14, 25, 50, .04);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--cream); color: var(--navy-800); font: 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--navy-600); }
h1, h2, h3, h4 { margin: 0; color: var(--navy-900); }
h1 { font: 600 30px/1.15 var(--display); letter-spacing: -.01em; }
h2 { font: 600 15px/1.3 var(--sans); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
p { margin: 0 0 8px; }
input, select, textarea, button { font: inherit; color: inherit; }
input, select, textarea { width: 100%; border: 1px solid var(--line); background: var(--white); border-radius: 9px; padding: 10px 12px; min-height: 42px; outline: none; }
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: var(--gold-500); box-shadow: 0 0 0 3px rgba(221, 193, 91, .25); }
label { display: block; font-size: 13px; font-weight: 500; color: var(--navy-500); }
label > input, label > select, label > textarea { margin-top: 5px; }
.lbl { font-size: 13px; font-weight: 500; color: var(--navy-500); margin-bottom: 5px; }
.muted { color: var(--navy-400); } .small { font-size: 13px; } .mono { font-family: ui-monospace, Menlo, monospace; letter-spacing: .02em; }
.row { display: flex; align-items: flex-end; } .gap { gap: 10px; } .wrap { flex-wrap: wrap; } .grow { flex: 1; min-width: 0; }
.bad, .bad-t { color: var(--red); font-weight: 600; } .warn, .warn-t { color: var(--amber); font-weight: 600; } .ok-t { color: var(--green); font-weight: 600; }
.loading { padding: 60px 20px; text-align: center; color: var(--navy-400); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 0 16px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--white); color: var(--navy-800); font-weight: 600; font-size: 14px; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--navy-200); }
.btn.primary { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.btn.primary:hover { background: var(--navy-700); }
.btn.ghost { background: transparent; }
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn.danger-ghost { color: var(--red); border-color: #f0c7c2; background: transparent; }
.btn.small { min-height: 34px; padding: 0 12px; font-size: 13px; }
.btn.wide { width: 100%; margin-top: 8px; }
.btn:disabled { opacity: .5; cursor: default; }
.icon-btn { border: 0; background: none; color: var(--navy-300); font-size: 22px; line-height: 1; width: 34px; height: 34px; border-radius: 8px; cursor: pointer; }
.icon-btn:hover { background: var(--stone); color: var(--red); }

/* gate */
#gate { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
#gate[hidden] { display: none; }
.gate-card { width: 100%; max-width: 400px; background: var(--white); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; padding: 0 28px 24px; }
.gate-top { background: var(--navy-800); margin: 0 -28px 24px; padding: 28px; display: flex; justify-content: center; }
.gate-top img { height: 88px; }
.gate-card h1 { margin-bottom: 6px; }
.gate-card form { display: grid; gap: 14px; margin: 18px 0 14px; }
.gate-msg { background: var(--amber-bg); color: var(--amber); padding: 10px 12px; border-radius: 9px; font-size: 14px; }

/* shell */
.shell { min-height: 100vh; }
.side { position: fixed; inset: 0 auto 0 0; width: var(--side); background: var(--navy-800); color: var(--navy-100); display: flex; flex-direction: column; padding: 22px 14px; z-index: 20; }
.brand { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 6px 0 22px; border-bottom: 1px solid rgba(255, 255, 255, .08); margin-bottom: 14px; text-decoration: none; }
.brand img { width: 150px; }
.brand span { font: 600 11px/1 var(--sans); letter-spacing: .28em; text-transform: uppercase; color: var(--gold-300); }
#side-nav { flex: 1; overflow-y: auto; }
#side-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 9px; color: var(--navy-100); text-decoration: none; font-weight: 500; font-size: 14px; margin-bottom: 2px; }
#side-nav a:hover { background: rgba(255, 255, 255, .05); color: #fff; }
#side-nav a.on { background: rgba(221, 193, 91, .12); color: #fff; box-shadow: inset 3px 0 0 var(--gold-300); }
#side-nav svg, .bottom svg, .me-link svg, .me-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
#side-nav a.on svg { color: var(--gold-300); }
.nav-label { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--navy-300); padding: 18px 12px 6px; }
.me-link { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 9px; color: var(--navy-100); text-decoration: none; border-top: 1px solid rgba(255, 255, 255, .08); }
.me-link span { display: flex; flex-direction: column; line-height: 1.25; } .me-link small { color: var(--navy-300); }
.me-link:hover { background: rgba(255, 255, 255, .05); }
.main { margin-left: var(--side); min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px; padding: 12px 32px; background: rgba(245, 241, 234, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); min-height: 64px; }
.brand-m, .me-btn { display: none; }
#state-switch { flex: 1; }
.seg { display: inline-flex; background: var(--stone); border-radius: 10px; padding: 3px; }
.seg button { border: 0; background: transparent; padding: 7px 16px; border-radius: 8px; font-weight: 600; font-size: 14px; color: var(--navy-500); cursor: pointer; }
.seg button.on { background: var(--white); color: var(--navy-900); box-shadow: 0 1px 3px rgba(14, 25, 50, .12); }
.state-fixed { display: inline-block; font-weight: 600; font-size: 14px; padding: 7px 14px; background: var(--stone); border-radius: 9px; }
#member-filter select { min-height: 38px; padding: 6px 30px 6px 12px; width: auto; font-weight: 500; font-size: 14px; }
#view { padding: 28px 32px 60px; max-width: 1240px; }
.bottom { display: none; }

/* page parts */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 20px; }
.page-head p { margin: 4px 0 0; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow); margin-bottom: 16px; }
.card.narrow { max-width: 620px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.grid2 > .card { margin-bottom: 0; }
.count { font-weight: 600; font-size: 12px; background: var(--stone); color: var(--navy-500); padding: 1px 8px; border-radius: 20px; }
.empty { text-align: center; padding: 28px 16px; color: var(--navy-500); }
.empty.big { padding: 80px 16px; }
.empty-t { font-weight: 600; color: var(--navy-800); margin-bottom: 4px; }
.kv { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--stone); font-size: 14px; }
.kv span { color: var(--navy-400); } .kv b { text-align: right; word-break: break-all; }
.back { display: inline-block; font-size: 14px; color: var(--navy-400); text-decoration: none; margin-bottom: 10px; }
.back::before { content: "‹ "; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chips button { border: 1px solid var(--line); background: var(--white); border-radius: 20px; padding: 6px 14px; font-size: 13px; font-weight: 500; cursor: pointer; color: var(--navy-600); }
.chips button b { color: var(--navy-400); font-weight: 600; margin-left: 2px; }
.chips button.on { background: var(--navy-800); border-color: var(--navy-800); color: #fff; } .chips button.on b { color: var(--gold-200); }
.tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 20px; background: var(--stone); color: var(--navy-500); white-space: nowrap; }
.tag.big { font-size: 13px; padding: 5px 12px; }
.tag.living { background: var(--green-bg); color: var(--green); } .tag.deceased { background: #ececec; color: #444; } .tag.unk { background: var(--navy-50); color: var(--navy-400); }
.flag { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 20px; background: var(--navy-50); color: var(--navy-500); border: 1px solid var(--navy-100); }
.flag.amber { background: var(--amber-bg); color: var(--amber); border-color: #f2d9ad; }
.nr { color: var(--navy-300); font-style: italic; }

/* stage pills */
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 20px; white-space: nowrap; }
.st-lead { background: #eef1f6; color: #2b3f63; } .st-contact { background: #e3eefb; color: #1d4f91; } .st-negotiating { background: #fdf0dc; color: #8a5a12; }
.st-contract { background: var(--gold-100); color: var(--gold-700); } .st-closed { background: var(--green-bg); color: var(--green); } .st-dispo { background: #e0f0ee; color: #17605a; }
.st-dead { background: #f3eceb; color: #8a3b3b; }
.tier { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 6px; font-size: 12px; font-weight: 700; flex: none; }
.tier-A { background: var(--navy-800); color: var(--gold-300); } .tier-B { background: var(--navy-100); color: var(--navy-700); } .tier-C { background: var(--stone); color: var(--navy-500); }
.clock { font-weight: 600; } .clock.hot { color: var(--red); } .clock.warm { color: var(--amber); } .clock.past { color: var(--navy-300); }
.stale-tag { font-size: 11px; font-weight: 700; color: #fff; background: var(--red); padding: 2px 8px; border-radius: 20px; }

/* alerts */
.alert { background: var(--red-bg); border: 1px solid #f3c3bd; border-left: 4px solid var(--red); border-radius: var(--r); padding: 14px 16px; margin-bottom: 16px; }
.alert.amber { background: var(--amber-bg); border-color: #f2d9ad; border-left-color: var(--gold-600); }
.alert-head { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; margin-bottom: 8px; }
.alert-head b { color: var(--red); font-size: 15px; } .alert.amber .alert-head b { color: var(--amber); }
.alert-head span { font-size: 13px; color: var(--navy-500); }
.alert-list a { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 8px 10px; background: rgba(255, 255, 255, .7); border-radius: 8px; margin-top: 4px; text-decoration: none; font-weight: 600; font-size: 14px; color: var(--navy-800); }
.alert-list a .muted { font-weight: 400; }

/* tiles */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.tile { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; text-decoration: none; color: inherit; box-shadow: var(--shadow); }
a.tile:hover { border-color: var(--gold-300); }
.tile-n { font: 600 30px/1 var(--sans); letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--navy-900); }
.tile-l { font-weight: 600; margin-top: 6px; font-size: 14px; }
.tile-m { font-size: 12px; color: var(--navy-400); margin-top: 2px; }
.tile.warn .tile-n { color: var(--amber); } .tile.muted .tile-n { color: var(--navy-300); }
.stage-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.ss { border-radius: 10px; padding: 10px 8px; text-align: center; }
.ss b { display: block; font: 600 20px/1.2 var(--sans); } .ss span { font-size: 12px; font-weight: 600; }

/* lists */
.lead-list, .adm-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.lead-row, .adm-row { display: flex; gap: 14px; align-items: center; background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; text-decoration: none; color: inherit; box-shadow: var(--shadow); }
.lead-row:hover, .adm-row:hover { border-color: var(--gold-300); }
.lead-row.stale, .adm-row.stale { border-left: 4px solid var(--red); }
.adm-row > a { text-decoration: none; color: inherit; }
.rank { font: 600 15px/1 var(--sans); color: var(--gold-600); width: 26px; text-align: center; flex: none; }
.lr-main { flex: 1; min-width: 0; }
.lr-top { display: flex; align-items: center; gap: 8px; }
.lr-addr { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lr-sub { font-size: 13px; color: var(--navy-400); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lr-why { font-size: 13px; color: var(--navy-600); margin-top: 6px; }
.lr-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--navy-500); margin-top: 6px; align-items: center; }
.lr-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; font-size: 12px; }
.asg { flex: none; width: 190px; } .asg select { min-height: 38px; }
.group { margin-bottom: 22px; } .group > summary { list-style: none; cursor: pointer; } .group > summary::-webkit-details-marker { display: none; }
.list { display: grid; gap: 2px; }
.mini-row { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-bottom: 1px solid var(--stone); text-decoration: none; color: inherit; font-size: 14px; }
.mini-row:hover { background: var(--cream); }
.mini-row .when { width: 110px; flex: none; font-size: 13px; font-weight: 600; color: var(--navy-500); }
.mini-row .when.bad { color: var(--red); } .mini-row .when.warn { color: var(--amber); }

/* tasks */
.task-form { display: grid; gap: 8px; margin-bottom: 12px; }
.task-form .row > * { flex: 1; min-width: 0; height: 42px; min-height: 42px; } .task-form .row > .btn { flex: none; }
.task { display: flex; align-items: flex-start; gap: 10px; padding: 10px 2px; border-bottom: 1px solid var(--stone); }
.task.done .task-t { text-decoration: line-through; color: var(--navy-300); }
.task-t { font-size: 14px; font-weight: 500; }
.task-m { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--navy-400); margin-top: 2px; }
.check { position: relative; width: 22px; height: 22px; flex: none; margin-top: 1px; cursor: pointer; }
.check input { position: absolute; opacity: 0; inset: 0; margin: 0; min-height: 0; }
.check span { position: absolute; inset: 0; border: 2px solid var(--navy-200); border-radius: 6px; background: #fff; }
.check input:checked + span { background: var(--navy-800); border-color: var(--navy-800); }
.check input:checked + span::after { content: ""; position: absolute; left: 6px; top: 2px; width: 6px; height: 11px; border: solid var(--gold-300); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.done-list summary { cursor: pointer; font-size: 13px; color: var(--navy-400); padding: 10px 0 4px; }
.pad { padding: 10px 0; }

/* tables */
.tscroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; font-weight: 600; color: var(--navy-400); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px; border-bottom: 1px solid var(--stone); vertical-align: top; }
.tbl.num td:not(:first-child), .tbl.num th:not(:first-child) { text-align: center; }
.tbl tr:last-child td { border-bottom: 0; }

/* lead page */
.lead-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 16px; }
.lead-head h1 { margin: 6px 0 4px; }
.lh-tags { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.big-clock { text-align: center; background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 16px; min-width: 112px; }
.big-clock b { display: block; font: 600 28px/1.1 var(--sans); letter-spacing: -.02em; } .big-clock span { font-size: 12px; color: var(--navy-400); }
.big-clock.hot b { color: var(--red); } .big-clock.warm b { color: var(--amber); } .big-clock.past b { color: var(--navy-300); font-size: 22px; }
.stage-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.stage-row button { border: 1px solid var(--line); background: var(--cream); border-radius: 9px; padding: 10px 6px; font-size: 13px; font-weight: 600; color: var(--navy-500); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; text-align: center; line-height: 1.2; }
.stage-row button .n { width: 20px; height: 20px; border-radius: 50%; background: var(--white); border: 1px solid var(--line); font-size: 11px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.stage-row button.past { background: var(--navy-50); color: var(--navy-600); }
.stage-row button.past .n { background: var(--navy-600); color: #fff; border-color: var(--navy-600); }
.stage-row button.on { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.stage-row button.on .n { background: var(--gold-300); border-color: var(--gold-300); color: var(--navy-900); }
.stage-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 14px; }
.sf-item { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.sf-item input, .sf-item select { width: auto; min-height: 38px; margin: 0; padding: 6px 10px; }
.dead-form { margin-top: 14px; padding: 14px; background: var(--red-bg); border-radius: 10px; display: grid; gap: 10px; max-width: 420px; }
.lead-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 420px); gap: 16px; align-items: start; }
.prose { font-size: 15px; line-height: 1.6; color: var(--navy-700); }
.prose p { margin: 0 0 10px; } .prose h2, .prose h3, .prose h4 { font: 600 16px/1.3 var(--sans); margin: 18px 0 8px; display: block; } .prose ul, .prose ol { padding-left: 20px; margin: 0 0 10px; }
.prose code { background: var(--stone); padding: 1px 5px; border-radius: 4px; font-size: 13px; }
.report { margin-top: 10px; font-size: 14px; }
details > summary { cursor: pointer; } details > summary h2 { display: inline-flex; margin: 0; }
.why { font-size: 13px; color: var(--navy-500); margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--stone); }
.say { margin-top: 12px; padding: 12px 14px; background: var(--gold-50); border-left: 3px solid var(--gold-300); border-radius: 8px; font-size: 14px; }
.say p { margin: 4px 0 0; }
.contact { padding: 12px 0; border-bottom: 1px solid var(--stone); } .contact:first-of-type { padding-top: 0; } .contact:last-child { border-bottom: 0; }
.c-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.phones { display: grid; gap: 6px; margin-top: 8px; }
.phone { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.ph { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 9px; background: var(--navy-800); color: #fff; font-weight: 600; text-decoration: none; font-variant-numeric: tabular-nums; }
.ph::before { content: ""; width: 14px; height: 14px; margin-right: 8px; background: var(--gold-300); -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M6.6 10.8a15 15 0 0 0 6.6 6.6l2.2-2.2a1 1 0 0 1 1-.25 11.4 11.4 0 0 0 3.6.57 1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.25.2 2.45.57 3.57a1 1 0 0 1-.25 1z"/></svg>') center / contain no-repeat; }
.ph:hover { background: var(--navy-700); }
.score { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 20px; }
.sc-CONFIRMED { background: var(--green-bg); color: var(--green); } .sc-LIKELY { background: var(--gold-100); color: var(--gold-700); } .sc-PARTIAL { background: var(--navy-50); color: var(--navy-500); }
.sc-OLD, .sc-UNSCORED { background: var(--stone); color: var(--navy-400); }
.emails { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 13px; }
.c-notes { color: var(--navy-500); margin-top: 6px; }
.signers tr.req td { background: var(--gold-50); } .signers tr.req td:first-child { box-shadow: inset 3px 0 0 var(--gold-300); }
.facts { display: grid; }
.fact { display: grid; grid-template-columns: 170px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--stone); font-size: 14px; }
.fact > span { color: var(--navy-400); font-size: 13px; } .fact:last-child { border-bottom: 0; }
.fact > div { word-break: break-word; }
.plain { margin: 0; padding-left: 18px; font-size: 14px; } .plain li { margin-bottom: 6px; }
.warn-card { border-left: 4px solid var(--gold-500); }

/* family tree */
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 12px; color: var(--navy-500); }
.lg::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; border: 2px solid; }
.lg.living::before { border-color: var(--green); background: var(--green-bg); } .lg.deceased::before { border-color: #888; background: #eee; }
.lg.unk::before { border-color: var(--navy-200); background: #fff; } .lg.must::before { border-color: var(--gold-500); background: var(--gold-100); }
.lg.low::before { border-color: var(--navy-300); border-style: dashed; }
.tree { overflow-x: auto; padding-bottom: 4px; }
.tree ul { list-style: none; margin: 0; padding-left: 22px; position: relative; }
.tree > ul { padding-left: 0; }
.tree li { position: relative; padding: 6px 0 0 18px; }
.tree > ul > li { padding-left: 0; }
.tree ul ul li::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; border-left: 2px solid var(--navy-100); }
.tree ul ul li:last-child::before { bottom: auto; height: 26px; }
.tree ul ul li::after { content: ""; position: absolute; left: 0; top: 26px; width: 16px; border-top: 2px solid var(--navy-100); }
.tn { display: inline-flex; flex-direction: column; gap: 1px; padding: 8px 12px; border-radius: 9px; border: 2px solid var(--navy-100); background: #fff; min-width: 200px; max-width: 360px; font-size: 13px; }
.tn b { font-size: 14px; } .tn-rel { color: var(--navy-500); } .tn-tags { font-size: 12px; color: var(--navy-400); } .tn-tags em { font-style: normal; color: var(--gold-700); font-weight: 700; }
.tn-note { font-size: 12px; color: var(--navy-400); margin-top: 2px; }
.tn.living { border-color: #9fd2b0; } .tn.deceased { border-color: #c9c9c9; background: #f7f7f7; } .tn.deceased b { color: #555; }
.tn.must { border-color: var(--gold-500); background: var(--gold-50); box-shadow: 0 0 0 3px rgba(221, 193, 91, .2); }
.tn.low { border-style: dashed; } .tn.root { border-color: var(--navy-600); }

/* calls */
.call-form { display: grid; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--stone); margin-bottom: 6px; }
.call-form .row > label { flex: 1 1 160px; }
.outcomes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.outcomes label { position: relative; margin: 0; }
.outcomes input { position: absolute; opacity: 0; inset: 0; min-height: 0; margin: 0; }
.outcomes span { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 40px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 9px; font-size: 12px; font-weight: 600; color: var(--navy-600); background: var(--cream); cursor: pointer; line-height: 1.2; }
.outcomes input:checked + span { background: var(--navy-800); color: #fff; border-color: var(--navy-800); }
.outcomes input:focus-visible + span { box-shadow: 0 0 0 3px rgba(221, 193, 91, .35); }
.call { padding: 10px 0; border-bottom: 1px solid var(--stone); } .call:last-child { border-bottom: 0; }
.call-top { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: center; }
.oc { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 20px; background: var(--stone); color: var(--navy-600); }
.oc-spoke, .oc-callback { background: var(--green-bg); color: var(--green); } .oc-not_interested, .oc-wrong_number { background: var(--red-bg); color: var(--red); }
.call-notes { font-size: 14px; margin-top: 4px; white-space: pre-wrap; }
.save-line { margin-top: 6px; } .save-line.bad { color: var(--red); }
.timeline { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--stone); }
.timeline li { position: relative; padding: 0 0 12px 12px; display: flex; flex-direction: column; }
.timeline li::before { content: ""; position: absolute; left: -20px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--navy-200); border: 2px solid #fff; }
.timeline li.k-stage::before { background: var(--gold-500); } .timeline li.k-call::before { background: var(--navy-600); }
.t-what { font-size: 14px; }

/* admin */
.members { display: grid; gap: 10px; }
.member { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.member.off { opacity: .6; }
.m-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.m-actions { display: flex; gap: 8px; }
.m-body { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: flex-end; margin-top: 12px; }
.m-body select { display: block; width: auto; min-height: 38px; }
.m-login { margin-top: 12px; }
.state-boxes { display: flex; flex-wrap: wrap; gap: 6px; }
.sbox { position: relative; margin: 0; }
.sbox input { position: absolute; opacity: 0; inset: 0; min-height: 0; margin: 0; cursor: pointer; }
.sbox span { display: inline-flex; align-items: center; justify-content: center; min-width: 52px; min-height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; font-weight: 600; font-size: 13px; background: var(--cream); color: var(--navy-400); cursor: pointer; }
.sbox input:checked + span { background: var(--navy-800); border-color: var(--navy-800); color: var(--gold-200); }
.sbox input:focus-visible + span { box-shadow: 0 0 0 3px rgba(221, 193, 91, .35); }
.switch { display: flex; align-items: center; gap: 8px; margin: 0; }
.switch input { width: 20px; height: 20px; min-height: 0; margin: 0; accent-color: var(--navy-800); }
.add-form { display: grid; gap: 12px; } .add-form .row > label { flex: 1 1 220px; } .add-form select { width: auto; }
.result-card { margin-top: 14px; padding: 16px; border-radius: 10px; background: var(--gold-50); border: 1px solid var(--gold-200); }
.result-card p { margin: 6px 0; }
.set-row { display: flex; gap: 10px; align-items: flex-end; padding: 10px 0; border-bottom: 1px solid var(--stone); }
.set-row input { max-width: 120px; display: block; }
.state-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; }

#toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: var(--navy-900); color: #fff; padding: 12px 18px; border-radius: 10px; font-size: 14px; font-weight: 500; opacity: 0; pointer-events: none; transition: .2s; z-index: 100; max-width: calc(100vw - 32px); box-shadow: 0 8px 24px rgba(0, 0, 0, .2); }
#toast.show { opacity: 1; transform: translate(-50%, 0); } #toast.bad { background: var(--red); }

/* tablet */
@media (max-width: 1100px) {
  .lead-grid { grid-template-columns: 1fr; }
  .lead-grid .col-a, .lead-grid .col-b { display: contents; }
  .lead-grid { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .lead-grid .card { min-width: 0; }
  .o1 { order: 1; } .o2 { order: 2; } .o3 { order: 3; } .o4 { order: 4; } .o5 { order: 5; } .o6 { order: 6; } .o7 { order: 7; } .o8 { order: 8; } .o9 { order: 9; } .o10 { order: 10; }
}
/* phone */
@media (max-width: 820px) {
  .side { display: none; }
  .main { margin-left: 0; padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
  .topbar { padding: 10px 14px; padding-top: calc(10px + env(safe-area-inset-top)); background: var(--navy-800); border-bottom: 0; gap: 10px; flex-wrap: wrap; min-height: 0; }
  .brand-m { display: flex; align-items: center; gap: 8px; text-decoration: none; flex: 1; min-width: 0; }
  .brand-m img { height: 22px; } .brand-m span { color: #fff; font: 600 17px/1 var(--display); letter-spacing: .02em; white-space: nowrap; }
  .me-btn { display: flex; width: 36px; height: 36px; border-radius: 50%; align-items: center; justify-content: center; color: var(--navy-100); background: rgba(255, 255, 255, .08); }
  #state-switch { order: 3; flex: 1 1 100%; }
  #member-filter { order: 4; flex: 1 1 100%; } #member-filter select { width: 100%; background-color: var(--navy-700); color: #fff; border-color: var(--navy-600); }
  .seg { display: flex; width: 100%; background: var(--navy-700); } .seg button { flex: 1; color: var(--navy-200); } .seg button.on { background: var(--gold-300); color: var(--navy-900); }
  .state-fixed { background: var(--navy-700); color: var(--gold-200); padding: 5px 12px; font-size: 13px; }
  #view { padding: 18px 14px 40px; }
  h1 { font-size: 26px; }
  .card { padding: 16px; border-radius: 12px; }
  .tiles { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tile { padding: 14px; } .tile-n { font-size: 26px; }
  .stage-strip { grid-template-columns: repeat(4, 1fr); }
  .grid2 { grid-template-columns: 1fr; }
  .grid2 > .card { margin-bottom: 16px; }
  .bottom { display: flex; position: fixed; inset: auto 0 0 0; background: var(--white); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); z-index: 30; }
  .bottom a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 0 8px; font-size: 11px; font-weight: 600; color: var(--navy-400); text-decoration: none; }
  .bottom a.on { color: var(--navy-900); } .bottom a.on svg { color: var(--gold-600); }
  .lead-row { padding: 12px; gap: 10px; align-items: flex-start; }
  .lr-side { display: none; }
  .lead-row .lr-addr { white-space: normal; }
  .rank { width: 18px; font-size: 14px; padding-top: 4px; }
  .adm-row { flex-direction: column; align-items: stretch; gap: 10px; }
  .asg { width: 100%; display: flex; align-items: center; gap: 10px; } .asg select { flex: 1; margin: 0; }
  .lead-head { flex-direction: column; gap: 10px; }
  .lh-clock { align-self: stretch; } .big-clock { display: flex; align-items: baseline; gap: 8px; justify-content: center; padding: 8px 12px; }
  .big-clock b { display: inline; font-size: 22px; }
  .stage-row { grid-template-columns: repeat(2, 1fr); }
  .stage-row button { justify-content: flex-start; padding: 8px 10px; }
  .stage-foot { gap: 10px; } .stage-foot .grow { display: none; }
  .sf-item { flex: 1 1 100%; } .sf-item input, .sf-item select { flex: 1; }
  .fact { grid-template-columns: 1fr; gap: 2px; }
  .signers thead { display: none; }
  .signers, .signers tbody, .signers tr, .signers td { display: block; width: 100%; }
  .signers tr { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; }
  .signers tr.req { background: var(--gold-50); border-color: var(--gold-200); } .signers tr.req td { background: none; box-shadow: none !important; }
  .signers td { border: 0; padding: 2px 0; }
  .signers td:not(:first-child)::before { content: attr(data-l) ": "; color: var(--navy-400); font-size: 12px; font-weight: 600; }
  .tn { min-width: 0; max-width: none; }
  .tree ul { padding-left: 12px; } .tree li { padding-left: 14px; } .tree ul ul li::after { width: 12px; }
  .outcomes { grid-template-columns: repeat(2, 1fr); }
  .page-head { margin-bottom: 14px; }
  .mini-row .when { width: 84px; }
  #toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
}
