/* Company hub layout (/company/{symbol}) — layered on style.css + app.css. Structural only;
 * all colors come from the shared warm tokens (the page is a child of /explorer).
 */

/* ---------- company header ---------- */

.co-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.co-id {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mono-muted);
}
.co-search { margin: 16px 0 0; max-width: 360px; }

/* ---------- controls row (tabs + period) ---------- */

.controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 24px 0 20px;
}
.controls-left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.controls-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.period-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--mono-muted);
}

select.period-select {
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 8px 11px;
  border: 1.5px solid var(--border-strong);
  border-radius: 8px;
  background: var(--bg-page);
  color: var(--ink);
  cursor: pointer;
}
select.period-select:focus { outline: none; border-color: var(--accent); }

/* ---------- metric category groups ---------- */

.metric-group { margin-bottom: 26px; }
.metric-group-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  margin: 0 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-tint-rule);
}

/* ---------- statement table ---------- */

.stmt-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.stmt-table th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--mono-muted);
  padding: 11px 16px;
  background: var(--bg-tint);
  border-bottom: 2px solid var(--ink);
}
.stmt-table th.amt, .stmt-table td.amt { text-align: right; }
.stmt-table td {
  padding: 9px 16px;
  border-bottom: 1px solid var(--border-tint-rule);
  font-size: 14px;
}
.stmt-table tr:last-child td { border-bottom: none; }
.stmt-label { color: var(--ink); }
.stmt-amt { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 500; color: var(--ink); }
.stmt-tag { font-family: var(--font-mono); font-size: 10px; color: var(--ink-soft); }

.stmt-caption {
  margin: 10px 2px 0;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--mono-muted);
}

/* ---------- peer position bar (Phase 2) ---------- */

.peer-rank { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.pos-bar {
  position: relative;
  flex: 1;
  height: 6px;
  min-width: 60px;
  background: var(--bg-tint);
  border: 1px solid var(--border-tint-rule);
  border-radius: 3px;
}
.pos-marker {
  position: absolute;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  transform: translate(-50%, -50%);
}
.peer-label { font-family: var(--font-mono); font-size: 9.5px; color: var(--mono-muted); white-space: nowrap; }

/* ---------- expandable metric trend (Phase 1b) ---------- */

.trend-panel { margin-top: 8px; }
.trend-panel summary {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  cursor: pointer;
  list-style: none;
}
.trend-panel summary::-webkit-details-marker { display: none; }
.trend-panel summary::before { content: "+ "; }
.trend-panel[open] summary::before { content: "\2212 "; }

.trend-body { margin-top: 8px; }
.trend-chart {
  padding: 12px 14px;
  background: var(--bg-tint);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.trend-plot { display: flex; gap: 8px; }
.trend-yaxis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 44px;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--mono-muted);
}
/* min-width:0 lets the SVG shrink inside the flex row (an inline SVG's intrinsic width would
 * otherwise force it to overflow narrow cards); width:100% + viewBox scales it to fit. */
.trend-svg { flex: 1; min-width: 0; width: 100%; height: 90px; display: block; }
.trend-svg polyline {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.trend-svg circle { fill: var(--accent); }
.trend-xaxis {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  padding-left: 52px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--mono-muted);
}
.trend-empty { font-family: var(--font-mono); font-size: 11px; color: var(--mono-muted); padding: 6px 0; }
.trend-caption {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--mono-muted);
}
.trend-signals { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.trend-signal { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 12px; }
.trend-signal-label {
  min-width: 92px;
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--mono-muted);
}
.trend-signal-value { font-family: var(--font-mono); font-weight: 600; color: var(--ink); }
.trend-signal-reason { color: var(--ink-soft); font-size: 11px; }

/* ---------- Phase 5.4 + polish pass: portfolio value over time (Profin.valueLineChart) and its
 * sibling position-count strip (Profin.positionCountChart), both vendored Plot wrapped in the
 * shared Profin.chartCard() chrome (STYLE_GUIDE §6) -- .plot-chart / .plot-chart-body already
 * cover the card + horizontally-scrollable SVG container in app.css. These rules cover only
 * what's chart-specific: mount spacing/collapse and the single-quarter fallback display (shared
 * by both charts).
 */
.value-line-mount { margin: 0 0 22px; }
.value-line-mount:empty { display: none; margin: 0; }
.position-count-chart { margin-top: 0; } /* directly below the value line, no title of its own */
.value-line-single { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.value-line-single-value {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 26px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.value-line-single-period {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mono-muted);
}

/* ---------- Phase 5 polish: ingestion coverage strip (Profin.ingestionCoverageStrip) ---------- */
.coverage-strip-mount { margin: 4px 0 4px; }
.coverage-strip-mount:empty { display: none; margin: 0; }
.coverage-strip .plot-chart-body svg { display: block; }

/* ---------- Phase 5 polish: standing caveat (caption-dedup, STYLE_GUIDE §6) ---------- */
.standing-caveat-mount { margin: 2px 0 18px; }
.standing-caveat-mount:empty { display: none; margin: 0; }
.standing-caveat { margin: 0; }
