/* ==========================================================================
   Datos Hoy · sistema de diseño (sobre GeneratePress)
   Tokens claro/oscuro. Paleta de datos validada (dataviz): series azul/naranja,
   divergente azul ↔ gris ↔ rojo para "más barato / más caro que la media".
   ========================================================================== */

:root {
	color-scheme: light;
	--dh-bg: #f4f6f9;
	--dh-surface: #ffffff;
	--dh-surface-2: #f1f3f6;
	--dh-ink: #0b1a2e;
	--dh-ink-2: #52514e;
	--dh-muted: #6f6d68;
	--dh-border: rgba(11, 26, 46, .10);
	--dh-grid: #e1e0d9;
	--dh-brand: #2a78d6;
	--dh-brand-ink: #1c5cab;
	--dh-hero-1: #0b1a2e;
	--dh-hero-2: #14407a;
	--dh-good: #006300;
	--dh-bad: #b42318;
	--dh-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 16px rgba(16, 24, 40, .06);
	--dh-shadow-hover: 0 2px 4px rgba(16, 24, 40, .08), 0 12px 28px rgba(16, 24, 40, .12);
	--dh-series-1: #2a78d6;
	--dh-series-2: #eb6834;
	--dh-div-b2: #256abf;
	--dh-div-b1: #86b6ef;
	--dh-div-m: #f0efec;
	--dh-div-r1: #f19a92;
	--dh-div-r2: #c93b3b;
	--dh-esp: #d9d8d2;
	--dh-radius: 14px;
	/* Variables del CSS base (datos.css) */
	--dt-acento: var(--dh-brand);
	--dt-sube: var(--dh-bad);
	--dt-baja: var(--dh-good);
	--dt-borde: var(--dh-grid);
	--dt-suave: var(--dh-surface-2);
	--dt-texto-2: var(--dh-ink-2);
}

@media (prefers-color-scheme: dark) {
	:root:where(:not([data-theme="light"])) {
		color-scheme: dark;
		--dh-bg: #0d0d0d;
		--dh-surface: #1a1a19;
		--dh-surface-2: #242422;
		--dh-ink: #f0efec;
		--dh-ink-2: #c3c2b7;
		--dh-muted: #9a988f;
		--dh-border: rgba(255, 255, 255, .10);
		--dh-grid: #2c2c2a;
		--dh-brand: #3987e5;
		--dh-brand-ink: #86b6ef;
		--dh-hero-1: #07111f;
		--dh-hero-2: #0f2f5c;
		--dh-good: #0ca30c;
		--dh-bad: #e66767;
		--dh-shadow: 0 1px 2px rgba(0, 0, 0, .4);
		--dh-shadow-hover: 0 8px 24px rgba(0, 0, 0, .5);
		--dh-series-1: #3987e5;
		--dh-series-2: #d95926;
		--dh-div-b2: #3987e5;
		--dh-div-b1: #1c5cab;
		--dh-div-m: #383835;
		--dh-div-r1: #9a3a33;
		--dh-div-r2: #e66767;
		--dh-esp: #4a4945;
	}
}
:root[data-theme="dark"] {
	color-scheme: dark;
	--dh-bg: #0d0d0d;
	--dh-surface: #1a1a19;
	--dh-surface-2: #242422;
	--dh-ink: #f0efec;
	--dh-ink-2: #c3c2b7;
	--dh-muted: #9a988f;
	--dh-border: rgba(255, 255, 255, .10);
	--dh-grid: #2c2c2a;
	--dh-brand: #3987e5;
	--dh-brand-ink: #86b6ef;
	--dh-hero-1: #07111f;
	--dh-hero-2: #0f2f5c;
	--dh-good: #0ca30c;
	--dh-bad: #e66767;
	--dh-shadow: 0 1px 2px rgba(0, 0, 0, .4);
	--dh-shadow-hover: 0 8px 24px rgba(0, 0, 0, .5);
	--dh-series-1: #3987e5;
	--dh-series-2: #d95926;
	--dh-div-b2: #3987e5;
	--dh-div-b1: #1c5cab;
	--dh-div-m: #383835;
	--dh-div-r1: #9a3a33;
	--dh-div-r2: #e66767;
	--dh-esp: #4a4945;
}

