/* ==========================================================================
   Bolsímetro · identidad (manual de marca D3)
   Tipografía Plus Jakarta Sans, logotipo termómetro, menú por intención,
   componente Termómetro, Termómetro del bolsillo y «Lo que más se mueve».
   ========================================================================== */

@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/pjs-400.woff2) format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 500 600; font-display: swap; src: url(fonts/pjs-500.woff2) format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/pjs-700.woff2) format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 750 900; font-display: swap; src: url(fonts/pjs-800.woff2) format("woff2"); }

html body, html body button, html body input, html body select, html body textarea, html body .main-navigation, html body .site-header, html body h1, html body h2, html body h3 { font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }

/* ---------------------------------------------------------------- logotipo */
.site-header .inside-header { display: flex; align-items: center; gap: 20px; padding-top: 12px; padding-bottom: 12px; }
.dt-logo { display: inline-flex; color: var(--dh-ink); line-height: 0; }
.dt-logo__svg { height: 46px; width: auto; display: block; overflow: visible; }
.dt-logo__tubo { fill: var(--dh-surface); }
.dt-logo__azul { fill: var(--dh-brand); }
.dt-logo rect[y="74"] { transform-box: fill-box; transform-origin: left center; animation: dt-logo-mercurio 1.6s .3s cubic-bezier(.2, .8, .2, 1) both; }
.dt-logo:hover rect[y="74"] { animation: dt-logo-pulso 1.2s ease-in-out infinite alternate; }
@keyframes dt-logo-mercurio { from { transform: scaleX(.06); } }
@keyframes dt-logo-pulso { to { transform: scaleX(1.06); } }
.dt-logo--pie { color: #fff; }
.dt-logo--pie .dt-logo__tubo { fill: none; }
.dt-logo--pie .dt-logo__azul { fill: #3987e5; }
.dt-logo--pie .dt-logo__svg { height: 40px; }

/* ---------------------------------------------------------------- menú por intención */
.site-header { position: relative; z-index: 50; }
.dt-nav { margin-left: auto; }
.dt-nav__menu { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 2px; }
.dt-nav__boton {
	appearance: none; background: none; border: 0; margin: 0; cursor: pointer; text-decoration: none !important;
	display: inline-flex; align-items: center; gap: 6px; padding: 10px 12px; border-radius: 12px;
	font: inherit; font-size: 15px; font-weight: 700; color: var(--dh-ink) !important; white-space: nowrap;
	transition: background .15s, color .15s;
}
.dt-nav__boton:hover, .dt-nav__grupo.abierto > .dt-nav__boton { background: var(--dh-surface-2); }
.dt-nav__boton:focus-visible, .dt-nav__item:focus-visible, .dt-nav__abrir:focus-visible { outline: 2px solid var(--dh-brand); outline-offset: 2px; }
.dt-nav__grupo.is-actual > .dt-nav__boton, .dt-nav__boton.is-actual { color: var(--dh-brand-ink) !important; box-shadow: inset 0 -3px 0 var(--dh-brand); border-radius: 12px 12px 4px 4px; }
.dt-nav__flecha { width: 12px; height: 12px; transition: transform .2s; }
.dt-nav__grupo.abierto .dt-nav__flecha { transform: rotate(180deg); }
.dt-nav__panel {
	display: none; position: absolute; top: calc(100% - 4px); left: 50%; transform: translateX(-50%);
	width: min(940px, calc(100vw - 32px)); z-index: 60;
	background: var(--dh-surface); border: 1px solid var(--dh-border); border-radius: 20px; box-shadow: var(--dh-shadow-hover);
	padding: 14px; grid-template-columns: 280px minmax(0, 1fr); gap: 14px;
}
.dt-nav__grupo.abierto .dt-nav__panel { display: grid; animation: dt-panel .18s ease-out; }
html:not(.dt-js) .dt-nav__grupo:focus-within .dt-nav__panel { display: grid; }
@keyframes dt-panel { from { opacity: 0; transform: translate(-50%, -6px); } }
.dt-nav__destacado { background: var(--dh-surface-2); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.dt-nav__hoy { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--dh-muted); }
.dt-nav__ver { font-size: 14px; font-weight: 700; color: var(--dh-brand-ink); text-decoration: none; }
.dt-nav__ver:hover { text-decoration: underline; }
.dt-nav__items { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; align-content: start; }
.dt-nav__item {
	display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 10px; align-items: center;
	padding: 10px; border-radius: 12px; color: var(--dh-ink) !important; text-decoration: none !important; transition: background .15s;
}
.dt-nav__item:hover { background: var(--dh-surface-2); }
.dt-nav__ico { grid-row: span 2; width: 34px; height: 34px; border-radius: 10px; background: var(--dh-surface-2); display: grid; place-items: center; font-size: 17px; transition: background .15s; }
.dt-nav__item:hover .dt-nav__ico { background: var(--dh-surface); }
.dt-nav__tit { font-size: 14px; font-weight: 700; }
.dt-nav__sub { grid-column: 2; font-size: 12.5px; color: var(--dh-ink-2); }
.dt-nav__dato { grid-column: 3; grid-row: 1 / span 2; font-size: 12.5px; font-weight: 800; font-variant-numeric: tabular-nums; background: var(--dh-surface-2); padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.dt-nav__item:hover .dt-nav__dato { background: var(--dh-surface); }
.dt-nav__abrir { display: none; }

@media (max-width: 1000px) {
	.dt-nav__abrir {
		display: inline-flex; align-items: center; gap: 8px; position: relative; z-index: 1001;
		appearance: none; border: 1px solid var(--dh-border); background: var(--dh-surface); color: var(--dh-ink); cursor: pointer;
		font: inherit; font-size: 14px; font-weight: 700; padding: 8px 12px; border-radius: 999px;
	}
	.dt-nav__hamb { position: relative; width: 18px; height: 12px; }
	.dt-nav__hamb i { position: absolute; left: 0; right: 0; height: 2px; border-radius: 2px; background: currentColor; transition: transform .2s, opacity .2s, top .2s; }
	.dt-nav__hamb i:nth-child(1) { top: 0; }
	.dt-nav__hamb i:nth-child(2) { top: 5px; }
	.dt-nav__hamb i:nth-child(3) { top: 10px; }
	.dt-nav.abierta .dt-nav__hamb i:nth-child(1) { top: 5px; transform: rotate(45deg); }
	.dt-nav.abierta .dt-nav__hamb i:nth-child(2) { opacity: 0; }
	.dt-nav.abierta .dt-nav__hamb i:nth-child(3) { top: 5px; transform: rotate(-45deg); }
	.dt-nav__menu { display: none; }
	.dt-nav.abierta .dt-nav__menu {
		display: block; position: fixed; inset: 0; z-index: 1000; overflow-y: auto; overscroll-behavior: contain;
		background: var(--dh-bg); padding: 78px 16px 40px; animation: dt-menu .2s ease-out;
	}
	html.dt-menu-abierto { overflow: hidden; }
	.dt-nav__grupo { border-bottom: 1px solid var(--dh-border); }
	.dt-nav__boton { width: 100%; font-size: 18px; padding: 16px 6px; justify-content: flex-start; }
	.dt-nav__boton .dt-nav__flecha { margin-left: auto; width: 16px; height: 16px; }
	.dt-nav__grupo.is-actual > .dt-nav__boton, .dt-nav__boton.is-actual { box-shadow: none; }
	.dt-nav__boton:hover, .dt-nav__grupo.abierto > .dt-nav__boton { background: none; }
	.dt-nav__panel { position: static; transform: none; width: auto; box-shadow: none; border: 0; padding: 0 0 14px; background: none; grid-template-columns: minmax(0, 1fr); border-radius: 0; }
	.dt-nav__grupo.abierto .dt-nav__panel { display: grid; animation: none; }
	.dt-nav__items { grid-template-columns: minmax(0, 1fr); }
	.dt-nav__item { background: var(--dh-surface); border: 1px solid var(--dh-border); margin-bottom: 6px; }
	.dt-nav__destacado { order: 2; }
}
@keyframes dt-menu { from { opacity: 0; } }
@media (max-width: 600px) {
	.dt-logo__svg { height: 38px; }
	.site-header .inside-header { padding-left: 16px; padding-right: 16px; }
}

/* ---------------------------------------------------------------- componente Termómetro */
.dt-termo {
	display: flex; flex-direction: column; gap: 8px; padding: 16px; min-width: 0;
	background: var(--dh-surface); border: 1px solid var(--dh-border); border-radius: var(--dh-radius); box-shadow: var(--dh-shadow);
	color: var(--dh-ink) !important; text-decoration: none !important;
}
a.dt-termo { transition: transform .2s, box-shadow .2s; }
a.dt-termo:hover { transform: translateY(-3px); box-shadow: var(--dh-shadow-hover); }
.dt-termo__cab { display: flex; justify-content: space-between; align-items: center; gap: 6px 8px; flex-wrap: wrap; }
.dt-termo__nombre { font-size: 14px; font-weight: 700; color: var(--dh-ink-2); }
.dt-termo__cifra { font-size: 26px; line-height: 1.1; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.dt-termo__cifra small { font-size: 14px; font-weight: 500; letter-spacing: 0; color: var(--dh-muted); }
.dt-termo__tubo { position: relative; display: block; height: 26px; }
.dt-termo__tubo::before {
	content: ""; position: absolute; left: 13px; right: 0; top: 5px; height: 16px; border-radius: 999px;
	background: var(--dh-surface-2); box-shadow: inset 0 0 0 2px var(--dh-ink);
}
.dt-termo__mercurio {
	position: absolute; left: 20px; top: 10px; height: 6px; border-radius: 999px;
	width: max(8px, calc(var(--pos) - 26px)); transition: width 1.3s cubic-bezier(.2, .8, .2, 1) .1s;
}
.dt-termo__bulbo {
	position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; z-index: 1;
	box-shadow: inset 0 0 0 2px var(--dh-ink); display: grid; place-items: center; font-size: 13px; font-weight: 800; color: #fff;
}
.dt-termo__ext { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--dh-muted); font-variant-numeric: tabular-nums; }
.dt-termo__ext span:last-child { text-align: right; }
.dt-termo__pie { font-size: 12px; color: var(--dh-muted); }
.dt-termo--compacto { padding: 12px 14px; gap: 6px; }
.dt-termo--compacto .dt-termo__cifra { font-size: 22px; }

/* colores del mercurio y del bulbo: escala divergente (el centro, gris visible dentro del tubo) */
.dt-termo__mercurio.b2, .dt-termo__bulbo.b2, .dt-bolsillo__mercurio.b2, .dt-bolsillo__bulbo.b2 { background: var(--dh-div-b2); }
.dt-termo__mercurio.b1, .dt-termo__bulbo.b1, .dt-bolsillo__mercurio.b1, .dt-bolsillo__bulbo.b1 { background: var(--dh-div-b1); }
.dt-termo__mercurio.m, .dt-termo__bulbo.m, .dt-bolsillo__mercurio.m, .dt-bolsillo__bulbo.m { background: var(--dh-muted); }
.dt-termo__mercurio.r1, .dt-termo__bulbo.r1, .dt-bolsillo__mercurio.r1, .dt-bolsillo__bulbo.r1 { background: var(--dh-div-r1); }
.dt-termo__mercurio.r2, .dt-termo__bulbo.r2, .dt-bolsillo__mercurio.r2, .dt-bolsillo__bulbo.r2 { background: var(--dh-div-r2); }
.dt-termo__bulbo.b1, .dt-termo__bulbo.r1, .dt-bolsillo__bulbo.b1, .dt-bolsillo__bulbo.r1 { color: #0b1a2e; }

/* el mercurio sube cuando el bloque entra en pantalla */
html.dt-js .dt-reveal:not(.is-visible) .dt-termo__mercurio { width: 8px; }
html.dt-js .dt-reveal:not(.is-visible) .dt-bolsillo__mercurio { width: 12px; }

/* récords con termómetros */
.dt-records .dt-termo { height: 100%; }

/* ---------------------------------------------------------------- Termómetro del bolsillo */
.dt-bolsillo { margin: 28px 0; padding: 24px; border-radius: 20px; background: var(--dh-surface); border: 1px solid var(--dh-border); box-shadow: var(--dh-shadow); }
.dt-bolsillo__cab { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 24px; flex-wrap: wrap; }
.dt-bolsillo__kicker { margin: 0 0 6px; font-size: 12.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--dh-brand-ink); }
.dt-bolsillo__titulo { margin: 0; font-size: clamp(1.35rem, 2.6vw, 1.9rem); line-height: 1.25; max-width: 32ch; }
.dt-bolsillo__frase { font-style: normal; padding: 0 .28em; border-radius: 8px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.dt-bolsillo__frase.b2 { background: var(--dh-div-b2); color: #fff; }
.dt-bolsillo__frase.b1 { background: var(--dh-div-b1); color: #0b1a2e; }
.dt-bolsillo__frase.m { background: var(--dh-surface-2); color: var(--dh-ink); box-shadow: inset 0 0 0 1px var(--dh-border); }
.dt-bolsillo__frase.r1 { background: var(--dh-div-r1); color: #0b1a2e; }
.dt-bolsillo__frase.r2 { background: var(--dh-div-r2); color: #fff; }
.dt-bolsillo__nota { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.dt-bolsillo__num { font-size: 60px; font-weight: 800; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.dt-bolsillo__num small { font-size: 20px; font-weight: 600; letter-spacing: 0; color: var(--dh-muted); }
.dt-bolsillo__nota .dt-var { font-size: 14px; font-weight: 700; }
.dt-bolsillo__spark { width: 120px; height: 30px; }
.dt-bolsillo__spark polyline { fill: none; stroke: var(--dh-brand); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.dt-bolsillo__escala { display: block; margin: 22px 0 6px; }
.dt-bolsillo__tubo { position: relative; display: block; height: 44px; }
.dt-bolsillo__tubo::before {
	content: ""; position: absolute; left: 22px; right: 0; top: 9px; height: 26px; border-radius: 999px;
	box-shadow: inset 0 0 0 3px var(--dh-ink);
	background: linear-gradient(90deg,
		color-mix(in srgb, var(--dh-div-b2) 16%, var(--dh-surface)) 0 20%,
		color-mix(in srgb, var(--dh-div-b1) 16%, var(--dh-surface)) 20% 40%,
		var(--dh-surface-2) 40% 60%,
		color-mix(in srgb, var(--dh-div-r1) 18%, var(--dh-surface)) 60% 80%,
		color-mix(in srgb, var(--dh-div-r2) 16%, var(--dh-surface)) 80% 100%);
}
.dt-bolsillo__mercurio {
	position: absolute; left: 32px; top: 17px; height: 10px; border-radius: 999px;
	width: max(12px, calc(var(--pos) - 40px)); transition: width 1.6s cubic-bezier(.2, .8, .2, 1) .2s;
}
.dt-bolsillo__bulbo {
	position: absolute; left: 0; top: 0; width: 44px; height: 44px; border-radius: 50%; z-index: 1;
	box-shadow: inset 0 0 0 3px var(--dh-ink); display: grid; place-items: center; font-size: 20px; font-weight: 800; color: #fff;
}
.dt-bolsillo__zonas { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 6px 0 0 22px; font-size: 12.5px; color: var(--dh-muted); text-align: center; }
.dt-bolsillo__zona.is-actual { color: var(--dh-ink); font-weight: 800; }
.dt-bolsillo__partes { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 20px; }
.dt-bolsillo__metodo { margin-top: 16px; font-size: 14px; color: var(--dh-ink-2); }
.dt-bolsillo__metodo summary { cursor: pointer; font-weight: 700; color: var(--dh-brand-ink); }
.dt-bolsillo__metodo p { margin: 8px 0 0; max-width: 75ch; }
@media (max-width: 600px) {
	.dt-bolsillo { padding: 18px 16px; }
	.dt-bolsillo__nota { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
	.dt-bolsillo__num { font-size: 46px; }
	.dt-bolsillo__zonas { font-size: 10.5px; }
	.dt-bolsillo__partes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
	.dt-bolsillo__partes .dt-termo { padding: 10px; }
	.dt-bolsillo__partes .dt-termo__cifra { font-size: 18px; }
	.dt-bolsillo__partes .dt-termo__ext, .dt-bolsillo__partes .dt-termo__pie { display: none; }
}

/* ---------------------------------------------------------------- Lo que más se mueve hoy */
.dt-mueve { margin: 18px 0 6px; }
.dt-mueve__tit { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 10px; font-weight: 800; font-size: 15px; }
.dt-mueve__tit small { font-weight: 500; font-size: 13px; color: var(--dh-muted); }
.dt-mueve__lista { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 2px 8px; scrollbar-width: thin; }
.dt-mueve__item {
	flex: 0 0 auto; scroll-snap-align: start; display: flex; align-items: center; gap: 10px; padding: 8px 16px 8px 8px;
	background: var(--dh-surface); border: 1px solid var(--dh-border); border-radius: 999px; box-shadow: var(--dh-shadow);
	color: var(--dh-ink) !important; text-decoration: none !important; transition: transform .2s, box-shadow .2s;
}
.dt-mueve__item:hover { transform: translateY(-2px); box-shadow: var(--dh-shadow-hover); }
.dt-mueve__ico { width: 34px; height: 34px; border-radius: 50%; background: var(--dh-surface-2); display: grid; place-items: center; font-size: 16px; font-weight: 800; }
.dt-mueve__txt { display: flex; flex-direction: column; line-height: 1.2; }
.dt-mueve__n { font-size: 14px; font-weight: 700; }
.dt-mueve__d { font-size: 12px; color: var(--dh-muted); font-variant-numeric: tabular-nums; }
.dt-mueve__item .dt-var { font-size: 14px; white-space: nowrap; font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
	.dt-logo rect[y="74"], .dt-nav__panel, .dt-nav__menu { animation: none !important; }
	.dt-termo__mercurio, .dt-bolsillo__mercurio { transition: none; }
}

/* menú: alineación y botón de cierre fijo en móvil */
.dt-nav__menu, .dt-nav__panel { text-align: left; }
@media (max-width: 1000px) {
	.dt-nav.abierta .dt-nav__abrir { position: fixed; top: 16px; right: 16px; }
	.dt-nav.abierta .dt-nav__menu { padding-top: 72px; }
}

/* ---------------------------------------------------------------- pie compacto */
.dt-pie { background: var(--dh-hero-1); color: #c9d7ea; }
.dt-pie__in {
	max-width: 1180px; margin: 0 auto; padding: 40px 24px 28px;
	display: grid; grid-template-columns: minmax(220px, 1.5fr) repeat(4, minmax(0, 1fr)); gap: 28px 32px; font-size: 13.5px; line-height: 1.5;
}
.dt-pie h2 { color: #fff; font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; margin: 0 0 10px; }
.dt-pie ul { list-style: none; margin: 0; padding: 0; }
.dt-pie li { margin: 0 0 6px; }
.dt-pie a { color: #c9d7ea; text-decoration: none; }
.dt-pie a:hover { color: #fff; text-decoration: underline; }
.dt-pie__marca p { margin: 12px 0 14px; font-size: 13.5px; max-width: 30ch; }
.dt-pie__tg { display: inline-block; padding: 7px 14px; border-radius: 999px; background: rgba(255, 255, 255, .08); color: #fff !important; font-weight: 700; font-size: 13px; }
.dt-pie__tg:hover { background: rgba(255, 255, 255, .16); text-decoration: none !important; }
.dt-pie__prov { grid-column: 1 / -1; border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 20px; }
.dt-pie__prov ul { display: flex; flex-wrap: wrap; gap: 4px 0; font-size: 12.5px; }
.dt-pie__prov li { margin: 0; }
.dt-pie__prov li:not(:last-child)::after { content: "·"; margin: 0 8px; color: rgba(201, 215, 234, .4); }
.site-info { background: var(--dh-hero-1) !important; color: rgba(201, 215, 234, .75) !important; border-top: 1px solid rgba(255, 255, 255, .08); font-size: 12.5px; }
.site-info .inside-site-info { padding-top: 16px; padding-bottom: 16px; }
.site-info a { color: #fff !important; font-weight: 700; text-decoration: none; }
.site-info a:hover { text-decoration: underline; }
@media (max-width: 900px) {
	.dt-pie__in { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 20px; padding: 32px 16px 24px; }
	.dt-pie__marca { grid-column: 1 / -1; }
}

/* ---------------------------------------------------------------- municipio: buen momento y cercanos */
.dt-momento__grid { display: grid; grid-template-columns: minmax(260px, 340px) 1fr; gap: 20px; align-items: center; }
.dt-momento__txt { margin: 0; font-size: 17px; line-height: 1.55; }
.dt-cerca-mun .dt-table td:nth-child(n+2), .dt-cerca-mun .dt-table th:nth-child(n+2) { white-space: nowrap; font-variant-numeric: tabular-nums; }
.dt-nota { font-size: 13px; color: var(--dh-muted); }
@media (max-width: 700px) { .dt-momento__grid { grid-template-columns: 1fr; } }
.dt-momento, .dt-cerca-mun { margin: 0 0 32px; }

/* provincia: extremos y vecinas */
.dt-extremos, .dt-vecinas { margin: 0 0 32px; }
.dt-extremos__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.dt-extremos__grid > div { background: var(--dh-surface); border: 1px solid var(--dh-border); border-radius: var(--dh-radius); padding: 16px 18px; }
.dt-extremos h3 { margin: 0 0 8px; font-size: 16px; }
.dt-extremos ol { margin: 0; padding-left: 22px; }
.dt-extremos li { margin: 0 0 6px; font-variant-numeric: tabular-nums; }
.dt-extremos li .dt-var { font-size: 13px; }
.dt-fila-actual td { background: var(--dh-surface-2); }
@media (max-width: 700px) { .dt-extremos__grid { grid-template-columns: minmax(0, 1fr); } }
