/* analytics.php — humanity countdown, distribution bar, chart */

/* Humanity countdown */
.humanity-box {
  background: linear-gradient(160deg, var(--gold-soft), var(--bg2) 55%);
  border: 1px solid var(--gold-line);
  border-radius: var(--r-xl);
  padding: 48px 32px;
  text-align: center;
}
.humanity-title { color: var(--gold); margin-bottom: 8px; }
.humanity-subtitle { color: var(--muted); font-size: 15px; max-width: 640px; margin: 0 auto 32px; }
.humanity-grid { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.cd-unit {
  background: var(--bg0); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 16px 14px; min-width: 78px; text-align: center;
}
.cd-unit .cd-val { font-size: clamp(24px, 4vw, 34px); font-weight: 700; color: var(--gold); font-variant-numeric: tabular-nums; }
.cd-unit .cd-lbl { font-size: 10px; color: var(--faint); text-transform: uppercase; letter-spacing: 1px; margin-top: 4px; }
.humanity-note { color: var(--faint); font-size: 12px; margin-top: 16px; }

/* Promise cards */
.p-val { font-size: 32px; font-weight: 700; color: var(--gold); }
.p-lbl { font-size: 13px; color: var(--muted); margin-top: 4px; }
.p-note { font-size: 11px; color: var(--faint); margin-top: 8px; line-height: 1.4; }

/* KX distribution */
.dist-legend-head { font-size: 10px; font-weight: 700; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 8px; }
.dist-legend-head.gold { color: var(--gold); }
.dist-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 11px; color: var(--faint); }
.dist-legend .sw { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-inline-end: 4px; vertical-align: middle; }
.sw-a { background: #5a6a8a; }
.sw-b { background: #4a5a7a; }
.sw-c { background: #3a4a6a; }
.cbar { display: flex; height: 24px; border-radius: 6px; overflow: hidden; border: 1px solid var(--border); }
.cbar-seg { min-width: 0; transition: width .5s; }
.cbar-seg.tl { background: #FFD700; }
.cbar-seg.em { background: #B8860B; }
.cbar-seg.sp { background: #2a2a3e; flex: 1; }
.cbar-labels { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 11px; color: var(--faint); margin-top: 6px; }
.cbar-empty { text-align: center; padding: 12px; font-size: 13px; color: var(--faint); background: var(--bg3); border-radius: 6px; border: 1px solid var(--border); }

/* Chart */
.chart-wrap { position: relative; height: 300px; }

/* Market placeholder */
.placeholder-chart {
  height: 180px;
  background:
    repeating-linear-gradient(90deg, rgba(212,168,75,.04) 0 1px, transparent 1px 40px),
    repeating-linear-gradient(0deg, rgba(212,168,75,.04) 0 1px, transparent 1px 40px);
  border: 1px dashed var(--border); border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  color: var(--faint); font-size: 14px;
}
