/* ══════════════════════════════════════════════════════════════
   WC HUB · INSTITUTIONAL
   Private-capital editorial design system.
   Cream paper, forest ink, Fraunces display serif.
   ══════════════════════════════════════════════════════════════ */

:root {
  /* ── BRAND ──────────────────────────────────────────────── */
  --brand-forest:      #00331E;
  --brand-forest-2:    #004529;
  --brand-forest-lt:   #0E6B44;
  --brand-sage:        #8F9378;
  --brand-sage-lt:     #C2C5A8;
  --brand-cream:       #F4EEE3;
  --brand-cream-dk:    #E7DEC9;

  /* ── SURFACES (light) ──────────────────────────────────── */
  --bg:          #F5F1E8;   /* page */
  --surface-1:   #FAF7EF;   /* cards */
  --surface-2:   #EFEADD;   /* subtle panels, map bg */
  --surface-3:   #E4DDCB;   /* buried / alt rows */
  --border:      #D6CDB6;
  --border-2:    #BDB199;

  /* ── TEXT ──────────────────────────────────────────────── */
  --t-1: #1A1612;   /* primary — headlines */
  --t-2: #4A3F33;   /* body */
  --t-3: #7A6B5A;   /* meta / labels */
  --t-4: #A69885;   /* faint */

  /* ── ACCENTS ───────────────────────────────────────────── */
  --accent:      var(--brand-forest);
  --accent-2:    #3E5C3C;
  --accent-tint: rgba(0,51,30,.08);
  --accent-ink:  var(--brand-cream);

  /* ── SEMANTIC ──────────────────────────────────────────── */
  --ok:   #1F6B3A;
  --warn: #B07317;
  --bad:  #9B3838;
  --info: #3A5A85;

  /* ── STAGE ACCENT SYSTEM ───────────────────────────────── */
  /* Completed: sage, muted — "done, receded" */
  /* In-progress: forest, bold — the eye lands here */
  /* Upcoming: warm stone — quiet future */
  /* Passed: clay — dead */
  --stage-completed:   var(--brand-sage);
  --stage-current:     var(--brand-forest);
  --stage-upcoming:    #BDB199;
  --stage-upcoming-lt: rgba(189,177,153,.4);
  --stage-dead:        #9B3838;

  /* Per-stage colors for pills (consistent everywhere) */
  --stg-identified:  #9B9078;
  --stg-analyzed:    #7A7156;
  --stg-reviewed:    #5E5540;
  --stg-offer-sent:  #8A6B2F;
  --stg-offer-acc:   #6B5020;
  --stg-dd:          #5E7E50;
  --stg-financing:   #3E5C3C;
  --stg-closing:     #1F4525;
  --stg-owned:       #00331E;
  --stg-passed:      #7A3030;

  /* ── TYPE ──────────────────────────────────────────────── */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body:    'Montserrat', system-ui, sans-serif;
  --font-mono:    'IBM Plex Mono', ui-monospace, monospace;

  /* ── RADII ─────────────────────────────────────────────── */
  --r-sm: 3px;
  --r:    4px;
  --r-lg: 6px;
  --r-xl: 10px;

  /* ── SPACING RHYTHM ────────────────────────────────────── */
  --sp-xs: 6px;
  --sp-sm: 12px;
  --sp:    20px;
  --sp-md: 28px;   /* standard card-to-card */
  --sp-lg: 40px;
  --sp-xl: 56px;

  /* ── SHADOWS ───────────────────────────────────────────── */
  --sh-1: 0 1px 2px rgba(26,22,18,.04);
  --sh-2: 0 4px 16px rgba(26,22,18,.06), 0 1px 3px rgba(26,22,18,.04);
  --sh-popover: 0 20px 40px rgba(26,22,18,.12);

  /* ── SIZES ─────────────────────────────────────────────── */
  --nav-w: 64px;
  --topbar-h: 60px;
  --tabbar-h: 46px;
}

