/* ── DETALLE DE PLATAFORMA: Segmentación y Medición ─────────────────────────
   Capítulos de la página Plataforma. Usan las piezas de inside.css (portada,
   filas con raya, marcos del panel, FAQ, cierre) y añaden solo tres:
   · el corte que llega al bidder y se comprueba, línea a línea (segmentación);
   · la «pantalla encendida» de la campaña con sus cuatro cifras (medición);
   · la leyenda Medido · Reportado · Estimado.
   Sin sombras nuevas: se separa con superficie, raya o espacio.
   ──────────────────────────────────────────────────────────────────────── */

.in-btn-line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
@media (hover: hover) { .in-btn-line:hover { box-shadow: inset 0 0 0 1px var(--ink); } }

.dt-kicker a { color: inherit; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 0.22em; }
.dt-kicker a:hover { color: var(--ink); }

/* ── Pregunta grande a la izquierda, respuesta a la derecha ── */
.dt-q { padding-block: clamp(72px, 9vw, 136px); }
.dt-q + .dt-q { padding-top: 0; }
.dt-q-grid { display: grid; gap: 20px clamp(40px, 6vw, 96px); padding-top: clamp(28px, 3vw, 40px); border-top: 1px solid var(--line-2); }
@media (min-width: 1024px) { .dt-q-grid { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); } }
.dt-q h2 { font: 500 clamp(1.875rem, 1.2rem + 2.2vw, 3.25rem)/1.03 var(--display); letter-spacing: -0.014em; color: var(--ink); text-wrap: balance; max-width: 16ch; }
.dt-q .in-lede { max-width: 46ch; }
.dt-q p + p { margin-top: 16px; }
.dt-q .dt-body { font-size: 1.0625rem; line-height: 1.65; color: var(--ink-2); max-width: 52ch; text-wrap: pretty; }
.dt-q .dt-body a, .pf-mode .dt-body a, .dt-fine a { color: inherit; text-decoration: underline; text-decoration-color: rgba(10, 10, 10, 0.3); text-underline-offset: 0.22em; }
.dt-q .in-rows { margin-top: 24px; }
.dt-q .in-rows li { grid-template-columns: 1fr; }
.dt-q .in-rows strong { font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem); }

.pf-mode .dt-body { margin-top: 16px; font-size: 0.9375rem; line-height: 1.6; color: var(--mute-text); max-width: 46ch; }
.pf-mode.is-dark .dt-body { color: var(--n-t3); }
.pf-mode.is-dark .dt-body a { color: var(--n-t1); text-decoration-color: var(--n-line); }
.pf-mode code, .dt-q code, .faq-item code { font: 500 0.875em/1 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: nowrap; }
.dt-fine { margin-top: 20px; font-size: 0.9375rem; line-height: 1.6; color: var(--mute-text); max-width: 60ch; }

/* ════════════════════════════════════════════════════════════════════════
   SEGMENTACIÓN · el corte que llega al bidder
   Un panel de noche: a la izquierda qué pasa; a la derecha la petición de
   anuncio, línea a línea, y cada regla de la campaña que la deja pasar.
   ════════════════════════════════════════════════════════════════════════ */
