/* DealFlow – tokens and rules from docs/DESIGN_BRIEF.md (Schmitz Capital brand: navy, slate, mist, paper, ink, muted).
   Hairlines, not cards; navy is the one accent; tabular numbers. Fonts are self-hosted (static/fonts, SIL OFL). */
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url(/demo/fonts/ibm-plex-sans-latin-400-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-style: normal; font-display: swap; src: url(/demo/fonts/ibm-plex-sans-latin-500-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url(/demo/fonts/ibm-plex-sans-latin-600-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url(/demo/fonts/ibm-plex-sans-latin-ext-400-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-style: normal; font-display: swap; src: url(/demo/fonts/ibm-plex-sans-latin-ext-500-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url(/demo/fonts/ibm-plex-sans-latin-ext-600-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url(/demo/fonts/ibm-plex-mono-latin-400-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-style: normal; font-display: swap; src: url(/demo/fonts/ibm-plex-mono-latin-500-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url(/demo/fonts/ibm-plex-mono-latin-ext-400-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Spectral"; font-weight: 300; font-style: normal; font-display: swap; src: url(/demo/fonts/Spectral-Light.woff2) format("woff2"); }
@font-face { font-family: "Spectral"; font-weight: 400; font-style: normal; font-display: swap; src: url(/demo/fonts/Spectral-Regular.woff2) format("woff2"); }
@font-face { font-family: "Spectral"; font-weight: 500; font-style: normal; font-display: swap; src: url(/demo/fonts/Spectral-Medium.woff2) format("woff2"); }

:root {
  /* brand: navy #0F1B2D · slate #7D93AE · mist #D9DFE7 · paper #F5F6F7 · ink #1C2330 · muted #4F5E73 · white */
  --bg: #F5F6F7; --surface: #FFFFFF; --surface-subtle: #EEF1F5; --border: #D9DFE7; --border-strong: #C2CBD7;
  --text: #1C2330; --text-2: #4F5E73; --text-3: #6B7889;
  --accent: #0F1B2D; --link: #2A4468; --accent-subtle: #E7ECF2; --accent-ring: rgba(125, 147, 174, .55); --rule: #7D93AE;
  --primary: #0F1B2D; --primary-hover: #1D2D45; --on-primary: #FFFFFF;
  --positive: #1E6B43; --negative: #A8321F; --warning: #8F5F00;
  --positive-tint: rgba(30, 107, 67, .08); --negative-tint: rgba(168, 50, 31, .07); --warning-tint: rgba(143, 95, 0, .08);
  --float: 0 8px 24px rgba(15, 27, 45, .10); --scrim: rgba(15, 27, 45, .22);
  /* muted, fixed hue sequence for pipeline stages, drawn from slate and navy */
  --st-reviewing: #7D93AE; --st-interesting: #5A7394; --st-contacted: #3E5A7E; --st-nda: #5E6E4A;
  --st-im: #7E6C42; --st-loi: #8A5A3C; --st-dd: #6F4F64; --st-closed: var(--text-3); --st-new: var(--border-strong);

  --sans: "IBM Plex Sans", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --serif: "Spectral", Georgia, "Times New Roman", serif;
  --row: 28px; --pad: 12px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  /* derived from navy: deepest background, navy surfaces, mist text, slate as the tertiary tone */
  --bg: #0A1320; --surface: #0F1B2D; --surface-subtle: #16253B; --border: #22344D; --border-strong: #31476A;
  --text: #E8ECF1; --text-2: #AAB7C7; --text-3: #8296AF;
  --accent: #D9DFE7; --link: #B7C8DD; --accent-subtle: #1B2D47; --accent-ring: rgba(125, 147, 174, .55); --rule: #7D93AE;
  --primary: #D9DFE7; --primary-hover: #F5F6F7; --on-primary: #0F1B2D;
  --positive: #6FBF8E; --negative: #EE8A74; --warning: #D9AE5B;
  --positive-tint: rgba(111, 191, 142, .10); --negative-tint: rgba(238, 138, 116, .10); --warning-tint: rgba(217, 174, 91, .10);
  --float: 0 8px 24px rgba(0, 0, 0, .45); --scrim: rgba(0, 0, 0, .45);
  --st-reviewing: #8EA2BB; --st-interesting: #7F9AB8; --st-contacted: #9FB4CE; --st-nda: #98A877;
  --st-im: #B8A46E; --st-loi: #C49272; --st-dd: #B88A9A;
  color-scheme: dark;
}
:root[data-density="comfortable"] { --row: 36px; --pad: 16px; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 400 13px/18px var(--sans); background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums lining-nums; overflow-x: hidden; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 1px; }
.mono { font-family: var(--mono); font-size: 12px; }
.t2 { color: var(--text-2); } .t3 { color: var(--text-3); }
.num { text-align: right; font-variant-numeric: tabular-nums lining-nums; }
.na { color: var(--text-3); }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.spacer { flex: 1; }
svg.i { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
svg.i.sm { width: 14px; height: 14px; }
kbd { font: 400 11px/16px var(--mono); color: var(--text-3); border: 1px solid var(--border); border-radius: 4px; padding: 0 4px; background: var(--surface); }

/* ---- controls ---- */
.btn { height: 28px; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; border-radius: 4px; font-weight: 500;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); cursor: pointer; white-space: nowrap; text-decoration: none; }
.btn:hover { background: var(--surface-subtle); text-decoration: none; }
.btn.primary { background: var(--text); border-color: var(--text); color: var(--on-primary); }
.btn.primary:hover { background: var(--text); opacity: .88; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-subtle); color: var(--text); }
.btn.danger { color: var(--negative); }
.btn.danger.confirm { background: var(--negative); border-color: var(--negative); color: #fff; }
.btn.icon { width: 28px; padding: 0; justify-content: center; }
.btn:disabled { opacity: .5; cursor: default; }
.btn .i { color: inherit; }
input[type=text], input[type=search], input[type=number], input[type=date], input[type=password], input[type=email], select, textarea {
  height: 28px; border: 1px solid var(--border-strong); border-radius: 4px; background: var(--surface); padding: 0 8px; min-width: 0; }
textarea { height: auto; padding: 6px 8px; resize: vertical; line-height: 18px; }
select { padding-right: 4px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-ring); }
input::placeholder, textarea::placeholder { color: var(--text-3); }
input[type=checkbox] { accent-color: var(--accent); margin: 0; width: 14px; height: 14px; }
label.check { display: flex; align-items: center; gap: 8px; min-height: 24px; cursor: pointer; }
.switch { display: flex; align-items: center; gap: 8px; min-height: 24px; cursor: pointer; color: var(--text); }
.tabs { display: flex; gap: 16px; border-bottom: 1px solid var(--border); }
.tabs button { background: none; border: 0; padding: 8px 0 7px; color: var(--text-2); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 500; }
.tabs button.on { color: var(--text); border-bottom-color: var(--text); }
.tabs button .ct { color: var(--text-3); margin-left: 4px; font-weight: 400; }
.texttoggle { display: inline-flex; gap: 10px; }
.texttoggle button { background: none; border: 0; padding: 0; color: var(--text-3); cursor: pointer; border-bottom: 1px solid transparent; font-size: 12px; line-height: 18px; }
.texttoggle button.on { color: var(--text); border-bottom-color: var(--text); }

/* stage / status: 6px square dot + text */
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 1px; background: var(--st-new); flex: none; }
.stage { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.stage.s-New { color: var(--text-3); }
.stage.s-Closed, .stage.s-Rejected { color: var(--text-3); }
.s-Reviewing .dot { background: var(--st-reviewing); } .s-Interesting .dot { background: var(--st-interesting); }
.s-Contacted .dot { background: var(--st-contacted); } .s-NDA .dot { background: var(--st-nda); }
.s-Info .dot { background: var(--st-im); } .s-LOI .dot { background: var(--st-loi); } .s-Due .dot { background: var(--st-dd); }
.s-Closed .dot, .s-Rejected .dot { background: var(--st-closed); }
.health { display: inline-flex; align-items: center; gap: 6px; }
.health.ok .dot { background: var(--positive); } .health.deg .dot { background: var(--warning); }
.health.off .dot { background: var(--text-3); } .health.fail .dot { background: var(--negative); }
.health.off, .health.new { color: var(--text-3); }
.health.new .dot { background: transparent; box-shadow: inset 0 0 0 1px var(--text-3); }
.tag { display: inline-flex; align-items: center; height: 18px; padding: 0 5px; border-radius: 4px; font-size: 11.5px; color: var(--text-2); background: var(--surface-subtle); white-space: nowrap; }

/* ---- shell ---- */
.app { display: grid; grid-template-columns: 220px minmax(0, 1fr); height: 100vh; }
.side { background: var(--bg); border-right: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; overflow-y: auto; }
.nav { display: flex; flex-direction: column; padding: 0 8px; gap: 1px; }
.nav a { height: 28px; display: flex; align-items: center; gap: 10px; padding: 0 8px; border-radius: 4px; color: var(--text-2); text-decoration: none; }
.nav a:hover { background: var(--surface-subtle); color: var(--text); }
.nav a.on { background: var(--surface-subtle); color: var(--text); font-weight: 500; }
.nav a .ct { margin-left: auto; color: var(--text-3); font-size: 11.5px; font-weight: 400; }
.nav a .ct.alert { color: var(--negative); }
.side h2 { font-size: 11.5px; line-height: 16px; font-weight: 500; color: var(--text-3); margin: 20px 16px 4px; display: flex; align-items: center; }
.side h2 .btn { height: 20px; width: 20px; margin-left: auto; }
.views { padding: 0 8px; display: flex; flex-direction: column; gap: 1px; }
.views .v { height: 28px; display: flex; align-items: center; gap: 8px; padding: 0 4px 0 8px; border-radius: 4px; color: var(--text-2); cursor: pointer; }
.views .v:hover { background: var(--surface-subtle); color: var(--text); }
.views .v.on { background: var(--surface-subtle); color: var(--text); }
.views .v .n { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.views .v .new { color: var(--accent); font-size: 11.5px; white-space: nowrap; }
.views .v .bell { color: var(--text-3); display: flex; }
.views .v .more { opacity: 0; height: 22px; width: 22px; }
.views .v:hover .more, .views .v .more:focus-visible { opacity: 1; }
.views .empty { padding: 2px 8px; color: var(--text-3); font-size: 11.5px; line-height: 16px; }
.side-foot { margin-top: auto; padding: 12px 16px; border-top: 1px solid var(--border); font-size: 11.5px; line-height: 16px; color: var(--text-3); display: flex; gap: 8px; align-items: center; }
.side-foot button { background: none; border: 0; color: var(--text-3); cursor: pointer; padding: 0; font-size: 11.5px; }
.side-foot button:hover { color: var(--text); }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.top { height: 44px; flex: none; display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--border); position: relative; background: var(--bg); }
.top h1 { font: 600 22px/28px var(--serif); letter-spacing: -.01em; margin: 0; white-space: nowrap; }
.top .menu { display: none; }
.gsearch { position: relative; flex: 0 1 360px; margin-left: 12px; display: flex; align-items: center; }
.gsearch .i { position: absolute; left: 8px; color: var(--text-3); pointer-events: none; }
.gsearch input { width: 100%; padding-left: 30px; padding-right: 44px; background: var(--surface); }
.gsearch kbd { position: absolute; right: 6px; }
.sync { color: var(--text-2); white-space: nowrap; font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.sync.flash { color: var(--text); }
.sync.err { color: var(--negative); }
.progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: transparent; overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .4s; }
.content { flex: 1; min-height: 0; overflow: auto; }
.view { min-height: 100%; }
.page { padding: 16px 16px 48px; max-width: 1200px; }
h3.sec { font-size: 14px; line-height: 20px; font-weight: 600; margin: 0 0 8px; }
p.note, .note { color: var(--text-2); font-size: 11.5px; line-height: 16px; letter-spacing: .01em; }
.err { color: var(--negative); }
.errbox { padding: 12px 16px; color: var(--negative); background: var(--negative-tint); display: flex; gap: 12px; align-items: center; }
.empty-state { padding: 32px 16px; color: var(--text-2); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

/* ---- listings ---- */
#v-listings { display: flex; flex-direction: column; height: 100%; }
.strip { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; padding: 8px 16px; border-bottom: 1px solid var(--border); color: var(--text-2); }
.strip button { background: none; border: 0; padding: 0; color: var(--text); cursor: pointer; font-weight: 500; }
.strip button:hover { text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
.strip .sep { color: var(--text-3); }
.lst { flex: 1; min-height: 0; display: flex; }
.fpanel { width: 240px; flex: none; border-right: 1px solid var(--border); overflow-y: auto; padding: 4px 0 24px; background: var(--bg); }
.lst.nofilters .fpanel { display: none; }
.fpanel .fhead { display: none; }
.fg { padding: 10px 16px; border-bottom: 1px solid var(--border); }
.fg h4 { margin: 0 0 6px; font-size: 12.5px; line-height: 18px; font-weight: 600; display: flex; align-items: center; }
.fg h4 button { margin-left: auto; background: none; border: 0; color: var(--text-3); font-size: 11.5px; cursor: pointer; padding: 0; font-weight: 400; }
.fg h4 button:hover { color: var(--text); }
.fg .list label.check { min-height: 22px; font-size: 12.5px; }
.fg .list label .lb { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fg .list label .c { color: var(--text-3); font-size: 11.5px; }
.fg .list label .iso { font: 400 12px var(--mono); width: 22px; }
.fg .more { background: none; border: 0; padding: 2px 0 0; color: var(--accent); cursor: pointer; font-size: 12px; }
.rng { display: grid; grid-template-columns: 1fr auto 1fr; gap: 4px; align-items: center; }
.rng input { width: 100%; text-align: right; }
.rng span { color: var(--text-3); }
.fg .quick { display: flex; gap: 10px; margin-top: 6px; }
.fg .quick button { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font-size: 12px; }
.fg select, .fg input[type=date], .fg input[type=text] { width: 100%; }
.fg .sub { margin-top: 8px; }
.lmain { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.toolbar { flex: none; display: flex; align-items: center; gap: 8px; padding: 6px 16px; border-bottom: 1px solid var(--border); min-height: 41px; flex-wrap: wrap; }
.toolbar .count { color: var(--text-2); white-space: nowrap; }
.toolbar .count b { color: var(--text); font-weight: 500; }
.tokens { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.token { height: 22px; display: inline-flex; align-items: center; gap: 4px; padding: 0 2px 0 6px; border: 1px solid var(--border); border-radius: 4px; background: var(--surface); font-size: 12px; max-width: 280px; }
.token span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.token .k { color: var(--text-2); }
.token button { border: 0; background: none; width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; border-radius: 3px; color: var(--text-3); cursor: pointer; padding: 0; }
.token button:hover { background: var(--surface-subtle); color: var(--text); }
.toolbar .clearall { background: none; border: 0; color: var(--text-3); cursor: pointer; font-size: 12px; padding: 0 4px; }
.toolbar .clearall:hover { color: var(--text); }
.bulk { flex: none; display: flex; align-items: center; gap: 8px; padding: 6px 16px; border-bottom: 1px solid var(--border); background: var(--accent-subtle); }
.bulk .sel { font-weight: 500; }
.bulk .sep { color: var(--text-3); }
.tablewrap { flex: 1; min-height: 0; overflow: auto; position: relative; background: var(--surface); }
table.grid { border-collapse: separate; border-spacing: 0; width: 100%; }
table.grid th { position: sticky; top: 0; z-index: 2; height: 32px; padding: 0 10px; background: var(--surface-subtle); border-bottom: 1px solid var(--border-strong);
  font-size: 12px; line-height: 16px; font-weight: 500; color: var(--text-2); text-align: left; white-space: nowrap; user-select: none; }
table.grid th.num { text-align: right; }
table.grid th[data-sort] { cursor: pointer; }
table.grid th[data-sort]:hover { color: var(--text); }
table.grid th.sorted { color: var(--text); }
table.grid th .arr { display: inline-block; width: 10px; margin-left: 2px; }
table.grid td { height: var(--row); padding: 0 10px; border-bottom: 1px solid var(--border); white-space: nowrap; font-size: 13px; line-height: 16px; background: var(--surface); }
:root:not([data-density="comfortable"]) table.grid td { font-size: 12px; }
table.grid tbody tr { cursor: pointer; }
table.grid tbody tr:hover td { background: var(--surface-subtle); }
table.grid tbody tr.selected td { background: var(--accent-subtle); }
table.grid tbody tr.cursor td:first-child, table.grid tbody tr.open td:first-child { box-shadow: inset 2px 0 0 var(--accent); }
table.grid .c-chk { width: 32px; min-width: 32px; max-width: 32px; padding: 0 0 0 10px; position: sticky; left: 0; z-index: 1; }
table.grid th.c-chk { z-index: 3; }
table.grid .c-chk input { opacity: 0; }
table.grid tr:hover .c-chk input, table.grid tr.selected .c-chk input, table.grid .c-chk input:focus-visible, table.grid.anysel .c-chk input, table.grid th.c-chk input { opacity: 1; }
table.grid .c-co { position: sticky; left: 32px; z-index: 1; max-width: 420px; min-width: 260px; border-right: 1px solid var(--border); }
table.grid th.c-co { z-index: 3; }
.co-in { display: flex; align-items: center; gap: 6px; min-width: 0; }
.co-in .tt { overflow: hidden; text-overflow: ellipsis; min-width: 0; color: var(--text); }
.co-in .dup { color: var(--text-3); font-size: 11.5px; flex: none; }
.co-in .lang { font: 400 11px var(--mono); color: var(--text-3); flex: none; }
.starbtn { width: 18px; height: 18px; border: 0; background: none; padding: 0; display: flex; align-items: center; justify-content: center; color: var(--border-strong); cursor: pointer; flex: none; border-radius: 3px; }
.starbtn .i { width: 14px; height: 14px; }
.starbtn:hover { color: var(--text-2); }
.starbtn.on { color: var(--text); }
.starbtn.on .i { fill: currentColor; }
table.grid td.c-sector { max-width: 150px; overflow: hidden; text-overflow: ellipsis; color: var(--text-2); }
table.grid td.c-src, table.grid td.c-added { color: var(--text-2); }
table.grid tfoot td { position: sticky; bottom: 0; background: var(--surface-subtle); color: var(--text-2); border-top: 1px solid var(--border-strong); border-bottom: 0; height: 28px; font-size: 12px; z-index: 1; }
table.grid tfoot td.c-co { z-index: 2; }
tr.skel td div { height: 8px; border-radius: 2px; background: var(--surface-subtle); width: 60%; }
tr.skel td.num div { margin-left: auto; width: 40%; }
tr.skel td.c-co div { width: 80%; }
.pager { flex: none; display: flex; align-items: center; gap: 8px; padding: 6px 16px; border-top: 1px solid var(--border); color: var(--text-2); font-size: 12px; background: var(--bg); }
.dim { color: var(--text-3); }

/* ---- detail slide-over ---- */
.scrim { position: fixed; inset: 0; background: var(--scrim); opacity: 0; pointer-events: none; transition: opacity .15s; z-index: 30; }
.scrim.on { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 560px; max-width: 100vw; background: var(--surface); border-left: 1px solid var(--border-strong);
  box-shadow: var(--float); transform: translateX(100%); transition: transform .18s ease-out; z-index: 31; display: flex; flex-direction: column; visibility: hidden; }
.drawer.on { transform: none; visibility: visible; }
.dhead { padding: 12px 20px 0; flex: none; }
.dhead .bar { display: flex; align-items: center; gap: 8px; min-height: 28px; }
.dhead .meta { font: 400 12px/16px var(--mono); color: var(--text-2); white-space: pre-line; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.dhead .bar { align-items: flex-start; }
.dhead h2 { font: 600 22px/28px var(--serif); letter-spacing: -.01em; margin: 8px 0 0; }
.dhead .orig { color: var(--text-2); margin-top: 2px; }
.dhead .acts { display: flex; gap: 8px; align-items: center; margin: 12px 0 12px; flex-wrap: wrap; }
.dhead .tabs { margin: 0 -20px; padding: 0 20px; }
.dbody:focus { outline: none; }
.dbody { flex: 1; overflow-y: auto; padding: 16px 20px 32px; }
.dbody section + section { margin-top: 24px; }
dl.kv { display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; margin: 0; }
dl.kv > div { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px solid var(--border); align-items: baseline; }
dl.kv dt { color: var(--text-2); }
dl.kv dd { margin: 0; text-align: right; }
dl.kv dd .raw { display: block; color: var(--text-3); font-size: 11.5px; line-height: 16px; }
dl.kv.one { grid-template-columns: 1fr; }
dl.kv.one dd { overflow-wrap: anywhere; }
.summary { font: 400 15px/22px var(--serif); color: var(--text); margin: 0; }
.desc { white-space: pre-wrap; color: var(--text); line-height: 20px; overflow-wrap: anywhere; }
.sechead { display: flex; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.sechead h3 { margin: 0; font-size: 14px; line-height: 20px; font-weight: 600; }
.sechead .note { margin-left: auto; }
.notes textarea { width: 100%; min-height: 88px; }
.acts-form { display: grid; grid-template-columns: 110px 150px 1fr; gap: 8px; }
.acts-form textarea { grid-column: 1 / -1; min-height: 56px; }
.acts-form .row { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; align-items: center; }
.next-form { display: grid; grid-template-columns: 1fr 150px; gap: 8px; }
.log { list-style: none; margin: 0; padding: 0; font: 400 12px/18px var(--mono); }
.log li { display: grid; grid-template-columns: 104px 56px 1fr 24px; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--border); align-items: start; }
.log li .w { color: var(--text-3); }
.log li .k { color: var(--text-2); }
.log li .b { font-family: var(--sans); font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.log li .x { opacity: 0; width: 22px; height: 18px; }
.log li:hover .x, .log li .x:focus-visible { opacity: 1; }
table.plain { border-collapse: collapse; width: 100%; }
table.plain th { text-align: left; font-size: 12px; font-weight: 500; color: var(--text-2); padding: 6px 10px; border-bottom: 1px solid var(--border-strong); white-space: nowrap; background: var(--surface-subtle); }
table.plain td { padding: 6px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.plain th.num, table.plain td.num { text-align: right; }
table.plain tr.link { cursor: pointer; }
table.plain tr.link:hover td { background: var(--surface-subtle); }
table.plain.flush th:first-child, table.plain.flush td:first-child { padding-left: 0; }
table.plain.flush th, table.plain.flush { background: transparent; }
.saved-ind { color: var(--text-3); font-size: 11.5px; }

/* ---- pipeline ---- */
.board { display: flex; gap: 12px; padding: 12px 16px 24px; overflow-x: auto; min-height: 100%; align-items: stretch; }
.col { width: 248px; flex: none; display: flex; flex-direction: column; border-radius: 6px; }
.col.over { background: var(--surface-subtle); outline: 1px dashed var(--border-strong); }
.col .ch { position: sticky; top: 0; padding: 4px 4px 8px; background: var(--bg); z-index: 1; }
.col .ch .nm { font-weight: 600; display: flex; align-items: center; gap: 6px; }
.col .ch .nm .n { color: var(--text-3); font-weight: 400; }
.col .ch .sum { color: var(--text-2); font-size: 11.5px; line-height: 16px; }
.col .cards { display: flex; flex-direction: column; gap: 6px; padding: 0 0 8px; min-height: 60px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 8px; cursor: grab; }
.card:hover { border-color: var(--border-strong); }
.card.dragging { opacity: .5; }
.card .nm { font-weight: 500; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.card .ln { color: var(--text-2); font-size: 12px; line-height: 16px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .ln .mono { font-size: 11.5px; }
.card .due.over { color: var(--negative); }
.col .drop { color: var(--text-3); font-size: 12px; padding: 8px 4px; }

/* ---- tables on pages ---- */
.tsec { margin-bottom: 28px; }
.tsec h3 { display: flex; align-items: baseline; gap: 8px; }
.tsec h3 .ct { color: var(--text-3); font-weight: 400; }
.tsec h3 .ct.alert { color: var(--negative); }
.scrollx { overflow-x: auto; }
.nw { white-space: nowrap; }
#valPage table.plain { width: auto; min-width: min(100%, 880px); }
.range-bar { display: block; }
.range-bar .track { stroke: var(--border); }
.range-bar .iqr { fill: var(--text-3); opacity: .45; }
.range-bar .med { stroke: var(--text); stroke-width: 2; }
.range-bar .axis { fill: var(--text-3); font-size: 10px; font-family: var(--sans); }
.overall td { font-weight: 500; border-bottom-color: var(--border-strong) !important; }
.vfilters { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.charts { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.hbar text { font-size: 12px; fill: var(--text-2); font-family: var(--sans); font-variant-numeric: tabular-nums; }
.hbar text.v { fill: var(--text); }
.hbar text.iso { font-family: var(--mono); fill: var(--text); }
.hbar rect { fill: var(--text-3); opacity: .55; }
.hbar rect.unk { opacity: .25; }
.foot { margin-top: 8px; }
.foot p { margin: 2px 0; }

/* ---- settings ---- */
.settings { max-width: 720px; }
.settings section { padding: 20px 0; border-bottom: 1px solid var(--border); }
.settings section:first-child { padding-top: 4px; }
.settings p { margin: 0 0 12px; color: var(--text-2); }
.form { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 8px 16px; align-items: center; max-width: 560px; }
.form label { color: var(--text-2); }
.form input, .form select { width: 100%; }
.form .full { grid-column: 2; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.result { font-size: 12px; }
.result.ok { color: var(--positive); }
.result.bad { color: var(--negative); }
code { font: 400 12px var(--mono); background: var(--surface-subtle); padding: 1px 4px; border-radius: 3px; overflow-wrap: anywhere; }

/* ---- floating layers ---- */
.toast { position: fixed; left: 16px; bottom: 16px; z-index: 60; background: var(--text); color: var(--on-primary); border-radius: 6px; padding: 0 4px 0 12px; height: 36px;
  display: flex; align-items: center; gap: 12px; box-shadow: var(--float); max-width: calc(100vw - 32px); }
.toast button { background: none; border: 0; color: inherit; font-weight: 600; cursor: pointer; height: 28px; padding: 0 8px; border-radius: 4px; text-decoration: underline; text-underline-offset: 3px; }
.pop { position: fixed; z-index: 50; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 6px; box-shadow: var(--float); padding: 4px; min-width: 180px; }
.pop .mi { display: flex; align-items: center; gap: 8px; width: 100%; height: 28px; padding: 0 8px; border: 0; background: none; border-radius: 4px; cursor: pointer; text-align: left; color: var(--text); }
.pop .mi:hover, .pop .mi:focus-visible { background: var(--surface-subtle); }
.pop .mi.danger { color: var(--negative); }
.pop .mi.danger.confirm { background: var(--negative); color: #fff; }
.pop form { padding: 8px; display: flex; flex-direction: column; gap: 8px; width: 280px; }
.pop form label { font-size: 12px; color: var(--text-2); }
.pop form .row { display: flex; gap: 8px; justify-content: flex-end; align-items: center; }
.modal-scrim { position: fixed; inset: 0; z-index: 70; background: var(--scrim); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; }
.palette { width: 560px; max-width: 100%; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 6px; box-shadow: var(--float); overflow: hidden; }
.palette input { width: 100%; height: 44px; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; padding: 0 16px; font-size: 14px; background: var(--surface); }
.palette input:focus { box-shadow: none; }
.palette .res { max-height: 50vh; overflow-y: auto; padding: 4px; }
.palette .grp { font-size: 11.5px; color: var(--text-3); padding: 8px 10px 2px; }
.palette .it { display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 10px; border-radius: 4px; cursor: pointer; }
.palette .it .l { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette .it .h { color: var(--text-3); font-size: 12px; white-space: nowrap; }
.palette .it .i { color: var(--text-2); }
.palette .it.on { background: var(--accent-subtle); }
.palette .none { padding: 12px 10px; color: var(--text-3); }
.sheet { width: 480px; max-width: 100%; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 6px; box-shadow: var(--float); padding: 16px 20px; }
.sheet h3 { margin: 0 0 8px; font-size: 14px; }
.sheet dl { display: grid; grid-template-columns: 1fr auto; margin: 0; }
.sheet dt, .sheet dd { padding: 5px 0; border-bottom: 1px solid var(--border); margin: 0; }
.sheet dd { text-align: right; }

/* ---- responsive ---- */
/* columns give way in this order when space runs out: profit, staff, added */
@media (max-width: 1640px) {
  table.grid .c-co { min-width: 200px; max-width: 224px; }
  table.grid th, table.grid td { padding-left: 8px; padding-right: 8px; }
  table.grid td.c-sector { max-width: 120px; }
  .lst:not(.nofilters) table.grid .c-profit, .lst:not(.nofilters) table.grid .c-staff { display: none; }
}
@media (max-width: 1360px) {
  table.grid .c-profit, table.grid .c-staff { display: none; }
  .lst:not(.nofilters) table.grid .c-added { display: none; }
  table.grid td.c-sector { max-width: 130px; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; top: 0; bottom: 0; left: 0; width: 260px; z-index: 40; transform: translateX(-100%); transition: transform .18s; box-shadow: none; }
  .side.on { transform: none; box-shadow: var(--float); }
  .top { gap: 8px; padding: 0 12px 0 8px; }
  .top .menu { display: inline-flex; }
  .top h1 { font-size: 18px; }
  .gsearch { margin-left: 0; flex: 1 1 auto; }
  .gsearch kbd { display: none; }
  .gsearch input { padding-right: 8px; }
  .top .sync { display: none; }
  .top .sync.flash { display: block; position: fixed; left: 16px; right: 16px; bottom: 16px; background: var(--text); color: var(--on-primary); padding: 8px 12px; border-radius: 6px; z-index: 60; white-space: normal; }
  #refreshBtn span, #saveViewBtn span, #exportBtn span { display: none; }
  #refreshBtn, #saveViewBtn, #exportBtn { width: 28px; padding: 0; justify-content: center; }
  .strip { font-size: 12px; }
  .fpanel { position: fixed; inset: 0; width: auto; z-index: 45; padding-bottom: 72px; }
  .lst.nofilters .fpanel { display: none; }
  .lst:not(.mobile-filters) .fpanel { display: none; }
  .fpanel .fhead { display: flex; align-items: center; gap: 8px; padding: 8px 16px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--bg); z-index: 1; }
  .fpanel .fhead b { flex: 1; font: 600 18px/28px var(--serif); }
  .toolbar { padding: 6px 12px; }
  .strip { padding: 8px 12px; }
  .toolbar .opt { display: none; }
  .drawer { width: 100vw; border-left: 0; }
  .dhead, .dbody { padding-left: 16px; padding-right: 16px; }
  .dhead .tabs { margin: 0 -16px; padding: 0 16px; overflow-x: auto; }
  dl.kv { grid-template-columns: 1fr; }
  .acts-form { grid-template-columns: 1fr 1fr; }
  .acts-form input[type=text] { grid-column: 1 / -1; }
  .charts { grid-template-columns: 1fr; }
  .form { grid-template-columns: 1fr; }
  .form .full { grid-column: 1; }
  .page { padding: 12px 16px 48px; }
  .log li { grid-template-columns: 92px 1fr 24px; }
  .log li .k { display: none; }
  .board { padding: 12px; scroll-snap-type: x mandatory; }
  .col { scroll-snap-align: start; width: calc(100vw - 48px); max-width: 300px; }
  table.grid .c-co { min-width: 180px; max-width: 200px; }
  .pager { padding: 6px 12px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* change markers and history (price cuts etc.) */
.chg-down { color: var(--negative); font-size: 10px; }
.chg-up { color: var(--positive); font-size: 10px; }
table.hist { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.hist td { padding: 5px 6px; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.hist td:nth-child(2) { white-space: normal; }

/* sector benchmark row spans both columns of the key-value grid */
.kv .bench { grid-column: 1 / -1; }

/* ---- targets (off-market finder) ---- */
#v-targets { display: flex; flex-direction: column; height: 100%; }
.lnk { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font: inherit; }
.lnk:hover { text-decoration: underline; }
table.tgrid .c-co { left: 0; min-width: 240px; max-width: 360px; }
.tco { display: flex; flex-direction: column; min-width: 0; line-height: 15px; padding: 3px 0; }
.tco .tt { overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.tco .sub { color: var(--text-2); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; }
.tco .sub .mono { font-size: 11px; }
table.tgrid td.c-co { height: auto; min-height: var(--row); }
.sc { display: inline-flex; align-items: center; gap: 6px; justify-content: flex-end; }
.sc .n { min-width: 20px; text-align: right; }
.sbar { display: inline-block; width: 40px; height: 4px; background: var(--border); border-radius: 1px; overflow: hidden; }
.sbar i { display: block; height: 100%; background: var(--text-2); }
.tscore .sc .n { font-size: 20px; line-height: 24px; font-weight: 500; }
.tscore .sbar { width: 120px; }
ul.reasons { list-style: none; margin: 8px 0 0; padding: 0; }
ul.reasons li { padding: 4px 0; border-bottom: 1px solid var(--border); }
.tst-new { color: var(--text-3); }
.tst-shortlisted .dot { background: var(--st-interesting); } .tst-contacted .dot { background: var(--st-contacted); }
.tst-not_interested, .tst-excluded { color: var(--text-3); }
.tst-not_interested .dot, .tst-excluded .dot { background: var(--st-closed); }
.sc .pm { font-size: 11px; color: var(--text-3); }
table.tgrid .c-ctry { width: 64px; }
@media (max-width: 1360px) { table.tgrid .c-ni { display: none; } }
@media (max-width: 900px) {
  #v-targets { display: block; height: auto; }
  #v-targets .tablewrap { overflow-x: auto; }
  #tBar select { flex: 1 1 40%; min-width: 0; }
  table.tgrid .c-co { min-width: 160px; max-width: 180px; }
  table.tgrid .c-ni, table.tgrid .c-staff { display: none; }
}

/* ---- owner letters (Targets → Write letter) and digests: drafts only, nothing is sent ---- */
.drawer.wide { width: 760px; }
p.never { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 12px; padding: 8px 10px; background: var(--surface-subtle); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); color: var(--text); }
p.never .i { margin-top: 2px; color: var(--text-2); }
.lctl { display: flex; gap: 12px; flex-wrap: wrap; margin: 12px 0; }
.lctl label { display: flex; flex-direction: column; gap: 2px; font-size: 11.5px; line-height: 16px; color: var(--text-2); }
.lctl select { min-width: 150px; }
ul.lnotes { list-style: none; margin: 0 0 12px; padding: 0; }
ul.lnotes:empty { display: none; }
ul.lnotes li { padding: 4px 0; color: var(--warning); border-bottom: 1px solid var(--border); font-size: 12px; line-height: 16px; }
ul.lnotes li.err { color: var(--negative); }
.lfield { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 8px; align-items: center; margin-bottom: 8px; }
.lfield label { color: var(--text-2); }
#ltText { width: 100%; min-height: 420px; font: 400 13px/20px var(--sans); padding: 10px 12px; }
.lstate { display: flex; align-items: center; gap: 8px; min-height: 28px; margin: 4px 0 8px; }
.lacts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 12px 0 4px; border-top: 1px solid var(--border); }
.btn.primary.confirm { background: var(--accent); border-color: var(--accent); }
ul.alog { list-style: none; margin: 0; padding: 0; }
ul.alog li { padding: 4px 0; border-bottom: 1px solid var(--border); font-size: 12px; overflow-wrap: anywhere; }
ul.alog li.sent .mono:last-child { color: var(--text); font-weight: 500; }
.dg-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.dg-head h3 { margin: 0; }
.dg-form { margin: 4px 0 20px; padding: 12px 0 16px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); max-width: 640px; }
.dg-form .full0 { grid-column: 1 / -1; margin: 0; }
.dg-searches { flex-direction: column; align-items: flex-start !important; gap: 2px !important; }
.form .full select { width: auto; }
table.plain tr.sel td { background: var(--accent-subtle); }
table.plain tr.sel td:first-child { box-shadow: inset 2px 0 0 var(--accent); }
table.plain td .btn + .btn { margin-left: 4px; }
.dg-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 24px; align-items: start; }
.dg-prevhead { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 8px; }
.dg-subj { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.dg-frame { width: 100%; height: 70vh; min-height: 420px; border: 1px solid var(--border); background: #F5F6F7; display: block; }
#digPage { max-width: 1400px; }
@media (max-width: 1200px) { .dg-split { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) {
  .drawer.wide { width: 100vw; }
  .lctl label { flex: 1 1 40%; }
  .lctl select { min-width: 0; width: 100%; }
  #ltText { min-height: 360px; }
  .dg-head .btn span, .dg-head .btn { white-space: nowrap; }
  .dg-prevhead { flex-wrap: wrap; }
  .dg-subj { flex-basis: 100%; }
  #digPage .c-inc, #digPage .c-items { display: none; }
}

/* ---- send by post (Pingen): draft → review → typed confirmation ---- */
.envtag { font-weight: 500; }
.envtag.env-sim { color: var(--text-2); }
.envtag.env-test { color: var(--accent); background: var(--accent-subtle); }
.envtag.env-prod { color: var(--warning); background: var(--warning-tint); }
h2 .envtag { vertical-align: middle; margin-left: 6px; font-family: var(--sans); }
.pstat { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.pstat .dot { background: var(--text-3); }
.pstat.ok .dot { background: var(--positive); }
.pstat.bad { color: var(--negative); } .pstat.bad .dot { background: var(--negative); }
.pstat.warn { color: var(--warning); } .pstat.warn .dot { background: var(--warning); }
.pstat.mute { color: var(--text-3); }
p.never.real { background: var(--warning-tint); border-color: transparent; }
p.never.real .i { color: var(--warning); }
.posum { font-size: 13px; line-height: 20px; margin: 0 0 12px; font-variant-numeric: tabular-nums lining-nums; color: var(--text); }
.postep { display: flex; flex-direction: column; gap: 8px; color: var(--text-2); }
.skel-line { display: block; position: relative; height: 2px; width: 100%; background: var(--border); overflow: hidden; }
.skel-line::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 30%; background: var(--text-3); animation: poBar 1.2s linear infinite; }
@keyframes poBar { from { transform: translateX(-100%); } to { transform: translateX(340%); } }
@media (prefers-reduced-motion: reduce) { .skel-line::after { animation: none; } }
.posplit { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.poprev { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.poprev a { display: inline-flex; align-items: center; gap: 4px; }
.poside { min-width: 0; }
.poside section { padding: 0 0 10px; margin: 0 0 10px; border-bottom: 1px solid var(--border); }
.poside h3 { margin: 0 0 4px; font-size: 13px; line-height: 18px; font-weight: 600; color: var(--text-2); }
.poside .addr { line-height: 18px; overflow-wrap: anywhere; }
.poside .lnotes { margin: 6px 0 0; }
.poconfirm { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); }
.poconfirm label { display: block; margin-bottom: 6px; color: var(--text-2); }
.porow { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.porow input { width: 220px; max-width: 100%; font-family: var(--mono); font-size: 12px; }
.okbox, .unkbox { display: flex; flex-direction: column; gap: 4px; padding: 12px 16px; margin-top: 16px; }
.okbox { background: var(--positive-tint); } .okbox b { color: var(--positive); }
.unkbox { background: var(--warning-tint); } .unkbox b { color: var(--warning); font-size: 14px; }
ul.alog li.unk .mono:last-child { color: var(--warning); }
table.ptable tr.unk td { background: var(--warning-tint); }
table.ptable .envtag { font-size: 11.5px; }
.form .full.stack { flex-direction: column; align-items: flex-start; gap: 4px; }
dd.neg { color: var(--negative); }
.poreal { max-width: 560px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); }
.poreal .porow { margin: 8px 0 4px; }
@media (max-width: 900px) {
  .posplit { grid-template-columns: minmax(0, 1fr); }
  .porow input { flex: 1 1 100%; width: 100%; }
}
.form .switch input { width: auto; flex: none; }
.ptable .pstat { white-space: nowrap; }

/* ==== clarity & brand (Nov 2026): sidebar, page header, MultiSelect, Next step, review queue, off-market, outreach ==== */
a { color: var(--link); }
.wordmark { display: flex; flex-direction: column; gap: 6px; padding: 20px 16px 18px; text-decoration: none; }
.wordmark:hover { text-decoration: none; }
.wordmark .logo { display: block; width: 168px; height: auto; }
.wordmark .logo-dark { display: none; }
:root[data-theme="dark"] .wordmark:not(.nodark) .logo-light { display: none; }
:root[data-theme="dark"] .wordmark .logo-dark { display: block; }
.wordmark .pr { font-size: 11.5px; line-height: 16px; color: var(--text-3); letter-spacing: .02em; }
/* product mark (no firm branding set) and firm name set as text (name but no logo) */
.wordmark .prodmark { display: flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 600; letter-spacing: -.005em; color: var(--text); }
.wordmark .prodmark img { display: block; width: 22px; height: 22px; border-radius: 5px; }
.wordmark .firmname { font-family: var(--serif); font-weight: 300; font-size: 13px; letter-spacing: .3em; text-transform: uppercase; color: var(--text); line-height: 1.2; overflow-wrap: anywhere; }
.wordmark .logo { max-height: 40px; object-fit: contain; object-position: left center; }
/* Settings → Branding */
.brandprev { display: flex; gap: 12px; flex-wrap: wrap; }
.brandprev .tile { width: 220px; min-height: 64px; border: 1px solid var(--border); border-radius: 6px; padding: 12px; display: flex; align-items: center; }
.brandprev .tile.dark { background: #0F1B2D; border-color: #0F1B2D; }
.brandprev .tile img { max-width: 100%; max-height: 40px; }
.brandprev .tile .none { font-size: 12px; color: var(--text-3); }
.brandprev .tile.dark .none { color: #9AA8BA; }
.ngrp { font-size: 11px; line-height: 16px; font-weight: 500; color: var(--text-3); padding: 12px 8px 4px; letter-spacing: .02em; }
.ngrp:first-child { padding-top: 0; }
.nav a.on { background: var(--accent-subtle); color: var(--text); box-shadow: inset 2px 0 0 var(--accent); border-radius: 0 4px 4px 0; }
.nav-foot { margin-top: auto; padding-top: 8px; padding-bottom: 4px; border-top: 1px solid var(--border); }
.side-foot { margin-top: 0; }
.side h2 { margin-top: 16px; }
.top { height: 56px; gap: 16px; }
.top .ttl { min-width: 0; display: flex; flex-direction: column; flex: 0 1 auto; max-width: 52%; }
.top h1 { font: 400 22px/26px var(--serif); letter-spacing: 0; color: var(--accent); }
.top .desc { margin: 0; font-size: 12px; line-height: 16px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gsearch { flex: 0 1 300px; margin-left: auto; }
.top .spacer { display: none; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); opacity: 1; }
.btn.primary.confirm { background: var(--primary); border-color: var(--primary); box-shadow: 0 0 0 2px var(--accent-ring); }
.tabs button.on { color: var(--text); border-bottom-color: var(--accent); }
.dhead h2 { font: 400 24px/30px var(--serif); color: var(--accent); }
.dhead .bar .kind { font-size: 11px; line-height: 20px; font-weight: 500; color: var(--text-2); background: var(--surface-subtle); border-radius: 4px; padding: 0 6px; flex: none; }
.dhead .bar { gap: 8px; }
.stagepick { display: inline-flex; align-items: center; gap: 6px; }
.drawer.busy .dhead, .drawer.busy .dbody { opacity: .55; pointer-events: none; transition: opacity .1s .15s; }
.fg h4 { font-weight: 500; color: var(--text-2); font-size: 12px; }
.fg { padding: 10px 16px; border-bottom: 0; }
.fg + .fg { border-top: 1px solid var(--border); }
.fpanel { background: var(--surface); }

/* MultiSelect */
.ms { height: 28px; min-width: 150px; max-width: 260px; display: inline-flex; align-items: center; gap: 8px; padding: 0 8px; border: 1px solid var(--border-strong); border-radius: 4px; background: var(--surface); color: var(--text); cursor: pointer; text-align: left; }
.ms:hover { border-color: var(--text-3); }
.ms .msv { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.ms.on .msv { color: var(--text); font-weight: 500; }
.ms .i { color: var(--text-3); }
.ms[aria-expanded="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-ring); }
.fg .ms { width: 100%; max-width: none; }
.pop.mspop { padding: 0; max-width: calc(100vw - 16px); }
.msp { display: flex; flex-direction: column; max-height: min(420px, 70vh); }
.mss { position: relative; display: flex; align-items: center; padding: 8px; border-bottom: 1px solid var(--border); }
.mss .i { position: absolute; left: 16px; color: var(--text-3); pointer-events: none; }
.mss input { width: 100%; padding-left: 28px; }
.msh { display: flex; align-items: center; justify-content: space-between; padding: 6px 12px; font-size: 11.5px; color: var(--text-3); border-bottom: 1px solid var(--border); }
.msh .lnk:disabled { color: var(--text-3); cursor: default; text-decoration: none; }
.msl { overflow-y: auto; padding: 4px; }
.msi { display: flex; align-items: center; gap: 8px; min-height: 28px; padding: 0 8px; border-radius: 4px; cursor: pointer; }
.msi:hover, .msi:focus-within { background: var(--surface-subtle); }
.msi .lb { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msi .c { color: var(--text-3); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.msi .code { min-width: 26px; font-size: 11.5px; }
.msi.add .lb { color: var(--link); }
.msnone { padding: 8px; }

/* Next step box (listings and off-market companies) */
.nextstep { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; align-items: center; margin: 0 0 12px; padding: 10px 12px;
  background: var(--surface-subtle); border-top: 1px solid var(--rule); }
.nextstep:empty { display: none; }
.nextstep .ns-l { display: flex; flex-direction: column; min-width: 0; }
.nextstep .ns-k { font-size: 11px; line-height: 16px; font-weight: 500; color: var(--text-2); }
.nextstep b { font-weight: 600; font-size: 14px; line-height: 20px; }
.nextstep b.err { color: var(--negative); }
.nextstep .ns-t { color: var(--text-2); font-size: 12px; line-height: 17px; }
.nextstep .ns-a { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.nextstep .ns-form { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.nextstep .ns-form input[type=text], .nextstep .ns-form textarea { flex: 1 1 220px; min-width: 0; }
.nextstep .ns-form textarea { width: 100%; flex-basis: 100%; }
.nextstep .ns-msg { grid-column: 1 / -1; font-size: 12px; color: var(--positive); }
.nextstep .ns-msg:empty { display: none; }
.nextstep .ns-msg.err { color: var(--negative); }
.nextstep.ns-done { background: transparent; border-top-color: var(--border); }
.nextstep.ns-overdue { border-top-color: var(--negative); }

/* Review queue bar */
.qbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: -12px -20px 12px; padding: 6px 12px 6px 20px; background: var(--accent); color: var(--on-primary); font-size: 12px; }
.qbar .t2 { color: inherit; opacity: .8; }
.qbar .keys { display: inline-flex; gap: 4px; align-items: center; opacity: .85; }
.qbar kbd { background: transparent; color: inherit; border-color: currentColor; opacity: .9; }
.qbar .btn.ghost { color: inherit; height: 24px; }
.qbar .btn.ghost:hover { background: rgba(255, 255, 255, .12); color: inherit; }
:root[data-theme="dark"] .qbar .btn.ghost:hover { background: rgba(15, 27, 45, .12); }

/* Off-market */
#v-targets .toolbar { gap: 8px; }
.ctrysel { min-width: 170px; font-weight: 500; }
.fsearch { position: relative; display: flex; align-items: center; }
.fsearch .i { position: absolute; left: 8px; color: var(--text-3); pointer-events: none; }
.fsearch input { width: 220px; padding-left: 28px; }
.srcline { flex: none; display: flex; align-items: center; gap: 12px; padding: 6px 16px; border-bottom: 1px solid var(--border); color: var(--text-2); font-size: 12px; line-height: 16px; background: var(--bg); }
.srcline .src { display: inline-flex; gap: 6px; align-items: flex-start; min-width: 0; }
.srcline .src .i { margin-top: 1px; color: var(--text-3); }
.srcline b { font-weight: 500; color: var(--text); }
.srcline .tprog { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 50%; }
details.tfoot { padding: 8px 16px 12px; }
details.tfoot summary { cursor: pointer; color: var(--text-2); font-size: 12px; }
details.tfoot p { margin: 8px 0 0; max-width: 1100px; }
.fform { display: flex; flex-direction: column; gap: 4px; }
.frow { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--border); align-items: start; }
.frow > label, .frow > span:first-child { color: var(--text-2); line-height: 28px; }
.frow .fc { min-width: 0; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.frow .fc .ms { min-width: 280px; }
.frow .note { margin: 0; }
.frow .inline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.frow .inline input[type=text] { width: 260px; max-width: 100%; }
.frow .checks { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.frow.factions { border-bottom: 0; }
.fsaved { margin-top: 20px; }
ul.tsaved { list-style: none; margin: 0; padding: 0; }
ul.tsaved li { display: flex; align-items: center; gap: 8px; min-height: 32px; border-bottom: 1px solid var(--border); }
.tprog { color: var(--text-2); font-size: 12px; margin: 0; min-height: 16px; }

/* Outreach */
#v-outreach .subtabs { padding: 0 16px; background: var(--bg); position: sticky; top: 0; z-index: 3; }

/* Send by post: steps, inline setup, page images */
ol.steps { list-style: none; display: flex; gap: 20px; margin: 12px 0 12px; padding: 0; counter-reset: st; font-size: 12px; color: var(--text-3); flex-wrap: wrap; }
ol.steps li { counter-increment: st; display: flex; align-items: center; gap: 6px; }
ol.steps li::before { content: counter(st); width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--border-strong); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; }
ol.steps li.on { color: var(--text); font-weight: 500; }
ol.steps li.on::before { background: var(--accent); border-color: var(--accent); color: var(--on-primary); }
ol.steps li.done { color: var(--text-2); }
ol.steps li.done::before { content: "✓"; border-color: var(--rule); color: var(--text-2); }
.setup h3 { margin: 0 0 4px; font-size: 14px; }
.setup p { margin: 0 0 12px; }
.optcards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.optcard { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--surface); color: var(--text); cursor: pointer; }
.optcard:hover { border-color: var(--accent); }
.optcard.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.optcard b { font-size: 14px; }
.optcard span { color: var(--text-2); font-size: 12px; line-height: 17px; }
.optcard:disabled { opacity: .6; cursor: default; }
.pomsg { min-height: 18px; color: var(--positive); }
.pomsg.err { color: var(--negative); }
#poCreds { margin: 4px 0 12px; }
.poprev .pages { display: flex; flex-direction: column; gap: 12px; }
.poprev .pg { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.poprev .pg img { width: 100%; height: auto; display: block; border: 1px solid var(--border); background: var(--surface-subtle); box-shadow: var(--float); aspect-ratio: 210 / 297; }
.poprev .pg.ok img { background: #fff; }
.poprev .pg figcaption { font-size: 11.5px; color: var(--text-3); }
.pgerr { padding: 16px; border: 1px dashed var(--border-strong); color: var(--text-2); }
.poprev > .btn { align-self: flex-start; }

@media (max-width: 900px) {
  .top { height: 52px; }
  .top .ttl { max-width: none; flex: 1 1 auto; }
  .top .desc { display: none; }
  .gsearch { flex: 0 1 140px; }
  .top h1 { font-size: 19px; }
  #queueBtn span, #tQueue span, #tFind span, #tExport span { display: none; }
  #queueBtn, #tQueue, #tExport { width: 28px; padding: 0; justify-content: center; }
  .fsearch { flex: 1 1 100%; } .fsearch input { width: 100%; }
  .ctrysel { flex: 1 1 100%; }
  #v-targets .ms { flex: 1 1 40%; max-width: none; min-width: 0; }
  .srcline { padding: 6px 12px; flex-wrap: wrap; }
  .srcline .tprog { max-width: 100%; }
  .nextstep { grid-template-columns: minmax(0, 1fr); }
  .nextstep .ns-a { justify-content: flex-start; }
  .qbar { margin: -12px -16px 12px; padding-left: 16px; }
  .qbar .keys { display: none; }
  .frow { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .frow .fc .ms { min-width: 0; width: 100%; }
  .optcards { grid-template-columns: 1fr; }
  #v-outreach .subtabs { overflow-x: auto; }
}

/* native selects match the MultiSelect buttons: one chevron, same height and border */
select { -webkit-appearance: none; appearance: none; padding: 0 26px 0 8px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%237D93AE' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 7px center; }
select:disabled { opacity: .6; }
body[data-view="targets"] .gsearch, body[data-view="outreach"] .gsearch, body[data-view="settings"] .gsearch { visibility: hidden; }
.srcline .count { white-space: nowrap; color: var(--text-2); padding-right: 12px; border-right: 1px solid var(--border); }
.srcline .count b { color: var(--text); font-weight: 500; }
.srcline .tprog { margin-left: auto; }
.srcline .tprog:empty { display: none; }
.fsearch input { width: 190px; }
@media (max-width: 900px) {
  body:not([data-view="listings"]) .gsearch { display: none; }
  .srcline .count { border-right: 0; flex-basis: 100%; }
}
.pact:empty { display: none; }
.pact { display: flex; gap: 8px; }
body[data-view="targets"] .gsearch { display: none; }
.qbar { flex-wrap: nowrap; white-space: nowrap; }
.qbar .btn.icon { width: 24px; }
@media (max-width: 900px) { .pact .btn span { display: none; } .pact .btn { width: 28px; padding: 0; justify-content: center; } }
