/* Delta Reveal · Prospects — calm terminal-inflected data tool.
   Ink navy + heritage cyan (Augment); amber is reserved for the call-list star. */

:root {
  --ink: #131c2b;
  --paper: #f7f9fb;
  --panel: #ffffff;
  --line: #e2e8f0;
  --muted: #5d6b80;
  --cyan: #0e7c9e;
  --cyan-soft: #e3f2f7;
  --amber: #d98e21;
  --amber-soft: #fdf3e3;
  --navy-band: #14202e;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --sans: "Archivo", system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
:root { color-scheme: only light; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
  background: var(--paper);
}
a { color: var(--cyan); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 1px; }

/* ---------- buttons & controls ---------- */
.btn {
  font: 600 13px var(--sans);
  padding: 7px 14px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
}
.btn:hover { border-color: var(--cyan); color: var(--cyan); }
.btn-primary { background: var(--cyan); border-color: var(--cyan); color: #fff; }
.btn-primary:hover { background: #0b6a87; color: #fff; }
.btn-ghost { background: transparent; }
.btn-block { width: 100%; }
.linklike {
  border: 0; background: none; padding: 0; font: inherit;
  color: inherit; text-decoration: underline; cursor: pointer;
}
input[type="search"], input[type="email"], input[type="password"], select {
  font: 400 14px var(--sans);
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 7px 10px;
}

/* ---------- sign in ---------- */
.login-wrap {
  min-height: 100vh; display: grid; place-items: center;
  background:
    linear-gradient(160deg, var(--navy-band) 0 38%, transparent 38.1%),
    var(--paper);
}
.login-card {
  width: min(360px, 92vw);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  display: flex; flex-direction: column; gap: 6px;
  box-shadow: 0 12px 40px rgba(19, 28, 43, .18);
}
.login-brand { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.login-brand h1 { font-size: 20px; font-weight: 700; margin: 0; letter-spacing: -.01em; }
.login-sub { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.brand-mark {
  font-family: var(--mono); font-weight: 600; font-size: 15px;
  background: var(--navy-band); color: #7fd4ec;
  padding: 8px 9px; border-radius: 6px; letter-spacing: .02em;
}
.brand-mark.small { font-size: 12px; padding: 5px 7px; }
.login-card label { font-size: 12px; font-weight: 600; color: var(--muted); margin-top: 8px; }
.login-error { color: #b3261e; font-size: 13px; margin: 8px 0 0; }
.login-card .btn { margin-top: 16px; }
.login-foot { color: var(--muted); font-size: 12px; margin: 10px 0 0; }

/* ---------- top bar ---------- */
.topbar {
  display: flex; align-items: center; gap: 14px;
  background: var(--navy-band); color: #dbe6ef;
  padding: 10px 18px;
  position: sticky; top: 0; z-index: 30;
}
.topbar-title { font-weight: 700; letter-spacing: .01em; }
.topbar input[type="search"] {
  flex: 0 1 340px; margin-left: 12px;
  background: #1d2c3d; border-color: #2c3e52; color: #e8eff5;
}
.topbar input[type="search"]::placeholder { color: #7c8ca0; }
.result-count { font-family: var(--mono); font-size: 12px; color: #9fb2c5; margin-right: auto; }
.topbar .btn-ghost { border-color: #2c3e52; color: #dbe6ef; }
.topbar .btn-ghost:hover { border-color: #7fd4ec; color: #7fd4ec; }
.topbar-user { font-size: 12px; color: #9fb2c5; }

/* ---------- layout ---------- */
.layout { display: flex; min-height: calc(100vh - 49px); }
.rail {
  flex: 0 0 232px;
  border-right: 1px solid var(--line);
  background: var(--panel);
  padding: 16px 16px 24px;
}
.rail-mobile-head { display: none; }
.rail-scrim { position: fixed; inset: 0; background: rgba(19, 28, 43, .35); z-index: 44; }
.filters-btn { display: none; }
.rail-group { margin-bottom: 18px; }
.rail-group h2 {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--muted); margin: 0 0 8px;
}
.rail-group select { width: 100%; }
.check {
  display: flex; align-items: center; gap: 7px;
  padding: 3px 0; cursor: pointer; font-size: 13px;
}
.rail-note { font-size: 11px; color: var(--muted); margin: 8px 0 0; line-height: 1.4; }
.rail-foot { font-size: 11px; color: var(--muted); margin-top: 22px; line-height: 1.6; }
.count-chip {
  font-family: var(--mono); font-size: 10px; background: var(--amber-soft);
  color: var(--amber); border-radius: 8px; padding: 1px 6px;
}
.star-glyph { color: var(--amber); }

/* ---------- strategy chips: the two-letter desk shorthand ---------- */
.chip {
  font-family: var(--mono); font-size: 10px; font-weight: 600;
  padding: 2px 4px; border-radius: 3px; letter-spacing: .04em;
}
.chip-ls { background: #e7ecf6; color: #3d5a99; }
.chip-pc { background: #e7f3ee; color: #217a52; }
.chip-dd { background: #f8e9e7; color: #a5453a; }
.chip-ss { background: #f2e9f6; color: #7b4a99; }
.chip-lo { background: var(--cyan-soft); color: var(--cyan); }

/* ---------- table ---------- */
.content { flex: 1; padding: 0 0 40px; min-width: 0; }
.firms { width: 100%; border-collapse: collapse; }
.firms th {
  text-align: left; font-size: 11px; text-transform: uppercase;
  letter-spacing: .07em; color: var(--muted);
  padding: 10px 12px; border-bottom: 1px solid var(--line);
  position: sticky; top: 49px; background: var(--paper); z-index: 10;
}
.firms th.num, .firms td.num { text-align: right; }
.sort {
  border: 0; background: none; font: inherit; color: inherit;
  cursor: pointer; padding: 0; text-transform: inherit; letter-spacing: inherit;
}
.sort.is-active { color: var(--cyan); font-weight: 700; }
.sort.is-active::after { content: " ↓"; }

/* column filter row */
.filter-row th { top: 85px; padding: 4px 12px 10px; }
.filter-row select {
  width: 100%; max-width: 130px; padding: 4px 6px; font-size: 12px;
}
.filter-row .star-btn { font-size: 14px; }
.chip-toggles { display: flex; gap: 4px; flex-wrap: wrap; }
.chip-toggles .chip {
  border: 1px solid transparent; cursor: pointer; opacity: .45;
}
.chip-toggles .chip.on { opacity: 1; border-color: currentColor; }
.chip-toggles .chip:hover { opacity: 1; }

/* strategy legend */
.legend-btn {
  border: 1px solid var(--line); background: var(--panel); color: var(--muted);
  font: 600 10px var(--mono); border-radius: 50%; width: 16px; height: 16px;
  cursor: pointer; padding: 0; vertical-align: 1px;
}
.legend-btn:hover { color: var(--cyan); border-color: var(--cyan); }
.legend-pop {
  position: fixed; top: 96px; right: 16px; z-index: 60;
  width: min(360px, 92vw);
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 12px 40px rgba(19, 28, 43, .2);
  padding: 14px 16px;
}
.legend-pop h3 {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--muted); margin: 0 0 10px;
}
.legend-row { display: flex; gap: 8px; align-items: baseline; font-size: 13px; padding: 3px 0; }
.legend-row b { font-weight: 600; }
.legend-note { font-size: 11px; color: var(--muted); line-height: 1.5; margin: 10px 0 0; }
.firms td {
  padding: 9px 12px; border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.firms tbody tr { cursor: pointer; }
.firms tbody tr:hover { background: var(--cyan-soft); }
.col-star { width: 34px; }
.star-btn {
  border: 0; background: none; cursor: pointer; font-size: 15px;
  color: #c6ceda; padding: 2px 4px; line-height: 1;
}
.star-btn.on { color: var(--amber); }
.star-btn:hover { color: var(--amber); }
.firm-name { font-weight: 600; }
.firm-sub { font-size: 11px; color: var(--muted); margin-top: 1px; }
td.num { font-family: var(--mono); font-size: 13px; white-space: nowrap; }
.unit { color: var(--muted); font-size: 11px; }
.fund-mix { font-size: 11px; color: var(--muted); }
.chips { display: flex; gap: 4px; flex-wrap: wrap; }

.empty { text-align: center; padding: 80px 20px; color: var(--muted); }
.empty p { margin: 0 0 4px; font-size: 15px; }
.empty-sub { font-size: 13px; }

.pager { display: flex; gap: 6px; justify-content: center; padding: 18px; }
.pager button {
  font-family: var(--mono); font-size: 12px; padding: 5px 10px;
  border: 1px solid var(--line); background: var(--panel);
  border-radius: 4px; cursor: pointer;
}
.pager button[disabled] { opacity: .4; cursor: default; }
.pager .cur { border-color: var(--cyan); color: var(--cyan); font-weight: 600; }

/* ---------- detail drawer ---------- */
.drawer-scrim {
  position: fixed; inset: 0; background: rgba(19, 28, 43, .35); z-index: 40;
}
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 50;
  width: min(660px, 94vw);
  background: var(--panel);
  border-left: 1px solid var(--line);
  box-shadow: -18px 0 50px rgba(19, 28, 43, .25);
  overflow-y: auto;
  transform: translateX(8px); opacity: 0;
  transition: transform .15s ease, opacity .15s ease;
}
.drawer.open { transform: none; opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .drawer { transition: none; }
}
.drawer-head {
  position: sticky; top: 0; background: var(--panel); z-index: 5;
  padding: 20px 24px 14px; border-bottom: 1px solid var(--line);
}
.drawer-head .row1 { display: flex; align-items: flex-start; gap: 10px; }
.drawer-head h2 { font-size: 19px; font-weight: 700; margin: 0; flex: 1; letter-spacing: -.01em; }
.drawer-close {
  border: 0; background: none; font-size: 20px; cursor: pointer;
  color: var(--muted); padding: 2px 6px;
}
.drawer-close:hover { color: var(--ink); }
.reg-line { font-family: var(--mono); font-size: 11px; color: var(--muted); margin: 6px 0 0; }
.drawer-meta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; font-size: 13px; }
.drawer-meta .m { color: var(--muted); }
.drawer-meta strong { font-family: var(--mono); font-weight: 500; }
.drawer-section { padding: 16px 24px; border-bottom: 1px solid var(--line); }
.drawer-section h3 {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--muted); margin: 0 0 10px;
}
.included-note { font-size: 12px; color: var(--muted); }
.fund-row { padding: 8px 0; border-bottom: 1px dashed var(--line); }
.fund-row:last-child { border-bottom: 0; }
.fund-row .fr-top { display: flex; gap: 10px; align-items: baseline; }
.fund-row .fname { font-weight: 600; font-size: 13px; flex: 1; }
.fund-row .fgav { font-family: var(--mono); font-size: 12px; white-space: nowrap; }
.fund-row .ftype { font-size: 11px; color: var(--muted); }
.fund-provs { font-size: 11px; color: var(--muted); margin-top: 3px; line-height: 1.5; }
.fund-provs b { font-weight: 600; color: var(--ink); }
.more-note { font-size: 12px; color: var(--muted); padding-top: 8px; }
.officer { display: flex; gap: 10px; padding: 5px 0; font-size: 13px; align-items: baseline; }
.officer .oname { font-weight: 600; min-width: 200px; }
.officer .otitle { color: var(--muted); flex: 1; }
.officer .octl {
  font-family: var(--mono); font-size: 10px; color: var(--cyan);
  border: 1px solid var(--cyan); border-radius: 3px; padding: 0 4px;
}
.officer .oown { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.entity-list { font-size: 12px; color: var(--muted); line-height: 1.7; }

/* ---------- narrow screens ---------- */
@media (max-width: 900px) {
  /* topbar: two rows, fixed height contributions so nothing collides */
  .topbar { flex-wrap: wrap; gap: 8px 10px; padding: 10px 12px; position: static; }
  .topbar input[type="search"] { flex: 1 1 100%; order: 10; margin-left: 0; font-size: 16px; }
  .result-count { margin-right: 0; }
  .topbar-user { margin-left: auto; }
  .filters-btn { display: inline-block; }

  /* the rail becomes a slide-in filters sheet */
  .rail {
    position: fixed; inset: 0 64px 0 0; z-index: 45;
    transform: translateX(-102%);
    transition: transform .18s ease;
    overflow-y: auto;
    box-shadow: 12px 0 40px rgba(19, 28, 43, .3);
  }
  .rail.open { transform: none; }
  @media (prefers-reduced-motion: reduce) { .rail { transition: none; } }
  .rail-mobile-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 14px;
  }
  .rail-mobile-title { font-size: 16px; font-weight: 700; }
  .rail select, .filter-row select { font-size: 16px; }

  /* table: drop the State and Funds columns, unstick the header */
  .col-state, .col-funds { display: none; }
  .firms th { position: static; }
  .firms th, .firms td { padding: 9px 8px; }
  .filter-row select { max-width: 110px; }
  .drawer { width: 100vw; border-left: 0; }
  .legend-pop { top: 12px; right: 4vw; }
}
