/* Hub audience board — Facebook and YouTube follower graphs that sit under the
   traffic board. Same instrument-panel treatment as .traffic-panel; the only
   difference is the platform colour, exposed as --p per panel. */

.hub-audience {
  padding: 0 0 16px;
  background: #f2ece2;
}

.audience-notice { margin: 0 0 12px; }

.audience-grid {
  display: grid;
  grid-template-columns: 1fr;
  /* Matches the traffic graph → Facebook gap (52px) so the three stacked
     graphs read as evenly spaced. */
  gap: 52px;
}

.audience-panel {
  --p: #ff4d2e;
  margin: 0;
  padding: 15px 18px 12px;
  background: #171310;
  border: 1px solid #171310;
  border-top: 3px solid var(--p);
  border-radius: 2px;
  color: #f2ece2;
}

.audience-panel.is-facebook { --p: #3b82f6; }
.audience-panel.is-youtube { --p: #ff3b30; }

.hub-audience.is-loading .audience-panel { opacity: .55; transition: opacity .12s ease; }

.audience-swatch {
  display: inline-block;
  width: 12px;
  height: 3px;
  border-radius: 2px;
  background: var(--p);
}

.audience-line {
  stroke: var(--p);
  stroke-width: 2.6;
}

.audience-svg stop { stop-color: var(--p); }

.audience-panel.is-facebook .traffic-area { fill: url(#audienceFill-facebook); }
.audience-panel.is-youtube .traffic-area { fill: url(#audienceFill-youtube); }

.audience-end {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--p);
  border: 2px solid #171310;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.audience-marker {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--p);
  border: 2px solid #171310;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.audience-panel .traffic-yaxis span { color: #8d8278; }

/* Three shorter charts on one screen: the follower graphs keep a lower band. */
.audience-panel .traffic-yaxis { min-height: 130px; }
.audience-panel .traffic-plot { height: 150px; }

.audience-caption {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 9px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .04em;
  color: #9c9186;
}

.audience-caption b {
  color: #f2ece2;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.audience-caption [data-change] { color: var(--p); }

/* Per-channel split behind the combined subscriber line. */
.audience-split {
  color: #8d8278;
  white-space: nowrap;
}

/* Websites online: one cumulative step line below the two audience graphs. */
.audience-sites {
  --p: #d9b45b;
  margin-top: 52px;
}

.audience-swatch--sites { background: #d9b45b; }

.audience-sites__chart .echart-sites {
  height: 180px;
  min-height: 180px;
}

.audience-sites + .audience-stats { margin-top: 52px; }

.audience-sites .chart-tip-dot.is-sites { background: #d9b45b; }

.audience-sites .chart-tip-list {
  display: grid;
  gap: 2px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid #e7dccd;
}

.audience-sites .chart-tip-name {
  font-size: 11px;
  color: #4c443c;
}

@media (max-width: 720px) {
  .hub-audience { padding-bottom: 8px; }
  .audience-panel { padding: 13px 12px 10px; }
  .audience-panel .traffic-yaxis { min-height: 115px; }
  .audience-panel .traffic-plot { height: 130px; }
  .audience-sites { margin-top: 32px; }
  .audience-sites + .audience-stats { margin-top: 32px; }
  .audience-sites__chart .echart-sites { height: 150px; min-height: 150px; }
}

/* YouTube growth: four numbers in the same 52px rhythm as the graphs above. */
.audience-stats {
  margin: 0;
  border: 1px solid #171310;
  background: #fffaf1;
}
.audience-stats__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid #d6cbbc;
}
.audience-stats__title,
.audience-stats__range {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #6b625b;
}
.audience-stats__range { color: #171310; }
.audience-stats__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.audience-stat {
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 20px 18px 18px;
  border-left: 1px solid #e7dccd;
}
.audience-stat:first-child { border-left: 0; }
.audience-stat__label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #6b625b;
}
.audience-stat__value {
  font-family: var(--font-display);
  font-size: clamp(26px, 2.8vw, 38px);
  line-height: 1;
  letter-spacing: -.04em;
  color: #171310;
  font-variant-numeric: tabular-nums;
}
.audience-stat--up .audience-stat__value { color: #2f6b47; }
.audience-stat--down .audience-stat__value { color: #b3300f; }
.audience-stat__note {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #7a6f66;
}
@media (max-width: 700px) {
  .audience-stats__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .audience-stat:nth-child(3) { border-left: 0; }
  .audience-stat:nth-child(n+3) { border-top: 1px solid #e7dccd; }
}