/* ══════════════════════════════════════════════════════════════
   BASE
   ══════════════════════════════════════════════════════════════ */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--t-1);
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; cursor: pointer; }
::selection { background: var(--accent-tint); color: var(--accent); }

/* ══════════════════════════════════════════════════════════════
   LAYOUT — APP SHELL
   ══════════════════════════════════════════════════════════════ */
.app {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.page {
  flex: 1;
  overflow: auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* ── NAV (56px icon rail, forest bg) ────────────────────── */
.nav {
  width: var(--nav-w);
  background: var(--brand-forest);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 0;
  flex-shrink: 0;
}
.nav-logo {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 28px;
  border-radius: var(--r);
  text-decoration: none;
  transition: opacity .15s;
}
.nav-logo:hover { opacity: .85; text-decoration: none; }
.nav-logo img {
  width: 28px; height: 28px;
  object-fit: contain;
  filter: brightness(0) invert(1) sepia(.4) saturate(.3);
}
.nav-items { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  width: 40px; height: 40px;
  border-radius: var(--r);
  display: flex; align-items: center; justify-content: center;
  color: rgba(244,238,227,.55);
  text-decoration: none;
  position: relative;
  transition: background .15s, color .15s;
}
.nav-item:hover { color: var(--brand-cream); background: rgba(244,238,227,.08); text-decoration: none; }
.nav-item.active { color: var(--brand-cream); background: rgba(244,238,227,.14); }
.nav-item.active::before {
  content: '';
  position: absolute; left: 0; top: 10px; bottom: 10px;
  width: 2px; background: var(--brand-sage-lt);
  border-radius: 0 2px 2px 0;
}
.nav-item svg { width: 19px; height: 19px; }
.nav-spacer { flex: 1; }
.nav-label {
  font-size: 9px;
  font-weight: 700;
  color: rgba(244,238,227,.4);
  letter-spacing: 1.4px;
  font-family: var(--font-mono);
}

/* ── TOPBAR ──────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  padding: 0 28px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  position: relative;
}
.topbar::after {
  content: '';
  position: absolute;
  left: 28px; right: 28px; bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, var(--border-2) 0%, var(--border) 100%);
  opacity: .5;
}
.topbar-title {
  display: flex;
  align-items: baseline;
  gap: 16px;
  min-width: 0;
  flex: 1;
}
.topbar-title h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 21px;
  letter-spacing: -.3px;
  color: var(--t-1);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 0 1 auto;
  min-width: 0;
  line-height: 1.1;
}
.topbar-title .sub {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--t-3);
  white-space: nowrap;
  flex-shrink: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 1100px) {
  .topbar-title .sub { display: none; }
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 18px;
}
.topbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
}
.topbar-user .name {
  font-size: 11px;
  letter-spacing: .3px;
  color: var(--t-2);
}
.topbar-user .avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px;
  font-weight: 600;
  font-family: var(--font-display);
  letter-spacing: .3px;
}
.live-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--ok);
}
.live-dot::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ok);
  animation: live-pulse 2s ease infinite;
}
@keyframes live-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}

/* ── TABBAR ─────────────────────────────────────────────── */
.tabbar {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  background: var(--surface-1);
  padding: 0 28px;
  height: var(--tabbar-h);
  align-items: stretch;
  flex-shrink: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabbar::-webkit-scrollbar { display: none; }
.tab {
  padding: 0 16px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--t-3);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  white-space: nowrap;
  text-decoration: none;
  transition: color .12s;
  margin-bottom: -1px;
  position: relative;
}
.tab:first-child { padding-left: 0; }
.tab-count {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 5px;
  border-radius: 8px;
  background: var(--surface-3);
  color: var(--t-3);
  font-size: 9px;
  letter-spacing: .3px;
  font-family: var(--font-mono);
}
.tab.active .tab-count { background: var(--accent-tint); color: var(--accent); }
.tab:hover { color: var(--t-2); text-decoration: none; }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.tabbar.filled .tab.active { border-bottom-color: var(--accent); }

/* ══════════════════════════════════════════════════════════════
   TYPE UTILITIES
   ══════════════════════════════════════════════════════════════ */
.display { font-family: var(--font-display); font-weight: 400; letter-spacing: -.3px; color: var(--t-1); }
.display-lg { font-size: 28px; line-height: 1.1; letter-spacing: -.6px; }
.display-md { font-size: 22px; line-height: 1.2; letter-spacing: -.4px; }
.display-sm { font-size: 16px; line-height: 1.25; letter-spacing: -.2px; }
.mono { font-family: var(--font-mono); }

.eyebrow {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--t-3);
}
.section-label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--t-3);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.muted { color: var(--t-3); }
.faint { color: var(--t-4); }
.num   { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ══════════════════════════════════════════════════════════════
   CARDS & PANELS
   ══════════════════════════════════════════════════════════════ */
.card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 20px 24px;
}
.card-flush { padding: 0; }
.card-tight { padding: 14px 18px; }
.card-accent {
  background: var(--accent);
  color: var(--brand-cream);
  border: none;
}
.card-accent .eyebrow { color: rgba(244,238,227,.65); }
.card-accent .display { color: var(--brand-cream); }

