/* Styles for companies.html + founders.html tables (extends market.css) */

.list-main {
  height: calc(100vh - 49px);
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.list-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.list-controls input[type="search"] {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 6px 10px;
  color: var(--text);
  font-size: 13px;
  width: 280px;
  outline: none;
}

.list-controls input[type="search"]:focus {
  border-color: var(--accent);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  font-size: 11px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.chip:hover { color: var(--text); }
.chip.active { background: #1d2e23; border-color: var(--accent); color: var(--accent); }
.chip .count { color: var(--dim); font-size: 10px; margin-left: 2px; }
.chip .sector-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

.table-wrap {
  flex: 1;
  overflow: auto;
  padding: 0 20px 20px;
}

.list-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 12px;
}

.list-table thead th {
  text-align: left;
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  background: var(--panel);
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
  position: sticky;
  top: 0;
}

.list-table thead th:hover { color: var(--text); }
.list-table thead th.asc::after { content: " ↑"; color: var(--accent); }
.list-table thead th.desc::after { content: " ↓"; color: var(--accent); }

.list-table tbody td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: top;
  line-height: 1.45;
  color: #cbd5e1;
}

.list-table tbody tr:hover { background: rgba(255,255,255,0.02); }

.list-table .company-name { color: var(--text); font-weight: 500; }
.list-table .company-link, .company-link {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dotted var(--accent);
}
.list-table .company-link:hover, .company-link:hover { border-bottom-style: solid; }
.list-table .muted { color: var(--dim); }
.list-table .small { color: var(--muted); font-size: 11px; }
.list-table .count-num {
  display: inline-block;
  min-width: 24px;
  text-align: center;
  font-weight: 600;
  color: var(--text);
}
.list-table .src {
  text-decoration: none;
  color: var(--accent);
  margin-left: 4px;
  font-size: 11px;
}
.list-table .sector-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 5px;
  vertical-align: -1px;
}

.firm-pill-sm {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
  font-size: 10px;
  margin-right: 3px;
  margin-bottom: 2px;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
}
.firm-pill-sm:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.6);
}

/* Split-pane layout for Firms / Companies / Founders pages */
#layout-split {
  display: grid;
  grid-template-columns: 1fr 360px;
  height: calc(100vh - 49px);
  min-height: 0;
}

#layout-split .list-main {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  min-width: 0;
}

#layout-split aside#panel {
  background: var(--panel);
  border-left: 1px solid var(--border);
  overflow-y: auto;
  padding: 18px 18px 30px;
}

#layout-split .hint p { margin: 8px 0; color: var(--muted); }
#layout-split .hint .dim { color: var(--dim); font-size: 12px; }

#layout-split #panel-content h2 {
  margin: 0 0 4px;
  font-size: 18px;
  letter-spacing: -0.01em;
}

#layout-split .sector-meta {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 14px;
}

.firm-detail-line {
  font-size: 12px;
  line-height: 1.55;
  color: #cbd5e1;
  margin-bottom: 6px;
}
.firm-detail-line .lbl {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 4px;
}
.firm-detail-line.dim { color: var(--dim); font-style: italic; }
.firm-detail-line a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dotted var(--accent);
}
.firm-detail-line a:hover { border-bottom-style: solid; }

#layout-split .section-h {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 18px 0 8px;
  font-weight: 600;
}

.pill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

/* Clickable pills (sector + company + investor cross-links) */
.clickable-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.1s, border-color 0.1s;
}
.sector-pill {
  background: var(--panel-2);
  border-color: var(--border);
  color: var(--text);
}
.sector-pill:hover { background: #2c3744; }

.company-pill {
  background: var(--panel-2);
  border-color: var(--border);
  color: #cbd5e1;
}
.company-pill:hover {
  background: #2c3744;
  border-color: var(--accent);
  color: var(--accent);
}

.ref-line {
  font-size: 12px;
  color: #c5d0db;
  padding: 6px 9px;
  background: rgba(74, 222, 128, 0.06);
  border-left: 2px solid var(--accent);
  border-radius: 0 4px 4px 0;
  margin-bottom: 4px;
  line-height: 1.4;
}

/* Row click affordance */
.list-table tbody tr.clickable { cursor: pointer; }
.list-table tbody tr.clickable.selected {
  background: rgba(74, 222, 128, 0.08);
  border-left: 2px solid var(--accent);
}
.list-table .count-num.highlight { color: var(--accent); }

/* Company analysis fields (rendered in the side panel) */
.sub-seg-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
  margin-left: 6px;
}
.analysis-block {
  font-size: 13px;
  line-height: 1.55;
  color: #cbd5e1;
  margin-bottom: 4px;
}
.analysis-block.win-thesis {
  background: rgba(74, 222, 128, 0.06);
  border-left: 2px solid var(--accent);
  padding: 8px 11px;
  border-radius: 0 4px 4px 0;
}
.risk-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
  font-size: 11px;
  margin: 2px 3px 2px 0;
}

/* Indicator on the company table when there's analyst overlay */
.has-analysis-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 4px;
  vertical-align: middle;
}

/* Funding-rounds table inside the company detail panel */
.funding-caveat {
  background: rgba(245, 158, 11, 0.08);
  border-left: 2px solid rgba(245, 158, 11, 0.6);
  padding: 8px 10px;
  border-radius: 0 4px 4px 0;
  margin: 4px 0 10px;
  font-size: 11px;
  line-height: 1.5;
  color: #d4b573;
}
.rounds-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  margin-bottom: 6px;
}
.rounds-table thead th {
  text-align: left;
  font-weight: 500;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  padding: 4px 6px;
  border-bottom: 1px solid var(--border);
}
.rounds-table tbody td {
  padding: 6px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: top;
  line-height: 1.4;
  color: #cbd5e1;
}
.rounds-table .lead-pill {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 10px;
  margin: 1px 2px 1px 0;
  white-space: nowrap;
}
.rounds-table .round-source {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dotted var(--accent);
}
.rounds-table .muted {
  font-style: italic;
  font-size: 10px;
}
.funding-note {
  font-size: 11px;
  color: var(--muted);
  font-style: italic;
  line-height: 1.5;
  margin-top: 6px;
}

/* Signals page — card feed */
#cards { padding: 12px 20px 20px; }
.signal-card {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-left: 3px solid #38bdf8;
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: background 0.1s;
}
.signal-card:hover { background: #2a3441; }
.signal-card.selected { background: rgba(56, 189, 248, 0.08); border-left-color: #38bdf8; }
.signal-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.src-tag {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #7dd3fc;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 3px;
  padding: 1px 6px;
}
.type-tag {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.signal-date { font-size: 10px; color: var(--dim); margin-left: auto; }
.signal-title { font-size: 14px; font-weight: 500; line-height: 1.4; color: var(--text); }
.signal-sectors { margin-top: 8px; }
.signal-sectors .sector-dot {
  width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 4px;
}
.data-points {
  margin: 4px 0 0;
  padding-left: 18px;
  font-size: 12px;
  line-height: 1.6;
  color: #cbd5e1;
}
.data-points li { margin-bottom: 3px; }

/* Challenges page — problem cards */
.challenge-card {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-left: 3px solid #ef4444;
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: background 0.1s;
}
.challenge-card:hover { background: #2a3441; }
.challenge-card.selected { background: rgba(239, 68, 68, 0.08); }
.threat-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 1px 7px;
  border-radius: 3px;
  border: 1px solid currentColor;
  background: rgba(255,255,255,0.03);
}
