/* ============================================================
   Detención migratoria en Kansas — hoja de estilos
   Paleta: ciruela, rosa claro, turquesa y violeta
   ============================================================ */

:root {
  /* Tipos */
  --font-display: 'Boska', Georgia, serif;
  --font-body: 'Satoshi', 'Helvetica Neue', sans-serif;

  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);

  /* Espaciado */
  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem;
  --space-4: 1rem; --space-5: 1.25rem; --space-6: 1.5rem;
  --space-8: 2rem; --space-10: 2.5rem; --space-12: 3rem;
  --space-16: 4rem; --space-20: 5rem; --space-24: 6rem;

  /* Colores indicados por la usuaria */
  --plum: #4a163b;
  --rose: #efe7e7;
  --aqua: #32d6e6;
  --violet: #8d379b;
  --bg: var(--rose);
  --surface: #faf7f8;
  --surface-2: #ffffff;
  --surface-offset: color-mix(in srgb, var(--rose) 82%, var(--violet));
  --divider: color-mix(in srgb, var(--rose) 82%, var(--plum));
  --border: color-mix(in srgb, var(--rose) 68%, var(--plum));
  --ink: var(--plum);
  --muted: #684e63;
  --faint: #84677e;

  --accent: var(--violet);
  --accent-hover: var(--plum);
  --accent-soft: color-mix(in srgb, var(--rose) 90%, var(--violet));
  --teal: var(--plum);
  --teal-soft: var(--aqua);
  --amber: var(--plum);
  --amber-soft: var(--rose);
  --slate: var(--aqua);
  --slate-soft: color-mix(in srgb, white 80%, var(--aqua));

  --radius-sm: 0.375rem; --radius-md: 0.5rem;
  --radius-lg: 0.75rem; --radius-xl: 1rem;
  --shadow-sm: 0 1px 2px rgb(74 22 59 / 0.06);
  --shadow-md: 0 4px 12px rgb(74 22 59 / 0.08);
  --shadow-lg: 0 12px 32px rgb(74 22 59 / 0.12);
  --transition: 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--space-16);
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}

img, svg { display: block; max-width: 100%; height: auto; }
ul[role='list'], ol[role='list'] { list-style: none; }
input, button, select { font: inherit; color: inherit; }

h1, h2, h3, h4 { text-wrap: balance; line-height: 1.15; font-family: var(--font-display); }
p, li, figcaption { text-wrap: pretty; max-width: 72ch; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: var(--radius-sm); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 1000;
  background: var(--ink); color: var(--surface); padding: var(--space-3) var(--space-5);
  border-radius: 0 0 var(--radius-md) 0;
}
.skip-link:focus { left: 0; }

/* ---------- Barra superior ---------- */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--divider);
}
.topbar-inner {
  max-width: 1360px; margin-inline: auto;
  display: flex; align-items: center; gap: var(--space-6);
  padding: var(--space-3) var(--space-6);
}
.brand { display: flex; align-items: center; gap: var(--space-3); min-width: 0; }
.brand-mark { width: 32px; height: 32px; flex-shrink: 0; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: var(--text-sm); display: block; line-height: 1.2; }
.brand-sub { font-size: var(--text-xs); color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topnav { display: flex; gap: var(--space-4); margin-left: auto; flex-wrap: nowrap; white-space: nowrap; }
.topnav a { font-size: var(--text-sm); color: var(--ink); text-decoration: none; font-weight: 500; }
.topnav a:hover { color: var(--accent); }
@media (max-width: 1500px) { .brand-sub { display: none; } }
@media (max-width: 1250px) { .topnav { display: none; } }
.language-picker {
  display: flex; gap: var(--space-1); margin-left: auto;
  padding: var(--space-1); border: 1px solid var(--border);
  background: var(--surface); border-radius: var(--radius-md); flex-shrink: 0;
}
.language-option {
  padding: var(--space-2) var(--space-3); min-height: 44px;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  background: transparent; font-size: var(--text-sm); font-weight: 700;
  cursor: pointer;
}
.language-option:hover { background: var(--accent-soft); color: var(--accent); }
.language-option.is-active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ---------- Hero ---------- */
.hero { border-bottom: 1px solid var(--divider); background: var(--surface); }
.hero-inner {
  max-width: 960px; margin-inline: auto;
  padding: var(--space-16) var(--space-6) var(--space-12);
}
.kicker {
  font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent); margin-bottom: var(--space-4);
}
.hero-title { font-size: var(--text-2xl); font-weight: 700; margin-bottom: var(--space-5); }
.hero-sub { color: var(--muted); font-size: var(--text-base); max-width: 58ch; margin-bottom: var(--space-6); }
.hero-actions { display: flex; gap: var(--space-4); flex-wrap: wrap; margin-bottom: var(--space-12); }