.panel {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r);
}

.divided > * + * { border-top: 1px solid var(--border); }

/* KPI grid — editorial joined cells */
.kpi-grid {
  display: grid;
  gap: 0;
  border: 1px solid var(--border);
  background: var(--surface-1);
  border-radius: var(--r);
  overflow: hidden;
}
.kpi-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.kpi-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.kpi-grid.cols-5 { grid-template-columns: repeat(5, 1fr); }
.kpi {
  padding: 20px 22px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 108px;
}
.kpi:last-child { border-right: none; }
.kpi-label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--t-3);
  margin-bottom: 10px;
}
.kpi-value {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 400;
  letter-spacing: -.5px;
  color: var(--accent);
  line-height: 1;
  font-feature-settings: "lnum", "tnum";
}
.kpi-value.sm { font-size: 24px; }
.kpi-value.t-1 { color: var(--t-1); }
.kpi-value.ok  { color: var(--ok); }
.kpi-sub {
  font-size: 10px;
  color: var(--t-3);
  margin-top: 6px;
  letter-spacing: .3px;
}
.kpi-sub.ok   { color: var(--ok); }
.kpi-sub.warn { color: var(--warn); }
.kpi-sub.bad  { color: var(--bad); }

/* ══════════════════════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════════════════════ */
.btn {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 9px 14px;
  border-radius: var(--r);
  border: 1px solid transparent;
  background: transparent;
  color: var(--t-2);
  cursor: pointer;
  transition: background .12s, color .12s, border-color .12s, transform .08s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}
.btn:active { transform: translateY(0.5px); }
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn-primary:hover { background: var(--brand-forest-2); }
.btn-ghost {
  background: transparent;
  color: var(--accent);
  border-color: var(--border-2);
}
.btn-ghost:hover { background: var(--accent-tint); }
.btn-subtle {
  background: var(--surface-2);
  color: var(--t-2);
  border-color: var(--border);
}
.btn-subtle:hover { background: var(--surface-3); }
.btn-sm { padding: 7px 11px; font-size: 9px; letter-spacing: 1px; }
.btn-lg { padding: 12px 20px; font-size: 11px; }
.btn-icon { padding: 8px 9px; }
.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; border-right-width: 0; }
.btn-group .btn:first-child { border-top-left-radius: var(--r); border-bottom-left-radius: var(--r); }
.btn-group .btn:last-child { border-right-width: 1px; border-top-right-radius: var(--r); border-bottom-right-radius: var(--r); }

/* ══════════════════════════════════════════════════════════════
   STAGE SYSTEM — pills, steppers
   ══════════════════════════════════════════════════════════════ */
.stage-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 20px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .9px;
  text-transform: uppercase;
  white-space: nowrap;
  font-family: var(--font-mono);
  background: var(--stage-tint, rgba(122,107,90,.12));
  color: var(--stage-color, var(--t-3));
  border: 1px solid var(--stage-border, rgba(122,107,90,.3));
}
.stage-pill::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--stage-color, var(--t-3));
  flex-shrink: 0;
}
.stage-pill.lg { height: 24px; padding: 0 12px; font-size: 10px; }

