/* ═══ Informe de audiencia (/anunciate/) ═══════════════════════
   Bloque autocontenido: todo cuelga de .aud para no tocar main.css.
   Gráficos en CSS puro (sin librerías). Paleta validada para daltonismo:
   naranja #F06A1A · azul #2a78d6 · verde #1baf7a. El texto nunca lleva
   el color de la serie: la identidad la da la marca de color de al lado. */
.aud {
  --aud-s1: #F06A1A;
  --aud-s2: #2a78d6;
  --aud-s3: #1baf7a;
  --aud-ink: #212121;
  --aud-ink2: #555;
  --aud-mute: #767676;
  --aud-line: #e6e6e6;
  --aud-soft: #faf7f4;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
  font-family: var(--font-body);
  color: var(--aud-ink);
}
.aud *, .aud *::before, .aud *::after { box-sizing: border-box; }

/* ── Cabecera del informe ── */
.aud-head {
  margin: 36px 0 0;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d1200 55%, #1a1a1a 100%);
  color: #fff;
  border-radius: 18px;
  padding: 34px 32px 30px;
  position: relative;
  overflow: hidden;
}
.aud-head::after {
  content: '';
  position: absolute;
  right: -90px; top: -90px;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,102,0,.35), rgba(255,102,0,0) 70%);
  pointer-events: none;
}
.aud-eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 11px; font-weight: 800;
  letter-spacing: .14em; text-transform: uppercase;
  background: linear-gradient(90deg, #e63d32, #FF6600);
  color: #fff; padding: 4px 14px; border-radius: 99px;
}
.aud-head h2 {
  font-family: var(--font-display);
  font-size: clamp(26px, 4.4vw, 40px);
  font-weight: 800; line-height: 1.1;
  margin: 14px 0 8px; color: #fff;
}
.aud-head h2 span { color: #FF8800; }
.aud-head-sub { font-size: 15px; color: rgba(255,255,255,.78); line-height: 1.5; max-width: 760px; }
.aud-credit { margin-top: 10px; font-size: 13px; color: rgba(255,255,255,.62); }
.aud-credit a { color: #FFB066; text-decoration: underline; text-underline-offset: 2px; }
/* Sello de certificación de Audiencia de Medios (2026-10-10) */
.aud-cert { display: inline-flex; align-items: center; gap: 12px; margin: 16px 0 4px; padding: 12px 18px; border: 1px solid rgba(255,255,255,.18); border-radius: 12px; background: rgba(255,255,255,.06); color: #fff; text-decoration: none; max-width: 100%; transition: background .2s, border-color .2s; }
.aud-cert:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.35); }
.aud-cert-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #FFB066; color: #1a1a1a; flex: none; }
.aud-cert-text { display: flex; flex-direction: column; gap: 2px; line-height: 1.3; text-align: left; }
.aud-cert-text b { font-size: 15px; }
.aud-cert-text span { font-size: 12.5px; opacity: .8; }
@media (max-width: 520px) { .aud-cert { align-items: flex-start; } .aud-cert-text b { font-size: 14px; } }

.aud-hero-kpis {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 2px; margin-top: 26px;
  background: rgba(255,255,255,.12);
  border-radius: 14px; overflow: hidden;
  position: relative; z-index: 1;
}
.aud-hero-kpi { background: #1f1410; padding: 18px 18px 16px; }
.aud-hero-kpi b {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(26px, 3.6vw, 38px);
  font-weight: 800; line-height: 1; color: #fff;
}
.aud-hero-kpi span { display: block; margin-top: 6px; font-size: 13px; color: rgba(255,255,255,.72); line-height: 1.35; }

/* ── Navegación interna ── */
.aud-nav {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 18px 0 0;
}
.aud-nav a {
  font-family: var(--font-display);
  font-size: 13px; font-weight: 700;
  padding: 7px 14px; border-radius: 99px;
  border: 1px solid var(--aud-line);
  color: var(--aud-ink2); background: #fff;
  transition: border-color .15s, color .15s;
}
.aud-nav a:hover { border-color: var(--aud-s1); color: var(--aud-ink); }

/* ── Secciones ── */
.aud-sec { margin-top: 44px; scroll-margin-top: 80px; }
.aud-sec-tag {
  font-family: var(--font-display);
  font-size: 12px; font-weight: 800;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--aud-mute);
  display: flex; align-items: center; gap: 8px;
}
.aud-sec-tag::before { content: ''; width: 22px; height: 3px; border-radius: 2px; background: var(--aud-s1); }
.aud-sec h3 {
  font-family: var(--font-display);
  font-size: clamp(22px, 3.2vw, 30px);
  font-weight: 800; margin: 6px 0 8px; line-height: 1.15;
}
.aud-lead { font-size: 15.5px; line-height: 1.6; color: var(--aud-ink2); max-width: 820px; }

/* ── Tarjetas de cifras (stat tiles) ── */
.aud-tiles { display: grid; gap: 14px; margin-top: 20px; }
.aud-tiles-3 { grid-template-columns: repeat(3, 1fr); }
.aud-tiles-6 { grid-template-columns: repeat(3, 1fr); }
.aud-tile {
  background: #fff;
  border: 1px solid var(--aud-line);
  border-radius: 14px;
  padding: 18px 18px 16px;
}
.aud-tile b {
  display: block;
  font-family: var(--font-display);
  font-size: 30px; font-weight: 800; line-height: 1;
  color: var(--aud-ink);
}
.aud-tile em { display: block; font-style: normal; font-weight: 700; font-size: 14px; margin-top: 8px; color: var(--aud-ink); }
.aud-tile span { display: block; font-size: 13px; color: var(--aud-mute); margin-top: 3px; line-height: 1.4; }
.aud-tile--accent { background: var(--aud-soft); border-color: #f3dcc9; }
.aud-tile--accent b { font-size: 36px; }

/* ── Claves ── */
.aud-keys { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 20px; }
.aud-key {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--aud-soft);
  border-radius: 14px; padding: 16px 18px;
  font-size: 14.5px; line-height: 1.55; color: var(--aud-ink2);
}
.aud-key i {
  flex: 0 0 28px; height: 28px; border-radius: 50%;
  background: var(--aud-s1); color: #fff;
  font-style: normal; font-family: var(--font-display);
  font-weight: 800; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.aud-key strong { color: var(--aud-ink); }

/* ── Tarjeta de gráfico ── */
.aud-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 20px; }
.aud-card {
  background: #fff;
  border: 1px solid var(--aud-line);
  border-radius: 16px;
  padding: 20px 20px 18px;
  min-width: 0;
}
.aud-card h4 { font-family: var(--font-display); font-size: 17px; font-weight: 800; margin: 0; }
.aud-card-sub { font-size: 13px; color: var(--aud-mute); margin-top: 3px; line-height: 1.45; }
.aud-note { font-size: 12.5px; color: var(--aud-mute); line-height: 1.5; margin-top: 12px; }

/* ── Barras horizontales (una sola serie, valor en la punta) ── */
.aud-bars { margin-top: 16px; display: grid; gap: 12px; }
.aud-bar { display: grid; grid-template-columns: minmax(84px, 30%) 1fr; gap: 10px; align-items: center; }
.aud-bar-label { font-size: 13.5px; color: var(--aud-ink2); line-height: 1.25; }
.aud-bar-label small { display: block; font-size: 11.5px; color: var(--aud-mute); }
.aud-bar-track { display: flex; align-items: center; gap: 8px; min-width: 0; }
.aud-bar-fill {
  height: 18px; min-width: 3px;
  /* se reserva sitio fijo para la etiqueta; el largo sigue siendo proporcional */
  width: calc((100% - 96px) * var(--v) / 100);
  background: var(--aud-s1);
  border-radius: 0 4px 4px 0;
  transition: filter .15s;
}
.aud-bar:hover .aud-bar-fill { filter: brightness(.9); }
.aud-bar-val { font-size: 13.5px; font-weight: 700; color: var(--aud-ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.aud-bar-val small { font-weight: 400; color: var(--aud-mute); }
.aud-bars--s2 .aud-bar-fill { background: var(--aud-s2); }

/* ── Barra apilada (parte de un todo) con huecos de 2px ── */
.aud-stack { display: flex; gap: 2px; height: 24px; margin-top: 16px; border-radius: 4px; overflow: hidden; }
.aud-stack > span { flex: 0 0 calc(var(--v) * 1% - 2px); min-width: 3px; transition: filter .15s; }
.aud-stack > span:hover { filter: brightness(.9); }
.aud-c1 { background: var(--aud-s1); }
.aud-c2 { background: var(--aud-s2); }
.aud-c3 { background: var(--aud-s3); }
.aud-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 12px; }
.aud-legend li { display: flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--aud-ink2); }
.aud-legend li::before { content: ''; width: 10px; height: 10px; border-radius: 3px; background: var(--k); }
.aud-legend b { color: var(--aud-ink); font-variant-numeric: tabular-nums; }

/* ── Columnas (evolución mensual) ── */
.aud-cols {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  gap: 10px; align-items: end;
  height: 190px; margin-top: 18px;
  border-bottom: 1px solid var(--aud-line);
}
.aud-col { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; min-width: 0; }
.aud-col-val { font-size: 13px; font-weight: 700; color: var(--aud-ink); margin-bottom: 5px; font-variant-numeric: tabular-nums; }
.aud-col-fill {
  width: 100%; max-width: 24px;
  height: calc((100% - 26px) * var(--v) / 100);
  min-height: 3px;
  background: var(--aud-s1);
  border-radius: 4px 4px 0 0;
  transition: filter .15s;
}
.aud-col:hover .aud-col-fill { filter: brightness(.9); }
.aud-col--parcial .aud-col-fill { background: #f6b58c; }
.aud-cols--s2 .aud-col-fill { background: var(--aud-s2); }
.aud-cols--s2 .aud-col--parcial .aud-col-fill { background: #9ec5f4; }
.aud-cols-x { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 10px; margin-top: 7px; }
.aud-cols-x span { text-align: center; font-size: 12.5px; color: var(--aud-ink2); line-height: 1.25; }
.aud-cols-x small { display: block; font-size: 11px; color: var(--aud-mute); }

/* ── Tablas ── */
.aud-table-wrap { overflow-x: auto; margin-top: 18px; border: 1px solid var(--aud-line); border-radius: 14px; background: #fff; }
.aud-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
.aud-table th {
  text-align: left; font-family: var(--font-display);
  font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: var(--aud-mute); padding: 12px 14px; background: #fafafa;
  border-bottom: 1px solid var(--aud-line); white-space: nowrap;
}
.aud-table td { padding: 12px 14px; border-bottom: 1px solid #f0f0f0; vertical-align: top; color: var(--aud-ink2); }
.aud-table tr:last-child td { border-bottom: 0; }
.aud-table td.num, .aud-table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.aud-table td strong { color: var(--aud-ink); }
.aud-table td small { display: block; font-size: 12px; color: var(--aud-mute); }
.aud-table tr.total td { background: var(--aud-soft); font-weight: 700; color: var(--aud-ink); }
.aud-table--compact { min-width: 0; }

/* ── Metodología ── */
.aud-method { margin-top: 20px; display: grid; gap: 10px; }
.aud-method details { border: 1px solid var(--aud-line); border-radius: 12px; background: #fff; }
.aud-method summary {
  cursor: pointer; list-style: none;
  padding: 14px 18px;
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.aud-method summary::-webkit-details-marker { display: none; }
.aud-method summary::after { content: '+'; font-size: 20px; color: var(--aud-s1); font-weight: 800; }
.aud-method details[open] summary::after { content: '–'; }
.aud-method details > div { padding: 0 18px 16px; font-size: 14px; line-height: 1.6; color: var(--aud-ink2); }
.aud-method details ul { list-style: disc; padding-left: 18px; display: grid; gap: 6px; }
.aud-method a { color: #c24e00; text-decoration: underline; text-underline-offset: 2px; }

/* ── CTA ── */
.aud-cta {
  margin-top: 40px; text-align: center;
  background: var(--aud-soft); border: 1px solid #f3dcc9;
  border-radius: 18px; padding: 28px 22px;
}
.aud-cta h3 { font-family: var(--font-display); font-size: 22px; font-weight: 800; margin: 0 0 6px; }
.aud-cta p { font-size: 15px; color: var(--aud-ink2); margin-bottom: 16px; }
.aud-foot { margin-top: 14px; font-size: 12px; color: var(--aud-mute); text-align: center; line-height: 1.5; }

/* ── Móvil ── */
@media (max-width: 860px) {
  .aud-grid-2, .aud-keys { grid-template-columns: 1fr; }
  .aud-tiles-3, .aud-tiles-6 { grid-template-columns: repeat(2, 1fr); }
  .aud-hero-kpis { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .aud { padding: 0 16px; }
  .aud-head { padding: 26px 20px 22px; border-radius: 14px; }
  .aud-tile b { font-size: 25px; }
  .aud-tile--accent b { font-size: 29px; }
  .aud-card { padding: 16px 14px 14px; }
  .aud-bar { grid-template-columns: 1fr; gap: 4px; }
  .aud-cols { gap: 6px; }
  .aud-table--compact th, .aud-table--compact td { padding: 10px 8px; }
  .aud-table--compact th { font-size: 10.5px; letter-spacing: .04em; }
  .aud-table--compact { font-size: 13px; }
  .aud-col-val { font-size: 11.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .aud * { transition: none !important; }
}
@media print {
  .aud-nav, .aud-cta { display: none; }
  .aud-head { background: #fff; color: #000; border: 1px solid #ccc; }
  .aud-head h2, .aud-hero-kpi b { color: #000; }
}

/* Dato actualizado automáticamente (Search Console, cron diario) */
.aud-live { display: inline-block; margin-top: 6px; font-size: 12.5px; color: #FFB066; }
