/* Section: Social reach history
   Daily views + posts dual-axis line chart. Owned by
   shared/dashboard/sections/reach_history/. */

.section--reach-history {
  margin-top: 2rem;
}

.section--reach-history .section-title {
  margin-bottom: 0.5rem;
}

.section--reach-history .section-desc {
  color: var(--color-text-muted);
  margin-bottom: 1rem;
  font-size: 0.95rem;
  line-height: 1.55;
}

.section--reach-history .reach-handle-suffix {
  color: var(--color-text-muted);
  font-size: 0.85em;
  font-weight: 500;
  margin-left: 0.4rem;
}

/* Project / Founder role toggle — mirrors the cardstats period-tab
   pattern (cs-period-tabs) so the design system stays DRY. Two pill
   buttons; the active one carries the .active class set by the
   runtime. Hidden entirely when the token has no founder handle
   (renderer omits the .reach-role-tabs wrapper). */
.reach-role-tabs {
  display: inline-flex;
  gap: 0.4rem;
  margin: 0 0 0.85rem 0;
  padding: 0.2rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.reach-role-btn {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.reach-role-btn:hover {
  color: var(--text-primary);
}

.reach-role-btn.active {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: 0 0 0 1px var(--border);
}

.reach-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-bottom: 1rem;
  font-size: 0.92rem;
  color: var(--color-text-muted);
}

.reach-summary .reach-kpi strong {
  color: var(--protocol-accent, var(--color-text));
  font-variant-numeric: tabular-nums;
}

/* The Chart.js canvas wrapper — same height-via-parent contract as
   cardstats: Chart.js with responsive:true + maintainAspectRatio:false
   reads the canvas's direct PARENT height, so the parent must have a
   fixed height. Without this box, Chart.js grows the canvas to the
   page's content height (~52K px on a long dashboard) and the chart
   line vanishes into the void. */
.reach-canvas-box {
  position: relative;
  height: 320px;
  width: 100%;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 0.5rem 0.75rem;
  box-sizing: border-box;
}

.reach-canvas-box > canvas {
  position: absolute;
  inset: 0.5rem 0.75rem;
  display: block;
}

@media (max-width: 768px) {
  .reach-canvas-box { height: 240px; }
}