/* Per-stage colorways (set as CSS custom props on the pill) */
.s-identified  { --stage-color: var(--stg-identified);  --stage-tint: rgba(155,144,120,.14);  --stage-border: rgba(155,144,120,.4); }
.s-analyzed    { --stage-color: var(--stg-analyzed);    --stage-tint: rgba(122,113,86,.14);   --stage-border: rgba(122,113,86,.4); }
.s-reviewed    { --stage-color: var(--stg-reviewed);    --stage-tint: rgba(94,85,64,.14);     --stage-border: rgba(94,85,64,.4); }
.s-offer-sent  { --stage-color: var(--stg-offer-sent);  --stage-tint: rgba(138,107,47,.14);   --stage-border: rgba(138,107,47,.4); }
.s-offer-acc   { --stage-color: var(--stg-offer-acc);   --stage-tint: rgba(107,80,32,.14);    --stage-border: rgba(107,80,32,.4); }
.s-dd          { --stage-color: var(--stg-dd);          --stage-tint: rgba(94,126,80,.16);    --stage-border: rgba(94,126,80,.45); }
.s-financing   { --stage-color: var(--stg-financing);   --stage-tint: rgba(62,92,60,.16);     --stage-border: rgba(62,92,60,.45); }
.s-closing     { --stage-color: var(--stg-closing);     --stage-tint: rgba(31,69,37,.16);     --stage-border: rgba(31,69,37,.45); }
.s-owned       { --stage-color: var(--stg-owned);       --stage-tint: rgba(0,51,30,.14);      --stage-border: rgba(0,51,30,.4); }
.s-passed      { --stage-color: var(--stg-passed);      --stage-tint: rgba(122,48,48,.14);    --stage-border: rgba(122,48,48,.4); }

/* Pipeline stepper — dots + connectors, brand-relevant state system */
.stepper {
  display: flex;
  align-items: center;
  width: 100%;
}
.stepper-node {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}
.stepper-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid var(--stage-upcoming);
  flex-shrink: 0;
  position: relative;
  transition: all .2s;
}
.stepper-conn {
  height: 1.5px;
  flex: 1 1 auto;
  background: var(--stage-upcoming);
  min-width: 12px;
}
/* Completed: filled sage */
.stepper-node.done .stepper-dot {
  background: var(--stage-completed);
  border-color: var(--stage-completed);
}
.stepper-node.done + .stepper-node .stepper-conn,
.stepper-node.done .stepper-conn {
  background: var(--stage-completed);
}
/* Current: filled forest + glow */
.stepper-node.current .stepper-dot {
  background: var(--stage-current);
  border-color: var(--stage-current);
  width: 14px; height: 14px;
  box-shadow: 0 0 0 4px rgba(0,51,30,.14);
}
.stepper-labels {
  display: flex;
  margin-top: 10px;
}
.stepper-label {
  flex: 1;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-align: center;
  color: var(--t-4);
}
.stepper-label.done    { color: var(--stage-completed); }
.stepper-label.current { color: var(--stage-current); font-weight: 700; }
.stepper-label:first-child { text-align: left; }
.stepper-label:last-child  { text-align: right; }

/* ══════════════════════════════════════════════════════════════
   TABLES — editorial with rules, tabular nums
   ══════════════════════════════════════════════════════════════ */
.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}
.tbl th {
  padding: 12px 8px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--t-3);
  text-align: left;
  border-bottom: 2px solid var(--border-2);
  white-space: nowrap;
}
.tbl th.r, .tbl td.r { text-align: right; }
.tbl td {
  padding: 12px 8px;
  color: var(--t-2);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.tbl tr:last-child td { border-bottom: none; }
.tbl td.name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 13px;
  color: var(--t-1);
  letter-spacing: -.1px;
}
.tbl td.num, .tbl th.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.tbl-hover tr:hover td { background: var(--surface-2); cursor: pointer; }