.btn {
  display: inline-block; border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-6); font-size: var(--text-sm); font-weight: 700;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: all var(--transition);
}
.btn-primary { background: var(--plum); color: #fff; }
.btn-primary:hover { background: var(--violet); color: #fff; }
.btn-ghost { border-color: var(--aqua); color: var(--plum); background: var(--aqua); }
.btn-ghost:hover { border-color: var(--plum); color: var(--plum); background: var(--slate-soft); }

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-4);
  border-top: 1px solid var(--divider); padding-top: var(--space-6);
}
.stat { display: flex; flex-direction: column; gap: var(--space-1); }
.stat-num { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 700; color: var(--accent); line-height: 1.1; }
.stat-label { font-size: var(--text-xs); color: var(--muted); line-height: 1.4; }

/* ---------- Secciones ---------- */
.section { padding-block: clamp(var(--space-12), 6vw, var(--space-24)); }
.section-alt { background: var(--surface); border-block: 1px solid var(--divider); }
.section-alert { background: var(--plum); color: var(--surface-2); }
.section-alert .section-sub { color: var(--rose); }
.section-alert .step { color: var(--plum); }
.section-head { max-width: 960px; margin: 0 auto var(--space-8); padding-inline: var(--space-6); }
.section-title { font-size: var(--text-xl); font-weight: 700; margin-bottom: var(--space-3); }
.section-sub { color: var(--muted); font-size: var(--text-sm); max-width: 68ch; }

/* ---------- Mapa ---------- */
.map-layout {
  max-width: 1200px; margin-inline: auto; padding-inline: var(--space-6);
  display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(280px, 1fr);
  gap: var(--space-6); align-items: stretch;
}
.map-wrap { position: relative; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-md); min-height: 560px; }
#map { position: absolute; inset: 0; }
.map-reset {
  position: absolute; top: var(--space-3); right: var(--space-3); z-index: 5;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: var(--space-2) var(--space-4);
  font-size: var(--text-xs); font-weight: 700; cursor: pointer; box-shadow: var(--shadow-sm);
}
.map-reset:hover { border-color: var(--accent); color: var(--accent); }

.map-legend {
  position: absolute; bottom: var(--space-3); left: var(--space-3); z-index: 5;
  background: color-mix(in srgb, var(--surface-2) 92%, transparent);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4); font-size: var(--text-xs);
}
.map-legend strong { display: block; margin-bottom: var(--space-1); font-weight: 700; }
.legend-row { display: flex; align-items: center; gap: var(--space-2); color: var(--muted); line-height: 1.5; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; border: 1px solid var(--plum); }

