/* ============================================================
   investors.css: Investor List components on top of the shared
   Sytezo layer (tokens.css, site.css, sytezo.css).
   Same rule as the Funding Guide: colour only carries status.
   The hero shows the deal pulse: one brick per investment by a
   listed fund, stacked month by month.
   ============================================================ */

.fund-row[hidden], .deal-item[hidden], .deal-month[hidden], .empty-state[hidden], .saved-actions .btn[hidden] { display: none; }

/* ---------- hero: the deal pulse ---------- */
.pulse { margin: 30px 0 0; max-width: 640px; }
.pulse-cols { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(13, minmax(0, 1fr)); gap: 6px; align-items: end; }
.pm-col { display: grid; justify-items: center; gap: 7px; min-width: 0; }
.pm-stack { display: flex; flex-direction: column-reverse; justify-content: flex-start; gap: 3px; width: 100%; min-height: 126px; }
.pq {
  display: block; width: 100%; height: 10px; border-radius: 2px; background: var(--hero-ok);
  transition: transform 160ms var(--ease), opacity 160ms var(--ease);
}
.pulse-cols:hover .pq, .pulse-cols:focus-within .pq { opacity: 0.36; }
.pulse-cols .pq:hover, .pulse-cols .pq:focus { opacity: 1; transform: scaleX(1.14); outline: none; }
.pulse-cols .pq:focus-visible { box-shadow: 0 0 0 2px var(--hero-bg), 0 0 0 3px var(--hero-text); }
.pm-m { font-size: 0.72rem; color: var(--hero-muted); line-height: 1; }
.pm-ml { display: none; }
.pm-y { font-size: 0.66rem; color: rgb(255 255 255 / 0.42); line-height: 1; margin-top: -2px; font-variant-numeric: tabular-nums; }
@container (min-width: 560px) { .pm-ml { display: inline; } }
@media (max-width: 560px) { .pulse-cols { gap: 4px; } .pm-stack { min-height: 104px; } .pq { height: 8px; } }
@media (hover: none), (pointer: coarse) { .pq { pointer-events: none; } }
@media (prefers-reduced-motion: no-preference) {
  .pq { animation: pq-in 520ms var(--ease) backwards; }
  .pm-col:nth-child(2) .pq { animation-delay: 30ms; } .pm-col:nth-child(3) .pq { animation-delay: 60ms; }
  .pm-col:nth-child(4) .pq { animation-delay: 90ms; } .pm-col:nth-child(5) .pq { animation-delay: 120ms; }
  .pm-col:nth-child(6) .pq { animation-delay: 150ms; } .pm-col:nth-child(7) .pq { animation-delay: 180ms; }
  .pm-col:nth-child(8) .pq { animation-delay: 210ms; } .pm-col:nth-child(9) .pq { animation-delay: 240ms; }
  .pm-col:nth-child(10) .pq { animation-delay: 270ms; } .pm-col:nth-child(11) .pq { animation-delay: 300ms; }
  .pm-col:nth-child(12) .pq { animation-delay: 330ms; } .pm-col:nth-child(13) .pq { animation-delay: 360ms; }
  @keyframes pq-in { from { opacity: 0; transform: translateY(6px); } }
}
/* funds by activity: one proportional bar under the pulse */
.act-bar { display: flex; gap: 2px; height: 6px; margin-top: 18px; max-width: 640px; }
.act-bar span { flex: var(--n) 1 0; min-width: 3px; border-radius: 2px; background: rgb(255 255 255 / 0.3); }
.act-bar .ab-open { background: var(--hero-ok); }
.act-bar .ab-waiting { background: var(--hero-wait); }
.act-bar .ab-closed { background: var(--hero-stop); }
.pulse .signal-legend { margin-top: 12px; }
.pulse .signal-legend .t-active::before { background: rgb(255 255 255 / 0.3); }