/* Keyed rows (name / value) */
.kvl {
  width: 100%;
}
.kvl > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  gap: 14px;
}
.kvl > div:last-child { border-bottom: none; }
.kvl .k {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--t-3);
  flex-shrink: 0;
}
.kvl .v {
  color: var(--t-1);
  text-align: right;
  font-weight: 500;
}
.kvl.dense > div { padding: 9px 0; }

/* ══════════════════════════════════════════════════════════════
   ACTIVITY / TIMELINE
   ══════════════════════════════════════════════════════════════ */
.activity-row {
  display: grid;
  grid-template-columns: 110px 44px 1fr 90px;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}
.activity-row:last-child { border-bottom: none; }
.activity-kind {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--t-3);
}
.activity-kind .dir {
  display: block;
  margin-top: 4px;
  font-size: 9px;
  letter-spacing: 1px;
}
.activity-kind .dir.in { color: var(--ok); }
.activity-kind .dir.out { color: var(--accent); }
.act-icon {
  width: 40px; height: 40px;
  border-radius: var(--r);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 17px;
  color: var(--act-color, var(--t-3));
  background: var(--act-tint, rgba(122,107,90,.12));
  flex-shrink: 0;
}
.ai-email    { --act-color: var(--info);   --act-tint: rgba(58,90,133,.12); }
.ai-call     { --act-color: var(--ok);     --act-tint: rgba(31,107,58,.12); }
.ai-mailer   { --act-color: var(--accent); --act-tint: var(--accent-tint); }
.ai-linkedin { --act-color: var(--info);   --act-tint: rgba(58,90,133,.12); }
.ai-meeting  { --act-color: var(--accent); --act-tint: var(--accent-tint); }
.ai-analysis { --act-color: var(--info);   --act-tint: rgba(58,90,133,.12); }
.ai-file     { --act-color: var(--brand-sage-lt); --act-tint: rgba(194,197,168,.2); }
.ai-stage    { --act-color: var(--warn);   --act-tint: rgba(176,115,23,.12); }
.ai-deal     { --act-color: var(--ok);     --act-tint: rgba(31,107,58,.12); }

.activity-body .deal {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}
.activity-body .title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -.2px;
  color: var(--t-1);
  margin-bottom: 6px;
  line-height: 1.3;
}
.activity-body .body {
  font-size: 11.5px;
  color: var(--t-2);
  line-height: 1.65;
  margin-bottom: 4px;
}
.activity-body .who {
  font-size: 10px;
  color: var(--t-4);
  letter-spacing: .3px;
}
.activity-time {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--t-4);
  text-align: right;
  letter-spacing: .3px;
  white-space: nowrap;
}

/* Journal — condensed timeline variant (for dossier) */
.journal-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 18px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}
.journal-row:last-child { border-bottom: none; }
.journal-meta .kind {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--t-3);
}
.journal-meta .t {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--t-4);
  margin-top: 3px;
}
.journal-body .title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  color: var(--t-1);
  margin-bottom: 3px;
}
.journal-body .body {
  font-size: 11px;
  color: var(--t-2);
  line-height: 1.65;
}
.journal-body .who {
  font-size: 10px;
  color: var(--t-4);
  margin-top: 4px;
  letter-spacing: .3px;
}

/* ══════════════════════════════════════════════════════════════
   FILTER BAR — horizontal chip/tab filters
   ══════════════════════════════════════════════════════════════ */
.filters {
  display: flex;
  gap: 22px;
  padding: 12px 28px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-1);
  align-items: center;
  flex-shrink: 0;
  min-height: 44px;
}
.filters-sep {
  width: 1px;
  height: 16px;
  background: var(--border);
}
.filter {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--t-3);
  cursor: pointer;
  transition: color .12s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  line-height: 1;
}
.filter:hover { color: var(--t-2); }
.filter.active { color: var(--accent); }
.filter .count {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--t-4);
  font-weight: 500;
}
.filter.active .count { color: var(--accent); opacity: .7; }
/* Tab-style (used in sidebar) */
.filter-tab {
  border-bottom: 2px solid transparent;
  padding-bottom: 6px;
}
.filter-tab.active { border-bottom-color: var(--accent); }
.filters-label {
  font-size: 10px;
  color: var(--t-3);
  letter-spacing: .4px;
}