/* Marcadores personalizados */
.marker-pin {
  width: 30px; height: 30px; border-radius: 50%;
  border: 3px solid var(--surface-2); box-shadow: var(--shadow-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #fff; cursor: pointer;
  font-family: var(--font-body);
}
.marker-pin::after { content: ''; position: absolute; inset: -7px; border-radius: 50%; }
.marker-pin-private { background: var(--accent); }
.marker-pin-federal { background: var(--slate); }
.marker-pin-federal { color: var(--plum); border-color: var(--plum); }
.marker-pin-county { background: var(--amber); }
.marker-pin.is-active { transform: scale(1.25); }

.maplibregl-popup-content { font-family: var(--font-body); padding: var(--space-4); border-radius: var(--radius-md); }
.maplibregl-popup-content h3 { font-family: var(--font-body); font-size: var(--text-base); line-height: 1.4; margin-bottom: var(--space-2); }
.maplibregl-popup-content p { font-size: var(--text-sm); color: var(--muted); margin: 0; }
.maplibregl-popup-close-button { min-width: 44px; min-height: 44px; color: var(--plum); }
.maplibregl-popup-content { padding-top: var(--space-10); max-height: 340px; overflow-y: auto; }
.maplibregl-popup { z-index: 6; }
.map-wrap:has(.maplibregl-popup) .map-legend { visibility: hidden; }
.map-wrap:has(.maplibregl-popup) .map-reset {
  top: auto; bottom: 44px; left: 12px; right: auto;
  max-width: calc(100% - 76px);
}

/* Panel lateral */
.map-side { display: flex; flex-direction: column; gap: var(--space-4); }
.search-input {
  width: 100%; padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--surface-2); font-size: var(--text-sm);
}
.search-input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }

.chip-row { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.chip-row-wrap { margin-bottom: var(--space-8); max-width: 960px; margin-inline: auto; padding-inline: var(--space-6); }
.chip {
  border: 1px solid var(--border); background: var(--surface-2);
  border-radius: var(--radius-full, 9999px);
  padding: var(--space-2) var(--space-4); font-size: var(--text-sm); font-weight: 500; min-height: 44px;
  cursor: pointer; transition: all var(--transition);
}
.chip:hover { border-color: var(--accent); }
.chip.is-active { background: var(--ink); color: var(--surface); border-color: var(--ink); }

.facility-list { display: flex; flex-direction: column; gap: var(--space-3); overflow-y: auto; flex: 1; list-style: none; }
.facility-item {
  text-align: left; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: var(--space-4);
  cursor: pointer; transition: all var(--transition); width: 100%;
}
.facility-item:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.facility-item.is-active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.fi-head { display: flex; align-items: baseline; gap: var(--space-2); margin-bottom: var(--space-1); }
.fi-type { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; align-self: center; border: 1px solid var(--plum); }
.fi-name { font-weight: 700; font-size: var(--text-sm); line-height: 1.3; }
.fi-short { display: block; font-size: var(--text-xs); color: var(--muted); margin-top: var(--space-1); }
.fi-meta { display: flex; gap: var(--space-4); margin-top: var(--space-2); font-size: var(--text-xs); color: var(--muted); flex-wrap: wrap; }
.fi-meta strong { color: var(--ink); font-weight: 700; }

/* ---------- Tarjetas de instalaciones ---------- */
.facility-cards { max-width: 960px; margin-inline: auto; padding-inline: var(--space-6); display: flex; flex-direction: column; gap: var(--space-6); }
.facility-card {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: var(--space-6) var(--space-8); box-shadow: var(--shadow-sm);
}
.fc-head { display: flex; align-items: flex-start; gap: var(--space-3); margin-bottom: var(--space-5); flex-wrap: wrap; }
.fc-dot { width: 14px; height: 14px; border-radius: 50%; margin-top: 0.45em; flex-shrink: 0; border: 1px solid var(--plum); }
.fc-dot-private { background: var(--accent); }
.fc-dot-federal { background: var(--slate); }
.fc-dot-county { background: var(--amber); }
.fc-title { font-family: var(--font-body); font-size: var(--text-lg); font-weight: 700; line-height: 1.35; }
.fc-city { font-size: var(--text-xs); color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; font-weight: 700; }
.fc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-4); margin-bottom: var(--space-5); }
.fc-field { border-left: 3px solid var(--divider); padding-left: var(--space-4); }
.fc-field dt { font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: var(--space-1); }
.fc-field dd { font-size: var(--text-base); line-height: 1.65; overflow-wrap: anywhere; }
.fc-prose { font-size: var(--text-base); color: var(--muted); display: grid; gap: var(--space-4); }
.fc-prose strong { color: var(--ink); }
.facility-notes, .family-checklist { padding-left: var(--space-5); display: grid; gap: var(--space-3); }
.facility-notes li::marker, .family-checklist li::marker { color: var(--violet); }
.facility-history { border-top: 1px solid var(--divider); padding-top: var(--space-3); }
.facility-history summary { color: var(--accent); font-weight: 700; cursor: pointer; padding-block: var(--space-2); min-height: 44px; }
.facility-history p { padding-top: var(--space-2); }
.fc-phone a { display: inline-block; padding-block: var(--space-2); font-weight: 700; min-height: 44px; }

