/* ============================================================
   Directory engine — shared styles for the member directories
   (companies / capital / partners). Rides on design-system.css.
   ============================================================ */

/* member nav */
.nav-mem { display:flex; align-items:center; gap:16px; margin-left:auto; }
.nav-search-m { display:flex; align-items:center; gap:8px; background:var(--surface-soft); border:1px solid var(--line); border-radius:10px; padding:8px 12px; width:190px; }
.nav-search-m input { border:none; background:none; outline:none; font-size:13.5px; width:100%; color:var(--ink); }
.nav-links-m { display:flex; gap:2px; }
.nav-links-m a { font-size:14px; font-weight:500; color:#38483f; padding:8px 12px; border-radius:8px; }
.nav-links-m a:hover { background:var(--surface-soft); color:var(--ink); }
.nav-links-m a.active { color:var(--brand); font-weight:700; }
.acct { display:inline-flex; align-items:center; gap:8px; background:var(--surface); border:1px solid var(--line); border-radius:999px; padding:5px 6px 5px 12px; font-size:13px; font-weight:600; color:var(--ink); cursor:pointer; }
.acct .av { width:24px; height:24px; border-radius:50%; background:linear-gradient(145deg,var(--brand-2),var(--brand)); color:#fff; display:grid; place-items:center; font-size:11px; font-weight:800; }
@media(max-width:1120px){ .nav-search-m,.nav-links-m{ display:none; } }

/* hero */
.dir-hero { padding:34px 0 8px; }
.dir-hero h1 { font-size:clamp(32px,3.4vw,46px); margin:12px 0 8px; }
.dir-hero .lead { font-size:16px; max-width:70ch; }

/* toolbar */
.toolbar { position:sticky; top:74px; z-index:20; display:flex; flex-wrap:wrap; align-items:center; gap:10px; padding:16px 0; margin:22px 0 6px; background:rgba(255,255,255,.86); backdrop-filter:blur(10px); border-bottom:1px solid var(--line); }
/* slim toolbar — plain sticky strip: search (left) + toggles + Clear-all
   + count (right). Nothing fancy, just a solid white bar. */
.toolbar.slim { position:sticky; top:var(--nav-h,74px); z-index:16; min-height:var(--toolbar-h,72px); box-sizing:border-box; padding:14px 0; margin:0; background:#fff; }
.dsearch.slim { min-width:260px; max-width:340px; padding:9px 12px; font-size:14px; }
.dsearch.slim input { font-size:14px; }
.dclear-all { font-size:12.5px; font-weight:700; color:var(--brand); background:none; border:0; padding:6px 10px; border-radius:8px; cursor:pointer; }
.dclear-all:hover { background:var(--brand-soft); }
.dsearch { display:flex; align-items:center; gap:9px; background:var(--surface); border:1px solid var(--line-2); border-radius:11px; padding:11px 14px; min-width:300px; flex:1; max-width:440px; }
.dsearch input { border:none; background:none; outline:none; font-size:14.5px; width:100%; color:var(--ink); }
.dsel { position:relative; }
.dsel select { appearance:none; font-size:13.5px; font-weight:600; color:var(--ink); background:var(--surface); border:1px solid var(--line-2); border-radius:10px; padding:11px 34px 11px 14px; cursor:pointer; }
.dsel::after { content:""; position:absolute; right:13px; top:50%; width:8px; height:8px; border-right:2px solid var(--muted); border-bottom:2px solid var(--muted); transform:translateY(-70%) rotate(45deg); pointer-events:none; }
.dtoggle { display:inline-flex; align-items:center; gap:8px; font-size:13.5px; font-weight:600; color:var(--ink); background:var(--surface); border:1px solid var(--line-2); border-radius:10px; padding:10px 14px; cursor:pointer; user-select:none; }
.dtoggle .box { width:16px; height:16px; border-radius:5px; border:1.5px solid var(--line-2); display:grid; place-items:center; color:#fff; }
.dtoggle.on { border-color:var(--brand); color:var(--brand); background:var(--brand-soft); }
.dtoggle.on .box { background:var(--brand); border-color:var(--brand); }
.dexport-btn { font-size:12.5px; font-weight:700; color:var(--ink); background:var(--surface); border:1px solid var(--line-2); padding:7px 14px; border-radius:8px; cursor:pointer; white-space:nowrap; transition:background .12s,border-color .12s; }
.dexport-btn:hover { background:var(--brand-soft); border-color:var(--brand); color:var(--brand); }
.dcount { margin-left:auto; font-size:13px; font-weight:600; color:var(--muted); white-space:nowrap; }
.dclear { font-size:13px; font-weight:700; color:var(--brand); cursor:pointer; }

/* grid + cards */
.dgrid { display:grid; grid-template-columns:repeat(3,1fr); gap:18px; padding:20px 0 80px; }
@media(max-width:1080px){ .dgrid{ grid-template-columns:1fr 1fr; } }
@media(max-width:640px){ .dgrid{ grid-template-columns:1fr; } }
.dcard { display:flex; flex-direction:column; background:var(--surface); border:1px solid var(--line); border-radius:var(--radius-md); padding:20px 20px 18px; text-align:left; cursor:pointer; font-family:inherit; box-shadow:0 1px 0 rgba(0,0,0,.02); transition:transform .1s, box-shadow .15s, border-color .15s; }
.dcard:hover { transform:translateY(-3px); box-shadow:var(--shadow-sm); border-color:var(--line-2); }
.dc-top { display:flex; align-items:center; gap:13px; margin-bottom:13px; }
.dc-mono { width:44px; height:44px; border-radius:12px; flex:none; display:grid; place-items:center; font-size:17px; font-weight:800; color:var(--c,var(--brand)); background:var(--c-soft,var(--brand-soft)); }
.dc-name { font-size:16px; font-weight:700; letter-spacing:-.01em; color:var(--ink); display:flex; align-items:center; gap:7px; line-height:1.25; }
.dc-name .vf { color:var(--brand); font-size:13px; flex:none; }
.dc-sub { font-size:12px; color:var(--muted); margin-top:2px; }
.dc-desc { font-size:13px; color:var(--muted); line-height:1.55; margin:0 0 14px; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.dc-tags { display:flex; flex-wrap:wrap; gap:6px; margin-top:auto; }
.dc-tag { font-size:11px; font-weight:600; padding:5px 9px; border-radius:999px; background:var(--surface-soft); color:#526158; border:1px solid var(--line); white-space:nowrap; }
.dc-tag.c { background:var(--c-soft,var(--brand-soft)); color:var(--c,var(--brand)); border-color:transparent; }
.dc-foot { display:flex; align-items:center; gap:10px; margin-top:14px; padding-top:13px; border-top:1px solid var(--line); font-size:12px; color:var(--muted); }
.dc-foot .nz { color:var(--brand); font-weight:700; }
.dc-empty { grid-column:1/-1; text-align:center; color:var(--muted); padding:70px 0; font-size:14px; }

/* ---- table layout ----
   Plain table. Sticky top row. No borders around the box, no rounded
   corners, no drop shadows. Rows are separated by a single bottom line. */
/* ── Frozen-layout data grid ─────────────────────────────────────────
   When the directory renders as a table, we lock the whole page into a
   viewport-height flex column. Body cannot scroll; only the table wrap
   scrolls internally. Sticky thead THEN sticks reliably to the top of
   its own scroll container, which the browser handles perfectly.
   Everything below applies ONLY when body.dir-frozen is set. */
body.dir-frozen { overflow:hidden; }
body.dir-frozen main.dir-frame { height:calc(100dvh - var(--nav-h,74px)); display:flex; flex-direction:column; min-height:0; padding-bottom:0; }
body.dir-frozen main.dir-frame > .dir-hero { flex:none; }
body.dir-frozen main.dir-frame > .toolbar { flex:none; position:static; top:auto; }
body.dir-frozen main.dir-frame > .dtable-wrap { flex:1 1 auto; min-height:0; margin:0; }

.dtable-wrap { margin:0 0 30px; overflow:auto; }
.dtable { width:100%; border-collapse:separate; border-spacing:0; }
.dtable thead th { text-align:left; font-size:11px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--muted); padding:0; height:46px; vertical-align:middle; box-sizing:border-box; background:var(--surface-soft); border-bottom:0; box-shadow:0 1px 0 var(--line); white-space:nowrap; position:sticky; top:0; z-index:5; }
/* per-header inner button — clickable filter trigger. One shape, one size. */
.dth-btn { display:flex; align-items:center; gap:8px; width:100%; padding:13px 14px 13px 16px; background:none; border:0; font:inherit; letter-spacing:inherit; text-transform:inherit; color:inherit; font-weight:700; cursor:pointer; text-align:left; }
.dth-btn:hover { background:var(--surface); color:var(--ink); }
.dth-btn.has { color:var(--brand); background:var(--brand-soft); }
.dth-btn .dth-chev { display:inline-flex; align-items:center; justify-content:center; width:14px; height:14px; margin-left:auto; color:var(--muted); font-size:0; line-height:0; flex:none; transition:color .12s, transform .12s; }
.dth-btn .dth-chev::before { content:""; display:block; width:7px; height:7px; border-right:1.75px solid currentColor; border-bottom:1.75px solid currentColor; transform:translateY(-2px) rotate(45deg); }
.dth-btn:hover .dth-chev, .dth-btn.has .dth-chev { color:var(--brand); }
.dth-btn .dth-dot { width:6px; height:6px; border-radius:50%; background:var(--brand); display:none; }
.dth-btn.has .dth-dot { display:inline-block; }
.dtable thead th:not(.dth-fx) { padding:13px 16px; }
.dtable thead th.wl-th { padding:0; }
.dth-search { display:flex; align-items:center; justify-content:center; width:100%; height:100%; min-height:44px; padding:0; background:none; border:0; color:var(--muted); cursor:pointer; }
.dth-search:hover { color:var(--brand); background:var(--surface); }
.dth-search.has { color:var(--brand); background:var(--brand-soft); }

/* ---- filter popover (opens under a sticky header cell) ---- */
.dfpop { position:absolute; z-index:120; background:var(--surface); border:1px solid var(--line-2); border-radius:12px; box-shadow:0 12px 34px rgba(20,32,26,.14); min-width:220px; max-width:340px; padding:8px 0; font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif; }
.dfpop-head { display:flex; align-items:center; justify-content:space-between; padding:6px 14px 8px; border-bottom:1px solid var(--line); }
.dfpop-title { font-size:11px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); }
.dfpop-clear { font-size:12px; font-weight:700; color:var(--brand); background:none; border:0; padding:4px 8px; border-radius:6px; cursor:pointer; }
.dfpop-clear:hover { background:var(--brand-soft); }
.dfpop-search-row { padding:8px 12px 4px; }
.dfpop-input { width:100%; box-sizing:border-box; padding:8px 11px; border:1px solid var(--line-2); border-radius:8px; font:inherit; font-size:13px; color:var(--ink); background:var(--surface-soft); outline:none; }
.dfpop-input:focus { border-color:var(--brand); background:var(--surface); }
.dfpop-body { padding:10px 12px 12px; display:flex; flex-direction:column; gap:8px; }
.dfpop-actions { display:flex; justify-content:flex-end; }
.dfpop-list { max-height:280px; overflow-y:auto; padding:4px 0 6px; }
.dfpop-opt { display:flex; align-items:center; gap:9px; padding:7px 14px; cursor:pointer; font-size:13px; color:var(--ink); }
.dfpop-opt:hover { background:var(--surface-soft); }
.dfpop-opt input { position:absolute; opacity:0; pointer-events:none; }
.dfpop-opt .dfpop-box { width:15px; height:15px; border-radius:4px; border:1.5px solid var(--line-2); background:var(--surface); display:grid; place-items:center; color:transparent; flex:none; transition:.1s; }
.dfpop-opt.on .dfpop-box { background:var(--brand); border-color:var(--brand); color:#fff; }
.dfpop-opt .dfpop-txt { flex:1; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.dfpop-opt.on .dfpop-txt { font-weight:600; color:var(--ink); }
.dfpop-search { min-width:280px; }
.dtable tbody td { padding:13px 16px; border-bottom:1px solid var(--line); vertical-align:top; font-size:13.5px; color:var(--ink); }
.dtable tbody tr { cursor:pointer; transition:background .1s; }
.dtable tbody tr:last-child td { border-bottom:0; }
.dtable tbody tr:hover { background:var(--surface-soft); }
.dtable .row-hi { background:var(--brand-soft) !important; }
.t-name { font-weight:700; color:var(--ink); font-size:14px; letter-spacing:-.01em; }
.t-sub { font-size:12px; color:var(--muted); margin-top:2px; }
.t-desc { font-size:12.5px; color:var(--muted); line-height:1.45; margin-top:5px; max-width:44ch; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.t-pill { display:inline-flex; align-items:center; gap:6px; font-size:12px; font-weight:600; padding:5px 10px; border-radius:999px; background:var(--c-soft,var(--surface-soft)); color:var(--c,#526158); white-space:nowrap; }
.t-pill .dot { width:7px; height:7px; border-radius:50%; background:var(--c,var(--muted)); flex:none; }
.t-seclist { list-style:none; margin:7px 0 0; padding:0; display:flex; flex-direction:column; gap:4px; }
.t-seclist li { font-size:11.5px; color:var(--muted); display:flex; align-items:center; gap:6px; }
.t-seclist .d { width:6px; height:6px; border-radius:50%; flex:none; }
.t-subpill { font-size:12px; font-weight:600; color:#4a5a52; background:var(--surface-soft); border:1px solid var(--line); border-radius:8px; padding:5px 9px; display:inline-block; white-space:normal; max-width:180px; }
.t-stage { font-size:12px; font-weight:700; color:var(--ink); background:var(--surface-soft); border:1px solid var(--line); border-radius:8px; padding:5px 10px; white-space:nowrap; display:inline-block; }
.t-raising { font-size:11.5px; font-weight:700; color:#047857; background:#ecfdf5; border:1px solid #a7f3d0; border-radius:8px; padding:5px 10px; white-space:nowrap; display:inline-block; }
.t-trl { font-size:12px; font-weight:700; color:var(--brand); background:var(--brand-soft); border-radius:8px; padding:5px 9px; white-space:nowrap; display:inline-block; }
.t-dash { color:var(--line-2); }
.t-invs { display:flex; flex-wrap:wrap; gap:5px; max-width:240px; }
.t-inv { font-size:11.5px; font-weight:600; color:#40514a; background:var(--surface-soft); border:1px solid var(--line); border-radius:999px; padding:4px 9px; white-space:nowrap; }
.t-more { font-size:11.5px; color:var(--muted); align-self:center; }
.t-verified { color:var(--brand); }
.t-verified svg { width:20px; height:20px; display:block; margin:0 auto; }
.dtable .t-center { text-align:center; }

/* ---- deep-dive drawer ---- */
.dv-bg { position:fixed; inset:0; background:rgba(16,32,23,.42); opacity:0; pointer-events:none; transition:opacity .12s; z-index:90; }
.dv-bg.on { opacity:1; pointer-events:auto; }
.dv { position:fixed; top:0; right:0; height:100%; width:min(580px,96vw); background:var(--surface); border-left:1px solid var(--line); box-shadow:-18px 0 60px rgba(0,0,0,.18); transform:translateX(100%); transition:transform .15s cubic-bezier(.22,1,.36,1); z-index:91; display:flex; flex-direction:column; }
.dv.on { transform:none; }
.dv-hd { position:relative; padding:26px 26px 28px; border-bottom:1px solid var(--line); }
.dv-close { position:absolute; top:20px; right:22px; width:34px; height:34px; border-radius:50%; border:1px solid var(--line-2); background:var(--surface); cursor:pointer; color:var(--muted); font-size:15px; line-height:1; }
.dv-close:hover { background:var(--surface-soft); }
.dv-eyebrow { font-size:11px; font-weight:700; letter-spacing:.1em; text-transform:uppercase; color:var(--brand); }
.dv-title { font-size:25px; font-weight:800; letter-spacing:-.03em; color:var(--ink); margin:9px 0 4px; display:flex; align-items:center; gap:10px; padding-right:40px; }
.dv-title .vf { color:var(--brand); font-size:17px; flex:none; }
.dv-sub { font-size:13.5px; color:var(--muted); }
.dv-tags { display:flex; flex-wrap:wrap; gap:7px; justify-content:flex-start; margin-top:20px; margin-bottom:24px; }
.dv-body { flex:1; overflow-y:auto; padding:22px 26px 28px; }
.dv-sec { margin-bottom:24px; }
.dv-sec-l { font-size:10.5px; font-weight:700; letter-spacing:.1em; text-transform:uppercase; color:var(--muted); margin-bottom:10px; }
.dv-desc { font-size:14px; color:#38483f; line-height:1.65; margin:0; }
.dv-kv { display:grid; grid-template-columns:auto 1fr; gap:9px 16px; font-size:13.5px; margin:0; }
.dv-kv dt { color:var(--muted); } .dv-kv dd { margin:0; color:var(--ink); font-weight:600; text-align:right; }
.dv-chips { display:flex; flex-wrap:wrap; gap:7px; }
.dv-chip { font-size:12px; font-weight:600; padding:6px 11px; border-radius:999px; background:var(--surface-soft); border:1px solid var(--line); color:#40514a; }
.dv-chip.c { background:var(--brand-soft); border-color:transparent; color:var(--brand); }
/* backers bar */
.dv-backer { display:flex; align-items:center; gap:10px; margin-bottom:8px; }
.dv-backer .nm { font-size:13px; font-weight:600; color:var(--ink); width:150px; flex:none; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.dv-backer .bar { flex:1; height:8px; border-radius:99px; background:var(--surface-soft); overflow:hidden; }
.dv-backer .bar i { display:block; height:100%; background:linear-gradient(90deg,var(--brand-2),var(--brand)); border-radius:99px; }
.dv-actions { border-top:1px solid var(--line); padding:16px 26px; display:grid; grid-template-columns:1fr 1fr; gap:10px; background:var(--surface); }
.dv-act { display:inline-flex; align-items:center; justify-content:center; gap:8px; font-size:13.5px; font-weight:700; padding:11px 14px; border-radius:10px; border:1px solid var(--line-2); background:var(--surface); color:var(--ink); cursor:pointer; transition:box-shadow .15s, background .15s, color .15s, border-color .15s; }
.dv-act:hover { box-shadow:var(--shadow-sm); }
.dv-act.primary { grid-column:1/-1; background:linear-gradient(180deg,var(--brand-2),var(--brand)); border-color:transparent; color:#fff; }
.dv-act.on { border-color:var(--brand); color:var(--brand); background:var(--brand-soft); }
.dv-toast { position:fixed; bottom:26px; left:50%; transform:translateX(-50%) translateY(20px); background:var(--ink); color:#fff; font-size:13.5px; font-weight:600; padding:11px 20px; border-radius:10px; box-shadow:0 12px 30px rgba(0,0,0,.25); opacity:0; pointer-events:none; transition:opacity .2s, transform .2s; z-index:95; }
.dv-toast.on { opacity:1; transform:translateX(-50%) translateY(0); }