/* ══════════════════════════════════════════════════════════════
   FORMS
   ══════════════════════════════════════════════════════════════ */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--t-3);
}
.input, .select, .textarea {
  width: 100%;
  padding: 10px 12px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r);
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--t-1);
  transition: border-color .12s, background .12s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: #FFF;
}
.input.num, .num-input { font-family: var(--font-mono); text-align: right; }
.input-prefix {
  position: relative;
}
.input-prefix input { padding-left: 28px; }
.input-prefix::before {
  content: attr(data-prefix);
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--t-3);
  font-size: 11px;
  font-family: var(--font-mono);
  pointer-events: none;
}

/* ══════════════════════════════════════════════════════════════
   MAP — Leaflet-ish styling
   ══════════════════════════════════════════════════════════════ */
.map-shell {
  position: relative;
  background: var(--surface-2);
  overflow: hidden;
}
.map-tiles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.map-overlay {
  position: absolute;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 14px 16px;
  box-shadow: var(--sh-popover);
  z-index: 10;
}
.map-legend {
  bottom: 16px; left: 16px;
  min-width: 230px;
}
.map-legend-title {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--t-3);
  margin-bottom: 10px;
}
.map-legend-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px 18px;
}
.map-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  color: var(--t-2);
}
.map-legend-item .dot {
  width: 7px; height: 7px; border-radius: 50%;
}
.map-controls {
  top: 14px;
  right: 14px;
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.map-controls button {
  width: 28px; height: 28px;
  border: none;
  background: transparent;
  color: var(--t-2);
  font-size: 15px;
  cursor: pointer;
  border-radius: var(--r-sm);
}
.map-controls button:hover { background: var(--surface-2); }
.map-popup {
  top: 28%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 300px;
  padding: 20px;
}
.map-popup .eyebrow { color: var(--accent); margin-bottom: 8px; }
.map-popup h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -.3px;
  color: var(--t-1);
  margin: 0 0 4px;
}
.map-popup .sub {
  font-size: 10.5px;
  color: var(--t-3);
  letter-spacing: .3px;
  margin-bottom: 14px;
}
.map-popup-actions {
  display: flex;
  gap: 6px;
  margin-top: 16px;
}

/* ══════════════════════════════════════════════════════════════
   SIDEBAR LIST (portfolio)
   ══════════════════════════════════════════════════════════════ */
.list-sidebar {
  width: 340px;
  background: var(--surface-1);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  min-height: 0;
}
.list-header {
  padding: 20px 24px 14px;
  border-bottom: 1px solid var(--border);
}
.list-header .eyebrow { margin-bottom: 6px; }
.list-header .count {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -.4px;
  color: var(--accent);
  line-height: 1;
}
.list-header .sub {
  font-size: 11px;
  color: var(--t-3);
  margin-top: 4px;
}
.list-filters {
  padding: 12px 20px 0;
  display: flex;
  gap: 18px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.list-filters .filter { padding-bottom: 12px; }
.list-body {
  flex: 1;
  overflow-y: auto;
}
.list-item {
  padding: 16px 24px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background .12s;
}
.list-item:hover { background: var(--surface-2); }
.list-item.active { background: var(--surface-2); }
.list-item-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 5px;
}
.list-item-head .name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: -.2px;
  color: var(--t-1);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.list-item-head .ask {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--t-2);
  white-space: nowrap;
}
.list-item-meta {
  font-size: 10px;
  color: var(--t-3);
  letter-spacing: .3px;
  margin-bottom: 8px;
}

/* ══════════════════════════════════════════════════════════════
   CHARTS
   ══════════════════════════════════════════════════════════════ */