/* ---------- Datos ---------- */
.data-notes { max-width: 960px; margin-inline: auto; padding-inline: var(--space-6); display: grid; gap: var(--space-4); color: var(--muted); }
.data-notes strong { color: var(--ink); }

/* ---------- Pasos ---------- */
.steps { max-width: 960px; margin-inline: auto; padding-inline: var(--space-6); display: grid; gap: var(--space-4); counter-reset: step; }
.step {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: var(--space-5) var(--space-6); display: flex; gap: var(--space-5); align-items: flex-start;
}
.step-num {
  font-family: var(--font-display); font-weight: 700; font-size: var(--text-lg);
  color: var(--accent); flex-shrink: 0; width: 2rem; line-height: 1.4;
}
.step-body h3 { font-family: var(--font-body); font-size: var(--text-base); font-weight: 700; margin-bottom: var(--space-1); }
.step-body p { font-size: var(--text-base); color: var(--muted); max-width: none; }

/* ---------- Recursos ---------- */
.resource-grid {
  max-width: 960px; margin-inline: auto; padding-inline: var(--space-6);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--space-5);
}
.resource-card {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6); display: flex; flex-direction: column; gap: var(--space-3);
  box-shadow: var(--shadow-sm);
}
.resource-card h3, .resource-card h4 { font-family: var(--font-body); font-size: var(--text-base); font-weight: 700; line-height: 1.4; }
.rc-desc { font-size: var(--text-base); color: var(--muted); flex: 1; }
.rc-contact { font-size: var(--text-sm); color: var(--ink); font-weight: 500; border-top: 1px solid var(--divider); padding-top: var(--space-3); overflow-wrap: anywhere; }
.rc-badge {
  align-self: flex-start; font-size: var(--text-xs); font-weight: 700;
  background: var(--teal-soft); color: var(--teal);
  padding: var(--space-1) var(--space-3); border-radius: var(--radius-full, 9999px);
}
.materials-head { margin-top: var(--space-12); }
#materialsGrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.materials-checked { font-size: var(--text-sm); color: var(--muted); margin-top: var(--space-3); }
.material-featured { border-top: 4px solid var(--violet); }
.material-links { display: grid; gap: var(--space-3); }
.resource-link {
  display: flex; align-items: center; justify-content: center; min-height: 48px;
  padding: var(--space-3) var(--space-4); background: var(--plum); color: white;
  font-size: var(--text-sm); font-weight: 700; line-height: 1.5; text-align: center;
  border: 1px solid var(--plum); border-radius: var(--radius-md);
  text-decoration: none; overflow-wrap: anywhere;
}
.resource-link:hover { color: white; background: var(--violet); }
.material-featured .resource-link:first-child { background: var(--aqua); color: var(--plum); border-color: var(--aqua); }
.material-featured .resource-link:first-child:hover { border-color: var(--plum); }