.dt-night {
  border-radius: var(--r-xl);
  background: var(--night);
  color: var(--n-t1);
  padding: clamp(32px, 5vw, 72px) clamp(20px, 4.4vw, 64px);
}
.dt-night .in-display { color: #fff; }
.dt-night .in-lede { color: var(--n-t2); }
.dt-night .in-kicker { color: #8fb0ff; }
.dt-night .dt-fine { color: var(--n-t3); }
.dt-night .dt-fine a { color: var(--n-t1); text-decoration-color: var(--n-line); }
.dt-night-grid { display: grid; gap: clamp(36px, 5vw, 72px); }
@media (min-width: 1024px) { .dt-night-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; } }
.dt-night .in-display { font-size: clamp(2rem, 1.2rem + 2.8vw, 3.75rem); margin-top: 12px; }
.dt-night .in-lede { margin-top: 20px; }

.dt-req { border-radius: var(--r-md); background: rgba(255, 255, 255, 0.04); box-shadow: inset 0 0 0 1px var(--n-line); overflow: hidden; }
.dt-req-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--n-line); font-size: 0.875rem; font-weight: 600; color: var(--n-t2); }
.dt-req-bar span:last-child { padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); font-size: 0.75rem; color: var(--n-t3); }
.dt-req ol { list-style: none; }
.dt-req li {
  display: grid; grid-template-columns: minmax(0, 9fr) minmax(0, 10fr) 20px; align-items: center; gap: 12px;
  padding: 11px 20px; border-bottom: 1px solid var(--n-line);
  font-size: 0.9375rem; line-height: 1.35;
}
.dt-req li:last-child { border-bottom: 0; }
.dt-req .k { color: var(--n-t3); }
.dt-req .v { color: var(--n-t1); font-variant-numeric: tabular-nums; }
.dt-req .ok { width: 18px; height: 18px; color: #8fb0ff; }
.dt-req li.is-gate { background: rgba(255, 255, 255, 0.025); }
.dt-req li.is-first { border-top: 1px solid rgba(255, 255, 255, 0.24); }
.dt-req li.is-bid { grid-template-columns: 1fr; padding: 16px 20px; background: rgba(43, 95, 217, 0.22); color: #fff; font-weight: 600; }
.dt-req li.is-bid small { display: block; margin-top: 2px; font-weight: 400; color: var(--n-t2); }
/* Las líneas se comprueban una detrás de otra, una sola vez. */
html.js .dt-req li { opacity: 0.28; transition: opacity 0.5s var(--ease-out); transition-delay: calc(var(--i) * 110ms + 250ms); }
html.js .dt-req li .ok { opacity: 0; transform: scale(0.6); transition: opacity 0.35s var(--ease-out), transform 0.45s var(--ease-out); transition-delay: inherit; }
html.js .dt-req.is-in li { opacity: 1; }
html.js .dt-req.is-in li .ok { opacity: 1; transform: none; }
@media (max-width: 599px) {
  .dt-req li { grid-template-columns: minmax(0, 1fr) 20px; gap: 2px 12px; }
  .dt-req .k { grid-column: 1; font-size: 0.8125rem; }
  .dt-req .v { grid-column: 1; }
  .dt-req .ok { grid-column: 2; grid-row: 1 / span 2; }
}

/* ════════════════════════════════════════════════════════════════════════
   MEDICIÓN · la pantalla encendida
   La campaña en emisión, como en el panel: cuatro cifras que son también
   las pestañas de la gráfica. Sin números: es un ejemplo de forma.
   ════════════════════════════════════════════════════════════════════════ */
.dt-screen {
  border-radius: var(--r-lg);
  background: var(--night);
  color: var(--n-t1);
  padding: 8px;
}
.dt-screen-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px 16px; }
.dt-screen-bar b { font-weight: 600; font-size: 0.9375rem; }
.dt-screen-bar span { padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); font-size: 0.75rem; font-weight: 600; color: var(--n-t3); }
.dt-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.dt-tab {
  appearance: none; border: 0; cursor: pointer; text-align: left;
  padding: 14px 14px 16px; border-radius: 14px;
  background: transparent; color: var(--n-t3);
  font: 600 0.875rem/1.25 var(--text);
  transition: background-color 0.3s ease, color 0.3s ease;
}
.dt-tab small { display: block; margin-top: 6px; font-weight: 500; font-size: 0.75rem; color: var(--n-mute); }
.dt-tab[aria-selected="true"] { background: rgba(255, 255, 255, 0.07); color: #fff; }
@media (hover: hover) { .dt-tab:hover { color: var(--n-t1); } }
.dt-tab:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.dt-plots { position: relative; margin-top: 8px; border-radius: 16px; background: rgba(255, 255, 255, 0.035); padding: 22px 18px 16px; }
.dt-plot { display: none; }
.dt-plot.is-on { display: block; }
html:not(.js) .dt-plot { display: block; }
html:not(.js) .dt-plot + .dt-plot { margin-top: 24px; }
.dt-bars { display: grid; grid-template-columns: repeat(var(--n, 20), 1fr); align-items: end; gap: 4px; height: clamp(150px, 15vw, 190px); border-bottom: 1px solid var(--n-line); }
.dt-bars i { display: block; height: var(--h); border-radius: 3px 3px 0 0; background: linear-gradient(to top, #2b5fd9, #7aa0ff); transform-origin: 50% 100%; }
.dt-bars i.est { background: repeating-linear-gradient(135deg, rgba(122, 160, 255, 0.55) 0 3px, transparent 3px 6px); box-shadow: inset 0 0 0 1px rgba(122, 160, 255, 0.5); }
.dt-bars i.pre { background: rgba(255, 255, 255, 0.16); }
.dt-plot.is-on .dt-bars i { animation: pf-rise 0.7s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 18ms); }
.dt-axis { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; font-size: 0.75rem; color: var(--n-mute); }
.dt-key { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 14px; font-size: 0.8125rem; color: var(--n-t2); }
.dt-key span { display: inline-flex; align-items: center; gap: 8px; }
.dt-key span::before { content: ''; width: 12px; height: 12px; border-radius: 3px; background: linear-gradient(to top, #2b5fd9, #7aa0ff); }
.dt-key span.est::before { background: repeating-linear-gradient(135deg, rgba(122, 160, 255, 0.55) 0 2px, transparent 2px 4px); box-shadow: inset 0 0 0 1px rgba(122, 160, 255, 0.5); }
.dt-key span.pre::before { background: rgba(255, 255, 255, 0.16); }
@media (max-width: 599px) {
  .dt-tab { padding: 10px 8px 12px; font-size: 0.75rem; }
  .dt-tab small { font-size: 0.6875rem; }
  .dt-bars { gap: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  .dt-plot.is-on .dt-bars i { animation: none; }
  html.js .dt-req li, html.js .dt-req li .ok { transition: none; }
}

/* ════════════════════════════════════════════════════════════════════════
   MEDICIÓN · Medido · Reportado · Estimado
   ════════════════════════════════════════════════════════════════════════ */
.dt-legend { list-style: none; display: grid; gap: 0 clamp(24px, 3vw, 48px); margin-top: clamp(40px, 5vw, 64px); }
@media (min-width: 900px) { .dt-legend { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.dt-legend li { padding: 24px 0 28px; border-top: 1px solid var(--line-2); }
.dt-legend .dt-swatch { display: grid; grid-template-columns: repeat(8, 1fr); align-items: end; gap: 4px; height: 56px; }
.dt-legend .dt-swatch i { display: block; height: var(--h); border-radius: 3px 3px 0 0; background: linear-gradient(to top, #2b5fd9, #7aa0ff); }
.dt-legend .is-rep .dt-swatch i { background: transparent; box-shadow: inset 0 0 0 1.5px #2b5fd9; }
.dt-legend .is-est .dt-swatch i { background: repeating-linear-gradient(135deg, rgba(43, 95, 217, 0.5) 0 3px, transparent 3px 6px); box-shadow: inset 0 0 0 1px rgba(43, 95, 217, 0.45); }
.dt-legend h3 { margin-top: 22px; font: 500 clamp(1.5rem, 1.2rem + 0.9vw, 2rem)/1.05 var(--display); letter-spacing: -0.012em; color: var(--ink); }
.dt-legend p { margin-top: 10px; font-size: 1.0625rem; line-height: 1.6; color: var(--ink-2); max-width: 36ch; }

/* Mini antes y después (visitas a la web) dentro de un bloque oscuro. */
.pf-mode .dt-bars { margin-top: 24px; height: 120px; --n: 28; gap: 3px; }
.pf-mode .dt-bars i { animation: none; }
.pf-mode .dt-key { margin-top: 12px; }
.pf-mode:not(.is-dark) .dt-key { color: var(--ink-2); }
.pf-mode:not(.is-dark) .dt-bars { border-bottom-color: var(--line-2); }
.pf-mode:not(.is-dark) .dt-key span.pre::before { background: var(--soft); box-shadow: inset 0 0 0 1px var(--line); }
.pf-mode:not(.is-dark) .dt-bars i.pre { background: var(--soft); box-shadow: inset 0 0 0 1px var(--line); }

/* Títulos de pregunta dentro de los bloques a pares (son h2 por la FAQ de Google). */
.pf-mode h2 { margin-top: 10px; font: 500 clamp(1.625rem, 1.25rem + 1.1vw, 2.25rem)/1.04 var(--display); letter-spacing: -0.014em; text-wrap: balance; }
.dt-night .m { color: var(--n-mute); }
