/* blog-tracker.css — live brand-mention graph + static source bars for blog posts.
   Loaded only by posts that embed a tracker. Design tokens only, never hex.
   Follows design/CLAUDE.md: warm surfaces, one type voice, whitespace does the
   work, the only gradient is an SVG area fill fading to transparent. */

/* ── Live tracker card ─────────────────────────────────────────────── */

.bt-card {
  margin: var(--sp-6) 0;
  padding: var(--sp-5) var(--sp-5) var(--sp-4);
  background: var(--c-bg-raised);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
}

.bt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-bottom: var(--sp-4);
}

.bt-title {
  font-family: var(--ff-product);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--c-text);
  line-height: 1.2;
}

.bt-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  flex: none;
  padding: 0.2rem var(--sp-3);
  border-radius: var(--r-pill);
  background: var(--c-green-soft);
  color: var(--c-green);
  font-family: var(--ff-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.bt-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.bt-grid line {
  stroke: var(--c-border-subtle);
  stroke-width: 1;
  stroke-dasharray: 2 4;
}

.bt-axis text {
  font-family: var(--ff-mono);
  font-size: 10px;
  fill: var(--c-text-tertiary);
}

.bt-point-label {
  font-family: var(--ff-mono);
  font-size: 12px;
  font-weight: 600;
}

.bt-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-5);
  margin-top: var(--sp-4);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--c-border-subtle);
}

.bt-legend-item {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--ff-product);
  font-size: 0.9rem;
  color: var(--c-text-secondary);
}

.bt-swatch {
  width: 12px;
  height: 12px;
  border-radius: var(--r-sm);
  display: inline-block;
}

.bt-note {
  font-family: var(--ff-product);
  font-size: 0.85rem;
  color: var(--c-text-tertiary);
  margin: var(--sp-3) 0 0;
}

.bt-card--loading,
.bt-card--empty {
  font-family: var(--ff-product);
  font-size: 0.9rem;
  color: var(--c-text-tertiary);
  padding: var(--sp-8) var(--sp-4);
  text-align: center;
}

/* ── Static source bar chart ───────────────────────────────────────── */
/* For baked distributions (top sources per brand). Markup:
   <div class="src-chart">
     <div class="src-row" style="--pct:100%">
       <span class="src-label">Reddit</span>
       <span class="src-track"><span class="src-fill src-fill--accent"></span></span>
       <span class="src-val">63</span>
     </div> … </div>                                                       */

.src-chart {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin-top: var(--sp-4);
}

.src-row {
  display: grid;
  grid-template-columns: 7.5rem 1fr 2rem;
  align-items: center;
  gap: var(--sp-3);
}

.src-label {
  font-family: var(--ff-product);
  font-size: 0.85rem;
  color: var(--c-text-secondary);
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.src-track {
  height: 0.6rem;
  background: var(--c-bg-sunken);
  border-radius: var(--r-pill);
  overflow: hidden;
}

.src-fill {
  display: block;
  height: 100%;
  width: var(--pct, 0%);
  border-radius: var(--r-pill);
  transition: width 600ms cubic-bezier(0.22, 1, 0.36, 1);
}

.src-fill--accent { background: var(--c-accent); }
.src-fill--blue   { background: var(--c-blue); }

.src-val {
  font-family: var(--ff-mono);
  font-size: 0.8rem;
  color: var(--c-text-tertiary);
  text-align: left;
}