/* Acceso sin visores PDF y alternativas cuando un sitio externo falla. */
.locator-options .col-card { display: grid; gap: var(--space-4); min-width: 0; }
.locator-options .col-title { margin-bottom: 0; }
.access-warning { border-left: 4px solid var(--violet); padding-left: var(--space-4); }
.address-label { font-weight: 700; font-size: var(--text-sm); }
.copy-row { display: flex; flex-wrap: wrap; gap: var(--space-2); min-width: 0; }
.copy-row input {
  width: 100%; min-width: 0; padding: var(--space-3);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 1rem; background: var(--surface);
}
.copy-button {
  min-height: 44px; padding: var(--space-2) var(--space-4); cursor: pointer;
  border: 1px solid var(--plum); border-radius: var(--radius-md);
  font-weight: 700; background: var(--aqua); color: var(--plum);
}
.copy-button:hover { background: var(--slate-soft); }
.copy-status:empty { display: none; }
.copy-status, .privacy-note { font-size: var(--text-sm); }
.phone-link { font-size: var(--text-base); }
#materialsGrid { align-items: start; }
.red-card-reader { min-width: 0; }
.red-card-reader > summary {
  min-height: 48px; padding: var(--space-3) var(--space-4);
  border: 1px solid var(--plum); border-radius: var(--radius-md);
  background: var(--aqua); color: var(--plum); cursor: pointer;
  font-size: var(--text-sm); font-weight: 700; line-height: 1.5;
}
.red-card-content { padding-block: var(--space-4); display: grid; gap: var(--space-4); font-size: var(--text-base); }
.red-card-content h5 { font-family: var(--font-body); font-size: var(--text-base); line-height: 1.5; }
.red-card-content ul { padding-left: var(--space-5); display: grid; gap: var(--space-3); }
.red-card-content p + p { margin-top: var(--space-3); }
.card-access-note { color: var(--muted); }
.access-help { margin-top: var(--space-4); font-size: var(--text-sm); color: var(--muted); max-width: 68ch; }
.access-help summary { cursor: pointer; padding-block: var(--space-2); min-height: 44px; color: var(--accent); font-weight: 700; }
.access-help p { padding-top: var(--space-2); }
.resource-fallback { font-size: var(--text-sm); line-height: 1.65; }
.resource-fallback a { display: inline-block; padding-block: var(--space-2); min-height: 44px; }
.download-status { font-size: var(--text-sm); color: var(--muted); }
.download-status:empty { display: none; }
button.resource-link { width: 100%; cursor: pointer; }
button.resource-link:disabled { cursor: progress; opacity: 0.75; }

/* ---------- Derechos / familia ---------- */
.two-col { max-width: 960px; margin-inline: auto; padding-inline: var(--space-6); display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--space-6); align-items: start; }
.col-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-6); }
.col-title { font-size: var(--text-lg); font-weight: 700; margin-bottom: var(--space-4); }
.kyr-list { display: grid; gap: var(--space-4); list-style: none; }
.kyr-item { border-left: 3px solid var(--accent); padding-left: var(--space-4); }
.kyr-item h3 { font-family: var(--font-body); font-size: var(--text-base); font-weight: 700; margin-bottom: var(--space-1); }
.kyr-item p { font-size: var(--text-base); color: var(--muted); }
.col-card > p { font-size: var(--text-base); color: var(--muted); }
.family-checklist { margin-block: var(--space-4); font-size: var(--text-base); color: var(--muted); }

/* ---------- Fuentes ---------- */
.contact-intro { max-width: 960px; margin: 0 auto var(--space-6); padding-inline: var(--space-6); }
.contact-intro h3 { font-size: var(--text-lg); margin-bottom: var(--space-3); }
.contact-intro p + p { margin-top: var(--space-3); }
.contact-quick { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-4); }
.contact-quick a { display: inline-flex; align-items: center; min-height: 44px; padding: var(--space-2) var(--space-3); border: 1px solid var(--accent); border-radius: var(--radius-md); font-weight: 700; }
.outside-badge { display: table; background: var(--aqua); color: var(--plum); padding: var(--space-1) var(--space-2); margin-bottom: var(--space-2); font-size: var(--text-sm); font-weight: 700; border-radius: var(--radius-md); }
.facility-contact { border-top: 1px solid var(--border); margin-top: var(--space-5); padding-top: var(--space-5); scroll-margin-top: 140px; }
.facility-contact h4 { font-family: var(--font-body); font-size: var(--text-lg); margin-bottom: var(--space-3); }
.contact-essential { display: grid; gap: var(--space-2); }
.contact-essential > a { font-size: var(--text-lg); font-weight: 700; min-height: 44px; display: inline-flex; align-items: center; justify-self: start; }
.contact-essential span { font-size: var(--text-sm); color: var(--muted); }
.contact-details { margin-top: var(--space-4); }
.contact-details > summary { padding: var(--space-3); background: var(--rose); border: 1px solid var(--accent); border-radius: var(--radius-md); font-weight: 700; cursor: pointer; min-height: 48px; }
.contact-channels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5); padding-top: var(--space-5); }
.contact-channel { min-width: 0; font-size: var(--text-base); overflow-wrap: anywhere; }
.contact-channel h5 { font-family: var(--font-body); font-size: var(--text-base); margin-bottom: var(--space-2); }
.contact-channel p + p { margin-top: var(--space-3); }
.contact-provider { display: inline-flex; align-items: center; min-height: 44px; padding-block: var(--space-2); margin-top: var(--space-2); font-weight: 700; }
.postal-template { font-style: normal; margin-top: var(--space-3); padding: var(--space-3); background: var(--rose); border-left: 3px solid var(--accent); overflow-wrap: anywhere; }
.inline-source { white-space: normal; font-size: var(--text-sm); }
.popup-contact { display: inline-block; padding-block: 8px; font-weight: 700; }
@media (max-width: 640px) { .contact-channels { grid-template-columns: minmax(0, 1fr); } }