/* ---------------------------------------------------------------- base / GeneratePress */
body {
	background: var(--dh-bg);
	color: var(--dh-ink);
	font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	-webkit-font-smoothing: antialiased;
}
a { color: var(--dh-brand-ink); }
h1, h2, h3, h4 { color: var(--dh-ink); letter-spacing: -.02em; }
h1 { font-weight: 800; }
h2 { font-weight: 750; font-size: 1.55rem; }

.site-header { background: var(--dh-surface); border-bottom: 1px solid var(--dh-border); }
.main-title { margin: 0; line-height: 0; }
.site-description { color: var(--dh-muted); }
.main-navigation, .main-navigation ul ul { background: var(--dh-surface); }
.main-navigation .main-nav ul li a, .menu-toggle { color: var(--dh-ink); font-weight: 600; }
.main-navigation .main-nav ul li:hover > a, .main-navigation .main-nav ul li.current-menu-item > a { color: var(--dh-brand-ink); }
.main-navigation ul ul { box-shadow: var(--dh-shadow-hover); border-radius: 10px; overflow: hidden; }

.separate-containers .inside-article, .one-container .container, .inside-article {
	background: var(--dh-surface);
	border-radius: var(--dh-radius);
	box-shadow: var(--dh-shadow);
}
.one-container .site-content { background: transparent; }
.entry-title { font-size: clamp(1.7rem, 3.4vw, 2.4rem); line-height: 1.15; }
.entry-meta, .entry-meta a { color: var(--dh-muted); }
.post-image img, .featured-image img { border-radius: 12px; }
input, select, textarea {
	background: var(--dh-surface) !important; color: var(--dh-ink) !important;
	border: 1px solid var(--dh-border) !important; border-radius: 10px !important;
}
input:focus, select:focus { outline: 2px solid var(--dh-brand); outline-offset: 1px; }
.site-footer .site-info { background: var(--dh-hero-1); color: #c3c2b7; }
.site-footer .site-info a { color: #fff; }

/* componentes base (datos.css) en ambos temas */
.dt-card, .dt-calc, .dt-faq details { background: var(--dh-surface); border-color: var(--dh-border); }
.dt-card { border-radius: 14px; box-shadow: var(--dh-shadow); transition: transform .2s, box-shadow .2s; }
a.dt-card:hover, .dt-card--link:hover { transform: translateY(-3px); box-shadow: var(--dh-shadow-hover); }
.dt-table th { background: var(--dh-surface-2); color: var(--dh-ink-2); }
.dt-table td, .dt-table th { border-color: var(--dh-grid); }
.dt-table tbody tr { transition: background .15s; }
.dt-table tbody tr:hover { background: var(--dh-surface-2); }
.dt-resumen { background: var(--dh-surface-2); border-left-color: var(--dh-brand); }

/* minigráfica */
.dt-spark { display: block; width: 100%; height: 34px; margin: 6px 0 2px; overflow: visible; }
.dt-spark__linea { fill: none; stroke: var(--dh-series-1); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.dt-spark__area { fill: var(--dh-series-1); opacity: .10; }
.dt-spark__punto { fill: var(--dh-series-1); stroke: var(--dh-surface); stroke-width: 2; vector-effect: non-scaling-stroke; }

/* ---------------------------------------------------------------- ticker en directo */
.dt-ticker {
	display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 0 0 12px;
	background: var(--dh-hero-1); color: #e8ecf3; font-size: 13px; overflow: hidden;
}
.dt-ticker__live { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 11px; letter-spacing: .08em; color: #fff; flex: none; }
.dt-pulse { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 0 rgba(52, 211, 153, .6); animation: dt-pulse 1.8s infinite; display: inline-block; }
@keyframes dt-pulse { 70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }
.dt-ticker__viewport { flex: 1; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); }
.dt-ticker__track { display: inline-flex; white-space: nowrap; animation: dt-marquee 45s linear infinite; }
.dt-ticker:hover .dt-ticker__track, .dt-ticker:focus-within .dt-ticker__track { animation-play-state: paused; }
.dt-ticker__dup { display: inline-flex; }
.dt-ticker__item { color: #e8ecf3 !important; text-decoration: none; padding: 0 18px; border-right: 1px solid rgba(255, 255, 255, .12); display: inline-flex; align-items: center; gap: 6px; }
.dt-ticker__item:hover strong { text-decoration: underline; }
.dt-ticker__n { color: #9fb3cc; }
.dt-ticker__item strong { color: #fff; font-variant-numeric: tabular-nums; }
.dt-ticker .dt-var--sube { color: #ff8a80; }
.dt-ticker .dt-var--baja { color: #5ee0a0; }
@keyframes dt-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.dt-tema { flex: none; height: 38px; width: 46px; border: 0; background: rgba(255, 255, 255, .08); cursor: pointer; font-size: 16px; padding: 0; }
.dt-tema:hover { background: rgba(255, 255, 255, .16); }
.dt-tema__luna { display: none; }
:root[data-theme="dark"] .dt-tema__sol { display: none; }
:root[data-theme="dark"] .dt-tema__luna { display: inline; }
@media (prefers-color-scheme: dark) {
	:root:where(:not([data-theme="light"])) .dt-tema__sol { display: none; }
	:root:where(:not([data-theme="light"])) .dt-tema__luna { display: inline; }
}

/* ---------------------------------------------------------------- hero */
.dt-hero {
	position: relative; overflow: hidden; color: #fff; border-radius: 20px; margin: 0 0 28px;
	padding: clamp(26px, 5vw, 56px) clamp(20px, 5vw, 52px);
	background: radial-gradient(1200px 400px at 85% -10%, rgba(98, 80, 214, .55), transparent 60%),
		radial-gradient(800px 300px at -10% 110%, rgba(42, 120, 214, .55), transparent 60%),
		linear-gradient(135deg, var(--dh-hero-1), var(--dh-hero-2));
}
.dt-hero::after {
	content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .18;
	background-image: linear-gradient(rgba(255, 255, 255, .25) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .25) 1px, transparent 1px);
	background-size: 40px 40px; mask-image: radial-gradient(ellipse at 70% 30%, #000 10%, transparent 70%);
}
.dt-hero > * { position: relative; z-index: 1; }
.dt-hero__kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: #c9d7ea; margin: 0 0 14px; background: rgba(255, 255, 255, .08); padding: 6px 12px; border-radius: 999px; }
.dt-hero__titulo { color: #fff; font-size: clamp(1.9rem, 4.6vw, 3.2rem); line-height: 1.1; margin: 0 0 12px; max-width: 18ch; }
.dt-hero__cifra { background: linear-gradient(90deg, #8fd3ff, #b7a8ff); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dt-hero__sub { color: #c9d7ea; font-size: 1.05rem; margin: 0 0 24px; }
.dt-hero .dt-var--baja { color: #5ee0a0; }
.dt-hero .dt-var--sube { color: #ff8a80; }

/* buscador + cerca de mí */
.dt-buscador { position: relative; max-width: 640px; }
.dt-buscador__fila { display: flex; gap: 8px; background: #fff; padding: 6px; border-radius: 16px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.dt-buscador__input { flex: 1; border: 0 !important; background: transparent !important; color: #0b0b0b !important; font-size: 16px; padding: 12px 14px !important; min-width: 0; }
.dt-buscador__input:focus { outline: none; }
.dt-btn { border: 0; border-radius: 12px; padding: 0 18px; font-weight: 700; cursor: pointer; white-space: nowrap; background: var(--dh-brand); color: #fff; transition: transform .15s, filter .15s; min-height: 44px; }
.dt-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.dt-btn--sec { background: var(--dh-surface-2); color: var(--dh-ink); }
.dt-buscador__lista { position: absolute; z-index: 50; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none; background: var(--dh-surface); border: 1px solid var(--dh-border); border-radius: 14px; box-shadow: var(--dh-shadow-hover); max-height: 360px; overflow: auto; }
.dt-buscador__lista li { margin: 0; }
.dt-buscador__lista a { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--dh-ink); text-decoration: none; }
.dt-buscador__lista a small { color: var(--dh-muted); }
.dt-buscador__lista [aria-selected="true"] a, .dt-buscador__lista a:hover { background: var(--dh-surface-2); }
.dt-buscador__lista .dt-precio { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dt-cerca { margin-top: 16px; background: var(--dh-surface); color: var(--dh-ink); border-radius: 16px; padding: 16px; box-shadow: var(--dh-shadow-hover); }
.dt-cerca__cab { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.dt-cerca__cab strong { font-size: 1.05rem; }
.dt-cerca__lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.dt-cerca__lista li { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--dh-border); border-radius: 12px; margin: 0; }
.dt-cerca__rank { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: var(--dh-surface-2); }
.dt-cerca__lista li:first-child .dt-cerca__rank { background: #fab219; color: #0b0b0b; }
.dt-cerca__info { min-width: 0; }
.dt-cerca__info small { display: block; color: var(--dh-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dt-cerca__precio { text-align: right; font-weight: 800; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.dt-cerca__precio small { display: block; font-weight: 500; font-size: 12px; color: var(--dh-muted); }
.dt-cerca__msg { color: var(--dh-ink-2); margin: 0; }

/* control segmentado */
.dt-seg { display: inline-flex; background: var(--dh-surface-2); border-radius: 999px; padding: 3px; gap: 2px; }
.dt-seg button { border: 0; background: transparent; color: var(--dh-ink-2); padding: 6px 14px; border-radius: 999px; font-weight: 700; font-size: 13px; cursor: pointer; min-height: 32px; }
.dt-seg button[aria-selected="true"], .dt-seg button[aria-pressed="true"] { background: var(--dh-surface); color: var(--dh-ink); box-shadow: var(--dh-shadow); }

/* ---------------------------------------------------------------- mapa de mosaico */
.dt-mapa { margin: 8px 0 32px; }
.dt-mapa__cab { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.dt-mapa__cab h2 { margin: 0; }
.dt-mapa__ayuda, .dt-mapa__nota { color: var(--dh-ink-2); font-size: 14px; }
.dt-mapa__wrap { position: relative; }
.dt-mapa__grid { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 4px; max-width: 760px; margin: 0 auto; }
.dt-tile {
	aspect-ratio: 1; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center;
	text-decoration: none !important; background: var(--dh-div-m); color: var(--dh-ink); line-height: 1.05;
	transition: transform .15s, box-shadow .15s; position: relative; outline-offset: 2px;
}
.dt-tile:hover, .dt-tile:focus-visible, .dt-tile.is-activa { transform: scale(1.12); z-index: 2; box-shadow: 0 0 0 2px var(--dh-surface), 0 6px 18px rgba(0, 0, 0, .3); }
.dt-tile__abr { font-weight: 800; font-size: clamp(9px, 1.6vw, 14px); }
.dt-tile__v { font-size: clamp(7px, 1.15vw, 11px); font-variant-numeric: tabular-nums; opacity: .9; }
.dt-tile.b2 { background: var(--dh-div-b2); color: #fff; }
.dt-tile.b1 { background: var(--dh-div-b1); color: #0b0b0b; }
.dt-tile.m  { background: var(--dh-div-m); color: var(--dh-ink); }
.dt-tile.r1 { background: var(--dh-div-r1); color: #0b0b0b; }
.dt-tile.r2 { background: var(--dh-div-r2); color: #fff; }
:root[data-theme="dark"] .dt-tile.b1, :root[data-theme="dark"] .dt-tile.r1 { color: #fff; }
@media (prefers-color-scheme: dark) { :root:where(:not([data-theme="light"])) .dt-tile.b1, :root:where(:not([data-theme="light"])) .dt-tile.r1 { color: #fff; } }
.dt-tile--especial { background: repeating-linear-gradient(45deg, var(--dh-esp), var(--dh-esp) 4px, var(--dh-surface-2) 4px, var(--dh-surface-2) 8px) !important; color: var(--dh-ink) !important; }
.dt-mapa__tip {
	position: absolute; z-index: 10; pointer-events: none; transform: translate(-50%, calc(-100% - 12px));
	background: var(--dh-surface); color: var(--dh-ink); border: 1px solid var(--dh-border); border-radius: 10px; padding: 8px 12px;
	box-shadow: var(--dh-shadow-hover); font-size: 13px; white-space: nowrap;
}
.dt-mapa__tip strong { display: block; font-size: 14px; }
.dt-mapa__leyenda { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px; font-size: 13px; color: var(--dh-ink-2); margin-top: 14px; }
.dt-mapa__leyenda i { display: inline-block; width: 26px; height: 14px; border-radius: 3px; }
.dt-mapa__leyenda span { margin: 0 6px; }
.dt-mapa__leyenda em { font-style: normal; margin-left: 14px; display: inline-flex; align-items: center; gap: 6px; }
.dt-mapa__leyenda .b2 { background: var(--dh-div-b2); } .dt-mapa__leyenda .b1 { background: var(--dh-div-b1); }
.dt-mapa__leyenda .m { background: var(--dh-div-m); box-shadow: inset 0 0 0 1px var(--dh-border); }
.dt-mapa__leyenda .r1 { background: var(--dh-div-r1); } .dt-mapa__leyenda .r2 { background: var(--dh-div-r2); }
.dt-mapa__leyenda .esp { background: repeating-linear-gradient(45deg, var(--dh-esp), var(--dh-esp) 3px, var(--dh-surface-2) 3px, var(--dh-surface-2) 6px); }
.dt-mapa__tabla { margin-top: 10px; }
.dt-mapa__tabla summary { cursor: pointer; font-weight: 600; color: var(--dh-brand-ink); }

/* ---------------------------------------------------------------- comparador */
.dt-comparador { background: var(--dh-surface); border: 1px solid var(--dh-border); border-radius: 16px; padding: 22px; margin: 28px 0; box-shadow: var(--dh-shadow); }
.dt-comparador h2 { margin-top: 0; }
.dt-comparador__res { margin-top: 18px; }
.dt-versus { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: stretch; }
.dt-versus__lado { background: var(--dh-surface-2); border-radius: 12px; padding: 14px; text-align: center; }
.dt-versus__lado strong { display: block; font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.dt-versus__vs { align-self: center; font-weight: 800; color: var(--dh-muted); }
.dt-versus__gana { box-shadow: inset 0 0 0 2px var(--dh-good); }
.dt-comparador__frase { font-size: 1.1rem; margin: 16px 0 0; }

/* ---------------------------------------------------------------- datos curiosos */
.dt-curio { position: relative; border-radius: 18px; padding: 22px 24px 16px; margin: 28px 0; color: #fff; background: linear-gradient(135deg, #1c5cab, #2a78d6); box-shadow: var(--dh-shadow-hover); min-height: 150px; }
.dt-curio__kicker { margin: 0 0 8px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; font-size: 12px; opacity: .85; color: #fff; }
.dt-curio__slide { display: flex; gap: 16px; align-items: center; color: #fff !important; text-decoration: none; font-size: clamp(1.05rem, 2.2vw, 1.3rem); line-height: 1.35; animation: dt-fade .5s ease; }
.dt-curio__slide strong { color: #fff; }
.dt-curio__icono { font-size: 2.4rem; flex: none; }
@keyframes dt-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.dt-curio__nav { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 14px; }
.dt-curio__nav > button { background: rgba(255, 255, 255, .15); color: #fff; border: 0; border-radius: 50%; width: 34px; height: 34px; font-size: 20px; cursor: pointer; line-height: 1; }
.dt-curio__dots { display: flex; gap: 6px; }
.dt-curio__dots button { width: 8px; height: 8px; padding: 0; border-radius: 999px; border: 0; background: rgba(255, 255, 255, .4); cursor: pointer; transition: width .2s; }
.dt-curio__dots button[aria-current="true"] { width: 22px; background: #fff; }

/* ---------------------------------------------------------------- sigue explorando */
.dt-explora { margin: 36px 0 12px; }
.dt-explora__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.dt-explora__card { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: 14px; background: var(--dh-surface-2); color: var(--dh-ink) !important; text-decoration: none !important; border: 1px solid var(--dh-border); transition: transform .2s, box-shadow .2s, border-color .2s; }
.dt-explora__card:hover { transform: translateY(-3px); box-shadow: var(--dh-shadow-hover); border-color: var(--dh-brand); }
.dt-explora__card span:last-child { color: var(--dh-ink-2); font-size: 14px; }
.dt-explora__icono { font-size: 1.8rem; }

/* noticias y gráficas */
.dt-news__item { background: var(--dh-surface); border-radius: 14px; padding-bottom: 12px; box-shadow: var(--dh-shadow); overflow: hidden; transition: transform .2s, box-shadow .2s; }
.dt-news__item:hover { transform: translateY(-3px); box-shadow: var(--dh-shadow-hover); }
.dt-news__img { border-radius: 0; }
.dt-news__fecha, .dt-news__titulo { padding: 0 14px; }
.dt-news__titulo { color: var(--dh-ink); }
.dt-rangos { display: flex; justify-content: flex-end; margin-bottom: 6px; }
.dt-chart__box { background: var(--dh-surface); }

/* pie */

/* barra de progreso de lectura */
.dt-progreso { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 10000; pointer-events: none; }
.dt-progreso span { display: block; height: 100%; width: 0; background: var(--dh-brand); border-radius: 0 999px 999px 0; }

/* aparición al hacer scroll (solo con JS) */
html.dt-js .dt-reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
html.dt-js .dt-reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 600px) {
	.dt-buscador__fila { flex-wrap: wrap; }
	.dt-buscador__input { flex-basis: 100%; }
	.dt-btn--geo { flex: 1; }
	.dt-mapa__grid { gap: 2px; }
	.dt-tile { border-radius: 4px; }
	.dt-tile__v { display: none; }
	.dt-versus { grid-template-columns: 1fr; }
	.dt-versus__vs { justify-self: center; }
}
@media (prefers-reduced-motion: reduce) {
	.dt-ticker__track, .dt-pulse { animation: none; }
	.dt-ticker__viewport { overflow-x: auto; }
	.dt-ticker__dup { display: none; }
	html.dt-js .dt-reveal { opacity: 1; transform: none; transition: none; }
	.dt-curio__slide { animation: none; }
	* { scroll-behavior: auto !important; }
}

/* el atributo hidden debe ganar a los display de los componentes */
.dt-curio__slide[hidden], .dt-buscador__lista[hidden], .dt-cerca[hidden], .dt-mapa__tip[hidden], .dt-curio__nav[hidden] { display: none !important; }

/* párrafos vacíos que añade wpautop alrededor de los shortcodes */
.entry-content > p:empty { display: none; }
@media (max-width: 600px) {
	.dt-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.dt-card { padding: 12px; }
	.dt-card__value { font-size: 20px; }
	.dt-card__meta { font-size: 12px; }
	.dt-calc .dt-cards { grid-template-columns: 1fr; }
}

/* Variables globales de GeneratePress (se imprimen después de esta hoja): html:root gana en especificidad
   y las enlaza a los tokens, así el tema entero sigue al modo claro/oscuro. */
html:root {
	--contrast: var(--dh-ink);
	--contrast-2: var(--dh-ink-2);
	--contrast-3: var(--dh-muted);
	--base: var(--dh-surface-2);
	--base-2: var(--dh-bg);
	--base-3: var(--dh-surface);
	--accent: var(--dh-brand-ink);
}

/* Luz: chips de tramo, mini barras y barras de marcas */
.dt-chip { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.dt-chip.b2 { background: var(--dh-div-b2); color: #fff; }
.dt-chip.b1 { background: var(--dh-div-b1); color: #0b0b0b; }
.dt-chip.m  { background: var(--dh-div-m); color: var(--dh-ink); box-shadow: inset 0 0 0 1px var(--dh-border); }
.dt-chip.r1 { background: var(--dh-div-r1); color: #0b0b0b; }
.dt-chip.r2 { background: var(--dh-div-r2); color: #fff; }
:root[data-theme="dark"] .dt-chip.b1, :root[data-theme="dark"] .dt-chip.r1 { color: #fff; }
.dt-luzmini .b2 { fill: var(--dh-div-b2); } .dt-luzmini .b1 { fill: var(--dh-div-b1); } .dt-luzmini .m { fill: var(--dh-muted); }
.dt-luzmini .r1 { fill: var(--dh-div-r1); } .dt-luzmini .r2 { fill: var(--dh-div-r2); }
.dt-card--ahora { box-shadow: inset 0 0 0 2px var(--dh-brand), var(--dh-shadow); }

.dt-barras { list-style: none; margin: 12px 0 28px; padding: 0; display: grid; gap: 4px; }
.dt-barras li { margin: 0; }
.dt-barras a { display: grid; grid-template-columns: 26px minmax(90px, 140px) 1fr auto 110px; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; color: var(--dh-ink) !important; text-decoration: none !important; }
.dt-barras a:hover { background: var(--dh-surface-2); }
.dt-barras__pos { color: var(--dh-muted); font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; }
.dt-barras__n { font-weight: 700; }
.dt-barras__bar { height: 14px; background: var(--dh-surface-2); border-radius: 4px; overflow: hidden; }
.dt-barras__bar i { display: block; height: 100%; background: var(--dh-series-1); border-radius: 0 4px 4px 0; }
.dt-barras__v { font-weight: 700; font-variant-numeric: tabular-nums; }
.dt-barras__d { font-size: 13px; text-align: right; }
@media (max-width: 600px) {
	.dt-barras a { grid-template-columns: 22px 1fr auto; }
	.dt-barras__bar { grid-column: 2 / -1; grid-row: 2; }
	.dt-barras__d { display: none; }
}
.dt-luz-leyenda .m { background: var(--dh-muted) !important; box-shadow: none !important; }
.dt-explora__grid + h2 { margin-top: 32px; }

/* Conversor de divisas */
.dt-calc__swap { align-self: end; min-height: 42px; font-size: 18px; padding: 0 14px; }
.dt-conv { text-align: center; padding: 18px 12px 6px; }
.dt-conv__de { display: block; color: var(--dh-ink-2); font-size: 1.05rem; }
.dt-conv__a { display: block; font-size: clamp(2rem, 6vw, 3rem); font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; color: var(--dh-ink); }
.dt-conv__uno { display: block; color: var(--dh-muted); font-size: 13px; margin-top: 6px; }
.dt-dos-tablas { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.dt-versus__lado span { display: block; font-weight: 700; margin-bottom: 4px; }

/* Widgets */
.dt-widget-prev { margin: 14px 0; padding: 14px; background: var(--dh-surface-2); border-radius: 12px; }
.dt-widget-code { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; margin-bottom: 10px; }
.dt-widget-code textarea { font-family: ui-monospace, Consolas, monospace; font-size: 12px; width: 100%; }

/* Mapa secuencial (magnitud): azul para €/m², naranja para la subida anual. Rampas validadas (dataviz). */
:root { --sq1: #86b6ef; --sq2: #5598e7; --sq3: #2a78d6; --sq4: #1c5cab; --sq5: #104281; --so1: #f09060; --so2: #e06a30; --so3: #c24e1d; --so4: #9a3c15; --so5: #6e2a0e; }
:root[data-theme="dark"] { --sq1: #184f95; --sq2: #256abf; --sq3: #3987e5; --sq4: #6da7ec; --sq5: #b7d3f6; --so1: #9a3c15; --so2: #c24e1d; --so3: #e06a30; --so4: #f09060; --so5: #f7c3a5; }
@media (prefers-color-scheme: dark) { :root:where(:not([data-theme="light"])) { --sq1: #184f95; --sq2: #256abf; --sq3: #3987e5; --sq4: #6da7ec; --sq5: #b7d3f6; --so1: #9a3c15; --so2: #c24e1d; --so3: #e06a30; --so4: #f09060; --so5: #f7c3a5; } }
.dt-mapa--seq .dt-tile.s1 { background: var(--sq1); color: #0b0b0b; } .dt-mapa--seq .dt-tile.s2 { background: var(--sq2); color: #fff; }
.dt-mapa--seq .dt-tile.s3 { background: var(--sq3); color: #fff; } .dt-mapa--seq .dt-tile.s4 { background: var(--sq4); color: #fff; } .dt-mapa--seq .dt-tile.s5 { background: var(--sq5); color: #fff; }
.dt-mapa--seq.is-o .dt-tile.s1 { background: var(--so1); color: #0b0b0b; } .dt-mapa--seq.is-o .dt-tile.s2 { background: var(--so2); color: #fff; }
.dt-mapa--seq.is-o .dt-tile.s3 { background: var(--so3); color: #fff; } .dt-mapa--seq.is-o .dt-tile.s4 { background: var(--so4); color: #fff; } .dt-mapa--seq.is-o .dt-tile.s5 { background: var(--so5); color: #fff; }
:root[data-theme="dark"] .dt-mapa--seq .dt-tile.s4, :root[data-theme="dark"] .dt-mapa--seq .dt-tile.s5 { color: #0b0b0b; }
.dt-mapa--seq .dt-mapa__leyenda .s1 { background: var(--sq1); } .dt-mapa--seq .dt-mapa__leyenda .s2 { background: var(--sq2); } .dt-mapa--seq .dt-mapa__leyenda .s3 { background: var(--sq3); }
.dt-mapa--seq .dt-mapa__leyenda .s4 { background: var(--sq4); } .dt-mapa--seq .dt-mapa__leyenda .s5 { background: var(--sq5); }
.dt-mapa--seq.is-o .dt-mapa__leyenda .s1 { background: var(--so1); } .dt-mapa--seq.is-o .dt-mapa__leyenda .s2 { background: var(--so2); } .dt-mapa--seq.is-o .dt-mapa__leyenda .s3 { background: var(--so3); }
.dt-mapa--seq.is-o .dt-mapa__leyenda .s4 { background: var(--so4); } .dt-mapa--seq.is-o .dt-mapa__leyenda .s5 { background: var(--so5); }

/* Europa: filas del ranking (sin enlace) y España resaltada */
.dt-barras__fila { display: grid; grid-template-columns: 26px minmax(110px, 160px) 1fr auto 110px; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; }
.dt-barras li.es-yo .dt-barras__fila { background: var(--dh-surface-2); box-shadow: inset 3px 0 0 var(--dh-series-2); font-weight: 700; }
.dt-barras li.es-yo .dt-barras__bar i { background: var(--dh-series-2); }
.dt-ue__col[hidden] { display: none; }
.dt-card__lista { list-style: none; margin: 6px 0 0; padding: 0; font-size: 14px; }
.dt-card__lista li { margin: 2px 0; }
@media (max-width: 600px) { .dt-barras__fila { grid-template-columns: 22px 1fr auto; } .dt-barras__fila .dt-barras__bar { grid-column: 2 / -1; grid-row: 2; } .dt-barras__fila .dt-barras__d { display: none; } }

/* Termómetro de récords */
.dt-records { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin: 16px 0 28px; }
.dt-record { display: block; padding: 16px; border-radius: 14px; background: var(--dh-surface); border: 1px solid var(--dh-border); box-shadow: var(--dh-shadow); color: var(--dh-ink) !important; text-decoration: none !important; transition: transform .2s, box-shadow .2s; }
.dt-record:hover { transform: translateY(-3px); box-shadow: var(--dh-shadow-hover); }
.dt-record__cab { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.dt-record__hoy { font-size: 26px; font-weight: 800; margin: 6px 0 10px; font-variant-numeric: tabular-nums; }
.dt-record__hoy small { font-size: 14px; color: var(--dh-muted); font-weight: 500; }
.dt-record__barra { position: relative; height: 8px; border-radius: 999px; background: linear-gradient(90deg, var(--dh-surface-2), var(--dh-grid)); }
.dt-record__barra span { position: absolute; top: 50%; width: 16px; height: 16px; margin-left: -8px; transform: translateY(-50%); border-radius: 50%; background: var(--dh-series-1); box-shadow: 0 0 0 3px var(--dh-surface); }
.dt-record__ext { display: flex; justify-content: space-between; font-size: 13px; color: var(--dh-ink-2); margin-top: 8px; }
.dt-record__ext span:last-child { text-align: right; }
.dt-record__desde { font-size: 12px; color: var(--dh-muted); margin-top: 6px; }
.dt-spark-td { width: 130px; }
.dt-spark-td .dt-spark { margin: 0; height: 28px; }

/* Aviso de cookies: botones con el mismo peso (criterio AEPD) */
.dt-cookies { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 10001; max-width: 760px; margin: 0 auto; display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-radius: 14px; background: var(--dh-surface); color: var(--dh-ink); border: 1px solid var(--dh-border); box-shadow: 0 10px 40px rgba(0, 0, 0, .25); font-size: 14px; }
.dt-cookies[hidden] { display: none; }
.dt-cookies p { margin: 0; flex: 1; }
.dt-cookies__btns { display: flex; gap: 8px; flex: none; }
.dt-cookies__btns .dt-btn { min-width: 104px; min-height: 40px; border: 1px solid var(--dh-border); }
html.dt-con-aviso .dt-tgbar { display: none !important; } /* no apilar el aviso con la barra de Telegram */
@media (max-width: 600px) { .dt-cookies { flex-direction: column; align-items: stretch; } .dt-cookies__btns .dt-btn { flex: 1; } }
