/* Digital Audience widget v2 — AVDS-aligned tokens (no AVDS CSS needed). */
.avds-digital-audience{
  display:flex; flex-direction:column; gap:14px;
  padding:18px; margin:18px 0;
  border:1px solid #e5e7eb; border-radius:10px; background:#fafafa;
  font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,sans-serif;
  color:#111;
}
.avds-digital-audience__head .avds-page-header__title{
  margin:0; font-size:16px; font-weight:700; letter-spacing:-0.005em;
}
.avds-digital-audience__kpis{
  display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:10px;
}
.avds-kpi{
  display:flex; flex-direction:column; gap:4px;
  padding:12px 14px; border:1px solid #e5e7eb; border-radius:8px; background:#fff;
}
.avds-kpi__label{ font-size:11px; font-weight:600; letter-spacing:0.04em; text-transform:uppercase; color:#6b7280; }
.avds-kpi__value{ font-size:20px; font-weight:700; font-variant-numeric:tabular-nums; color:#111; }
.avds-source-badge{
  display:inline-block; align-self:flex-start; margin-top:4px;
  padding:2px 8px; border-radius:999px; background:#eef2ff; color:#3730a3;
  font-size:11px; font-weight:600;
}

.avds-digital-audience__platforms{ display:flex; flex-direction:column; gap:8px; }
.avds-comparison-bar-row{
  display:grid; grid-template-columns:minmax(160px,220px) 1fr 100px;
  align-items:center; gap:14px; padding:8px 12px;
  background:rgba(243,244,246,.5); border:1px solid #e5e7eb; border-radius:6px;
}
.avds-comparison-bar-row.is-focus{ border-color:#fca5a5; background:rgba(254,226,226,.4); }
.avds-comparison-bar-row__label{ font-size:14px; font-weight:700; color:#111; }
.avds-comparison-bar-row__track{ position:relative; height:10px; background:#e5e7eb; border-radius:4px; overflow:hidden; }
.avds-comparison-bar-row__fill{ height:100%; background:#4f46e5; border-radius:4px; transition:width .9s cubic-bezier(.2,.7,.2,1); }
.avds-comparison-bar-row__value{ text-align:right; font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:14px; font-weight:600; }

.avds-range-bar{
  display:grid; grid-template-columns:minmax(180px,260px) 1fr 120px;
  align-items:center; gap:14px; padding:8px 12px;
  background:rgba(243,244,246,.5); border:1px solid #e5e7eb; border-radius:6px;
}
.avds-range-bar.is-conflict{ background:rgba(254,243,199,.4); border-color:#fcd34d; }
.avds-range-bar__head{ display:flex; flex-direction:column; gap:2px; }
.avds-range-bar__label{ font-size:14px; font-weight:700; color:#111; }
.avds-range-bar__flag{ font-size:10.5px; font-weight:600; letter-spacing:0.04em; text-transform:uppercase; color:#92400e; }
.avds-range-bar__track{ position:relative; height:10px; background:#e5e7eb; border-radius:4px; overflow:hidden; }
.avds-range-bar__fill{ position:absolute; top:0; bottom:0; background:#d97706; border-radius:4px; transition:left .9s, width .9s; }
.avds-range-bar:not(.is-conflict) .avds-range-bar__fill{ background:#4f46e5; }
.avds-range-bar__hint{ text-align:right; font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:14px; font-weight:600; }

.avds-digital-audience__foot, .da-foot{
  margin-top:6px; font-size:12px; color:#6b7280;
}
.avds-digital-audience__foot code, .da-foot code{ background:#eef2ff; color:#3730a3; padding:1px 6px; border-radius:3px; font-size:11.5px; }

/* Legacy v1 fallback styles — keep working if v1 widget still in cache. */
.da-section{margin:24px 0;padding:16px;border:1px solid #e5e7eb;border-radius:8px;background:#fafafa}
.da-section h2{font-size:16px;margin:0 0 8px 0;color:#111}
.da-list{list-style:none;padding:0;margin:0}
.da-list li{padding:6px 0;border-bottom:1px dashed #e5e7eb;font-size:14px}
.da-list li:last-child{border-bottom:0}
.da-badge{display:inline-block;margin-left:6px;padding:1px 6px;border-radius:3px;font-size:11px;vertical-align:middle}
.da-badge.warn{background:#fff3cd;color:#8a6d3b;border:1px solid #ffeeba}
.da-badge.alert{background:#fef8d7d;color:#721c24;border:1px solid #f5c6cb}