.sources { max-width: 960px; margin-inline: auto; padding-inline: var(--space-6); display: grid; gap: var(--space-2); }
.sources li { font-size: var(--text-sm); color: var(--muted); line-height: 1.65; overflow-wrap: anywhere; }
.sources a { color: var(--muted); }

/* ---------- Pie ---------- */
.footer { background: var(--ink); color: var(--surface); padding: var(--space-8) var(--space-6); text-align: center; }
.footer p { margin-inline: auto; font-size: var(--text-xs); color: var(--rose); }
.footer-note { margin-top: var(--space-2); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .map-layout { grid-template-columns: 1fr; }
  .map-wrap { min-height: 420px; }
  .map-side { max-height: none; }
  .facility-list { max-height: none; overflow: visible; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .topnav { display: none; }
}
@media (max-width: 480px) {
  :root { --text-sm: 1rem; --text-xs: 0.8125rem; --text-base: 1rem; }
  html { scroll-padding-top: 136px; }
  body { line-height: 1.7; }
  h1, h2, h3 { text-wrap: pretty; }
  .hero-inner { padding-top: var(--space-8); padding-bottom: var(--space-8); }
  .hero-title { font-size: clamp(2rem, 7.5vw, 2.5rem); line-height: 1.15; }
  .hero-actions { gap: var(--space-3); margin-bottom: var(--space-8); }
  .hero-actions .btn { width: 100%; text-align: center; min-height: 48px; }
  .section { padding-block: var(--space-10); }
  .section-head { margin-bottom: var(--space-6); }
  .section-sub { line-height: 1.65; }
  .topbar-inner { flex-wrap: wrap; gap: var(--space-2); }
  .brand { width: 100%; }
  .language-picker { margin-left: 0; }
  .stats { grid-template-columns: 1fr 1fr; gap: var(--space-3); }
  .facility-card { padding: var(--space-5) var(--space-4); }
  .fc-grid, .resource-grid, .two-col { grid-template-columns: minmax(0, 1fr); }
  #materialsGrid { grid-template-columns: minmax(0, 1fr); }
  .fc-head { flex-wrap: nowrap; align-items: flex-start; }
  .fc-field { padding-left: var(--space-3); }
  .resource-card, .col-card { padding: var(--space-5); }
  .resource-card h3 { line-height: 1.45; }
  .step { padding: var(--space-5) var(--space-4); gap: var(--space-3); }
  .step-num { width: var(--space-5); }
  .step-body { min-width: 0; }
  .step-body h3 { line-height: 1.4; margin-bottom: var(--space-2); }
  .search-input { min-height: 48px; font-size: var(--text-base); }
  .fi-name, .fi-short, .fi-meta { font-size: var(--text-base); line-height: 1.6; }
  .fi-meta { gap: var(--space-2); }
  .map-legend { max-width: calc(100% - var(--space-12)); }
  .map-reset { min-height: 44px; }
}

/* Nota de vacío */
.empty-note {
  font-size: var(--text-sm); color: var(--muted);
  padding: var(--space-4); text-align: center;
}

/* MapLibre: controles */
.maplibregl-ctrl-group { border-radius: var(--radius-md); overflow: hidden; }
.maplibregl-ctrl-attrib { font-size: 10px; }
