/* Esto es tu Viña · mobile-first, sin dependencias. Identidad neutral y cívica hasta definir promotor. */
/* Leyenda independiente: los colores de evacuación no representan usos del PRC. */
#tsunami-estado:empty { display: none; }
.tsunami-info { margin: 12px 0; padding: 12px; border: 1px solid #e2e5eb; border-radius: 10px; }
.tsunami-info p, .tsunami-fuentes { font-size: 12px; line-height: 1.5; }
.tsunami-info p { margin: 10px 0 0; }
.tsunami-leyenda { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 12px; }
.tsunami-leyenda li { display: flex; align-items: center; gap: 8px; }
.tsunami-muestra { display: inline-block; width: 20px; flex: 0 0 20px; }
.tsunami-muestra.area { height: 13px; background: #1d4ed829; border: 2px dashed #1d4ed8; }
.tsunami-muestra.via { border-top: 3px solid #0f172a; }
.tsunami-muestra.punto { width: 12px; height: 12px; flex-basis: 12px; margin: 0 4px; border-radius: 50%; background: #166534; border: 2px solid #fff; outline: 1px solid #166534; }
:root {
  --ink: #12233a; --muted: #55627a; --line: #dfe4ec; --bg: #f5f7fa; --paper: #fff;
  --sea: #0b3d6b; --sea-2: #145a92; --accent: #0a58b8; --accent-ink: #fff; --sand: #f6efe3;
  /* Tonos de resultado: siempre acompañados de texto, nunca solo color. */
  --down: #b42318; --down-bg: #fdecea;
  --warn: #b25e09; --warn-bg: #fff3e0;
  --up: #1b7a3d; --up-bg: #e7f5ec;
  --same: #1d6a7a; --same-bg: #e3f2f5;
  --change: #6b3fb0; --change-bg: #f1ebfb;
  --unknown: #5b6474; --unknown-bg: #eef0f3;
  --r: 14px;
  font: 17px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink); background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; }
.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }
:focus-visible { outline: 3px solid #f5b400; outline-offset: 2px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; background: #fff; padding: 8px 12px; z-index: 10; }

/* Header */
.top { background: var(--sea); color: #fff; }
.top-row { display: flex; justify-content: space-between; align-items: center; min-height: 52px; gap: 12px; }
.brand { color: #fff; font-weight: 800; text-decoration: none; letter-spacing: -.01em; }
.top-nav { display: none; gap: 18px; }
.top-nav a { color: #dbe8f6; text-decoration: none; font-size: .9rem; }

/* Hero */
.hero { background: linear-gradient(180deg, var(--sea), var(--sea-2)); color: #fff; padding: 20px 0 36px; }
.deadline { display: inline-block; margin: 0 0 14px; font-size: .85rem; font-weight: 600; background: rgba(255,255,255,.15); padding: 4px 12px; border-radius: 999px; }
.hero h1 { font-size: clamp(2rem, 7vw, 3rem); margin: 0 0 10px; letter-spacing: -.02em; }
.lead { font-size: 1.08rem; margin: 0; max-width: 38em; color: #e6eef8; }
.search { margin-top: 22px; background: var(--paper); color: var(--ink); padding: 18px; border-radius: var(--r); max-width: 580px; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.search label { font-weight: 700; display: block; margin-bottom: 8px; }
.search-row { display: flex; flex-direction: column; gap: 10px; }
.search input { font-size: 1.25rem; padding: 14px 16px; border: 2px solid var(--line); border-radius: 12px; width: 100%; }
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(10,88,184,.15); }
.search button[type=submit] { min-height: 52px; }
.help { margin-top: 10px; font-size: .9rem; }
.help summary { color: var(--accent); cursor: pointer; font-weight: 600; }
.examples { margin: 12px 0 0; font-size: .9rem; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.chip { border: 1px solid var(--line); background: var(--bg); border-radius: 999px; padding: 6px 12px; font: inherit; cursor: pointer; min-height: 36px; }
.privacy { margin: 10px 0 0; font-size: .8rem; color: var(--muted); }

/* Botones */
.btn, .search button[type=submit] { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 10px 18px; border-radius: 12px; border: 2px solid var(--line); background: var(--paper); color: var(--ink); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn.primary, .search button[type=submit] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* Resultado */
.result { outline: none; }
.notice { background: #fff8e6; border: 1px solid #f0d290; padding: 12px 14px; border-radius: 12px; margin-bottom: 16px; }
.ficha { border: 1px solid var(--line); border-radius: var(--r); padding: 20px 18px; margin-bottom: 20px; background: var(--paper); }
.eyebrow { margin: 0 0 6px; font-size: .85rem; color: var(--muted); font-weight: 600; }
.ficha h2 { font-size: clamp(1.4rem, 5vw, 1.9rem); margin: 0 0 14px; outline: none; }
.verdicts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.verdict { display: inline-flex; flex-direction: column; padding: 8px 14px; border-radius: 12px; font-weight: 800; font-size: 1.05rem; border-left: 6px solid currentColor; }
.verdict small { font-weight: 600; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; opacity: .85; }
.t-down { color: var(--down); background: var(--down-bg); }
.t-warn { color: var(--warn); background: var(--warn-bg); }
.t-up { color: var(--up); background: var(--up-bg); }
.t-same { color: var(--same); background: var(--same-bg); }
.t-change { color: var(--change); background: var(--change-bg); }
.t-unknown { color: var(--unknown); background: var(--unknown-bg); }

.compare { display: grid; gap: 12px; }
.row { display: grid; grid-template-columns: 1fr; gap: 6px; background: var(--bg); border-radius: 12px; padding: 14px; }
.row h3 { margin: 0; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.row p { margin: 0; }
.when { font-size: .78rem; font-weight: 700; color: var(--muted); margin-top: 6px !important; }
.arrow { display: none; }
.big { font-size: 1.12rem; font-weight: 700; }
.mini { margin-top: 6px; font-size: .88rem; }
.mini summary { cursor: pointer; color: var(--accent); }
.cats { list-style: none; padding: 0; margin: 4px 0 0; }
.cats li { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 6px; }
.sw { width: 16px; height: 16px; border-radius: 4px; flex: none; margin-top: 4px; border: 1px solid rgba(0,0,0,.15); }
.explain-alt { margin: 14px 0 0; }
.flag { background: #e6f4f1; padding: 10px 12px; border-radius: 10px; }
.unknowns { margin-top: 16px; border-left: 4px solid var(--line); padding: 2px 0 2px 14px; }
.unknowns h3, .ideas h3 { margin: 0 0 4px; font-size: 1rem; }
.unknowns p { margin: 0; color: var(--muted); }
.ideas { margin-top: 18px; background: var(--sand); border-radius: 12px; padding: 14px 16px; }
.ideas ul { margin: 6px 0; padding-left: 20px; }
.actions { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 18px 0 8px; }
.fine { font-size: .8rem; color: var(--muted); margin: 6px 0 0; }

/* Mapa */
.wrap-wide { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.explora { padding: 24px 0 8px; }
.explora-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 12px; }
.explora-head h2 { margin: 0; }
.map-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.toggle { display: inline-flex; border: 2px solid var(--line); border-radius: 12px; padding: 3px; margin: 0; }
.toggle label { position: relative; }
.toggle input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.toggle span { display: block; padding: 8px 16px; border-radius: 9px; font-weight: 700; min-width: 76px; text-align: center; }
.toggle input:checked + span { background: var(--accent); color: #fff; }
.toggle input:focus-visible + span { outline: 3px solid #f5b400; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: .95rem; cursor: pointer; }
.check input { width: 20px; height: 20px; }
.map-layout { display: grid; gap: 16px; }
.map-box { position: relative; }
#map { height: 56vh; min-height: 340px; border-radius: var(--r); overflow: hidden; background: var(--bg); }
#map.sin-mapa::after { content: "El mapa no se pudo cargar en este navegador. Puedes buscar tu terreno por rol."; display: grid; place-items: center; height: 100%; padding: 20px; text-align: center; color: var(--muted); }
.map-legend { position: absolute; left: 10px; bottom: 30px; background: rgba(255,255,255,.95); border-radius: 12px; padding: 10px 12px; font-size: .8rem; max-width: min(320px, calc(100% - 20px)); box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.map-legend p { margin: 0 0 6px; font-weight: 600; }
.map-legend .fine { margin: 6px 0 0; font-weight: 400; }
.map-legend ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.map-legend li { display: flex; gap: 8px; align-items: center; }
.map-legend .sw { margin: 0; }
.ramp { height: 10px; border-radius: 5px; background: linear-gradient(90deg, #eef2f7, var(--c)); display: flex; justify-content: space-between; font-size: .7rem; color: var(--muted); padding-top: 12px; height: auto; background-size: 100% 10px; background-repeat: no-repeat; }
.placeholder { border: 2px dashed var(--line); border-radius: var(--r); padding: 20px; color: var(--muted); }
.placeholder .big { color: var(--ink); }
.notice.alt { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* Manzana */
.mzbox { border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; margin-bottom: 24px; }
.mzbox h3 { margin: 0; }
svg.mz { width: 100%; height: auto; max-height: 440px; background: var(--bg); border-radius: 10px; margin-top: 10px; }
svg.mz path { cursor: pointer; stroke: #fff; stroke-width: 1; fill-opacity: .5; fill: currentColor; }
svg.mz path.sel { fill-opacity: .95; stroke: #111; stroke-width: 3; }
svg.mz path:hover, svg.mz path:focus { fill-opacity: .85; outline: none; stroke: #111; stroke-width: 2; }
.legend { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .85rem; }
.legend li { display: flex; gap: 6px; align-items: center; background: none; }
.legend .sw { margin-top: 0; background: currentColor; }

/* Secciones */
.band { background: var(--bg); padding: 36px 0; }
.section { padding-top: 36px; padding-bottom: 36px; }
h2 { font-size: clamp(1.45rem, 4.5vw, 1.9rem); margin: 0 0 8px; letter-spacing: -.01em; }
.section-lead { color: var(--muted); max-width: 40em; margin-top: 0; }
.two { display: grid; gap: 14px; margin-top: 16px; }
.explain { background: var(--paper); border-radius: var(--r); padding: 16px 18px; border: 1px solid var(--line); }
.explain h3 { margin: 0 0 6px; }
.scale { list-style: none; padding: 0; margin: 14px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; align-items: end; height: 150px; }
.scale li { height: var(--h); background: linear-gradient(180deg, #7da7d9, #3d6fb0); border-radius: 8px 8px 4px 4px; color: #fff; display: flex; flex-direction: column; justify-content: flex-end; padding: 6px; font-size: .78rem; }
.scale b { font-size: .95rem; }
.callout { margin-top: 16px; background: var(--paper); border-left: 6px solid var(--accent); padding: 12px 16px; border-radius: 8px; }
.steps { padding-left: 22px; }
.steps li { margin-bottom: 10px; }
details { border-bottom: 1px solid var(--line); padding: 12px 0; }
details > summary { font-weight: 700; cursor: pointer; }
details p { margin: 8px 0 0; }
.help, .mini { border: 0; padding: 0; }

.foot { border-top: 1px solid var(--line); font-size: .85rem; color: var(--muted); padding: 18px 0 90px; }

/* CTA fijo en móvil cuando hay una ficha */
.sticky-cta { position: fixed; left: 0; right: 0; bottom: 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.96); border-top: 1px solid var(--line); z-index: 5; }
.sticky-cta .btn { width: 100%; }

@media (min-width: 720px) {
  .top-nav { display: flex; }
  .hero { padding: 28px 0 48px; }
  .search-row { flex-direction: row; }
  .search-row input { flex: 1; }
  .row { grid-template-columns: 90px 1fr 24px 1fr; align-items: start; }
  .row h3 { padding-top: 6px; }
  .arrow { display: block; color: var(--muted); padding-top: 26px; font-size: 1.2rem; }
  .actions { display: flex; flex-wrap: wrap; }
  .actions .btn { white-space: nowrap; }
  .actions .btn.primary { flex: 1 1 100%; }
  .two { grid-template-columns: 1fr 1fr; }
  .sticky-cta { display: none; }
}
@media (min-width: 900px) {
  .map-layout { grid-template-columns: minmax(0, 1.45fr) minmax(360px, 1fr); align-items: start; }
  .map-box { position: sticky; top: 12px; }
  #map { height: calc(100vh - 120px); max-height: 820px; }
  .result { max-height: calc(100vh - 120px); overflow: auto; }
  .ficha { margin-bottom: 0; }
  .ficha .row { grid-template-columns: 1fr; }
  .ficha .arrow { display: none; }
  .actions .btn { flex: 1 1 auto; }
  .foot { padding-bottom: 18px; }
}

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

/* Imprimir: solo la ficha */
@media print {
  .top, .hero, .band, .section, .foot, .sticky-cta, .actions, .notice, .explora-head, .map-box, .placeholder { display: none !important; }
  .result { display: block !important; padding: 0; }
  .ficha { border: 0; padding: 0; }
  .ficha::after { content: "Opina hasta el 27 de noviembre de 2026 en prc.munivina.cl/observaciones"; display: block; margin-top: 16px; font-weight: 700; }
  details.mini > *:not(summary) { display: block; }
}

/* Leyenda compacta en móvil: no tapar el terreno */
@media (max-width: 899px) {
  .map-legend { bottom: 26px; padding: 6px 8px; font-size: .72rem; max-width: calc(100% - 60px); }
  .map-legend ul { display: flex; flex-wrap: wrap; gap: 2px 10px; }
  .map-legend .sw { width: 12px; height: 12px; }
}

/* ===================== App con mapa a pantalla completa ===================== */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.top-link { color: #dbe8f6; text-decoration: none; font-size: .9rem; font-weight: 600; white-space: nowrap; }
.page .top-row { max-width: 860px; margin: 0 auto; padding: 0 16px; }
body.app { height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.app .top-row { padding: 0 16px; min-height: 52px; }
.app .deadline { margin: 0 auto 0 12px; font-size: .78rem; padding: 3px 10px; background: rgba(255,255,255,.16); }

.franja { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 12px; border-bottom: 1px solid var(--line); background: #fff; min-height: 44px; }
.franja ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 2px; font-size: .9rem; }
.franja li + li::before { content: "›"; color: var(--muted); margin: 0 6px; }
.franja button { border: 0; background: none; font: inherit; color: var(--ink); font-weight: 600; cursor: pointer; padding: 4px 2px; }
.franja button:hover { color: var(--accent); }
.franja [aria-current] { color: var(--muted); }
.franja .share { border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-weight: 600; font-size: .85rem; white-space: nowrap; }

.stage { position: relative; flex: 1; min-height: 0; }
.app #map { position: absolute; inset: 0; height: auto; min-height: 0; border-radius: 0; max-height: none; }

/* Panel flotante (escritorio) */
.panel { position: absolute; z-index: 3; left: 16px; top: 16px; bottom: 16px; width: 400px; display: flex; flex-direction: column; background: #fff; border-radius: 16px; box-shadow: 0 8px 28px rgba(0,0,0,.18); overflow: hidden; }
.panel.cerrado .panel-body { display: none; }
.panel.cerrado { bottom: auto; }
.handle { display: flex; align-items: center; gap: 10px; border: 0; background: #fff; padding: 10px 16px; font: inherit; cursor: pointer; border-bottom: 1px solid var(--line); text-align: left; }
.handle span { width: 36px; height: 4px; border-radius: 2px; background: #c7ced8; display: none; }
.handle b { font-size: .85rem; color: var(--muted); }
.panel-body { overflow: auto; padding: 18px 18px 22px; flex: 1; }
.panel h1 { font-size: 1.45rem; margin: 0 0 6px; letter-spacing: -.01em; }
.panel .sub { margin: 0 0 14px; color: var(--muted); }
.app .search { margin: 0; padding: 0; box-shadow: none; max-width: none; }
.combo { position: relative; }
.combo .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 1.2rem; pointer-events: none; }
.combo input { width: 100%; font-size: 1.05rem; padding: 14px 14px 14px 40px; border: 2px solid var(--line); border-radius: 12px; }
.combo input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(10,88,184,.15); }
.sugerencias { position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 4px); list-style: none; margin: 0; padding: 4px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.14); }
.sugerencias li { padding: 10px 12px; border-radius: 8px; cursor: pointer; display: flex; flex-direction: column; }
.sugerencias li small { color: var(--muted); }
.sugerencias li[aria-selected="true"], .sugerencias li:hover { background: var(--bg); }
.link-btn { border: 0; background: none; color: var(--accent); font: inherit; font-weight: 700; cursor: pointer; padding: 10px 0; }
.link-btn.back { padding: 0 0 10px; }
.app .examples { margin: 0 0 12px; }
.tools { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 4px; display: grid; gap: 10px; }
.tools-t { margin: 0; font-weight: 700; font-size: .9rem; }
.app .toggle { width: max-content; }
.app .notice { margin: 12px 0 0; font-size: .92rem; }
.app .privacy { margin-top: 14px; }
.app .result { max-height: none; overflow: visible; }
.app .ficha { border: 0; padding: 0; }
.app .ficha .row { grid-template-columns: 1fr; }
.app .ficha .arrow { display: none; }
.app .actions { display: grid; grid-template-columns: 1fr 1fr; }
.app .actions .btn.primary { grid-column: 1 / -1; }
.app .actions .btn { white-space: normal; font-size: .92rem; }

/* Leyenda: píldora abajo, centrada en el área libre del mapa */
.app .map-legend { left: calc(50% + 208px); transform: translateX(-50%); bottom: 22px; border-radius: 14px; max-width: min(560px, calc(100% - 460px)); }
.app .map-legend ul { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.app .map-legend .ramp { min-width: 240px; }

/* Móvil: el panel es una hoja inferior */
@media (max-width: 899px) {
  .app .top .deadline { display: none; }
  .panel { left: 0; right: 0; bottom: 0; top: auto; width: auto; max-height: 62%; border-radius: 18px 18px 0 0; box-shadow: 0 -6px 24px rgba(0,0,0,.18); }
  .panel.cerrado { bottom: 0; }
  .handle { flex-direction: column; gap: 6px; padding: 8px 16px; }
  .handle span { display: block; }
  .panel h1 { font-size: 1.15rem; }
  .panel .sub { display: none; }
  .app .examples { margin-bottom: 8px; }
  .tools { grid-template-columns: auto 1fr; align-items: center; padding-top: 10px; }
  .tools-t { display: none; }
  .app .privacy { font-size: .75rem; margin-top: 10px; }
  .panel-body { padding: 14px 16px calc(18px + env(safe-area-inset-bottom)); }
  .app .map-legend { left: 10px; right: auto; transform: none; top: 10px; bottom: auto; max-width: calc(100% - 64px); padding: 6px 10px; }
  .app .map-legend .ramp { min-width: 160px; }
  .app .map-legend .fine { display: none; }
}

/* Imprimir la ficha desde la app */
@media print {
  body.app { height: auto; overflow: visible; display: block; }
  .franja, #map, .map-legend, .handle, #buscar, .back { display: none !important; }
  .panel { position: static; box-shadow: none; width: auto; }
}

/* ===================== Ficha: modal a la derecha ===================== */
.drawer { position: absolute; z-index: 6; top: 16px; right: 16px; bottom: 16px; width: 460px; display: flex; flex-direction: column; background: #fff; border-radius: 16px; box-shadow: 0 10px 34px rgba(0,0,0,.24); overflow: hidden; animation: entra .22s ease-out; }
.drawer[hidden] { display: none; }
@keyframes entra { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .drawer { animation: none; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px 10px 18px; border-bottom: 1px solid var(--line); }
.drawer-rol { margin: 0; font-weight: 700; font-size: .9rem; color: var(--muted); }
.drawer-close { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--bg); font-size: 1rem; cursor: pointer; }
.drawer-close:hover { background: var(--line); }
.drawer-body { flex: 1; overflow: auto; }
.gmap { margin: 0; position: relative; }
.gmap iframe { display: block; width: 100%; height: 230px; border: 0; background: var(--bg); }
.gmap figcaption { position: absolute; right: 8px; bottom: 30px; }
.gmap figcaption a { background: rgba(255,255,255,.95); padding: 4px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; text-decoration: none; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.drawer .ficha { padding: 16px 18px 20px; border: 0; margin: 0; }
.drawer .ficha h2 { font-size: 1.35rem; margin-bottom: 12px; }
.drawer .verdicts { margin-bottom: 14px; }
.share-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 0 14px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.share-row > span { font-size: .8rem; font-weight: 700; color: var(--muted); margin-right: 4px; }
.sbtn { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: .85rem; font-weight: 600; color: var(--ink); text-decoration: none; cursor: pointer; }
.sbtn:hover { border-color: var(--accent); color: var(--accent); }
.sec { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 18px 0 8px; }
.drawer .compare .row { grid-template-columns: 1fr 1fr; gap: 6px 14px; }
.drawer .compare .row h3 { grid-column: 1 / -1; }
.datos { display: grid; grid-template-columns: 130px 1fr; gap: 6px 12px; margin: 0; font-size: .92rem; }
.datos dt { color: var(--muted); }
.datos dd { margin: 0; }
.drawer-cta { border-top: 1px solid var(--line); padding: 12px 18px calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, #f2f7fd, #e8f1fb); display: grid; gap: 4px; }
.cta-k { font-weight: 700; color: var(--accent); }
.cta-t { margin: 0; font-weight: 800; font-size: 1rem; line-height: 1.25; }
.cta-d { margin: 0 0 6px; font-size: .8rem; color: var(--muted); }
.drawer-cta .btn { width: 100%; }
.cta-help { font-size: .78rem; text-align: center; }
.drawer-cta .btn { min-height: 46px; }

/* La leyenda se corre para no quedar bajo el modal */
body.con-ficha .app .map-legend, body.app.con-ficha .map-legend { left: calc(50% - 30px); max-width: calc(100% - 960px); }

@media (max-width: 1180px) and (min-width: 900px) {
  body.con-ficha .panel { display: none; }
  body.app.con-ficha .map-legend { left: 16px; transform: none; max-width: calc(100% - 520px); }
}

/* Móvil: la ficha ocupa la pantalla, como hoja que sube */
@media (max-width: 899px) {
  .drawer { top: 0; right: 0; bottom: 0; left: 0; width: auto; border-radius: 0; animation-name: sube; }
  @keyframes sube { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
  .gmap iframe { height: 200px; }
  .datos { grid-template-columns: 110px 1fr; }
}

@media print {
  .drawer { position: static; box-shadow: none; width: auto; display: block; }
  .drawer-head .drawer-close, .share-row, .gmap iframe, .panel { display: none !important; }
  .drawer-body { overflow: visible; }
}

/* ===================== Diálogo: preparar la observación ===================== */
.pasos { list-style: none; display: flex; gap: 8px; margin: 0; padding: 0 20px 12px; border-bottom: 1px solid var(--line); font-size: .85rem; color: var(--muted); font-weight: 600; }
.pasos li { display: flex; align-items: center; gap: 6px; }
.pasos li + li::before { content: ""; width: 24px; height: 2px; background: var(--line); margin-right: 2px; }
.pasos span { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--line); color: var(--ink); font-size: .75rem; }
.pasos li[aria-current] { color: var(--ink); }
.pasos li[aria-current] span { background: var(--accent); color: #fff; }
.terreno-chip { display: flex; flex-direction: column; background: var(--bg); border-left: 4px solid var(--accent); border-radius: 8px; padding: 8px 12px; margin-bottom: 16px; font-size: .9rem; }
.terreno-chip span { color: var(--muted); }
.campo { margin: 0 0 16px; border: 0; padding: 0; }
.campo label, .campo legend { display: block; font-weight: 700; margin-bottom: 6px; }
.req { color: var(--down); }
.campo select, .campo textarea { width: 100%; font: inherit; padding: 12px; border: 2px solid var(--line); border-radius: 10px; background: #fff; }
.campo textarea { resize: vertical; min-height: 180px; line-height: 1.5; }
.campo select:focus, .campo textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(10,88,184,.15); }
.ayuda { margin: 6px 0 0; font-size: .82rem; color: var(--muted); }
.ayuda:empty { display: none; }
.campo > .ayuda:first-of-type { margin: 0 0 8px; }
.si-no { display: flex; gap: 10px; }
.si-no label { display: flex; align-items: center; gap: 8px; border: 2px solid var(--line); border-radius: 10px; padding: 10px 18px; font-weight: 600; cursor: pointer; margin: 0; }
.si-no label:has(input:checked) { border-color: var(--accent); background: #eef4fc; }
.guias { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.contador { margin: 4px 0 0; font-size: .78rem; color: var(--muted); text-align: right; }
.checklist { padding-left: 22px; margin: 0 0 12px; display: grid; gap: 10px; }
.checklist .valor { display: inline-block; background: #eef4fc; color: var(--accent); font-weight: 700; padding: 1px 8px; border-radius: 6px; }
.checklist .sbtn { margin-left: 6px; }
.preview { white-space: pre-wrap; font: inherit; font-size: .9rem; background: var(--bg); border-radius: 8px; padding: 10px 12px; margin: 8px 0 0; }
@media (max-width: 640px) {
  .pasos { font-size: .8rem; }
}

/* =====================================================================
   Tema: tokens y componentes
   ===================================================================== */
:root {
  --ink: #171B21; --ink-2: #333; --muted: #626A78; --muted-2: #8A93A3;
  --line: #E5E7EB; --line-2: #EEF1F5; --card-line: #D9DDE4; --bg: #F7F8FA;
  --brand: #266FE0; --accent: #3b82f6; --accent-hover: #2563eb; --sea: #171B21;
  font-family: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
* { scrollbar-width: none; -ms-overflow-style: none; }
*::-webkit-scrollbar { width: 0; height: 0; display: none; }
a { color: var(--brand); }
:focus-visible { outline: 2px solid #0065e0; outline-offset: 2px; }
.mono { font-family: 'Hanken Grotesk', system-ui, sans-serif; }

/* Franja IA y navbar */
.franja-ia { background: #171B21; color: #FAFAFA; font: 440 11px/1.4 'Hanken Grotesk', system-ui, sans-serif; letter-spacing: .02em; text-align: center; padding: 7px 16px; white-space: nowrap; }
.franja-ia a { color: #FAFAFA; text-decoration: underline; text-underline-offset: 2px; }
.top { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(23,27,33,.10); position: relative; z-index: 8; }
.top-row, .app .top-row { min-height: 64px; }
.brand { color: var(--ink); display: flex; flex-direction: column; line-height: 1.05; text-decoration: none; }
.brand-word { font-size: 1.35rem; font-weight: 400; letter-spacing: -.02em; }
.brand-word b { font-weight: 800; }
.brand-sub { font-size: .72rem; font-weight: 700; color: var(--ink); margin-top: 2px; }
.top-link, .top-nav a { color: var(--muted); font-weight: 500; font-size: .92rem; }
.top-link:hover, .top-nav a:hover { color: var(--brand); }
.app .deadline { background: #F1F3F7; color: var(--brand); font: 600 11px/1 'Hanken Grotesk', system-ui, sans-serif; letter-spacing: .04em; text-transform: uppercase; padding: 7px 10px; border-radius: 999px; }

/* Franja de ubicación */
.franja { min-height: 44px; padding: 6px 16px; border-bottom: 1px solid var(--line); }
.franja ol { font-size: 13px; }
.franja li + li::before { content: "›"; color: #b4b4b4; margin: 0 6px; }
.franja button { color: var(--muted); font-weight: 500; font-size: 13px; }
.franja li:first-child button { color: var(--ink); font-weight: 600; }
.franja button:hover { color: var(--brand); text-decoration: underline; }
.franja [aria-current] { color: var(--muted-2); }
.franja .share { border: 1px solid var(--card-line); color: var(--ink); font-weight: 500; font-size: 13px; padding: 7px 14px 7px 12px; text-decoration: none; }
.franja .share:hover { background: #f4f4f5; text-decoration: none; }

/* Panel de búsqueda (Filters) */
.panel { width: 335px; border-radius: 8px; box-shadow: 0 0 8px rgba(0,0,0,.4); color: var(--ink-2); }
.handle { border-bottom: 1px solid #e4e4e7; }
.handle b { font-size: 12px; font-weight: 600; color: var(--muted-2); text-transform: uppercase; letter-spacing: .08em; font-family: 'Hanken Grotesk', system-ui, sans-serif; }
.panel-body { padding: 0; }
#buscar > h1 { font-size: 20px; font-weight: 700; color: var(--ink-2); line-height: 1.2; padding: 20px 20px 0; margin: 0 0 6px; }
#buscar > .sub { font-size: 12px; color: #555; line-height: 1.4; padding: 0 20px 18px; margin: 0; border-bottom: 1px solid #a1a1a1; }
#buscar > form, #buscar > #aviso, #buscar > .link-btn, #buscar > .examples { margin-left: 20px; margin-right: 20px; }
#buscar > form { margin-top: 16px; }
#buscar > .link-btn { font-size: 13px; color: var(--brand); padding: 10px 0 6px; display: block; }
#buscar > .examples { font-size: 12.5px; color: var(--muted); padding-bottom: 16px; margin-bottom: 0; }
.combo input { font-size: 14px; padding: 11px 12px 11px 36px; border: 1px solid #d9d9d9; border-radius: 6px; }
.combo .ico { left: 12px; font-size: 1rem; }
.combo input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(38,111,224,.15); }
.sugerencias { border-color: var(--card-line); border-radius: 8px; box-shadow: 0 12px 32px -10px rgba(15,27,45,.28), 0 2px 6px rgba(15,27,45,.06); }
.sugerencias li b { font-size: 14px; font-weight: 600; color: var(--ink); }
.sugerencias li small { font-size: 12px; }
.chip { font-size: 12.5px; padding: 4px 11px; min-height: 30px; border: 1px solid #d9d9d9; background: #fff; color: var(--ink-2); }
.chip:hover { border-color: var(--brand); color: var(--brand); }
.tools { border-top: 1px solid #e4e4e7; margin: 0; padding: 16px 20px; gap: 8px; }
.tools-t { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.toggle, .app .toggle { width: 100%; display: inline-flex; border: 1px solid #d9d9d9; background: #f7f7f8; border-radius: 6px; padding: 2px; }
.toggle label { flex: 1; }
.toggle span { padding: 7px 10px; border-radius: 4px; font-size: 13px; font-weight: 500; color: var(--muted); min-width: 0; }
.toggle input:checked + span { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.check { font-size: 12.5px; color: var(--ink-2); }
.check input { width: 16px; height: 16px; accent-color: var(--brand); }
.app .privacy { font-size: 11px; color: #828282; margin: 0; padding: 12px 20px 16px; border-top: 1px solid #e4e4e7; }
.app .notice { font-size: 12.5px; border-radius: 6px; }

/* Controles del mapa: píldora gris oscura a la derecha, al medio */
.mapboxgl-ctrl-top-right { top: 50% !important; right: 16px !important; transform: translateY(-50%); }
.mapboxgl-ctrl-group { background: #4B5563 !important; border-radius: 999px !important; box-shadow: 0 1px 4px rgba(0,0,0,.3) !important; overflow: hidden; }
.mapboxgl-ctrl-group button { width: 40px !important; height: 40px !important; }
.mapboxgl-ctrl-group button + button { border-top: 1px solid rgba(255,255,255,.25) !important; }
.mapboxgl-ctrl-group button:hover { background: #374151 !important; }
.mapboxgl-ctrl-group .mapboxgl-ctrl-icon { filter: invert(1) brightness(2); }
.mapboxgl-ctrl-attrib { font-size: 10px; background: rgba(255,255,255,.7) !important; }

/* Leyenda: píldora blanca */
.app .map-legend { border-radius: 999px; padding: 10px 18px; font-size: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.15); display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.app .map-legend p { margin: 0; font-weight: 500; color: var(--ink); }
.app .map-legend .fine { display: none; }
.app .map-legend ul { flex-wrap: nowrap; }
.app .map-legend li { font-size: 12px; color: var(--ink); }
.app .map-legend .sw { width: 14px; height: 14px; border-radius: 3px; border: 0; }
.app .map-legend .ramp { min-width: 160px; padding-top: 12px; font-size: 10px; }

/* Ficha (PointPanel) */
.drawer { width: 420px; border-radius: 8px; box-shadow: 0 0 8px rgba(0,0,0,.4); }
.drawer-head { padding: 12px 12px 12px 16px; border-bottom: 1px solid var(--line); }
.drawer-rol { font: 600 11px/1 'Hanken Grotesk', system-ui, sans-serif; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-2); }
.drawer-close { width: 28px; height: 28px; background: #18181b; color: #fff; font-size: .75rem; box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.drawer-close:hover { background: #27272a; }
.drawer .ficha { padding: 14px 16px 18px; }
.eyebrow { font-size: 12px; font-weight: 400; color: var(--muted); }
.drawer .ficha h2, .ficha h2 { font-size: 17px; font-weight: 700; color: var(--ink); line-height: 1.3; letter-spacing: 0; }
.verdict { font-size: 15px; font-weight: 600; border-left-width: 4px; border-radius: 6px; padding: 6px 12px; }
.verdict small { font: 600 10.5px/1.4 'Hanken Grotesk', system-ui, sans-serif; letter-spacing: .08em; }
.sec, .row h3 { font: 600 11px/1.4 'Hanken Grotesk', sans-serif; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-2); }
.sec { border-top: 1px solid var(--line-2); padding-top: 12px; }
.row { background: #fff; border: 1px solid var(--line-2); border-radius: 8px; padding: 12px; }
.when { font-size: 11px !important; color: var(--muted-2); font-weight: 600; }
.big { font-size: 15px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.row p, .row small, .cats small { font-size: 12.5px; color: var(--muted); }
.explain-alt { font-size: 13px; color: var(--ink-2); }
.datos { font-size: 12.5px; }
.datos dt { color: var(--muted); }
.datos dd { color: var(--ink); font-weight: 500; }
.unknowns { border-left-color: var(--line); }
.unknowns h3, .ideas h3 { font-size: 13px; font-weight: 600; color: var(--ink); }
.unknowns p, .ideas li { font-size: 12.5px; }
.ideas { background: var(--bg); border: 1px solid var(--line-2); }
.share-row { border-bottom-color: var(--line-2); }
.share-row > span { font: 600 11px/1 'Hanken Grotesk', sans-serif; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-2); }
.sbtn { border-color: var(--card-line); font-size: 12.5px; font-weight: 500; padding: 5px 11px; }
.gmap figcaption a { color: var(--brand); font-weight: 600; font-size: 12px; }

/* CTA y botones */
.btn, .search button[type=submit] { border-radius: 10px; font-size: 15px; font-weight: 600; border: 1px solid var(--card-line); min-height: 44px; }
.btn.primary { background: var(--accent); border-color: transparent; color: #fff; }
.btn.primary:hover { background: var(--accent-hover); }
.drawer-cta { background: #F1F3F7; border-top: 1px solid var(--line); }
.cta-t { font-size: 15px; font-weight: 700; color: var(--ink); }
.cta-d { font-size: 12px; }
.cta-k { color: var(--brand); font-weight: 600; }
.cta-help { color: var(--brand); font-weight: 600; font-size: 12.5px; }

/* Diálogo de observación */
.pasos span { width: 20px; height: 20px; }
.pasos li[aria-current] span { background: var(--brand); }
.campo label, .campo legend { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.campo select, .campo textarea { border: 1px solid #d9d9d9; border-radius: 6px; font-size: 14px; }
.campo select:focus, .campo textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(38,111,224,.15); }
.ayuda { font-size: 12px; }
.si-no label { border-width: 1px; border-radius: 6px; font-size: 13px; padding: 8px 16px; }
.si-no label:has(input:checked) { border-color: var(--brand); background: #EEF4FD; }
.terreno-chip { border-left-color: var(--brand); font-size: 13px; }
.checklist { font-size: 14px; }
.checklist .valor { background: #EEF4FD; color: var(--brand); }

/* Página «Cómo funciona» */
.page h2 { font-size: 26px; font-weight: 800; letter-spacing: -.01em; color: #141414; }
.page .section-lead { color: #3c3c3c; font-size: 15px; }
.page .explain { border-color: var(--line); box-shadow: 0 1px 2px rgba(16,24,40,.05), 0 8px 20px -16px rgba(16,24,40,.22); border-radius: 12px; }
.page .scale li { background: linear-gradient(180deg, #7da7f0, var(--brand)); }
.page .callout { border-left-color: var(--brand); }
.page details > summary { font-size: 15px; font-weight: 600; color: var(--ink); }
.page .band { background: #eceef2; }

@media (max-width: 899px) {
  .panel { width: auto; border-radius: 16px 16px 0 0; box-shadow: 0 -8px 24px rgba(0,0,0,.25); }
  .drawer { width: auto; border-radius: 0; box-shadow: none; }
  .mapboxgl-ctrl-top-right { top: 16px !important; transform: none; }
  .app .map-legend { border-radius: 14px; white-space: normal; flex-wrap: wrap; padding: 8px 12px; }
  .app .map-legend ul { flex-wrap: wrap; }
  .brand-sub { display: none; }
  .franja-ia { font-size: 10px; }
}
.app .map-legend { left: calc(50% + 175px); }
body.app.con-ficha .map-legend { left: calc(50% - 40px); max-width: calc(100% - 820px); }
@media (max-width: 899px) { .app .map-legend, body.app.con-ficha .map-legend { left: 10px; max-width: calc(100% - 70px); } }

/* Street View / Satélite en la ficha */
.gmap-tabs { position: absolute; z-index: 2; bottom: 30px; left: 8px; display: inline-flex; background: rgba(255,255,255,.95); border-radius: 999px; padding: 2px; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.gmap-tabs button { border: 0; background: none; font: inherit; font-size: 12px; font-weight: 600; color: var(--muted); padding: 5px 12px; border-radius: 999px; cursor: pointer; }
.gmap-tabs button[aria-selected="true"] { background: var(--ink); color: #fff; }
.gmap iframe { height: 260px; }
@media (max-width: 899px) { .gmap iframe { height: 240px; } }

/* Iconos (SVG inline, trazo Lucide) */
.i { width: 16px; height: 16px; flex: none; vertical-align: -3px; }
.i { margin: 0; }
/* El espacio entre icono y texto lo da el gap, no márgenes */
.btn, .link-btn, .sbtn, .migas button, .top-link, .share, .gmap figcaption a, .ayuda a, .checklist a { display: inline-flex; align-items: center; gap: 6px; }
.ayuda a .i, .checklist a .i, .gmap figcaption a .i { width: 13px; height: 13px; }

/* Header con ubicación y acciones (reemplaza la franja) */
.top-row, .app .top-row { display: flex; align-items: center; gap: 16px; padding: 0 16px; min-height: 64px; max-width: none; }
.migas { flex: 1; min-width: 0; border-left: 1px solid #E2E5EA; padding-left: 16px; }
.migas ol { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; flex-wrap: nowrap; overflow: hidden; font-size: 13px; }
.migas li { display: flex; align-items: center; white-space: nowrap; min-width: 0; }
.migas li + li::before { content: "›"; color: #b4b4b4; margin: 0 8px; }
.migas button { display: inline-flex; align-items: center; border: 0; background: none; font: inherit; font-size: 13px; color: var(--muted); cursor: pointer; padding: 4px 0; }
.migas li:first-child button { color: var(--ink); font-weight: 600; }
.migas li:first-child .i { color: var(--brand); }
.migas button:hover { color: var(--brand); text-decoration: underline; }
.migas [aria-current] { color: var(--muted-2); overflow: hidden; text-overflow: ellipsis; }
.top-actions { display: flex; align-items: center; gap: 14px; flex: none; }
.app .deadline { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.app .deadline .i { width: 13px; height: 13px; }
.top-link { display: inline-flex; align-items: center; }
.share { display: inline-flex; align-items: center; border: 1px solid var(--card-line); background: #fff; border-radius: 999px; padding: 7px 14px; font: inherit; font-size: 13px; font-weight: 500; color: var(--ink); cursor: pointer; }
.share:hover { background: #f4f4f5; }
.share .i { width: 14px; height: 14px; }
.combo .ico { display: flex; }
.combo .ico .i { width: 17px; height: 17px; color: var(--muted); }
#buscar > .link-btn { display: inline-flex; align-items: center; }
.btn .i { width: 17px; height: 17px; }
.drawer-close { display: grid; place-items: center; }
.drawer-close .i { width: 14px; height: 14px; margin: 0; }
.page .top-row { max-width: 1100px; margin: 0 auto; justify-content: space-between; }

@media (max-width: 1100px) { .app .top .deadline { display: none; } }
@media (max-width: 899px) {
  .migas { display: none; }
  .top-actions { margin-left: auto; gap: 8px; }
  .top-link span, .share span { display: none; }
  .top-link { width: 40px; height: 40px; justify-content: center; border: 1px solid var(--card-line); border-radius: 999px; }
  .top-link .i, .share .i { margin: 0; width: 18px; height: 18px; }
  .share { width: 40px; height: 40px; padding: 0; justify-content: center; }
  .page .top-link span { display: inline; }
  .page .top-link { width: auto; border: 0; }
}

/* Navegación principal en el header */
.nav { display: flex; align-items: center; gap: 4px; flex: none; }
.nav a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; padding: 8px 10px; border-radius: 6px; }
.nav a:hover { color: var(--brand); background: #F1F3F7; }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--brand); border-radius: 0; }
.nav-movil { display: none; position: relative; border: 0; padding: 0; }
.nav-movil summary { list-style: none; width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--card-line); border-radius: 999px; cursor: pointer; color: var(--muted); }
.nav-movil summary::-webkit-details-marker { display: none; }
.nav-movil summary .i { width: 18px; height: 18px; }
.nav-movil-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; min-width: 220px; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 12px 28px -12px rgba(23,27,33,.28); padding: 4px; display: grid; }
.nav-movil-panel a { padding: 10px 12px; color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 500; border-radius: 6px; }
.nav-movil-panel a:hover { background: var(--bg); color: var(--brand); }
.nav-movil-panel a[aria-current="page"] { color: var(--brand); font-weight: 600; }
.page .top-row { justify-content: flex-start; }
.page .nav { margin-left: auto; }

@media (max-width: 1280px) { .app .top .deadline { display: none !important; } }
@media (max-width: 1050px) { .app .migas { display: none; } }
@media (max-width: 899px) {
  .nav { display: none; }
  .nav-movil { display: block; order: 3; }
  .app .top-row .nav-movil { order: 3; }
  .page .nav-movil { margin-left: auto; }
}

/* Compartir: botones redondos de icono con etiqueta */
.share-row { display: block; padding: 12px 0 14px; }
.share-t { margin: 0 0 10px; font: 600 11px/1.4 'Hanken Grotesk', sans-serif; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-2); }
.share-btns { display: flex; gap: 18px; }
.rbtn { display: flex; flex-direction: column; align-items: center; gap: 6px; border: 0; background: none; padding: 0; font: inherit; color: var(--ink); text-decoration: none; cursor: pointer; min-width: 52px; }
.rbtn-c { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 1px solid var(--card-line); color: var(--ink); transition: background .15s, border-color .15s, transform .15s; }
.rbtn-c .i { width: 19px; height: 19px; margin: 0; }
.rbtn-l { font-size: 11.5px; font-weight: 500; color: var(--muted); line-height: 1; }
.rbtn:hover .rbtn-c { background: #F1F3F7; border-color: #c4cad4; transform: translateY(-1px); }
.rbtn:focus-visible { outline: none; }
.rbtn:focus-visible .rbtn-c { outline: 2px solid #0065e0; outline-offset: 2px; }
.rbtn.wa .rbtn-c { background: #25D366; border-color: #25D366; color: #fff; }
.rbtn.wa:hover .rbtn-c { background: #1ebe5a; border-color: #1ebe5a; }
.rbtn.ok .rbtn-c { background: #E8F5EE; border-color: #1b7a3d; color: #1b7a3d; }
.rbtn.ok .rbtn-l { color: #1b7a3d; font-weight: 600; }

/* ===================== Ficha v3 ===================== */
.drawer .ficha { padding: 0; }
.f-head { padding: 16px 16px 14px; }
.eyebrow { display: flex; align-items: center; gap: 5px; margin: 0 0 6px; font-size: 12.5px; color: var(--muted); }
.eyebrow .i { width: 13px; height: 13px; color: var(--brand); }
.drawer .ficha h2 { font-size: 19px; font-weight: 700; line-height: 1.28; margin: 0 0 14px; letter-spacing: -.005em; }
.vtiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.vtile { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 10px; background: var(--c-bg, #f3f4f6); }
.vtile-k { font: 600 10.5px/1 'Hanken Grotesk', sans-serif; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.vtile-v { display: flex; align-items: center; gap: 7px; font-size: 15px; font-weight: 700; color: var(--c, var(--ink)); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; flex: none; }
/* tonos: texto + fondo suave */
.t-down { --c: #b42318; --c-bg: #fdecea; } .t-warn { --c: #b25e09; --c-bg: #fff3e0; } .t-up { --c: #1b7a3d; --c-bg: #e7f5ec; }
.t-same { --c: #1d6a7a; --c-bg: #e3f2f5; } .t-change { --c: #6b3fb0; --c-bg: #f1ebfb; } .t-unknown { --c: #5b6474; --c-bg: #eef0f3; }
.vtile.t-down, .vtile.t-warn, .vtile.t-up, .vtile.t-same, .vtile.t-change, .vtile.t-unknown { background: var(--c-bg); color: inherit; }

.drawer .share-row { margin: 0 16px; padding: 12px 0 14px; border-top: 1px solid var(--line-2); border-bottom: 0; }
.share-btns { gap: 16px; }

.cmp { margin: 0 16px 12px; border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.cmp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.cmp-head h3 { margin: 0; font-size: 14px; font-weight: 700; color: var(--ink); }
.pill { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--c-bg); color: var(--c); white-space: nowrap; }
.cmp-grid { display: grid; grid-template-columns: 1fr 20px 1fr; gap: 10px; align-items: start; }
.cmp-col { min-width: 0; }
.cmp-k { display: block; font: 600 10.5px/1 'Hanken Grotesk', sans-serif; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-2); margin-bottom: 6px; }
.cmp-v { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 15px; font-weight: 700; color: var(--ink); line-height: 1.3; }
.cmp-d { margin: 2px 0 6px; font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.cmp-arrow { color: #b4bac4; padding-top: 18px; }
.cmp-arrow .i { width: 16px; height: 16px; }
.sq { width: 11px; height: 11px; border-radius: 3px; flex: none; }
.cmp .mini { margin: 4px 0 0; font-size: 12.5px; }
.cmp .mini summary { color: var(--brand); font-weight: 600; font-size: 12.5px; }
.cmp .mini p { color: var(--muted); margin: 6px 0 0; }
.cmp-nota { margin: 12px 0 0; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 12.5px; color: var(--muted); line-height: 1.45; }

/* Escala de pisos */
.esc { margin: 4px 0 16px; }
.esc-track { position: relative; height: 12px; border-radius: 999px; background: #EEF1F5; margin-top: 22px; }
.esc-band { position: absolute; top: 0; bottom: 0; border-radius: 999px; opacity: .95; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.esc-hoy { position: absolute; top: -6px; bottom: -6px; width: 2px; margin-left: -1px; background: var(--ink); border-radius: 2px; }
.esc-hoy b { position: absolute; bottom: calc(100% + 3px); left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 700; white-space: nowrap; color: var(--ink); background: #fff; padding: 0 3px; }
.esc-ticks { position: relative; height: 16px; margin-top: 6px; font-size: 10.5px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.esc-ticks span { position: absolute; transform: translateX(-50%); }
.esc-ticks span:first-child { transform: none; }
.esc-ticks .esc-u { right: 0; transform: none; left: auto !important; display: none; }

.flag { display: flex; gap: 8px; align-items: flex-start; margin: 0 16px 12px; font-size: 12.5px; background: #e6f4f1; color: #155e57; border-radius: 10px; padding: 10px 12px; }
.flag .i { width: 15px; height: 15px; margin-top: 1px; }

.bloque { margin: 6px 16px 12px; }
.bloque .sec { border: 0; padding: 0; margin: 4px 0 8px; }
.datos { display: block; margin: 0; }
.datos > div { display: grid; grid-template-columns: 128px 1fr; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line-2); font-size: 13px; }
.datos > div:first-child { border-top: 0; }
.datos dt { color: var(--muted); margin: 0; }
.datos dd { margin: 0; color: var(--ink); font-weight: 500; }
.muted { color: var(--muted); font-weight: 400; }

.callout { display: flex; gap: 10px; margin: 0 16px 12px; padding: 12px 14px; border-radius: 12px; font-size: 12.5px; line-height: 1.45; }
.callout > .i { width: 17px; height: 17px; flex: none; margin-top: 1px; }
.callout h3 { margin: 0 0 4px; font-size: 13px; font-weight: 700; color: var(--ink); }
.callout p, .callout ul { margin: 0; color: var(--ink-2); }
.callout ul { padding-left: 16px; display: grid; gap: 4px; }
.callout a { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; font-weight: 600; color: var(--brand); text-decoration: none; }
.callout a .i { width: 13px; height: 13px; }
.callout.info { background: #F1F3F7; } .callout.info > .i { color: var(--muted); }
.callout.idea { background: #FFF7E8; } .callout.idea > .i { color: #b25e09; }
.drawer .ficha > .fine { margin: 4px 16px 18px; font-size: 11px; }

/* Pie con la llamada a la acción: compacto */
.drawer-cta { display: grid; gap: 10px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -6px 16px -10px rgba(15,27,45,.18); }
.cta-txt { display: grid; gap: 2px; }
.cta-t { font-size: 13.5px; font-weight: 700; line-height: 1.3; margin: 0; }
.cta-d { font-size: 12px; color: var(--muted); margin: 0; }
.drawer-cta .btn { min-height: 44px; font-size: 15px; gap: 8px; }
@media (max-width: 380px) { .cmp-grid { grid-template-columns: 1fr; } .cmp-arrow { display: none; } }
.drawer .callout { border-left: 0; }

/* ===================== Formulario «Prepara tu observación» v2 ===================== */

/* Progreso en dos tramos */
.pasos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 20px 14px; border-bottom: 1px solid var(--line); }
.pasos li { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted-2); padding-top: 10px; position: relative; }
.pasos li::before { content: "" !important; position: absolute; top: 0; left: 0; right: 0; width: auto !important; height: 4px !important; margin: 0 !important; border-radius: 999px; background: var(--line) !important; }
.pasos li[aria-current]::before, .pasos li.hecho::before { background: var(--brand) !important; }
.pasos li[aria-current] { color: var(--ink); }
.pasos li.hecho { color: var(--muted); }
.paso-n { display: block; font: 600 10.5px/1.4 'Hanken Grotesk', sans-serif; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-2); background: none !important; width: auto !important; height: auto !important; }


.terreno-chip { display: flex; flex-direction: row; gap: 10px; align-items: center; border: 1px solid var(--line); border-left: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 10px 12px; margin: 0 0 6px; }
.tc-ico { width: 32px; height: 32px; border-radius: 50%; background: #EEF4FD; color: var(--brand); display: grid; place-items: center; flex: none; }
.tc-ico .i { width: 16px; height: 16px; }
.terreno-chip b { display: block; font-size: 14px; color: var(--ink); margin-bottom: 4px; }
.tc-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.obligatorio { margin: 0 0 14px; font-size: 11.5px; color: var(--muted-2); text-align: right; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.campo { margin-bottom: 18px; }
.campo label, .campo legend { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 6px; padding: 0; }
.campo select { height: 44px; padding: 0 36px 0 12px; appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23626A78' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; font-size: 14px; color: var(--ink); }
.campo select:invalid { color: var(--muted-2); }
.campo textarea { min-height: 170px; padding: 12px; font-size: 14px; line-height: 1.55; }
.campo [aria-invalid] { border-color: #b42318 !important; box-shadow: 0 0 0 3px rgba(180,35,24,.12) !important; }
.ayuda { margin: 6px 0 0; font-size: 12px; color: var(--muted); line-height: 1.4; }
#obs-texto-ayuda { margin: 0 0 8px; }
.err { margin: 6px 0 0; font-size: 12px; font-weight: 600; color: #b42318; }
.err::before { content: "⚠︎ "; }
.err[hidden] { display: none; }

.guias { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; }
.guias-k { font-size: 12px; color: var(--muted); margin-right: 2px; }
.guia { border: 1px dashed #c4cad4; background: #fff; border-radius: 999px; padding: 4px 10px; font: inherit; font-size: 12px; font-weight: 500; color: var(--ink-2); cursor: pointer; }
.guia::before { content: "+ "; color: var(--brand); font-weight: 700; }
.guia:hover { border-style: solid; border-color: var(--brand); color: var(--brand); }
.texto-pie { display: flex; justify-content: space-between; gap: 10px; }
.texto-pie .contador { margin-left: auto; }
.ideas-mini { margin-top: 6px; font-size: 12.5px; }
.ideas-mini summary { color: var(--brand); font-weight: 600; cursor: pointer; }
.ideas-mini ul { margin: 6px 0 0; padding-left: 18px; color: var(--ink-2); }

.seg { display: inline-grid; grid-template-columns: 1fr 1fr; border: 1px solid #d9d9d9; background: #f7f7f8; border-radius: 8px; padding: 2px; min-width: 180px; }
.seg label { position: relative; margin: 0; cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span { display: block; text-align: center; padding: 8px 18px; border-radius: 6px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.seg input:checked + span { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.14); }
.seg input:focus-visible + span { outline: 2px solid #0065e0; outline-offset: 1px; }
.con-error .seg { border-color: #b42318; }
.docs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.docs a { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--brand); text-decoration: none; border: 1px solid var(--card-line); border-radius: 8px; padding: 7px 10px; }
.docs a:hover { background: #F1F3F7; }
.docs a .i { width: 14px; height: 14px; }
.docs a .i:last-child { width: 12px; height: 12px; color: var(--muted-2); }

.btn-txt { border: 0; background: none; font: inherit; font-size: 14px; font-weight: 600; color: var(--muted); padding: 10px 12px; cursor: pointer; border-radius: 8px; }
.btn-txt:hover { color: var(--ink); background: var(--bg); }

@media (max-width: 640px) {
  .grid2 { grid-template-columns: 1fr; }
  .obligatorio { text-align: left; }
}
.pasos .paso-n, .pasos li[aria-current] .paso-n { display: block; width: auto; height: auto; border-radius: 0; background: none; color: var(--muted-2); font: 600 10.5px/1.4 'Hanken Grotesk', sans-serif; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 1px; place-items: initial; }
.pasos li[aria-current] .paso-n { color: var(--brand); }

/* ===================== Menú flotante (estilo barra flotante translúcida) ===================== */
.top.flotante { position: absolute; z-index: 12; top: 12px; left: 12px; right: 12px; border-radius: 14px;
  background: rgba(255,255,255,.82); -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: 0 10px 30px -14px rgba(15,27,45,.35), 0 0 0 1px rgba(15,27,45,.07); }
.page .top.flotante { position: sticky; top: 12px; margin: 12px 12px 0; left: auto; right: auto; }
.top.flotante .top-row { min-height: 60px; padding: 0 10px 0 18px; gap: 18px; }
.top-actions { margin-left: auto; gap: 6px; }
/* Enlaces visibles a la derecha */
.top.flotante .nav { gap: 2px; padding: 4px; border-radius: 10px; background: rgba(23,27,33,.04); }
.top.flotante .nav a { font-size: 14px; font-weight: 500; color: var(--ink-2); padding: 8px 14px; border-radius: 8px; box-shadow: none; }
.top.flotante .nav a:hover { background: rgba(23,27,33,.06); color: var(--ink); }
.top.flotante .nav a[aria-current="page"] { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(15,27,45,.14); border-radius: 8px; }
.top.flotante .share { background: var(--ink); color: #fff; border-color: var(--ink); border-radius: 10px; padding: 10px 16px; font-weight: 600; margin-left: 4px; }
.top.flotante .share:hover { background: #2b313a; }
.top.flotante .migas { border-left-color: rgba(15,27,45,.12); }

/* El mapa ocupa toda la pantalla; los paneles empiezan bajo la barra */
body.app .stage { position: absolute; inset: 0; }
.app .panel { top: 86px; }
.app .drawer { top: 86px; }
.plazo { display: inline-flex !important; align-items: center; gap: 6px; margin: 18px 20px 0 !important; }
#buscar > h1 { padding-top: 10px; }

@media (max-width: 1180px) { .top.flotante .migas { display: none; } }
@media (max-width: 899px) {
  .top.flotante { top: 8px; left: 8px; right: 8px; border-radius: 12px; }
  .page .top.flotante { margin: 8px 8px 0; }
  .top.flotante .top-row { min-height: 54px; padding: 0 8px 0 14px; }
  .top.flotante .nav { display: none; }
  .top.flotante .share { background: #fff; color: var(--ink); border-color: var(--card-line); padding: 0; }
  .app .drawer { top: 0; }
  .app .map-legend, body.app.con-ficha .map-legend { top: 72px; }
  .mapboxgl-ctrl-top-right { top: 72px !important; }
}
@media (max-width: 899px) { .app .panel { top: auto; } }

/* Logo */
.brand { flex-direction: row; align-items: center; gap: 12px; }
.brand-logo { display: block; height: 34px; width: auto; }
.brand-sub { font: 600 10.5px/1.25 'Hanken Grotesk', sans-serif; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding-left: 12px; border-left: 1px solid rgba(15,27,45,.14); margin: 0; }
@media (max-width: 899px) { .brand-logo { height: 28px; } .brand-sub { display: none; } }

/* Barra flotante: efecto vidrio */
.top.flotante {
  background: linear-gradient(135deg, rgba(255,255,255,.62), rgba(255,255,255,.38));
  -webkit-backdrop-filter: blur(22px) saturate(180%); backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid rgba(255,255,255,.65);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85), inset 0 -1px 0 rgba(255,255,255,.25), 0 12px 32px -14px rgba(15,27,45,.38), 0 0 0 .5px rgba(15,27,45,.10);
}
.top.flotante .nav { background: rgba(255,255,255,.35); box-shadow: inset 0 0 0 1px rgba(255,255,255,.5); }
.top.flotante .nav a[aria-current="page"] { background: rgba(255,255,255,.9); }
.top.flotante .nav a:hover { background: rgba(255,255,255,.55); }
.top.flotante .migas { border-left-color: rgba(15,27,45,.12); }
.nav-movil summary, .top.flotante .share:not(:hover) { -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
@media (max-width: 899px) { .top.flotante .share, .nav-movil summary { background: rgba(255,255,255,.55); border-color: rgba(255,255,255,.7); } }
.nav-movil-panel { background: rgba(255,255,255,.72); -webkit-backdrop-filter: blur(22px) saturate(180%); backdrop-filter: blur(22px) saturate(180%); border: 1px solid rgba(255,255,255,.65); }
/* Sin soporte de backdrop-filter: fondo casi opaco para mantener la legibilidad */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .top.flotante, .nav-movil-panel { background: rgba(255,255,255,.95); }
}

/* Leyenda por clases */
.app .map-legend.comuna, .app .map-legend.barrio { flex-direction: column; align-items: flex-start; gap: 8px; border-radius: 14px; padding: 12px 14px; white-space: normal; }
.lg-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.lg-head b { font-size: 13px; font-weight: 700; color: var(--ink); }
.lg-head span { font-size: 11.5px; color: var(--muted); }
.lg-clases { list-style: none; margin: 0; padding: 0; display: flex !important; flex-wrap: wrap; gap: 6px 14px; }
.lg-clases li { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); }
.lg-clases .sw { width: 22px !important; height: 12px !important; border-radius: 3px !important; margin: 0; }
.lg-sin .sw { background: #fff; box-shadow: inset 0 0 0 1px #c4cad4; }
@media (max-width: 899px) {
  .app .map-legend.comuna, .app .map-legend.barrio { padding: 8px 10px; gap: 5px; }
  .lg-head span { display: none; }
  .lg-clases { gap: 4px 10px; }
  .lg-clases .sw { width: 16px !important; height: 10px !important; }
}

/* Navegación sin contenedor de fondo: solo los enlaces */
.top.flotante .nav { background: none !important; box-shadow: none !important; padding: 0; gap: 4px; }
.top.flotante .nav a { background: none; }
.top.flotante .nav a:hover { background: rgba(255,255,255,.55); }
.top.flotante .nav a[aria-current="page"] { background: none; box-shadow: none; color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 8px; text-decoration-color: var(--brand); }

/* Street View sin los recuadros de Google: el iframe se agranda y se recorta (arriba: dirección; derecha: controles).
   Se deja visible la franja inferior con el logo de Google (obligatorio por sus términos). */
.gmap { position: relative; overflow: hidden; height: 260px; background: #e5e7eb; }
.gmap iframe { position: absolute; top: -92px; left: 0; width: calc(100% + 76px); height: calc(100% + 92px); max-width: none; }
@media (max-width: 899px) { .gmap { height: 240px; } }

/* Paso 2: enviar en el sitio oficial */
.listo { display: flex; gap: 12px; align-items: flex-start; background: #E8F5EE; border-radius: 12px; padding: 12px 14px; margin-bottom: 16px; }
.listo > .i { width: 22px; height: 22px; color: #1b7a3d; flex: none; margin-top: 1px; }
.listo b { display: block; font-size: 14.5px; color: var(--ink); margin-bottom: 2px; }
.listo span { font-size: 13px; color: var(--ink-2); line-height: 1.45; }
.tu-texto { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 18px; }
.tu-texto-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px 8px 14px; background: var(--bg); border-bottom: 1px solid var(--line); }
.tu-texto-head > span { font: 600 11px/1 'Hanken Grotesk', sans-serif; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-2); }
.tu-texto-head .sbtn { display: inline-flex; align-items: center; gap: 6px; }
.tu-texto-head .sbtn .i { width: 14px; height: 14px; }
.tu-texto-head .sbtn.ok { border-color: #1b7a3d; color: #1b7a3d; background: #E8F5EE; }
.tu-texto .preview { margin: 0; border-radius: 0; background: #fff; max-height: 140px; overflow: auto; padding: 12px 14px; font-size: 13px; line-height: 1.55; }
.guia-t { font-size: 13px; font-weight: 700; color: var(--ink); margin: 0 0 10px; }
.pasos-of { list-style: none; margin: 0; padding: 0; position: relative; }
.pasos-of li { display: grid; grid-template-columns: 26px 1fr; gap: 12px; padding: 0 0 14px; position: relative; }
.pasos-of li:not(:last-child)::after { content: ""; position: absolute; left: 12px; top: 28px; bottom: 2px; width: 2px; background: var(--line); }
.po-n { width: 26px; height: 26px; border-radius: 50%; background: #EEF4FD; color: var(--brand); font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.po-campo { margin: 2px 0 2px; font-size: 13px; font-weight: 600; color: var(--ink); }
.po-hacer { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.po-hacer > .i { width: 13px; height: 13px; vertical-align: -2px; margin-right: 4px; color: var(--muted-2); }
.po-hacer a { display: inline-flex; align-items: center; gap: 3px; color: var(--brand); font-weight: 600; text-decoration: none; }
.po-hacer a .i { width: 12px; height: 12px; }
.po-hacer .valor { display: inline-block; background: #EEF4FD; color: var(--brand); font-weight: 700; padding: 1px 8px; border-radius: 6px; }
.pasos li.hecho .paso-n::after { content: " ✓"; }

/* Navegación: botones separados, sin contenedor común ni subrayado */
.top.flotante .nav { gap: 6px; }
.top.flotante .nav a { background: rgba(255,255,255,.4); box-shadow: inset 0 0 0 1px rgba(255,255,255,.55); border-radius: 10px; padding: 9px 14px; text-decoration: none; }
.top.flotante .nav a:hover { background: rgba(255,255,255,.7); }
.top.flotante .nav a[aria-current="page"] { background: #fff; text-decoration: none; box-shadow: 0 1px 3px rgba(15,27,45,.14); color: var(--ink); font-weight: 600; }

/* ===================== Panel de filtros ===================== */
.tools { display: block; padding: 16px 20px 6px; }
.tools-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.tools-t { margin: 0; font-size: 15px; font-weight: 700; color: var(--ink); }
.mini-btn { padding: 0; font-size: 12.5px; }
.f-k { margin: 0 0 6px; font: 600 10.5px/1 'Hanken Grotesk', sans-serif; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-2); }
.toggle.t3 label { flex: 1; }
.filtro { border: 0; border-top: 1px solid #e4e4e7; padding: 0; margin: 12px 0 0; }
.filtro > summary { list-style: none; display: flex; align-items: center; gap: 6px; padding: 12px 0 10px; font-size: 13px; font-weight: 600; color: var(--ink); cursor: pointer; }
.filtro > summary::-webkit-details-marker { display: none; }
.filtro > summary::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--muted-2); border-bottom: 2px solid var(--muted-2); transform: rotate(45deg) translateY(-2px); transition: transform .15s; }
.filtro[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
.f-n { color: var(--brand); font-weight: 700; }
.f-ayuda { margin: 0 0 10px; font-size: 11.5px; color: var(--muted); line-height: 1.4; }
.filtro .check { display: flex; margin-bottom: 8px; }

/* Matriz uso × altura */

/* Chips de filtro */
.chips-f { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 10px; }
.chip-f { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #d9d9d9; background: #fff; border-radius: 999px; padding: 6px 10px; font: inherit; font-size: 12.5px; color: var(--ink-2); cursor: pointer; }
.chip-f span { font-size: 11px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.chip-f:hover { border-color: var(--brand); }
.chip-f.on { background: #EEF4FD; border-color: var(--brand); color: var(--brand); font-weight: 600; }
.chip-f.on span { color: var(--brand); }
.conteo { margin: 12px 0 4px; padding-top: 10px; border-top: 1px solid #e4e4e7; font-size: 12.5px; color: var(--muted); }
.conteo b { color: var(--ink); }
.lg-cat { max-width: 520px; }
[hidden] { display: none !important; }
.gmap-nota { position: absolute; z-index: 2; top: 8px; left: 8px; right: 8px; margin: 0; background: rgba(23,27,33,.78); color: #fff; font-size: 12px; padding: 6px 10px; border-radius: 8px; }
/* Leyenda: ítems sin quiebre de línea */
.app .map-legend .lg-clases { flex-wrap: wrap !important; }
.lg-clases li { white-space: nowrap; }
.lg-cat { display: grid !important; grid-template-columns: repeat(3, auto); gap: 5px 14px !important; }
.app .map-legend.barrio, .app .map-legend.comuna { max-width: min(640px, calc(100% - 820px)); }
@media (max-width: 1250px) { .lg-cat { grid-template-columns: repeat(2, auto); } }
@media (max-width: 899px) { .app .map-legend.barrio, .app .map-legend.comuna { max-width: calc(100% - 70px); } .lg-cat { grid-template-columns: repeat(2, auto); } }
.app .map-legend.barrio { width: max-content; max-width: calc(100% - 760px); } .lg-cat li { white-space: normal; }
.perfil-activo { display: inline-block; margin: -4px 0 10px; font-size: 12px; font-weight: 700; color: var(--brand); background: #EEF4FD; padding: 4px 10px; border-radius: 999px; }
.callout.warn { background: #FFF7E8; } .callout.warn > .i { color: #b25e09; }
.cuadra-lead { margin: 0 0 8px; font-size: 12.5px; color: var(--muted); }
.cuadra-sub { margin: 12px 0 6px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.cuadra-l + .cuadra-sub { margin-top: 14px; }
.cuadra-l li b { flex: none; }
.cuadra-l { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.cuadra-l li { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); padding: 6px 10px; border-radius: 8px; background: var(--c-bg); }
.cuadra-l li .dot { color: var(--c); }
.cuadra-l li b { margin-left: auto; color: var(--c); font-variant-numeric: tabular-nums; }

/* ===================== Páginas de contenido ===================== */
.page main { padding-top: 8px; }
.intro { padding: 40px 0 8px; }
.eyebrow-k { margin: 0 0 8px; font: 600 11px/1 'Hanken Grotesk', sans-serif; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); }
.page h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; margin: 0 0 12px; color: #141414; max-width: 20em; }
.h-sec { font-size: 20px !important; margin: 32px 0 14px !important; }
.page .wrap { max-width: 1040px; }
.perfiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.perfil { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; padding: 18px; background: #fff; box-shadow: 0 1px 2px rgba(16,24,40,.05), 0 8px 20px -16px rgba(16,24,40,.22); }
.perfil h3 { margin: 0 0 6px; font-size: 16px; font-weight: 700; color: var(--ink); }
.perfil > p { margin: 0 0 12px; font-size: 13.5px; color: var(--ink-2); line-height: 1.5; }
.perfil-nota { font-size: 12.5px !important; color: var(--muted) !important; }
.perfil-datos { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 4px; font-size: 12.5px; color: var(--muted); }
.perfil-datos li b { color: var(--c, var(--ink)); font-variant-numeric: tabular-nums; }
.perfil-datos li:first-child { font-size: 14px; color: var(--ink); margin-bottom: 2px; }
.perfil-ver { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 700; color: var(--brand); text-decoration: none; }
.perfil-ver .i { width: 15px; height: 15px; }
.perfil.sin-mapa { background: var(--bg); }
.cta-band { background: #171B21; color: #fff; padding: 40px 0; margin-top: 40px; }
.cta-band h2 { color: #fff !important; margin: 0 0 6px; }
.cta-band p { color: #c9ced6; }
.cta-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.cta-band .btn:not(.primary) { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.pasos-grandes { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 14px; }
.pasos-grandes li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; }
.pasos-grandes li > span { width: 40px; height: 40px; border-radius: 50%; background: #EEF4FD; color: var(--brand); font-weight: 800; display: grid; place-items: center; }
.pasos-grandes h3 { margin: 6px 0 4px; font-size: 16px; color: var(--ink); }
.pasos-grandes p { margin: 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.55; }
.lista { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 6px; font-size: 14px; color: var(--ink-2); }
.faq-indice { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.faq-indice a { font-size: 13px; font-weight: 600; color: var(--ink); text-decoration: none; border: 1px solid var(--card-line); border-radius: 999px; padding: 7px 14px; background: #fff; }
.faq-indice a:hover { border-color: var(--brand); color: var(--brand); }
.page details p { color: var(--ink-2); font-size: 14.5px; line-height: 1.6; max-width: 46em; }
.page .top.flotante .nav a { padding: 8px 12px; font-size: 13.5px; }
@media (max-width: 1100px) { .top.flotante .nav a { padding: 8px 10px; font-size: 13px; } }
.perfil-activo { margin: 0 0 10px; }
.page .intro + .section { padding-top: 0; }
.perfil-datos li { background: none !important; padding: 0; }

/* ===================== Páginas internas v2 ===================== */
body.page { background: #fff; }
.page .wrap { max-width: 1120px; padding: 0 24px; }
.page .top.flotante { position: sticky; top: 12px; margin: 12px 12px 0; }
.page .top.flotante .top-row { max-width: none; }
.page .top.flotante .nav { margin-left: auto; }
.page .top.flotante .nav a { background: rgba(255,255,255,.4); box-shadow: inset 0 0 0 1px rgba(15,27,45,.08); border-radius: 10px; padding: 9px 13px; font-size: 13.5px; color: var(--ink-2); text-decoration: none; }
.page .top.flotante .nav a[aria-current="page"] { background: var(--ink); color: #fff; box-shadow: none; }

/* Portada de página */
.phero { margin-top: -88px; padding: 136px 0 56px; background:
  radial-gradient(900px 380px at 85% 0%, rgba(38,111,224,.12), transparent 60%),
  radial-gradient(700px 300px at 0% 100%, rgba(212,81,63,.07), transparent 60%), #F5F7FA; border-bottom: 1px solid var(--line); }
.plazo-pill { display: inline-flex; align-items: center; gap: 6px; font: 600 11px/1 'Hanken Grotesk', system-ui, sans-serif; text-transform: uppercase; letter-spacing: .04em; color: var(--brand); background: #fff; border: 1px solid #d6e3f8; padding: 7px 10px; border-radius: 999px; margin-bottom: 18px; }
.plazo-pill .i { width: 13px; height: 13px; }
.phero h1 { font-size: clamp(32px, 5vw, 52px); font-weight: 800; letter-spacing: -.025em; line-height: 1.04; margin: 6px 0 14px; color: #111418; max-width: 16em; }
.phero-lead { font-size: 17px; line-height: 1.55; color: #3c4350; max-width: 38em; margin: 0; }
.btn { display: inline-flex; align-items: center; gap: 8px; }
.btn .i { width: 17px; height: 17px; }
.btn.ghost { background: #fff; }
.btn.ghost-d { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }
.btn.ghost-d:hover { background: rgba(255,255,255,.08); }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 32px; }
.kpi { display: flex; flex-direction: column; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.kpi .i { width: 18px; height: 18px; color: var(--c, var(--muted)); margin-bottom: 6px; }
.kpi b { font-size: 26px; font-weight: 800; letter-spacing: -.02em; color: var(--c, var(--ink)); font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi span { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.kpi:first-child { background: var(--ink); border-color: var(--ink); }
.kpi:first-child b { color: #fff; } .kpi:first-child span { color: #b9bfc8; }

/* Secciones */
.psec { padding-top: 48px; padding-bottom: 48px; }
.psec-alt { background: #F5F7FA; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.sec-head h2 { margin: 0 !important; font-size: 24px !important; font-weight: 800; letter-spacing: -.015em; color: #111418; }
.sec-head p { margin: 0; color: var(--muted); font-size: 14px; }
.nota-datos { margin: 24px 0 0; font-size: 12.5px; color: var(--muted); }

/* Tarjetas de perfil */
.perfiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.perfiles.dos { grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); }
.perfil { border-radius: 16px; padding: 20px; transition: transform .15s, box-shadow .15s; }
.perfil:hover { transform: translateY(-2px); box-shadow: 0 2px 6px rgba(16,24,40,.07), 0 18px 40px -24px rgba(15,27,45,.45); }
.perfil-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.perfil-ic { width: 40px; height: 40px; border-radius: 12px; background: #F1F3F7; color: var(--brand); display: grid; place-items: center; }
.perfil-ic .i { width: 20px; height: 20px; }
.perfil-n { font-size: 12.5px; color: var(--muted); }
.perfil-n b { font-size: 18px; color: var(--ink); font-weight: 800; font-variant-numeric: tabular-nums; }
.perfil h3 { font-size: 17px; margin: 0 0 6px; }
.perfil-datos { grid-template-columns: 1fr 1fr; gap: 6px 14px !important; margin-bottom: 16px !important; }
.perfil-datos li { display: flex; align-items: center; gap: 6px; font-size: 12px !important; color: var(--muted) !important; margin: 0 !important; }
.perfil-datos li i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }
.perfil-datos li b { margin-left: auto; color: var(--ink) !important; font-size: 12.5px; }
.perfil-ver { align-self: flex-start; padding: 9px 14px; border-radius: 10px; background: #EEF4FD; gap: 8px !important; }
.perfil-ver:hover { background: #dde9fb; }
.perfil-ver .i:first-child { width: 15px; height: 15px; }
.perfil.sin-mapa { background: #fff; border-style: dashed; }
.perfil-nota { display: flex; gap: 8px; align-items: flex-start; background: #FFF7E8; color: #7a4a0b !important; border-radius: 10px; padding: 10px 12px; font-size: 12.5px !important; }
.perfil-nota .i { width: 15px; height: 15px; flex: none; margin-top: 1px; }
.perfil.sin-mapa .perfil-ver { background: none; padding: 0; }

/* Pasos */
.pasos-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; counter-reset: p; }
.paso-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px; position: relative; }
.paso-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.paso-num { font: 600 12px/1 'Hanken Grotesk', system-ui, sans-serif; color: var(--brand); background: #EEF4FD; padding: 6px 9px; border-radius: 8px; }
.paso-num::before { content: "Paso "; }
.paso-ic { color: var(--muted-2); }
.paso-ic .i { width: 22px; height: 22px; }
.paso-card h3 { margin: 0 0 6px; font-size: 16px; color: var(--ink); }
.paso-card p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.sirve { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.sirve-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.sirve-card h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 16px; }
.sirve-card h3 .i { width: 22px; height: 22px; padding: 4px; border-radius: 50%; }
.sirve-card.si h3 .i { background: #E8F5EE; color: #1b7a3d; }
.sirve-card.no h3 .i { background: #fdecea; color: #b42318; }
.sirve-card ul { margin: 0; padding-left: 18px; display: grid; gap: 8px; font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.ejemplo { grid-column: 1 / -1; background: var(--ink); color: #e6e9ee; border-radius: 16px; padding: 22px 24px; }
.ejemplo-k { margin: 0 0 8px; font: 600 11px/1 'Hanken Grotesk', system-ui, sans-serif; text-transform: uppercase; letter-spacing: .08em; color: #8fb3f0; }
.ejemplo blockquote { margin: 0; font-size: 16px; line-height: 1.65; color: #fff; }
.ejemplo-n { margin: 10px 0 0; font-size: 12.5px; color: #9aa3b1; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; position: relative; }
.timeline li { position: relative; padding: 28px 16px 0 0; }
.timeline li::before { content: ""; position: absolute; top: 7px; left: 0; right: 0; height: 2px; background: var(--line); }
.timeline li::after { content: ""; position: absolute; top: 0; left: 0; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 2px solid #c4cad4; }
.timeline li.hecho::before, .timeline li.hecho::after { background: var(--brand); border-color: var(--brand); }
.timeline li.ahora::after { border-color: var(--brand); box-shadow: 0 0 0 5px rgba(38,111,224,.18); }
.timeline b { display: block; font-size: 15px; color: var(--ink); margin-bottom: 4px; }
.timeline span { font-size: 13.5px; color: var(--muted); line-height: 1.5; }

/* FAQ */
.faq-layout { display: grid; grid-template-columns: 280px 1fr; gap: 40px; align-items: start; }
.faq-side { position: sticky; top: 100px; display: grid; gap: 14px; }
.faq-buscar { display: flex; align-items: center; gap: 8px; border: 1px solid #d9d9d9; border-radius: 10px; padding: 0 12px; background: #fff; }
.faq-buscar:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(38,111,224,.15); }
.faq-buscar .i { width: 16px; height: 16px; color: var(--muted); }
.faq-buscar input { border: 0; outline: none; font: inherit; font-size: 14px; padding: 11px 0; width: 100%; background: none; }
.faq-toc { display: grid; gap: 2px; }
.faq-toc a { display: flex; align-items: center; justify-content: space-between; padding: 9px 12px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-size: 14px; font-weight: 500; }
.faq-toc a:hover { background: #F1F3F7; color: var(--ink); }
.faq-toc b { font-size: 11.5px; color: var(--muted-2); background: #F1F3F7; border-radius: 999px; padding: 2px 8px; }
.faq-ayuda { background: #F5F7FA; border-radius: 14px; padding: 16px; font-size: 13px; }
.faq-ayuda p { margin: 4px 0 10px; color: var(--muted); }
.faq-ayuda a { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--brand); text-decoration: none; }
.faq-ayuda a .i { width: 15px; height: 15px; }
.faq-grupo { margin-bottom: 32px; scroll-margin-top: 100px; }
.faq-grupo h2 { font-size: 20px !important; font-weight: 800; margin: 0 0 12px !important; }
.faq-item { border: 1px solid var(--line) !important; border-radius: 12px; margin-bottom: 8px; padding: 0 !important; background: #fff; transition: border-color .15s, box-shadow .15s; }
.faq-item[open] { border-color: #c9d7ee !important; box-shadow: 0 8px 20px -16px rgba(15,27,45,.35); }
.faq-item > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; font-size: 15px !important; font-weight: 600; color: var(--ink); cursor: pointer; }
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary .i { width: 18px; height: 18px; color: var(--brand); flex: none; transition: transform .2s; }
.faq-item[open] > summary .i { transform: rotate(45deg); }
.faq-a { padding: 0 18px 16px; }
.faq-ir { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 14px; font-weight: 700; color: var(--brand); text-decoration: none; }
.faq-ir:hover { text-decoration: underline; }
.faq-ir .i { width: 15px; height: 15px; }
.faq-a p { margin: 0 !important; font-size: 14.5px; line-height: 1.65; color: var(--ink-2); max-width: none !important; }
.faq-vacio { color: var(--muted); }

/* Quiénes somos */
.quien { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.quien-card { background: var(--ink); color: #fff; border-radius: 16px; padding: 22px; }
.quien-card h3 { font-size: 22px; margin: 4px 0 6px; color: #fff; }
.quien-card p { margin: 0; color: #b9bfc8; font-size: 14px; }
.quien-card .met-ic { background: rgba(255,255,255,.1); color: #fff; margin-bottom: 14px; }
.compromisos h3 .i { background: #EEF4FD !important; color: var(--brand) !important; }
.mets { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.met { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.met-ic { width: 40px; height: 40px; border-radius: 12px; background: #F1F3F7; color: var(--brand); display: grid; place-items: center; margin-bottom: 12px; }
.met-ic .i { width: 20px; height: 20px; }
.met h3 { margin: 0 0 6px; font-size: 16px; color: var(--ink); }
.met p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--ink-2); }

/* CTA y pie */
.cta-band { margin-top: 0; padding: 48px 0; background: radial-gradient(600px 240px at 90% 0%, rgba(38,111,224,.35), transparent 60%), #111418; }
.cta-grid { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { font-size: 26px !important; font-weight: 800; letter-spacing: -.015em; margin: 0 0 6px !important; }
.cta-band p { margin: 0; }
.cta-band .cta-btns { margin: 0; }
.pfoot { background: #F5F7FA; border-top: 1px solid var(--line); padding: 40px 0 0; font-size: 13.5px; color: var(--muted); }
.pfoot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.pfoot-grid img { height: 32px; width: auto; display: block; margin-bottom: 12px; }
.pfoot-grid p { margin: 0; line-height: 1.6; max-width: 32em; }
.pfoot-k { font: 600 11px/1 'Hanken Grotesk', sans-serif !important; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-2); margin: 0 0 12px !important; }
.pfoot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pfoot a { color: var(--ink-2); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.pfoot a:hover { color: var(--brand); }
.pfoot a .i { width: 12px; height: 12px; }
.pfoot-legal { border-top: 1px solid var(--line); margin-top: 32px; padding-top: 16px !important; padding-bottom: 24px !important; font-size: 12px; }

@media (max-width: 1000px) {
  .kpis { grid-template-columns: repeat(2, 1fr); } .kpi:first-child { grid-column: 1 / -1; }
  .pasos-cards { grid-template-columns: 1fr 1fr; }
  .faq-layout { grid-template-columns: 1fr; gap: 20px; } .faq-side { position: static; } .faq-ayuda { display: none; }
  .faq-toc { display: flex; flex-wrap: wrap; gap: 6px; } .faq-toc a { border: 1px solid var(--card-line); border-radius: 999px; padding: 6px 12px; }
}
@media (max-width: 700px) {
  .page .wrap { padding: 0 16px; }
  .phero { padding: 112px 0 36px; }
  .psec { padding-top: 32px; padding-bottom: 32px; }
  .perfiles.dos, .sirve, .quien, .pasos-cards { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: 1fr; } .timeline li { padding: 0 0 18px 30px; } .timeline li::before { top: 18px; bottom: 0; left: 7px; right: auto; width: 2px; height: auto; }
  .pfoot-grid { grid-template-columns: 1fr; gap: 24px; }
}

/* Portada interna baja */
.phero { margin-top: -88px; padding: 112px 0 28px; }
.phero-grid { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px 40px; flex-wrap: wrap; }
.phero-txt { flex: 1 1 520px; min-width: 0; }
.phero .eyebrow-k { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.phero .plazo-pill { margin: 0; }
.phero h1 { font-size: clamp(26px, 3.4vw, 38px); margin: 0 0 8px; max-width: 22em; }
.phero-lead { font-size: 15px; max-width: 46em; }
.kpis-wrap { margin-top: 24px; }
.kpis-wrap .kpis { margin-top: 0; }
@media (max-width: 700px) { .phero { padding: 96px 0 22px; } }

/* Tarjetas de perfil con imagen de vidrio 3D */
.perfiles { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.perfil { padding: 0; overflow: hidden; border-radius: 18px; border-color: #e6e9ef; }
.perfil > :not(.perfil-img) { margin-left: 20px; margin-right: 20px; }
.perfil-img { position: relative; margin: 0 0 16px !important; aspect-ratio: 16 / 8.5; overflow: hidden; background: linear-gradient(180deg, #f3f5f8, #e9edf2); }
.perfil-img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.perfil:hover .perfil-img img { transform: scale(1.04); }
.perfil-img figcaption { position: absolute; left: 14px; bottom: 12px; display: inline-flex; align-items: baseline; gap: 5px; font-size: 12px; color: var(--ink-2); padding: 6px 11px; border-radius: 999px;
  background: rgba(255,255,255,.7); -webkit-backdrop-filter: blur(12px) saturate(160%); backdrop-filter: blur(12px) saturate(160%); border: 1px solid rgba(255,255,255,.8); box-shadow: 0 4px 14px -6px rgba(15,27,45,.25); }
.perfil-img figcaption b { font-size: 16px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.perfil h3 { font-size: 17px; margin-top: 0; margin-bottom: 6px; }
.perfil > p { font-size: 13.5px; margin-bottom: 14px; }
.perfil .pbar { margin-top: 0; margin-bottom: 12px; height: 6px; }
.perfil-datos { grid-template-columns: 1fr 1fr; gap: 8px 16px !important; padding-bottom: 14px !important; border-bottom: 1px solid var(--line-2); margin-bottom: 0 !important; }
.perfil-ver { margin: 14px 20px 18px !important; align-self: stretch; justify-content: center; }
.perfil.sin-mapa { border-style: solid; }
.perfil.sin-mapa .perfil-nota { margin-bottom: 4px; }
.perfil.sin-mapa .perfil-ver { margin-top: 14px !important; background: #F1F3F7; padding: 9px 14px; }
.perfiles.dos .perfil-img { aspect-ratio: 16 / 7; }
.page .psec { padding-top: 44px; padding-bottom: 44px; }
.page .kpis-wrap { padding-top: 24px; }
.page .kpis-wrap + .psec { padding-top: 36px; }
/* Datos de tarjeta: cifra arriba, etiqueta abajo, 4 en fila */
.perfil-datos { grid-template-columns: repeat(4, 1fr) !important; gap: 6px !important; }
.perfil-datos li { flex-direction: column; align-items: flex-start !important; gap: 2px !important; background: var(--c-bg) !important; border-radius: 10px; padding: 8px 9px !important; font-size: 10.5px !important; line-height: 1.25; color: var(--c) !important; }
.perfil-datos li b { order: -1; margin: 0 !important; font-size: 15px !important; font-weight: 800; color: var(--c) !important; }
.perfil-datos li i { display: none; }
@media (max-width: 700px) { .page .psec { padding-top: 32px; padding-bottom: 32px; } }

/* Menú: sin botones; la página activa en negrita con subrayado blanco */
.top.flotante .nav, .page .top.flotante .nav { gap: 4px; background: none !important; box-shadow: none !important; padding: 0; }
.top.flotante .nav a, .page .top.flotante .nav a { background: none !important; box-shadow: none !important; border: 0; border-radius: 0; padding: 10px 12px; color: var(--ink-2); font-weight: 500; text-decoration: none; position: relative; }
.top.flotante .nav a:hover, .page .top.flotante .nav a:hover { color: var(--ink); background: none !important; }
.top.flotante .nav a[aria-current="page"], .page .top.flotante .nav a[aria-current="page"] { background: none !important; color: var(--ink); font-weight: 700; }
.top.flotante .nav a[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 3px; border-radius: 3px; background: #fff; box-shadow: 0 1px 3px rgba(15,27,45,.25); }

/* ===================== Inicio: hero arriba (estilo Monitor), mapa debajo ===================== */
/* La portada hace scroll: el hero ocupa la primera vista y el mapa una pantalla completa debajo. */
body.app { height: auto; overflow: visible; display: block; }
body.app .top.flotante { position: fixed; }
body.app .stage { position: relative; inset: auto; height: 100dvh; scroll-margin-top: 0; }
.inicio { padding: 132px 16px 48px; border-bottom: 1px solid var(--line); background:
  radial-gradient(900px 380px at 85% 0%, rgba(38,111,224,.14), transparent 60%), #E7F0FF; }
.inicio-in { max-width: 1100px; margin: 0 auto; }
.inicio-k { margin: 0 0 14px; font: 600 11px/1.3 'Hanken Grotesk', system-ui, sans-serif; text-transform: uppercase; letter-spacing: .14em; color: var(--ink); }
.inicio h1 { font-size: clamp(30px, 4.6vw, 52px); font-weight: 800; letter-spacing: -.025em; line-height: 1.04; margin: 0 0 14px; color: #111418; max-width: 16em; }
.inicio-sub { font-size: clamp(15px, 1.5vw, 18px); line-height: 1.55; font-weight: 400; color: #3c4350; max-width: 40em; margin: 0 0 24px; }
.inicio-sub b { color: var(--ink); font-weight: 700; }
.inicio-buscar { max-width: 640px; }
.inicio .search { margin: 0; padding: 0; background: none; box-shadow: none; max-width: none; }
.inicio .combo input { font-size: 1.1rem; padding: 16px 16px 16px 44px; border: 1px solid var(--card-line); border-radius: 12px; background: #fff; box-shadow: 0 10px 30px -14px rgba(15,27,45,.35); }
.inicio .notice { margin: 12px 0 0; font-size: .92rem; }
.inicio-bajo { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-top: 12px; }
.inicio-bajo .link-btn { font-size: 14px; color: var(--brand); font-weight: 600; padding: 6px 0; display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; cursor: pointer; }
.inicio-bajo .plazo-pill { margin: 0; }
.inicio-ej { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 28px; max-width: 880px; }
.inicio-ej article { background: rgba(255,255,255,.75); border: 1px solid #d6e3f8; border-radius: 12px; padding: 14px 16px; }
.inicio-ej p { margin: 0; font-size: 14.5px; line-height: 1.5; color: #3c4350; }
.inicio-ej .inicio-ej-k { margin-bottom: 4px; font: 600 10.5px/1.3 'Hanken Grotesk', system-ui, sans-serif; text-transform: uppercase; letter-spacing: .1em; color: var(--brand); }
.inicio-mapa { display: inline-flex; align-items: center; gap: 6px; margin-top: 22px; font-weight: 600; font-size: 14px; color: var(--ink); text-decoration: none; }
.inicio-mapa:hover { color: var(--brand); }
.inicio .privacy { margin-top: 14px; max-width: 46em; }
#otra { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--brand); border: 0; background: none; padding: 16px 0 4px; cursor: pointer; }
.app .panel-body > #buscar > .notice:first-child { margin: 12px 0 4px; }

/* CTA general del sitio: opinar (reemplaza «Compartir») */
.top.flotante .cta-obs { background: var(--brand); border-color: var(--brand); color: #fff; text-decoration: none; }
.top.flotante .cta-obs:hover { background: #1f5fc4; }

/* Ficha: «Qué significa para ti» y pie con dos acciones */
.para-ti { background: #EEF4FD; border-radius: 12px; padding: 4px 14px 12px; margin: 4px 0 14px; }
.para-ti .sec { border: 0; padding: 0; margin: 10px 0 6px; color: var(--brand); }
.para-ti ul { margin: 0; padding-left: 18px; display: grid; gap: 8px; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.cta-acc { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.drawer-cta .cta-acc .btn { width: auto; flex: 1; }
.cta-acc .btn-txt { flex: none; }
.drawer .share-row { border-bottom: 0; border-top: 1px solid var(--line); margin-top: 14px; padding-top: 14px; }

@media (max-width: 899px) {
  .inicio { padding: 92px 16px 32px; }
  .inicio-ej { grid-template-columns: 1fr; }
  .top.flotante .cta-obs { padding: 9px 12px; }
  .top.flotante .cta-obs span { display: inline; font-size: 13px; }
  .top.flotante .cta-obs:not(:hover) { background: var(--brand); border-color: var(--brand); }
}
@media (max-width: 420px) { .top.flotante .cta-obs span { display: none; } .top.flotante .cta-obs { width: 40px; height: 40px; padding: 0; justify-content: center; } }
@media print { .inicio { display: none !important; } body.app .stage { height: auto; } }
.inicio .privacy { padding: 0; border: 0; background: none; }
.cta-acc .btn { white-space: nowrap; } .cta-acc .btn-txt { white-space: normal; text-align: left; line-height: 1.25; }

/* Análisis y panel simplificado */
.rango { display: grid; gap: 4px; font-size: 12.5px; color: var(--muted); margin: 6px 0 4px 24px; }
.rango input { width: 100%; accent-color: var(--brand); }
.rango[hidden] { display: none; }
.datos-ciudad { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.datos-ciudad li { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: grid; gap: 6px; }
.datos-ciudad b { font-size: 17px; font-weight: 800; color: var(--ink); }
.datos-ciudad span { font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.sector .sector-k { margin: 10px 20px 2px; font: 600 10.5px/1.3 'Hanken Grotesk', system-ui, sans-serif; text-transform: uppercase; letter-spacing: .1em; color: var(--brand); }
.sector .sector-k + p { margin-top: 0; }
.sector-video { aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: var(--bg); }
.sector-video iframe { width: 100%; height: 100%; border: 0; }

/* Hero del inicio: satélite de Viña desenfocado bajo un velo azul claro */
.inicio { position: relative; overflow: hidden; isolation: isolate; }
.inicio-fondo { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.inicio-fondo img { width: 100%; height: 100%; object-fit: cover; object-position: center; filter: blur(5px) saturate(.85); transform: scale(1.06); /* el scale esconde el borde claro del blur */ }
.inicio-fondo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(231,240,255,.80), rgba(231,240,255,.70) 60%, rgba(231,240,255,.86)); }
.inicio-atrib { position: absolute; right: 10px; bottom: 6px; margin: 0; font-size: 10px; color: var(--muted); }
.inicio-atrib a { color: inherit; }

/* Hero del inicio centrado, velo blanco translúcido sobre el satélite */
.inicio { min-height: min(92dvh, 860px); display: flex; align-items: center; padding: 120px 16px 56px; }
.inicio-fondo::after { background: linear-gradient(180deg, rgba(255,255,255,.80) 0%, rgba(255,255,255,.62) 45%, rgba(255,255,255,.88) 100%); }
.inicio-in { width: 100%; display: flex; flex-direction: column; align-items: center; text-align: center; }
.inicio-k { display: inline-block; padding: 7px 12px; border-radius: 999px; background: rgba(255,255,255,.75); border: 1px solid rgba(15,27,45,.08); margin-bottom: 18px; }
.inicio h1 { max-width: 14em; margin: 0 auto 16px; font-size: clamp(34px, 5.4vw, 60px); }
.inicio-sub { max-width: 36em; margin: 0 auto 28px; }
.inicio-buscar { width: 100%; max-width: 680px; }
.inicio .combo input { padding-right: 112px; text-align: left; font-size: 1.12rem; min-height: 60px; border-radius: 14px; }
.buscar-btn { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); height: 46px; padding: 0 20px; border: 0; border-radius: 10px; background: var(--brand); color: #fff; font: inherit; font-weight: 600; font-size: 15px; cursor: pointer; }
.buscar-btn:hover { background: #1f5fc4; }
.inicio .sugerencias { text-align: left; }
.inicio .notice { text-align: left; }
.inicio-bajo { justify-content: center; gap: 10px 20px; margin-top: 14px; }
.inicio-ej { width: 100%; margin: 36px auto 0; text-align: left; gap: 14px; }
.inicio-ej article { display: flex; gap: 14px; align-items: flex-start; background: rgba(255,255,255,.82); border-color: rgba(15,27,45,.08); border-radius: 14px; padding: 16px 18px; box-shadow: 0 8px 24px -18px rgba(15,27,45,.35); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.inicio-ej-ic { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: #E7F0FF; color: var(--brand); }
.inicio-ej-ic .i { width: 20px; height: 20px; }
.inicio-mapa { margin-top: 28px; padding: 10px 18px; border-radius: 999px; background: rgba(255,255,255,.85); border: 1px solid rgba(15,27,45,.10); box-shadow: 0 6px 18px -14px rgba(15,27,45,.4); }
.inicio-mapa:hover { border-color: var(--brand); }
.inicio .privacy { margin: 18px auto 0; text-align: center; }
@media (max-width: 899px) {
  .inicio { min-height: 0; padding: 96px 16px 36px; }
  .inicio h1 { font-size: clamp(30px, 8.4vw, 40px); }
  .inicio .combo input { padding-right: 16px; }
  .buscar-btn { position: static; transform: none; width: 100%; margin-top: 10px; height: 50px; }
}
.inicio .combo .ico { top: 30px; } /* centrada en el campo (60px), no en el bloque con el botón */
@media (max-width: 899px) { .inicio-k { letter-spacing: .08em; font-size: 10px; } }

/* Cuenta regresiva del hero (reemplaza la etiqueta superior) */
.inicio-k.cuenta { display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px 6px 14px; letter-spacing: .08em; }
.cuenta-t { margin-right: 4px; }
.cuenta-n { display: inline-flex; align-items: baseline; gap: 3px; padding: 5px 8px; border-radius: 8px; background: var(--ink); color: #fff; }
.cuenta-n b { font: 600 14px/1 'Hanken Grotesk', system-ui, sans-serif; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.cuenta-n i { font-style: normal; font-size: 9.5px; letter-spacing: .06em; opacity: .7; }
@media (max-width: 899px) {
  .inicio-k.cuenta { flex-wrap: wrap; justify-content: center; padding: 8px 10px; border-radius: 14px; }
  .cuenta-t { flex-basis: 100%; text-align: center; margin: 0 0 2px; }
}
/* Contador en modo claro */
.cuenta-n { background: #fff; color: var(--ink); border: 1px solid rgba(15,27,45,.10); box-shadow: 0 1px 2px rgba(15,27,45,.06); }
.cuenta-n b { color: var(--brand); }
.cuenta-n i { color: var(--muted); opacity: 1; }
.inicio-k.cuenta { background: rgba(255,255,255,.6); }
.inicio-bajo { margin: 0 0 10px; } /* «Usar mi ubicación» va sobre el buscador */
.migas-raiz { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink); cursor: default; }
.migas-raiz .i { color: var(--brand); }

/* Modal «Cómo ingresar tu observación» */
.dlg-op { width: min(560px, calc(100% - 24px)); max-height: calc(100dvh - 32px); padding: 0; border: 0; border-radius: 18px; box-shadow: 0 24px 60px -20px rgba(15,27,45,.45); color: var(--ink); }
.dlg-op::backdrop { background: rgba(15,27,45,.45); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.dlg-op-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.dlg-op-head h2 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.dlg-op-k { margin: 0 0 6px; font: 600 10.5px/1.3 'Hanken Grotesk', system-ui, sans-serif; text-transform: uppercase; letter-spacing: .1em; color: var(--brand); }
.dlg-op-ext { display: flex; gap: 10px; align-items: flex-start; background: #F1F5FB; border: 1px solid #d6e3f8; border-radius: 12px; padding: 12px 14px; }
.dlg-op-ext > .i { color: var(--brand); width: 18px; height: 18px; margin-top: 2px; }
.dlg-op-ext p { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.dlg-op-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.dlg-op-foot .btn-txt { text-decoration: none; }
.dlg-op-foot .btn.primary { text-decoration: none; }
@media (max-width: 520px) { .dlg-op-foot .btn.primary { width: 100%; justify-content: center; } .dlg-op-foot { flex-direction: column-reverse; align-items: stretch; } .dlg-op-foot .btn-txt { text-align: center; } }

/* «Dos cosas que cambian» (Preguntas frecuentes): las dos tarjetas fijas, lado a lado */
.page .inicio-ej { margin: 0; max-width: none; }
.page .inicio-ej article { background: #fff; border: 1px solid var(--line); }

/* Filtros del panel como tarjetas: ícono, título, ayuda, contador y flecha */
.tools .filtro { border: 1px solid var(--line); border-radius: 12px; margin: 8px 0 0; padding: 0; background: #fff; transition: border-color .15s, box-shadow .15s; }
.tools .filtro:hover { border-color: #cfd8e6; }
.tools .filtro[open] { border-color: #d6e3f8; box-shadow: 0 6px 18px -14px rgba(15,27,45,.35); }
.tools .filtro > summary { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 0; margin: 0; }
.tools .filtro > summary::after { content: none; }
.f-ic { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: #F1F5FB; color: var(--muted); transition: background .15s, color .15s; }
.f-ic .i { width: 17px; height: 17px; }
.tools .filtro[open] .f-ic, .tools .filtro > summary:hover .f-ic { background: #E7F0FF; color: var(--brand); }
.f-txt { display: grid; gap: 1px; min-width: 0; flex: 1; text-align: left; }
.f-txt b { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.f-txt small { font-size: 12px; font-weight: 400; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tools .f-n { flex: none; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; }
.tools .f-n:empty { display: none; }
.f-chev { flex: none; width: 8px; height: 8px; margin-right: 4px; border-right: 2px solid var(--muted-2); border-bottom: 2px solid var(--muted-2); transform: rotate(45deg) translateY(-2px); transition: transform .2s; }
.tools .filtro[open] .f-chev { transform: rotate(-135deg) translateY(-2px); }
.tools .filtro > :not(summary) { margin-left: 12px; margin-right: 12px; }
.tools .filtro > :last-child { margin-bottom: 12px; }
@media (prefers-reduced-motion: reduce) { .f-chev, .f-ic, .tools .filtro { transition: none; } }

/* Zoom del mapa: botones claros estilo Monitor (blanco, borde suave, radio 8, ícono en tinta) */
.mapboxgl-ctrl-group { background: #fff !important; border: 1px solid var(--card-line) !important; border-radius: 10px !important; box-shadow: 0 1px 2px rgba(16,24,40,.06), 0 6px 16px -10px rgba(15,27,45,.35) !important; overflow: hidden; }
.mapboxgl-ctrl-group button { width: 38px !important; height: 38px !important; background: #fff !important; transition: background .15s; }
.mapboxgl-ctrl-group button + button { border-top: 1px solid var(--line) !important; }
.mapboxgl-ctrl-group button:hover { background: #F1F3F7 !important; }
.mapboxgl-ctrl-group button:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.mapboxgl-ctrl-group .mapboxgl-ctrl-icon { filter: none; opacity: .8; }
.mapboxgl-ctrl-group button:hover .mapboxgl-ctrl-icon { opacity: 1; }
body.con-ficha .mapboxgl-ctrl-top-right { right: 492px !important; } /* que la ficha no lo tape */
@media (max-width: 899px) { body.con-ficha .mapboxgl-ctrl-top-right { right: 16px !important; } }
.datos-ciudad { grid-template-columns: repeat(auto-fit, minmax(196px, 1fr)); } .datos-ciudad li { align-content: start; }

/* ===================== Responsive: header y botones en pantallas angostas ===================== */
.top.flotante .cta-obs .cta-corto { display: none; }
@media (max-width: 1023px) {
  .top.flotante .cta-obs { margin-left: auto; height: 40px; width: auto; padding: 0 14px; gap: 6px; justify-content: center; white-space: nowrap; }
  .top.flotante .cta-obs .cta-largo { display: none; }
  .top.flotante .cta-obs .cta-corto { display: inline; font-size: 14px; font-weight: 600; }
  .top.flotante .cta-obs .i { width: 16px; height: 16px; }
  .top-actions { gap: 8px; }
}
@media (max-width: 899px) {
  .page .top.flotante .top-row { gap: 8px; }
  .nav-movil summary { width: 40px; height: 40px; }
}

/* Heros de las páginas internas: mismo fondo satelital que el inicio */
.phero.con-fondo { position: relative; overflow: hidden; isolation: isolate; background: #fff; }
.phero.con-fondo .phero-grid { position: relative; }

/* Barra de búsqueda: «Mi ubicación» y «Buscar» dentro, a la derecha */
.inicio .combo input { padding-right: 268px; }
.combo-acc { position: absolute; right: 7px; top: 7px; display: flex; align-items: center; gap: 4px; }
.combo-acc .buscar-btn { position: static; transform: none; }
.ubic-btn { display: inline-flex; align-items: center; gap: 6px; height: 46px; padding: 0 12px; border: 0; border-right: 1px solid var(--line); border-radius: 0; background: none; color: var(--brand); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; margin-right: 4px; }
.ubic-btn:hover { color: #1f5fc4; text-decoration: underline; text-underline-offset: 3px; }
.ubic-btn .i { width: 16px; height: 16px; }
@media (max-width: 899px) {
  .inicio .combo input { padding-right: 16px; }
  .combo-acc { position: static; display: grid; grid-template-columns: auto 1fr; gap: 8px; margin-top: 10px; }
  .ubic-btn { height: 50px; border: 1px solid var(--card-line); border-radius: 12px; background: rgba(255,255,255,.9); padding: 0 14px; margin: 0; }
  .combo-acc .buscar-btn { width: 100%; margin: 0; height: 50px; }
}

/* «Ingresa tu observación»: panel que entra por la derecha (antes, modal centrado) */
.dlg-op { margin: 0 0 0 auto; width: min(480px, 100%); height: 100dvh; max-height: 100dvh; border-radius: 18px 0 0 18px; }
.dlg-op[open] { display: flex; flex-direction: column; animation: op-entra .28s cubic-bezier(.2,.8,.2,1); }
@keyframes op-entra { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .dlg-op[open] { animation: none; } }
.dlg-op-head { padding: 20px 20px 14px; border-bottom: 1px solid var(--line); }
.dlg-op-body { flex: 1; overflow: auto; padding: 18px 20px 24px; display: grid; gap: 22px; align-content: start; }
.dlg-op-ej { margin: 10px 0 0; border-left: 3px solid var(--brand); background: #F7F9FC; border-radius: 0 12px 12px 0; padding: 10px 14px; }
.dlg-op-ej figcaption { font: 600 10.5px/1.3 'Hanken Grotesk', system-ui, sans-serif; text-transform: uppercase; letter-spacing: .1em; color: var(--brand); margin-bottom: 4px; }
.dlg-op-ej blockquote { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--ink-2); }
.dlg-op-ej p { margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.dlg-op-linea { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.dlg-op-linea li { position: relative; padding: 0 0 12px 22px; font-size: 13.5px; color: var(--ink-2); line-height: 1.45; }
.dlg-op-linea li::before { content: ""; position: absolute; left: 4px; top: 5px; width: 9px; height: 9px; border-radius: 50%; background: #d0d7e2; }
.dlg-op-linea li:not(:last-child)::after { content: ""; position: absolute; left: 8px; top: 16px; bottom: 0; width: 1px; background: #e3e8ef; }
.dlg-op-linea li.hecho::before { background: var(--muted-2); } .dlg-op-linea li.ahora::before { background: var(--brand); box-shadow: 0 0 0 4px #E7F0FF; }
.dlg-op-linea b { display: block; color: var(--ink); font-size: 13px; }
.dlg-op-foot { display: grid; gap: 10px; padding: 14px 20px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fff; box-shadow: 0 -8px 20px -16px rgba(15,27,45,.3); }
.dlg-op-foot .dlg-op-ext { margin: 0; display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; line-height: 1.45; color: var(--ink-2); background: none; border: 0; padding: 0; }
.dlg-op-foot .dlg-op-ext .i { color: var(--brand); width: 15px; height: 15px; margin-top: 2px; flex: none; }
.dlg-op-foot .btn.primary { width: 100%; justify-content: center; min-height: 48px; }
@media (max-width: 520px) { .dlg-op { border-radius: 0; width: 100%; } }
.dlg-op { max-width: 100%; }

/* Móvil: la ficha cubre toda la pantalla por encima del header (si no, el header tapa su X) */
@media (max-width: 899px) {
  .app .drawer { position: fixed; z-index: 20; inset: 0; top: 0; }
  .drawer-cta .cta-acc { display: grid; grid-template-columns: 1fr; gap: 4px; }
  .drawer-cta .cta-acc .btn { width: 100%; justify-content: center; }
  .drawer-cta .cta-acc .btn-txt { order: 2; text-align: center; white-space: nowrap; }
}

/* Páginas internas: etiqueta del hero en negro, sin píldora de plazo */
.phero .eyebrow-k { color: var(--ink); }

/* Hero del inicio: título y bajada balanceados; ejemplo al ancho del buscador; puntos del carrusel */
.inicio h1, .inicio-sub { text-wrap: balance; }
.inicio h1 { max-width: 13em; }
/* Segundo punto: delay negativo (arranca a mitad de ciclo, apagado), así no se ve encendido mientras espera */
/* Header de páginas internas: «Opinar» a la derecha, junto al menú */
.page .top.flotante .cta-obs { order: 2; }
.page .top.flotante .nav-movil { order: 3; }
@media (max-width: 899px) { .page .top.flotante .top-row { justify-content: flex-start; } .page .top.flotante .cta-obs { margin-left: auto; } }
@media (min-width: 900px) and (max-width: 1023px) { .page .top.flotante .cta-obs { margin-left: 8px; } }
@media (max-width: 899px) { .page .top.flotante .nav-movil { margin-left: 8px; } }

/* Análisis por sector: cambio de uso destacado (hoy → propuesta) y altura propuesta */
.sector-uso { margin: 4px 20px 6px; padding: 12px; border-radius: 12px; background: #F5F1FC; border: 1px solid #E4D9F7; display: grid; gap: 8px; }
.sector-uso-k { margin: 0; display: flex; align-items: center; justify-content: space-between; font: 600 10.5px/1.3 'Hanken Grotesk', system-ui, sans-serif; text-transform: uppercase; letter-spacing: .1em; color: #6b3fb0; }
.sector-uso-k span { font-family: 'Hanken Grotesk', sans-serif; letter-spacing: 0; text-transform: none; font-size: 11.5px; font-weight: 700; color: #fff; background: #6b3fb0; padding: 3px 8px; border-radius: 999px; }
.sector-uso-f { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 13.5px; line-height: 1.35; }
.sector-uso-f > .i { color: #6b3fb0; width: 15px; height: 15px; flex: none; }
.su-hoy { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(107,63,176,.45); }
.su-prop { font-weight: 700; color: #4a2a85; }
.sector-pisos { margin: 0; display: flex; align-items: center; gap: 6px; padding-top: 8px; border-top: 1px solid #E4D9F7; font-size: 13px; color: var(--ink-2); }
.sector-pisos .i { width: 15px; height: 15px; color: var(--muted); }
/* Tarjetas de grupos: solo cifras distintas de cero, en gris neutro (sin colores por estado) */
.perfil-datos li, .perfil-datos li[class] { background: #F3F4F6 !important; color: var(--ink-2) !important; }
.perfil-datos li b { color: var(--ink) !important; }
.perfil-datos { grid-template-columns: repeat(auto-fit, minmax(76px, 1fr)) !important; } .perfil-datos li:first-child { font-size: 12px; margin-bottom: 0; }
.perfil-datos { grid-template-columns: repeat(auto-fit, minmax(62px, 1fr)) !important; }

/* Leyenda del mapa compacta: círculos de color, texto más chico */
.app .map-legend { padding: 8px 12px !important; border-radius: 12px !important; gap: 6px !important; display: grid; box-shadow: 0 1px 2px rgba(16,24,40,.06), 0 8px 20px -14px rgba(15,27,45,.35) !important; border: 1px solid rgba(15,27,45,.06); }
.lg-head { gap: 6px; }
.lg-head b { font-size: 11.5px; font-weight: 700; }
.lg-head span { font-size: 10.5px; }
.lg-clases { gap: 4px 12px; }
.lg-clases li { font-size: 11px; gap: 5px; }
.lg-clases .sw, .app .map-legend .sw { width: 9px !important; height: 9px !important; border-radius: 50% !important; flex: none; }
.lg-sin .sw { box-shadow: inset 0 0 0 1px #b8c0cc; }
@media (max-width: 899px) { .lg-clases .sw, .app .map-legend .sw { width: 8px !important; height: 8px !important; } .lg-clases li { font-size: 10.5px; } }
@media (max-width: 899px) { .app .map-legend, body.app.con-ficha .map-legend { max-width: calc(100% - 84px) !important; } }

/* Footer en modo oscuro, en todo el sitio */
.pfoot { background: #12161C !important; color: #A7B0BE; border-top: 0 !important; }
.pfoot p, .pfoot-legal { color: #A7B0BE !important; }
.pfoot-k { color: #7D8696 !important; }
.pfoot a { color: #E6E9EE !important; }
.pfoot a:hover { color: #fff !important; text-decoration: underline; text-underline-offset: 3px; }
.pfoot a .i { color: #7D8696; }
.pfoot-legal { border-top: 1px solid rgba(255,255,255,.08) !important; }
.app .pfoot { position: relative; z-index: 1; }
/* La portada no tenía estos estilos de página: contenedor */
.app .pfoot .wrap { max-width: 1100px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }

/* Panel «Cómo ingresar tu observación»: pasos como recorrido, lista ✓/✕, secciones con etiqueta */
.dlg-op-head { padding: 22px 22px 16px; background: linear-gradient(180deg, #F3F7FE, #fff); }
.dlg-op-head h2 { font-size: 23px; }
.dlg-op-lead { margin: 8px 0 0; font-size: 14px; line-height: 1.5; color: var(--ink-2); max-width: 34em; }
.dlg-op-body { padding: 20px 22px 28px; gap: 26px; }
.op-pasos { list-style: none; margin: 0; padding: 0; display: grid; }
.op-pasos li { position: relative; display: flex; gap: 14px; padding-bottom: 18px; }
.op-pasos li:last-child { padding-bottom: 0; }
.op-pasos li:not(:last-child)::before { content: ""; position: absolute; left: 17px; top: 38px; bottom: 2px; width: 2px; border-radius: 2px; background: #E3EAF6; }
.op-n { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #E7F0FF; color: var(--brand); box-shadow: 0 0 0 4px #fff; position: relative; }
.op-n .i { width: 17px; height: 17px; }
.op-pasos b { font-size: 15px; color: var(--ink); }
.op-pasos p { margin: 3px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.op-pasos p b { font-size: inherit; }
.op-mini { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 7px 12px; border-radius: 999px; background: #EEF4FD; color: var(--brand); font-size: 13px; font-weight: 600; text-decoration: none; }
.op-mini:hover { background: #E2ECFC; }
.op-mini .i { width: 14px; height: 14px; }
.op-sec { display: grid; gap: 12px; padding-top: 22px; border-top: 1px solid var(--line); }
.op-k { margin: 0; font: 600 10.5px/1.3 'Hanken Grotesk', system-ui, sans-serif; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.op-check { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.op-check li { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.op-check li > .i { flex: none; width: 20px; height: 20px; padding: 3px; border-radius: 50%; margin-top: 0; }
.op-check .si > .i { background: #E7F6EC; color: #067647; }
.op-check .no > .i { background: #FDECEA; color: #B42318; }
.op-check .no:first-of-type, .op-check .si + .no { margin-top: 6px; }
.dlg-op-ej { margin: 4px 0 0; border: 1px solid var(--line); border-left: 3px solid var(--brand); background: #FAFBFD; border-radius: 4px 12px 12px 4px; padding: 12px 14px; }
@media (max-width: 520px) { .dlg-op-head { padding: 18px 16px 14px; } .dlg-op-body { padding: 18px 16px 24px; } .dlg-op-foot { padding-left: 16px; padding-right: 16px; } }

/* «Viña en general»: 3 + 2 tarjetas con ícono, página, cifra grande, título y texto breve */
.datos-ciudad { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; gap: 14px !important; }
.datos-ciudad li { grid-column: span 2; display: flex !important; flex-direction: column; gap: 6px; padding: 18px 18px 20px !important; border-radius: 16px !important; border: 1px solid var(--line); background: #fff; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.datos-ciudad li:nth-child(n+4) { grid-column: span 3; }
.dc-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.dc-ic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: #E7F0FF; color: var(--brand); }
.dc-ic .i { width: 18px; height: 18px; }
.dc-pag { font: 600 10.5px/1 'Hanken Grotesk', system-ui, sans-serif; letter-spacing: .06em; color: var(--muted); background: #F3F4F6; padding: 5px 8px; border-radius: 999px; }
.dc-cifra { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -.02em; line-height: 1.05; color: var(--ink); font-variant-numeric: tabular-nums; }
.datos-ciudad h3 { margin: 0; font-size: 15px; font-weight: 700; color: var(--ink); }
.datos-ciudad li > p:not(.dc-cifra) { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
@media (max-width: 899px) { .datos-ciudad { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } .datos-ciudad li, .datos-ciudad li:nth-child(n+4) { grid-column: span 1; } .datos-ciudad li:last-child { grid-column: 1 / -1; } }
@media (max-width: 520px) { .datos-ciudad { grid-template-columns: 1fr !important; } .datos-ciudad li:last-child { grid-column: auto; } }
.datos-ciudad .dc-pag { font: 600 10.5px/1 'Hanken Grotesk', system-ui, sans-serif !important; letter-spacing: .06em; color: var(--muted) !important; }

/* ===================== Prueba: heros en modo oscuro (borrar este bloque para volver al claro) ===================== */
.inicio-fondo::after { background: linear-gradient(180deg, rgba(10,14,20,.78) 0%, rgba(10,14,20,.62) 50%, rgba(10,14,20,.86) 100%) !important; }
.inicio-fondo img { filter: blur(4px) saturate(.9) brightness(.9); }
.inicio h1, .phero.con-fondo h1 { color: #fff !important; }
.inicio-sub, .phero.con-fondo .phero-lead { color: #C9D1DC !important; }
.inicio-sub b { color: #fff !important; }
.phero.con-fondo { background: #0E1218 !important; border-bottom-color: rgba(255,255,255,.08) !important; }
.phero.con-fondo .eyebrow-k { color: #fff !important; }
.phero.con-fondo .phero-lead a { color: #9DC0FF; }
.inicio-atrib, .inicio-atrib a { color: rgba(255,255,255,.55) !important; }
/* Contador: vidrio oscuro */
.inicio-k.cuenta { background: rgba(255,255,255,.08) !important; border-color: rgba(255,255,255,.14) !important; color: #E6E9EE; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.cuenta-n { background: rgba(255,255,255,.10) !important; border-color: rgba(255,255,255,.16) !important; box-shadow: none !important; }
.cuenta-n b { color: #fff !important; }
.cuenta-n i { color: #AEB7C4 !important; }
/* Buscador: sigue blanco; sombra más marcada sobre fondo oscuro */
.inicio .combo input { border-color: transparent; box-shadow: 0 16px 40px -18px rgba(0,0,0,.6); }
/* «O explora el mapa»: vidrio oscuro */
.inicio-mapa { background: rgba(255,255,255,.10) !important; border-color: rgba(255,255,255,.18) !important; color: #fff !important; box-shadow: none !important; }
.inicio-mapa:hover { background: rgba(255,255,255,.18) !important; }
@media (max-width: 899px) { .ubic-btn { background: rgba(255,255,255,.95); border-color: transparent; } }
.top.flotante { background: rgba(255,255,255,.92) !important; border-color: rgba(255,255,255,.9) !important; } /* sobre hero oscuro, el vidrio quedaba gris y sin contraste */

/* «Viña en general» como carrusel: una fila de tarjetas con desplazamiento nativo (scroll-snap) */
.datos-ciudad { display: flex !important; gap: 14px !important; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: 2px; padding: 2px 2px 8px !important; margin: 0 -2px !important; }
.datos-ciudad li, .datos-ciudad li:nth-child(n+4), .datos-ciudad li:last-child { flex: 0 0 min(260px, 78%); scroll-snap-align: start; grid-column: auto !important; padding: 18px !important; }
.datos-ciudad:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; border-radius: 16px; }
.dc-cifra { font-size: 30px; }
.car-ctrl { display: flex; gap: 8px; }
.car-btn { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--card-line); background: #fff; color: var(--ink); cursor: pointer; transition: background .15s, opacity .15s; }
.car-btn:hover:not(:disabled) { background: #F1F3F7; }
.car-btn:disabled { opacity: .35; cursor: default; }
.car-btn .i { width: 17px; height: 17px; }
@media (max-width: 520px) { .datos-ciudad { grid-template-columns: none !important; } }

/* Cifras de Análisis: chicas, blancas, sin íconos ni colores */
.kpis { gap: 10px !important; }
.kpis .kpi, .kpis .kpi:first-child { background: #fff !important; color: var(--ink) !important; border: 1px solid var(--line) !important; box-shadow: none !important; padding: 12px 14px !important; border-radius: 12px !important; min-height: 0 !important; gap: 2px !important; }
.kpis .kpi b, .kpis .kpi:first-child b { color: var(--ink) !important; font-size: 20px !important; font-weight: 800; }
.kpis .kpi span, .kpis .kpi:first-child span { color: var(--muted) !important; font-size: 12px !important; }
.kpis .kpi .i { display: none; }
/* Carrusel: frase como título */
.dc-titulo { margin: 0 !important; font-size: 18px !important; font-weight: 800 !important; line-height: 1.2; letter-spacing: -.01em; color: var(--ink); text-wrap: balance; }
.datos-ciudad li > p { margin-top: 2px !important; }

/* Vidrio: header claro esmerilado y buscador oscuro translúcido (sobre el hero oscuro) */
.top.flotante { background: linear-gradient(135deg, rgba(255,255,255,.72), rgba(255,255,255,.52)) !important; -webkit-backdrop-filter: blur(22px) saturate(180%) !important; backdrop-filter: blur(22px) saturate(180%) !important; border: 1px solid rgba(255,255,255,.55) !important; box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 12px 32px -16px rgba(0,0,0,.45) !important; }
.top.flotante .nav a { color: var(--ink) !important; }
.top.flotante .brand-sub { color: #3c4350; border-left-color: rgba(15,27,45,.18); }
.inicio .combo input { background: rgba(255,255,255,.12) !important; color: #fff; caret-color: #fff; border: 1px solid rgba(255,255,255,.24) !important; -webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%); box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 16px 40px -18px rgba(0,0,0,.6) !important; }
.inicio .combo input::placeholder { color: rgba(255,255,255,.62); }
.inicio .combo input:focus { border-color: rgba(157,192,255,.8) !important; box-shadow: 0 0 0 3px rgba(59,130,246,.35), 0 16px 40px -18px rgba(0,0,0,.6) !important; }
.inicio .combo .ico .i { color: rgba(255,255,255,.75); }
.inicio .ubic-btn { color: #A9C8FF; border-right-color: rgba(255,255,255,.18); }
.inicio .ubic-btn:hover { color: #fff; }
@media (max-width: 899px) { .inicio .ubic-btn { background: rgba(255,255,255,.12) !important; border: 1px solid rgba(255,255,255,.24) !important; color: #fff; -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); } }
.inicio .combo .ico { z-index: 2; } /* el backdrop-filter del campo la tapaba */
.top.flotante .nav a[aria-current="page"]::after { box-shadow: none !important; } /* subrayado del activo, sin sombra */

/* Avisos del buscador: ícono, texto y cerrar. En el hero, vidrio oscuro con acento ámbar; en el panel, azul claro. */
#aviso { display: flex; align-items: flex-start; gap: 10px; border-radius: 12px; padding: 12px 12px 12px 14px; text-align: left; animation: aviso-in .2s ease-out; }
#aviso > .i { flex: none; width: 18px; height: 18px; margin-top: 1px; }
#aviso p { margin: 0; flex: 1; font-size: 14px; line-height: 1.45; }
.aviso-x { flex: none; display: grid; place-items: center; width: 26px; height: 26px; margin: -3px -3px 0 0; border: 0; border-radius: 50%; background: none; color: inherit; opacity: .7; cursor: pointer; }
.aviso-x:hover { opacity: 1; background: rgba(127,127,127,.15); }
.aviso-x .i { width: 14px; height: 14px; }
.inicio #aviso { margin: 12px 0 0; background: rgba(245,166,35,.14) !important; border: 1px solid rgba(245,166,35,.45) !important; color: #FFE8C2; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 12px 30px -18px rgba(0,0,0,.6); }
.inicio #aviso > .i { color: #F5A623; }
.inicio #aviso b { color: #fff; }
.panel #aviso { background: #EEF4FD !important; border: 1px solid #D6E3F8 !important; color: var(--ink-2); }
.panel #aviso > .i { color: var(--brand); }
@keyframes aviso-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { #aviso { animation: none; } }
.inicio .combo .buscar-btn { border: 0 !important; box-shadow: none !important; outline-offset: 2px; } /* la regla vieja «.search button[type=submit]» le ponía borde */

/* Header de vidrio oscuro, texto blanco. Transparente sobre el hero; algo más denso sobre el mapa o el contenido */
.top.flotante { background: rgba(16,20,26,.58) !important; -webkit-backdrop-filter: blur(20px) saturate(160%) !important; backdrop-filter: blur(20px) saturate(160%) !important; border: 1px solid rgba(255,255,255,.14) !important; box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 12px 32px -16px rgba(0,0,0,.5) !important; transition: background .25s; }
body.sobre-hero .top.flotante { background: rgba(255,255,255,.08) !important; }
.top.flotante .nav a { color: rgba(255,255,255,.82) !important; }
.top.flotante .nav a:hover, .top.flotante .nav a[aria-current="page"] { color: #fff !important; }
.top.flotante .brand-sub { color: rgba(255,255,255,.7) !important; border-left-color: rgba(255,255,255,.2) !important; }
.top.flotante .migas { border-left-color: rgba(255,255,255,.2) !important; }
.top.flotante .migas-raiz, .top.flotante .migas button, .top.flotante .migas li + li::before { color: rgba(255,255,255,.85) !important; }
.top.flotante .migas [aria-current] { color: rgba(255,255,255,.6) !important; }
.top.flotante .migas-raiz .i { color: #9DC0FF; }
.top.flotante .nav-movil summary { background: rgba(255,255,255,.12) !important; border: 1px solid rgba(255,255,255,.2) !important; color: #fff; }
@media (prefers-reduced-motion: reduce) { .top.flotante { transition: none; } }
.top.flotante { background: rgba(16,20,26,.68) !important; } body.sobre-hero .top.flotante { background: rgba(255,255,255,.08) !important; } /* contraste del texto blanco sobre fondos claros */
/* Velo de los heros más transparente (antes .78 / .62 / .86) */
.inicio-fondo::after { background: linear-gradient(180deg, rgba(10,14,20,.56) 0%, rgba(10,14,20,.38) 50%, rgba(10,14,20,.68) 100%) !important; }
.inicio-fondo img { filter: blur(4px) saturate(.95) brightness(.95) !important; }
.inicio h1, .phero.con-fondo h1 { text-shadow: 0 2px 18px rgba(0,0,0,.35); }
.inicio-sub, .phero.con-fondo .phero-lead { text-shadow: 0 1px 10px rgba(0,0,0,.45); }

/* Header que se adapta al fondo: claro (texto oscuro) sobre mapa/contenido; transparente con texto blanco sobre el hero */
.top.flotante .logo-b { display: none; }
body.sobre-hero .top.flotante .logo-b { display: block; }
body.sobre-hero .top.flotante .logo-n { display: none; }
.top.flotante { background: rgba(255,255,255,.72) !important; border-color: rgba(255,255,255,.6) !important; box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 12px 32px -16px rgba(15,27,45,.35) !important; }
.top.flotante .nav a { color: var(--ink-2) !important; }
.top.flotante .nav a:hover, .top.flotante .nav a[aria-current="page"] { color: var(--ink) !important; }
.top.flotante .nav a[aria-current="page"]::after { background: var(--ink) !important; }
.top.flotante .brand-sub { color: var(--muted) !important; border-left-color: rgba(15,27,45,.14) !important; }
.top.flotante .migas { border-left-color: rgba(15,27,45,.12) !important; }
.top.flotante .migas-raiz, .top.flotante .migas button { color: var(--ink) !important; }
.top.flotante .migas li + li::before, .top.flotante .migas [aria-current] { color: var(--muted-2) !important; }
.top.flotante .migas-raiz .i { color: var(--brand) !important; }
.top.flotante .nav-movil summary { background: rgba(255,255,255,.6) !important; border-color: rgba(15,27,45,.1) !important; color: var(--ink) !important; }
/* Sobre el hero */
body.sobre-hero .top.flotante { background: rgba(255,255,255,.08) !important; border-color: rgba(255,255,255,.14) !important; box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 12px 32px -16px rgba(0,0,0,.5) !important; }
body.sobre-hero .top.flotante .nav a { color: rgba(255,255,255,.82) !important; }
body.sobre-hero .top.flotante .nav a:hover, body.sobre-hero .top.flotante .nav a[aria-current="page"] { color: #fff !important; }
body.sobre-hero .top.flotante .nav a[aria-current="page"]::after { background: #fff !important; }
body.sobre-hero .top.flotante .brand-sub { color: rgba(255,255,255,.7) !important; border-left-color: rgba(255,255,255,.2) !important; }
body.sobre-hero .top.flotante .migas { border-left-color: rgba(255,255,255,.2) !important; }
body.sobre-hero .top.flotante .migas-raiz, body.sobre-hero .top.flotante .migas button { color: #fff !important; }
body.sobre-hero .top.flotante .migas-raiz .i { color: #9DC0FF !important; }
body.sobre-hero .top.flotante .nav-movil summary { background: rgba(255,255,255,.12) !important; border-color: rgba(255,255,255,.2) !important; color: #fff !important; }
.top.flotante, .top.flotante .nav a, .top.flotante .brand-sub { transition: background .25s, color .25s, border-color .25s; }

/* Contador animado: cada dígito que cambia rueda (sale hacia arriba, entra desde abajo) */
.cuenta-n b { display: inline-flex; }
.cuenta-n .dg { position: relative; display: inline-grid; overflow: hidden; height: 1.15em; width: .62em; line-height: 1.15em; }
.cuenta-n .dv { grid-area: 1 / 1; text-align: center; }
.cuenta-n .dv.entra { animation: dg-entra .45s cubic-bezier(.2,.8,.2,1) both; }
.cuenta-n .dv.sale { animation: dg-sale .45s cubic-bezier(.4,0,.6,1) both; }
@keyframes dg-entra { from { transform: translateY(85%); opacity: 0; filter: blur(2px); } to { transform: none; opacity: 1; filter: none; } }
@keyframes dg-sale { from { transform: none; opacity: 1; } to { transform: translateY(-85%); opacity: 0; filter: blur(2px); } }
.cuenta-n:has(.dv.entra) { animation: dg-pulso .45s ease-out; }
@keyframes dg-pulso { 40% { border-color: rgba(157,192,255,.55); background: rgba(255,255,255,.16); } }
@media (prefers-reduced-motion: reduce) { .cuenta-n .dv.entra, .cuenta-n .dv.sale, .cuenta-n:has(.dv.entra) { animation: none; } .cuenta-n .dv.sale { display: none; } }

/* ===================== Ficha: escala tipográfica de 4 niveles =====================
   1 titular 20/800 · 2 títulos de sección 15/700 · 3 texto 14/1.5 (valores 16/700) · 4 etiquetas 11 mayúsculas */
#ficha .ficha { font-size: 14px; line-height: 1.5; color: var(--ink-2); }
/* Nivel 1 */
#ficha #ficha-title { font-size: 20px !important; font-weight: 800 !important; line-height: 1.25 !important; letter-spacing: -.01em; margin: 6px 0 14px !important; color: var(--ink); text-wrap: balance; }
/* Nivel 2: títulos de sección, en minúsculas y negro */
#ficha .para-ti .sec, #ficha .cmp-head h3, #ficha .callout h3, #ficha .cuadra .sec, #ficha #det-t {
  font: 700 15px/1.3 'Hanken Grotesk', sans-serif !important; text-transform: none !important; letter-spacing: 0 !important; color: var(--ink) !important; margin: 0 0 8px !important; border: 0 !important; padding: 0 !important; }
/* Nivel 3: texto corrido, siempre 14px */
#ficha .para-ti li, #ficha .cmp-d, #ficha .cmp-nota, #ficha .callout p, #ficha .callout li, #ficha .cuadra-lead, #ficha .cuadra-l li, #ficha .datos dd, #ficha .mini p {
  font-size: 14px !important; line-height: 1.5 !important; }
#ficha .para-ti li, #ficha .callout p, #ficha .callout li, #ficha .cuadra-l li, #ficha .mini p { color: var(--ink-2) !important; }
#ficha .cmp-d, #ficha .cmp-nota, #ficha .cuadra-lead { color: var(--muted) !important; }
#ficha .datos dd { color: var(--ink) !important; font-weight: 600 !important; }
#ficha .datos dt { font-size: 13px !important; color: var(--muted) !important; }
/* Valores clave */
#ficha .cmp-v, #ficha .vtile-v { font-size: 16px !important; font-weight: 700 !important; line-height: 1.3 !important; }
/* Enlaces */
#ficha .mini summary, #ficha .callout a, #ficha .gmap figcaption a { font-size: 13.5px !important; font-weight: 600 !important; }
/* Nivel 4: etiquetas */
#ficha .drawer-rol, #ficha .vtile-k, #ficha .cmp-k, #ficha .share-t, #ficha .eyebrow {
  font: 600 11px/1.3 'Hanken Grotesk', system-ui, sans-serif !important; text-transform: uppercase !important; letter-spacing: .08em !important; color: var(--muted) !important; }
#ficha .eyebrow { display: flex; align-items: center; gap: 6px; margin: 0 !important; }
#ficha .eyebrow .i { width: 13px; height: 13px; color: var(--brand); }
#ficha .cmp-head .pill { font-size: 12px !important; }
#ficha .esc-ticks span { font-size: 11px !important; }
#ficha .esc-hoy b { font-size: 11.5px !important; }
#ficha .fine { font-size: 12px !important; line-height: 1.45; color: var(--muted) !important; }
#ficha .rbtn-l { font-size: 12px !important; }
/* Ritmo vertical: mismo espacio entre bloques */
#ficha .ficha > * + * { margin-top: 16px; }
#ficha .ficha > .f-head + * { margin-top: 4px; }
#ficha .para-ti { padding: 14px 16px !important; }
#ficha .para-ti ul { gap: 10px !important; }
#ficha .cta-t { font-size: 14px !important; } #ficha .cta-d { font-size: 12px !important; }

/* Sectores de la propuesta: nombre del uso de la zona con mayor superficie. */
.hoy-principal { margin: 4px 0 8px; }
.hoy-detalle { margin-top: 12px; border-top: 1px solid var(--line); }
.hoy-detalle > summary { padding: 12px 0; cursor: pointer; color: var(--brand); font-size: 14px; font-weight: 600; }
.hoy-detalle > summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 3px; }
.hoy-rige { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 12px; }
.hoy-rige li { display: grid; grid-template-columns: 58px minmax(0, 1fr); column-gap: 10px; align-items: baseline; }
.hoy-rige b { font-size: 14px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.hoy-rige .hr-txt { font-size: 14px; line-height: 1.4; color: var(--ink-2); overflow-wrap: anywhere; }
.hoy-rige .hr-txt small { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.en-sector-lead { margin: 0 0 6px; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.en-sector .op-mini { margin-top: 12px; border: 0; cursor: pointer; font: inherit; font-size: 13px; font-weight: 600; }
.cmp-v .sq { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
/* «Qué rige hoy»: solo la zona principal; el resto plegado */
.hr-mas { margin-top: 10px; border: 0; padding: 0; }
.hr-mas > summary { cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--brand); list-style: none; display: inline-flex; align-items: center; gap: 6px; }
.hr-mas > summary::-webkit-details-marker { display: none; }
.hr-mas > summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .2s; }
.hr-mas[open] > summary::after { transform: rotate(-135deg) translateY(-1px); }
.hr-mas .hoy-rige { margin-top: 12px; }

/* «Colorear el mapa» dentro de su card: opciones como los chips de los filtros, que bajan de línea si no caben. */
.tools .filtro .toggle { display: flex; flex-wrap: wrap; gap: 6px; width: auto; min-width: 0; border: 0; background: none; padding: 0 0 10px; }
.tools .filtro .toggle label { flex: 0 0 auto; }
.tools .filtro .toggle span { padding: 6px 12px; border: 1px solid #d9d9d9; border-radius: 999px; background: #fff; font-size: 12.5px; font-weight: 500; color: var(--ink-2); box-shadow: none; }
.tools .filtro .toggle label:hover span { border-color: var(--brand); }
.tools .filtro .toggle input:checked + span { background: #EEF4FD; border-color: var(--brand); color: var(--brand); font-weight: 600; box-shadow: none; }

/* Ficha ampliada: ventana centrada sobre un velo (clic en el velo o Esc la reducen) y Street View más alto.
   Solo pantalla ancha: bajo 900 px o al imprimir rige la ficha normal aunque quede la clase. */
.drawer-head .drawer-rol { margin-right: auto; }
.drawer-ampliar { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; }
.drawer-ampliar:hover { border-color: var(--brand); color: var(--brand); }
.drawer-ampliar .i-min, .drawer.amplia .drawer-ampliar .i-max { display: none; }
.drawer.amplia .drawer-ampliar .i-min { display: inline; }
.velo { position: fixed; inset: 0; z-index: 999; background: rgba(15, 23, 42, .5); }
@media screen and (min-width: 900px) {
  .drawer.amplia { position: fixed; z-index: 1000; top: 4vh; bottom: 4vh; left: 50%; right: auto; width: min(980px, 92vw); transform: translateX(-50%); border-radius: 14px; box-shadow: 0 24px 60px rgba(0, 0, 0, .35); animation: none; }
  .drawer.amplia .gmap { height: 380px; }
}
@media (max-width: 899px) { .drawer-ampliar, .velo { display: none !important; } }
@media print { .velo { display: none !important; } }

/* Cuenta regresiva: texto arriba, números abajo, sin pastilla alrededor. */
.inicio-k.cuenta { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 6px; padding: 0; border: 0 !important; border-radius: 0; background: none !important; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.inicio-k.cuenta .cuenta-t { flex-basis: 100%; text-align: center; margin: 0; }
/* Historias (Análisis): círculos como en DecideBrasil; aro azul sin ver, gris visto. El visor es un <dialog> 9:16. */
.historias { margin-top: 40px; }
.hist-k { margin: 0 0 12px; font: 600 11px/1 'Hanken Grotesk', system-ui, sans-serif; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2); }
.hist-fila { display: flex; gap: 18px; overflow-x: auto; scrollbar-width: none; }
.hist { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 78px; flex: 0 0 auto; padding: 0; border: 0; background: none; cursor: pointer; font: inherit; }
.hist-aro { padding: 3px; border-radius: 50%; background: #2150E8; }
.hist.visto .hist-aro { background: #C8C8C8; }
.hist-aro img { display: block; width: 62px; height: 62px; border-radius: 50%; border: 2px solid #fff; object-fit: cover; }
.hist-t { font-size: 12px; font-weight: 600; color: var(--ink); text-align: center; line-height: 1.2; }
.hist:focus-visible .hist-aro { outline: 3px solid #f5b400; outline-offset: 2px; }
.hv { padding: 0; border: 0; background: transparent; max-width: none; max-height: none; }
.hv::backdrop { background: rgba(0, 0, 0, .85); }
.hv-box { position: relative; height: min(92vh, 860px); aspect-ratio: 9 / 16; border-radius: 16px; overflow: hidden; background: #000; }
.hv video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.hv-top { position: absolute; inset: 0 0 auto; padding: 10px 12px; background: linear-gradient(180deg, rgba(0,0,0,.55), transparent); }
.hv-prog { height: 3px; border-radius: 3px; background: rgba(255,255,255,.35); overflow: hidden; }
.hv-prog span { display: block; width: 0; height: 100%; background: #fff; }
.hv-head { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; color: #fff; font-size: 14px; }
.hv-btn { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(0,0,0,.35); color: #fff; cursor: pointer; }
.hv-btn:hover { background: rgba(255,255,255,.2); }
.hv-btn .i { width: 18px; height: 18px; }
.hv-ctrl { position: absolute; right: 12px; bottom: 14px; display: flex; gap: 8px; }
.perfil-play { position: relative; display: block; width: 100%; padding: 0; border: 0; cursor: pointer; background: none; }
.perfil-play .pp-ic { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: rgba(33, 80, 232, .92); color: #fff; box-shadow: 0 6px 20px rgba(0,0,0,.3); }
.perfil-play .pp-ic .i { width: 26px; height: 26px; margin-left: 3px; }
.perfil-play .pp-tx { position: absolute; left: 12px; bottom: 12px; padding: 4px 10px; border-radius: 999px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; font-weight: 600; }
@media (max-width: 899px) { .hv-box { height: 100dvh; width: 100vw; aspect-ratio: auto; border-radius: 0; } .hist { width: 66px; } .hist-aro img { width: 52px; height: 52px; } }
.hist.pronto { cursor: default; }
.hist.pronto .hist-aro { position: relative; background: none; border: 2px dashed #c8cdd6; padding: 2px; }
.hist.pronto img { filter: grayscale(1) opacity(.55); }
.hist-pr { position: absolute; left: 50%; bottom: -4px; transform: translateX(-50%); padding: 2px 7px; border-radius: 999px; background: #fff; border: 1px solid #d9dde4; font-size: 9.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.hist.pronto .hist-t { color: var(--muted); }
.hist-vacio { display: grid; place-items: center; width: 62px; height: 62px; border-radius: 50%; border: 2px solid #fff; background: linear-gradient(135deg, #eef1f5, #dfe4ec); color: #b7bfcc; }
.hist-vacio .i { width: 20px; height: 20px; margin-left: 2px; }
@media (max-width: 899px) { .hist-vacio { width: 52px; height: 52px; } }
.kpis-general { margin-top: 28px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Citas «p. N»: enlazan a la página del resumen ejecutivo */
.pag-link { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.pag-link:hover { color: var(--brand); }

/* Ventanas del mapa: «Qué cambia» e instituciones */
.mapboxgl-popup-content { border-radius: 12px; padding: 14px 16px; box-shadow: 0 8px 28px rgba(15, 23, 42, .18); }
.pop { font: 14px/1.4 inherit; color: var(--ink, #111827); }
.pop b { display: block; font-size: 15px; margin: 6px 0 8px; }
.pop p { margin: 4px 0; }
.pop p span { display: block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: #6b7280; }
.pop .pop-m { color: #4b5563; font-size: 13px; margin-top: 8px; }
.pop-k { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; }
.pop-k::before { content: ''; width: 10px; height: 10px; border-radius: 3px; background: var(--c); }

/* «Qué opinan en Viña»: encuesta de percepción (preliminar) */
.encuesta { margin-top: 8px; }
.enc-pre { display: inline-block; vertical-align: middle; margin-left: 8px; font: 600 10.5px/1 'Hanken Grotesk', system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: #b25e09; background: #fff3e0; border-radius: 999px; padding: 6px 9px; }
.enc-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.enc-grid li { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.enc-n { margin: 0; font-size: 40px; font-weight: 800; line-height: 1; letter-spacing: -.03em; color: var(--brand, #266FE0); }
.enc-n small { font-size: 22px; margin-left: 2px; }
.enc-bar { display: block; height: 8px; border-radius: 4px; background: #EEF1F5; overflow: hidden; margin: 4px 0 6px; }
.enc-bar i { display: block; height: 100%; background: var(--brand, #266FE0); border-radius: 4px; }
.enc-grid h3 { margin: 0; font-size: 15px; font-weight: 700; color: var(--ink); line-height: 1.3; }
.enc-grid li > p:last-child { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.enc-nota { display: flex; gap: 8px; align-items: flex-start; margin: 14px 0 0; font-size: 12.5px; color: var(--muted); }
.enc-nota .i { width: 15px; height: 15px; flex: none; margin-top: 1px; color: #b25e09; }
@media (max-width: 1099px) { .enc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 699px) { .enc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .enc-grid li:last-child { grid-column: 1 / -1; } }

/* «Por sector» y los grupos de terrenos en carrusel horizontal, como «Viña en general» */
.perfiles.car-sec { display: grid; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(300px, 360px); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 2px 2px 10px; }
.perfiles.car-sec::-webkit-scrollbar { display: none; }
.perfiles.car-sec > * { scroll-snap-align: start; }
@media (max-width: 599px) { .perfiles.car-sec { grid-auto-columns: 86%; } }

/* «Cómo lo calculamos» como acordeón: una sola tarjeta con el título; se abre para ver el detalle */
.met-acc { scroll-margin-top: 100px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 0; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.met-acc > summary { list-style: none; display: flex; align-items: center; gap: 14px; padding: 18px 20px; cursor: pointer; }
.met-acc > summary::-webkit-details-marker { display: none; }
.met-acc-ic { width: 40px; height: 40px; border-radius: 10px; background: #EEF1F5; color: var(--brand, #266FE0); display: grid; place-items: center; flex: none; }
.met-acc-ic .i { width: 20px; height: 20px; }
.met-acc-t { display: grid; gap: 3px; flex: 1; min-width: 0; }
.met-acc-t b { font-size: 18px; font-weight: 800; color: var(--ink); letter-spacing: -.01em; }
.met-acc-t small { font-size: 13px; color: var(--muted); }
.met-acc-chev { color: var(--muted); transition: transform .2s ease; display: grid; }
.met-acc-chev .i { width: 20px; height: 20px; transform: rotate(90deg); }
.met-acc[open] .met-acc-chev { transform: rotate(180deg); }
.met-acc > summary:hover { background: #F9FAFB; border-radius: 16px; }
.met-acc > summary:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; border-radius: 16px; }
.met-acc .mets { padding: 18px 20px 20px; border-top: 1px solid #EEF1F5; }
.pop-w .mapboxgl-popup-content { border-radius: 16px; padding: 16px 18px 14px; border: 1px solid #E5E7EB; box-shadow: 0 14px 34px rgba(15, 23, 42, .18); font-family: 'Hanken Grotesk', system-ui, sans-serif; }
.pop-w .mapboxgl-popup-close-button { top: 10px; right: 10px; width: 28px; height: 28px; border-radius: 50%; background: #F3F4F6; color: #4B5563; font-size: 18px; line-height: 26px; padding: 0; }
.pop-w .mapboxgl-popup-close-button:hover { background: #E5E7EB; color: #111827; }
.pop-w .mapboxgl-popup-close-button:focus { outline: none; }
.pop-w .mapboxgl-popup-close-button:focus-visible { outline: 2px solid #266FE0; outline-offset: 2px; }
.pop { color: #171B21; font-size: 14px; line-height: 1.45; }
.pop-k { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--c); background: color-mix(in srgb, var(--c) 12%, #fff); border-radius: 999px; padding: 4px 10px 4px 8px; }
.pop-k::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.pop-t { display: block; font-size: 16px; font-weight: 800; line-height: 1.25; letter-spacing: -.01em; margin: 10px 32px 6px 0; }
.pop-dir, .pop-m { display: flex; gap: 8px; align-items: flex-start; margin: 6px 0 0; }
.pop-dir { color: #333; }
.pop .i { width: 15px; height: 15px; flex: none; margin-top: 2px; color: #8A93A3; }
.pop-m { margin-top: 12px; padding-top: 10px; border-top: 1px solid #EEF1F5; font-size: 12.5px; color: #626A78; }
.pop-cmp { display: grid; gap: 6px; margin-top: 8px; }
.pop-cmp p { margin: 0; background: #F7F8FA; border-radius: 10px; padding: 8px 10px; }
.pop-cmp p span { display: block; font: 600 10.5px/1.2 'Hanken Grotesk', system-ui, sans-serif; letter-spacing: .06em; text-transform: uppercase; color: #8A93A3; margin-bottom: 3px; }
.pop-cmp .pop-prop { background: #EAF1FD; }

/* Leyenda de instituciones: segunda sección de la leyenda, separada y con rótulo */
.lg-inst { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; width: 100%; margin-top: 2px; padding-top: 10px; border-top: 1px solid #EEF1F5; }
.lg-inst ul { list-style: none; margin: 0; padding: 0; display: flex !important; flex-wrap: wrap; gap: 6px 14px; }
.lg-inst li { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2, #333); }

/* Ventana de institución: efecto de la propuesta en el terreno del punto */
.pop-cargando { margin: 8px 0 0; font-size: 12.5px; color: #8A93A3; }
.pop-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pop-chips span { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 4px 10px; color: var(--c, #33415c); background: color-mix(in srgb, var(--c, #33415c) 11%, #fff); }
.pop-chips .t-down { --c: #b42318; } .pop-chips .t-warn { --c: #b25e09; } .pop-chips .t-up { --c: #1b7a3d; } .pop-chips .t-same { --c: #1d6a7a; } .pop-chips .t-unknown { --c: #5b6474; }
.pop-ver { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 7px 12px; border: 1px solid #D9DDE4; border-radius: 10px; background: #fff; font: inherit; font-size: 13px; font-weight: 600; line-height: 1; color: #266FE0; cursor: pointer; }
.pop-ver:hover { background: #F7F8FA; }
.pop-ver .i { width: 14px; height: 14px; margin: 0; color: currentColor; }
.mapboxgl-popup.pop-w { z-index: 6; } /* sobre la leyenda del mapa */

/* ¿A quién afecta?: un botón sobre el mapa abre un panel a la derecha (como la ficha) */
body.con-af-panel .mapboxgl-ctrl-top-right { right: 392px !important; }
.af-panel { position: absolute; z-index: 5; top: 96px; right: 16px; bottom: 24px; width: 360px; overflow-y: auto; margin: 0 !important; }
@media (max-width: 899px) {
      .af-panel { position: fixed; z-index: 30; left: 0; right: 0; top: auto; bottom: 0; width: auto; max-height: 72vh; border-radius: 20px 20px 0 0 !important; box-shadow: 0 -10px 30px rgba(16,24,40,.2) !important; }
  body.con-af-panel .mapboxgl-ctrl-top-right { right: 16px !important; }
}
.af-panel { padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 12px 34px rgba(16,24,40,.16); }
.af-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.af-head .af-k { display: block; font: 600 10.5px/1 'Hanken Grotesk', system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2, #8A93A3); margin-bottom: 6px; }
.af-head h3 { margin: 0; font-size: 18px; font-weight: 800; letter-spacing: -.01em; color: var(--ink); }
.af-head p { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.af-x { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 0; background: #F3F4F6; color: #4B5563; display: grid; place-items: center; cursor: pointer; }
.af-x .i { width: 16px; height: 16px; }
.af-big { margin: 12px 0 10px; font-size: 14px; color: var(--ink-2); line-height: 1.4; }
.af-big b { display: block; font-size: 30px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.af-big span { color: var(--muted); }
.af-tipos, .af-lugares, .af-uni { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.af-t b { display: block; font-size: 13px; font-weight: 700; color: var(--ink); line-height: 1.25; }
.af-t small { display: block; font-size: 11.5px; color: var(--muted); line-height: 1.3; margin-top: 2px; }
.af-n { font-size: 14px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.af-sub { margin: 14px 0 6px; font: 600 10.5px/1 'Hanken Grotesk', system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2, #8A93A3); }
.af-lugares button { width: 100%; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 0; border-radius: 10px; background: #F7F8FA; font: inherit; font-size: 13px; color: var(--ink); cursor: pointer; text-align: left; }
.af-lugares button:hover { background: #EEF1F5; }
.af-lugares button span { flex: 1; } .af-lugares button b { font-variant-numeric: tabular-nums; }
.af-lugares .i { width: 14px; height: 14px; color: var(--muted); }
.af-nota { display: flex; gap: 8px; margin: 12px 0 0; font-size: 12px; line-height: 1.45; color: var(--muted); }
.af-nota .i { width: 14px; height: 14px; flex: none; margin-top: 2px; }
.af-chip { justify-self: start; font-size: 12px; font-weight: 700; color: #4B5563; background: #F3F4F6; border-radius: 999px; padding: 4px 10px; }
.af-chip.mal { color: #0f766e; background: #E6F4F1; }

/* Tabla «¿A quién afecta?» en Análisis */
.af-tabla-w { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.af-tabla { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
.af-tabla th, .af-tabla td { padding: 14px 16px; text-align: right; border-bottom: 1px solid #EEF1F5; font-variant-numeric: tabular-nums; }
.af-tabla thead th { font: 600 11px/1.3 'Hanken Grotesk', system-ui, sans-serif; letter-spacing: .05em; text-transform: uppercase; color: var(--muted-2, #8A93A3); vertical-align: bottom; }
.af-tabla th:first-child { text-align: left; }
.af-tabla tbody th a { color: var(--ink); font-weight: 700; text-decoration: none; }
.af-tabla tbody th a:hover { color: var(--brand, #266FE0); text-decoration: underline; }
.af-tabla tbody tr:last-child th, .af-tabla tbody tr:last-child td { border-bottom: 0; }
.af-tot b { display: block; font-size: 16px; color: var(--ink); }
.af-tot span { font-size: 12px; color: var(--muted); }

.af-volver { display: inline-flex; align-items: center; gap: 6px; padding: 0; margin-bottom: 8px; border: 0; background: none; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--brand, #266FE0); cursor: pointer; }
.af-volver .i { width: 14px; height: 14px; }
.af-fila { display: flex; gap: 6px; margin: 12px -16px 0; padding: 0 16px 2px; overflow-x: auto; scrollbar-width: none; }
.af-fila::-webkit-scrollbar { display: none; }
.af-fila button { flex: none; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.af-fila button[aria-pressed="true"] { background: var(--ink, #171B21); border-color: var(--ink); color: #fff; }
body.con-af-panel .app .map-legend, body.app.con-af-panel .map-legend { left: calc(50% - 20px); max-width: calc(100% - 820px); }
@media (max-width: 899px) { body.con-af-panel .app .map-legend, body.app.con-af-panel .map-legend { left: 10px; max-width: calc(100% - 70px); } }

/* Lista «¿A quién afecta?» en el panel izquierdo (lo principal); filtros del mapa, plegados debajo */
.af-lista { padding: 16px 20px 14px; }
.af-lista .tools-t { margin: 0; }
.af-lista-sub { margin: 4px 0 12px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.af-sel { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.af-sel button { width: 100%; display: grid; grid-template-columns: auto 1fr auto auto; grid-template-areas: "ic t t ch" "ic n p ch" "ic b b ch"; align-items: center; gap: 3px 10px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.af-sel button:hover { border-color: #C9D3E3; box-shadow: 0 2px 8px rgba(16,24,40,.06); }
.af-sel button[aria-pressed="true"] { border-color: var(--brand, #266FE0); box-shadow: 0 0 0 3px rgba(38,111,224,.14); }
.af-sel button:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }
.af-ic { grid-area: ic; width: 38px; height: 38px; border-radius: 10px; background: #EEF3FC; color: var(--brand, #266FE0); display: grid; place-items: center; align-self: start; }
.af-ic .i { width: 19px; height: 19px; }
.af-sel-t { grid-area: t; font-size: 14px; font-weight: 700; color: var(--ink); line-height: 1.25; }
.af-sel-n { grid-area: n; font-size: 12.5px; color: var(--muted); } .af-sel-n b { color: var(--ink); font-variant-numeric: tabular-nums; }
.af-sel-p { grid-area: p; font-size: 12.5px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.af-sel-bar { grid-area: b; display: block; height: 5px; border-radius: 3px; background: #EEF1F5; overflow: hidden; margin-top: 4px; }
.af-sel-bar i { display: block; height: 100%; background: var(--brand, #266FE0); border-radius: 3px; }
.af-sel > li > button > .i { grid-area: ch; width: 16px; height: 16px; color: var(--muted-2, #8A93A3); }
.filtros-mas { border: 1px solid var(--line); border-radius: 14px; padding: 0; background: #fff; }
.filtros-mas > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; cursor: pointer; }
.filtros-mas > summary::-webkit-details-marker { display: none; }
.filtros-mas > summary .f-txt b { display: block; font-size: 14px; color: var(--ink); }
.filtros-mas > summary .f-txt small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.filtros-mas[open] > summary .f-chev { transform: rotate(-135deg) translateY(-2px); }
.filtros-mas > :not(summary) { margin-left: 10px; margin-right: 10px; }
.filtros-mas > details.filtro:last-of-type { margin-bottom: 10px; }
.filtros-mas .tools-head { margin: 0 10px; min-height: 0; }

/* Tipos de cambio como tarjetas seleccionables: prendida = borde y fondo de su color; apagada = gris */
.af-tipos button { width: 100%; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, background .15s, opacity .15s; }
.af-tipos button[aria-pressed="true"] { border-color: var(--c); background: color-mix(in srgb, var(--c) 7%, #fff); }
.af-tipos button[aria-pressed="false"] { opacity: .55; }
.af-tipos button[aria-pressed="false"] .sw { background: transparent; box-shadow: inset 0 0 0 2px #C4CAD4; }
.af-tipos button:hover { border-color: color-mix(in srgb, var(--c) 60%, #fff); opacity: 1; }
.af-tipos button:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }
.af-tipos .sw { width: 14px; height: 14px; border-radius: 50%; background: var(--c); }

/* Compartir un grupo: se despliega con vista previa del enlace y las redes */
.af-comp { margin-top: 14px; border: 1px solid var(--line); border-radius: 14px; padding: 0; }
.af-comp > summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 11px 14px; font-size: 14px; font-weight: 700; color: var(--brand, #266FE0); cursor: pointer; }
.af-comp > summary::-webkit-details-marker { display: none; }
.af-comp > summary .i { width: 16px; height: 16px; }
.af-comp > summary .f-chev { margin-left: auto; }
.af-comp[open] > summary .f-chev { transform: rotate(-135deg) translateY(-2px); }
.af-comp-prev { margin: 0 14px; padding: 10px 12px; background: #F7F8FA; border-radius: 10px; display: grid; gap: 4px; }
.af-comp-prev b { font-size: 13px; line-height: 1.4; color: var(--ink); font-weight: 600; }
.af-comp-prev span { font: 500 11.5px/1.2 'Hanken Grotesk', system-ui, sans-serif; color: var(--muted); overflow-wrap: anywhere; }
.af-comp-btns { display: grid !important; grid-template-columns: repeat(4, 1fr); gap: 14px 6px !important; padding: 12px 14px 14px; justify-items: center; }
.af-comp-btns .rbtn { min-width: 48px; }
.af-comp-btns .rbtn.wa .rbtn-c { background: #25D366; border-color: #25D366; color: #fff; }

/* Universidades: tarjeta con logo, nombre y etiquetas (efecto + video) en una fila */
.af-uni li { border: 1px solid var(--line); border-radius: 14px; background: #fff; overflow: hidden; }
.af-uni-a { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 12px 8px; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; }
.af-uni-a:hover b { color: var(--brand, #266FE0); }
.af-uni-a b { font-size: 13.5px; line-height: 1.3; color: var(--ink); }
.af-logo { width: 40px; height: 40px; flex: none; border-radius: 10px; object-fit: contain; background: #fff; border: 1px solid #EEF1F5; }
.af-uni-tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 12px 64px; }
.af-uni-tags .af-chip { display: inline-flex; align-items: center; gap: 5px; }
button.af-chip.af-vid { border: 0; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; color: var(--brand, #266FE0); background: #EAF1FD; }
button.af-chip.af-vid:hover { background: #DCE8FB; }
.af-chip .i { width: 11px; height: 11px; }
/* Ficha del terreno y panel «¿A quién afecta?» abiertos a la vez: el panel se corre a la izquierda de la ficha
   (420 px + márgenes) en vez de quedar debajo; en pantallas sin espacio para ambos, se oculta mientras la ficha está abierta. */
body.con-ficha .af-panel { right: 452px; }
body.con-ficha.con-af-panel .mapboxgl-ctrl-top-right { right: 828px !important; }
body.con-ficha.con-af-panel .map-legend { display: none; }
@media (max-width: 1259px) { body.con-ficha .af-panel { display: none; } body.con-ficha.con-af-panel .mapboxgl-ctrl-top-right { right: 452px !important; } }

/* Matriz de uso y zonas: botones flotantes del mapa (abajo a la derecha) y ventanas emergentes */
.mapa-flot { position: absolute; z-index: 4; right: 16px; bottom: 34px; display: flex; gap: 8px; }
body.con-af-panel .mapa-flot { right: 392px; }
body.con-ficha .mapa-flot { right: 452px; }
body.con-ficha.con-af-panel .mapa-flot { right: 828px; }
.flot-btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 16px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font: inherit; font-size: 14px; font-weight: 700; color: var(--ink); box-shadow: 0 6px 20px rgba(16,24,40,.16); cursor: pointer; }
.flot-btn .i { width: 17px; height: 17px; color: var(--brand, #266FE0); }
.flot-btn:hover { transform: translateY(-1px); }
.flot-btn:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }
@media (max-width: 899px) { .mapa-flot { bottom: auto; flex-direction: column; } body.con-af-panel .mapa-flot, body.con-ficha .mapa-flot { display: none; } }
.mod { border: 0; padding: 0; border-radius: 20px; width: min(1180px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); box-shadow: 0 24px 70px rgba(16,24,40,.35); color: var(--ink); }
.mod::backdrop { background: rgba(15,23,42,.45); }
.mod-box { padding: 22px 24px 20px; overflow: auto; max-height: calc(100dvh - 48px); }
.mod-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 14px; }
.mod-head h2 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.015em; }
.mod-head p { margin: 4px 0 0; font-size: 13.5px; color: var(--muted); max-width: 70ch; }
.mx-ley { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-bottom: 12px; font-size: 12.5px; color: var(--ink-2); }
.mx-ley span { display: inline-flex; align-items: center; gap: 6px; } .mx-ley i { width: 12px; height: 12px; border-radius: 3px; }
.mx-int { color: var(--muted); } .mx-int i { background: linear-gradient(90deg, #e5e7eb, #6b7280); width: 26px !important; }
.mx-w { overflow: auto; border: 1px solid var(--line); border-radius: 14px; }
.mx, .zt { width: 100%; border-collapse: collapse; font-size: 13px; }
.zt th, .zt td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #EEF1F5; }
.zt thead th { position: sticky; top: 0; background: #F7F8FA; font: 600 10.5px/1.3 'Hanken Grotesk', system-ui, sans-serif; letter-spacing: .05em; text-transform: uppercase; color: var(--muted-2, #8A93A3); z-index: 1; }
.mx { border-collapse: separate; border-spacing: 4px; font-variant-numeric: tabular-nums; }
.mx thead th { position: sticky; top: 0; z-index: 1; background: #fff; padding: 10px 6px 8px; font-size: 12px; font-weight: 700; color: var(--ink-2); text-align: center; vertical-align: bottom; line-height: 1.25; min-width: 86px; }
.mx thead .mx-esq { text-align: left; font-size: 11.5px; color: var(--muted); font-weight: 600; } .mx-esq span { display: block; }
.mx tbody th, .mx tfoot th { position: sticky; left: 0; background: #fff; padding: 0 12px 0 6px; text-align: left; font-size: 13px; font-weight: 700; color: var(--ink); min-width: 190px; line-height: 1.3; }
.mx td { padding: 0; height: 46px; }
.mx-c { width: 100%; height: 100%; min-height: 46px; display: grid; place-items: center; border: 0; border-radius: 8px; background: color-mix(in srgb, var(--c) calc(var(--a) * 100%), #fff); font: inherit; font-size: 13.5px; font-weight: 700; color: var(--ink); cursor: pointer; transition: transform .12s, box-shadow .12s; }
.mx-c.osc { color: #fff; }
.mx-c:hover { transform: scale(1.04); box-shadow: 0 4px 14px rgba(16,24,40,.18); position: relative; z-index: 1; }
.mx-c.sel { box-shadow: 0 0 0 3px var(--ink); }
.mx-c:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }
.mx-v { background: repeating-linear-gradient(135deg, #F7F8FA 0 6px, #fff 6px 12px); border-radius: 8px; }
.mx-tot { text-align: center; font-size: 13px; font-weight: 600; color: var(--muted); background: #F7F8FA; border-radius: 8px; }
.mx thead .mx-tot { background: #fff; }
.mx tfoot th { color: var(--muted); font-weight: 600; }
.zt td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.zt tbody th { font-weight: 700; }
.af-buscar { width: 100%; margin: 12px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 14px; }
.ch-est { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: color-mix(in srgb, var(--c) 70%, #111); background: color-mix(in srgb, var(--c) 14%, #fff); border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.ch-est::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.det-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 14px 0 10px; }
.det-m2 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.det-matriz { margin-top: 14px; }
.af-share { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 1px solid var(--card-line, #D9DDE4); border-radius: 10px; background: #fff; font: inherit; font-size: 13px; font-weight: 600; color: var(--brand, #266FE0); cursor: pointer; }
.af-share .i { width: 15px; height: 15px; }
.det-m2, .af-vid, .zt td:last-child { white-space: nowrap; }
/* Dos botones blancos; cuando falta espacio (panel o ficha abiertos, o pantalla angosta) quedan solo los íconos */
@media (max-width: 1399px) { .flot-t { display: none; } .flot-btn { padding: 11px; } }
body.con-af-panel .flot-t, body.con-ficha .flot-t { display: none; }
body.con-af-panel .flot-btn, body.con-ficha .flot-btn { padding: 11px; }
/* Con panel o ficha abiertos, los íconos van en columna sobre los controles de zoom, lejos de la leyenda */
@media (min-width: 900px) { body.con-af-panel .mapa-flot, body.con-ficha .mapa-flot { bottom: auto; top: calc(50% + 52px); flex-direction: column; } }

/* Móvil: más mapa visible. Hoja inferior más baja, leyenda compacta de una línea, sin fila de instituciones,
   y botones Zonas/Matriz bajo el zoom sin taparlo. */
@media (max-width: 899px) {
  .app .panel { max-height: 46%; }
  .app .map-legend { padding: 6px 10px !important; gap: 4px !important; max-width: calc(100% - 70px) !important; }
  .app .map-legend .lg-head span, .app .map-legend .lg-inst { display: none !important; }
  .app .map-legend .lg-head b { font-size: 11.5px; }
  .app .map-legend .lg-clases { gap: 2px 10px !important; }
  .app .map-legend .lg-clases li { font-size: 11px; }
  .app .map-legend .lg-clases .sw { width: 10px !important; height: 10px !important; }
  .mapa-flot { top: 160px !important; right: 10px !important; gap: 6px; }
  .flot-t { display: none; }
  .flot-btn { padding: 9px; }
}

/* Matriz de uso como la de Cristóbal (#142): m², color por afectados, texto de afectados y fracción de tipos */
.mx { border-collapse: collapse !important; border-spacing: 0 !important; font-size: 12px; }
.mx thead th { background: #1f3b80 !important; color: #fff !important; font-size: 12px !important; padding: 12px 8px !important; border-right: 1px solid rgba(255,255,255,.12); }
.mx thead .mx-esq { color: #fff !important; } .mx-esq span { font-size: 10.5px; font-weight: 500; opacity: .8; margin-top: 2px; }
.mx tbody th { background: #F7F8FA !important; border-bottom: 1px solid #E5E7EB; padding: 10px 12px !important; font-size: 12.5px !important; }
.mx td { border-bottom: 1px solid #E5E7EB; border-right: 1px solid #EEF1F5; height: auto !important; vertical-align: top; background: var(--bg, #fff); padding: 3px !important; min-width: 112px; }
.mx td.mx-v { background: #fafbfc; color: #C4CAD4; text-align: center; vertical-align: middle; }
.mx-c { width: 100%; height: auto !important; min-height: 92px !important; display: flex !important; flex-direction: column; align-items: flex-end; gap: 2px; padding: 8px 9px !important; border: 1.5px solid transparent !important; border-radius: 6px !important; background: transparent !important; color: var(--fg) !important; text-align: right; font-size: 12px !important; font-weight: 500 !important; }
.mx-c b { font-size: 14px; font-weight: 800; }
.mx-c small { font-size: 10.5px; opacity: .8; margin-top: 4px; }
.mx-af { font-size: 12px; font-weight: 700; line-height: 1.3; }
.mx-c em { font-style: normal; font-size: 10.5px; font-weight: 700; margin-top: auto; padding-top: 6px; }
.mx-unresolved .mx-c { border: 1.5px dashed #9aa3b2 !important; }
.mx-c:hover { transform: none !important; border-color: var(--fg) !important; box-shadow: none !important; }
.mx-c.sel { border-color: #1d4ed8 !important; box-shadow: 0 0 0 1px #1d4ed8 !important; }
.mx .mx-tot { background: #F7F8FA !important; font-weight: 700; color: var(--ink) !important; text-align: right !important; vertical-align: middle; padding: 8px 10px !important; font-size: 12.5px; border-radius: 0 !important; }
.mx-ley i { border: 1.5px solid; }
.det-af-t { margin: 0; font-size: 13.5px; font-weight: 600; color: var(--ink); }
#mod-matriz { width: min(1440px, calc(100vw - 24px)); }

/* ---------- Concejo: buscador en actas y grabaciones (concejo.html + concejo.js) ---------- */
.c-kpis { grid-template-columns: repeat(3, 1fr); }
.c-panel { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 14px; box-shadow: 0 10px 30px -24px rgba(15,27,45,.45); }
.c-campo { display: flex; align-items: center; gap: 10px; border: 1px solid var(--card-line); border-radius: 12px; padding: 5px 5px 5px 14px; background: #fff; }
.c-campo:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(38,111,224,.15); }
.c-campo > .i { width: 18px; height: 18px; color: var(--muted); flex: none; }
.c-campo input { flex: 1; min-width: 0; border: 0; outline: none; font: inherit; font-size: 16px; padding: 8px 0; background: none; }
.c-campo .btn { min-height: 40px; padding: 8px 18px; border-radius: 9px; }
.c-filtros { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.c-seg { display: inline-flex; background: #F1F3F7; border-radius: 10px; padding: 3px; }
.c-seg button { border: 0; background: none; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); padding: 6px 12px; border-radius: 8px; cursor: pointer; }
.c-seg button[aria-pressed=true] { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(16,24,40,.12); }
.c-sel select { font: inherit; font-size: 13px; font-weight: 600; color: var(--ink-2); border: 0; border-radius: 10px; padding: 9px 10px; background: #F1F3F7; cursor: pointer; }
.c-temas { display: flex; gap: 6px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; padding-left: 8px; border-left: 1px solid var(--line); }
.c-temas::-webkit-scrollbar { display: none; }
.c-tema { flex: none; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 11px; font: inherit; font-size: 12.5px; color: var(--ink-2); cursor: pointer; }
.c-tema:hover { border-color: var(--brand); color: var(--brand); }
.c-info { margin: 18px 4px 8px; font-size: 13px; color: var(--muted); }
.c-res { list-style: none; margin: 0; padding: 0; background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.c-res:empty { display: none; }
.c-fila { position: relative; display: flex; align-items: flex-start; gap: 14px; padding: 14px 16px; border-top: 1px solid var(--line-2); transition: background .12s; }
.c-fila:first-child { border-top: 0; }
.c-fila:hover { background: #F8FAFD; }
.c-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.c-ic .i { width: 18px; height: 18px; }
.c-ic.video { background: #fdecea; color: #b42318; }
.c-ic.acta { background: #EEF4FD; color: var(--brand); }
.c-cuerpo { flex: 1; min-width: 0; }
.c-fila h3 { margin: 0; font-size: 15px; line-height: 1.3; }
.c-abrir { all: unset; cursor: pointer; font-weight: 700; color: var(--ink); }
.c-abrir::after { content: ""; position: absolute; inset: 0; }  /* toda la fila abre el documento */
.c-fila:hover .c-abrir { color: var(--brand); }
.c-abrir:focus-visible { outline: none; }
.c-fila:focus-within { box-shadow: inset 3px 0 0 var(--brand); }
.c-meta { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
.c-ext { margin: 6px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--ink-2); }
.c-ext:empty { display: none; }
.c-res mark, .c-doc mark { background: #FDE68A; color: inherit; border-radius: 3px; padding: 0 2px; }
.c-fuente { position: relative; z-index: 1; flex: none; display: inline-flex; align-items: center; gap: 3px; font-size: 12.5px; color: var(--muted); text-decoration: none; border-radius: 8px; padding: 6px 8px; margin-top: 2px; }
.c-fuente:hover { color: var(--brand); background: #EEF4FD; }
.c-fuente .i { width: 13px; height: 13px; }
.c-ir { flex: none; color: var(--muted-2); margin-top: 8px; }
.c-ir .i { width: 16px; height: 16px; }
.c-fila:hover .c-ir { color: var(--brand); }
.c-mas { margin: 16px auto 0; display: flex; }
.cp-fila { list-style: none; margin: 0; padding: 2px 2px 6px; display: grid; grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)); gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.cp-fila li { scroll-snap-align: start; }
.cp { all: unset; box-sizing: border-box; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 6px 10px; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.cp:hover { border-color: #c9d7ee; box-shadow: 0 8px 18px -14px rgba(15,27,45,.45); transform: translateY(-1px); }
.cp:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.cp img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: #eef0f3; }
.cp-alc img { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--brand); }
.cp b { font-size: 13px; line-height: 1.2; color: var(--ink); }
.cp b span { display: block; font-weight: 500; font-size: 11.5px; color: var(--ink-2); margin-top: 1px; }
.cp small { font-size: 11px; font-weight: 600; color: var(--muted); margin-top: auto; }
.cp-alc small { color: var(--brand); }
.cp-dlg { width: min(520px, calc(100% - 24px)); max-height: calc(100dvh - 32px); padding: 0; border: 0; border-radius: 18px; box-shadow: 0 24px 60px -20px rgba(15,27,45,.45); color: var(--ink); }
.cp-dlg[open] { animation: cp-entra .2s cubic-bezier(.2,.8,.2,1); }
@keyframes cp-entra { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.cp-dlg::backdrop { background: rgba(15,27,45,.45); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.cp-dlg-h { display: flex; align-items: flex-start; gap: 16px; }
.cp-dlg-h > div { flex: 1; min-width: 0; }
.cp-dlg-h img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; flex: none; }
.cp-det-k { margin: 4px 0 0; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--brand); }
.cp-dlg h3 { margin: 2px 0 6px; font-size: 21px; line-height: 1.2; }
.cp-det-n { margin: 0; font-size: 14px; color: var(--ink-2); }
.cp-det-s { margin: 18px 0 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.cp-ult { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cp-ult button { all: unset; box-sizing: border-box; width: 100%; cursor: pointer; display: block; padding: 9px 12px; border-radius: 10px; background: #F5F7FA; font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.35; }
.cp-ult button:hover { background: #EEF4FD; color: var(--brand); }
.cp-ult button:focus-visible { outline: 2px solid var(--brand); }
.cp-ult span { display: block; font-size: 12px; font-weight: 500; color: var(--muted); margin-bottom: 2px; }
.cp-det-nota { margin: 14px 0 0; font-size: 12px; color: var(--muted); line-height: 1.45; }
.cp-det-acc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.cp-det-acc .btn { min-height: 40px; font-size: 14px; }
.c-concejo { padding-bottom: 32px; }
@media (max-width: 1100px) { .cp-fila { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 104px; } }
.c-doc { margin: 0 0 0 auto; width: min(760px, 100%); max-width: 100%; height: 100dvh; max-height: 100dvh; padding: 0; border: 0; border-radius: 18px 0 0 18px; box-shadow: 0 24px 60px -20px rgba(15,27,45,.45); color: var(--ink); }
.c-doc[open] { display: flex; flex-direction: column; animation: op-entra .28s cubic-bezier(.2,.8,.2,1); }
.c-doc::backdrop { background: rgba(15,27,45,.45); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.c-doc-h { display: flex; justify-content: space-between; gap: 16px; padding: 20px 22px 12px; border-bottom: 1px solid var(--line); }
.c-doc-k { margin: 0; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.c-doc-h h2 { margin: 4px 0 6px; font-size: 19px; line-height: 1.3; }
.c-doc-o { margin: 0; font-size: 12.5px; color: var(--muted); }
.c-doc-v { aspect-ratio: 16 / 9; background: #000; flex: none; max-height: 40dvh; }
.c-doc-v iframe { width: 100%; height: 100%; border: 0; display: block; }
.c-doc-av { margin: 0; padding: 10px 22px; font-size: 12.5px; line-height: 1.45; color: #7a4a06; background: #fff8eb; border-bottom: 1px solid #f4e2c0; }
.c-doc-b { flex: 1; overflow: auto; padding: 16px 22px 32px; }
.c-acta { white-space: pre-wrap; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.c-par { margin: 0 0 12px; font-size: 14.5px; line-height: 1.6; }
.c-t { font: 600 12px 'Hanken Grotesk', system-ui, sans-serif; color: var(--brand); background: #EEF4FD; border: 0; border-radius: 6px; padding: 2px 6px; margin-right: 8px; cursor: pointer; vertical-align: 1px; }
.c-t:disabled { color: var(--muted); background: #F1F3F7; cursor: default; }
.c-quien { font-weight: 700; margin-right: 6px; }
.c-quien small { font-weight: 400; color: var(--muted); }
.c-cargando { color: var(--muted); font-size: 14px; }
@media (max-width: 700px) {
  .c-kpis { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .c-kpis .kpi { padding: 12px; } .c-kpis .kpi b { font-size: 20px; }
  .c-temas { flex-basis: 100%; border-left: 0; padding-left: 0; }
  .c-fuente span, .c-ir { display: none; }
  .c-fuente { padding: 8px; }
  .c-doc { width: 100%; border-radius: 0; }
  .c-doc-h, .c-doc-b, .c-doc-av { padding-left: 16px; padding-right: 16px; }
}
.c-cifras { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; align-self: center; }
.c-cifras li { font-size: 12.5px; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px; }
.c-cifras b { color: var(--ink); font-variant-numeric: tabular-nums; }
@media (max-width: 700px) { .c-filtros { gap: 6px; } .c-seg button { padding: 6px 9px; } .c-sel select { padding: 9px 6px; } .c-panel { padding: 10px; } }
.cp-dlg-in { padding: 22px; }

/* Concejo · votaciones (paginas.py, concejo.js) */
.v-cats { border-left: 0; padding: 0 0 4px; margin: 0 0 14px; }
.v-cats .c-tema[aria-pressed=true] { background: var(--ink); border-color: var(--ink); color: #fff; }
.v-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.v-fila { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.v-fila[hidden] { display: none; }
.v-meta { margin: 0; font-size: 12.5px; color: var(--muted); }
.v-fila h3 { margin: 3px 0 8px; font-size: 16px; line-height: 1.35; }
.v-res { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.v-n { font-size: 12.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--unknown-bg); color: var(--unknown); }
.v-favor { background: var(--up-bg); color: var(--up); }
.v-contra { background: var(--down-bg); color: var(--down); }
.v-abstencion, .v-inhabilitado { background: var(--warn-bg); color: var(--warn); }
.v-quien { margin: 8px 0 0; font-size: 13.5px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 2px 18px; }
.v-acc { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin: 10px 0 0; font-size: 13.5px; }
.v-ver { min-height: 34px; padding: 4px 12px; font-size: 13.5px; }
.v-nota { margin: 14px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.cp-ult button:disabled { cursor: default; }
.cp-sin { margin: 0; padding: 9px 12px; border-radius: 10px; background: #F5F7FA; font-size: 14px; font-weight: 600; line-height: 1.35; }