.bar-chart {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.bar-row .label {
  font-size: 10.5px;
  color: var(--t-2);
  flex: 0 1 160px;
  min-width: 80px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bar-row .track {
  flex: 1 1 60px;
  min-width: 40px;
  background: var(--surface-2);
  height: 6px;
  border-radius: 1px;
  position: relative;
}
.bar-row .fill {
  height: 100%;
  background: var(--accent);
  border-radius: 1px;
}
.bar-row .value {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 11px;
  color: var(--accent);
  width: 46px;
  text-align: right;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════════
   BANNERS / CALLOUTS
   ══════════════════════════════════════════════════════════════ */
.callout {
  padding: 16px 20px;
  border-radius: var(--r);
  font-size: 11.5px;
  line-height: 1.6;
}
.callout.primary { background: var(--accent); color: var(--brand-cream); }
.callout.primary .eyebrow { color: rgba(244,238,227,.65); margin-bottom: 6px; }
.callout.primary strong { color: var(--brand-cream); }
.callout.warn    { background: rgba(176,115,23,.08); border: 1px solid rgba(176,115,23,.3); color: var(--t-2); }
.callout.warn .eyebrow { color: var(--warn); }
.callout.ok      { background: rgba(31,107,58,.08); border: 1px solid rgba(31,107,58,.3); color: var(--t-2); }
.callout.ok .eyebrow { color: var(--ok); }
.callout.bad     { background: rgba(155,56,56,.08); border: 1px solid rgba(155,56,56,.3); color: var(--t-2); }
.callout.bad .eyebrow { color: var(--bad); }

/* Flag list — inline diligence items */
.flag-list > div {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.flag-list > div:last-child { border-bottom: none; }
.flag-tag {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.flag-tag.warn { color: var(--warn); }
.flag-tag.bad  { color: var(--bad); }
.flag-tag.ok   { color: var(--ok); }
.flag-tag.info { color: var(--info); }
.flag-body {
  font-size: 11.5px;
  color: var(--t-2);
  line-height: 1.55;
}

/* ══════════════════════════════════════════════════════════════
   INSPECTOR DRAWER — floating property preview on map
   ══════════════════════════════════════════════════════════════ */
.inspector {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 360px;
  max-height: calc(100% - 28px);
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--sh-popover);
  z-index: 20;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: inspector-in .18s ease;
}
@keyframes inspector-in {
  from { opacity: 0; transform: translateX(-8px); }
  to { opacity: 1; transform: translateX(0); }
}
.inspector-head {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.inspector-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: none;
  background: var(--surface-2);
  color: var(--t-3);
  cursor: pointer;
  font-size: 11px;
  line-height: 1;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
}
.inspector-close:hover { background: var(--surface-3); color: var(--t-1); }
.inspector-head .eyebrow { color: var(--accent); margin-bottom: 4px; }
.inspector-head h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -.3px;
  color: var(--t-1);
  margin: 0 28px 4px 0;
  line-height: 1.2;
}
.inspector-head .sub {
  font-size: 10.5px;
  color: var(--t-3);
  letter-spacing: .3px;
}
.inspector-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}
.inspector-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 20px;
  margin-bottom: 16px;
}
.inspector-stat .k {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--t-3);
  margin-bottom: 3px;
}
.inspector-stat .v {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  color: var(--t-1);
  letter-spacing: -.2px;
  line-height: 1;
}
.inspector-stat .v.num { font-family: var(--font-mono); font-size: 14px; font-weight: 500; }
.inspector-actions {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  display: flex;
  gap: 6px;
}
.inspector-actions .btn { flex: 1; justify-content: center; }

/* ══════════════════════════════════════════════════════════════
   EMPTY STATES
   ══════════════════════════════════════════════════════════════ */
.empty {
  text-align: center;
  padding: 64px 32px;
  max-width: 440px;
  margin: 0 auto;
}
.empty-mark {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 72px;
  color: var(--border-2);
  line-height: 1;
  margin-bottom: 16px;
  letter-spacing: -2px;
}
.empty h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: -.3px;
  color: var(--t-1);
  margin: 0 0 8px;
}
.empty p {
  font-size: 12px;
  color: var(--t-3);
  line-height: 1.6;
  margin: 0 auto 20px;
  max-width: 340px;
}