/* ---------- numbers line ---------- */
.stat-line { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.stat-line li { display: grid; gap: 6px; align-content: start; padding: 20px 16px 20px 0; }
.stat-line li:nth-child(2n) { padding-left: 18px; border-left: 1px solid var(--border); }
.stat-line li:nth-child(n + 3) { border-top: 1px solid var(--border); }
.stat-line b { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.9rem, 4vw, 2.5rem); line-height: 1; color: var(--text); font-variant-numeric: tabular-nums; }
.stat-line span { color: var(--text-muted); font-size: 0.86rem; max-width: 26ch; }
@media (min-width: 900px) {
  .stat-line { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stat-line li { padding-left: 20px; border-left: 1px solid var(--border); }
  .stat-line li:first-child { padding-left: 0; border-left: none; }
  .stat-line li:nth-child(n + 3) { border-top: none; }
}

/* ---------- browse by stage: four steps ---------- */
@media (min-width: 861px) { .life.life-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- fund list ---------- */
.fund-list { border-top: 1px solid var(--border); }
.fund-head { display: none; }
.fund-row {
  position: relative; display: grid; gap: 6px 14px; align-items: center;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "id save" "act act" "fit fit" "cheque route";
  padding: 14px 4px; border-bottom: 1px solid var(--border);
}
.fund-row:hover { background: var(--surface-alt); }
.fr-id { grid-area: id; display: grid; gap: 2px; min-width: 0; }
.fr-name { font-weight: 600; color: var(--text); }
.fr-name::after { content: ""; position: absolute; inset: 0; }
.fr-name:hover { text-decoration: none; }
.fund-row:hover .fr-name { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--border-strong); }
.fr-sub { font-size: 0.78rem; color: var(--text-faint); }
.fr-act { grid-area: act; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.fr-last { font-size: 0.78rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.fr-fit { grid-area: fit; display: grid; gap: 1px; font-size: 0.84rem; min-width: 0; }
.fr-stages { color: var(--text); }
.fr-sectors { color: var(--text-muted); font-size: 0.8rem; }
.fr-cheque { grid-area: cheque; font-size: 0.84rem; min-width: 0; }
.fr-route { grid-area: route; display: flex; gap: 6px; align-items: center; font-size: 0.82rem; color: var(--text-muted); justify-self: end; }
.fr-ric { display: inline-grid; color: var(--text-faint); }
.fr-ric svg { width: 14px; height: 14px; }
.fund-row .save-btn { grid-area: save; justify-self: end; }
@media (min-width: 1180px) {
  .fund-head, .fund-row { grid-template-columns: minmax(170px, 1.25fr) minmax(150px, 1fr) minmax(0, 1.5fr) minmax(110px, 0.85fr) minmax(112px, 0.75fr) 34px; grid-template-areas: "id act fit cheque route save"; }
  .fund-head { display: grid; gap: 14px; padding: 0 4px 8px; font-size: 0.74rem; color: var(--text-faint); border-bottom: 1px solid var(--border); margin-top: -1px; }
  .fund-list { border-top: none; }
  .fr-act { flex-direction: column; align-items: flex-start; gap: 4px; }
  .fr-route { justify-self: start; }
}

/* ---------- save (star) ---------- */
.save-btn {
  position: relative; z-index: 1; width: 34px; height: 34px; flex: none; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid transparent; background: transparent; color: var(--text-faint); cursor: pointer;
  transition: color var(--speed) var(--ease), border-color var(--speed) var(--ease);
}
.save-btn:hover { color: var(--text); border-color: var(--border-strong); }
.save-btn svg { width: 17px; height: 17px; }
.save-btn[aria-pressed="true"] { color: var(--text); }
.save-btn[aria-pressed="true"] svg { fill: currentColor; }
@media (prefers-reduced-motion: no-preference) {
  .save-btn[aria-pressed="true"] svg { animation: star-pop 260ms var(--ease); }
  @keyframes star-pop { 50% { transform: scale(1.25); } }
}

/* ---------- toolbar extras ---------- */
.toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 0.84rem; color: var(--text-muted); cursor: pointer; white-space: nowrap; }
.toggle input { width: 16px; height: 16px; margin: 0; accent-color: var(--text); }
.status-legend button.status[aria-pressed="true"] { border-color: currentColor; }

/* ---------- fund page ---------- */
.fh-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.fh-title .save-btn { margin-top: 4px; border-color: var(--border); width: 40px; height: 40px; }
.fh-title .save-btn svg { width: 19px; height: 19px; }
.chip-row .badge { text-decoration: none; }
a.badge.b-part:hover { color: var(--text); }
.chip.chip-static, .chip.chip-static:hover { cursor: default; border-color: var(--border); color: var(--text-muted); }
.mini-h { font-family: var(--font-body); font-size: 0.8rem; font-weight: 500; color: var(--text-faint); letter-spacing: 0; margin: 16px 0 8px; }
.pill-list.plain span { font-size: 0.8rem; border: 1px solid var(--border); border-radius: var(--radius-pill); padding: 4px 11px; color: var(--text); background: var(--surface); }
.pitch-box { display: grid; gap: 16px; padding: 18px 20px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.pb-route { display: flex; align-items: flex-start; gap: 14px; }
.pb-route > span:last-child { display: grid; gap: 4px; min-width: 0; }
.pb-route .muted { font-size: 0.9rem; }
.pb-ic { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--border); color: var(--text-muted); }
.pb-ic svg { width: 17px; height: 17px; }
.pb-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.pb-actions .btn { display: inline-flex; align-items: center; gap: 8px; overflow-wrap: anywhere; }
.pb-actions .btn svg { width: 15px; height: 15px; flex: none; }

/* deal ledgers (home, fund pages, deal log) */
.deal-ledger .lg-row { grid-template-columns: 96px 148px minmax(0, 1fr); }
.deal-ledger div.lg-row:hover { background: none; }
.deal-ledger .lg-body span a { color: var(--text-muted); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--border-strong); position: relative; z-index: 1; }
.deal-ledger .lg-body span a:hover { color: var(--text); }
.deal-ledger.compact .lg-row { padding: 12px 4px; }
.deal-ledger .is-unconfirmed { opacity: 0.66; }
@media (max-width: 720px) { .deal-ledger .lg-row { grid-template-columns: auto minmax(0, 1fr); } }
.deal-month { margin-top: 30px; }
.deal-month:first-child { margin-top: 8px; }
.dm-h { display: flex; align-items: baseline; gap: 10px; font-size: 1.15rem; margin-bottom: 10px; }
.dm-h .muted { font-family: var(--font-body); font-size: 0.82rem; font-weight: 400; letter-spacing: 0; }

/* ---------- how to pitch ---------- */
.pitch-grid { margin-top: 40px; }
.route-group > .muted { margin-top: -8px; }
.route-list { margin-top: 12px; border-top: 1px solid var(--border); }
.route-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 14px; align-items: center; padding: 11px 4px; border-bottom: 1px solid var(--border); font-size: 0.88rem; }
.rr-name { font-weight: 600; color: var(--text); }
.rr-fit { color: var(--text-muted); font-size: 0.8rem; grid-column: 1 / -1; }
.rr-go { grid-column: 1 / -1; font-size: 0.84rem; overflow-wrap: anywhere; }
.rr-go a { color: var(--text); display: inline-flex; align-items: center; gap: 5px; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--border-strong); }
.rr-go svg { width: 12px; height: 12px; }
@media (min-width: 900px) {
  .route-row { grid-template-columns: minmax(150px, 1fr) 150px minmax(0, 1.4fr) minmax(160px, auto); }
  .rr-fit, .rr-go { grid-column: auto; }
  .route-row .status { justify-self: start; }
}

