/* PrecioDolarHoy.pe · actualización de la portada · 2026-11-06
   Conserva el ancho actual y las cinco reservas de publicidad.
   Sin cambios en el diseño de las páginas internas. */

/* Las mejores tasas anuncian también la casa que ofrece cada precio. */
body.pdh-home .market-cards .pdh-pill {gap:5px;min-height:112px;padding:12px 15px;}
body.pdh-home .pdh-pill__brand {
  display:inline-flex;align-items:center;gap:6px;min-width:0;
  max-width:100%;min-height:32px;align-self:flex-start;
  margin-top:2px;padding:2px 7px 2px 3px;
  border-radius:9px;border:1px solid rgba(65,50,70,.10);
  background:rgba(255,255,255,.77);text-decoration:none;
  color:#3b2c43;font-size:11px;font-weight:800;
  box-shadow:0 2px 6px rgba(35,20,42,.04);
  transition:background .16s, border-color .16s;
}
body.pdh-home .pdh-pill__brand.has-link:hover {border-color:rgba(65,50,70,.35);background:#fff;}
body.pdh-home .pdh-pill__brand.has-link:focus-visible {outline:2px solid #674371;outline-offset:2px;}
body.pdh-home .pdh-pill__brand[aria-disabled="true"] {cursor:default;opacity:.78;}
body.pdh-home .pdh-pill__brand img {width:auto;height:auto;max-width:88px;max-height:31px;object-fit:contain;flex:none;}
body.pdh-home .pdh-pill__brand img[hidden] {display:none!important;}
body.pdh-home .pdh-pill__brand.has-logo .pdh-pill__brand-name {
  position:absolute;width:1px;height:1px;padding:0;margin:-1px;
  overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;
}
body.pdh-home .pdh-pill__brand-arrow {font-size:12px;color:#59445f;}
body.pdh-home .pdh-pill__brand[aria-disabled="true"] .pdh-pill__brand-arrow {display:none;}

/* Ocupa exactamente el mismo ancho central que antes, sin tarjeta de recomendación redundante. */
body.pdh-home .reference-grid.reference-grid--unified.reference-grid--market {
  display:block;grid-template-columns:none;width:100%;min-width:0;
}
body.pdh-home .reference-grid--market .sunat-trend-card--stacked {
  width:100%;max-width:none;min-width:0;padding:17px 20px;gap:14px;
}
body.pdh-home .reference-grid--market .sunat-trend-card__head {
  display:grid;grid-template-columns:minmax(0,1fr) minmax(235px,.7fr);
  gap:16px;align-items:center;
}
body.pdh-home .reference-grid--market .sunat-trend-card__title {gap:13px;}
body.pdh-home .reference-grid--market .sunat-trend-card__title img {width:48px;height:31px;object-fit:contain;}
body.pdh-home .reference-grid--market .sunat-trend-card__title .section-title {font-size:clamp(17px,1.6vw,22px);}
body.pdh-home .reference-grid--market .sunat-trend-card__rates {gap:10px;}
body.pdh-home .reference-grid--market .sunat-trend-card__rate {padding:10px 13px;}
body.pdh-home .reference-grid--market .sunat-trend-card__rate span {font-size:11px;}
body.pdh-home .reference-grid--market .sunat-trend-card__rate strong {font-size:21px;}
body.pdh-home .reference-grid--market .sunat-trend-card__chart-heading {margin-bottom:8px;}
body.pdh-home .reference-grid--market .trend-chart {height:255px;min-height:255px;padding:10px 14px 5px;}
body.pdh-home .reference-grid--market #trend-svg {max-height:none;}
body.pdh-home .reference-grid--market .sunat-trend-card__foot {gap:5px;}

/* Un solo gráfico: selector de período con procedencia de datos visible. */
body.pdh-home .trend-periods {
  display:inline-flex;align-items:center;gap:3px;padding:3px;
  background:#eee9f0;border:1px solid rgba(73,49,85,.10);border-radius:10px;
}
body.pdh-home .trend-period {
  appearance:none;border:0;border-radius:7px;background:transparent;
  color:#655b6d;font:inherit;font-size:11px;font-weight:750;
  padding:7px 12px;cursor:pointer;white-space:nowrap;
}
body.pdh-home .trend-period.is-active {background:#34223d;color:#f3f5d1;box-shadow:0 2px 6px rgba(25,16,33,.12);}
body.pdh-home .trend-period:hover:not(.is-active) {background:rgba(255,255,255,.72);}
body.pdh-home .trend-period:focus-visible {outline:3px solid #81648a;outline-offset:2px;}
body.pdh-home .reference-grid--market .trend-placeholder {max-width:470px;font-size:13px;line-height:1.6;}
body.pdh-home .reference-grid--market .sunat-trend-card__disclaimer {font-size:11px;}

@media(max-width:760px) {
  body.pdh-home .reference-grid--market .sunat-trend-card__head {grid-template-columns:minmax(0,1fr);gap:10px;}
  body.pdh-home .reference-grid--market .sunat-trend-card__rates {grid-template-columns:repeat(2,minmax(0,1fr));}
  body.pdh-home .reference-grid--market .trend-chart {height:215px;min-height:215px;}
}
@media(max-width:500px) {
  body.pdh-home .market-cards .pdh-pill {padding:11px 10px;min-height:123px;}
  body.pdh-home .pdh-pill__brand {max-width:100%;min-height:28px;padding:2px 5px;}
  body.pdh-home .pdh-pill__brand img {max-width:70px;max-height:27px;}
  body.pdh-home .reference-grid--market .sunat-trend-card--stacked {padding:15px 12px;}
  body.pdh-home .sunat-trend-card__chart-heading {align-items:flex-start;flex-wrap:wrap;}
  body.pdh-home .reference-grid--market .trend-chart {height:198px;min-height:198px;padding:6px 4px;}
  body.pdh-home .trend-period {font-size:10.5px;padding:6px 10px;}
}
@media(prefers-reduced-motion:reduce) {body.pdh-home .pdh-pill__brand {transition:none;}}


/* Ajuste noviembre: la marca ganadora queda JUNTO a la tasa, no debajo.
   No altera los IDs ni el comportamiento de los enlaces JS. */
body.pdh-home .market-cards .pdh-pill {
  min-height:101px;
  gap:8px;
  justify-content:center;
}
body.pdh-home .pdh-pill__main {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  width:100%;
  min-width:0;
}
body.pdh-home .pdh-pill__quote {
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:4px;
  min-width:0;
  flex:1 1 auto;
}
body.pdh-home .pdh-pill__quote .pdh-pill__meta {margin-top:0;}
body.pdh-home .pdh-pill__main .pdh-pill__brand {
  align-self:center;
  flex:0 0 auto;
  max-width:104px;
  min-height:32px;
  margin:0;
  padding:3px 5px;
  gap:4px;
}
body.pdh-home .pdh-pill__main .pdh-pill__brand img {
  display:block;
  width:auto;
  height:auto;
  max-width:85px;
  max-height:30px;
}
body.pdh-home .pdh-pill__brand:not(.has-logo) .pdh-pill__brand-name {
  display:block;
  max-width:76px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
body.pdh-home .pdh-pill__main .pdh-pill__value {font-size:clamp(23px,2.25vw,32px);}

/* Con datos mensuales parciales, el SVG se adapta a TODO el área disponible.
   Su viewBox también se actualiza con JS para evitar barras vacías laterales. */
body.pdh-home .reference-grid--market .trend-chart {
  height:220px;
  min-height:220px;
  padding:7px 12px 5px;
}
body.pdh-home .reference-grid--market #trend-svg {
  width:100%;height:100%;min-height:0;max-width:none;max-height:none;
  flex:1 1 auto;
}
@media (max-width:900px) {
  body.pdh-home .pdh-pill__main {gap:6px;}
  body.pdh-home .pdh-pill__main .pdh-pill__brand {max-width:83px;padding:3px 4px;}
  body.pdh-home .pdh-pill__main .pdh-pill__brand img {max-width:64px;max-height:26px;}
  body.pdh-home .pdh-pill__main .pdh-pill__value {font-size:clamp(21px,3.05vw,29px);}
}
@media (max-width:500px) {
  body.pdh-home .market-cards .pdh-pill {min-height:100px;padding:9px 9px;gap:7px;}
  body.pdh-home .pdh-pill__main {gap:4px;}
  body.pdh-home .pdh-pill__main .pdh-pill__value {font-size:clamp(19px,5.5vw,25px);}
  body.pdh-home .pdh-pill__main .pdh-pill__brand {max-width:53px;min-height:27px;padding:3px;gap:2px;}
  body.pdh-home .pdh-pill__main .pdh-pill__brand img {max-width:40px;max-height:23px;}
  body.pdh-home .pdh-pill__main .pdh-pill__brand:not(.has-logo) .pdh-pill__brand-name {max-width:43px;font-size:9px;}
  body.pdh-home .pdh-pill__brand-arrow {font-size:10px;}
  body.pdh-home .pdh-pill__meta {font-size:10px;}
  body.pdh-home .reference-grid--market .trend-chart {height:184px;min-height:184px;padding:4px 5px;}
}
@media (max-width:350px) {
  body.pdh-home .pdh-pill__main .pdh-pill__brand {max-width:40px;padding:2px;}
  body.pdh-home .pdh-pill__main .pdh-pill__brand img {max-width:31px;max-height:20px;}
  body.pdh-home .pdh-pill__main .pdh-pill__value {font-size:19px;}
}