/* ══════════════════════════════════════════════════════════════
   URGENCY — priority cards (actions page)
   ══════════════════════════════════════════════════════════════ */
.urgent-card {
  position: relative;
  padding-left: 28px;
}
.urgent-card::before {
  content: '';
  position: absolute;
  left: 0; top: 20px; bottom: 20px;
  width: 3px;
  border-radius: 0 2px 2px 0;
}
.urgent-card.overdue::before { background: var(--bad); }
.urgent-card.today::before   { background: var(--warn); }
.urgent-card.soon::before    { background: var(--accent); }
.urgent-card.later::before   { background: var(--border-2); }

.urgent-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.urgent-due {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}
.urgent-due.overdue { color: var(--bad); }
.urgent-due.today { color: var(--warn); }
.urgent-due.soon { color: var(--accent); }
.urgent-due.later { color: var(--t-3); }
.urgent-due::before {
  content: '';
  display: inline-block;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
  margin-right: 6px;
  vertical-align: middle;
}

/* ══════════════════════════════════════════════════════════════
   SECTION HEAD — inline label with count + actions
   ══════════════════════════════════════════════════════════════ */
.sect-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 0 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}
.sect-head .lead {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.sect-head h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 17px;
  letter-spacing: -.2px;
  color: var(--t-1);
  margin: 0;
}
.sect-head .count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--t-3);
  letter-spacing: .4px;
}
.sect-head .actions {
  display: flex;
  gap: 8px;
}

/* ══════════════════════════════════════════════════════════════
   CHIP (inline tag, smaller than pill)
   ══════════════════════════════════════════════════════════════ */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 18px;
  padding: 0 8px;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  background: var(--surface-2);
  color: var(--t-3);
  font-family: var(--font-mono);
}
.chip.ok   { background: rgba(31,107,58,.1);  color: var(--ok); }
.chip.warn { background: rgba(176,115,23,.1); color: var(--warn); }
.chip.bad  { background: rgba(155,56,56,.1);  color: var(--bad); }

/* ══════════════════════════════════════════════════════════════
   UTILITIES
   ══════════════════════════════════════════════════════════════ */
.row { display: flex; gap: 20px; }
.col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.grid-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }
.grid-2-1 { grid-template-columns: 2fr 1fr; }
.grid-13-1 { grid-template-columns: 1.3fr 1fr; }
.grid-14-1 { grid-template-columns: 1.4fr 1fr; }
.grid-1-34 { grid-template-columns: 1fr 340px; }
.flex-1 { flex: 1; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; } .mb-4 { margin-bottom: 32px; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.gap-sm { gap: 8px; } .gap { gap: 16px; } .gap-lg { gap: 24px; }

.ellip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Scrollbars — editorial thin */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--t-4); }

/* ══════════════════════════════════════════════════════════════
   OVERRIDES — content padding normalization
   ══════════════════════════════════════════════════════════════ */
.content.flush > * + * { margin-top: 0; }
.row { display: flex; gap: 20px; }
.col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.grid-2-1 { grid-template-columns: 2fr 1fr; }
.grid-13-1 { grid-template-columns: 1.3fr 1fr; }
.grid-14-1 { grid-template-columns: 1.4fr 1fr; }
.grid-1-34 { grid-template-columns: 1fr 340px; }
.flex-1 { flex: 1; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; } .mb-4 { margin-bottom: 32px; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.gap-sm { gap: 8px; } .gap { gap: 16px; } .gap-lg { gap: 24px; }

.page-pad { padding: 28px; }
.page-pad-lg { padding: 36px 40px; }

/* Content surface for long-scrolling pages */
.content {
  flex: 1;
  overflow-y: auto;
  padding: 28px;
  min-height: 0;
}
.content > * + * { margin-top: 24px; }

/* Ellipsis */
.ellip {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Scrollbars — editorial thin */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--t-4); }