/* ---------- matches & saved ---------- */
.sl-prefs .sl-check { align-content: start; }
.sl-prefs .toggle { height: 42px; font-size: 0.86rem; color: var(--text); font-weight: 400; }
.m-card { position: relative; }
.m-card h3 a { color: var(--text); }
.m-card h3 a::after { content: ""; position: absolute; inset: 0; }
.m-card h3 a:hover { text-decoration: none; }
.m-card:hover { border-color: var(--text-faint); }
.m-card .sl-top { align-items: center; }
.m-card .m-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.m-card .m-chips .mc { font-size: 0.72rem; color: var(--text-muted); border: 1px solid var(--border); border-radius: var(--radius-pill); padding: 1px 9px; }
.m-card .m-caveat { font-size: 0.78rem; color: var(--wait); }
.m-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 0.8rem; padding-top: 6px; border-top: 1px solid var(--border); }
.m-foot .m-cheque { color: var(--text); font-weight: 600; }
.m-foot a { position: relative; z-index: 1; color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--border-strong); display: inline-flex; gap: 5px; align-items: center; }
.m-foot a svg { width: 12px; height: 12px; }
.m-card .save-btn { margin: -6px -6px 0 0; }
.m-more summary { cursor: pointer; font-size: 0.9rem; font-weight: 600; margin-top: 26px; width: fit-content; }
.saved-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 18px; }
.saved-actions .btn { display: inline-flex; align-items: center; gap: 8px; }
.saved-actions .btn svg { width: 15px; height: 15px; }

/* approximate dates: the tilde in the body face (Glacial draws it raised) */
.apx { font-family: var(--font-body); margin-right: 1px; color: var(--text-faint); }

/* phones: filters as a tidy two-column grid */
@media (max-width: 640px) {
  #fund-directory .toolbar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
  #fund-directory .toolbar .field { grid-column: 1 / -1; min-width: 0; }
  #fund-directory .toolbar select { width: 100%; min-width: 0; }
  #fund-directory .toolbar .toggle { align-self: center; }
  #fund-directory .toolbar #f-reset { justify-self: start; }
}
