:root {
  --ink: #102e38;
  --ink-deep: #0a2028;
  --muted: #61747a;
  --line: #d8e0df;
  --canvas: #f5f7f5;
  --paper: #fffefa;
  --mint: #d8f0e7;
  --mint-strong: #9ddbc8;
  --orange: #ef714b;
  --orange-soft: #fff0ea;
  --yellow: #f1bb58;
  --blue: #4c9ba7;
  --low: #43A047;
  --medium: #FFB300;
  --high: #FB8C00;
  --very-high: #E53935;
  --shadow: 0 16px 40px rgba(16, 46, 56, .07);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
.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; }
.section-wrap { width: min(1180px, calc(100% - 64px)); margin-inline: auto; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 88px;
  padding-inline: max(32px, calc((100% - 1320px) / 2));
  margin: 0;
  color: #fff;
  background-color: #00705A;
  border-bottom: 1px solid rgba(0, 0, 0, .12);
  box-shadow: 0 2px 5px rgba(0,0,0,.1);
  font-family: "Open Sans", sans-serif;
}
.brand { display: inline-flex; align-items: center; gap: 13px; position: relative; z-index: 1; }
.brand-logo { display: block; width: 116px; height: 42px; object-fit: contain; object-position: left center; }
.brand-mark { display: inline-flex; align-items: end; gap: 3px; width: 30px; height: 31px; padding: 5px 4px; border-radius: 9px 9px 9px 3px; background: var(--ink); transform: rotate(-8deg); }
.brand-mark-fallback { align-items: center; justify-content: center; width: 38px; height: 38px; padding: 0; color: #00705A; background: #fff; border-radius: 10px 10px 10px 3px; transform: none; font-size: 11px; font-weight: 850; letter-spacing: -.05em; }
.brand-mark-fallback span { transform: none; }
.brand-mark span { display: block; width: 5px; border-radius: 5px; background: var(--mint-strong); transform: rotate(8deg); }
.brand-mark span:nth-child(1) { height: 9px; opacity: .68; }
.brand-mark span:nth-child(2) { height: 15px; }
.brand-mark span:nth-child(3) { height: 21px; background: var(--orange); }
.brand-copy { position: static; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; margin-left: auto; text-align: right; white-space: nowrap; }
.brand-copy strong { font-size: 22px; letter-spacing: -.04em; line-height: 1; }
.brand-copy small { color: rgba(255,255,255,.76); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }

.hero { padding: 82px 0 78px; }
.eyebrow, .section-kicker { display: flex; align-items: center; gap: 10px; color: var(--orange); font-size: 11px; font-weight: 760; letter-spacing: .14em; text-transform: uppercase; }
.eyebrow-line { width: 25px; height: 2px; background: var(--orange); }
.hero-grid { display: flex; justify-content: space-between; align-items: center; gap: 2rem; margin-top: 25px; }
.hero-copy { flex: 1; min-width: 0; }
.hero-logo { display: flex; justify-content: center; align-items: center; flex: 0 0 180px; }
.hero-icono-lateral { display: block; width: 180px; height: auto; object-fit: contain; }
h1, h2, h3, p { margin: 0; }
h1 { max-width: 700px; font-size: clamp(40px, 5.8vw, 76px); line-height: .99; letter-spacing: -.065em; font-weight: 780; }
h1 em { color: var(--orange); font-style: normal; }
.hero-text { max-width: 490px; margin-top: 27px; color: var(--muted); font-size: 16px; line-height: 1.65; }
.hero-signal { position: relative; align-self: stretch; display: flex; flex-direction: column; justify-content: flex-end; padding: 24px 0 2px 28px; border-left: 1px solid var(--line); }
.hero-signal::before { content: ""; position: absolute; top: 1px; left: -1px; width: 3px; height: 53px; background: var(--orange); }
.signal-label, .signal-caption { color: var(--muted); font-size: 11px; letter-spacing: .11em; text-transform: uppercase; }
.hero-signal strong { margin: 8px 0 2px; font-size: 44px; letter-spacing: -.07em; line-height: 1; }

.search-section, .map-section, .results-section, .precautions-section { padding-bottom: 86px; }
.section-heading, .results-header { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.section-heading h2, .results-header h2 { margin-top: 7px; font-size: 28px; letter-spacing: -.045em; }
.map-heading-actions { display: flex; align-items: center; justify-content: flex-end; gap: 14px; min-width: 0; }
.text-button { display: inline-flex; align-items: center; gap: 5px; padding: 9px 13px; color: #fff; background: #c8514f; border: 0; border-radius: 4px; font-size: 12px; font-weight: 720; box-shadow: 0 4px 10px rgba(200,81,79,.2); transition: background .18s ease, transform .18s ease, box-shadow .18s ease; }
.text-button span { display: inline-block; transition: transform .2s ease; }
.text-button:hover { background: #a9403e; box-shadow: 0 6px 14px rgba(200,81,79,.28); transform: translateY(-1px); }
.text-button:hover span { transform: translate(3px, -3px); }
.search-card { padding: 20px; background: var(--paper); border: 1px solid rgba(16,46,56,.1); box-shadow: var(--shadow); }
.location-card { position: relative; z-index: 1; padding: 24px; }
.location-intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 21px; }
.location-intro strong { display: block; color: var(--ink); font-size: 16px; letter-spacing: -.025em; }
.location-intro p { max-width: 560px; margin-top: 6px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.free-badge { display: inline-flex; align-items: center; gap: 7px; padding: 7px 9px; color: var(--low); background: #e9f7f0; font-size: 10px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; white-space: nowrap; }
.free-badge .live-dot { width: 6px; height: 6px; box-shadow: none; }
.location-form-grid { grid-template-columns: repeat(3, 1fr); margin-top: 0; }
.location-actions { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-top: 19px; pointer-events: auto; }
.location-actions > span { color: var(--muted); font-size: 11px; }
.consult-alert { position: relative; z-index: 1; margin-top: 10px; padding: 10px 12px; color: #7a2117; background: #fff0ed; border: 1px solid #ef715f; font-size: 12px; font-weight: 700; }
.map-card { position: relative; z-index: 1; overflow: hidden; background: var(--paper); border: 1px solid rgba(16,46,56,.1); box-shadow: var(--shadow); }
#risk-map { height: 520px; width: 100%; background: #e9efed; }
.leaflet-container { color: var(--ink); font: inherit; }
.map-hazard-chips { position: absolute; z-index: 700; top: 14px; left: 50%; display: flex; gap: 4px; padding: 4px; background: rgba(255,254,250,.94); border: 1px solid rgba(16,46,56,.14); border-radius: 999px; box-shadow: 0 8px 20px rgba(16,46,56,.16); transform: translateX(-50%); }
.map-hazard-chip { min-width: 92px; padding: 8px 13px; color: var(--ink); background: #fff; border: 0; border-radius: 999px; font-size: 11px; font-weight: 800; line-height: 1; transition: color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease; }
.map-hazard-chip:hover, .map-hazard-chip:focus-visible { background: var(--mint); outline: none; }
.map-hazard-chip.is-active { color: #fff; background: var(--ink); box-shadow: 0 3px 8px rgba(16,46,56,.22); }
.map-hazard-chip:active { transform: scale(.97); }
.map-clear-button { display: inline-flex; align-items: center; min-height: 32px; padding: 7px 10px; color: var(--ink); background: rgba(255,255,255,.96); border: 1px solid rgba(16,46,56,.2); border-radius: 999px; box-shadow: 0 6px 16px rgba(16,46,56,.16); font-size: 11px; font-weight: 800; line-height: 1; cursor: pointer; touch-action: manipulation; white-space: nowrap; transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.map-clear-button:hover, .map-clear-button:focus-visible { color: #fff; background: var(--ink); border-color: var(--ink); outline: none; box-shadow: 0 8px 20px rgba(16,46,56,.24); transform: translateY(-1px); }
.map-clear-button:active { transform: translateY(1px) scale(.97); }
.critical-popup { display: flex; flex-direction: column; gap: 8px; color: var(--ink); font-size: 12px; line-height: 1.45; }
.critical-popup-title { display: block; padding-bottom: 7px; color: #4a148c; border-bottom: 1px solid #e3d9ee; font-size: 15px; }
.critical-popup b { color: var(--ink); }
.map-status { position: absolute; z-index: 500; top: 18px; left: 18px; max-width: min(390px, calc(100% - 36px)); padding: 10px 13px; color: var(--muted); background: rgba(255,254,250,.94); border: 1px solid var(--line); box-shadow: 0 8px 20px rgba(16,46,56,.1); font-size: 11px; line-height: 1.4; }
.map-status.is-error { color: var(--very-high); }
.map-locate-control { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-width: 0; height: 32px; margin-left: -2px; padding: 4px 8px; color: var(--ink); background: #fff; border: 2px solid rgba(16,46,56,.24); border-radius: 999px; box-shadow: 0 4px 12px rgba(16,46,56,.24); font-size: 10.5px; font-weight: 800; line-height: 1; touch-action: manipulation; transition: color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease, background .18s ease; }
.map-locate-control:hover, .map-locate-control:focus-visible { color: var(--orange); background: #fffaf7; border-color: var(--orange); outline: 2px solid rgba(239,113,75,.22); outline-offset: 2px; box-shadow: 0 6px 16px rgba(16,46,56,.28); transform: translateY(-1px); }
.map-locate-control:active { color: #fff; background: var(--orange); border-color: var(--orange); transform: translateY(1px) scale(.98); }
.map-locate-control .locate-icon { font-size: 17px; line-height: 1; }
.map-locate-control .locate-label { white-space: nowrap; }
.map-locate-control.is-loading { color: var(--orange); cursor: wait; }
.map-locate-control.is-loading .locate-icon { display: inline-block; animation: locate-pulse 1s ease-in-out infinite; }
@keyframes locate-pulse { 50% { opacity: .35; transform: scale(.78); } }
.map-toast { position: absolute; z-index: 600; left: 50%; bottom: 16px; max-width: min(440px, calc(100% - 32px)); padding: 11px 15px; color: #fff; background: rgba(16,46,56,.94); box-shadow: 0 8px 22px rgba(16,46,56,.22); font-size: 11px; line-height: 1.4; text-align: center; transform: translateX(-50%); }
.map-legend { position: absolute; z-index: 500; left: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 7px; min-width: 150px; padding: 12px 13px; color: var(--ink); background: rgba(255,254,250,.95); border: 1px solid rgba(16,46,56,.14); box-shadow: 0 8px 20px rgba(16,46,56,.1); font-size: 10px; }
.map-legend strong { margin-bottom: 2px; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.map-legend span { display: flex; align-items: center; gap: 7px; }
.map-legend-swatch { display: inline-block; width: 13px; height: 13px; border: 1px solid rgba(16,46,56,.22); }
.map-risk-very-high { background: #E53935; }
.map-risk-high { background: #FB8C00; }
.map-risk-medium { background: #FFB300; }
.map-risk-low { background: #43A047; }
.map-critical-zone { background: #d32f2f; border-radius: 50%; }
.map-hint { margin-top: 10px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.primary-button { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 10px; min-height: 43px; padding: 0 17px; color: #fff; background: var(--orange); border: 0; font-size: 12px; font-weight: 780; pointer-events: auto !important; touch-action: manipulation; -webkit-tap-highlight-color: rgba(0,0,0,0.1); transition: background .18s ease, transform .18s ease; }
.primary-button span { font-size: 17px; line-height: 1; }
.primary-button:hover:not(:disabled) { background: #db5f3e; transform: translateY(-1px); }
.search-field { display: flex; align-items: center; gap: 13px; height: 58px; padding: 0 16px; background: var(--canvas); border: 1px solid var(--line); }
.search-field svg { width: 19px; height: 19px; flex: 0 0 auto; fill: none; stroke: var(--orange); stroke-width: 1.8; }
.search-field input { min-width: 0; flex: 1; color: var(--ink); background: transparent; border: 0; outline: none; font-size: 15px; }
.search-field input::placeholder { color: #829194; }
kbd { padding: 4px 7px; color: var(--muted); background: #fff; border: 1px solid var(--line); font-size: 10px; border-radius: 4px; }
.filter-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 12px; }
.select-field { display: flex; flex-direction: column; gap: 8px; }
.select-field span { color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.select-field select { width: 100%; height: 46px; padding: 0 32px 0 12px; color: var(--ink); background-color: #fff; background-image: linear-gradient(45deg, transparent 50%, var(--orange) 50%), linear-gradient(135deg, var(--orange) 50%, transparent 50%); background-position: calc(100% - 17px) 20px, calc(100% - 12px) 20px; background-repeat: no-repeat; background-size: 5px 5px, 5px 5px; border: 1px solid var(--line); border-radius: 0; appearance: none; outline: none; font-size: 13px; }
.select-field select:focus, .search-field:focus-within { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(239,113,75,.12); }
.risk-select-field select { border-color: #e9cec2; background-color: var(--orange-soft); }
.summary-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 17px; }
.result-summary { display: flex; align-items: baseline; gap: 6px; }
.result-summary strong { font-size: 15px; }
.result-summary span { color: var(--muted); font-size: 12px; }
.risk-legend { display: flex; flex-wrap: wrap; justify-content: end; gap: 15px; color: var(--muted); font-size: 11px; }
.risk-legend span { display: inline-flex; align-items: center; gap: 6px; }
.risk-dot, .choice-marker { display: inline-block; width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; }
.very-high { background: var(--very-high); } .high { background: var(--high); } .medium { background: var(--medium); } .low { background: var(--low); }

.results-section { padding-top: 12px; }
#riesgo-localidad { scroll-margin-top: 80px; outline: none; }
.results-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; align-items: start; gap: 18px; }
.result-main .results-header { min-height: 68px; }
.results-subtitle { margin-top: 7px; color: var(--muted); font-size: 12px; }
.data-status { display: inline-flex; align-items: center; gap: 7px; color: var(--low); font-size: 11px; font-weight: 700; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.table-card { overflow: hidden; background: var(--paper); border: 1px solid rgba(16,46,56,.1); box-shadow: var(--shadow); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
thead { background: var(--ink); color: #f3f7f5; }
th { padding: 15px 18px; font-size: 10px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
td { padding: 16px 18px; border-bottom: 1px solid #e7ecea; color: var(--muted); font-size: 13px; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f7fbf8; }
tbody tr.is-expanded { background: #f7fbf8; }
td:first-child { color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 650; }
.district-trigger { display: inline-flex; align-items: center; gap: 8px; padding: 5px 7px; margin: -5px -7px; color: var(--ink); background: transparent; border: 0; text-align: left; font-size: 13px; }
.district-trigger:hover, .district-trigger:focus-visible { color: var(--orange); outline: none; }
.district-cell { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; min-width: 0; }
.district-name-line { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.tooltip-row:hover { background: #edf7f2; }
.tooltip-row td { padding: 0; background: #edf7f2; border-bottom: 1px solid var(--mint-strong); }
.district-tooltip { padding: 22px 24px 24px; }
.tooltip-topline { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.tooltip-kicker { color: var(--orange); font-size: 9px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.district-tooltip h3 { margin-top: 6px; color: var(--ink); font-size: 18px; letter-spacing: -.035em; }
.district-tooltip p { margin-top: 5px; color: var(--muted); font-size: 11px; }
.tooltip-close { width: 26px; height: 26px; flex: 0 0 auto; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 50%; font-size: 18px; line-height: 1; }
.tooltip-close:hover { color: var(--orange); border-color: var(--orange); }
.tooltip-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.tooltip-metric { min-height: 69px; padding: 12px 13px; background: rgba(255,255,255,.72); border: 1px solid rgba(16,46,56,.08); }
.tooltip-metric span { display: block; color: var(--muted); font-size: 10px; line-height: 1.3; }
.tooltip-metric strong { display: block; margin-top: 7px; color: var(--ink); font-size: 20px; letter-spacing: -.04em; }
.risk-badge { display: inline-flex; align-items: center; gap: 7px; padding: 6px 9px; color: var(--ink); background: #f3f5f2; font-size: 11px; font-weight: 750; }
.risk-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.risk-badge[data-risk="Muy Alto"] { color: #E53935; background: #fcedeb; }
.risk-badge[data-risk="Alto"] { color: #FB8C00; background: #fff0e9; }
.risk-badge[data-risk="Medio"] { color: #FFB300; background: #fff7df; }
.risk-badge[data-risk="Bajo"] { color: #43A047; background: #e9f7f0; }
.hazard-tabs { display: flex; gap: 0; padding: 14px 18px 0; border-bottom: 1px solid var(--line); background: #fbfcfa; }
.hazard-tab { position: relative; padding: 12px 14px 13px; color: var(--muted); background: transparent; border: 0; border-bottom: 3px solid transparent; font-size: 12px; font-weight: 780; text-align: left; transition: color .18s ease, border-color .18s ease, background .18s ease; }
.hazard-tab:hover, .hazard-tab:focus-visible { color: var(--ink); background: #f2f7f4; outline: none; }
.hazard-tab.is-active { color: var(--ink); border-bottom-color: var(--orange); }
.hazard-diagnostics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 18px; }
.hazard-card { min-width: 0; padding: 20px; border: 1px solid rgba(16,46,56,.1); border-top: 4px solid var(--orange); background: var(--paper); }
.hazard-card-flood { border-top-color: var(--blue); }
.hazard-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.hazard-card-header > div { min-width: 0; }
.hazard-card-kicker { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.hazard-card h3 { margin-top: 6px; color: var(--ink); font-size: 18px; letter-spacing: -.035em; }
.hazard-card-header p { margin-top: 7px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.hazard-card .risk-badge { flex: 0 0 auto; }
.hazard-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 18px; }
.hazard-metric { min-height: 64px; padding: 10px; background: #f4f8f5; border: 1px solid rgba(16,46,56,.07); }
.hazard-metric span { display: block; color: var(--muted); font-size: 9px; line-height: 1.3; }
.hazard-metric strong { display: block; margin-top: 6px; color: var(--ink); font-size: 17px; letter-spacing: -.03em; }
.table-footer { display: flex; align-items: center; justify-content: space-between; min-height: 58px; padding: 0 18px; border-top: 1px solid #e7ecea; color: var(--muted); font-size: 11px; }
.table-footer-actions { display: inline-flex; align-items: center; justify-content: flex-end; gap: 8px; }
.result-action { padding: 8px 10px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 999px; font-size: 11px; font-weight: 750; transition: color .18s ease, border-color .18s ease, background .18s ease, transform .18s ease; }
.result-action:hover:not(:disabled), .result-action:focus-visible:not(:disabled) { color: var(--orange); background: var(--orange-soft); border-color: var(--orange); outline: none; transform: translateY(-1px); }
.result-action:active:not(:disabled) { transform: translateY(1px); }
.result-action:disabled { cursor: not-allowed; opacity: .48; }
.outline-button { padding: 9px 12px; color: var(--ink); background: transparent; border: 1px solid var(--line); font-size: 11px; font-weight: 720; }
.outline-button:hover { border-color: var(--orange); color: var(--orange); }
.empty-state { padding: 58px 20px 62px; text-align: center; }
.empty-icon { display: block; margin-bottom: 8px; color: var(--orange); font-size: 31px; }
.empty-state h3 { font-size: 19px; letter-spacing: -.03em; }
.empty-state p { margin-top: 8px; color: var(--muted); font-size: 13px; }
.impact-panel { padding: 25px 21px 21px; background: var(--ink); color: #eef5f2; }
.impact-panel .section-kicker { color: var(--mint-strong); }
.impact-panel h2 { margin-top: 9px; font-size: 25px; line-height: 1.03; letter-spacing: -.05em; }
.impact-intro { margin-top: 12px; color: #a9bfbb; font-size: 11px; line-height: 1.5; }
.impact-intro strong { color: #f4c26a; }
.impact-total { display: flex; align-items: baseline; gap: 7px; padding: 18px 0 13px; border-bottom: 1px solid rgba(216,240,231,.17); }
.impact-total strong { color: var(--orange); font-size: 30px; letter-spacing: -.06em; }
.impact-total span { color: #a9bfbb; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.ranking-list { display: flex; flex-direction: column; gap: 0; margin: 0; padding: 0; list-style: none; }
.ranking-item { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 14px 0; border-bottom: 1px solid rgba(216,240,231,.17); }
.ranking-position { color: var(--mint-strong); font-size: 11px; font-weight: 800; }
.ranking-copy { min-width: 0; }
.ranking-copy strong { display: block; overflow: hidden; color: #f2f7f4; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.ranking-copy span { display: block; margin-top: 4px; color: #93aaa6; font-size: 9px; line-height: 1.25; }
.ranking-homes { text-align: right; }
.ranking-homes strong { display: block; color: #f4c26a; font-size: 12px; }
.ranking-homes span { display: block; margin-top: 3px; color: #93aaa6; font-size: 9px; }
.impact-note { margin-top: 16px; color: #809995; font-size: 9px; line-height: 1.45; }
.whatsapp-button { display: inline-flex; align-items: center; gap: 8px; margin-top: 13px; padding: 11px 13px; color: #fff; background: #168c63; font-size: 11px; font-weight: 780; text-decoration: none; transition: background .18s ease, transform .18s ease; }
.whatsapp-button:hover { background: #0f704f; transform: translateY(-1px); }
.whatsapp-button span { font-size: 15px; }

.precautions-section { padding-top: 7px; }
.precautions-heading { align-items: center; }
.selection-hint { color: var(--muted); font-size: 11px; }
.precautions-layout { display: grid; grid-template-columns: minmax(0, 1fr) 285px; gap: 18px; }
.precautions-main { min-height: 300px; padding: 34px 38px 30px; background: var(--ink); color: #eef5f2; position: relative; overflow: hidden; }
.precautions-main::after { content: ""; position: absolute; right: -44px; bottom: -70px; width: 220px; height: 220px; border: 1px solid rgba(157,219,200,.22); border-radius: 50%; box-shadow: 0 0 0 24px rgba(157,219,200,.04), 0 0 0 48px rgba(157,219,200,.035); }
.precaution-kicker { color: var(--mint-strong); font-size: 10px; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; }
.precautions-main h3 { max-width: 620px; margin-top: 11px; font-size: clamp(25px, 3.1vw, 38px); line-height: 1.04; letter-spacing: -.055em; }
.precautions-main h3 strong { color: var(--orange); font-weight: 780; }
.precaution-intro { max-width: 560px; margin-top: 15px; color: #b8c9c7; font-size: 13px; line-height: 1.65; }
.precaution-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px 25px; max-width: 680px; margin: 25px 0 0; padding: 0; list-style: none; }
.precaution-list li { display: flex; gap: 9px; color: #e1ece9; font-size: 12px; line-height: 1.45; }
.precaution-list li::before { content: "✓"; color: var(--mint-strong); font-weight: 800; }
.precaution-source { display: block; margin-top: 25px; color: #90aaa7; font-size: 10px; }
.risk-chooser { display: flex; flex-direction: column; padding: 22px 18px; background: var(--paper); border: 1px solid rgba(16,46,56,.1); }
.chooser-label { margin: 0 12px 12px; color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.risk-choice { display: flex; align-items: center; gap: 10px; width: 100%; padding: 14px 12px; color: var(--ink); background: transparent; border: 0; border-top: 1px solid var(--line); text-align: left; font-size: 13px; transition: background .18s ease, padding .18s ease; }
.risk-choice:hover, .risk-choice.is-selected { padding-left: 16px; background: var(--canvas); }
.risk-choice .choice-arrow { margin-left: auto; color: var(--muted); font-size: 14px; }
.risk-choice.is-selected .choice-arrow { color: var(--orange); }

.footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 24px; padding-bottom: 31px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.footer div { display: flex; gap: 10px; align-items: center; }
.footer strong { color: var(--ink); }
.movement-info { padding: 12px 0 36px; }
.info-heading { margin-bottom: 18px; text-align: center; }
.info-heading .section-kicker { justify-content: center; }
.info-heading h2 { margin-top: 7px; color: var(--ink); font-size: 25px; letter-spacing: -.045em; }
.faq-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.faq-item { padding: 22px 24px 24px; background: var(--paper); border: 1px solid rgba(16,46,56,.1); border-top: 3px solid var(--mint-strong); box-shadow: var(--shadow); }
.faq-item h3 { color: var(--ink); font-size: 17px; line-height: 1.25; letter-spacing: -.03em; }
.faq-item p { margin-top: 11px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.methodology-item { margin-top: 16px; padding: 24px; background: var(--paper); border: 1px solid rgba(16,46,56,.1); border-top: 3px solid var(--orange); box-shadow: var(--shadow); }
.methodology-item h3 { color: var(--ink); font-size: 18px; line-height: 1.25; letter-spacing: -.03em; }
.methodology-item p { max-width: 980px; margin-top: 11px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.methodology-faq { padding: 12px 0 36px; }
.methodology-faq-heading { margin-bottom: 18px; }
.methodology-faq-heading h2 { max-width: 780px; margin-inline: auto; }
.methodology-faq-list { display: flex; flex-direction: column; gap: 10px; }
.methodology-faq-item { background: var(--paper); border: 1px solid rgba(16,46,56,.1); border-left: 3px solid var(--mint-strong); box-shadow: var(--shadow); }
.methodology-faq-item[open] { border-left-color: var(--orange); }
.methodology-faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 17px 20px; color: var(--ink); cursor: pointer; font-size: 14px; font-weight: 760; line-height: 1.4; list-style: none; }
.methodology-faq-item summary::-webkit-details-marker { display: none; }
.methodology-faq-item summary::after { content: '+'; flex: 0 0 auto; color: var(--orange); font-size: 21px; font-weight: 500; line-height: 1; }
.methodology-faq-item[open] summary::after { content: '−'; }
.methodology-faq-item summary:focus-visible { outline: 2px solid var(--orange); outline-offset: -3px; }
.methodology-faq-item p { margin: 0; padding: 0 20px 19px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.methodology-faq-item p strong { color: var(--ink); }
.contact-alert { display: flex; justify-content: center; padding-bottom: 28px; }
.contact-alert-link { display: flex; align-items: center; gap: 14px; width: 25%; max-width: 340px; min-width: 250px; padding: 18px 22px; color: #fff; background: #00705A; box-shadow: var(--shadow); transition: background .18s ease, transform .18s ease; }
.contact-alert-link:hover { background: #005b49; transform: translateY(-1px); }
.contact-alert-icon { display: grid; width: 36px; height: 36px; flex: 0 0 auto; place-items: center; }
.contact-alert-icon svg { display: block; width: 35px; height: 35px; }
.contact-alert-icon .alert-triangle { fill: #FFC107; }
.contact-alert-icon .alert-mark { fill: var(--ink); }
.contact-alert-link strong, .contact-alert-link small { display: block; }
.contact-alert-link strong { font-size: 14px; }
.contact-alert-link small { margin-top: 4px; color: rgba(255,255,255,.78); font-size: 11px; }
.contact-alert-arrow { margin-left: auto; font-size: 22px; }

@media (max-width: 780px) {
  .section-wrap { width: min(100% - 36px, 620px); }
  .topbar { width: 100%; padding-inline: 18px; }
  .topbar { height: 72px; }
  .topbar-note { display: none; }
  .hero { padding: 57px 0 59px; }
  .hero-grid { margin-top: 22px; }
  h1 { font-size: clamp(41px, 12vw, 64px); }
  .hero-text { margin-top: 20px; }
  .hero-signal { margin-top: 37px; padding: 16px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .hero-signal::before { top: -1px; left: 0; width: 45px; height: 3px; }
  .hero-signal strong { font-size: 36px; }
  .location-form-grid { display: flex; flex-direction: column; gap: 12px; }
  .location-form-grid .select-field { width: 100%; }
  #risk-map { height: min(45vh, 430px); min-height: 260px; }
  .map-hazard-chips { top: 10px; }
  .map-hazard-chip { min-width: 82px; padding: 8px 10px; font-size: 10px; }
  .map-legend { left: 10px; bottom: 10px; min-width: 137px; padding: 10px; }
  .map-toast { bottom: 10px; }
  .map-locate-control { min-width: 0; height: 32px; padding: 4px 8px; }
  .location-actions { display: flex; align-items: stretch; flex-direction: column; gap: 13px; }
  .location-actions > span { order: 2; }
  .location-actions .primary-button { width: 100%; min-height: 50px; justify-content: center; order: 1; }
  .section-heading, .results-header { align-items: flex-start; flex-direction: column; gap: 13px; }
  .section-heading h2, .results-header h2 { font-size: 24px; }
  .hazard-diagnostics { grid-template-columns: 1fr; padding: 13px; }
  .hazard-tabs { overflow-x: auto; padding-inline: 10px; }
  .hazard-tab { flex: 1 0 auto; font-size: 11px; }
  main { display: flex; flex-direction: column; }
  .search-section { order: 1; }
  .results-section { display: contents; }
  .results-layout { display: contents; }
  .result-main { order: 2; width: min(100% - 36px, 620px); margin-inline: auto; padding-bottom: 24px; }
  .impact-panel { order: 4; width: min(100% - 36px, 620px); min-width: 0; margin-inline: auto; }
  .map-section { order: 3; }
  .methodology-faq { order: 4; }
  .precautions-section { order: 5; }
  .map-section { padding-bottom: 24px; }
  .precautions-section { padding-top: 0; }
  .precautions-layout { display: flex; flex-direction: column; gap: 14px; }
  .risk-chooser { padding: 18px 14px; }
  .risk-choice { min-height: 48px; padding-block: 12px; }
  .summary-row { display: flex; align-items: flex-start; flex-direction: column; gap: 12px; }
  .risk-legend { justify-content: flex-start; }
  .footer { display: flex; align-items: flex-start; flex-direction: column; }
  .contact-alert-link { width: 80%; max-width: none; min-width: 0; }
}

@media (max-width: 768px) {
  .hero-grid { flex-direction: column; align-items: stretch; gap: 0; }
  .hero-logo { display: none; }
  .hero-icono-lateral { display: none !important; }
  .map-legend { min-width: 0; padding: 5px; gap: 4px; font-size: 10px; }
  .map-legend-swatch { width: 12px; height: 12px; }
}

@media (max-width: 500px) {
  .section-wrap { width: calc(100% - 28px); }
  .brand-logo { width: 100px; }
  .brand-copy strong { font-size: 18px; }
  .brand-copy small { display: none; }
  .hero { padding-top: 45px; }
  .search-card { padding: 13px; }
  .location-card { padding: 16px 13px; }
  .location-intro { display: flex; align-items: stretch; flex-direction: column; gap: 12px; padding-bottom: 16px; }
  .free-badge { align-self: flex-start; }
  .whatsapp-button { width: 100%; justify-content: center; text-align: center; }
  .search-field { padding-inline: 12px; }
  .search-field kbd { display: none; }
  .location-form-grid { grid-template-columns: 1fr; gap: 10px; }
  .summary-row { align-items: flex-start; flex-direction: column; }
  .risk-legend { justify-content: flex-start; gap: 9px 14px; }
  .section-heading, .results-header { flex-direction: column; gap: 13px; margin-bottom: 17px; }
  .map-heading { flex-direction: row; align-items: center; gap: 10px; }
  .map-heading h2 { font-size: 22px; }
  .map-heading-actions { margin-left: auto; }
  .map-heading-actions .selection-hint { display: none; }
  .map-clear-button { padding-inline: 8px; font-size: 10px; }
  .text-button { align-self: flex-start; }
  th, td { padding: 13px 12px; }
  .table-wrap { overflow: visible; }
  table { display: block; min-width: 0; width: 100%; }
  thead { display: none; }
  tbody { display: flex; flex-direction: column; gap: 10px; padding: 12px; }
  tbody > tr:not(.tooltip-row) { display: flex; flex-direction: column; padding: 10px 13px; background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--orange); }
  tbody > tr:not(.tooltip-row):hover, tbody > tr.is-expanded { background: #fff; }
  tbody > tr:not(.tooltip-row) td { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; width: 100%; padding: 9px 0; border-bottom: 1px solid #edf1ef; white-space: normal; text-align: right; }
  tbody > tr:not(.tooltip-row) td:last-child { border-bottom: 0; }
  tbody > tr:not(.tooltip-row) td::before { content: attr(data-label); flex: 0 0 auto; color: var(--muted); font-size: 9px; font-weight: 750; letter-spacing: .08em; text-align: left; text-transform: uppercase; }
  tbody > tr:not(.tooltip-row) td:first-child { color: var(--ink); }
  .district-trigger { margin: 0; padding: 0; font-size: 13px; }
  .district-cell { align-items: flex-end; width: 100%; }
  .district-name-line { justify-content: flex-end; }
  .tooltip-row { display: block; }
  .tooltip-row td { display: block; width: 100%; padding: 0; border: 0; }
  .tooltip-row td::before { display: none; }
  .table-footer { align-items: flex-start; flex-direction: column; gap: 10px; padding-block: 14px; }
  .table-footer-actions { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .precautions-main { padding: 28px 23px; }
  .precaution-list { grid-template-columns: 1fr; gap: 10px; }
  .selection-hint { display: none; }
  .district-tooltip { padding: 18px 13px; }
  .tooltip-topline { gap: 10px; }
  .district-tooltip h3 { font-size: 16px; }
  .tooltip-metrics { grid-template-columns: 1fr; gap: 8px; }
  .tooltip-metric { min-height: 62px; padding: 10px; }
  .tooltip-metric strong { font-size: 17px; }
  .impact-panel { padding: 22px 16px 18px; }
  .impact-panel h2 { font-size: 23px; }
  .ranking-item { display: flex; align-items: center; gap: 8px; }
  .ranking-copy { flex: 1; }
  .movement-info { padding-top: 0; }
  .info-heading { margin-bottom: 14px; }
  .info-heading h2 { font-size: 22px; }
  .faq-list { grid-template-columns: 1fr; gap: 11px; }
  .faq-item { padding: 18px 16px 19px; }
  .faq-item h3 { font-size: 16px; }
  .faq-item p { font-size: 12px; }
}
